commit 47fed4403f32023488c95385b7c7c16b25374ffd Author: Dmitry Sudarenko Date: Thu Nov 14 08:45:50 2024 +0300 first commit diff --git a/Lect1/01_page_6.c b/Lect1/01_page_6.c new file mode 100644 index 0000000..79f360d --- /dev/null +++ b/Lect1/01_page_6.c @@ -0,0 +1,13 @@ +#include +#include +#include + + +int main(void) +{ + int32_t x = 3, y = 8;//0b0011 = 3, 0b1000 = 8 + (x & y) ? printf("True ") : printf("False ");//0b0011 & 0b1000 = 0b0000 + (x && y) ? printf("True ") : printf("False ");//0b0011 && 0b1000 = 0b0001 + + return 0; +} diff --git a/Lect1/02_page_8.c b/Lect1/02_page_8.c new file mode 100644 index 0000000..c954782 --- /dev/null +++ b/Lect1/02_page_8.c @@ -0,0 +1,14 @@ +#include +#include +#include + + +int main(void) +{ + uint8_t u = 0xF5; //беззнаковый тип 0b1111 0101 + //u = u >> 1; + u >>= 1; // сдвиг вправо на 1 бит 0b0111 1010(1) + printf("u = 0x%" PRIx8 "\n", u); + + return 0; +} diff --git a/Lect1/03_page_8.c b/Lect1/03_page_8.c new file mode 100644 index 0000000..0149135 --- /dev/null +++ b/Lect1/03_page_8.c @@ -0,0 +1,14 @@ +#include +#include +#include + + +int main(void) +{ + int8_t u = 0xF5; //знаковый тип 0b1111 0101 + u >>= 1; // сдвиг вправо на 1 бит 0b1111 1010(0) + //~ printf("u = 0x%"PRIx8 "\n", u); + printf("u = 0x%"PRIx8 "\n", u); + + return 0; +} diff --git a/Lect1/04_page_8.c b/Lect1/04_page_8.c new file mode 100644 index 0000000..450167b --- /dev/null +++ b/Lect1/04_page_8.c @@ -0,0 +1,7 @@ +uint8_t u = 0xF5; //беззнаковый тип 1111 0101 +u >>= 2; // сдвиг вправо на 1 бит +printf("u = %" PRIx8 "\n", u); + +int8_t u = 0xF5; //знаковый тип 1111 0101 +u >>= 2; // сдвиг вправо на 1 бит +printf("u = %" PRIx8 "\n", u); diff --git a/Lect1/05_page_9.c b/Lect1/05_page_9.c new file mode 100644 index 0000000..275941e --- /dev/null +++ b/Lect1/05_page_9.c @@ -0,0 +1,20 @@ +#include +#include +#include + +int find_odd_element(int32_t arr[], size_t n) +{ + int32_t res = 0; + for (size_t i = 0; i < n; i++) + res ^= arr[i];//А^B^A = A + return res; +} +int main(void) { + int32_t arr[] = {17,17,24,99,24,24,24}; + size_t n = sizeof(arr) / sizeof(arr[0]); + printf("The element is %" PRId32, + find_odd_element(arr, n)); + return 0; +} + + diff --git a/Lect1/06_page_10.c b/Lect1/06_page_10.c new file mode 100644 index 0000000..f885d3b --- /dev/null +++ b/Lect1/06_page_10.c @@ -0,0 +1,10 @@ +#include +#include +#include + + +int main(void) +{ + int32_t x = 17; + (x & 1) ? printf("Odd") : printf("Even"); +} diff --git a/Lect1/07_page_11.c b/Lect1/07_page_11.c new file mode 100644 index 0000000..dace508 --- /dev/null +++ b/Lect1/07_page_11.c @@ -0,0 +1,22 @@ +#include +#include + +int main(void) +{ + uint32_t a = 60; /* 60 = 0011 1100 */ + uint32_t b = 13; /* 13 = 0000 1101 */ + int32_t c = 0; + c = a & b; /* 12 = 0000 1100 */ + printf("Line 1 c = %u\n", c ); + c = a | b; /* 61 = 0011 1101 */ + printf("Line 2 c = %u\n", c ); + c = a ^ b; /* 49 = 0011 0001 */ + printf("Line 3 c = %u\n", c ); + c = ~a; /*-61 = 1100 0011 */ + printf("Line 4 c = %d\n", c ); + c = a << 2; /* 240 = 1111 0000 */ + printf("Line 5 c = %u\n", c ); + c = a >> 2; /* 15 = 0000 1111 */ + printf("Line 6 c = %u\n", c ); + return 0; +} diff --git a/Lect1/08_page_15.1.c b/Lect1/08_page_15.1.c new file mode 100644 index 0000000..d622465 --- /dev/null +++ b/Lect1/08_page_15.1.c @@ -0,0 +1,18 @@ +#include +#include + +struct date { + uint16_t day : 5; // значение от 0 до 31 unsigned short + uint16_t month : 4; // значение 0 до 15 + //~ uint16_t year;//: 7; если огранчить с 2000 до 2127 года + uint16_t year : 7; //если огранчить с 2000 до 2127 года +}; +int main(void) +{ + //~ struct date dt = { 31, 12, 2021 };//{ 31, 12, 21 } + struct date dt = { 31, 12, 127 }; + printf("Size is %llu\n", sizeof(dt)); + printf("Date is %u/%u/%u\n",dt.day, dt.month, dt.year); +//+2000); + return 0; +} diff --git a/Lect1/08_page_15.c b/Lect1/08_page_15.c new file mode 100644 index 0000000..aa920c6 --- /dev/null +++ b/Lect1/08_page_15.c @@ -0,0 +1,14 @@ +#include +#include + +struct date { + uint16_t day : 5; // значение от 0 до 31 + uint16_t month : 4; // значение 0 до 15 + uint16_t year;//: 7; если огранчить с 2000 до 2064 года +}; +int main(void) +{ + struct date dt = { 31, 12, 2021 }; + dt.month = 16; + printf("Date is %u/%u/%u", dt.day, dt.month, dt.year); +} diff --git a/Lect1/09_page_17.c b/Lect1/09_page_17.c new file mode 100644 index 0000000..37d066f --- /dev/null +++ b/Lect1/09_page_17.c @@ -0,0 +1,24 @@ +#include +#include + +union floatbit +{ + float value; + struct { + uint32_t mant : 23; + uint32_t exp : 8; + uint32_t sign : 1; + } bit; +} f; + +int main() +{ + f.value = -4.1; + //~ f.value = 4.0; + printf("Memory size is %llu\n", sizeof(f)); + printf("f.value = %f\n",f.value ); + printf("sign = %#x\n",f.bit.sign); + printf("exp = %d\n",f.bit.exp); + printf("mantissa = %#x\n",f.bit.mant); + return 0; +} diff --git a/Lect1/10_page_18.c b/Lect1/10_page_18.c new file mode 100644 index 0000000..92f291a --- /dev/null +++ b/Lect1/10_page_18.c @@ -0,0 +1,17 @@ +#include +#include + +int main(void) +{ + int32_t a, sign;//-1 = 0b1111 1111 + scanf("%d",&a); + sign = a>>31; // записываем маску >>8 = 1111 1111 + printf("%x\n",a); + a = a^sign; // если число отрицательное то инверсия + //~ a ^= sign; // если число отрицательное то инверсия + printf("%x\n",a); + a = a + (sign&0x1); // если число было отрицательное то +1 + //~ a += sign&0x1; // если число было отрицательное то +1 + printf("%d\n",a); + return 0; +} diff --git a/Lect1/11_page_19.c b/Lect1/11_page_19.c new file mode 100644 index 0000000..463c023 --- /dev/null +++ b/Lect1/11_page_19.c @@ -0,0 +1,11 @@ +#include +_Bool isEqual(int a, int b) { + return !(a^b); +} + +int main(void) +{ + int a = 3,b=5; + isEqual(a,b) ? printf("YES\n") : printf("NO\n"); + return 0; +} diff --git a/Lect1/12_page_20.c b/Lect1/12_page_20.c new file mode 100644 index 0000000..209e289 --- /dev/null +++ b/Lect1/12_page_20.c @@ -0,0 +1,21 @@ +#include +#include + +void changeSign(float *f) { + union { + float f; + uint32_t u; + } tmp; + tmp.f = *f; + tmp.u = tmp.u ^ 0x80000000;//1000 0000 0000 0000 0000 0000 0000 0000 + *f = tmp.f; +} + + +int main(void) +{ + float f = 4.0; + changeSign(&f); + printf("%f\n",f); + return 0; +} diff --git a/Lect1/13_task_4_page_21.c b/Lect1/13_task_4_page_21.c new file mode 100644 index 0000000..cf08788 --- /dev/null +++ b/Lect1/13_task_4_page_21.c @@ -0,0 +1,19 @@ +#include +#include + +int32_t inverse5bits(int n) +{ + return n ^ 0x1F; +} + +int main () +{ + int32_t a = 0xFF; + printf("%x\n", a); + a = inverse5bits(a); + printf("%x\n", a); + a = inverse5bits(a); + printf("%x\n", a); + + return 0; +} \ No newline at end of file diff --git a/Lect1/14_page_22.c b/Lect1/14_page_22.c new file mode 100644 index 0000000..7805b82 --- /dev/null +++ b/Lect1/14_page_22.c @@ -0,0 +1,13 @@ +#include +#include + +_Bool difSign(int32_t a, int32_t b) { + return (a>>31)^(b>>31); +} + +int main(void) +{ + int a = -3,b=5; + difSign(a,b) ? printf("YES\n") : printf("NO\n"); + return 0; +} diff --git a/Lect1/15_task_6_page_23.c b/Lect1/15_task_6_page_23.c new file mode 100644 index 0000000..de913a9 --- /dev/null +++ b/Lect1/15_task_6_page_23.c @@ -0,0 +1,17 @@ +#include +#include + +int div1IfEven(int a) { + return a - !(a&0x1); +} + +int main () +{ + int32_t a, res; + + scanf("%d",&a); + res = div1IfEven(a); + printf("%d", res); + + return 0; +} \ No newline at end of file diff --git a/Lect1/16_task_7_page_24.c b/Lect1/16_task_7_page_24.c new file mode 100644 index 0000000..1531410 --- /dev/null +++ b/Lect1/16_task_7_page_24.c @@ -0,0 +1,18 @@ +#include +#include + +int32_t unset_rightmost (uint32_t n) +{ + return n & (n - 1); +} + +int main () +{ + int32_t a, res; + + scanf("%d",&a); + res = unset_rightmost(a); + printf("%d", res); + + return 0; +} \ No newline at end of file diff --git a/Lect1/17_task_8_page_25.c b/Lect1/17_task_8_page_25.c new file mode 100644 index 0000000..7e76fd1 --- /dev/null +++ b/Lect1/17_task_8_page_25.c @@ -0,0 +1,18 @@ +#include +#include + +_Bool isPowerOfFour(uint32_t n) +{ + return n != 0 && ((n&(n-1)) == 0) && !(n & 0xAAAAAAAA); +} + +int main () +{ + int32_t a; + + scanf("%d",&a); + + printf("%s", isPowerOfFour(a) ? "YES" : "NO"); + + return 0; +} \ No newline at end of file diff --git a/Lect1/18_task_9_page_26.c b/Lect1/18_task_9_page_26.c new file mode 100644 index 0000000..296c205 --- /dev/null +++ b/Lect1/18_task_9_page_26.c @@ -0,0 +1,17 @@ +#include +#include + +int leftRotate(uint32_t n, uint32_t rotate) +{ + return (n << rotate)|(n >> (32 - rotate)); +} +int main () +{ + int32_t a, rotate, res; + + scanf("%d %d",&a, &rotate); + res = leftRotate(a, rotate); + printf("%d", res); + + return 0; +} \ No newline at end of file diff --git a/Lect1/19_task_10_page_27.c b/Lect1/19_task_10_page_27.c new file mode 100644 index 0000000..ceb2063 --- /dev/null +++ b/Lect1/19_task_10_page_27.c @@ -0,0 +1,17 @@ +#include +#include + +int rightRotate(uint32_t n, uint32_t rotate) +{ + return (n >> rotate)|(n << (32 - rotate)); +} +int main () +{ + int32_t a, rotate, res; + + scanf("%d %d",&a, &rotate); + res = rightRotate(a, rotate); + printf("%d", res); + + return 0; +} \ No newline at end of file diff --git a/Lect1/20_task_11_page_28.c b/Lect1/20_task_11_page_28.c new file mode 100644 index 0000000..06accec --- /dev/null +++ b/Lect1/20_task_11_page_28.c @@ -0,0 +1,27 @@ +#include +#include +union floatbit { + float value; + struct { + uint32_t mant : 23; + uint32_t exp : 8; + uint32_t sign : 1; + } bit; +} f; + +float mult4(float f) { + union floatbit tmp; + tmp.value = f; + tmp.bit.exp += 2; + return tmp.value; +} +int main () +{ + float a, res; + + scanf("%f",&a); + res = mult4(a); + printf("%.3f", res); + + return 0; +} \ No newline at end of file diff --git a/Lect1/21_task_13_page_30.c b/Lect1/21_task_13_page_30.c new file mode 100644 index 0000000..e7f05c4 --- /dev/null +++ b/Lect1/21_task_13_page_30.c @@ -0,0 +1,36 @@ +#include +#include + +uint32_t reverseBits(uint32_t num) +{ + uint32_t NO_OF_BITS = sizeof(num) * 8; + uint32_t reverse_num = 0; + int32_t i; + for (i = 0; i < NO_OF_BITS; i++) + { + if((num & (1 << i))) + reverse_num |= 1 << ((NO_OF_BITS - 1) - i); + } + return reverse_num; +} +uint32_t bitRevers(uint32_t n) { + uint32_t r=0; + while(n) { + r <<= 1; + r |= n&0x1; + n >>= 1; + } + return r; +} + +int main () +{ + uint32_t a, res; + + scanf("%u",&a); + //res = reverseBits(a); + res = bitRevers(a); + printf("%u", res); + + return 0; +} \ No newline at end of file diff --git a/Lect1/22_page_34.1.c b/Lect1/22_page_34.1.c new file mode 100644 index 0000000..bd9e46e --- /dev/null +++ b/Lect1/22_page_34.1.c @@ -0,0 +1,34 @@ +#include +#include + + +int main(void) +{ + int i=123; + int *pi; //указатель на переменную + pi = &i; + + int **ppi;// указатель на указатель + ppi = π + printf("**ppi = %d\n",**ppi); + + struct s { + int i; + float f; + } st; + + struct s *ps; + ps = &st; //указатель на структуру + printf("ps -> i = %d\n",ps->i); + + int ar[5] = {1,2,3,4,5}; + int *pa; //указатель на массив + pa = &ar[0]; // pa = ar; + printf("*pa = %d\n",*pa); + + int ar2[3][5] = {{1,2,3,4,5}, {11,12,13,14,15}, {21,22,23,24,25}}; + int (*pa2)[5]; //указатель массив из 5-и элементов + pa2 = ar2+1; //адрес 1-ой строки + printf("**pa2 = %d\n",**pa2); + return 0; +} diff --git a/Lect1/22_page_34.c b/Lect1/22_page_34.c new file mode 100644 index 0000000..6ca4ae1 --- /dev/null +++ b/Lect1/22_page_34.c @@ -0,0 +1,16 @@ +#include +#include + +struct s { + int i; + float f; +} st = {10,3.14}; + +int main(void) +{ + struct s *ps; + ps = &st; //указатель на структуру + printf("ps -> i = %d\n",ps->i); + printf("(*ps).i = %d\n",(*ps).i); + return 0; +} diff --git a/Lect1/23_page_36-38.c b/Lect1/23_page_36-38.c new file mode 100644 index 0000000..6400355 --- /dev/null +++ b/Lect1/23_page_36-38.c @@ -0,0 +1,29 @@ +#include + +struct student +{ + int id; + char name[20]; + int group; +}; + +void func(struct student record) +{ + printf(" Id is: %d \n", record.id); + printf(" Name is: %s \n", record.name); + printf(" Group is: %d \n", record.group); +} + +void pfunc(struct student *record) +{ + printf("Id is: %d \n", record->id); + printf("Name is: %s \n", record->name); + printf("Group is: %d \n", record->group); +} + +int main(void) { + struct student record = {1, "Vasiliy", 102}; + func(record); + pfunc(&record); + return 0; +} diff --git a/Lect1/24_page_40.1.c b/Lect1/24_page_40.1.c new file mode 100644 index 0000000..ce0f33f --- /dev/null +++ b/Lect1/24_page_40.1.c @@ -0,0 +1,13 @@ +#include + +int func(int n) { + printf("Hello func %d\n",n); + return n+1; +} +int main() +{ + int (*fp)(int); + fp = func; + fp(128); + return 0; +} diff --git a/Lect1/24_page_40.2.c b/Lect1/24_page_40.2.c new file mode 100644 index 0000000..adf546b --- /dev/null +++ b/Lect1/24_page_40.2.c @@ -0,0 +1,14 @@ +#include + +int func(int n) +{ + printf("Hello func %d\n",n); + return n+1; +} +int main() +{ + int (*fp)(int); + fp = func; + fp(5); + return 0; +} diff --git a/Lect1/25_page_41.c b/Lect1/25_page_41.c new file mode 100644 index 0000000..317eddd --- /dev/null +++ b/Lect1/25_page_41.c @@ -0,0 +1,18 @@ +#include + +typedef struct { + int id; + char name[20]; + int group; +} student; + +int main(void) +{ +student s; + s.id = 1; + +typedef int iarr[10]; + iarr a, b, c[5]; +// тоже самое int a[10], b[10], c[10][5]; + return 0; +} diff --git a/Lect1/26_page_43_44.c b/Lect1/26_page_43_44.c new file mode 100644 index 0000000..8ae55aa --- /dev/null +++ b/Lect1/26_page_43_44.c @@ -0,0 +1,60 @@ +/*В программе реализована структура данных: +struct pack_array +{ + uint32_t array; // поле для хранения упакованного массива из 0 и 1 + uint32_t count0 : 8; // счетчик нулей в array + uint32_t count1 : 8; // счетчик единиц в array +} +Необходимо написать программу, которая упаковывает переданный ей массив из 32-ух элементов 0 и 1 в указанную структуру данных. +Функция должна строго соответствовать прототипу: void array2struct(int [], struct pack_array *) + +Пример №1 +Данные на входе: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +Данные на выходе: +Поля структуры +array = ffff0000 +count0 = 16 +count1 = 16 + +Пример №2 +Данные на входе: 1 1 1 1 1 1 1 1 1 0 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 +Данные на выходе: +Поля струткуры +array = ffa70009 +count0 = 17 +count1 = 15 +*/ + +#include +#include + +struct pack_array { +uint32_t array; // поле для хранения упакованного массива из 0 и 1 +uint32_t count0 : 8; // счетчик нулей в array +uint32_t count1 : 8; // счетчик единиц в array +}; + +void array2struct(int origin[] , struct pack_array *res) +{ + for (int i =0; i<32; i++) + { + res->count1 += origin[i]; + res->array |= origin[i]; + i<31 ? res->array<<=1 : 1; + } + res -> count0=32-res->count1; +} + +int main () +{ +int arr[32]; +struct pack_array res; + for (int i=0; i<32; i++) + { + scanf("%d", arr+i); + } + array2struct(arr, &res); + printf("array: 0x%x\ncount0: %d\ncount1 %d\n", res.array, res.count0, res.count1); + return 0; +} + diff --git a/Lect1/27_page_46.c b/Lect1/27_page_46.c new file mode 100644 index 0000000..d41b9c3 --- /dev/null +++ b/Lect1/27_page_46.c @@ -0,0 +1,22 @@ +#include +#include + +int extractExp(float f) { + union { + float f; + struct { + uint32_t mantissa : 23; + uint32_t exp : 8; + uint32_t s : 1; + } field; + } fl; + fl.f = f; + return fl.field.exp; +} + +int main(void) +{ + float f = 1.423; + printf("exp = %d\n",extractExp(f)-127); + return 0; +} diff --git a/Lect2/08.c b/Lect2/08.c new file mode 100644 index 0000000..cf1514d --- /dev/null +++ b/Lect2/08.c @@ -0,0 +1,12 @@ +#include + +int main(void) +{ + float f = 2.0; + int *p; + p = (int*)&f; + printf("*p = %x\n",*p); + *p = (127+3)<<23; // кладем в f 2^3 меняем порядок + printf("f = %f\n",f); + return 0; +} diff --git a/Lect2/10.c b/Lect2/10.c new file mode 100644 index 0000000..6c33428 --- /dev/null +++ b/Lect2/10.c @@ -0,0 +1,14 @@ +#include + +int main(void) +{ + int *p = NULL; // 0 — не указывает ни на что + +/*ОШИБКА! Попытка разыменовать нулевой указатель */ + //~ if(*p) + if(p && *p) //правильно - ленивая логика + printf("True\n"); + return 0; +} + + diff --git a/Lect2/10_1.c b/Lect2/10_1.c new file mode 100644 index 0000000..c726fa6 --- /dev/null +++ b/Lect2/10_1.c @@ -0,0 +1,13 @@ + #include + +int main(void) +{ +/* Нет ошибки */ + int *p = NULL; + //~ if(p == &(*p)) + //~ if(&(*p) != NULL) + //~ if(p == NULL) + if(!p)//(p!=0) (*p) + printf("True\n"); + return 0; +} diff --git a/Lect2/13.c b/Lect2/13.c new file mode 100644 index 0000000..5dad542 --- /dev/null +++ b/Lect2/13.c @@ -0,0 +1,20 @@ +#include +#include + + +//может сравнивать любые указатели +_Bool is_same(void *a, void *b) +{ + //~ return *a = *b; // ОШИБКА! void * нельзя разыменовывать + return a == b; // Можно только сравнивать +} + +int main(void) +{ + int a=5; + int b=5; + int *pa = &b; + float *pc=NULL; + is_same(&a, pc) ? printf("Same\n") : printf("Different\n"); + return 0; +} diff --git a/Lect2/15.c b/Lect2/15.c new file mode 100644 index 0000000..9a262ec --- /dev/null +++ b/Lect2/15.c @@ -0,0 +1,13 @@ +#include + +int main(void) +{ + int a[5] = {1,2,3,4,5}; // в памяти выделено 20 байт + //~ const int* const pa = &a[0]; // в памяти выделено 8 байт + int *pb = &a[0]; // в памяти выделено 8 байт + //~ a = &a[2]; // ОШИБКА! + pa = &a[1]; // Нельзя менять константный указатель + pb = &a[1]; + pb[2] = 100; + return 0; +} diff --git a/Lect2/16-17.c b/Lect2/16-17.c new file mode 100644 index 0000000..388e96b --- /dev/null +++ b/Lect2/16-17.c @@ -0,0 +1,15 @@ +#include + +char *strcpy(char *dst, const char *src ) { + char *d = dst; + while (*dst++ = *src++);//!=0 + return d; +} +int main() +{ + char a[]="Hello!", b[7]; + a[6] = '*'; + strcpy(b,a); + printf("b = %s\n",b); + return 0; +} diff --git a/Lect2/21-22.c b/Lect2/21-22.c new file mode 100644 index 0000000..5b53a60 --- /dev/null +++ b/Lect2/21-22.c @@ -0,0 +1,36 @@ +#include +#include + +int main(void) +{ + double sum=0,v;//сумма и введенное значение + int arr_size=0, arr_u=0;//размер массива и текущая позиция + double *arr = NULL;//память под динамический массив + arr_size = 16;//задаем начальный размер + if (!(arr = (double*) malloc(arr_size * sizeof(arr[0]))))//выделяем память NULL + goto out_of_mem;//не смогли выделить память + while (scanf("%lf", &v) == 1)//пока приходят данные + { + if (arr_u == arr_size)//если достигли конца массива + { + arr_size *= 2;//увеличиваем размер в двое и выделяем память + if (!(arr = (double*) realloc(arr, arr_size * sizeof(arr[0])))) + goto out_of_mem;//не смогли выделить память + } + sum += v;//находим сумму + arr[arr_u] = v;//сохраняем значение в текущую позицию + arr_u++;//сдвигаем текущую позицию в массиве + } + if (!arr_u)//не было введено ни одного значения + return 0; + double average = sum/arr_u;//находим среднее значение + printf("%lf\n", average); + for(int i=0; i < arr_u; i++) + if(arr[i] <= average)//лучше сравнивать с определенной точностью + printf("%lf\n", arr[i]);//печатаем числа, не превышающие среднее + free(arr);//освобождаем память + return 0;//выходим с хорошим кодом завершения +out_of_mem: + fprintf(stderr, "Can't allocate memory\n"); + return 1;//выходим с аварийным кодом завершения +} diff --git a/Lect2/24.c b/Lect2/24.c new file mode 100644 index 0000000..78a2ec0 --- /dev/null +++ b/Lect2/24.c @@ -0,0 +1,10 @@ +#include + +int main(void) +{ + int *p1, p2; + int n = 30; + p1 = &n; + p2 = &n; // ОШИБКА + return 0; +} diff --git a/Lect2/25.c b/Lect2/25.c new file mode 100644 index 0000000..c80fa2b --- /dev/null +++ b/Lect2/25.c @@ -0,0 +1,24 @@ +#include + +int main(void) +{ + + { + int *p1; // указывает на случайную область памяти + int n = *p1; // ОШИБКА разыменования + printf("%d\n", n); + } + + + { + int* p1; + int m; + p1 = &m; // указатель ссылается на + // неинициализированную + // переменную + int n = *p1; + printf("%d\n", n); + } + return 0; +} + diff --git a/Lect2/26.c b/Lect2/26.c new file mode 100644 index 0000000..f2efc20 --- /dev/null +++ b/Lect2/26.c @@ -0,0 +1,10 @@ +#include + +int main(void) +{ + int *p1; + int m = 100;//mmap + p1 = m; // ОШИБКА +//вместо адреса присвоили //значение + return 0; +} diff --git a/Lect2/27.c b/Lect2/27.c new file mode 100644 index 0000000..f91a135 --- /dev/null +++ b/Lect2/27.c @@ -0,0 +1,14 @@ +#include + +int main(void) +{ + int *p1; + int m = 100; + p1 = &m; // присваиваем адрес m + *p1++; // ОШИБКА! увеличение + //адреса, а не значения + //~ (*p1)++; + + printf("%d",*p1); + return 0; +} diff --git a/Lect2/28.c b/Lect2/28.c new file mode 100644 index 0000000..c929fe7 --- /dev/null +++ b/Lect2/28.c @@ -0,0 +1,12 @@ +#include +#include + + +int main(void) +{ + int* p1; + int m = 100; + p1 = &m; + free(p1); //ОШИБКА! Попытка освободить стековую память + return 0; +} diff --git a/Lect2/29.c b/Lect2/29.c new file mode 100644 index 0000000..08fb63f --- /dev/null +++ b/Lect2/29.c @@ -0,0 +1,21 @@ +#include +#include + +int main(void) +{ + { + int* p1; + p1 = malloc(sizeof(int)); + *p1 = 99; + free(p1); + *p1 = 100; // ОШИБКА! память не определена + } + { + int* p1; + p1 = malloc(sizeof(int)); + *p1 = 99; + *p1 = 100; + free(p1); + } + return 0; +} diff --git a/Lect2/30.c b/Lect2/30.c new file mode 100644 index 0000000..7eab012 --- /dev/null +++ b/Lect2/30.c @@ -0,0 +1,14 @@ +#include +#include +#include + +int main(void) +{ + char *str1 = malloc(strlen("Hello world") + 1); + strcpy(str1, "Hello world"); + //... + free(str1); // Первый раз free + //... + free(str1); // ОШИБКА! второй раз free + return 0; +} diff --git a/Lect2/31.c b/Lect2/31.c new file mode 100644 index 0000000..68cd2e3 --- /dev/null +++ b/Lect2/31.c @@ -0,0 +1,11 @@ +#include +#include + +int main(void) +{ + int *p; + p = malloc(4); // ОШИБКА! + // нарушение переносимости + p = malloc(sizeof(int)); + return 0; +} diff --git a/Lect2/32.c b/Lect2/32.c new file mode 100644 index 0000000..a16cc64 --- /dev/null +++ b/Lect2/32.c @@ -0,0 +1,25 @@ +#include +#include + +int main(void) +{ + { + int* p = malloc(sizeof(int)); + *p = 5; + p = malloc(sizeof(int)); //ОШИБКА! + // Предыдущий блок все еще + // занимает память + } + { + int* p = malloc(sizeof(int)); + *p = 5; + free(p); + p = malloc(sizeof(int)); + } + + return 0; +} + + + + diff --git a/Lect2/33.c b/Lect2/33.c new file mode 100644 index 0000000..a4b2341 --- /dev/null +++ b/Lect2/33.c @@ -0,0 +1,16 @@ +#include +#include +#include + +int main(void) +{ + struct st { char *s; } t1, t2; + t1.s = malloc(10); + strcpy (t1.s, "Hello "); + t2 = t1;//будет скопирована ссылка на память + printf ("%s", t2.s); + strcpy (t1.s, "world!"); + printf ("%s", t2.s);//поменялась + printf ("%s", t1.s);//поменялась + return 0; +} diff --git a/Lect2/34.c b/Lect2/34.c new file mode 100644 index 0000000..3393382 --- /dev/null +++ b/Lect2/34.c @@ -0,0 +1,16 @@ +#include +#include +#include + +int main(void) +{ + struct st { char s[10]; } t1, t2; + strcpy (t1.s, "Hello "); + t2 = t1;//память будет скопирована + printf ("%s", t2.s); + strcpy (t1.s, "world!"); + printf ("%s", t2.s);//не поменялась + printf ("%s", t1.s);//поменялась + printf ("%s", t2.s); + return 0; +} diff --git a/Lect2/35.c b/Lect2/35.c new file mode 100644 index 0000000..f0f6d6e --- /dev/null +++ b/Lect2/35.c @@ -0,0 +1,17 @@ +#include +#include +#include + +int main(void) +{ + int len = strlen("Hello"); + char *str1 = malloc(len + 1); + strcpy(str1, "Hello"); + char *str2 = str1; + printf("%s\n", str1); + // ... много кода + free(str1); + // .. много кода + printf("%s\n", str2); // ОШИБКА! Эта память уже не определена + return 0; +} diff --git a/Lect2/36.c b/Lect2/36.c new file mode 100644 index 0000000..614e08a --- /dev/null +++ b/Lect2/36.c @@ -0,0 +1,12 @@ +#include +#include + +int main(void) +{ + const size_t SIZE = 10; + int *arr; + arr = malloc(sizeof(int) * SIZE); + arr[SIZE] = 100; // ОШИБКА! выход за + // границу массива + return 0; +} diff --git a/Lect2/37.c b/Lect2/37.c new file mode 100644 index 0000000..290a795 --- /dev/null +++ b/Lect2/37.c @@ -0,0 +1,11 @@ +#include + +int main(void) +{ +int num = 2147483647;// 0x7fffffff + int *pi = # + short *ps = (short*)pi; + printf("pi: %p Value(16): %x Value(10): %d\n", pi, *pi, *pi); + printf("ps: %p Value(16): %hx Value(10): %hd\n", ps, *ps, *ps); + return 0; +} diff --git a/Lect2/38.c b/Lect2/38.c new file mode 100644 index 0000000..c2683e1 --- /dev/null +++ b/Lect2/38.c @@ -0,0 +1,22 @@ +#include +#include +#include + + +int main(void) +{ + int len = strlen("Hello"); + char* str1 = malloc(len + 1); + strcpy(str1, "Hello"); + char* str2 = malloc(len + 1); + strcpy(str2, "Hello"); + if (str1 == str2) + { + printf("Strings are equal\n"); + } + else + { + printf("Strings are NOT equal\n"); + } + return 0; +} diff --git a/Lect2/40-1.c b/Lect2/40-1.c new file mode 100644 index 0000000..ca62194 --- /dev/null +++ b/Lect2/40-1.c @@ -0,0 +1,14 @@ +#include + +void print_array(int a[5]) { +/* ОШИБКА! + Размер массива теряется */ + int size = sizeof(a)/sizeof(int); + for(int i=0; i +void print_array(int a[], int size) { + /* Так можно */ + for( int i=0; i + +void print_matrix(int n, int m, void *a) { + int (*pa)[m] = a; // Указатель на строку из + // m элементов типа int + for( int i=0; i + +void print_matrix(int n, int m, int a[][m]) { // Важен только размер строки + for( int i=0; i + +int ar[] = {1,2,3,4,5}; +int *par = ar; + +int main(void) { + par[3] = 123; + ar[2] = 321; + return 0; +} diff --git a/Lect2/45.bat b/Lect2/45.bat new file mode 100644 index 0000000..ba013be --- /dev/null +++ b/Lect2/45.bat @@ -0,0 +1,3 @@ +gcc -c -o main.o main.c +gcc -c -o arr.o arr.c +gcc -o prog main.o arr.o \ No newline at end of file diff --git a/Lect2/47.c b/Lect2/47.c new file mode 100644 index 0000000..35e0fbc --- /dev/null +++ b/Lect2/47.c @@ -0,0 +1,15 @@ +#include + +int main(void) +{ + { + char s[] = "Hello world"; + s[0] = 'A'; // Так можно + } + { + char *s = "Hello world"; + s[0] = 'A'; // ОШИБКА! read-only string + } + return 0; +} + diff --git a/Lect2/49-52.c b/Lect2/49-52.c new file mode 100644 index 0000000..49ddb45 --- /dev/null +++ b/Lect2/49-52.c @@ -0,0 +1,88 @@ +#include +#include +//список о выделенной памяти +typedef struct list { + void *address; + size_t size; + char comment[64]; + struct list *next; +} list; + +list *memlist = NULL; + +//добавление информация в однонаправленный список о новом блоке выделенной памяти +void insert(list **head, void *address, size_t size, char *comment) { + list *tmp = malloc(sizeof(list)); + tmp->next = *head; + tmp->address = address; + tmp->size = size; + sprintf(tmp->comment,"%s",comment); + *head = tmp; +} + +_Bool delete(list **head, void *address) { + if(*head == NULL)//если списко пустой - выходим + return 0; + list *del = NULL; + if( (*head)->address == address) { + del = *head; + *head = (*head)->next; + free(del); + return 1; + } + list *tmp = *head; + while( tmp->next ) { + if(tmp->next->address == address ) { + del = tmp->next; + tmp->next = del->next; + free(del); + return 1; + } + tmp=tmp->next; + } + return 0; +} + +void printList(list *head) { + if(head == NULL) { + printf("No memory leak detect\n"); + } + while(head) { + printf("%s\n",head->comment);//выводим диагностику + head = head->next; + } +} + +void* my_malloc(size_t size, const char *file, int line, const char *func) +{ + void *ptr = malloc(size); + char coment[64] = {0}; + sprintf (coment,"Allocated = %s, %i, %s, %p[%lli]", file, line, func, ptr, size); + insert(&memlist,ptr,size,coment); + return ptr; +} + +void my_free(void *ptr, const char *file, int line, const char *func) +{ + delete(&memlist, ptr); + free(ptr); +} + + +//макрос, который заменяет стандартный вызов функции malloc() на вызов функции my_malloc() и аналогичный макрос для вызова функции free() +#define malloc(X) my_malloc( (X), __FILE__, __LINE__, __FUNCTION__) +#define free(X) my_free( (X), __FILE__, __LINE__, __FUNCTION__) + + +int main(void) { + int *p = malloc( sizeof(int) );//my_malloc + //~ int *p = my_malloc( sizeof(int), __FILE__, __LINE__, __FUNCTION__ );//my_malloc + int *ar = malloc(sizeof(int)*10); + *p = 5; + free(p); + p = malloc(sizeof(int)); + + free(p); + printList(memlist); + return 0; +} diff --git a/Lect2/arr.c b/Lect2/arr.c new file mode 100644 index 0000000..fc37c60 --- /dev/null +++ b/Lect2/arr.c @@ -0,0 +1 @@ +int ar[5]; diff --git a/Lect2/main.c b/Lect2/main.c new file mode 100644 index 0000000..f075d32 --- /dev/null +++ b/Lect2/main.c @@ -0,0 +1,11 @@ +#include +extern int *ar; + +int ar[5]; + +int main(void) { + ar[3] = 123; + printf("%d",ar[3]); + return 0; +} + diff --git a/Lect3/17.c b/Lect3/17.c new file mode 100644 index 0000000..97c33e9 --- /dev/null +++ b/Lect3/17.c @@ -0,0 +1,11 @@ +#include + +char s1[] = "Hello "; +char s2[] = "world!"; + +int main(void) { + scanf("%s",s1); + printf("s1 = %s\n",s1); + printf("s2 = %s\n",s2); + return 0; +} diff --git a/Lect3/18.c b/Lect3/18.c new file mode 100644 index 0000000..0cd298e --- /dev/null +++ b/Lect3/18.c @@ -0,0 +1,11 @@ +#include + +char s1[] = "Hello "; +char s2[] = "world!"; + +int main(void) { + scanf("%6s",s1); + printf("s1 = %s\n",s1); + printf("s2 = %s\n",s2); + return 0; +} diff --git a/Lect3/19.c b/Lect3/19.c new file mode 100644 index 0000000..6f8fbb9 --- /dev/null +++ b/Lect3/19.c @@ -0,0 +1,18 @@ +#include + +char s1[] = "Hello "; +char s2[] = "world!"; + +int main(void) +{ + char c; + printf("===Enter q to quit===\n"); + do + { + printf("Enter a symbol\n"); + scanf("%c", &c); + printf("%c\n", c); + } + while (c != 'q'); + return 0; +} diff --git a/Lect3/20.c b/Lect3/20.c new file mode 100644 index 0000000..de98cbf --- /dev/null +++ b/Lect3/20.c @@ -0,0 +1,18 @@ +#include + +char s1[] = "Hello "; +char s2[] = "world!"; + +int main(void) +{ + char c; + printf("===Enter q to quit===\n"); + do + { + printf("Enter a symbol\n"); + scanf(" %c", &c); + printf("%c\n", c); + } + while (c != 'q'); + return 0; +} diff --git a/Lect3/22_1.c b/Lect3/22_1.c new file mode 100644 index 0000000..6b81140 --- /dev/null +++ b/Lect3/22_1.c @@ -0,0 +1,9 @@ +#include +#include +int main() { + char str1[] = "Small string."; + char str2[15]; + strcpy(str2, str1); + puts(str1); + return 0; +} diff --git a/Lect3/22_2.c b/Lect3/22_2.c new file mode 100644 index 0000000..68b2f82 --- /dev/null +++ b/Lect3/22_2.c @@ -0,0 +1,10 @@ +#include +#include +//ОШИБКА! Переполнение буфера +int main() { + char str1[] = "This is very big string."; + char str2[15]; + strcpy(str2, str1); + puts(str1); + return 0; +} diff --git a/Lect3/24.c b/Lect3/24.c new file mode 100644 index 0000000..82b79b3 --- /dev/null +++ b/Lect3/24.c @@ -0,0 +1,10 @@ +#include +#include + +int main(){ + int x = 7; + x = 9; + assert(x==7); // Условие проверки +// будет напечатано сообщение в stderr + return 0; +} diff --git a/Lect3/25.c b/Lect3/25.c new file mode 100644 index 0000000..24f1e97 --- /dev/null +++ b/Lect3/25.c @@ -0,0 +1,12 @@ +#include +#include + +int main() { + int n; + printf("Input natural number: "); + scanf("%d", &n); + assert(n > 0); // Ожидаемое число + int arr[n]; + + return 0; +} diff --git a/Lect3/28.c b/Lect3/28.c new file mode 100644 index 0000000..89af3c8 --- /dev/null +++ b/Lect3/28.c @@ -0,0 +1,19 @@ +#include +#include //setlocale() +#include +#include //«широкие» символы +int main(void) +{ + char* res = setlocale(LC_ALL,"en_US.UTF-8"); + printf("%s\n",res); + wchar_t str1[] = L"Привет"; + printf("str1 = %S\n", str1); + printf("sizeof str1 = %llu\n", sizeof(str1)); + char str2[] = "Привет"; + printf("str2 = %s\n",str2); + printf("sizeof str2 = %llu\n", sizeof(str2)); + char str3[] = "Hello!"; + printf("str3 = %s\n",str3); + printf("sizeof str3 = %llu\n", sizeof(str3)); + return 0; +} diff --git a/Lect3/29.c b/Lect3/29.c new file mode 100644 index 0000000..dada3ba --- /dev/null +++ b/Lect3/29.c @@ -0,0 +1,15 @@ +#include +#include //setlocale() +#include +#include //«широкие» символы +int main(void) +{ + char* res = setlocale(LC_ALL,"en_US.UTF-8"); + printf("%s\n",res); + printf("%ls\n", L"Hello"); // Напечатать строку из wchar_t + printf("%s\n", "Hello"); // Напечатать строку из char + + wchar_t str[] = L"Привет"; + wprintf(L"%ls\n",str); + return 0; +} diff --git a/Lect3/30.c b/Lect3/30.c new file mode 100644 index 0000000..54911fa --- /dev/null +++ b/Lect3/30.c @@ -0,0 +1,17 @@ +#include +#include //setlocale() +#include +#include //«широкие» символы +int main(void) +{ + char* res = setlocale(LC_ALL,"en_US.UTF-8"); + printf("%s\n",res); + + setlocale(LC_ALL,"en_US.UTF-8"); + wchar_t str[] = L"БГ"; + printf("%ls\n",str); + printf("sizeof(wchar_t) = %llu\n",sizeof(wchar_t)); + printf("str[0] = %x\n", str[0]); + printf("str[1] = %x\n", str[1]); + return 0; +} diff --git a/Lect3/34/lib.c b/Lect3/34/lib.c new file mode 100644 index 0000000..549b696 --- /dev/null +++ b/Lect3/34/lib.c @@ -0,0 +1,8 @@ +#include "lib.h" + +int max(int a, int b){ + return (a>b)?a:b; +} +int max3(int a, int b, int c) { + return max(a,max(b,c)); +} diff --git a/Lect3/34/lib.h b/Lect3/34/lib.h new file mode 100644 index 0000000..fe50258 --- /dev/null +++ b/Lect3/34/lib.h @@ -0,0 +1,2 @@ +int max(int a, int b); +int max3(int a, int b, int c); \ No newline at end of file diff --git a/Lect3/34/main.c b/Lect3/34/main.c new file mode 100644 index 0000000..6d7916e --- /dev/null +++ b/Lect3/34/main.c @@ -0,0 +1,11 @@ +// main.c +#include +#include "lib.h" + + +int main(){ + int a,b,c; + scanf("%d%d%d",&a,&b,&c); + printf("max3 = %d\n",max3(a,b,c)); + return 0; +} diff --git a/Lect3/35/35.txt b/Lect3/35/35.txt new file mode 100644 index 0000000..40ffd6d --- /dev/null +++ b/Lect3/35/35.txt @@ -0,0 +1,6 @@ +gcc -c lib.c +ar -r libmy1.a lib.o +Windows +gcc -o prog1 main.c -L ./ c:\geekbrains.ru\Projects\C\MIPI_AC_Git\MIPI_AdvancedC\Lect3\35\libmy1.a +Linux +gcc -o prog2 main.c -L ./ -lmy2 -rpath /home/user/mylib2/ \ No newline at end of file diff --git a/Lect3/35/lib.c b/Lect3/35/lib.c new file mode 100644 index 0000000..2c33e8b --- /dev/null +++ b/Lect3/35/lib.c @@ -0,0 +1,9 @@ +#include "lib.h" + + +int max(int a, int b){ + return (a>b)?a:b; +} +int max3(int a, int b, int c) { + return max(a,max(b,c)); +} diff --git a/Lect3/35/lib.h b/Lect3/35/lib.h new file mode 100644 index 0000000..fe50258 --- /dev/null +++ b/Lect3/35/lib.h @@ -0,0 +1,2 @@ +int max(int a, int b); +int max3(int a, int b, int c); \ No newline at end of file diff --git a/Lect3/35/lib.o b/Lect3/35/lib.o new file mode 100644 index 0000000..323c921 Binary files /dev/null and b/Lect3/35/lib.o differ diff --git a/Lect3/35/libmy1.a b/Lect3/35/libmy1.a new file mode 100644 index 0000000..2027852 Binary files /dev/null and b/Lect3/35/libmy1.a differ diff --git a/Lect3/35/main.c b/Lect3/35/main.c new file mode 100644 index 0000000..6d7916e --- /dev/null +++ b/Lect3/35/main.c @@ -0,0 +1,11 @@ +// main.c +#include +#include "lib.h" + + +int main(){ + int a,b,c; + scanf("%d%d%d",&a,&b,&c); + printf("max3 = %d\n",max3(a,b,c)); + return 0; +} diff --git a/Lect3/35/prog2.exe b/Lect3/35/prog2.exe new file mode 100644 index 0000000..a5ce681 Binary files /dev/null and b/Lect3/35/prog2.exe differ diff --git a/Lect3/36.c b/Lect3/36.c new file mode 100644 index 0000000..ae7cb23 --- /dev/null +++ b/Lect3/36.c @@ -0,0 +1,16 @@ +#include +#include //setlocale() +#include +#include //«широкие» символы +int main(void) +{ +uint8_t ch[] = {0xd0,0x90,0xd0,0x91,0}; // "АБ" +uint32_t ch32[] = {0x91d090d0,0}; // "АБ" + +char* res = setlocale(LC_ALL,"en_US.UTF-8"); + printf("%s\n",res); + + printf("%x %x %x %x = %s\n",ch[0],ch[1],ch[2],ch[3],ch); + printf("%x = %s\n",ch32[0], ch32); + return 0; +} diff --git a/Lect3/36/36.txt b/Lect3/36/36.txt new file mode 100644 index 0000000..d38400c --- /dev/null +++ b/Lect3/36/36.txt @@ -0,0 +1,6 @@ +gcc -c -fPIC lib.c +gcc -shared -o libmy2.so lib.o +Windows: +gcc -o prog2 main.c -L ./ c:\geekbrains.ru\Projects\C\MIPI_AC_Git\MIPI_AdvancedC\Lect3\36\libmy2.so +Linux: +gcc -o prog2 main.c -L ./ -lmy2 -rpath /home/user/mylib2/ \ No newline at end of file diff --git a/Lect3/36/lib.c b/Lect3/36/lib.c new file mode 100644 index 0000000..2c33e8b --- /dev/null +++ b/Lect3/36/lib.c @@ -0,0 +1,9 @@ +#include "lib.h" + + +int max(int a, int b){ + return (a>b)?a:b; +} +int max3(int a, int b, int c) { + return max(a,max(b,c)); +} diff --git a/Lect3/36/lib.h b/Lect3/36/lib.h new file mode 100644 index 0000000..fe50258 --- /dev/null +++ b/Lect3/36/lib.h @@ -0,0 +1,2 @@ +int max(int a, int b); +int max3(int a, int b, int c); \ No newline at end of file diff --git a/Lect3/36/lib.o b/Lect3/36/lib.o new file mode 100644 index 0000000..323c921 Binary files /dev/null and b/Lect3/36/lib.o differ diff --git a/Lect3/36/libmy2.so b/Lect3/36/libmy2.so new file mode 100644 index 0000000..5370bc7 Binary files /dev/null and b/Lect3/36/libmy2.so differ diff --git a/Lect3/36/main.c b/Lect3/36/main.c new file mode 100644 index 0000000..6d7916e --- /dev/null +++ b/Lect3/36/main.c @@ -0,0 +1,11 @@ +// main.c +#include +#include "lib.h" + + +int main(){ + int a,b,c; + scanf("%d%d%d",&a,&b,&c); + printf("max3 = %d\n",max3(a,b,c)); + return 0; +} diff --git a/Lect3/36/prog2.exe b/Lect3/36/prog2.exe new file mode 100644 index 0000000..6ce6383 Binary files /dev/null and b/Lect3/36/prog2.exe differ diff --git a/Lect3/38-39.c b/Lect3/38-39.c new file mode 100644 index 0000000..28a2d69 --- /dev/null +++ b/Lect3/38-39.c @@ -0,0 +1,40 @@ + +#include +#include +#include + +int numberOfBytesInChar(unsigned char val); +int utf8strlen(char *s); + +int main(void){ + char s[] = "Hello world"; + char s2[] = "Привет Мир"; + printf("strlen(s) = %llu\n",strlen(s)); + printf("strlen(s2) = %llu\n",strlen(s2)); + printf("utf8strlen(s) = %d\n",utf8strlen(s)); + printf("utf8strlen(s2) = %d\n",utf8strlen(s2)); + return 0; +} + +int numberOfBytesInChar(unsigned char val) { + if (val < 0x80) + return 1; + else if (val < 0xE0) + return 2; + else if (val < 0xF0) + return 3; + else + return 4; +} + +int utf8strlen(char *s) +{ + char *tmp = s; + int len = 0; + while( *tmp ) + { + tmp += numberOfBytesInChar(*tmp); + len++; + } + return len; +} diff --git a/Lect3/45.c b/Lect3/45.c new file mode 100644 index 0000000..6a095d9 --- /dev/null +++ b/Lect3/45.c @@ -0,0 +1,12 @@ +#include +#include +int main(void) +{ + time_t mytime = time(NULL); + struct tm *now = localtime(&mytime); + printf("Date: %d.%d.%d\n", now->tm_mday, + now->tm_mon + 1, now->tm_year + 1900); + printf("Time: %d:%d:%d\n", now->tm_hour, + now->tm_min, now->tm_sec); + return 0; +} diff --git a/Lect3/46.c b/Lect3/46.c new file mode 100644 index 0000000..5e08203 --- /dev/null +++ b/Lect3/46.c @@ -0,0 +1,11 @@ +#include +#include +double DELAY = 3; +int main() +{ + clock_t begin = clock(); + while((double)(clock() - begin)/CLOCKS_PER_SEC + +int main() +{ + int ch; + initscr(); // Начать curses mode + raw(); // Отключаем buffering. Ctrl+C не завершит программу + noecho(); // Отключаем echo() режим пока считываем символы getch + printw("Type text: \n"); + while( (ch = getch()) != '.') + { + printw("%c", ch); + } + //refresh(); // Печатаем это на экран + getch(); // Ждем пока пользователь нажмет клавишу + endwin(); // Завершить curses mode + return 0; +} diff --git a/Lect3/52.c b/Lect3/52.c new file mode 100644 index 0000000..c2f48bd --- /dev/null +++ b/Lect3/52.c @@ -0,0 +1,14 @@ +#include +#include + +int main() { + initscr(); + printw("Hello World !!!"); + printw("\nPress any key to continue... "); + // refresh(); // по + пробуйте включить и выключить + sleep(3); + getch(); + endwin(); + return 0; +} diff --git a/Lect3/52_1.c b/Lect3/52_1.c new file mode 100644 index 0000000..36dd148 --- /dev/null +++ b/Lect3/52_1.c @@ -0,0 +1,14 @@ +#include +#include + +int main() { + initscr(); + char string[]="Hello world!"; + int x=10,y=10; + printw(string); /* Напечатать на стандартном экране stdscr */ + /* в текущей позиции курсора */ + mvprintw(y, x, string);/* Напечатать в позиции (y, x) */ + getch(); + endwin(); + return 0; +} diff --git a/Lect3/gmon.out b/Lect3/gmon.out new file mode 100644 index 0000000..b89c084 Binary files /dev/null and b/Lect3/gmon.out differ diff --git a/Lect3/snake_seminar_2.c b/Lect3/snake_seminar_2.c new file mode 100644 index 0000000..b9cd0cd --- /dev/null +++ b/Lect3/snake_seminar_2.c @@ -0,0 +1,161 @@ +#include +#include +#include +#include +#include +#include +#include + +#define MIN_Y 2 +enum {LEFT=1, UP, RIGHT, DOWN, STOP_GAME=KEY_F(10)}; +enum {MAX_TAIL_SIZE=100, START_TAIL_SIZE=3, MAX_FOOD_SIZE=20, FOOD_EXPIRE_SECONDS=10}; + + +// Здесь храним коды управления змейкой +struct control_buttons +{ + int down; + int up; + int left; + int right; +}control_buttons; + +struct control_buttons default_controls = {KEY_DOWN, KEY_UP, KEY_LEFT, KEY_RIGHT}; + +/* + Голова змейки содержит в себе + x,y - координаты текущей позиции + direction - направление движения + tsize - размер хвоста + *tail - ссылка на хвост + */ +typedef struct snake_t +{ + int x; + int y; + int direction; + size_t tsize; + struct tail_t *tail; + struct control_buttons controls; +} snake_t; + +/* + Хвост это массив состоящий из координат x,y + */ +typedef struct tail_t +{ + int x; + int y; +} tail_t; + +void initTail(struct tail_t t[], size_t size) +{ + struct tail_t init_t={0,0}; + for(size_t i=0; ix = x; + head->y = y; + head->direction = RIGHT; +} + +void initSnake(snake_t *head, size_t size, int x, int y) +{ +tail_t* tail = (tail_t*) malloc(MAX_TAIL_SIZE*sizeof(tail_t)); + initTail(tail, MAX_TAIL_SIZE); + initHead(head, x, y); + head->tail = tail; // прикрепляем к голове хвост + head->tsize = size+1; + head->controls = default_controls; +} + +/* + Движение головы с учетом текущего направления движения + */ +void go(struct snake_t *head) +{ + char ch = '@'; + int max_x=0, max_y=0; + getmaxyx(stdscr, max_y, max_x); // macro - размер терминала + mvprintw(head->y, head->x, " "); // очищаем один символ + switch (head->direction) + { + case LEFT: + if(head->x <= 0) // Циклическое движение, чтобы не +// уходить за пределы экрана + head->x = max_x; + mvprintw(head->y, --(head->x), "%c", ch); + break; + case RIGHT: + mvprintw(head->y, ++(head->x), "%c", ch); + break; + case UP: + mvprintw(--(head->y), head->x, "%c", ch); + break; + case DOWN: + mvprintw(++(head->y), head->x, "%c", ch); + break; + default: + break; + } + refresh(); +} + +void changeDirection(struct snake_t* snake, const int32_t key) +{ + if (key == snake->controls.down) + snake->direction = DOWN; + else if (key == snake->controls.up) + snake->direction = UP; + else if (key == snake->controls.right) + snake->direction = RIGHT; + else if (key == snake->controls.left) + snake->direction = LEFT; +} + +/* + Движение хвоста с учетом движения головы + */ +void goTail(struct snake_t *head) +{ + char ch = '*'; + mvprintw(head->tail[head->tsize-1].y, head->tail[head->tsize-1].x, " "); + for(size_t i = head->tsize-1; i>0; i--) + { + head->tail[i] = head->tail[i-1]; + if( head->tail[i].y || head->tail[i].x) + mvprintw(head->tail[i].y, head->tail[i].x, "%c", ch); + } + head->tail[0].x = head->x; + head->tail[0].y = head->y; +} + +int main() +{ +snake_t* snake = (snake_t*)malloc(sizeof(snake_t)); + initSnake(snake,START_TAIL_SIZE,10,10); + initscr(); + keypad(stdscr, TRUE); // Включаем F1, F2, стрелки и т.д. + raw(); // Откдючаем line buffering + noecho(); // Отключаем echo() режим при вызове getch + curs_set(FALSE); //Отключаем курсор + mvprintw(0, 0,"Use arrows for control. Press 'F10' for EXIT"); + timeout(0); //Отключаем таймаут после нажатия клавиши в цикле + int key_pressed=0; + while( key_pressed != STOP_GAME ) + { + key_pressed = getch(); // Считываем клавишу + go(snake); + goTail(snake); + timeout(100); // Задержка при отрисовке + changeDirection(snake, key_pressed); + } + free(snake->tail); + free(snake); + endwin(); // Завершаем режим curses mod + return 0; +} diff --git a/Lect3/snake_seminar_2.exe b/Lect3/snake_seminar_2.exe new file mode 100644 index 0000000..a36b0c9 Binary files /dev/null and b/Lect3/snake_seminar_2.exe differ diff --git a/Lect3/snake_seminar_2.o b/Lect3/snake_seminar_2.o new file mode 100644 index 0000000..0259666 Binary files /dev/null and b/Lect3/snake_seminar_2.o differ diff --git a/Lect4/15.c b/Lect4/15.c new file mode 100644 index 0000000..2ba4f4f --- /dev/null +++ b/Lect4/15.c @@ -0,0 +1,32 @@ +#include +#include + +double getCPUTime(void) +{ /* Windows */ +FILETIME createTime, exitTime, kernelTime, userTime; + if(GetProcessTimes(GetCurrentProcess(), + &createTime, &exitTime, &kernelTime, + &userTime) != -1 ) + { + SYSTEMTIME userSystemTime; + if(FileTimeToSystemTime(&userTime, + &userSystemTime)!= -1 ) + return (double)userSystemTime.wHour * 3600.0 + + (double)userSystemTime.wMinute * 60.0 + + (double)userSystemTime.wSecond + + (double)userSystemTime.wMilliseconds + / 1000.0; + } + return -1; /* Failed. */ +} +int main(int argc, char **argv) +{ + double startTime, endTime; + startTime = getCPUTime( ); + for(int i=0;i<600000000;i++) + {} + endTime = getCPUTime( ); + printf( "CPU time used = %lf\n", + (endTime-startTime) ); + return 0; +} diff --git a/Lect4/18-19.c b/Lect4/18-19.c new file mode 100644 index 0000000..838735c --- /dev/null +++ b/Lect4/18-19.c @@ -0,0 +1,29 @@ +#include +#include +#include +#include +int main(void) { + struct rusage usage; + struct timeval startu, endu, starts, ends; + int k = 0; + getrusage(RUSAGE_SELF, &usage); + startu = usage.ru_utime; // измерение в режиме пользователя + starts = usage.ru_stime; // измерение в режиме системы + //int arr[100000]={0}; + // Попробуйте раскоментировать и сравнить + for (int i = 0; i < 10000; i++) { + for (int j = 0; j < 10000; j++) { + k += 20; + } + } + getrusage(RUSAGE_SELF, &usage); + endu = usage.ru_utime;// измерение в режиме пользователя + ends = usage.ru_stime;// измерение в режиме системы + + printf("Started at user mode: %ld.%d\n", startu.tv_sec, startu.tv_usec); + printf("Ended at user mode: %ld.%d\n", endu.tv_sec, endu.tv_usec); + printf("Started at system mode: %ld.%d\n", starts.tv_sec, starts.tv_usec); + printf("Ended at systme mode: %ld.%d\n", ends.tv_sec, ends.tv_usec); + printf("Total memory usage: %ld bytes\n",usage.ru_maxrss); + return 0; +} diff --git a/Lect4/18.c b/Lect4/18.c new file mode 100644 index 0000000..838735c --- /dev/null +++ b/Lect4/18.c @@ -0,0 +1,29 @@ +#include +#include +#include +#include +int main(void) { + struct rusage usage; + struct timeval startu, endu, starts, ends; + int k = 0; + getrusage(RUSAGE_SELF, &usage); + startu = usage.ru_utime; // измерение в режиме пользователя + starts = usage.ru_stime; // измерение в режиме системы + //int arr[100000]={0}; + // Попробуйте раскоментировать и сравнить + for (int i = 0; i < 10000; i++) { + for (int j = 0; j < 10000; j++) { + k += 20; + } + } + getrusage(RUSAGE_SELF, &usage); + endu = usage.ru_utime;// измерение в режиме пользователя + ends = usage.ru_stime;// измерение в режиме системы + + printf("Started at user mode: %ld.%d\n", startu.tv_sec, startu.tv_usec); + printf("Ended at user mode: %ld.%d\n", endu.tv_sec, endu.tv_usec); + printf("Started at system mode: %ld.%d\n", starts.tv_sec, starts.tv_usec); + printf("Ended at systme mode: %ld.%d\n", ends.tv_sec, ends.tv_usec); + printf("Total memory usage: %ld bytes\n",usage.ru_maxrss); + return 0; +} diff --git a/Lect4/20-21.c b/Lect4/20-21.c new file mode 100644 index 0000000..80e1fbc --- /dev/null +++ b/Lect4/20-21.c @@ -0,0 +1,41 @@ +#include +#include +#include + +enum {SIZE=2001}; +struct timespec tstart, tstop; +int a[SIZE];//{1,2,…,1000,12345,1,2,…,1000}; + +int main(void) +{ + struct rusage usage; + struct timeval startu, endu, starts, ends; + int same = 0; + for(int i=0;i<=1000;i++) + a[i] = i,a[i+1001]=i; + a[1000]=12345; + getrusage(RUSAGE_SELF, &usage); +// измерение в режиме пользователя + startu = usage.ru_utime; +// измерение в режиме системы + starts = usage.ru_stime; + _Bool is_same=0; + for (size_t i=0; i +#include +#include + +enum {SIZE=2001}; +struct timespec tstart, tstop; +int a[SIZE];//{1,2,…,1000,12345,1,2,…,1000}; + +int main(void) +{ + struct rusage usage; + struct timeval startu, endu, starts, ends; + int same = 0; + for(int i=0;i<=1000;i++) + a[i] = i,a[i+1001]=i; + a[1000]=12345; + getrusage(RUSAGE_SELF, &usage); +// измерение в режиме пользователя + startu = usage.ru_utime; +// измерение в режиме системы + starts = usage.ru_stime; + same = 0; + for (size_t i=0; i +#include + + // До +int foo(int32_t a, int32_t b) +{ + a = a - b; + b++; + a = a * b; + return a; +} +// После +#define foo(a, b) (((a)-(b))*((b)+1)) + +int main(int argc, char **argv) +{ +int ret; +int a=5,b=10; + ret = foo(a,b++); + printf("Result: %d\n", ret); +return 0; +} diff --git a/Lect4/30.c b/Lect4/30.c new file mode 100644 index 0000000..8757f3e --- /dev/null +++ b/Lect4/30.c @@ -0,0 +1,14 @@ +#include + +inline int foo() { + return 2; +} + +int main() { + int ret; + + ret = foo(); + + printf("Result: %d\n", ret); + return 0; +} diff --git a/Lect4/32.c b/Lect4/32.c new file mode 100644 index 0000000..a4e74c1 --- /dev/null +++ b/Lect4/32.c @@ -0,0 +1,14 @@ +#include + +static inline int foo() { + return 2; +} + +int main() { + int ret; + + ret = foo(); + + printf("Result: %d\n", ret); + return 0; +} diff --git a/Lect4/37.c b/Lect4/37.c new file mode 100644 index 0000000..1b2b9f3 --- /dev/null +++ b/Lect4/37.c @@ -0,0 +1,14 @@ +for (size_t i = 0; i < MAX; i++) { + for (j = 0; j < MAX; j++) { + a[i][j] = 0.0; + } +} +for (size_t i = 0; i < MAX; i++) { + a[i][i] = 1.0; +} + +for (i = 0; i < MAX; i++) { + for (j = 0; j < MAX; j++) + a[i][j] = 0.0; + a[i][i] = 1.0; +} diff --git a/Lect4/46.c b/Lect4/46.c new file mode 100644 index 0000000..1af581d --- /dev/null +++ b/Lect4/46.c @@ -0,0 +1,20 @@ +#include +#include + +int main(int argc, char **argv) +{ + // Плохо. Вызов strlen в цикле + { + char s[]="Hello world\n"; + for(size_t i=0; i +#include + +#define QUICKIE_STRCMP(a, b) (*(a) != *(b) ? \ + (int) ((unsigned char) *(a) - \ + (unsigned char) *(b)) : \ + strcmp((a), (b))) + + +int main(int argc, char **argv) +{ + char s1[]="Hello world"; + char s2[]="Hello world"; + if(!QUICKIE_STRCMP(s1,s2)) + printf("Same\n"); + else + printf("Not Same\n"); + return 0; +} diff --git a/Lect4/48.c b/Lect4/48.c new file mode 100644 index 0000000..2f1efb2 --- /dev/null +++ b/Lect4/48.c @@ -0,0 +1,42 @@ +#include +#include + +#define QUICKIE_STRCMP(a, b) (*(a) != *(b) ? \ + (int) ((unsigned char) *(a) - \ + (unsigned char) *(b)) : \ + strcmp((a), (b))) + + +int main(int argc, char **argv) +{ + char s1[]="Hello world"; + if(*s1 == '\0') + { + printf("0"); + } + else + { + printf("%lld\n",strlen(s1)); + } + + char s2[100]=""; + + if(*s1 == '\0') + { + *s2 = '\0'; + } + else + { + strcpy(s2,s1); + } + printf("%s\n",s2); + + + //~ char s2[]="Hello world"; + //~ if(!QUICKIE_STRCMP(s1,s2)) + //~ printf("Same\n"); + //~ else + //~ printf("Not Same\n"); + return 0; +} + diff --git a/Lect4/49.c b/Lect4/49.c new file mode 100644 index 0000000..6474230 --- /dev/null +++ b/Lect4/49.c @@ -0,0 +1,14 @@ +#include +#include + +int main(int argc, char **argv) +{ + + char s[]="hello world"; + printf("s[9]=%c\n",s[9]); + //~ strncpy(s,"erase", 10); + strcpy(s,"erase"); + printf("%s\n", s); + printf("s[9]=%c\n",s[9]); + return 0; +} diff --git a/Lect4/50.c b/Lect4/50.c new file mode 100644 index 0000000..19e9ba2 --- /dev/null +++ b/Lect4/50.c @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +int main(int argc, char **argv) +{ +int s[100000]={1,2,3}; +int d[100000]={0}; +//struct timespec tstop, tstart; + + struct rusage usage; + struct timeval startu, endu, starts, ends; + getrusage(RUSAGE_SELF, &usage); + startu = usage.ru_utime; // измерение в режиме пользователя + memmove(d,s,100000); + getrusage(RUSAGE_SELF, &usage); + endu = usage.ru_utime;// измерение в режиме пользователя + printf("%ld useconds\n", endu.tv_usec - startu.tv_usec); + + getrusage(RUSAGE_SELF, &usage); + startu = usage.ru_utime; // измерение в режиме пользователя + memcpy(d,s,100000); + getrusage(RUSAGE_SELF, &usage); + endu = usage.ru_utime;// измерение в режиме пользователя + printf("%ld useconds\n", endu.tv_usec - startu.tv_usec); + return 0; +} diff --git a/Lect4/50.txt b/Lect4/50.txt new file mode 100644 index 0000000..43fc1f1 --- /dev/null +++ b/Lect4/50.txt @@ -0,0 +1,2 @@ +9 useconds +7 useconds \ No newline at end of file diff --git a/Lect4/55.c b/Lect4/55.c new file mode 100644 index 0000000..028c957 --- /dev/null +++ b/Lect4/55.c @@ -0,0 +1,12 @@ + float array[20][100]; +int i, j; +//Плохо +for (j = 0; j < 100; j++) + for (i = 0; i < 20; i++) + array[i][j] = 0.0; +float array[20][100]; +int i, j; +//Хорошо +for (i = 0; i < 20; i++) + for (j = 0; j < 100; j++) + array[i][j] = 0.0; diff --git a/Lect4/57.c b/Lect4/57.c new file mode 100644 index 0000000..fc90fdc --- /dev/null +++ b/Lect4/57.c @@ -0,0 +1,25 @@ +#include +#include +#include + +// sizeof 16 +struct st1{ + int i; + char c; + int u; + char b; +}; +// sizeof 12 +struct st2{ + int i; + int u; + char c; + char b; +}; + +int main(int argc, char **argv) +{ + printf("sizeof(struct st1)=%lld sizeof(struct st2)=%lld\n", sizeof(struct st1),sizeof(struct st2)); + return 0; +} + diff --git a/Lect4/58.c b/Lect4/58.c new file mode 100644 index 0000000..c44d75e --- /dev/null +++ b/Lect4/58.c @@ -0,0 +1,32 @@ +#include +#include + +// sizeof 16 +struct st1{ + int i; + char c; + int u; + char b; +}; +// sizeof 12 +struct st2{ + int i; + int u; + char c; + char b; +}; + +// sizeof 1 +struct flags{ + uint8_t a : 2; + uint8_t b : 2; + uint8_t c : 2; + uint8_t d : 2; +}; + +int main(int argc, char **argv) +{ + printf(" %lld %lld %lld\n", sizeof(struct st1),sizeof(struct st2),sizeof(struct flags)); + return 0; +} + diff --git a/Lect4/77.bat b/Lect4/77.bat new file mode 100644 index 0000000..64127d0 --- /dev/null +++ b/Lect4/77.bat @@ -0,0 +1 @@ +gcc -Wall -pg -no-pie main.c function.c -o prog \ No newline at end of file diff --git a/Lect4/79.bat b/Lect4/79.bat new file mode 100644 index 0000000..e0fe091 --- /dev/null +++ b/Lect4/79.bat @@ -0,0 +1 @@ +gprof prog.exe gmon.out > report.txt \ No newline at end of file diff --git a/Lect4/80.bat b/Lect4/80.bat new file mode 100644 index 0000000..dde0cb9 --- /dev/null +++ b/Lect4/80.bat @@ -0,0 +1 @@ +gprof -p -b prog.exe gmon.out > report.txt \ No newline at end of file diff --git a/Lect4/81.bat b/Lect4/81.bat new file mode 100644 index 0000000..17a86a3 --- /dev/null +++ b/Lect4/81.bat @@ -0,0 +1 @@ +gprof -pfunc3 -b prog.exe gmon.out > report.txt \ No newline at end of file diff --git a/Lect4/82.bat b/Lect4/82.bat new file mode 100644 index 0000000..ab81c85 --- /dev/null +++ b/Lect4/82.bat @@ -0,0 +1 @@ +gprof -qfunc3 -b prog.exe gmon.out > report.txt \ No newline at end of file diff --git a/Lect4/86.txt b/Lect4/86.txt new file mode 100644 index 0000000..8bb9222 --- /dev/null +++ b/Lect4/86.txt @@ -0,0 +1,3 @@ +gcc -g -o prog_array main_array.c +valgrind --tool=massif ./prog_array +ms_print massif.out.10787 \ No newline at end of file diff --git a/Lect4/87.txt b/Lect4/87.txt new file mode 100644 index 0000000..014e5af --- /dev/null +++ b/Lect4/87.txt @@ -0,0 +1 @@ +valgrind --leak-check=full -v ./prog_array \ No newline at end of file diff --git a/Lect4/function.c b/Lect4/function.c new file mode 100644 index 0000000..414374b --- /dev/null +++ b/Lect4/function.c @@ -0,0 +1,12 @@ +//function.c +#include + +void new_func1(void) +{ + printf("\n Inside new_func1()\n"); + int i = 0; + + for(;i<0xffffffe;i++); + + return; +} diff --git a/Lect4/gmon.out b/Lect4/gmon.out new file mode 100644 index 0000000..6b3a3b9 Binary files /dev/null and b/Lect4/gmon.out differ diff --git a/Lect4/main.c b/Lect4/main.c new file mode 100644 index 0000000..a396646 --- /dev/null +++ b/Lect4/main.c @@ -0,0 +1,49 @@ + //main.c +#include + +void new_func1(void); + +void func1(void) +{ + printf("\n Inside func1 \n"); + int i = 0; + + for(;i<0xfffffff;i++); + new_func1(); + + return; +} + + + +static void func2(void) +{ + printf("\n Inside func2 \n"); + int i = 0; + + for(;i<0xffffffa;i++); + return; +} + +static int func3(void) +{ + printf("\n Inside func3 \n"); + int i = 0; + int arr[10000] = {0}; + + for(;i<0xffffff0;i++) + arr[i%10000] = i; + return arr[0]; +} + +int main(void) +{ + printf("\n Inside main()\n"); + int i = 0; + + for(;i<0xffffff;i++); + func1(); + func2(); + printf("func3 = %d\n",func3()); + return 0; +} diff --git a/Lect4/main_array.c b/Lect4/main_array.c new file mode 100644 index 0000000..0d6eb43 --- /dev/null +++ b/Lect4/main_array.c @@ -0,0 +1,29 @@ +// main_array.c +#include + +void g(void) +{ + malloc(4000); +} + +void f(void) +{ + malloc(2000); + g(); +} + +int main(void) { + int i; + int* a[10]; + for (i = 0; i < 10; i++) { + a[i] = malloc(1000); + } + f(); + g(); + for (i = 0; i < 10; i++) { + free(a[i]); + } + return 0; +} + + diff --git a/Lect4/msys.c b/Lect4/msys.c new file mode 100644 index 0000000..541b7ec --- /dev/null +++ b/Lect4/msys.c @@ -0,0 +1,17 @@ +#include + + +int main(int argc, char ** argv) +{ + // init screen and sets up screen + initscr(); + // print to screen + printw("Hello World"); + // refreshes the screen + refresh(); + // pause the screen output + getch(); + // deallocates memory and ends ncurses + // endwin(); + return 0; +} diff --git a/Lect4/msys.exe b/Lect4/msys.exe new file mode 100644 index 0000000..5a14ca7 Binary files /dev/null and b/Lect4/msys.exe differ diff --git a/Lect4/msys.o b/Lect4/msys.o new file mode 100644 index 0000000..beb4231 Binary files /dev/null and b/Lect4/msys.o differ diff --git a/Lect4/report.txt b/Lect4/report.txt new file mode 100644 index 0000000..199aa52 --- /dev/null +++ b/Lect4/report.txt @@ -0,0 +1,14 @@ + Call graph + + +granularity: each sample hit covers 4 byte(s) for 0.91% of 1.10 seconds + +index % time self children called name + +[3] 30.0 0.33 0.00 func3 [3] +----------------------------------------------- + +Index by function name + + (2) func1 [3] func3 (4) new_func1 + (5) func2 (1) main diff --git a/Lect4/snake_seminar_3_food.c b/Lect4/snake_seminar_3_food.c new file mode 100644 index 0000000..337255c --- /dev/null +++ b/Lect4/snake_seminar_3_food.c @@ -0,0 +1,16 @@ +#include + +int main(int argc, char ** argv) +{ + // init screen and sets up screen + initscr(); + // print to screen + printw("Hello World"); + // refreshes the screen + refresh(); + // pause the screen output + getch(); + // deallocates memory and ends ncurses + // endwin(); + return 0; +} diff --git a/Lect4/snake_seminar_3_food.exe b/Lect4/snake_seminar_3_food.exe new file mode 100644 index 0000000..4c3cc21 Binary files /dev/null and b/Lect4/snake_seminar_3_food.exe differ diff --git a/Lect4/snake_seminar_3_food.o b/Lect4/snake_seminar_3_food.o new file mode 100644 index 0000000..19fb7ac Binary files /dev/null and b/Lect4/snake_seminar_3_food.o differ diff --git a/Lect5/08.c b/Lect5/08.c new file mode 100644 index 0000000..23f0c61 --- /dev/null +++ b/Lect5/08.c @@ -0,0 +1,19 @@ +#include + +int find_max(int n,int arr[]) +{ + size_t imax = 0; + for(size_t i = 1; i arr[imax]) + imax = i; + } + return arr[imax]; +} + +int main(void) +{ + int arr[] = {1,4,5,6,0,7}; + printf("%d\n",find_max(sizeof(arr)/sizeof(arr[0]),arr)); + return 0; +} + diff --git a/Lect5/09.c b/Lect5/09.c new file mode 100644 index 0000000..9f60d44 --- /dev/null +++ b/Lect5/09.c @@ -0,0 +1,27 @@ +#include + +int main(void) +{ + + int arr[] = {10,20,30,40,50}; // отсортированный массив + int n = sizeof(arr)/sizeof(arr[0]); + int findme = 20; // то что будем искать в массиве + size_t ifind=0, start=0, end=n-1, middle; + while(1) + { + middle = (start+end)/2; + printf("-start=%lld, end=%lld, middle=%lld\n",start, end, middle); + if( arr[middle] == findme ) + { + ifind=middle; + break; + } + else if(arr[middle] + +enum {false=0,true=1}; + +int main(void) +{ + int arr[] = {10,20,30,40,50,60,70,80,99,99}; + int n = sizeof(arr)/sizeof(arr[0]); + _Bool hasduplicate = false; + int counter = 0; + for(size_t i=0; i +#include + +void encryptDecrypt(char inpString[], char key[]) { + size_t len = strlen(inpString); + size_t key_len = strlen(key); + for (size_t i = 0; i < len; i++) { + inpString[i] = inpString[i] ^ key[i%key_len]; + } +} +int main(void) { + char sampleString[] = "Hello world"; + char key[] = "PASSWORD";//HASSWORD + printf("Encrypted String: "); + encryptDecrypt(sampleString, key);//HASSWORD + printf("%s\n", sampleString); + + printf("Decrypted String: "); + encryptDecrypt(sampleString, key);//HASSWORD + printf("%s\n", sampleString); + return 0; +} diff --git a/Lect5/17.c b/Lect5/17.c new file mode 100644 index 0000000..c7b2340 --- /dev/null +++ b/Lect5/17.c @@ -0,0 +1,27 @@ +#include +#include + +struct String { + int len; + char* str; +}; + +void encryptDecrypt(struct String* inpString,struct String* key) { + for (size_t i = 0; i < inpString->len; i++) + inpString->str[i] = inpString->str[i] ^ key->str[i%key->len]; +} + +int main(void) { + char sampleString[] = "Hello world"; + struct String s_sampleString = {strlen(sampleString),sampleString}; + char key[] = "HASSWORD";//HASSWORD + struct String s_key = {strlen(key),key}; + printf("Encrypted String: "); + encryptDecrypt(&s_sampleString, &s_key);//HASSWORD + printf("%s\n", sampleString); + + printf("Decrypted String: "); + encryptDecrypt(&s_sampleString, &s_key);//HASSWORD + printf("%s\n", sampleString); + return 0; +} diff --git a/Lect5/20.c b/Lect5/20.c new file mode 100644 index 0000000..d97a553 --- /dev/null +++ b/Lect5/20.c @@ -0,0 +1,25 @@ +#include +#include + +int binpow (int n, int pow) { +static int counter=0; + if (pow == 0) + return 1; + if ( (pow % 2) == 1) // нечетная степень (pow & 1) + return binpow (n, pow-1) * n; + else { // четная степень + int b = binpow (n, pow/2);// pow>>1 + return b * b; + } +} + +int main(void) +{ + int n,p; + scanf("%d%d", &n,&p); + printf("n=%d,pow=%d binpow=%d mpow %f\n",n,p,binpow(n,p),pow(n,p)); + + return 0; +} + + diff --git a/Lect5/23-24.c b/Lect5/23-24.c new file mode 100644 index 0000000..d1e0059 --- /dev/null +++ b/Lect5/23-24.c @@ -0,0 +1,59 @@ +#include +enum {SIZE=2}; + +/* Функция умножает матрицу a на b и результат заносит в a */ +void mulMatr(int a[][SIZE], int b[][SIZE]) +{ + int res[SIZE][SIZE] = {{0}}; + + for (int i = 0; i < SIZE; i++) + for (int j = 0; j < SIZE; j++) + for (int k = 0; k < SIZE; k++) + { + res[i][j] += a[i][k] * b[k][j]; + } + for (int i = 0; i < SIZE; i++) + for (int j = 0; j < SIZE; j++) + a[i][j] = res[i][j]; +} + +/* Функция бинарного возведение в степень матриц*/ +int fibMatr(int pow) +{ + int t[2][2] = { + {1,0}, + {0,1} + }; + int p[2][2] = { + {0,1}, + {1,1} + }; + while(pow > 0) + { + if( pow%2 == 1)//нечетная степень + mulMatr(t,p);//переходим к чет + mulMatr(p,p); + pow /= 2; + } + return t[1][0]; +} +/* +|0 1|n |F(n-1) F(n) | +|1 1| = |F(n) F(n+1)| +*/ +void printMatr(int a[][SIZE]) +{ + for (int i = 0; i < SIZE; i++) { + for (int j = 0; j < SIZE; j++) + { + printf("%2d",a[i][j]); + } + printf("\n"); + } +} +int main(void) +{ + printf("%d",fibMatr(10)); // 55 + return 0; +} + diff --git a/Lect5/28.c b/Lect5/28.c new file mode 100644 index 0000000..522cf79 --- /dev/null +++ b/Lect5/28.c @@ -0,0 +1,23 @@ +#include + +int cnk(int n, int k) { + int res = 1; + for (int i=n-k+1; i<=n; ++i) + res *= i; + for (int i=2; i<=k; ++i) + res /= i; + return res; +} + + +int main(void) +{ + int n, k; + scanf("%d%d", &n,&k); + //Input: 3 2 output: 3 + //Input: 30 10 + //output: -108 + + printf("%d",cnk(n,k)); + return 0; +} diff --git a/Lect5/29.c b/Lect5/29.c new file mode 100644 index 0000000..2bc6288 --- /dev/null +++ b/Lect5/29.c @@ -0,0 +1,20 @@ +#include + +int cnk2(int n, int k) { + double res = 1; + for (int i=1; i<=k; ++i) + res = res * (n-k+i) / i; + return (int) (res + 0.01); +} + +int main(void) +{ + int n, k; + scanf("%d%d", &n,&k); + //Input: 3 2 output: 3 + //Input: 30 10 + //output: 30045015 + + printf("%d",cnk2(n,k)); + return 0; +} diff --git a/Lect5/32.c b/Lect5/32.c new file mode 100644 index 0000000..55f67e5 --- /dev/null +++ b/Lect5/32.c @@ -0,0 +1,15 @@ +#include +#define N 1000 +int main (void) { + int c[N] = {0}; + int n; + scanf ("%d", &n); + + c[0] = 1; + for (int j = 1; j <= n; j++) + for (int i = j; i >= 1; i--) + c[i] = c[i - 1] + c[i]; + for (int i = 0; i <= n; i++) + printf ("%d ", c[i]); + return 0; +} diff --git a/Lect5/33-34.c b/Lect5/33-34.c new file mode 100644 index 0000000..6f02743 --- /dev/null +++ b/Lect5/33-34.c @@ -0,0 +1,26 @@ +#include + +int cnk3(int n, int k) +{ + const int maxn = n; + int C[maxn+1][maxn+1]; + for (int i=0; i<=maxn; ++i) + { + C[i][0] = C[i][i] = 1; + for (int j=1; j + +int fact[]={1,1,2,6,24,120,720,5040,40320}; + +int factorial(int n) { + return fact[n]; +} + +int cnk4(int n, int k) { + int res = factorial(n); + res /= factorial(n-k); + res /= factorial(k); + return res; +} + +int main(void) +{ + int n, k; + scanf("%d%d", &n,&k); + //Input: 3 2 output: 3 + //~ Input: 8 3 + //~ output: 56 + + printf("%d",cnk4(n,k)); + return 0; +} diff --git a/Lect5/39-40.c b/Lect5/39-40.c new file mode 100644 index 0000000..e20ff59 --- /dev/null +++ b/Lect5/39-40.c @@ -0,0 +1,106 @@ +#include +#include +#include + +typedef int datatype; + +void push(datatype v); // используется для вычислений + +datatype pop(void); + +int isEmpty(void); // определяет пустой ли стек st +void operate(char c); // вычисляем два верхних значения на стеке st + +#define MAX_STACK_SIZE 255 + +datatype st[MAX_STACK_SIZE]; // массив - стек +int pst=0; // заполненность стека + +void push(datatype v) // используется для вычислений +{ + st[pst++]=v; +} +datatype pop() +{ + if(pst<=0) { + fprintf(stderr, "Error. Stack underflow"); + return 1; + } else if(pst>MAX_STACK_SIZE) { + fprintf(stderr, "Error. Stack overflow"); + return 1; + } + return st[--pst]; +} + + int isEmpty() // определяет пустой ли стек st +{ + return (pst<=0); +} + +void operate(char c) // вычисляем два верхних значения на стеке st +{ + datatype arg1=pop(),arg2=pop(); + switch(c) + { + case '+': + push(arg1+arg2); + break; + case '-': + push(arg2-arg1); + break; + case '*': + push(arg1*arg2); + break; + case '/': + push(arg2/arg1); + break; + } +} +_Bool isDigit(char c) // проверяем является ли символ цифрой +{ + return ((c>='0')&&(c<='9')); +} + +_Bool isOperator(char c) { + return c=='+' || c=='-' || c=='*' || c=='/'; +} + + // main.c +//#include +//#include "stack.h" + +int main(void) +{ + char c; + printf("Input inverse string: "); + + char str[1000]; + int len=0;// 1 2 + 4 * 3 + // 3 5 + 10 * 17 2 * - + //answer = 15 // answer = 46 + //~ scanf("%[^\n]",str); + //~ len=strlen(str); + while((c=getchar())!='\n') + str[len++]=c; + str[len]=0; + //~ printf("str=%slen=%d\n",str,len); + for(int i=0;i=len) + break; + if(isOperator(str[i])) + operate(str[i]); + } + } + printf("answer = %d\n",pop()); + return 0; +} diff --git a/Lect5/47-51.c b/Lect5/47-51.c new file mode 100644 index 0000000..ec48194 --- /dev/null +++ b/Lect5/47-51.c @@ -0,0 +1,127 @@ +#include +#include +#define BUFFER_SIZE 255 +#define STACK_SIZE 255 + +char oper[STACK_SIZE] = {0}; // стек для операций + - * / ( ) +int oend=0; // заполненность стека + +void printStack(void) +{ + for(int i = 0;i=BUFFER_SIZE) { + fprintf(stderr,"Stack overflow\n"); + exit(1); + } + oend--; + //~ printStack(); + return oper[oend]; +} +_Bool emptyStack() { + return oend==0; +} +_Bool isOperator(char c) { + return c=='+' || c=='-' || c=='*' || c=='/'; +} +int priority(char c) { + if(c=='+' || c=='-') + return 1; + if(c=='*' || c=='/') + return 2; + return 0; +} + +int main(void) +{ + char c; + int pos=0; + + char answer[BUFFER_SIZE]={0}; + for(int i=0;i='0' && str[i]<='9')//isDigit(str[i]) + { + int number,size=0; + for(number=0;str[i]>='0' && str[i]<='9';i++,size++) + { + number=number*10+str[i]-'0'; + } + sprintf(answer+pos,"%d ",number); + //~ printf("%d \n",number); + pos += size+1; + } + else + { + if(i>=len) + break; + c = str[i]; + //Если токен — оператор op1 + if(isOperator(c)) + { + //Пока присутствует на вершине стека токен оператор op2, чей приоритет выше или равен приоритету op1 + while( !emptyStack() ) + { + char top = pop(); + if(priority(top)>=priority(c)) + { + //Переложить op2 из стека в выходную очередь + sprintf(answer+pos,"%c ",top); + pos += 2; + } else + { // isOperator(top) == false + push(top); + break; + } + } + //Положить op1 в стек + push(c); + } + //Если токен — открывающая скобка, то положить его в стек + else if( c=='(' ) + { + push(c); + } + //Если токен — закрывающая скобка: + else if( c==')' ) + { + //Пока токен на вершине стека не открывающая скобка + while( (c=pop()) != '(' ) + { + //Переложить оператор из стека в выходную очередь. + sprintf(answer+pos,"%c ",c);//*pos++ = c,*pos++ = ' '; + //~ printf("%c \n",c); + pos += 2; + } + } + } + } + //Если больше не осталось токенов на входе + //Пока есть токены операторы в стеке: + while( !emptyStack() ) + { + sprintf(answer+pos,"%c ", pop());//Переложить оператор из стека в выходную очередь + pos += 2; + } + printf("Answer: %s\n",answer); + return 0; +} diff --git a/Lect5/55.c b/Lect5/55.c new file mode 100644 index 0000000..97cb31e --- /dev/null +++ b/Lect5/55.c @@ -0,0 +1,23 @@ +#include +#include + +uint64_t getHash(char const *s) { + const int p = 31; + uint64_t hash = 0, p_pow = 1; + while(*s) { +/* отнимаем 'a' от кода буквы и единицу прибавляем, чтобы у строки вида 'aaaaa' хэш был ненулевой */ + hash += (*s++ - 'a' + 1) * p_pow; + p_pow *= p; + } + return hash; +} + +int main(void) +{ + char s[100] = {0}; +//~ Hello. +//~ hash = 18446744072292316036 + scanf("%s",s); + printf("hash = %llu\n", getHash(s)); + return 0; +} diff --git a/Lect5/57.c b/Lect5/57.c new file mode 100644 index 0000000..b40b8a0 --- /dev/null +++ b/Lect5/57.c @@ -0,0 +1,48 @@ +#include +#include + +//Hello. + +uint64_t getHash(char const *s) { + const int p = 31; + uint64_t hash = 0, p_pow = 1; + while(*s) { +/* отнимаем 'a' от кода буквы и единицу прибавляем, чтобы у строки вида 'aaaaa' хэш был ненулевой */ + hash += (*s++ - 'a' + 1) * p_pow; + p_pow *= p; + } + return hash; +} + +uint64_t getHash2(char const *str) +{ + uint64_t hash = 5381; + int32_t c; + while ((c = *str++)) + hash = ((hash<<5) + hash) + c; + return hash; +} + +uint64_t rol(uint64_t n, size_t shift) { + return (n<>(64 - shift)); +} + +uint64_t getHash3(char const *s) { + uint64_t result = 0x55555555; + while (*s) { + result ^= *s++; + result = rol(result, 5); + } + return result; +} + + +int main(void) +{ + char s[100] = {0}; + scanf("%s",s); + printf("hash = %llu\n", getHash(s)); + printf("hash = %llu\n", getHash2(s)); + printf("hash = %llu\n", getHash3(s)); + return 0; +} diff --git a/Lect5/59-60.c b/Lect5/59-60.c new file mode 100644 index 0000000..10fb5f1 --- /dev/null +++ b/Lect5/59-60.c @@ -0,0 +1,74 @@ +#include +#include +#include + +/* +hello world +hello world +hello +world +hello +world +world +hello world +abcd +abcd +*/ + +uint64_t getHash(char const *s) { + const int p = 31; + uint64_t hash = 0, p_pow = 1; + while(*s) { +/* отнимаем 'a' от кода буквы и единицу прибавляем, чтобы у строки вида 'aaaaa' хэш был ненулевой */ + hash += (*s++ - 'a' + 1) * p_pow; + p_pow *= p; + } + return hash; +} + +uint64_t getHash2(char const *str) +{ + uint64_t hash = 5381; + int32_t c; + while ((c = *str++)) + hash = ((hash<<5) + hash) + c; + return hash; +} + +uint64_t rol(uint64_t n, size_t shift) { + return (n<>(64 - shift)); +} + +uint64_t getHash3(char const *s) { + uint64_t result = 0x55555555; + while (*s) { + result ^= *s++; + result = rol(result, 5); + } + return result; +} + +enum {TOTAL_STRINGS=10}; +struct strings { + char s[100]; + uint64_t hash; +} strs[TOTAL_STRINGS]; + +int cmphashes (const void *a, const void *b) { + return ( (*(struct strings *)a).hash - (*(struct strings *)b).hash ); +} +int main(void) +{ + for(size_t i=0; i +#include +#include +#include + +char s[100]="135"; +char text[100]="21354562135"; +uint64_t p=10; +uint64_t getHash(char *str, size_t len) { + uint64_t hash=0; + char c; + for(size_t i=0; i +#include +#include +#include + +#define SIZE 1000 + +/* +Input text: AAAAB +Input word: AAAB +s = AAAB#AAAAB +find word in position 1 + +Input text: abcdbbbca +Input word: bc +// s = bc#abcdbbbca +find word in position 2 +find word in position 7 +* +* + */ + + +void zFunction(char *s, int z[]) +{ +int n = strlen(s); + for (int i=1; i r) + l = i, r = i+z[i]-1; + } +} + +void PrintZ(char *s, int z[]) +{ +int n = strlen(s); + for (int i=0; i +#include +#include +#include +#include +#include +#include + +#define MIN_Y 2 +enum {LEFT=1, UP, RIGHT, DOWN, STOP_GAME=KEY_F(10)}; +enum {MAX_TAIL_SIZE=100, START_TAIL_SIZE=3, MAX_FOOD_SIZE=20, FOOD_EXPIRE_SECONDS=10,SEED_NUMBER=3}; + + +// Здесь храним коды управления змейкой +struct control_buttons +{ + int down; + int up; + int left; + int right; +} control_buttons; + +struct control_buttons default_controls = {KEY_DOWN, KEY_UP, KEY_LEFT, KEY_RIGHT}; + +/* + Голова змейки содержит в себе + x,y - координаты текущей позиции + direction - направление движения + tsize - размер хвоста + *tail - ссылка на хвост + */ +typedef struct snake_t +{ + int x; + int y; + int direction; + size_t tsize; + struct tail_t *tail; + struct control_buttons controls; +} snake_t; + +/* + Хвост это массив состоящий из координат x,y + */ +typedef struct tail_t +{ + int x; + int y; +} tail_t; +/* + Еда — это массив точек, состоящий из координат x,y, времени, + когда данная точка была установлена, и поля, сигнализирующего, + была ли данная точка съедена. + */ +struct food +{ + int x; + int y; + time_t put_time; + char point; + uint8_t enable; +} food[MAX_FOOD_SIZE]; + +void initFood(struct food f[], size_t size) +{ + struct food init = {0,0,0,0,0}; + for(size_t i=0; iy, fp->x, " "); + fp->x = rand() % (max_x - 1); + fp->y = rand() % (max_y - 2) + 1; //Не занимаем верхнюю строку + fp->put_time = time(NULL); + fp->point = '$'; + fp->enable = 1; + spoint[0] = fp->point; + mvprintw(fp->y, fp->x, "%s", spoint); +} + +/* + Разместить еду на поле + */ +void putFood(struct food f[], size_t number_seeds) +{ + for(size_t i=0; i FOOD_EXPIRE_SECONDS ) + { + putFoodSeed(&f[i]); + } + } + } +} +void initTail(struct tail_t t[], size_t size) +{ + struct tail_t init_t= {0,0}; + for(size_t i=0; ix = x; + head->y = y; + head->direction = LEFT; +} + +void initSnake(snake_t *head, size_t size, int x, int y) +{ + tail_t* tail = (tail_t*) malloc(MAX_TAIL_SIZE*sizeof(tail_t)); + initTail(tail, MAX_TAIL_SIZE); + initHead(head, x, y); + head->tail = tail; // прикрепляем к голове хвост + head->tsize = size+1; + head->controls = default_controls; +} + +/* + Движение головы с учетом текущего направления движения + */ +void go(struct snake_t *head) +{ + char ch = '@'; + int max_x=0, max_y=0; + getmaxyx(stdscr, max_y, max_x); // macro - размер терминала + mvprintw(head->y, head->x, " "); // очищаем один символ + switch (head->direction) + { + case LEFT: + if(head->x <= 0) // Циклическое движение, чтобы не + // уходить за пределы экрана + head->x = max_x; + mvprintw(head->y, --(head->x), "%c", ch); + break; + case RIGHT: + mvprintw(head->y, ++(head->x), "%c", ch); + break; + case UP: + mvprintw(--(head->y), head->x, "%c", ch); + break; + case DOWN: + mvprintw(++(head->y), head->x, "%c", ch); + break; + default: + break; + } + refresh(); +} + +void changeDirection(struct snake_t* snake, const int32_t key) +{ + if (key == snake->controls.down) + snake->direction = DOWN; + else if (key == snake->controls.up) + snake->direction = UP; + else if (key == snake->controls.right) + snake->direction = RIGHT; + else if (key == snake->controls.left) + snake->direction = LEFT; +} + +/* + Движение хвоста с учетом движения головы + */ +void goTail(struct snake_t *head) +{ + char ch = '*'; + mvprintw(head->tail[head->tsize-1].y, head->tail[head->tsize-1].x, " "); + for(size_t i = head->tsize-1; i>0; i--) + { + head->tail[i] = head->tail[i-1]; + if( head->tail[i].y || head->tail[i].x) + mvprintw(head->tail[i].y, head->tail[i].x, "%c", ch); + } + head->tail[0].x = head->x; + head->tail[0].y = head->y; +} + +//======================================================================== +//Проверка того, является ли какое-то из зерен съеденным, +_Bool haveEat(struct snake_t *head, struct food f[]) +{ + //...нужно написать код...// + return 0; +} + +/* + Увеличение хвоста на 1 элемент + */ + +void addTail(struct snake_t *head) +{ + //...нужно написать код...// +} +//======================================================================== + +int main() +{ + snake_t* snake = (snake_t*)malloc(sizeof(snake_t)); + + initSnake(snake,START_TAIL_SIZE,10,10); + + initscr(); + keypad(stdscr, TRUE); // Включаем F1, F2, стрелки и т.д. + raw(); // Откдючаем line buffering + noecho(); // Отключаем echo() режим при вызове getch + curs_set(FALSE); //Отключаем курсор + mvprintw(0, 0,"Use arrows for control. Press 'F10' for EXIT"); + timeout(0); //Отключаем таймаут после нажатия клавиши в цикле + initFood(food, MAX_FOOD_SIZE); + putFood(food, SEED_NUMBER);// Кладем зерна + int key_pressed=0; + while( key_pressed != STOP_GAME ) + { + key_pressed = getch(); // Считываем клавишу + go(snake); + goTail(snake); + timeout(100); // Задержка при отрисовке + refreshFood(food, SEED_NUMBER);// Обновляем еду + //======================================================================== + if (haveEat(snake,food))//ПРОВКРКА НА СЪЕДЕНИЕ + { + addTail(snake); + } + //======================================================================== + changeDirection(snake, key_pressed); + } + free(snake->tail); + free(snake); + endwin(); // Завершаем режим curses mod + return 0; +} diff --git a/Lect6/05_haveEat_food.exe b/Lect6/05_haveEat_food.exe new file mode 100644 index 0000000..3cde3a1 Binary files /dev/null and b/Lect6/05_haveEat_food.exe differ diff --git a/Lect6/05_haveEat_food.o b/Lect6/05_haveEat_food.o new file mode 100644 index 0000000..1f5b0f0 Binary files /dev/null and b/Lect6/05_haveEat_food.o differ diff --git a/Lect6/07_update.c b/Lect6/07_update.c new file mode 100644 index 0000000..072562b --- /dev/null +++ b/Lect6/07_update.c @@ -0,0 +1,272 @@ +#include +#include +#include +#include +#include +#include +#include + +#define MIN_Y 2 +double DELAY = 0.1; +enum {LEFT=1, UP, RIGHT, DOWN, STOP_GAME=KEY_F(10)}; +enum {MAX_TAIL_SIZE=100, START_TAIL_SIZE=3, MAX_FOOD_SIZE=20, FOOD_EXPIRE_SECONDS=10,SEED_NUMBER=3}; + + +// Здесь храним коды управления змейкой +struct control_buttons +{ + int down; + int up; + int left; + int right; +}control_buttons; + +struct control_buttons default_controls = {KEY_DOWN, KEY_UP, KEY_LEFT, KEY_RIGHT}; + +/* + Голова змейки содержит в себе + x,y - координаты текущей позиции + direction - направление движения + tsize - размер хвоста + *tail - ссылка на хвост + */ +typedef struct snake_t +{ + int x; + int y; + int direction; + size_t tsize; + struct tail_t *tail; + struct control_buttons controls; +} snake_t; + +/* + Хвост это массив состоящий из координат x,y + */ +typedef struct tail_t +{ + int x; + int y; +} tail_t; +/* + Еда — это массив точек, состоящий из координат x,y, времени, + когда данная точка была установлена, и поля, сигнализирующего, + была ли данная точка съедена. + */ +struct food +{ + int x; + int y; + time_t put_time; + char point; + uint8_t enable; +} food[MAX_FOOD_SIZE]; + +void initFood(struct food f[], size_t size) +{ + struct food init = {0,0,0,0,0}; + for(size_t i=0; iy, fp->x, " "); + fp->x = rand() % (max_x - 1); + fp->y = rand() % (max_y - 2) + 1; //Не занимаем верхнюю строку + fp->put_time = time(NULL); + fp->point = '$'; + fp->enable = 1; + spoint[0] = fp->point; + mvprintw(fp->y, fp->x, "%s", spoint); +} + +/* + Разместить еду на поле + */ +void putFood(struct food f[], size_t number_seeds) +{ + for(size_t i=0; i FOOD_EXPIRE_SECONDS ) + { + putFoodSeed(&f[i]); + } + } + } +} +void initTail(struct tail_t t[], size_t size) +{ + struct tail_t init_t={0,0}; + for(size_t i=0; ix = x; + head->y = y; + head->direction = RIGHT; +} + +void initSnake(snake_t *head, size_t size, int x, int y) +{ +tail_t* tail = (tail_t*) malloc(MAX_TAIL_SIZE*sizeof(tail_t)); + initTail(tail, MAX_TAIL_SIZE); + initHead(head, x, y); + head->tail = tail; // прикрепляем к голове хвост + head->tsize = size+1; + head->controls = default_controls; +} + +/* + Движение головы с учетом текущего направления движения + */ +void go(struct snake_t *head) +{ + char ch = '@'; + int max_x=0, max_y=0; + getmaxyx(stdscr, max_y, max_x); // macro - размер терминала + mvprintw(head->y, head->x, " "); // очищаем один символ + switch (head->direction) + { + case LEFT: + if(head->x <= 0) // Циклическое движение, чтобы не +// уходить за пределы экрана + head->x = max_x; + mvprintw(head->y, --(head->x), "%c", ch); + break; + case RIGHT: + mvprintw(head->y, ++(head->x), "%c", ch); + break; + case UP: + mvprintw(--(head->y), head->x, "%c", ch); + break; + case DOWN: + mvprintw(++(head->y), head->x, "%c", ch); + break; + default: + break; + } + refresh(); +} + +void changeDirection(struct snake_t* snake, const int32_t key) +{ + if (key == snake->controls.down) + snake->direction = DOWN; + else if (key == snake->controls.up) + snake->direction = UP; + else if (key == snake->controls.right) + snake->direction = RIGHT; + else if (key == snake->controls.left) + snake->direction = LEFT; +} + +/* + Движение хвоста с учетом движения головы + */ +void goTail(struct snake_t *head) +{ + char ch = '*'; + mvprintw(head->tail[head->tsize-1].y, head->tail[head->tsize-1].x, " "); + for(size_t i = head->tsize-1; i>0; i--) + { + head->tail[i] = head->tail[i-1]; + if( head->tail[i].y || head->tail[i].x) + mvprintw(head->tail[i].y, head->tail[i].x, "%c", ch); + } + head->tail[0].x = head->x; + head->tail[0].y = head->y; +} + +//======================================================================== +//Проверка того, является ли какое-то из зерен съеденным, +_Bool haveEat(struct snake_t *head, struct food f[]) +{ +//...нужно написать код...// + return 0; +} + +/* + Увеличение хвоста на 1 элемент + */ + +void addTail(struct snake_t *head) +{ +//...нужно написать код...// +} +//======================================================================== +int checkDirection(snake_t* snake, int32_t key) +{ +//...нужно написать код...// + return 1; + +} + +//Вынести тело цикла while из int main() в отдельную функцию update +//и посмотреть, как изменится профилирование +void update(struct snake_t *head, struct food f[], const int32_t key) +{ + clock_t begin = clock(); + go(head); + goTail(head); + if (checkDirection(head,key)) + { + changeDirection(head, key); + } + refreshFood(food, SEED_NUMBER);// Обновляем еду + if (haveEat(head,food)) + { + addTail(head); + } + refresh();//Обновление экрана, вывели кадр анимации + while ((double)(clock() - begin)/CLOCKS_PER_SECtail); + free(snake); + endwin(); // Завершаем режим curses mod + return 0; +} diff --git a/Lect6/07_update.exe b/Lect6/07_update.exe new file mode 100644 index 0000000..82d825f Binary files /dev/null and b/Lect6/07_update.exe differ diff --git a/Lect6/07_update.o b/Lect6/07_update.o new file mode 100644 index 0000000..a5224a6 Binary files /dev/null and b/Lect6/07_update.o differ diff --git a/Lect6/08_isCrush.c b/Lect6/08_isCrush.c new file mode 100644 index 0000000..002803f --- /dev/null +++ b/Lect6/08_isCrush.c @@ -0,0 +1,281 @@ +#include +#include +#include +#include +#include +#include +#include + +#define MIN_Y 2 +double DELAY = 0.1; +enum {LEFT=1, UP, RIGHT, DOWN, STOP_GAME=KEY_F(10)}; +enum {MAX_TAIL_SIZE=100, START_TAIL_SIZE=3, MAX_FOOD_SIZE=20, FOOD_EXPIRE_SECONDS=10,SEED_NUMBER=3}; + + +// Здесь храним коды управления змейкой +struct control_buttons +{ + int down; + int up; + int left; + int right; +} control_buttons; + +struct control_buttons default_controls = {KEY_DOWN, KEY_UP, KEY_LEFT, KEY_RIGHT}; + +/* + Голова змейки содержит в себе + x,y - координаты текущей позиции + direction - направление движения + tsize - размер хвоста + *tail - ссылка на хвост + */ +typedef struct snake_t +{ + int x; + int y; + int direction; + size_t tsize; + struct tail_t *tail; + struct control_buttons controls; +} snake_t; + +/* + Хвост это массив состоящий из координат x,y + */ +typedef struct tail_t +{ + int x; + int y; +} tail_t; +/* + Еда — это массив точек, состоящий из координат x,y, времени, + когда данная точка была установлена, и поля, сигнализирующего, + была ли данная точка съедена. + */ +struct food +{ + int x; + int y; + time_t put_time; + char point; + uint8_t enable; +} food[MAX_FOOD_SIZE]; + +void initFood(struct food f[], size_t size) +{ + struct food init = {0,0,0,0,0}; + for(size_t i=0; iy, fp->x, " "); + fp->x = rand() % (max_x - 1); + fp->y = rand() % (max_y - 2) + 1; //Не занимаем верхнюю строку + fp->put_time = time(NULL); + fp->point = '$'; + fp->enable = 1; + spoint[0] = fp->point; + mvprintw(fp->y, fp->x, "%s", spoint); +} + +/* + Разместить еду на поле + */ +void putFood(struct food f[], size_t number_seeds) +{ + for(size_t i=0; i FOOD_EXPIRE_SECONDS ) + { + putFoodSeed(&f[i]); + } + } + } +} +void initTail(struct tail_t t[], size_t size) +{ + struct tail_t init_t= {0,0}; + for(size_t i=0; ix = x; + head->y = y; + head->direction = RIGHT; +} + +void initSnake(snake_t *head, size_t size, int x, int y) +{ + tail_t* tail = (tail_t*) malloc(MAX_TAIL_SIZE*sizeof(tail_t)); + initTail(tail, MAX_TAIL_SIZE); + initHead(head, x, y); + head->tail = tail; // прикрепляем к голове хвост + head->tsize = size+1; + head->controls = default_controls; +} + +/* + Движение головы с учетом текущего направления движения + */ +void go(struct snake_t *head) +{ + char ch = '@'; + int max_x=0, max_y=0; + getmaxyx(stdscr, max_y, max_x); // macro - размер терминала + mvprintw(head->y, head->x, " "); // очищаем один символ + switch (head->direction) + { + case LEFT: + if(head->x <= 0) // Циклическое движение, чтобы не + // уходить за пределы экрана + head->x = max_x; + mvprintw(head->y, --(head->x), "%c", ch); + break; + case RIGHT: + mvprintw(head->y, ++(head->x), "%c", ch); + break; + case UP: + mvprintw(--(head->y), head->x, "%c", ch); + break; + case DOWN: + mvprintw(++(head->y), head->x, "%c", ch); + break; + default: + break; + } + refresh(); +} + +void changeDirection(struct snake_t* snake, const int32_t key) +{ + if (key == snake->controls.down) + snake->direction = DOWN; + else if (key == snake->controls.up) + snake->direction = UP; + else if (key == snake->controls.right) + snake->direction = RIGHT; + else if (key == snake->controls.left) + snake->direction = LEFT; +} + +/* + Движение хвоста с учетом движения головы + */ +void goTail(struct snake_t *head) +{ + char ch = '*'; + mvprintw(head->tail[head->tsize-1].y, head->tail[head->tsize-1].x, " "); + for(size_t i = head->tsize-1; i>0; i--) + { + head->tail[i] = head->tail[i-1]; + if( head->tail[i].y || head->tail[i].x) + mvprintw(head->tail[i].y, head->tail[i].x, "%c", ch); + } + head->tail[0].x = head->x; + head->tail[0].y = head->y; +} + +//======================================================================== +//Проверка того, является ли какое-то из зерен съеденным, +_Bool haveEat(struct snake_t *head, struct food f[]) +{ + //...нужно написать код...// + return 0; +} + +/* + Увеличение хвоста на 1 элемент + */ + +void addTail(struct snake_t *head) +{ + //...нужно написать код...// +} +//======================================================================== +int checkDirection(snake_t* snake, int32_t key) +{ + //...нужно написать код...// + return 1; + +} + +//Вынести тело цикла while из int main() в отдельную функцию update +//и посмотреть, как изменится профилирование +void update(struct snake_t *head, struct food f[], const int32_t key) +{ + clock_t begin = clock(); + go(head); + goTail(head); + if (checkDirection(head,key)) + { + changeDirection(head, key); + } + refreshFood(food, SEED_NUMBER);// Обновляем еду + if (haveEat(head,food)) + { + addTail(head); + } + refresh();//Обновление экрана, вывели кадр анимации + while ((double)(clock() - begin)/CLOCKS_PER_SECtail); + free(snake); + endwin(); // Завершаем режим curses mod + return 0; +} diff --git a/Lect6/08_isCrush.exe b/Lect6/08_isCrush.exe new file mode 100644 index 0000000..c70c441 Binary files /dev/null and b/Lect6/08_isCrush.exe differ diff --git a/Lect6/08_isCrush.o b/Lect6/08_isCrush.o new file mode 100644 index 0000000..b1fba03 Binary files /dev/null and b/Lect6/08_isCrush.o differ diff --git a/Lect6/10_repairSeed.c b/Lect6/10_repairSeed.c new file mode 100644 index 0000000..50e5b34 --- /dev/null +++ b/Lect6/10_repairSeed.c @@ -0,0 +1,299 @@ +#include +#include +#include +#include +#include +#include +#include + +#define MIN_Y 2 +double DELAY = 0.1; +enum {LEFT=1, UP, RIGHT, DOWN, STOP_GAME=KEY_F(10)}; +enum {MAX_TAIL_SIZE=100, START_TAIL_SIZE=3, MAX_FOOD_SIZE=20, FOOD_EXPIRE_SECONDS=10,SEED_NUMBER=3}; + + +// Здесь храним коды управления змейкой +struct control_buttons +{ + int down; + int up; + int left; + int right; +} control_buttons; + +struct control_buttons default_controls = {KEY_DOWN, KEY_UP, KEY_LEFT, KEY_RIGHT}; + +/* + Голова змейки содержит в себе + x,y - координаты текущей позиции + direction - направление движения + tsize - размер хвоста + *tail - ссылка на хвост + */ +typedef struct snake_t +{ + int x; + int y; + int direction; + size_t tsize; + struct tail_t *tail; + struct control_buttons controls; +} snake_t; + +/* + Хвост это массив состоящий из координат x,y + */ +typedef struct tail_t +{ + int x; + int y; +} tail_t; +/* + Еда — это массив точек, состоящий из координат x,y, времени, + когда данная точка была установлена, и поля, сигнализирующего, + была ли данная точка съедена. + */ +struct food +{ + int x; + int y; + time_t put_time; + char point; + uint8_t enable; +} food[MAX_FOOD_SIZE]; + +void initFood(struct food f[], size_t size) +{ + struct food init = {0,0,0,0,0}; + for(size_t i=0; iy, fp->x, " "); + fp->x = rand() % (max_x - 1); + fp->y = rand() % (max_y - 2) + 1; //Не занимаем верхнюю строку + fp->put_time = time(NULL); + fp->point = '$'; + fp->enable = 1; + spoint[0] = fp->point; + mvprintw(fp->y, fp->x, "%s", spoint); +} + +/* + Разместить еду на поле + */ +void putFood(struct food f[], size_t number_seeds) +{ + for(size_t i=0; i FOOD_EXPIRE_SECONDS ) + { + putFoodSeed(&f[i]); + } + } + } +} +void initTail(struct tail_t t[], size_t size) +{ + struct tail_t init_t= {0,0}; + for(size_t i=0; ix = x; + head->y = y; + head->direction = RIGHT; +} + +void initSnake(snake_t *head, size_t size, int x, int y) +{ + tail_t* tail = (tail_t*) malloc(MAX_TAIL_SIZE*sizeof(tail_t)); + initTail(tail, MAX_TAIL_SIZE); + initHead(head, x, y); + head->tail = tail; // прикрепляем к голове хвост + head->tsize = size+1; + head->controls = default_controls; +} + +/* + Движение головы с учетом текущего направления движения + */ +void go(struct snake_t *head) +{ + char ch = '@'; + int max_x=0, max_y=0; + getmaxyx(stdscr, max_y, max_x); // macro - размер терминала + mvprintw(head->y, head->x, " "); // очищаем один символ + switch (head->direction) + { + case LEFT: + if(head->x <= 0) // Циклическое движение, чтобы не + // уходить за пределы экрана + head->x = max_x; + mvprintw(head->y, --(head->x), "%c", ch); + break; + case RIGHT: + mvprintw(head->y, ++(head->x), "%c", ch); + break; + case UP: + mvprintw(--(head->y), head->x, "%c", ch); + break; + case DOWN: + mvprintw(++(head->y), head->x, "%c", ch); + break; + default: + break; + } + refresh(); +} + +void changeDirection(struct snake_t* snake, const int32_t key) +{ + if (key == snake->controls.down) + snake->direction = DOWN; + else if (key == snake->controls.up) + snake->direction = UP; + else if (key == snake->controls.right) + snake->direction = RIGHT; + else if (key == snake->controls.left) + snake->direction = LEFT; +} + +/* + Движение хвоста с учетом движения головы + */ +void goTail(struct snake_t *head) +{ + char ch = '*'; + mvprintw(head->tail[head->tsize-1].y, head->tail[head->tsize-1].x, " "); + for(size_t i = head->tsize-1; i>0; i--) + { + head->tail[i] = head->tail[i-1]; + if( head->tail[i].y || head->tail[i].x) + mvprintw(head->tail[i].y, head->tail[i].x, "%c", ch); + } + head->tail[0].x = head->x; + head->tail[0].y = head->y; +} + +//======================================================================== +//Проверка того, является ли какое-то из зерен съеденным, +_Bool haveEat(struct snake_t *head, struct food f[]) +{ + //...нужно написать код...// + return 0; +} + +/* + Увеличение хвоста на 1 элемент + */ + +void addTail(struct snake_t *head) +{ + //...нужно написать код...// +} +//======================================================================== +int checkDirection(snake_t* snake, int32_t key) +{ + //...нужно написать код...// + return 1; + +} + +//Вынести тело цикла while из int main() в отдельную функцию update +//и посмотреть, как изменится профилирование +void update(struct snake_t *head, struct food f[], const int32_t key) +{ + clock_t begin = clock(); + go(head); + goTail(head); + if (checkDirection(head,key)) + { + changeDirection(head, key); + } + refreshFood(food, SEED_NUMBER);// Обновляем еду + if (haveEat(head,food)) + { + addTail(head); + } + refresh();//Обновление экрана, вывели кадр анимации + while ((double)(clock() - begin)/CLOCKS_PER_SECtsize; i++ ) + for( size_t j=0; jtail); + free(snake); + endwin(); // Завершаем режим curses mod + return 0; +} diff --git a/Lect6/11-13_secondSnake.c b/Lect6/11-13_secondSnake.c new file mode 100644 index 0000000..593a97e --- /dev/null +++ b/Lect6/11-13_secondSnake.c @@ -0,0 +1,313 @@ +#include +#include +#include +#include +#include +#include +#include + +#define MIN_Y 2 +double DELAY = 0.1; +#define PLAYERS 2 + +enum {LEFT=1, UP, RIGHT, DOWN, STOP_GAME=KEY_F(10)}; +enum {MAX_TAIL_SIZE=100, START_TAIL_SIZE=3, MAX_FOOD_SIZE=20, FOOD_EXPIRE_SECONDS=10,SEED_NUMBER=3,CONTROLS=2}; + + +// Здесь храним коды управления змейкой +struct control_buttons +{ + int down; + int up; + int left; + int right; +} control_buttons; + +struct control_buttons default_controls[CONTROLS] = {{KEY_DOWN, KEY_UP, KEY_LEFT, KEY_RIGHT}, + {'s', 'w', 'a', 'd'}}; + +/* + Голова змейки содержит в себе + x,y - координаты текущей позиции + direction - направление движения + tsize - размер хвоста + *tail - ссылка на хвост + */ +typedef struct snake_t +{ + int x; + int y; + int direction; + size_t tsize; + struct tail_t *tail; + struct control_buttons controls; +} snake_t; + +/* + Хвост это массив состоящий из координат x,y + */ +typedef struct tail_t +{ + int x; + int y; +} tail_t; +/* + Еда — это массив точек, состоящий из координат x,y, времени, + когда данная точка была установлена, и поля, сигнализирующего, + была ли данная точка съедена. + */ +struct food +{ + int x; + int y; + time_t put_time; + char point; + uint8_t enable; +} food[MAX_FOOD_SIZE]; + +void initFood(struct food f[], size_t size) +{ + struct food init = {0,0,0,0,0}; + for(size_t i=0; iy, fp->x, " "); + fp->x = rand() % (max_x - 1); + fp->y = rand() % (max_y - 2) + 1; //Не занимаем верхнюю строку + fp->put_time = time(NULL); + fp->point = '$'; + fp->enable = 1; + spoint[0] = fp->point; + mvprintw(fp->y, fp->x, "%s", spoint); +} + +/* + Разместить еду на поле + */ +void putFood(struct food f[], size_t number_seeds) +{ + for(size_t i=0; i FOOD_EXPIRE_SECONDS ) + { + putFoodSeed(&f[i]); + } + } + } +} +void initTail(struct tail_t t[], size_t size) +{ + struct tail_t init_t= {0,0}; + for(size_t i=0; ix = x; + head->y = y; + head->direction = RIGHT; +} +//======================================================================== +void initSnake(snake_t *head[], size_t size, int x, int y,int i) +{ + head[i] = (snake_t*)malloc(sizeof(snake_t)); +tail_t* tail = (tail_t*) malloc(MAX_TAIL_SIZE*sizeof(tail_t)); + initTail(tail, MAX_TAIL_SIZE); + initHead(head[i], x, y); + head[i]->tail = tail; // прикрепляем к голове хвост + head[i]->tsize = size+1; + //~ head[i]->controls = default_controls[i]; + head[i]->controls = default_controls[0]; +} + +/* + Движение головы с учетом текущего направления движения + */ +void go(struct snake_t *head) +{ + char ch = '@'; + int max_x=0, max_y=0; + getmaxyx(stdscr, max_y, max_x); // macro - размер терминала + mvprintw(head->y, head->x, " "); // очищаем один символ + switch (head->direction) + { + case LEFT: + if(head->x <= 0) // Циклическое движение, чтобы не + // уходить за пределы экрана + head->x = max_x; + mvprintw(head->y, --(head->x), "%c", ch); + break; + case RIGHT: + mvprintw(head->y, ++(head->x), "%c", ch); + break; + case UP: + mvprintw(--(head->y), head->x, "%c", ch); + break; + case DOWN: + mvprintw(++(head->y), head->x, "%c", ch); + break; + default: + break; + } + refresh(); +} + +void changeDirection(struct snake_t* snake, const int32_t key) +{ + if (key == snake->controls.down) + snake->direction = DOWN; + else if (key == snake->controls.up) + snake->direction = UP; + else if (key == snake->controls.right) + snake->direction = RIGHT; + else if (key == snake->controls.left) + snake->direction = LEFT; +} + +/* + Движение хвоста с учетом движения головы + */ +void goTail(struct snake_t *head) +{ + char ch = '*'; + mvprintw(head->tail[head->tsize-1].y, head->tail[head->tsize-1].x, " "); + for(size_t i = head->tsize-1; i>0; i--) + { + head->tail[i] = head->tail[i-1]; + if( head->tail[i].y || head->tail[i].x) + mvprintw(head->tail[i].y, head->tail[i].x, "%c", ch); + } + head->tail[0].x = head->x; + head->tail[0].y = head->y; +} + +//======================================================================== +//Проверка того, является ли какое-то из зерен съеденным, +_Bool haveEat(struct snake_t *head, struct food f[]) +{ + //...нужно написать код...// + return 0; +} + +/* + Увеличение хвоста на 1 элемент + */ + +void addTail(struct snake_t *head) +{ + //...нужно написать код...// +} +//======================================================================== +int checkDirection(snake_t* snake, int32_t key) +{ + //...нужно написать код...// + return 1; + +} + +//Вынести тело цикла while из int main() в отдельную функцию update +//и посмотреть, как изменится профилирование +void update(struct snake_t *head, struct food f[], const int32_t key) +{ + clock_t begin = clock(); + go(head); + goTail(head); + if (checkDirection(head,key)) + { + changeDirection(head, key); + } + refreshFood(food, SEED_NUMBER);// Обновляем еду + if (haveEat(head,food)) + { + addTail(head); + } + refresh();//Обновление экрана, вывели кадр анимации + while ((double)(clock() - begin)/CLOCKS_PER_SECtsize; i++ ) + for( size_t j=0; jtail); + free(snakes[i]); + } + endwin(); // Завершаем режим curses mod + return 0; +} diff --git a/Lect6/11-13_secondSnake.exe b/Lect6/11-13_secondSnake.exe new file mode 100644 index 0000000..9b33668 Binary files /dev/null and b/Lect6/11-13_secondSnake.exe differ diff --git a/Lect6/11-13_secondSnake.o b/Lect6/11-13_secondSnake.o new file mode 100644 index 0000000..60fb399 Binary files /dev/null and b/Lect6/11-13_secondSnake.o differ diff --git a/Lect6/15_controls.c b/Lect6/15_controls.c new file mode 100644 index 0000000..b5ef3f6 --- /dev/null +++ b/Lect6/15_controls.c @@ -0,0 +1,313 @@ +#include +#include +#include +#include +#include +#include +#include + +#define MIN_Y 2 +double DELAY = 0.1; +#define PLAYERS 2 + +enum {LEFT=1, UP, RIGHT, DOWN, STOP_GAME=KEY_F(10)}; +enum {MAX_TAIL_SIZE=100, START_TAIL_SIZE=3, MAX_FOOD_SIZE=20, FOOD_EXPIRE_SECONDS=10,SEED_NUMBER=3,CONTROLS=2}; + + +// Здесь храним коды управления змейкой +struct control_buttons +{ + int down; + int up; + int left; + int right; +} control_buttons; + +struct control_buttons default_controls[CONTROLS] = {{KEY_DOWN, KEY_UP, KEY_LEFT, KEY_RIGHT}, + {'s', 'w', 'a', 'd'}}; + +/* + Голова змейки содержит в себе + x,y - координаты текущей позиции + direction - направление движения + tsize - размер хвоста + *tail - ссылка на хвост + */ +typedef struct snake_t +{ + int x; + int y; + int direction; + size_t tsize; + struct tail_t *tail; + struct control_buttons controls; +} snake_t; + +/* + Хвост это массив состоящий из координат x,y + */ +typedef struct tail_t +{ + int x; + int y; +} tail_t; +/* + Еда — это массив точек, состоящий из координат x,y, времени, + когда данная точка была установлена, и поля, сигнализирующего, + была ли данная точка съедена. + */ +struct food +{ + int x; + int y; + time_t put_time; + char point; + uint8_t enable; +} food[MAX_FOOD_SIZE]; + +void initFood(struct food f[], size_t size) +{ + struct food init = {0,0,0,0,0}; + for(size_t i=0; iy, fp->x, " "); + fp->x = rand() % (max_x - 1); + fp->y = rand() % (max_y - 2) + 1; //Не занимаем верхнюю строку + fp->put_time = time(NULL); + fp->point = '$'; + fp->enable = 1; + spoint[0] = fp->point; + mvprintw(fp->y, fp->x, "%s", spoint); +} + +/* + Разместить еду на поле + */ +void putFood(struct food f[], size_t number_seeds) +{ + for(size_t i=0; i FOOD_EXPIRE_SECONDS ) + { + putFoodSeed(&f[i]); + } + } + } +} +void initTail(struct tail_t t[], size_t size) +{ + struct tail_t init_t= {0,0}; + for(size_t i=0; ix = x; + head->y = y; + head->direction = RIGHT; +} +//======================================================================== +void initSnake(snake_t *head[], size_t size, int x, int y,int i) +{ + head[i] = (snake_t*)malloc(sizeof(snake_t)); +tail_t* tail = (tail_t*) malloc(MAX_TAIL_SIZE*sizeof(tail_t)); + initTail(tail, MAX_TAIL_SIZE); + initHead(head[i], x, y); + head[i]->tail = tail; // прикрепляем к голове хвост + head[i]->tsize = size+1; + head[i]->controls = default_controls[i]; + //~ head[i]->controls = default_controls[0]; +} + +/* + Движение головы с учетом текущего направления движения + */ +void go(struct snake_t *head) +{ + char ch = '@'; + int max_x=0, max_y=0; + getmaxyx(stdscr, max_y, max_x); // macro - размер терминала + mvprintw(head->y, head->x, " "); // очищаем один символ + switch (head->direction) + { + case LEFT: + if(head->x <= 0) // Циклическое движение, чтобы не + // уходить за пределы экрана + head->x = max_x; + mvprintw(head->y, --(head->x), "%c", ch); + break; + case RIGHT: + mvprintw(head->y, ++(head->x), "%c", ch); + break; + case UP: + mvprintw(--(head->y), head->x, "%c", ch); + break; + case DOWN: + mvprintw(++(head->y), head->x, "%c", ch); + break; + default: + break; + } + refresh(); +} + +void changeDirection(struct snake_t* snake, const int32_t key) +{ + if (key == snake->controls.down) + snake->direction = DOWN; + else if (key == snake->controls.up) + snake->direction = UP; + else if (key == snake->controls.right) + snake->direction = RIGHT; + else if (key == snake->controls.left) + snake->direction = LEFT; +} + +/* + Движение хвоста с учетом движения головы + */ +void goTail(struct snake_t *head) +{ + char ch = '*'; + mvprintw(head->tail[head->tsize-1].y, head->tail[head->tsize-1].x, " "); + for(size_t i = head->tsize-1; i>0; i--) + { + head->tail[i] = head->tail[i-1]; + if( head->tail[i].y || head->tail[i].x) + mvprintw(head->tail[i].y, head->tail[i].x, "%c", ch); + } + head->tail[0].x = head->x; + head->tail[0].y = head->y; +} + +//======================================================================== +//Проверка того, является ли какое-то из зерен съеденным, +_Bool haveEat(struct snake_t *head, struct food f[]) +{ + //...нужно написать код...// + return 0; +} + +/* + Увеличение хвоста на 1 элемент + */ + +void addTail(struct snake_t *head) +{ + //...нужно написать код...// +} +//======================================================================== +int checkDirection(snake_t* snake, int32_t key) +{ + //...нужно написать код...// + return 1; + +} + +//Вынести тело цикла while из int main() в отдельную функцию update +//и посмотреть, как изменится профилирование +void update(struct snake_t *head, struct food f[], const int32_t key) +{ + clock_t begin = clock(); + go(head); + goTail(head); + if (checkDirection(head,key)) + { + changeDirection(head, key); + } + refreshFood(food, SEED_NUMBER);// Обновляем еду + if (haveEat(head,food)) + { + addTail(head); + } + refresh();//Обновление экрана, вывели кадр анимации + while ((double)(clock() - begin)/CLOCKS_PER_SECtsize; i++ ) + for( size_t j=0; jtail); + free(snakes[i]); + } + endwin(); // Завершаем режим curses mod + return 0; +} diff --git a/Lect6/15_controls.exe b/Lect6/15_controls.exe new file mode 100644 index 0000000..20cfcf5 Binary files /dev/null and b/Lect6/15_controls.exe differ diff --git a/Lect6/15_controls.o b/Lect6/15_controls.o new file mode 100644 index 0000000..c20e4d2 Binary files /dev/null and b/Lect6/15_controls.o differ diff --git a/Lect6/16-17_AI.c b/Lect6/16-17_AI.c new file mode 100644 index 0000000..b43a5fe --- /dev/null +++ b/Lect6/16-17_AI.c @@ -0,0 +1,337 @@ +#include +#include +#include +#include +#include +#include +#include + +#define MIN_Y 2 +double DELAY = 0.1; +#define PLAYERS 2 + +enum {LEFT=1, UP, RIGHT, DOWN, STOP_GAME=KEY_F(10)}; +enum {MAX_TAIL_SIZE=100, START_TAIL_SIZE=3, MAX_FOOD_SIZE=20, FOOD_EXPIRE_SECONDS=10,SEED_NUMBER=3,CONTROLS=2}; + + +// Здесь храним коды управления змейкой +struct control_buttons +{ + int down; + int up; + int left; + int right; +} control_buttons; + +struct control_buttons default_controls[CONTROLS] = {{KEY_DOWN, KEY_UP, KEY_LEFT, KEY_RIGHT}, + {'s', 'w', 'a', 'd'}}; + +/* + Голова змейки содержит в себе + x,y - координаты текущей позиции + direction - направление движения + tsize - размер хвоста + *tail - ссылка на хвост + */ +typedef struct snake_t +{ + int x; + int y; + int direction; + size_t tsize; + struct tail_t *tail; + struct control_buttons controls; +} snake_t; + +/* + Хвост это массив состоящий из координат x,y + */ +typedef struct tail_t +{ + int x; + int y; +} tail_t; +/* + Еда — это массив точек, состоящий из координат x,y, времени, + когда данная точка была установлена, и поля, сигнализирующего, + была ли данная точка съедена. + */ +struct food +{ + int x; + int y; + time_t put_time; + char point; + uint8_t enable; +} food[MAX_FOOD_SIZE]; + +void initFood(struct food f[], size_t size) +{ + struct food init = {0,0,0,0,0}; + for(size_t i=0; iy, fp->x, " "); + fp->x = rand() % (max_x - 1); + fp->y = rand() % (max_y - 2) + 1; //Не занимаем верхнюю строку + fp->put_time = time(NULL); + fp->point = '$'; + fp->enable = 1; + spoint[0] = fp->point; + mvprintw(fp->y, fp->x, "%s", spoint); +} + +/* + Разместить еду на поле + */ +void putFood(struct food f[], size_t number_seeds) +{ + for(size_t i=0; i FOOD_EXPIRE_SECONDS ) + { + putFoodSeed(&f[i]); + } + } + } +} +void initTail(struct tail_t t[], size_t size) +{ + struct tail_t init_t= {0,0}; + for(size_t i=0; ix = x; + head->y = y; + head->direction = RIGHT; +} +//======================================================================== +void initSnake(snake_t *head[], size_t size, int x, int y,int i) +{ + head[i] = (snake_t*)malloc(sizeof(snake_t)); +tail_t* tail = (tail_t*) malloc(MAX_TAIL_SIZE*sizeof(tail_t)); + initTail(tail, MAX_TAIL_SIZE); + initHead(head[i], x, y); + head[i]->tail = tail; // прикрепляем к голове хвост + head[i]->tsize = size+1; + head[i]->controls = default_controls[i]; + //~ head[i]->controls = default_controls[0]; +} + +/* + Движение головы с учетом текущего направления движения + */ +void go(struct snake_t *head) +{ + char ch = '@'; + int max_x=0, max_y=0; + getmaxyx(stdscr, max_y, max_x); // macro - размер терминала + mvprintw(head->y, head->x, " "); // очищаем один символ + switch (head->direction) + { + case LEFT: + if(head->x <= 0) // Циклическое движение, чтобы не + // уходить за пределы экрана + head->x = max_x; + mvprintw(head->y, --(head->x), "%c", ch); + break; + case RIGHT: + mvprintw(head->y, ++(head->x), "%c", ch); + break; + case UP: + mvprintw(--(head->y), head->x, "%c", ch); + break; + case DOWN: + mvprintw(++(head->y), head->x, "%c", ch); + break; + default: + break; + } + refresh(); +} + +void changeDirection(struct snake_t* snake, const int32_t key) +{ + if (key == snake->controls.down) + snake->direction = DOWN; + else if (key == snake->controls.up) + snake->direction = UP; + else if (key == snake->controls.right) + snake->direction = RIGHT; + else if (key == snake->controls.left) + snake->direction = LEFT; +} + +/* + Движение хвоста с учетом движения головы + */ +void goTail(struct snake_t *head) +{ + char ch = '*'; + mvprintw(head->tail[head->tsize-1].y, head->tail[head->tsize-1].x, " "); + for(size_t i = head->tsize-1; i>0; i--) + { + head->tail[i] = head->tail[i-1]; + if( head->tail[i].y || head->tail[i].x) + mvprintw(head->tail[i].y, head->tail[i].x, "%c", ch); + } + head->tail[0].x = head->x; + head->tail[0].y = head->y; +} + +//======================================================================== +//Проверка того, является ли какое-то из зерен съеденным, +_Bool haveEat(struct snake_t *head, struct food f[]) +{ + //...нужно написать код...// + return 0; +} + +/* + Увеличение хвоста на 1 элемент + */ + +void addTail(struct snake_t *head) +{ + //...нужно написать код...// +} +//======================================================================== +int checkDirection(snake_t* snake, int32_t key) +{ + //...нужно написать код...// + return 1; + +} + +//Вынести тело цикла while из int main() в отдельную функцию update +//и посмотреть, как изменится профилирование +void update(struct snake_t *head, struct food f[], const int32_t key) +{ + autoChangeDirection(head,f,SEED_NUMBER); + clock_t begin = clock(); + go(head); + goTail(head); + if (checkDirection(head,key)) + { + changeDirection(head, key); + } + refreshFood(food, SEED_NUMBER);// Обновляем еду + if (haveEat(head,food)) + { + addTail(head); + } + refresh();//Обновление экрана, вывели кадр анимации + while ((double)(clock() - begin)/CLOCKS_PER_SECtsize; i++ ) + for( size_t j=0; jdirection == RIGHT || snake->direction == LEFT) && + (snake->y != food[pointer].y)) { // горизонтальное движение + snake->direction = (food[pointer].y > snake->y) ? DOWN : UP; + } else if ((snake->direction == DOWN || snake->direction == UP) && + (snake->x != food[pointer].x)) { // вертикальное движение + snake->direction = (food[pointer].x > snake->x) ? RIGHT : LEFT; + } +} +//======================================================================== + + +int main() +{ +//======================================================================== +snake_t* snakes[PLAYERS]; + for (int i = 0; i < PLAYERS; i++) + initSnake(snakes,START_TAIL_SIZE,10+i*10,10+i*10,i); +//======================================================================== + + initscr(); + keypad(stdscr, TRUE); // Включаем F1, F2, стрелки и т.д. + raw(); // Откдючаем line buffering + noecho(); // Отключаем echo() режим при вызове getch + curs_set(FALSE); //Отключаем курсор + mvprintw(0, 0,"Use arrows for control. Press 'F10' for EXIT"); + timeout(0); //Отключаем таймаут после нажатия клавиши в цикле + initFood(food, MAX_FOOD_SIZE); + putFood(food, SEED_NUMBER);// Кладем зерна + int key_pressed=0; + while( key_pressed != STOP_GAME ) + { + key_pressed = getch(); // Считываем клавишу + for (int i = 0; i < PLAYERS; i++) + { + update(snakes[i], food, key_pressed); + if(isCrush(snakes[i])) + break;//!!!!!! + repairSeed(food, SEED_NUMBER, snakes[i]); + } + } + for (int i = 0; i < PLAYERS; i++) + { + //printExit(snakes[i]); + free(snakes[i]->tail); + free(snakes[i]); + } + endwin(); // Завершаем режим curses mod + return 0; +} diff --git a/Lect6/16-17_AI.exe b/Lect6/16-17_AI.exe new file mode 100644 index 0000000..7ae4172 Binary files /dev/null and b/Lect6/16-17_AI.exe differ diff --git a/Lect6/16-17_AI.o b/Lect6/16-17_AI.o new file mode 100644 index 0000000..9d2656a Binary files /dev/null and b/Lect6/16-17_AI.o differ diff --git a/Lect6/24.bat b/Lect6/24.bat new file mode 100644 index 0000000..73702eb --- /dev/null +++ b/Lect6/24.bat @@ -0,0 +1 @@ +gcc main.c -E -o main.i \ No newline at end of file diff --git a/Lect6/27.bat b/Lect6/27.bat new file mode 100644 index 0000000..05c01ea --- /dev/null +++ b/Lect6/27.bat @@ -0,0 +1 @@ +gcc main.i -S -o main.s \ No newline at end of file diff --git a/Lect6/31.bat b/Lect6/31.bat new file mode 100644 index 0000000..adba598 --- /dev/null +++ b/Lect6/31.bat @@ -0,0 +1,3 @@ +gcc -c main.s -o main.o +hexdump main.o +objdump -D main.o > main.asm \ No newline at end of file diff --git a/Lect6/32.bat b/Lect6/32.bat new file mode 100644 index 0000000..ac4a35f --- /dev/null +++ b/Lect6/32.bat @@ -0,0 +1 @@ +gcc -o program main.o \ No newline at end of file diff --git a/Lect6/44.c b/Lect6/44.c new file mode 100644 index 0000000..6df760e --- /dev/null +++ b/Lect6/44.c @@ -0,0 +1,19 @@ +#include +#include + +double pown (double d, unsigned n){ + double x = 1.0; + for (size_t j = 1; j <= n; j++) { + x *= d; + } + return x; +} +int main (void) { + double sum = 0.0; + + for (size_t i = 1; i <= 0xfffffff; i++) { + sum += pown (i, i % 5); + } + printf ("sum = %g\n", sum); + return 0; +} diff --git a/Lect6/44.txt b/Lect6/44.txt new file mode 100644 index 0000000..56504d3 --- /dev/null +++ b/Lect6/44.txt @@ -0,0 +1,11 @@ +gcc -O0 main.c -lm +time ./a.out + +gcc -O1 main.c -lm +time ./a.out + +gcc -O2 main.c -lm +time ./a.out + +gcc -O3 main.c -lm +time ./a.out diff --git a/Lect6/46/O0.bat b/Lect6/46/O0.bat new file mode 100644 index 0000000..e76b9ca --- /dev/null +++ b/Lect6/46/O0.bat @@ -0,0 +1 @@ +gcc -O0 main.c \ No newline at end of file diff --git a/Lect6/46/O1.bat b/Lect6/46/O1.bat new file mode 100644 index 0000000..e1f1ba5 --- /dev/null +++ b/Lect6/46/O1.bat @@ -0,0 +1 @@ +gcc -O1 main.c \ No newline at end of file diff --git a/Lect6/46/O2.bat b/Lect6/46/O2.bat new file mode 100644 index 0000000..b3d2f4a --- /dev/null +++ b/Lect6/46/O2.bat @@ -0,0 +1 @@ +gcc -O2 main.c \ No newline at end of file diff --git a/Lect6/46/O3.bat b/Lect6/46/O3.bat new file mode 100644 index 0000000..8cec226 --- /dev/null +++ b/Lect6/46/O3.bat @@ -0,0 +1 @@ +gcc -O3 main.c \ No newline at end of file diff --git a/Lect6/46/a.exe b/Lect6/46/a.exe new file mode 100644 index 0000000..a185f4d Binary files /dev/null and b/Lect6/46/a.exe differ diff --git a/Lect6/46/main.c b/Lect6/46/main.c new file mode 100644 index 0000000..eac49fa --- /dev/null +++ b/Lect6/46/main.c @@ -0,0 +1,20 @@ +#include +#include + +double pown (double d, unsigned n){ + double x = 1.0; + + for (size_t j = 1; j <= n; j++) { + x *= d; + } + return x; +} + +int main (void) { + double sum = 0.0; + for (size_t i = 1; i <= 0xfffffff; i++) { + sum += pown (i, i % 5); + } + printf ("sum = %g\n", sum); + return 0; +} diff --git a/Lect6/46/timecmd.bat b/Lect6/46/timecmd.bat new file mode 100644 index 0000000..0d7b2ca --- /dev/null +++ b/Lect6/46/timecmd.bat @@ -0,0 +1,21 @@ +@echo off +@setlocal +set start=%time% +:: Runs your command +cmd /c %* +set end=%time% +set options="tokens=1-4 delims=:.," +for /f %options% %%a in ("%start%") do set start_h=%%a&set /a start_m=100%%b %% 100&set /a start_s=100%%c %% 100&set /a start_ms=100%%d %% 100 +for /f %options% %%a in ("%end%") do set end_h=%%a&set /a end_m=100%%b %% 100&set /a end_s=100%%c %% 100&set /a end_ms=100%%d %% 100 +set /a hours=%end_h%-%start_h% +set /a mins=%end_m%-%start_m% +set /a secs=%end_s%-%start_s% +set /a ms=%end_ms%-%start_ms% +if %ms% lss 0 set /a secs = %secs% - 1 & set /a ms = 100%ms% +if %secs% lss 0 set /a mins = %mins% - 1 & set /a secs = 60%secs% +if %mins% lss 0 set /a hours = %hours% - 1 & set /a mins = 60%mins% +if %hours% lss 0 set /a hours = 24%hours% +if 1%ms% lss 100 set ms=0%ms% +:: Mission accomplished +set /a totalsecs = %hours%*3600 + %mins%*60 + %secs% +echo command took %hours%:%mins%:%secs%.%ms% (%totalsecs%.%ms%s total) \ No newline at end of file diff --git a/Lect6/54-63/55.bat b/Lect6/54-63/55.bat new file mode 100644 index 0000000..3e85b41 --- /dev/null +++ b/Lect6/54-63/55.bat @@ -0,0 +1,3 @@ +gcc -c -o main.o main.c +gcc -c -o function.o function.c +gcc -o prog function.o main.o \ No newline at end of file diff --git a/Lect6/54-63/56.s b/Lect6/54-63/56.s new file mode 100644 index 0000000..a5b1311 --- /dev/null +++ b/Lect6/54-63/56.s @@ -0,0 +1,72 @@ + +function.o: file format pe-x86-64 + + +Disassembly of section .text: + +0000000000000000 : + 0: 55 push %rbp + 1: 48 89 e5 mov %rsp,%rbp + 4: 48 83 ec 20 sub $0x20,%rsp + 8: 89 4d 10 mov %ecx,0x10(%rbp) + b: 83 7d 10 00 cmpl $0x0,0x10(%rbp) + f: 75 07 jne 18 + 11: b8 01 00 00 00 mov $0x1,%eax + 16: eb 11 jmp 29 + 18: 8b 45 10 mov 0x10(%rbp),%eax + 1b: 83 e8 01 sub $0x1,%eax + 1e: 89 c1 mov %eax,%ecx + 20: e8 db ff ff ff call 0 + 25: 0f af 45 10 imul 0x10(%rbp),%eax + 29: 48 83 c4 20 add $0x20,%rsp + 2d: 5d pop %rbp + 2e: c3 ret + 2f: 90 nop + +Disassembly of section .xdata: + +0000000000000000 <.xdata>: + 0: 01 08 add %ecx,(%rax) + 2: 03 05 08 32 04 03 add 0x3043208(%rip),%eax # 3043210 <.xdata+0x3043210> + 8: 01 50 00 add %edx,0x0(%rax) + ... + +Disassembly of section .pdata: + +0000000000000000 <.pdata>: + 0: 00 00 add %al,(%rax) + 2: 00 00 add %al,(%rax) + 4: 2f (bad) + 5: 00 00 add %al,(%rax) + 7: 00 00 add %al,(%rax) + 9: 00 00 add %al,(%rax) + ... + +Disassembly of section .rdata$zzz: + +0000000000000000 <.rdata$zzz>: + 0: 47 rex.RXB + 1: 43 rex.XB + 2: 43 3a 20 rex.XB cmp (%r8),%spl + 5: 28 52 65 sub %dl,0x65(%rdx) + 8: 76 32 jbe 3c <.rdata$zzz+0x3c> + a: 2c 20 sub $0x20,%al + c: 42 75 69 rex.X jne 78 <.rdata$zzz+0x78> + f: 6c insb (%dx),%es:(%rdi) + 10: 74 20 je 32 <.rdata$zzz+0x32> + 12: 62 (bad) + 13: 79 20 jns 35 <.rdata$zzz+0x35> + 15: 4d 53 rex.WRB push %r11 + 17: 59 pop %rcx + 18: 53 push %rbx + 19: 32 20 xor (%rax),%ah + 1b: 70 72 jo 8f <.rdata$zzz+0x8f> + 1d: 6f outsl %ds:(%rsi),(%dx) + 1e: 6a 65 push $0x65 + 20: 63 74 29 20 movsxd 0x20(%rcx,%rbp,1),%esi + 24: 31 33 xor %esi,(%rbx) + 26: 2e 32 2e cs xor (%rsi),%ch + 29: 30 00 xor %al,(%rax) + 2b: 00 00 add %al,(%rax) + 2d: 00 00 add %al,(%rax) + ... diff --git a/Lect6/54-63/56_dump.bat b/Lect6/54-63/56_dump.bat new file mode 100644 index 0000000..232e776 --- /dev/null +++ b/Lect6/54-63/56_dump.bat @@ -0,0 +1 @@ +objdump -D function.o > 56.s \ No newline at end of file diff --git a/Lect6/54-63/57.bat b/Lect6/54-63/57.bat new file mode 100644 index 0000000..a21ab75 --- /dev/null +++ b/Lect6/54-63/57.bat @@ -0,0 +1,2 @@ +gcc -c -o function.o function.c -O2 +objdump -D function.o > 57.s diff --git a/Lect6/54-63/57.s b/Lect6/54-63/57.s new file mode 100644 index 0000000..f6e0856 --- /dev/null +++ b/Lect6/54-63/57.s @@ -0,0 +1,67 @@ + +function.o: file format pe-x86-64 + + +Disassembly of section .text: + +0000000000000000 : + 0: b8 01 00 00 00 mov $0x1,%eax + 5: 85 c9 test %ecx,%ecx + 7: 74 0f je 18 + 9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 10: 0f af c1 imul %ecx,%eax + 13: 83 e9 01 sub $0x1,%ecx + 16: 75 f8 jne 10 + 18: c3 ret + 19: 90 nop + 1a: 90 nop + 1b: 90 nop + 1c: 90 nop + 1d: 90 nop + 1e: 90 nop + 1f: 90 nop + +Disassembly of section .xdata: + +0000000000000000 <.xdata>: + 0: 01 00 add %eax,(%rax) + ... + +Disassembly of section .pdata: + +0000000000000000 <.pdata>: + 0: 00 00 add %al,(%rax) + 2: 00 00 add %al,(%rax) + 4: 19 00 sbb %eax,(%rax) + 6: 00 00 add %al,(%rax) + 8: 00 00 add %al,(%rax) + ... + +Disassembly of section .rdata$zzz: + +0000000000000000 <.rdata$zzz>: + 0: 47 rex.RXB + 1: 43 rex.XB + 2: 43 3a 20 rex.XB cmp (%r8),%spl + 5: 28 52 65 sub %dl,0x65(%rdx) + 8: 76 32 jbe 3c <.rdata$zzz+0x3c> + a: 2c 20 sub $0x20,%al + c: 42 75 69 rex.X jne 78 <.rdata$zzz+0x78> + f: 6c insb (%dx),%es:(%rdi) + 10: 74 20 je 32 <.rdata$zzz+0x32> + 12: 62 (bad) + 13: 79 20 jns 35 <.rdata$zzz+0x35> + 15: 4d 53 rex.WRB push %r11 + 17: 59 pop %rcx + 18: 53 push %rbx + 19: 32 20 xor (%rax),%ah + 1b: 70 72 jo 8f <.rdata$zzz+0x8f> + 1d: 6f outsl %ds:(%rsi),(%dx) + 1e: 6a 65 push $0x65 + 20: 63 74 29 20 movsxd 0x20(%rcx,%rbp,1),%esi + 24: 31 33 xor %esi,(%rbx) + 26: 2e 32 2e cs xor (%rsi),%ch + 29: 30 00 xor %al,(%rax) + 2b: 00 00 add %al,(%rax) + 2d: 00 00 add %al,(%rax) + ... diff --git a/Lect6/54-63/58.s b/Lect6/54-63/58.s new file mode 100644 index 0000000..a121125 --- /dev/null +++ b/Lect6/54-63/58.s @@ -0,0 +1,74 @@ + +function.o: file format pe-x86-64 + + +Disassembly of section .text: + +0000000000000000 : + 0: b8 01 00 00 00 mov $0x1,%eax + 5: 85 c9 test %ecx,%ecx + 7: 74 07 je 10 + 9: 0f af c1 imul %ecx,%eax + c: ff c9 dec %ecx + e: eb f5 jmp 5 + 10: c3 ret + 11: 90 nop + 12: 90 nop + 13: 90 nop + 14: 90 nop + 15: 90 nop + 16: 90 nop + 17: 90 nop + 18: 90 nop + 19: 90 nop + 1a: 90 nop + 1b: 90 nop + 1c: 90 nop + 1d: 90 nop + 1e: 90 nop + 1f: 90 nop + +Disassembly of section .xdata: + +0000000000000000 <.xdata>: + 0: 01 00 add %eax,(%rax) + ... + +Disassembly of section .pdata: + +0000000000000000 <.pdata>: + 0: 00 00 add %al,(%rax) + 2: 00 00 add %al,(%rax) + 4: 11 00 adc %eax,(%rax) + 6: 00 00 add %al,(%rax) + 8: 00 00 add %al,(%rax) + ... + +Disassembly of section .rdata$zzz: + +0000000000000000 <.rdata$zzz>: + 0: 47 rex.RXB + 1: 43 rex.XB + 2: 43 3a 20 rex.XB cmp (%r8),%spl + 5: 28 52 65 sub %dl,0x65(%rdx) + 8: 76 32 jbe 3c <.rdata$zzz+0x3c> + a: 2c 20 sub $0x20,%al + c: 42 75 69 rex.X jne 78 <.rdata$zzz+0x78> + f: 6c insb (%dx),%es:(%rdi) + 10: 74 20 je 32 <.rdata$zzz+0x32> + 12: 62 (bad) + 13: 79 20 jns 35 <.rdata$zzz+0x35> + 15: 4d 53 rex.WRB push %r11 + 17: 59 pop %rcx + 18: 53 push %rbx + 19: 32 20 xor (%rax),%ah + 1b: 70 72 jo 8f <.rdata$zzz+0x8f> + 1d: 6f outsl %ds:(%rsi),(%dx) + 1e: 6a 65 push $0x65 + 20: 63 74 29 20 movsxd 0x20(%rcx,%rbp,1),%esi + 24: 31 33 xor %esi,(%rbx) + 26: 2e 32 2e cs xor (%rsi),%ch + 29: 30 00 xor %al,(%rax) + 2b: 00 00 add %al,(%rax) + 2d: 00 00 add %al,(%rax) + ... diff --git a/Lect6/54-63/59.bat b/Lect6/54-63/59.bat new file mode 100644 index 0000000..b7895fb --- /dev/null +++ b/Lect6/54-63/59.bat @@ -0,0 +1,3 @@ +gcc -c -o function.o function.c -Os +objdump -D function.o > 59.s + diff --git a/Lect6/54-63/59.s b/Lect6/54-63/59.s new file mode 100644 index 0000000..a121125 --- /dev/null +++ b/Lect6/54-63/59.s @@ -0,0 +1,74 @@ + +function.o: file format pe-x86-64 + + +Disassembly of section .text: + +0000000000000000 : + 0: b8 01 00 00 00 mov $0x1,%eax + 5: 85 c9 test %ecx,%ecx + 7: 74 07 je 10 + 9: 0f af c1 imul %ecx,%eax + c: ff c9 dec %ecx + e: eb f5 jmp 5 + 10: c3 ret + 11: 90 nop + 12: 90 nop + 13: 90 nop + 14: 90 nop + 15: 90 nop + 16: 90 nop + 17: 90 nop + 18: 90 nop + 19: 90 nop + 1a: 90 nop + 1b: 90 nop + 1c: 90 nop + 1d: 90 nop + 1e: 90 nop + 1f: 90 nop + +Disassembly of section .xdata: + +0000000000000000 <.xdata>: + 0: 01 00 add %eax,(%rax) + ... + +Disassembly of section .pdata: + +0000000000000000 <.pdata>: + 0: 00 00 add %al,(%rax) + 2: 00 00 add %al,(%rax) + 4: 11 00 adc %eax,(%rax) + 6: 00 00 add %al,(%rax) + 8: 00 00 add %al,(%rax) + ... + +Disassembly of section .rdata$zzz: + +0000000000000000 <.rdata$zzz>: + 0: 47 rex.RXB + 1: 43 rex.XB + 2: 43 3a 20 rex.XB cmp (%r8),%spl + 5: 28 52 65 sub %dl,0x65(%rdx) + 8: 76 32 jbe 3c <.rdata$zzz+0x3c> + a: 2c 20 sub $0x20,%al + c: 42 75 69 rex.X jne 78 <.rdata$zzz+0x78> + f: 6c insb (%dx),%es:(%rdi) + 10: 74 20 je 32 <.rdata$zzz+0x32> + 12: 62 (bad) + 13: 79 20 jns 35 <.rdata$zzz+0x35> + 15: 4d 53 rex.WRB push %r11 + 17: 59 pop %rcx + 18: 53 push %rbx + 19: 32 20 xor (%rax),%ah + 1b: 70 72 jo 8f <.rdata$zzz+0x8f> + 1d: 6f outsl %ds:(%rsi),(%dx) + 1e: 6a 65 push $0x65 + 20: 63 74 29 20 movsxd 0x20(%rcx,%rbp,1),%esi + 24: 31 33 xor %esi,(%rbx) + 26: 2e 32 2e cs xor (%rsi),%ch + 29: 30 00 xor %al,(%rax) + 2b: 00 00 add %al,(%rax) + 2d: 00 00 add %al,(%rax) + ... diff --git a/Lect6/54-63/62.bat b/Lect6/54-63/62.bat new file mode 100644 index 0000000..f2e5e15 --- /dev/null +++ b/Lect6/54-63/62.bat @@ -0,0 +1 @@ +file prog.exe \ No newline at end of file diff --git a/Lect6/54-63/63.bat b/Lect6/54-63/63.bat new file mode 100644 index 0000000..a40f23a --- /dev/null +++ b/Lect6/54-63/63.bat @@ -0,0 +1 @@ +nm prog.exe > 63.txt \ No newline at end of file diff --git a/Lect6/54-63/63.txt b/Lect6/54-63/63.txt new file mode 100644 index 0000000..eef7610 --- /dev/null +++ b/Lect6/54-63/63.txt @@ -0,0 +1,1185 @@ +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007080 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007140 b .bss +00000001400070e0 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007140 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007080 b .bss +0000000140007080 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007080 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007070 b .bss +0000000140007150 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007000 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007150 b .bss +0000000140007180 b .bss +00000001400070b0 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +00000001400070a0 b .bss +0000000140007170 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007060 b .bss +0000000140007150 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007030 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007170 b .bss +0000000140007170 b .bss +0000000140007180 b .bss +0000000140007050 b .bss +0000000140007030 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007090 b .bss +0000000140007170 b .bss +0000000140007030 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007050 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007050 b .bss +0000000140007030 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140007170 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +00000001400070c0 b .bss +0000000140007180 b .bss +0000000140007170 b .bss +0000000140007180 b .bss +0000000140007040 b .bss +0000000140007180 b .bss +0000000140007180 b .bss +0000000140009000 d .CRT$XCA +0000000140009008 d .CRT$XCAA +0000000140009010 d .CRT$XCZ +0000000140009050 d .CRT$XDA +0000000140009058 d .CRT$XDZ +0000000140009018 d .CRT$XIA +0000000140009020 d .CRT$XIAA +0000000140009028 d .CRT$XIZ +0000000140009030 d .CRT$XLA +0000000140009038 d .CRT$XLC +0000000140009040 d .CRT$XLD +0000000140009048 d .CRT$XLZ +0000000140002a68 t .ctors.65535 +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003030 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003000 d .data +0000000140003120 d .data +0000000140003030 d .data +0000000140003050 d .data +0000000140003120 d .data +0000000140003080 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003030 d .data +0000000140003000 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003040 d .data +0000000140003120 d .data +0000000140003000 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003030 d .data +0000000140003120 d .data +0000000140003040 d .data +0000000140003030 d .data +0000000140003120 d .data +0000000140003090 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003000 d .data +0000000140003120 d .data +0000000140003020 d .data +0000000140003120 d .data +0000000140003070 d .data +0000000140003060 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003040 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003000 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003030 d .data +0000000140003120 d .data +0000000140003040 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003030 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003030 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003030 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003030 d .data +0000000140003040 d .data +0000000140003030 d .data +00000001400030a0 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003120 d .data +0000000140003030 d .data +0000000140003120 d .data +0000000140003030 d .data +0000000140003030 d .data +0000000140003120 d .data +0000000140003010 d .data +0000000140003120 d .data +0000000140003120 d .data +000000014001ab88 N .debug_abbrev +000000014001bf0a N .debug_abbrev +000000014001b0cd N .debug_abbrev +000000014001b379 N .debug_abbrev +000000014001b5da N .debug_abbrev +000000014001afbb N .debug_abbrev +000000014001a000 N .debug_abbrev +000000014001aa83 N .debug_abbrev +000000014001b608 N .debug_abbrev +000000014001be62 N .debug_abbrev +000000014001abb5 N .debug_abbrev +000000014001bd00 N .debug_abbrev +000000014001bb94 N .debug_abbrev +000000014001aa22 N .debug_abbrev +000000014001a582 N .debug_abbrev +000000014001a9f4 N .debug_abbrev +000000014001b638 N .debug_abbrev +000000014001ba28 N .debug_abbrev +000000014001a6c1 N .debug_abbrev +000000014001b0fb N .debug_abbrev +000000014001a80d N .debug_abbrev +000000014001abe3 N .debug_abbrev +000000014001a7df N .debug_abbrev +000000014001a777 N .debug_abbrev +000000014001b8c2 N .debug_abbrev +000000014001a7a5 N .debug_abbrev +000000014001b8f0 N .debug_abbrev +000000014000d0a0 N .debug_aranges +000000014000d080 N .debug_aranges +000000014000d330 N .debug_aranges +000000014000d0d0 N .debug_aranges +000000014000d060 N .debug_aranges +000000014000d1e0 N .debug_aranges +000000014000d260 N .debug_aranges +000000014000d430 N .debug_aranges +000000014000d0f0 N .debug_aranges +000000014000d300 N .debug_aranges +000000014000d380 N .debug_aranges +000000014000d030 N .debug_aranges +000000014000d120 N .debug_aranges +000000014000d140 N .debug_aranges +000000014000d3b0 N .debug_aranges +000000014000d1c0 N .debug_aranges +000000014000d3e0 N .debug_aranges +000000014000d000 N .debug_aranges +000000014000d2e0 N .debug_aranges +000000014000d160 N .debug_aranges +000000014000d240 N .debug_aranges +000000014000d2c0 N .debug_aranges +000000014000d290 N .debug_aranges +000000014000d210 N .debug_aranges +000000014000d410 N .debug_aranges +000000014000d190 N .debug_aranges +000000014000d350 N .debug_aranges +000000014001f418 N .debug_frame +000000014001f2b0 N .debug_frame +000000014001f808 N .debug_frame +000000014001f308 N .debug_frame +000000014001f208 N .debug_frame +000000014001f5e0 N .debug_frame +000000014001f468 N .debug_frame +000000014001f7d0 N .debug_frame +000000014001f000 N .debug_frame +000000014001f1d8 N .debug_frame +000000014001f788 N .debug_frame +000000014001f4b8 N .debug_frame +000000014001f708 N .debug_frame +000000014001f338 N .debug_frame +000000014001f740 N .debug_frame +000000014001f150 N .debug_frame +000000014001739f N .debug_info +0000000140013e85 N .debug_info +0000000140010cf8 N .debug_info +00000001400112fa N .debug_info +0000000140010697 N .debug_info +0000000140017753 N .debug_info +0000000140011387 N .debug_info +0000000140017b06 N .debug_info +0000000140011508 N .debug_info +0000000140013b08 N .debug_info +0000000140016f64 N .debug_info +00000001400123bd N .debug_info +0000000140011592 N .debug_info +0000000140017ea8 N .debug_info +0000000140013dfd N .debug_info +0000000140015a92 N .debug_info +0000000140011d59 N .debug_info +000000014001232b N .debug_info +0000000140011de3 N .debug_info +000000014000e000 N .debug_info +00000001400159c2 N .debug_info +0000000140011f5e N .debug_info +0000000140014e66 N .debug_info +0000000140015939 N .debug_info +000000014001844a N .debug_info +0000000140017002 N .debug_info +0000000140012294 N .debug_info +000000014001e14f N .debug_line +000000014001d5f0 N .debug_line +000000014001ec41 N .debug_line +000000014001d8c8 N .debug_line +000000014001d5b6 N .debug_line +000000014001e9c0 N .debug_line +000000014001e986 N .debug_line +000000014001d646 N .debug_line +000000014001d560 N .debug_line +000000014001d95a N .debug_line +000000014001e3c7 N .debug_line +000000014001d680 N .debug_line +000000014001d80a N .debug_line +000000014001ebe6 N .debug_line +000000014001ea32 N .debug_line +000000014001deda N .debug_line +000000014001e43b N .debug_line +000000014001d439 N .debug_line +000000014001d000 N .debug_line +000000014001e401 N .debug_line +000000014001dfc2 N .debug_line +000000014001df88 N .debug_line +000000014001eac7 N .debug_line +000000014001d920 N .debug_line +000000014001d7d0 N .debug_line +000000014001d796 N .debug_line +000000014001eb5c N .debug_line +00000001400213bc N .debug_line_str +0000000140021be5 N .debug_line_str +0000000140021684 N .debug_line_str +000000014002244e N .debug_line_str +000000014002236c N .debug_line_str +0000000140021723 N .debug_line_str +0000000140021000 N .debug_line_str +0000000140021f56 N .debug_line_str +0000000140022650 N .debug_line_str +000000014002191e N .debug_line_str +00000001400219cc N .debug_line_str +000000014002145b N .debug_line_str +0000000140021596 N .debug_line_str +0000000140021b1b N .debug_line_str +00000001400220f5 N .debug_line_str +000000014002228d N .debug_line_str +0000000140022010 N .debug_line_str +0000000140021c84 N .debug_line_str +00000001400211c6 N .debug_line_str +0000000140021eba N .debug_line_str +00000001400221a5 N .debug_line_str +000000014002187f N .debug_line_str +00000001400217c2 N .debug_line_str +0000000140022533 N .debug_line_str +00000001400212ae N .debug_line_str +00000001400214f7 N .debug_line_str +0000000140021d95 N .debug_line_str +00000001400242ad N .debug_loclists +000000014002420d N .debug_loclists +00000001400231fd N .debug_loclists +000000014002339f N .debug_loclists +0000000140023314 N .debug_loclists +0000000140023af2 N .debug_loclists +0000000140023000 N .debug_loclists +0000000140023921 N .debug_loclists +0000000140023dbd N .debug_loclists +00000001400231c8 N .debug_loclists +0000000140023993 N .debug_loclists +00000001400241b5 N .debug_loclists +0000000140024267 N .debug_loclists +000000014002423a N .debug_loclists +0000000140025000 N .debug_rnglists +000000014002505c N .debug_rnglists +00000001400250ca N .debug_rnglists +00000001400250b3 N .debug_rnglists +00000001400202c3 N .debug_str +000000014002026f N .debug_str +0000000140020000 N .debug_str +000000014002025f N .debug_str +0000000140020237 N .debug_str +0000000140020256 N .debug_str +000000014002021f N .debug_str +000000014000803c i .idata$2 +0000000140008050 i .idata$2 +0000000140008078 i .idata$2 +0000000140008028 i .idata$2 +000000014000808c i .idata$2 +0000000140008064 i .idata$2 +0000000140008014 i .idata$2 +0000000140008000 i .idata$2 +00000001400080a0 i .idata$2 +0000000140008218 i .idata$4 +0000000140008110 i .idata$4 +0000000140008270 i .idata$4 +0000000140008290 i .idata$4 +0000000140008260 i .idata$4 +0000000140008100 i .idata$4 +0000000140008158 i .idata$4 +00000001400081b0 i .idata$4 +0000000140008108 i .idata$4 +00000001400080d0 i .idata$4 +0000000140008138 i .idata$4 +00000001400081b8 i .idata$4 +00000001400080e8 i .idata$4 +0000000140008128 i .idata$4 +0000000140008180 i .idata$4 +0000000140008230 i .idata$4 +00000001400081c0 i .idata$4 +00000001400080c8 i .idata$4 +00000001400081c8 i .idata$4 +0000000140008198 i .idata$4 +0000000140008288 i .idata$4 +0000000140008170 i .idata$4 +0000000140008228 i .idata$4 +0000000140008160 i .idata$4 +00000001400080f8 i .idata$4 +0000000140008238 i .idata$4 +0000000140008120 i .idata$4 +0000000140008248 i .idata$4 +0000000140008130 i .idata$4 +0000000140008220 i .idata$4 +0000000140008138 i .idata$4 +0000000140008258 i .idata$4 +0000000140008120 i .idata$4 +0000000140008250 i .idata$4 +00000001400081a0 i .idata$4 +0000000140008218 i .idata$4 +0000000140008160 i .idata$4 +0000000140008268 i .idata$4 +0000000140008258 i .idata$4 +0000000140008188 i .idata$4 +0000000140008140 i .idata$4 +0000000140008118 i .idata$4 +0000000140008280 i .idata$4 +0000000140008150 i .idata$4 +00000001400081d8 i .idata$4 +0000000140008170 i .idata$4 +0000000140008278 i .idata$4 +00000001400081e0 i .idata$4 +0000000140008190 i .idata$4 +00000001400081e8 i .idata$4 +0000000140008270 i .idata$4 +00000001400081f0 i .idata$4 +00000001400081f8 i .idata$4 +0000000140008200 i .idata$4 +0000000140008148 i .idata$4 +0000000140008178 i .idata$4 +0000000140008208 i .idata$4 +00000001400080f0 i .idata$4 +00000001400081d0 i .idata$4 +0000000140008188 i .idata$4 +00000001400080e0 i .idata$4 +00000001400080c8 i .idata$4 +00000001400080d8 i .idata$4 +0000000140008168 i .idata$4 +0000000140008210 i .idata$4 +00000001400081a8 i .idata$4 +0000000140008240 i .idata$4 +00000001400082b8 i .idata$5 +0000000140008398 i .idata$5 +00000001400083a0 i .idata$5 +0000000140008340 i .idata$5 +0000000140008318 i .idata$5 +0000000140008298 i .idata$5 +0000000140008390 i .idata$5 +0000000140008340 i .idata$5 +0000000140008388 i .idata$5 +0000000140008440 i .idata$5 +00000001400082a0 i .idata$5 +0000000140008350 i .idata$5 +00000001400083e0 i .idata$5 +0000000140008380 i .idata$5 +0000000140008358 i .idata$5 +00000001400082e8 i .idata$5 +0000000140008448 i .idata$5 +0000000140008378 i .idata$5 +00000001400082a8 i .idata$5 +0000000140008370 i .idata$5 +0000000140008348 i .idata$5 +0000000140008320 i .idata$5 +00000001400083a8 i .idata$5 +0000000140008450 i .idata$5 +0000000140008368 i .idata$5 +00000001400082b0 i .idata$5 +0000000140008360 i .idata$5 +00000001400083d8 i .idata$5 +0000000140008330 i .idata$5 +0000000140008358 i .idata$5 +0000000140008458 i .idata$5 +0000000140008308 i .idata$5 +0000000140008420 i .idata$5 +0000000140008310 i .idata$5 +00000001400083e8 i .idata$5 +00000001400083b0 i .idata$5 +00000001400082c0 i .idata$5 +0000000140008418 i .idata$5 +0000000140008328 i .idata$5 +0000000140008330 i .idata$5 +0000000140008440 i .idata$5 +00000001400083d0 i .idata$5 +00000001400082c8 i .idata$5 +0000000140008410 i .idata$5 +00000001400083b8 i .idata$5 +0000000140008460 i .idata$5 +0000000140008408 i .idata$5 +0000000140008298 i .idata$5 +00000001400082f0 i .idata$5 +00000001400082d0 i .idata$5 +0000000140008400 i .idata$5 +0000000140008428 i .idata$5 +00000001400083f8 i .idata$5 +00000001400082d8 i .idata$5 +0000000140008338 i .idata$5 +00000001400083f0 i .idata$5 +00000001400083c0 i .idata$5 +00000001400083e8 i .idata$5 +0000000140008430 i .idata$5 +00000001400082e0 i .idata$5 +0000000140008438 i .idata$5 +00000001400082f8 i .idata$5 +0000000140008308 i .idata$5 +0000000140008428 i .idata$5 +0000000140008300 i .idata$5 +00000001400082f0 i .idata$5 +00000001400083c8 i .idata$5 +0000000140008542 i .idata$6 +000000014000863e i .idata$6 +0000000140008468 i .idata$6 +0000000140008630 i .idata$6 +00000001400086a4 i .idata$6 +0000000140008592 i .idata$6 +0000000140008774 i .idata$6 +0000000140008646 i .idata$6 +000000014000861a i .idata$6 +000000014000856c i .idata$6 +0000000140008522 i .idata$6 +0000000140008480 i .idata$6 +000000014000877e i .idata$6 +0000000140008602 i .idata$6 +00000001400086e0 i .idata$6 +00000001400085e8 i .idata$6 +00000001400086c6 i .idata$6 +0000000140008498 i .idata$6 +000000014000878c i .idata$6 +00000001400085de i .idata$6 +0000000140008562 i .idata$6 +00000001400086f2 i .idata$6 +0000000140008552 i .idata$6 +000000014000876a i .idata$6 +0000000140008510 i .idata$6 +00000001400085d0 i .idata$6 +00000001400085aa i .idata$6 +0000000140008668 i .idata$6 +0000000140008702 i .idata$6 +0000000140008574 i .idata$6 +00000001400084a8 i .idata$6 +000000014000879a i .idata$6 +00000001400085c2 i .idata$6 +00000001400086d6 i .idata$6 +0000000140008532 i .idata$6 +00000001400085b4 i .idata$6 +0000000140008502 i .idata$6 +0000000140008694 i .idata$6 +00000001400084c4 i .idata$6 +00000001400087a6 i .idata$6 +0000000140008710 i .idata$6 +000000014000857e i .idata$6 +000000014000872a i .idata$6 +00000001400084dc i .idata$6 +00000001400086ce i .idata$6 +0000000140008760 i .idata$6 +0000000140008688 i .idata$6 +00000001400084fa i .idata$6 +0000000140008744 i .idata$6 +00000001400087b8 i .idata$7 +0000000140008828 i .idata$7 +00000001400087e8 i .idata$7 +0000000140008914 i .idata$7 +0000000140008918 i .idata$7 +00000001400088bc i .idata$7 +00000001400087c4 i .idata$7 +00000001400087c8 i .idata$7 +0000000140008818 i .idata$7 +00000001400088b8 i .idata$7 +00000001400088c8 i .idata$7 +00000001400088d8 i .idata$7 +00000001400088d4 i .idata$7 +00000001400088c4 i .idata$7 +0000000140008820 i .idata$7 +000000014000881c i .idata$7 +00000001400088d0 i .idata$7 +00000001400087f0 i .idata$7 +00000001400087c0 i .idata$7 +0000000140008978 i .idata$7 +0000000140008910 i .idata$7 +000000014000891c i .idata$7 +000000014000886c i .idata$7 +00000001400088b4 i .idata$7 +0000000140008824 i .idata$7 +0000000140008898 i .idata$7 +0000000140008974 i .idata$7 +0000000140008944 i .idata$7 +00000001400087b0 i .idata$7 +00000001400087d4 i .idata$7 +0000000140008968 i .idata$7 +00000001400088b0 i .idata$7 +000000014000889c i .idata$7 +000000014000893c i .idata$7 +00000001400087bc i .idata$7 +000000014000890c i .idata$7 +0000000140008848 i .idata$7 +00000001400087cc i .idata$7 +0000000140008900 i .idata$7 +00000001400088a0 i .idata$7 +00000001400088dc i .idata$7 +00000001400088cc i .idata$7 +0000000140008908 i .idata$7 +00000001400087d8 i .idata$7 +0000000140008874 i .idata$7 +0000000140008970 i .idata$7 +00000001400088a4 i .idata$7 +0000000140008940 i .idata$7 +00000001400087d0 i .idata$7 +00000001400087ec i .idata$7 +0000000140008904 i .idata$7 +00000001400087b4 i .idata$7 +00000001400088c0 i .idata$7 +00000001400088a8 i .idata$7 +0000000140008870 i .idata$7 +000000014000896c i .idata$7 +000000014000884c i .idata$7 +00000001400088ac i .idata$7 +0000000140001407 t .l_end +00000001400013e7 t .l_endw +00000001400013f4 t .l_start +00000001400013d4 t .l_startw +00000001400050a8 p .pdata +0000000140005000 p .pdata +00000001400051ec p .pdata +0000000140005114 p .pdata +00000001400050b4 p .pdata +0000000140005054 p .pdata +000000014000512c p .pdata +0000000140005168 p .pdata +00000001400051f8 p .pdata +00000001400051d4 p .pdata +00000001400050f0 p .pdata +0000000140005078 p .pdata +0000000140005084 p .pdata +0000000140005138 p .pdata +000000014000506c p .pdata +0000000140005204 p .pdata +00000001400050e4 p .pdata +00000001400050d8 p .pdata +00000001400051e0 p .pdata +0000000140005270 p .pdata.startup +0000000140004350 r .rdata +0000000140004020 r .rdata +0000000140004080 r .rdata +0000000140004320 r .rdata +0000000140004000 r .rdata +00000001400041c0 r .rdata +0000000140004390 r .rdata$.refptr.__CTOR_LIST__ +00000001400043d0 r .rdata$.refptr.__dyn_tls_init_callback +00000001400043a0 r .rdata$.refptr.__ImageBase +00000001400043e0 r .rdata$.refptr.__imp___initenv +00000001400043f0 r .rdata$.refptr.__imp__tzset +0000000140004400 r .rdata$.refptr.__mingw_app_type +0000000140004410 r .rdata$.refptr.__mingw_initltsdrot_force +0000000140004420 r .rdata$.refptr.__mingw_initltsdyn_force +0000000140004430 r .rdata$.refptr.__mingw_initltssuo_force +0000000140004440 r .rdata$.refptr.__mingw_module_is_dll +0000000140004450 r .rdata$.refptr.__mingw_oldexcpt_handler +0000000140004460 r .rdata$.refptr.__native_startup_lock +0000000140004470 r .rdata$.refptr.__native_startup_state +00000001400043c0 r .rdata$.refptr.__RUNTIME_PSEUDO_RELOC_LIST__ +00000001400043b0 r .rdata$.refptr.__RUNTIME_PSEUDO_RELOC_LIST_END__ +0000000140004480 r .rdata$.refptr.__xc_a +0000000140004490 r .rdata$.refptr.__xc_z +00000001400044a0 r .rdata$.refptr.__xi_a +00000001400044b0 r .rdata$.refptr.__xi_z +00000001400044c0 r .rdata$.refptr._commode +0000000140004370 r .rdata$.refptr._CRT_MT +00000001400044d0 r .rdata$.refptr._dowildcard +00000001400044e0 r .rdata$.refptr._fmode +00000001400044f0 r .rdata$.refptr._gnu_exception_handler +0000000140004500 r .rdata$.refptr._matherr +0000000140004380 r .rdata$.refptr._MINGW_INSTALL_DEBUG_MATHERR +0000000140004510 r .rdata$.refptr._newmode +00000001400047f0 r .rdata$zzz +00000001400047c0 r .rdata$zzz +0000000140004880 r .rdata$zzz +0000000140004790 r .rdata$zzz +00000001400048b0 r .rdata$zzz +0000000140004ac0 r .rdata$zzz +0000000140004760 r .rdata$zzz +0000000140004730 r .rdata$zzz +00000001400048e0 r .rdata$zzz +0000000140004910 r .rdata$zzz +0000000140004af0 r .rdata$zzz +0000000140004940 r .rdata$zzz +0000000140004970 r .rdata$zzz +0000000140004700 r .rdata$zzz +00000001400046d0 r .rdata$zzz +00000001400049d0 r .rdata$zzz +0000000140004a00 r .rdata$zzz +00000001400046a0 r .rdata$zzz +0000000140004a30 r .rdata$zzz +0000000140004670 r .rdata$zzz +0000000140004640 r .rdata$zzz +0000000140004820 r .rdata$zzz +0000000140004610 r .rdata$zzz +0000000140004a60 r .rdata$zzz +00000001400045e0 r .rdata$zzz +0000000140004a90 r .rdata$zzz +00000001400045b0 r .rdata$zzz +0000000140004520 r .rdata$zzz +0000000140004580 r .rdata$zzz +0000000140004850 r .rdata$zzz +0000000140004550 r .rdata$zzz +00000001400049a0 r .rdata$zzz +0000000140004390 R .refptr.__CTOR_LIST__ +00000001400043d0 R .refptr.__dyn_tls_init_callback +00000001400043a0 R .refptr.__ImageBase +00000001400043e0 R .refptr.__imp___initenv +00000001400043f0 R .refptr.__imp__tzset +0000000140004400 R .refptr.__mingw_app_type +0000000140004410 R .refptr.__mingw_initltsdrot_force +0000000140004420 R .refptr.__mingw_initltsdyn_force +0000000140004430 R .refptr.__mingw_initltssuo_force +0000000140004440 R .refptr.__mingw_module_is_dll +0000000140004450 R .refptr.__mingw_oldexcpt_handler +0000000140004460 R .refptr.__native_startup_lock +0000000140004470 R .refptr.__native_startup_state +00000001400043c0 R .refptr.__RUNTIME_PSEUDO_RELOC_LIST__ +00000001400043b0 R .refptr.__RUNTIME_PSEUDO_RELOC_LIST_END__ +0000000140004480 R .refptr.__xc_a +0000000140004490 R .refptr.__xc_z +00000001400044a0 R .refptr.__xi_a +00000001400044b0 R .refptr.__xi_z +00000001400044c0 R .refptr._commode +0000000140004370 R .refptr._CRT_MT +00000001400044d0 R .refptr._dowildcard +00000001400044e0 R .refptr._fmode +00000001400044f0 R .refptr._gnu_exception_handler +0000000140004500 R .refptr._matherr +0000000140004380 R .refptr._MINGW_INSTALL_DEBUG_MATHERR +0000000140004510 R .refptr._newmode +000000014000b000 r .rsrc +0000000140002978 t .text +0000000140002970 t .text +00000001400029c0 t .text +0000000140002968 t .text +0000000140002960 t .text +0000000140002958 t .text +0000000140002950 t .text +0000000140002948 t .text +00000001400029c0 t .text +0000000140002940 t .text +0000000140002938 t .text +0000000140002930 t .text +0000000140002928 t .text +0000000140002920 t .text +0000000140002920 t .text +0000000140002988 t .text +0000000140002980 t .text +00000001400029d0 t .text +0000000140002998 t .text +0000000140002920 t .text +00000001400029a0 t .text +0000000140002a50 t .text +0000000140002910 t .text +00000001400029d0 t .text +0000000140002908 t .text +0000000140002990 t .text +00000001400028f8 t .text +00000001400028f0 t .text +00000001400028e8 t .text +00000001400029d0 t .text +00000001400028e0 t .text +00000001400028e0 t .text +00000001400028e0 t .text +00000001400029c0 t .text +0000000140001000 t .text +00000001400028d8 t .text +00000001400029d8 t .text +00000001400028d0 t .text +00000001400028d0 t .text +0000000140002a50 t .text +0000000140001430 t .text +00000001400028c8 t .text +00000001400028c0 t .text +00000001400029e0 t .text +00000001400028b8 t .text +00000001400028b0 t .text +0000000140001450 t .text +0000000140002690 t .text +0000000140002a50 t .text +0000000140001480 t .text +00000001400029e8 t .text +0000000140002a48 t .text +00000001400029b0 t .text +00000001400014d0 t .text +00000001400015a0 t .text +00000001400015a0 t .text +0000000140002a40 t .text +00000001400029b0 t .text +00000001400029b8 t .text +00000001400029f0 t .text +00000001400015a0 t .text +0000000140002690 t .text +00000001400015b0 t .text +0000000140002900 t .text +0000000140002a38 t .text +00000001400029f0 t .text +0000000140002650 t .text +00000001400015b0 t .text +0000000140002a30 t .text +0000000140002600 t .text +0000000140001680 t .text +00000001400029f0 t .text +0000000140001680 t .text +00000001400025b0 t .text +0000000140001680 t .text +0000000140002a28 t .text +0000000140002590 t .text +0000000140001780 t .text +00000001400029f8 t .text +0000000140002590 t .text +0000000140002590 t .text +0000000140002550 t .text +0000000140001790 t .text +0000000140002150 t .text +0000000140002a20 t .text +0000000140001790 t .text +0000000140002a18 t .text +0000000140002a00 t .text +00000001400029b0 t .text +0000000140001cd0 t .text +00000001400028d0 t .text +0000000140001d20 t .text +0000000140002a10 t .text +0000000140002a00 t .text +0000000140001d20 t .text +0000000140002a08 t .text +0000000140001ee0 t .text +0000000140002150 t .text +0000000140002150 t .text +0000000140002a00 t .text +0000000140002a50 t .text.startup +000000014000a000 d .tls +000000014000a008 d .tls$ZZZ +000000014000606c r .xdata +00000001400061a4 r .xdata +0000000140006074 r .xdata +0000000140006000 r .xdata +000000014000608c r .xdata +00000001400060a4 r .xdata +000000014000619c r .xdata +0000000140006118 r .xdata +00000001400060a8 r .xdata +0000000140006080 r .xdata +0000000140006190 r .xdata +0000000140006120 r .xdata +0000000140006184 r .xdata +00000001400060c0 r .xdata +000000014000617c r .xdata +00000001400060d8 r .xdata +0000000140006150 r .xdata +00000001400060dc r .xdata +000000014000610c r .xdata +00000001400061f4 r .xdata.startup +0000000140002550 T ___chkstk_ms +0000000140009018 D ___crt_xc_end__ +0000000140009000 D ___crt_xc_start__ +0000000140009030 D ___crt_xi_end__ +0000000140009018 D ___crt_xi_start__ +0000000140009030 D ___crt_xl_start__ +0000000140009050 D ___crt_xp_end__ +0000000140009050 D ___crt_xp_start__ +0000000140009050 D ___crt_xt_end__ +0000000140009050 D ___crt_xt_start__ +0000000140002a60 T ___CTOR_LIST__ +0000000140002a78 T ___DTOR_LIST__ +0000000140004b20 R ___RUNTIME_PSEUDO_RELOC_LIST__ +0000000140004b20 R ___RUNTIME_PSEUDO_RELOC_LIST_END__ +000000014000a010 D ___tls_end__ +000000014000a000 D ___tls_start__ +0000000140001f50 T ___w64_mingwthr_add_key_dtor +0000000140001fc0 T ___w64_mingwthr_remove_key_dtor +00000001400028e0 T __acrt_iob_func +0000000140007180 B __bss_end__ +0000000140007000 B __bss_start__ +00000001400029b0 T __C_specific_handler +0000000140002a60 T __CTOR_LIST__ +0000000140003120 D __data_end__ +0000000140003000 D __data_start__ +00000001400028b0 T __daylight +0000000000000000 A __dll__ +0000000000000160 A __dll_characteristics__ +0000000140001510 T __do_global_ctors +00000001400014d0 T __do_global_dtors +0000000140002a78 T __DTOR_LIST__ +00000001400015b0 t __dyn_tls_dtor +00000001400015e0 T __dyn_tls_init +0000000140004020 R __dyn_tls_init_callback + U __end__ +0000000000000200 A __file_alignment__ +0000000140001440 T __gcc_deregister_frame +0000000140001430 T __gcc_register_frame +00000001400026a0 T __getmainargs +0000000140008468 I __IAT_end__ +0000000140008298 I __IAT_start__ +00000001400083e8 I __imp___acrt_iob_func +0000000140008340 I __imp___C_specific_handler +0000000140008440 I __imp___daylight +00000001400030c8 D __imp___getmainargs +0000000140003098 D __imp___initenv +00000001400030a0 D __imp___ms_fwprintf +0000000140008358 I __imp___p___argc +0000000140008360 I __imp___p___argv +0000000140008368 I __imp___p___wargv +00000001400083f0 I __imp___p__commode +00000001400082f0 I __imp___p__environ +00000001400083f8 I __imp___p__fmode +00000001400082f8 I __imp___p__wenviron +00000001400083b8 I __imp___set_app_type +0000000140008330 I __imp___setusermatherr +0000000140008400 I __imp___stdio_common_vfprintf +0000000140008408 I __imp___stdio_common_vfscanf +0000000140008410 I __imp___stdio_common_vfwprintf +0000000140008448 I __imp___timezone +0000000140008450 I __imp___tzname +00000001400030c0 D __imp___wgetmainargs +0000000140003090 D __imp___winitenv +00000001400030b8 D __imp__amsg_exit +0000000140008370 I __imp__cexit +0000000140008378 I __imp__configure_narrow_argv +0000000140008380 I __imp__configure_wide_argv +0000000140008388 I __imp__crt_at_quick_exit +0000000140008390 I __imp__crt_atexit +0000000140008398 I __imp__exit +00000001400030b0 D __imp__get_output_format +00000001400083a0 I __imp__initialize_narrow_environment +00000001400083a8 I __imp__initialize_wide_environment +00000001400083b0 I __imp__initterm +0000000140003110 D __imp__onexit +00000001400083c0 I __imp__set_invalid_parameter_handler +0000000140008308 I __imp__set_new_mode +0000000140008458 I __imp__tzset +00000001400083c8 I __imp_abort +0000000140003108 D __imp_at_quick_exit +0000000140008310 I __imp_calloc +00000001400030d0 D __imp_daylight +0000000140008298 I __imp_DeleteCriticalSection +00000001400082a0 I __imp_EnterCriticalSection +00000001400083d0 I __imp_exit +0000000140003080 D __imp_fprintf +0000000140008318 I __imp_free +0000000140008418 I __imp_fwrite +00000001400082a8 I __imp_GetLastError +00000001400082b0 I __imp_InitializeCriticalSection +00000001400082b8 I __imp_LeaveCriticalSection +0000000140008320 I __imp_malloc +0000000140008348 I __imp_memcpy +0000000140003070 D __imp_printf +0000000140003060 D __imp_scanf +00000001400082c0 I __imp_SetUnhandledExceptionFilter +00000001400083d8 I __imp_signal +00000001400082c8 I __imp_Sleep +0000000140008428 I __imp_strlen +0000000140008430 I __imp_strncmp +00000001400030d8 D __imp_timezone +00000001400082d0 I __imp_TlsGetValue +00000001400030e0 D __imp_tzname +00000001400030a8 D __imp_tzset +0000000140003050 D __imp_vfprintf +00000001400082d8 I __imp_VirtualProtect +00000001400082e0 I __imp_VirtualQuery +00000001400087f0 I __lib64_libapi_ms_win_crt_environment_l1_1_0_a_iname +0000000140008828 I __lib64_libapi_ms_win_crt_heap_l1_1_0_a_iname +000000014000884c I __lib64_libapi_ms_win_crt_math_l1_1_0_a_iname +0000000140008874 I __lib64_libapi_ms_win_crt_private_l1_1_0_a_iname +00000001400088dc I __lib64_libapi_ms_win_crt_runtime_l1_1_0_a_iname +000000014000891c I __lib64_libapi_ms_win_crt_stdio_l1_1_0_a_iname +0000000140008944 I __lib64_libapi_ms_win_crt_string_l1_1_0_a_iname +0000000140008978 I __lib64_libapi_ms_win_crt_time_l1_1_0_a_iname +00000001400087d8 I __lib64_libkernel32_a_iname +0000000000000000 A __loader_flags__ +0000000140001580 T __main +0000000000000000 A __major_image_version__ +0000000000000004 A __major_os_version__ +0000000000000005 A __major_subsystem_version__ +0000000140007080 B __mingw_app_type +0000000140002480 T __mingw_enum_import_library_names +00000001400022f0 T __mingw_GetSectionCount +0000000140002270 T __mingw_GetSectionForAddress +0000000140007068 B __mingw_initltsdrot_force +0000000140007064 B __mingw_initltsdyn_force +0000000140007060 B __mingw_initltssuo_force +0000000140001000 t __mingw_invalidParameterHandler +0000000140007000 B __mingw_module_is_dll +00000001400070c0 B __mingw_oldexcpt_handler +0000000140009020 D __mingw_pcinit +0000000140009008 D __mingw_pcppinit +0000000140001cd0 T __mingw_raise_matherr +0000000140001d10 T __mingw_setusermatherr +0000000140002050 T __mingw_TLScallback +0000000140007100 b __mingwthr_cs +00000001400070e8 b __mingwthr_cs_init +0000000140001ee0 t __mingwthr_run_key_dtors.part.0 +0000000000000000 A __minor_image_version__ +0000000000000000 A __minor_os_version__ +0000000000000002 A __minor_subsystem_version__ +00000001400027f0 T __ms_fwprintf +0000000140003014 D __native_dllmain_reason +0000000140007040 B __native_startup_lock +0000000140007048 B __native_startup_state +0000000140003010 D __native_vcclrit_reason +0000000140002920 T __p___argc +0000000140002928 T __p___argv +0000000140002930 T __p___wargv +00000001400028e8 T __p__commode +00000001400029f0 T __p__environ +00000001400028f0 T __p__fmode +00000001400029f8 T __p__wenviron +0000000140001790 t __report_error +0000000140004b20 R __rt_psrelocs_end +0000000000000000 A __rt_psrelocs_size +0000000140004b20 R __rt_psrelocs_start +0000000140004b20 R __RUNTIME_PSEUDO_RELOC_LIST__ +0000000140004b20 R __RUNTIME_PSEUDO_RELOC_LIST_END__ +0000000000001000 A __section_alignment__ +0000000140002980 T __set_app_type +00000001400029c0 T __setusermatherr +0000000000001000 A __size_of_heap_commit__ +0000000000100000 A __size_of_heap_reserve__ +0000000000001000 A __size_of_stack_commit__ +0000000000200000 A __size_of_stack_reserve__ +00000001400028f8 T __stdio_common_vfprintf +0000000140002900 T __stdio_common_vfscanf +0000000140002908 T __stdio_common_vfwprintf +0000000000000003 A __subsystem__ +00000001400028b8 T __timezone +0000000140001670 T __tlregdtor +0000000140001180 t __tmainCRTStartup +00000001400028c0 T __tzname +0000000140002710 T __wgetmainargs +0000000140009000 D __xc_a +0000000140009010 D __xc_z +0000000140009050 d __xd_a +0000000140009058 d __xd_z +0000000140009018 D __xi_a +0000000140009028 D __xi_z +0000000140009030 D __xl_a +0000000140009038 D __xl_c +0000000140009040 D __xl_d +0000000140009048 D __xl_z +00000001400027c0 T _amsg_exit +0000000140002938 T _cexit +0000000140007070 B _commode +0000000140002940 T _configure_narrow_argv +0000000140002948 T _configure_wide_argv +0000000140002950 T _crt_at_quick_exit +0000000140002958 T _crt_atexit +0000000140003030 D _CRT_MT +0000000140003020 D _dowildcard +0000000140002960 T _exit +0000000140002180 T _FindPESection +00000001400021d0 T _FindPESectionByName +0000000140002330 T _FindPESectionExec +00000001400070b0 B _fmode +0000000140001780 T _fpreset +0000000140002690 T _get_output_format +00000001400023b0 T _GetPEImageBase +0000000140001d20 T _gnu_exception_handler +0000000140008014 I _head_lib64_libapi_ms_win_crt_environment_l1_1_0_a +0000000140008028 I _head_lib64_libapi_ms_win_crt_heap_l1_1_0_a +000000014000803c I _head_lib64_libapi_ms_win_crt_math_l1_1_0_a +0000000140008050 I _head_lib64_libapi_ms_win_crt_private_l1_1_0_a +0000000140008064 I _head_lib64_libapi_ms_win_crt_runtime_l1_1_0_a +0000000140008078 I _head_lib64_libapi_ms_win_crt_stdio_l1_1_0_a +000000014000808c I _head_lib64_libapi_ms_win_crt_string_l1_1_0_a +00000001400080a0 I _head_lib64_libapi_ms_win_crt_time_l1_1_0_a +0000000140008000 I _head_lib64_libkernel32_a +0000000140002968 T _initialize_narrow_environment +0000000140002970 T _initialize_wide_environment +0000000140002978 T _initterm +00000001400023f0 T _IsNonwritableInCurrentImage +0000000140001680 T _matherr +0000000140003040 D _MINGW_INSTALL_DEBUG_MATHERR +0000000140007050 B _newmode +0000000140002780 T _onexit +0000000140001970 T _pei386_runtime_relocator +0000000140002988 T _set_invalid_parameter_handler +00000001400029d0 T _set_new_mode +00000001400015a0 T _setargv +000000014000a008 D _tls_end +000000014000706c B _tls_index +000000014000a000 D _tls_start +0000000140004040 R _tls_used +0000000140002870 T _tzset +0000000140002150 T _ValidateImageBase +0000000140002990 T abort +0000000140007028 b argc +0000000140007020 b argv +00000001400027a0 T at_quick_exit +0000000140001410 T atexit +00000001400029d8 T calloc +0000000140002a48 T DeleteCriticalSection +0000000140002a40 T EnterCriticalSection +0000000140007018 b envp +0000000140002998 T exit +0000000140001450 T fact +0000000140001780 T fpreset +0000000140002650 T fprintf +00000001400029e0 T free +0000000140008308 i fthunk +0000000140008330 i fthunk +00000001400082f0 i fthunk +0000000140008358 i fthunk +00000001400083e8 i fthunk +0000000140008428 i fthunk +0000000140008298 i fthunk +0000000140008340 i fthunk +0000000140008440 i fthunk +0000000140002910 T fwrite +0000000140002a38 T GetLastError +0000000140007008 b has_cctor +0000000140008138 i hname +0000000140008218 i hname +0000000140008258 i hname +0000000140008188 i hname +0000000140008160 i hname +0000000140008120 i hname +0000000140008170 i hname +00000001400080c8 i hname +0000000140008270 i hname +00000001400030e8 d initial_daylight +00000001400030ec d initial_timezone +0000000140003104 d initial_tzname0 +0000000140003100 d initial_tzname1 +00000001400030f0 d initial_tznames +0000000140002a30 T InitializeCriticalSection +0000000140007030 b initialized +00000001400070e0 b key_dtor_list +0000000140002a28 T LeaveCriticalSection +0000000140007178 b local__initenv +0000000140007170 b local__winitenv +0000000140001480 T main +00000001400013f0 T mainCRTStartup +0000000140007010 b mainret +00000001400029e8 T malloc +000000014000700c b managedapp +0000000140001800 t mark_section_writable +0000000140007094 b maxSections +00000001400029b8 T memcpy +0000000140003000 d p.0 +0000000140001010 t pre_c_init +0000000140001130 t pre_cpp_init +0000000140002600 T printf +0000000140002a50 t register_frame_ctor +00000001400025b0 T scanf +0000000140002a20 T SetUnhandledExceptionFilter +00000001400029a0 T signal +0000000140002a18 T Sleep +0000000140007004 b startinfo +00000001400028d0 T strlen +00000001400028d8 T strncmp +00000001400070a0 b stUserMathErr +0000000140007098 b the_secs +0000000140002a10 T TlsGetValue +0000000140002830 T tzset +0000000140002590 T vfprintf +0000000140002a08 T VirtualProtect +0000000140002a00 T VirtualQuery +0000000140007090 b was_init.0 +00000001400013d0 T WinMainCRTStartup diff --git a/Lect6/54-63/function.c b/Lect6/54-63/function.c new file mode 100644 index 0000000..2bdc500 --- /dev/null +++ b/Lect6/54-63/function.c @@ -0,0 +1,5 @@ +unsigned int fact(unsigned n) { + if(n==0) + return 1; + return n * fact(n-1); +} diff --git a/Lect6/54-63/function.o b/Lect6/54-63/function.o new file mode 100644 index 0000000..0e19ab4 Binary files /dev/null and b/Lect6/54-63/function.o differ diff --git a/Lect6/54-63/main.c b/Lect6/54-63/main.c new file mode 100644 index 0000000..c8c0c56 --- /dev/null +++ b/Lect6/54-63/main.c @@ -0,0 +1,11 @@ +#include + +extern unsigned int fact(unsigned int); + +int main (void) { + unsigned int n; + scanf("%u",&n); + + printf ("fact = %lld\n", fact ( n )); + return 0; +} \ No newline at end of file diff --git a/Lect6/54-63/main.o b/Lect6/54-63/main.o new file mode 100644 index 0000000..caa2237 Binary files /dev/null and b/Lect6/54-63/main.o differ diff --git a/Lect6/54-63/prog.exe b/Lect6/54-63/prog.exe new file mode 100644 index 0000000..a784ce7 Binary files /dev/null and b/Lect6/54-63/prog.exe differ diff --git a/Lect6/65-68/65.bat b/Lect6/65-68/65.bat new file mode 100644 index 0000000..60277dd --- /dev/null +++ b/Lect6/65-68/65.bat @@ -0,0 +1,4 @@ +gcc -c -o funct.o function.c -O2 +gcc -c -o main.o main.c -O2 +gcc -o prog main.o funct.o + diff --git a/Lect6/65-68/66.bat b/Lect6/65-68/66.bat new file mode 100644 index 0000000..9f355e7 --- /dev/null +++ b/Lect6/65-68/66.bat @@ -0,0 +1 @@ +nm -A *.o > 66.txt diff --git a/Lect6/65-68/66.txt b/Lect6/65-68/66.txt new file mode 100644 index 0000000..d7c31ba --- /dev/null +++ b/Lect6/65-68/66.txt @@ -0,0 +1,20 @@ +funct.o:0000000000000000 b .bss +funct.o:0000000000000000 d .data +funct.o:0000000000000000 p .pdata +funct.o:0000000000000000 r .rdata$zzz +funct.o:0000000000000000 t .text +funct.o:0000000000000000 r .xdata +funct.o:0000000000000000 T fact +main.o:0000000000000000 b .bss +main.o:0000000000000000 d .data +main.o:0000000000000000 p .pdata.startup +main.o:0000000000000000 r .rdata +main.o:0000000000000000 r .rdata$zzz +main.o:0000000000000000 t .text +main.o:0000000000000000 t .text.startup +main.o:0000000000000000 r .xdata.startup +main.o: U __main +main.o: U fact +main.o:0000000000000000 T main +main.o: U printf +main.o: U scanf diff --git a/Lect6/65-68/67.bat b/Lect6/65-68/67.bat new file mode 100644 index 0000000..a8e35d4 --- /dev/null +++ b/Lect6/65-68/67.bat @@ -0,0 +1 @@ +nm -A prog.exe > 67.txt diff --git a/Lect6/65-68/67.txt b/Lect6/65-68/67.txt new file mode 100644 index 0000000..4ab3424 --- /dev/null +++ b/Lect6/65-68/67.txt @@ -0,0 +1,1186 @@ +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007080 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007080 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007080 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007090 b .bss +prog.exe:0000000140007170 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007080 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:00000001400070a0 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007070 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007170 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007000 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:00000001400070b0 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007150 b .bss +prog.exe:0000000140007060 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007150 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:00000001400070c0 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007170 b .bss +prog.exe:0000000140007030 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007050 b .bss +prog.exe:0000000140007030 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:00000001400070e0 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007170 b .bss +prog.exe:0000000140007030 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007050 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007140 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007050 b .bss +prog.exe:0000000140007030 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007170 b .bss +prog.exe:0000000140007150 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007140 b .bss +prog.exe:0000000140007170 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007180 b .bss +prog.exe:0000000140007040 b .bss +prog.exe:0000000140009000 d .CRT$XCA +prog.exe:0000000140009008 d .CRT$XCAA +prog.exe:0000000140009010 d .CRT$XCZ +prog.exe:0000000140009050 d .CRT$XDA +prog.exe:0000000140009058 d .CRT$XDZ +prog.exe:0000000140009018 d .CRT$XIA +prog.exe:0000000140009020 d .CRT$XIAA +prog.exe:0000000140009028 d .CRT$XIZ +prog.exe:0000000140009030 d .CRT$XLA +prog.exe:0000000140009038 d .CRT$XLC +prog.exe:0000000140009040 d .CRT$XLD +prog.exe:0000000140009048 d .CRT$XLZ +prog.exe:0000000140002a48 t .ctors.65535 +prog.exe:0000000140003120 d .data +prog.exe:0000000140003030 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003060 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003030 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003000 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003030 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003070 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003030 d .data +prog.exe:0000000140003000 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003000 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003040 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003030 d .data +prog.exe:0000000140003040 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003000 d .data +prog.exe:0000000140003020 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003040 d .data +prog.exe:0000000140003010 d .data +prog.exe:0000000140003040 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003050 d .data +prog.exe:0000000140003030 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003030 d .data +prog.exe:0000000140003000 d .data +prog.exe:0000000140003080 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003030 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003030 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003030 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003090 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003030 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003030 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:00000001400030a0 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003030 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003030 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003120 d .data +prog.exe:0000000140003040 d .data +prog.exe:000000014001a000 N .debug_abbrev +prog.exe:000000014001ab88 N .debug_abbrev +prog.exe:000000014001afbb N .debug_abbrev +prog.exe:000000014001a80d N .debug_abbrev +prog.exe:000000014001b8c2 N .debug_abbrev +prog.exe:000000014001bf0a N .debug_abbrev +prog.exe:000000014001bd00 N .debug_abbrev +prog.exe:000000014001a9f4 N .debug_abbrev +prog.exe:000000014001bb94 N .debug_abbrev +prog.exe:000000014001b638 N .debug_abbrev +prog.exe:000000014001a582 N .debug_abbrev +prog.exe:000000014001abb5 N .debug_abbrev +prog.exe:000000014001b0fb N .debug_abbrev +prog.exe:000000014001a7df N .debug_abbrev +prog.exe:000000014001b8f0 N .debug_abbrev +prog.exe:000000014001a7a5 N .debug_abbrev +prog.exe:000000014001a6c1 N .debug_abbrev +prog.exe:000000014001ba28 N .debug_abbrev +prog.exe:000000014001aa22 N .debug_abbrev +prog.exe:000000014001abe3 N .debug_abbrev +prog.exe:000000014001b608 N .debug_abbrev +prog.exe:000000014001aa83 N .debug_abbrev +prog.exe:000000014001b379 N .debug_abbrev +prog.exe:000000014001be62 N .debug_abbrev +prog.exe:000000014001b5da N .debug_abbrev +prog.exe:000000014001a777 N .debug_abbrev +prog.exe:000000014001b0cd N .debug_abbrev +prog.exe:000000014000d410 N .debug_aranges +prog.exe:000000014000d290 N .debug_aranges +prog.exe:000000014000d140 N .debug_aranges +prog.exe:000000014000d2c0 N .debug_aranges +prog.exe:000000014000d160 N .debug_aranges +prog.exe:000000014000d2e0 N .debug_aranges +prog.exe:000000014000d1e0 N .debug_aranges +prog.exe:000000014000d060 N .debug_aranges +prog.exe:000000014000d380 N .debug_aranges +prog.exe:000000014000d350 N .debug_aranges +prog.exe:000000014000d0a0 N .debug_aranges +prog.exe:000000014000d030 N .debug_aranges +prog.exe:000000014000d0d0 N .debug_aranges +prog.exe:000000014000d260 N .debug_aranges +prog.exe:000000014000d1c0 N .debug_aranges +prog.exe:000000014000d3e0 N .debug_aranges +prog.exe:000000014000d330 N .debug_aranges +prog.exe:000000014000d120 N .debug_aranges +prog.exe:000000014000d430 N .debug_aranges +prog.exe:000000014000d3b0 N .debug_aranges +prog.exe:000000014000d300 N .debug_aranges +prog.exe:000000014000d000 N .debug_aranges +prog.exe:000000014000d190 N .debug_aranges +prog.exe:000000014000d240 N .debug_aranges +prog.exe:000000014000d210 N .debug_aranges +prog.exe:000000014000d080 N .debug_aranges +prog.exe:000000014000d0f0 N .debug_aranges +prog.exe:000000014001f208 N .debug_frame +prog.exe:000000014001f418 N .debug_frame +prog.exe:000000014001f708 N .debug_frame +prog.exe:000000014001f740 N .debug_frame +prog.exe:000000014001f000 N .debug_frame +prog.exe:000000014001f1d8 N .debug_frame +prog.exe:000000014001f5e0 N .debug_frame +prog.exe:000000014001f7d0 N .debug_frame +prog.exe:000000014001f468 N .debug_frame +prog.exe:000000014001f338 N .debug_frame +prog.exe:000000014001f808 N .debug_frame +prog.exe:000000014001f788 N .debug_frame +prog.exe:000000014001f308 N .debug_frame +prog.exe:000000014001f2b0 N .debug_frame +prog.exe:000000014001f150 N .debug_frame +prog.exe:000000014001f4b8 N .debug_frame +prog.exe:0000000140011d59 N .debug_info +prog.exe:0000000140017002 N .debug_info +prog.exe:000000014001232b N .debug_info +prog.exe:0000000140015a92 N .debug_info +prog.exe:0000000140017753 N .debug_info +prog.exe:0000000140010cf8 N .debug_info +prog.exe:0000000140011592 N .debug_info +prog.exe:0000000140013b08 N .debug_info +prog.exe:00000001400159c2 N .debug_info +prog.exe:0000000140016f64 N .debug_info +prog.exe:0000000140010697 N .debug_info +prog.exe:0000000140017b06 N .debug_info +prog.exe:0000000140011508 N .debug_info +prog.exe:0000000140013dfd N .debug_info +prog.exe:0000000140012294 N .debug_info +prog.exe:000000014000e000 N .debug_info +prog.exe:00000001400112fa N .debug_info +prog.exe:0000000140011f5e N .debug_info +prog.exe:0000000140015939 N .debug_info +prog.exe:000000014001844a N .debug_info +prog.exe:0000000140013e85 N .debug_info +prog.exe:0000000140011387 N .debug_info +prog.exe:0000000140011de3 N .debug_info +prog.exe:0000000140014e66 N .debug_info +prog.exe:00000001400123bd N .debug_info +prog.exe:000000014001739f N .debug_info +prog.exe:0000000140017ea8 N .debug_info +prog.exe:000000014001d95a N .debug_line +prog.exe:000000014001e14f N .debug_line +prog.exe:000000014001d680 N .debug_line +prog.exe:000000014001d8c8 N .debug_line +prog.exe:000000014001d000 N .debug_line +prog.exe:000000014001deda N .debug_line +prog.exe:000000014001d7d0 N .debug_line +prog.exe:000000014001df88 N .debug_line +prog.exe:000000014001d5f0 N .debug_line +prog.exe:000000014001e43b N .debug_line +prog.exe:000000014001ebe6 N .debug_line +prog.exe:000000014001e3c7 N .debug_line +prog.exe:000000014001ec41 N .debug_line +prog.exe:000000014001ea32 N .debug_line +prog.exe:000000014001e986 N .debug_line +prog.exe:000000014001eac7 N .debug_line +prog.exe:000000014001d560 N .debug_line +prog.exe:000000014001d920 N .debug_line +prog.exe:000000014001d439 N .debug_line +prog.exe:000000014001d80a N .debug_line +prog.exe:000000014001e401 N .debug_line +prog.exe:000000014001d796 N .debug_line +prog.exe:000000014001eb5c N .debug_line +prog.exe:000000014001d5b6 N .debug_line +prog.exe:000000014001d646 N .debug_line +prog.exe:000000014001e9c0 N .debug_line +prog.exe:000000014001dfc2 N .debug_line +prog.exe:00000001400217c2 N .debug_line_str +prog.exe:000000014002244e N .debug_line_str +prog.exe:00000001400221a5 N .debug_line_str +prog.exe:0000000140021f56 N .debug_line_str +prog.exe:00000001400211c6 N .debug_line_str +prog.exe:0000000140022533 N .debug_line_str +prog.exe:0000000140021c84 N .debug_line_str +prog.exe:00000001400212ae N .debug_line_str +prog.exe:00000001400220f5 N .debug_line_str +prog.exe:000000014002228d N .debug_line_str +prog.exe:00000001400214f7 N .debug_line_str +prog.exe:0000000140022650 N .debug_line_str +prog.exe:0000000140021eba N .debug_line_str +prog.exe:000000014002236c N .debug_line_str +prog.exe:000000014002187f N .debug_line_str +prog.exe:000000014002145b N .debug_line_str +prog.exe:0000000140021be5 N .debug_line_str +prog.exe:0000000140022010 N .debug_line_str +prog.exe:0000000140021723 N .debug_line_str +prog.exe:00000001400219cc N .debug_line_str +prog.exe:0000000140021b1b N .debug_line_str +prog.exe:0000000140021000 N .debug_line_str +prog.exe:0000000140021684 N .debug_line_str +prog.exe:00000001400213bc N .debug_line_str +prog.exe:0000000140021d95 N .debug_line_str +prog.exe:0000000140021596 N .debug_line_str +prog.exe:000000014002191e N .debug_line_str +prog.exe:00000001400241b5 N .debug_loclists +prog.exe:000000014002339f N .debug_loclists +prog.exe:000000014002420d N .debug_loclists +prog.exe:0000000140023000 N .debug_loclists +prog.exe:0000000140024267 N .debug_loclists +prog.exe:0000000140023dbd N .debug_loclists +prog.exe:00000001400231fd N .debug_loclists +prog.exe:0000000140023921 N .debug_loclists +prog.exe:00000001400231c8 N .debug_loclists +prog.exe:0000000140023993 N .debug_loclists +prog.exe:0000000140023af2 N .debug_loclists +prog.exe:0000000140023314 N .debug_loclists +prog.exe:00000001400242ad N .debug_loclists +prog.exe:000000014002423a N .debug_loclists +prog.exe:00000001400250ca N .debug_rnglists +prog.exe:0000000140025000 N .debug_rnglists +prog.exe:00000001400250b3 N .debug_rnglists +prog.exe:000000014002505c N .debug_rnglists +prog.exe:0000000140020237 N .debug_str +prog.exe:000000014002026f N .debug_str +prog.exe:000000014002021f N .debug_str +prog.exe:00000001400202c3 N .debug_str +prog.exe:0000000140020000 N .debug_str +prog.exe:0000000140020256 N .debug_str +prog.exe:000000014002025f N .debug_str +prog.exe:000000014000808c i .idata$2 +prog.exe:0000000140008014 i .idata$2 +prog.exe:0000000140008000 i .idata$2 +prog.exe:0000000140008064 i .idata$2 +prog.exe:0000000140008078 i .idata$2 +prog.exe:000000014000803c i .idata$2 +prog.exe:00000001400080a0 i .idata$2 +prog.exe:0000000140008050 i .idata$2 +prog.exe:0000000140008028 i .idata$2 +prog.exe:0000000140008220 i .idata$4 +prog.exe:0000000140008268 i .idata$4 +prog.exe:0000000140008110 i .idata$4 +prog.exe:0000000140008260 i .idata$4 +prog.exe:0000000140008158 i .idata$4 +prog.exe:00000001400081e0 i .idata$4 +prog.exe:00000001400080d8 i .idata$4 +prog.exe:00000001400081e8 i .idata$4 +prog.exe:00000001400080e0 i .idata$4 +prog.exe:00000001400081f0 i .idata$4 +prog.exe:00000001400081d8 i .idata$4 +prog.exe:0000000140008138 i .idata$4 +prog.exe:0000000140008258 i .idata$4 +prog.exe:0000000140008170 i .idata$4 +prog.exe:0000000140008218 i .idata$4 +prog.exe:00000001400081d0 i .idata$4 +prog.exe:0000000140008108 i .idata$4 +prog.exe:0000000140008290 i .idata$4 +prog.exe:0000000140008168 i .idata$4 +prog.exe:0000000140008170 i .idata$4 +prog.exe:00000001400081c8 i .idata$4 +prog.exe:0000000140008138 i .idata$4 +prog.exe:0000000140008270 i .idata$4 +prog.exe:00000001400081f8 i .idata$4 +prog.exe:00000001400081c0 i .idata$4 +prog.exe:0000000140008178 i .idata$4 +prog.exe:00000001400080e8 i .idata$4 +prog.exe:0000000140008210 i .idata$4 +prog.exe:0000000140008100 i .idata$4 +prog.exe:00000001400081b8 i .idata$4 +prog.exe:0000000140008228 i .idata$4 +prog.exe:0000000140008188 i .idata$4 +prog.exe:0000000140008288 i .idata$4 +prog.exe:0000000140008130 i .idata$4 +prog.exe:0000000140008200 i .idata$4 +prog.exe:0000000140008180 i .idata$4 +prog.exe:00000001400081b0 i .idata$4 +prog.exe:0000000140008230 i .idata$4 +prog.exe:00000001400080d0 i .idata$4 +prog.exe:0000000140008280 i .idata$4 +prog.exe:00000001400081a8 i .idata$4 +prog.exe:0000000140008238 i .idata$4 +prog.exe:0000000140008118 i .idata$4 +prog.exe:0000000140008150 i .idata$4 +prog.exe:0000000140008140 i .idata$4 +prog.exe:00000001400081a0 i .idata$4 +prog.exe:0000000140008278 i .idata$4 +prog.exe:0000000140008240 i .idata$4 +prog.exe:0000000140008160 i .idata$4 +prog.exe:0000000140008248 i .idata$4 +prog.exe:0000000140008120 i .idata$4 +prog.exe:0000000140008198 i .idata$4 +prog.exe:00000001400080f8 i .idata$4 +prog.exe:0000000140008120 i .idata$4 +prog.exe:0000000140008148 i .idata$4 +prog.exe:0000000140008270 i .idata$4 +prog.exe:00000001400080c8 i .idata$4 +prog.exe:00000001400080c8 i .idata$4 +prog.exe:0000000140008190 i .idata$4 +prog.exe:0000000140008218 i .idata$4 +prog.exe:0000000140008188 i .idata$4 +prog.exe:00000001400080f0 i .idata$4 +prog.exe:0000000140008128 i .idata$4 +prog.exe:0000000140008160 i .idata$4 +prog.exe:0000000140008208 i .idata$4 +prog.exe:0000000140008250 i .idata$4 +prog.exe:0000000140008258 i .idata$4 +prog.exe:00000001400082c0 i .idata$5 +prog.exe:0000000140008330 i .idata$5 +prog.exe:00000001400083d8 i .idata$5 +prog.exe:0000000140008358 i .idata$5 +prog.exe:00000001400083e8 i .idata$5 +prog.exe:0000000140008360 i .idata$5 +prog.exe:00000001400082f8 i .idata$5 +prog.exe:00000001400082f0 i .idata$5 +prog.exe:0000000140008298 i .idata$5 +prog.exe:0000000140008298 i .idata$5 +prog.exe:0000000140008440 i .idata$5 +prog.exe:0000000140008318 i .idata$5 +prog.exe:0000000140008368 i .idata$5 +prog.exe:00000001400082c8 i .idata$5 +prog.exe:0000000140008418 i .idata$5 +prog.exe:00000001400082f0 i .idata$5 +prog.exe:0000000140008348 i .idata$5 +prog.exe:0000000140008448 i .idata$5 +prog.exe:0000000140008370 i .idata$5 +prog.exe:0000000140008410 i .idata$5 +prog.exe:0000000140008320 i .idata$5 +prog.exe:0000000140008330 i .idata$5 +prog.exe:0000000140008378 i .idata$5 +prog.exe:0000000140008408 i .idata$5 +prog.exe:0000000140008450 i .idata$5 +prog.exe:0000000140008350 i .idata$5 +prog.exe:00000001400082e8 i .idata$5 +prog.exe:0000000140008310 i .idata$5 +prog.exe:00000001400082b8 i .idata$5 +prog.exe:00000001400082a0 i .idata$5 +prog.exe:0000000140008380 i .idata$5 +prog.exe:0000000140008458 i .idata$5 +prog.exe:00000001400083d0 i .idata$5 +prog.exe:0000000140008400 i .idata$5 +prog.exe:0000000140008300 i .idata$5 +prog.exe:0000000140008358 i .idata$5 +prog.exe:0000000140008388 i .idata$5 +prog.exe:00000001400082d0 i .idata$5 +prog.exe:0000000140008390 i .idata$5 +prog.exe:00000001400083e0 i .idata$5 +prog.exe:0000000140008398 i .idata$5 +prog.exe:0000000140008440 i .idata$5 +prog.exe:00000001400083f8 i .idata$5 +prog.exe:0000000140008340 i .idata$5 +prog.exe:0000000140008308 i .idata$5 +prog.exe:00000001400083a0 i .idata$5 +prog.exe:0000000140008460 i .idata$5 +prog.exe:0000000140008340 i .idata$5 +prog.exe:00000001400083f0 i .idata$5 +prog.exe:0000000140008338 i .idata$5 +prog.exe:00000001400082b0 i .idata$5 +prog.exe:00000001400082d8 i .idata$5 +prog.exe:0000000140008428 i .idata$5 +prog.exe:00000001400083a8 i .idata$5 +prog.exe:00000001400083e8 i .idata$5 +prog.exe:00000001400083c8 i .idata$5 +prog.exe:00000001400083c0 i .idata$5 +prog.exe:00000001400083b0 i .idata$5 +prog.exe:0000000140008438 i .idata$5 +prog.exe:0000000140008430 i .idata$5 +prog.exe:0000000140008328 i .idata$5 +prog.exe:00000001400083b8 i .idata$5 +prog.exe:0000000140008308 i .idata$5 +prog.exe:00000001400082a8 i .idata$5 +prog.exe:0000000140008428 i .idata$5 +prog.exe:0000000140008420 i .idata$5 +prog.exe:00000001400082e0 i .idata$5 +prog.exe:0000000140008532 i .idata$6 +prog.exe:0000000140008574 i .idata$6 +prog.exe:00000001400084a8 i .idata$6 +prog.exe:00000001400085de i .idata$6 +prog.exe:0000000140008502 i .idata$6 +prog.exe:0000000140008602 i .idata$6 +prog.exe:0000000140008774 i .idata$6 +prog.exe:000000014000861a i .idata$6 +prog.exe:00000001400085d0 i .idata$6 +prog.exe:000000014000856c i .idata$6 +prog.exe:0000000140008592 i .idata$6 +prog.exe:0000000140008630 i .idata$6 +prog.exe:00000001400085c2 i .idata$6 +prog.exe:000000014000876a i .idata$6 +prog.exe:00000001400084fa i .idata$6 +prog.exe:00000001400086e0 i .idata$6 +prog.exe:000000014000863e i .idata$6 +prog.exe:0000000140008498 i .idata$6 +prog.exe:0000000140008510 i .idata$6 +prog.exe:00000001400085b4 i .idata$6 +prog.exe:0000000140008552 i .idata$6 +prog.exe:0000000140008646 i .idata$6 +prog.exe:00000001400086f2 i .idata$6 +prog.exe:0000000140008668 i .idata$6 +prog.exe:00000001400086d6 i .idata$6 +prog.exe:0000000140008542 i .idata$6 +prog.exe:0000000140008468 i .idata$6 +prog.exe:00000001400084c4 i .idata$6 +prog.exe:0000000140008522 i .idata$6 +prog.exe:0000000140008702 i .idata$6 +prog.exe:0000000140008688 i .idata$6 +prog.exe:00000001400086ce i .idata$6 +prog.exe:0000000140008694 i .idata$6 +prog.exe:000000014000857e i .idata$6 +prog.exe:00000001400087a6 i .idata$6 +prog.exe:00000001400084dc i .idata$6 +prog.exe:0000000140008710 i .idata$6 +prog.exe:000000014000877e i .idata$6 +prog.exe:000000014000879a i .idata$6 +prog.exe:00000001400086c6 i .idata$6 +prog.exe:0000000140008760 i .idata$6 +prog.exe:0000000140008562 i .idata$6 +prog.exe:00000001400085e8 i .idata$6 +prog.exe:000000014000872a i .idata$6 +prog.exe:00000001400086a4 i .idata$6 +prog.exe:0000000140008480 i .idata$6 +prog.exe:00000001400085aa i .idata$6 +prog.exe:0000000140008744 i .idata$6 +prog.exe:000000014000878c i .idata$6 +prog.exe:000000014000896c i .idata$7 +prog.exe:0000000140008914 i .idata$7 +prog.exe:00000001400088d0 i .idata$7 +prog.exe:00000001400087c0 i .idata$7 +prog.exe:0000000140008828 i .idata$7 +prog.exe:0000000140008918 i .idata$7 +prog.exe:00000001400087f0 i .idata$7 +prog.exe:0000000140008970 i .idata$7 +prog.exe:0000000140008910 i .idata$7 +prog.exe:00000001400088d4 i .idata$7 +prog.exe:0000000140008968 i .idata$7 +prog.exe:0000000140008974 i .idata$7 +prog.exe:000000014000890c i .idata$7 +prog.exe:00000001400088cc i .idata$7 +prog.exe:00000001400087b4 i .idata$7 +prog.exe:00000001400087d4 i .idata$7 +prog.exe:00000001400088c8 i .idata$7 +prog.exe:000000014000881c i .idata$7 +prog.exe:00000001400088d8 i .idata$7 +prog.exe:0000000140008908 i .idata$7 +prog.exe:00000001400087c4 i .idata$7 +prog.exe:00000001400088c4 i .idata$7 +prog.exe:000000014000891c i .idata$7 +prog.exe:0000000140008870 i .idata$7 +prog.exe:00000001400088c0 i .idata$7 +prog.exe:00000001400087d0 i .idata$7 +prog.exe:0000000140008898 i .idata$7 +prog.exe:0000000140008978 i .idata$7 +prog.exe:00000001400088bc i .idata$7 +prog.exe:0000000140008904 i .idata$7 +prog.exe:0000000140008848 i .idata$7 +prog.exe:00000001400087e8 i .idata$7 +prog.exe:00000001400087bc i .idata$7 +prog.exe:000000014000889c i .idata$7 +prog.exe:000000014000893c i .idata$7 +prog.exe:0000000140008820 i .idata$7 +prog.exe:0000000140008900 i .idata$7 +prog.exe:00000001400088b8 i .idata$7 +prog.exe:00000001400087ec i .idata$7 +prog.exe:00000001400087cc i .idata$7 +prog.exe:00000001400088a0 i .idata$7 +prog.exe:000000014000884c i .idata$7 +prog.exe:00000001400088b4 i .idata$7 +prog.exe:0000000140008944 i .idata$7 +prog.exe:0000000140008940 i .idata$7 +prog.exe:00000001400088b0 i .idata$7 +prog.exe:0000000140008818 i .idata$7 +prog.exe:00000001400088a4 i .idata$7 +prog.exe:00000001400087b8 i .idata$7 +prog.exe:0000000140008824 i .idata$7 +prog.exe:00000001400088dc i .idata$7 +prog.exe:0000000140008874 i .idata$7 +prog.exe:00000001400088ac i .idata$7 +prog.exe:000000014000886c i .idata$7 +prog.exe:00000001400088a8 i .idata$7 +prog.exe:00000001400087d8 i .idata$7 +prog.exe:00000001400087c8 i .idata$7 +prog.exe:00000001400087b0 i .idata$7 +prog.exe:0000000140001407 t .l_end +prog.exe:00000001400013e7 t .l_endw +prog.exe:00000001400013f4 t .l_start +prog.exe:00000001400013d4 t .l_startw +prog.exe:00000001400051ec p .pdata +prog.exe:00000001400050a8 p .pdata +prog.exe:000000014000512c p .pdata +prog.exe:00000001400050f0 p .pdata +prog.exe:0000000140005000 p .pdata +prog.exe:00000001400050e4 p .pdata +prog.exe:0000000140005168 p .pdata +prog.exe:0000000140005078 p .pdata +prog.exe:0000000140005204 p .pdata +prog.exe:00000001400051e0 p .pdata +prog.exe:0000000140005138 p .pdata +prog.exe:00000001400051f8 p .pdata +prog.exe:0000000140005084 p .pdata +prog.exe:00000001400051d4 p .pdata +prog.exe:0000000140005054 p .pdata +prog.exe:0000000140005114 p .pdata +prog.exe:00000001400050d8 p .pdata +prog.exe:00000001400050b4 p .pdata +prog.exe:0000000140005270 p .pdata.startup +prog.exe:000000014000506c p .pdata.startup +prog.exe:0000000140004000 r .rdata +prog.exe:0000000140004020 r .rdata +prog.exe:0000000140004350 r .rdata +prog.exe:00000001400041c0 r .rdata +prog.exe:0000000140004080 r .rdata +prog.exe:0000000140004320 r .rdata +prog.exe:0000000140004390 r .rdata$.refptr.__CTOR_LIST__ +prog.exe:00000001400043d0 r .rdata$.refptr.__dyn_tls_init_callback +prog.exe:00000001400043a0 r .rdata$.refptr.__ImageBase +prog.exe:00000001400043e0 r .rdata$.refptr.__imp___initenv +prog.exe:00000001400043f0 r .rdata$.refptr.__imp__tzset +prog.exe:0000000140004400 r .rdata$.refptr.__mingw_app_type +prog.exe:0000000140004410 r .rdata$.refptr.__mingw_initltsdrot_force +prog.exe:0000000140004420 r .rdata$.refptr.__mingw_initltsdyn_force +prog.exe:0000000140004430 r .rdata$.refptr.__mingw_initltssuo_force +prog.exe:0000000140004440 r .rdata$.refptr.__mingw_module_is_dll +prog.exe:0000000140004450 r .rdata$.refptr.__mingw_oldexcpt_handler +prog.exe:0000000140004460 r .rdata$.refptr.__native_startup_lock +prog.exe:0000000140004470 r .rdata$.refptr.__native_startup_state +prog.exe:00000001400043c0 r .rdata$.refptr.__RUNTIME_PSEUDO_RELOC_LIST__ +prog.exe:00000001400043b0 r .rdata$.refptr.__RUNTIME_PSEUDO_RELOC_LIST_END__ +prog.exe:0000000140004480 r .rdata$.refptr.__xc_a +prog.exe:0000000140004490 r .rdata$.refptr.__xc_z +prog.exe:00000001400044a0 r .rdata$.refptr.__xi_a +prog.exe:00000001400044b0 r .rdata$.refptr.__xi_z +prog.exe:00000001400044c0 r .rdata$.refptr._commode +prog.exe:0000000140004370 r .rdata$.refptr._CRT_MT +prog.exe:00000001400044d0 r .rdata$.refptr._dowildcard +prog.exe:00000001400044e0 r .rdata$.refptr._fmode +prog.exe:00000001400044f0 r .rdata$.refptr._gnu_exception_handler +prog.exe:0000000140004500 r .rdata$.refptr._matherr +prog.exe:0000000140004380 r .rdata$.refptr._MINGW_INSTALL_DEBUG_MATHERR +prog.exe:0000000140004510 r .rdata$.refptr._newmode +prog.exe:0000000140004a90 r .rdata$zzz +prog.exe:0000000140004970 r .rdata$zzz +prog.exe:0000000140004580 r .rdata$zzz +prog.exe:0000000140004940 r .rdata$zzz +prog.exe:0000000140004880 r .rdata$zzz +prog.exe:0000000140004af0 r .rdata$zzz +prog.exe:0000000140004730 r .rdata$zzz +prog.exe:00000001400047f0 r .rdata$zzz +prog.exe:0000000140004760 r .rdata$zzz +prog.exe:00000001400045b0 r .rdata$zzz +prog.exe:0000000140004790 r .rdata$zzz +prog.exe:0000000140004700 r .rdata$zzz +prog.exe:0000000140004a30 r .rdata$zzz +prog.exe:00000001400048b0 r .rdata$zzz +prog.exe:0000000140004a60 r .rdata$zzz +prog.exe:0000000140004a00 r .rdata$zzz +prog.exe:00000001400046d0 r .rdata$zzz +prog.exe:00000001400048e0 r .rdata$zzz +prog.exe:00000001400049d0 r .rdata$zzz +prog.exe:0000000140004850 r .rdata$zzz +prog.exe:0000000140004910 r .rdata$zzz +prog.exe:00000001400046a0 r .rdata$zzz +prog.exe:00000001400047c0 r .rdata$zzz +prog.exe:0000000140004640 r .rdata$zzz +prog.exe:00000001400045e0 r .rdata$zzz +prog.exe:0000000140004550 r .rdata$zzz +prog.exe:0000000140004820 r .rdata$zzz +prog.exe:00000001400049a0 r .rdata$zzz +prog.exe:0000000140004ac0 r .rdata$zzz +prog.exe:0000000140004610 r .rdata$zzz +prog.exe:0000000140004520 r .rdata$zzz +prog.exe:0000000140004670 r .rdata$zzz +prog.exe:0000000140004390 R .refptr.__CTOR_LIST__ +prog.exe:00000001400043d0 R .refptr.__dyn_tls_init_callback +prog.exe:00000001400043a0 R .refptr.__ImageBase +prog.exe:00000001400043e0 R .refptr.__imp___initenv +prog.exe:00000001400043f0 R .refptr.__imp__tzset +prog.exe:0000000140004400 R .refptr.__mingw_app_type +prog.exe:0000000140004410 R .refptr.__mingw_initltsdrot_force +prog.exe:0000000140004420 R .refptr.__mingw_initltsdyn_force +prog.exe:0000000140004430 R .refptr.__mingw_initltssuo_force +prog.exe:0000000140004440 R .refptr.__mingw_module_is_dll +prog.exe:0000000140004450 R .refptr.__mingw_oldexcpt_handler +prog.exe:0000000140004460 R .refptr.__native_startup_lock +prog.exe:0000000140004470 R .refptr.__native_startup_state +prog.exe:00000001400043c0 R .refptr.__RUNTIME_PSEUDO_RELOC_LIST__ +prog.exe:00000001400043b0 R .refptr.__RUNTIME_PSEUDO_RELOC_LIST_END__ +prog.exe:0000000140004480 R .refptr.__xc_a +prog.exe:0000000140004490 R .refptr.__xc_z +prog.exe:00000001400044a0 R .refptr.__xi_a +prog.exe:00000001400044b0 R .refptr.__xi_z +prog.exe:00000001400044c0 R .refptr._commode +prog.exe:0000000140004370 R .refptr._CRT_MT +prog.exe:00000001400044d0 R .refptr._dowildcard +prog.exe:00000001400044e0 R .refptr._fmode +prog.exe:00000001400044f0 R .refptr._gnu_exception_handler +prog.exe:0000000140004500 R .refptr._matherr +prog.exe:0000000140004380 R .refptr._MINGW_INSTALL_DEBUG_MATHERR +prog.exe:0000000140004510 R .refptr._newmode +prog.exe:000000014000b000 r .rsrc +prog.exe:0000000140002918 t .text +prog.exe:0000000140002910 t .text +prog.exe:0000000140002908 t .text +prog.exe:0000000140002960 t .text +prog.exe:0000000140002900 t .text +prog.exe:00000001400028f8 t .text +prog.exe:00000001400028f0 t .text +prog.exe:00000001400028e8 t .text +prog.exe:00000001400028e0 t .text +prog.exe:0000000140002960 t .text +prog.exe:00000001400028d8 t .text +prog.exe:00000001400028d0 t .text +prog.exe:00000001400028c8 t .text +prog.exe:00000001400028c0 t .text +prog.exe:00000001400028c0 t .text +prog.exe:0000000140002928 t .text +prog.exe:0000000140002920 t .text +prog.exe:0000000140002938 t .text +prog.exe:0000000140002970 t .text +prog.exe:00000001400028c0 t .text +prog.exe:0000000140002940 t .text +prog.exe:00000001400029f0 t .text +prog.exe:00000001400028b0 t .text +prog.exe:00000001400028a8 t .text +prog.exe:0000000140002970 t .text +prog.exe:0000000140002960 t .text +prog.exe:0000000140002898 t .text +prog.exe:0000000140002890 t .text +prog.exe:0000000140002888 t .text +prog.exe:0000000140002880 t .text +prog.exe:0000000140002970 t .text +prog.exe:0000000140002880 t .text +prog.exe:0000000140002880 t .text +prog.exe:0000000140002930 t .text +prog.exe:0000000140001000 t .text +prog.exe:0000000140002878 t .text +prog.exe:0000000140002870 t .text +prog.exe:0000000140002978 t .text +prog.exe:0000000140002870 t .text +prog.exe:00000001400029f0 t .text +prog.exe:0000000140001430 t .text +prog.exe:0000000140002868 t .text +prog.exe:0000000140002860 t .text +prog.exe:0000000140002858 t .text +prog.exe:0000000140002980 t .text +prog.exe:0000000140002850 t .text +prog.exe:0000000140001450 t .text +prog.exe:0000000140002630 t .text +prog.exe:00000001400029f0 t .text +prog.exe:0000000140001450 t .text +prog.exe:00000001400029e8 t .text +prog.exe:0000000140002988 t .text +prog.exe:0000000140002950 t .text +prog.exe:0000000140001470 t .text +prog.exe:0000000140001540 t .text +prog.exe:00000001400029e0 t .text +prog.exe:0000000140001540 t .text +prog.exe:0000000140001540 t .text +prog.exe:0000000140002958 t .text +prog.exe:0000000140002950 t .text +prog.exe:0000000140002990 t .text +prog.exe:0000000140002630 t .text +prog.exe:0000000140001550 t .text +prog.exe:00000001400028a0 t .text +prog.exe:00000001400029d8 t .text +prog.exe:00000001400025f0 t .text +prog.exe:0000000140002990 t .text +prog.exe:0000000140001550 t .text +prog.exe:00000001400029d0 t .text +prog.exe:00000001400025a0 t .text +prog.exe:0000000140001620 t .text +prog.exe:0000000140001620 t .text +prog.exe:0000000140002990 t .text +prog.exe:0000000140002550 t .text +prog.exe:0000000140001620 t .text +prog.exe:00000001400029c8 t .text +prog.exe:0000000140002530 t .text +prog.exe:0000000140001720 t .text +prog.exe:0000000140002530 t .text +prog.exe:0000000140002998 t .text +prog.exe:0000000140002530 t .text +prog.exe:00000001400024f0 t .text +prog.exe:0000000140001730 t .text +prog.exe:00000001400020f0 t .text +prog.exe:00000001400029c0 t .text +prog.exe:0000000140001730 t .text +prog.exe:00000001400029b8 t .text +prog.exe:0000000140002950 t .text +prog.exe:00000001400029a0 t .text +prog.exe:0000000140001c70 t .text +prog.exe:00000001400029b0 t .text +prog.exe:0000000140001cc0 t .text +prog.exe:0000000140001cc0 t .text +prog.exe:00000001400029a8 t .text +prog.exe:00000001400029a0 t .text +prog.exe:0000000140001e80 t .text +prog.exe:00000001400029a0 t .text +prog.exe:00000001400020f0 t .text +prog.exe:00000001400020f0 t .text +prog.exe:0000000140002870 t .text +prog.exe:00000001400029f0 t .text.startup +prog.exe:0000000140002a30 t .text.startup +prog.exe:000000014000a000 d .tls +prog.exe:000000014000a008 d .tls$ZZZ +prog.exe:000000014000606c r .xdata +prog.exe:0000000140006114 r .xdata +prog.exe:000000014000607c r .xdata +prog.exe:0000000140006000 r .xdata +prog.exe:0000000140006098 r .xdata +prog.exe:0000000140006190 r .xdata +prog.exe:000000014000610c r .xdata +prog.exe:000000014000609c r .xdata +prog.exe:0000000140006184 r .xdata +prog.exe:0000000140006198 r .xdata +prog.exe:0000000140006080 r .xdata +prog.exe:0000000140006100 r .xdata +prog.exe:0000000140006178 r .xdata +prog.exe:0000000140006170 r .xdata +prog.exe:00000001400060b4 r .xdata +prog.exe:00000001400060cc r .xdata +prog.exe:00000001400060d0 r .xdata +prog.exe:0000000140006144 r .xdata +prog.exe:0000000140006074 r .xdata.startup +prog.exe:00000001400061e8 r .xdata.startup +prog.exe:00000001400024f0 T ___chkstk_ms +prog.exe:0000000140009018 D ___crt_xc_end__ +prog.exe:0000000140009000 D ___crt_xc_start__ +prog.exe:0000000140009030 D ___crt_xi_end__ +prog.exe:0000000140009018 D ___crt_xi_start__ +prog.exe:0000000140009030 D ___crt_xl_start__ +prog.exe:0000000140009050 D ___crt_xp_end__ +prog.exe:0000000140009050 D ___crt_xp_start__ +prog.exe:0000000140009050 D ___crt_xt_end__ +prog.exe:0000000140009050 D ___crt_xt_start__ +prog.exe:0000000140002a40 T ___CTOR_LIST__ +prog.exe:0000000140002a58 T ___DTOR_LIST__ +prog.exe:0000000140004b20 R ___RUNTIME_PSEUDO_RELOC_LIST__ +prog.exe:0000000140004b20 R ___RUNTIME_PSEUDO_RELOC_LIST_END__ +prog.exe:000000014000a010 D ___tls_end__ +prog.exe:000000014000a000 D ___tls_start__ +prog.exe:0000000140001ef0 T ___w64_mingwthr_add_key_dtor +prog.exe:0000000140001f60 T ___w64_mingwthr_remove_key_dtor +prog.exe:0000000140002880 T __acrt_iob_func +prog.exe:0000000140007180 B __bss_end__ +prog.exe:0000000140007000 B __bss_start__ +prog.exe:0000000140002950 T __C_specific_handler +prog.exe:0000000140002a40 T __CTOR_LIST__ +prog.exe:0000000140003120 D __data_end__ +prog.exe:0000000140003000 D __data_start__ +prog.exe:0000000140002850 T __daylight +prog.exe:0000000000000000 A __dll__ +prog.exe:0000000000000160 A __dll_characteristics__ +prog.exe:00000001400014b0 T __do_global_ctors +prog.exe:0000000140001470 T __do_global_dtors +prog.exe:0000000140002a58 T __DTOR_LIST__ +prog.exe:0000000140001550 t __dyn_tls_dtor +prog.exe:0000000140001580 T __dyn_tls_init +prog.exe:0000000140004020 R __dyn_tls_init_callback +prog.exe: U __end__ +prog.exe:0000000000000200 A __file_alignment__ +prog.exe:0000000140001440 T __gcc_deregister_frame +prog.exe:0000000140001430 T __gcc_register_frame +prog.exe:0000000140002640 T __getmainargs +prog.exe:0000000140008468 I __IAT_end__ +prog.exe:0000000140008298 I __IAT_start__ +prog.exe:00000001400083e8 I __imp___acrt_iob_func +prog.exe:0000000140008340 I __imp___C_specific_handler +prog.exe:0000000140008440 I __imp___daylight +prog.exe:00000001400030c8 D __imp___getmainargs +prog.exe:0000000140003098 D __imp___initenv +prog.exe:00000001400030a0 D __imp___ms_fwprintf +prog.exe:0000000140008358 I __imp___p___argc +prog.exe:0000000140008360 I __imp___p___argv +prog.exe:0000000140008368 I __imp___p___wargv +prog.exe:00000001400083f0 I __imp___p__commode +prog.exe:00000001400082f0 I __imp___p__environ +prog.exe:00000001400083f8 I __imp___p__fmode +prog.exe:00000001400082f8 I __imp___p__wenviron +prog.exe:00000001400083b8 I __imp___set_app_type +prog.exe:0000000140008330 I __imp___setusermatherr +prog.exe:0000000140008400 I __imp___stdio_common_vfprintf +prog.exe:0000000140008408 I __imp___stdio_common_vfscanf +prog.exe:0000000140008410 I __imp___stdio_common_vfwprintf +prog.exe:0000000140008448 I __imp___timezone +prog.exe:0000000140008450 I __imp___tzname +prog.exe:00000001400030c0 D __imp___wgetmainargs +prog.exe:0000000140003090 D __imp___winitenv +prog.exe:00000001400030b8 D __imp__amsg_exit +prog.exe:0000000140008370 I __imp__cexit +prog.exe:0000000140008378 I __imp__configure_narrow_argv +prog.exe:0000000140008380 I __imp__configure_wide_argv +prog.exe:0000000140008388 I __imp__crt_at_quick_exit +prog.exe:0000000140008390 I __imp__crt_atexit +prog.exe:0000000140008398 I __imp__exit +prog.exe:00000001400030b0 D __imp__get_output_format +prog.exe:00000001400083a0 I __imp__initialize_narrow_environment +prog.exe:00000001400083a8 I __imp__initialize_wide_environment +prog.exe:00000001400083b0 I __imp__initterm +prog.exe:0000000140003110 D __imp__onexit +prog.exe:00000001400083c0 I __imp__set_invalid_parameter_handler +prog.exe:0000000140008308 I __imp__set_new_mode +prog.exe:0000000140008458 I __imp__tzset +prog.exe:00000001400083c8 I __imp_abort +prog.exe:0000000140003108 D __imp_at_quick_exit +prog.exe:0000000140008310 I __imp_calloc +prog.exe:00000001400030d0 D __imp_daylight +prog.exe:0000000140008298 I __imp_DeleteCriticalSection +prog.exe:00000001400082a0 I __imp_EnterCriticalSection +prog.exe:00000001400083d0 I __imp_exit +prog.exe:0000000140003080 D __imp_fprintf +prog.exe:0000000140008318 I __imp_free +prog.exe:0000000140008418 I __imp_fwrite +prog.exe:00000001400082a8 I __imp_GetLastError +prog.exe:00000001400082b0 I __imp_InitializeCriticalSection +prog.exe:00000001400082b8 I __imp_LeaveCriticalSection +prog.exe:0000000140008320 I __imp_malloc +prog.exe:0000000140008348 I __imp_memcpy +prog.exe:0000000140003070 D __imp_printf +prog.exe:0000000140003060 D __imp_scanf +prog.exe:00000001400082c0 I __imp_SetUnhandledExceptionFilter +prog.exe:00000001400083d8 I __imp_signal +prog.exe:00000001400082c8 I __imp_Sleep +prog.exe:0000000140008428 I __imp_strlen +prog.exe:0000000140008430 I __imp_strncmp +prog.exe:00000001400030d8 D __imp_timezone +prog.exe:00000001400082d0 I __imp_TlsGetValue +prog.exe:00000001400030e0 D __imp_tzname +prog.exe:00000001400030a8 D __imp_tzset +prog.exe:0000000140003050 D __imp_vfprintf +prog.exe:00000001400082d8 I __imp_VirtualProtect +prog.exe:00000001400082e0 I __imp_VirtualQuery +prog.exe:00000001400087f0 I __lib64_libapi_ms_win_crt_environment_l1_1_0_a_iname +prog.exe:0000000140008828 I __lib64_libapi_ms_win_crt_heap_l1_1_0_a_iname +prog.exe:000000014000884c I __lib64_libapi_ms_win_crt_math_l1_1_0_a_iname +prog.exe:0000000140008874 I __lib64_libapi_ms_win_crt_private_l1_1_0_a_iname +prog.exe:00000001400088dc I __lib64_libapi_ms_win_crt_runtime_l1_1_0_a_iname +prog.exe:000000014000891c I __lib64_libapi_ms_win_crt_stdio_l1_1_0_a_iname +prog.exe:0000000140008944 I __lib64_libapi_ms_win_crt_string_l1_1_0_a_iname +prog.exe:0000000140008978 I __lib64_libapi_ms_win_crt_time_l1_1_0_a_iname +prog.exe:00000001400087d8 I __lib64_libkernel32_a_iname +prog.exe:0000000000000000 A __loader_flags__ +prog.exe:0000000140001520 T __main +prog.exe:0000000000000000 A __major_image_version__ +prog.exe:0000000000000004 A __major_os_version__ +prog.exe:0000000000000005 A __major_subsystem_version__ +prog.exe:0000000140007080 B __mingw_app_type +prog.exe:0000000140002420 T __mingw_enum_import_library_names +prog.exe:0000000140002290 T __mingw_GetSectionCount +prog.exe:0000000140002210 T __mingw_GetSectionForAddress +prog.exe:0000000140007068 B __mingw_initltsdrot_force +prog.exe:0000000140007064 B __mingw_initltsdyn_force +prog.exe:0000000140007060 B __mingw_initltssuo_force +prog.exe:0000000140001000 t __mingw_invalidParameterHandler +prog.exe:0000000140007000 B __mingw_module_is_dll +prog.exe:00000001400070c0 B __mingw_oldexcpt_handler +prog.exe:0000000140009020 D __mingw_pcinit +prog.exe:0000000140009008 D __mingw_pcppinit +prog.exe:0000000140001c70 T __mingw_raise_matherr +prog.exe:0000000140001cb0 T __mingw_setusermatherr +prog.exe:0000000140001ff0 T __mingw_TLScallback +prog.exe:0000000140007100 b __mingwthr_cs +prog.exe:00000001400070e8 b __mingwthr_cs_init +prog.exe:0000000140001e80 t __mingwthr_run_key_dtors.part.0 +prog.exe:0000000000000000 A __minor_image_version__ +prog.exe:0000000000000000 A __minor_os_version__ +prog.exe:0000000000000002 A __minor_subsystem_version__ +prog.exe:0000000140002790 T __ms_fwprintf +prog.exe:0000000140003014 D __native_dllmain_reason +prog.exe:0000000140007040 B __native_startup_lock +prog.exe:0000000140007048 B __native_startup_state +prog.exe:0000000140003010 D __native_vcclrit_reason +prog.exe:00000001400028c0 T __p___argc +prog.exe:00000001400028c8 T __p___argv +prog.exe:00000001400028d0 T __p___wargv +prog.exe:0000000140002888 T __p__commode +prog.exe:0000000140002990 T __p__environ +prog.exe:0000000140002890 T __p__fmode +prog.exe:0000000140002998 T __p__wenviron +prog.exe:0000000140001730 t __report_error +prog.exe:0000000140004b20 R __rt_psrelocs_end +prog.exe:0000000000000000 A __rt_psrelocs_size +prog.exe:0000000140004b20 R __rt_psrelocs_start +prog.exe:0000000140004b20 R __RUNTIME_PSEUDO_RELOC_LIST__ +prog.exe:0000000140004b20 R __RUNTIME_PSEUDO_RELOC_LIST_END__ +prog.exe:0000000000001000 A __section_alignment__ +prog.exe:0000000140002920 T __set_app_type +prog.exe:0000000140002960 T __setusermatherr +prog.exe:0000000000001000 A __size_of_heap_commit__ +prog.exe:0000000000100000 A __size_of_heap_reserve__ +prog.exe:0000000000001000 A __size_of_stack_commit__ +prog.exe:0000000000200000 A __size_of_stack_reserve__ +prog.exe:0000000140002898 T __stdio_common_vfprintf +prog.exe:00000001400028a0 T __stdio_common_vfscanf +prog.exe:00000001400028a8 T __stdio_common_vfwprintf +prog.exe:0000000000000003 A __subsystem__ +prog.exe:0000000140002858 T __timezone +prog.exe:0000000140001610 T __tlregdtor +prog.exe:0000000140001180 t __tmainCRTStartup +prog.exe:0000000140002860 T __tzname +prog.exe:00000001400026b0 T __wgetmainargs +prog.exe:0000000140009000 D __xc_a +prog.exe:0000000140009010 D __xc_z +prog.exe:0000000140009050 d __xd_a +prog.exe:0000000140009058 d __xd_z +prog.exe:0000000140009018 D __xi_a +prog.exe:0000000140009028 D __xi_z +prog.exe:0000000140009030 D __xl_a +prog.exe:0000000140009038 D __xl_c +prog.exe:0000000140009040 D __xl_d +prog.exe:0000000140009048 D __xl_z +prog.exe:0000000140002760 T _amsg_exit +prog.exe:00000001400028d8 T _cexit +prog.exe:0000000140007070 B _commode +prog.exe:00000001400028e0 T _configure_narrow_argv +prog.exe:00000001400028e8 T _configure_wide_argv +prog.exe:00000001400028f0 T _crt_at_quick_exit +prog.exe:00000001400028f8 T _crt_atexit +prog.exe:0000000140003030 D _CRT_MT +prog.exe:0000000140003020 D _dowildcard +prog.exe:0000000140002900 T _exit +prog.exe:0000000140002120 T _FindPESection +prog.exe:0000000140002170 T _FindPESectionByName +prog.exe:00000001400022d0 T _FindPESectionExec +prog.exe:00000001400070b0 B _fmode +prog.exe:0000000140001720 T _fpreset +prog.exe:0000000140002630 T _get_output_format +prog.exe:0000000140002350 T _GetPEImageBase +prog.exe:0000000140001cc0 T _gnu_exception_handler +prog.exe:0000000140008014 I _head_lib64_libapi_ms_win_crt_environment_l1_1_0_a +prog.exe:0000000140008028 I _head_lib64_libapi_ms_win_crt_heap_l1_1_0_a +prog.exe:000000014000803c I _head_lib64_libapi_ms_win_crt_math_l1_1_0_a +prog.exe:0000000140008050 I _head_lib64_libapi_ms_win_crt_private_l1_1_0_a +prog.exe:0000000140008064 I _head_lib64_libapi_ms_win_crt_runtime_l1_1_0_a +prog.exe:0000000140008078 I _head_lib64_libapi_ms_win_crt_stdio_l1_1_0_a +prog.exe:000000014000808c I _head_lib64_libapi_ms_win_crt_string_l1_1_0_a +prog.exe:00000001400080a0 I _head_lib64_libapi_ms_win_crt_time_l1_1_0_a +prog.exe:0000000140008000 I _head_lib64_libkernel32_a +prog.exe:0000000140002908 T _initialize_narrow_environment +prog.exe:0000000140002910 T _initialize_wide_environment +prog.exe:0000000140002918 T _initterm +prog.exe:0000000140002390 T _IsNonwritableInCurrentImage +prog.exe:0000000140001620 T _matherr +prog.exe:0000000140003040 D _MINGW_INSTALL_DEBUG_MATHERR +prog.exe:0000000140007050 B _newmode +prog.exe:0000000140002720 T _onexit +prog.exe:0000000140001910 T _pei386_runtime_relocator +prog.exe:0000000140002928 T _set_invalid_parameter_handler +prog.exe:0000000140002970 T _set_new_mode +prog.exe:0000000140001540 T _setargv +prog.exe:000000014000a008 D _tls_end +prog.exe:000000014000706c B _tls_index +prog.exe:000000014000a000 D _tls_start +prog.exe:0000000140004040 R _tls_used +prog.exe:0000000140002810 T _tzset +prog.exe:00000001400020f0 T _ValidateImageBase +prog.exe:0000000140002930 T abort +prog.exe:0000000140007028 b argc +prog.exe:0000000140007020 b argv +prog.exe:0000000140002740 T at_quick_exit +prog.exe:0000000140001410 T atexit +prog.exe:0000000140002978 T calloc +prog.exe:00000001400029e8 T DeleteCriticalSection +prog.exe:00000001400029e0 T EnterCriticalSection +prog.exe:0000000140007018 b envp +prog.exe:0000000140002938 T exit +prog.exe:0000000140001450 T fact +prog.exe:0000000140001720 T fpreset +prog.exe:00000001400025f0 T fprintf +prog.exe:0000000140002980 T free +prog.exe:0000000140008308 i fthunk +prog.exe:0000000140008330 i fthunk +prog.exe:00000001400082f0 i fthunk +prog.exe:0000000140008358 i fthunk +prog.exe:00000001400083e8 i fthunk +prog.exe:0000000140008428 i fthunk +prog.exe:0000000140008298 i fthunk +prog.exe:0000000140008340 i fthunk +prog.exe:0000000140008440 i fthunk +prog.exe:00000001400028b0 T fwrite +prog.exe:00000001400029d8 T GetLastError +prog.exe:0000000140007008 b has_cctor +prog.exe:0000000140008138 i hname +prog.exe:0000000140008218 i hname +prog.exe:0000000140008258 i hname +prog.exe:0000000140008188 i hname +prog.exe:0000000140008160 i hname +prog.exe:0000000140008120 i hname +prog.exe:0000000140008170 i hname +prog.exe:00000001400080c8 i hname +prog.exe:0000000140008270 i hname +prog.exe:00000001400030e8 d initial_daylight +prog.exe:00000001400030ec d initial_timezone +prog.exe:0000000140003104 d initial_tzname0 +prog.exe:0000000140003100 d initial_tzname1 +prog.exe:00000001400030f0 d initial_tznames +prog.exe:00000001400029d0 T InitializeCriticalSection +prog.exe:0000000140007030 b initialized +prog.exe:00000001400070e0 b key_dtor_list +prog.exe:00000001400029c8 T LeaveCriticalSection +prog.exe:0000000140007178 b local__initenv +prog.exe:0000000140007170 b local__winitenv +prog.exe:00000001400029f0 T main +prog.exe:00000001400013f0 T mainCRTStartup +prog.exe:0000000140007010 b mainret +prog.exe:0000000140002988 T malloc +prog.exe:000000014000700c b managedapp +prog.exe:00000001400017a0 t mark_section_writable +prog.exe:0000000140007094 b maxSections +prog.exe:0000000140002958 T memcpy +prog.exe:0000000140003000 d p.0 +prog.exe:0000000140001010 t pre_c_init +prog.exe:0000000140001130 t pre_cpp_init +prog.exe:00000001400025a0 T printf +prog.exe:0000000140002a30 t register_frame_ctor +prog.exe:0000000140002550 T scanf +prog.exe:00000001400029c0 T SetUnhandledExceptionFilter +prog.exe:0000000140002940 T signal +prog.exe:00000001400029b8 T Sleep +prog.exe:0000000140007004 b startinfo +prog.exe:0000000140002870 T strlen +prog.exe:0000000140002878 T strncmp +prog.exe:00000001400070a0 b stUserMathErr +prog.exe:0000000140007098 b the_secs +prog.exe:00000001400029b0 T TlsGetValue +prog.exe:00000001400027d0 T tzset +prog.exe:0000000140002530 T vfprintf +prog.exe:00000001400029a8 T VirtualProtect +prog.exe:00000001400029a0 T VirtualQuery +prog.exe:0000000140007090 b was_init.0 +prog.exe:00000001400013d0 T WinMainCRTStartup diff --git a/Lect6/65-68/funct.o b/Lect6/65-68/funct.o new file mode 100644 index 0000000..bcb4ceb Binary files /dev/null and b/Lect6/65-68/funct.o differ diff --git a/Lect6/65-68/function.c b/Lect6/65-68/function.c new file mode 100644 index 0000000..2bdc500 --- /dev/null +++ b/Lect6/65-68/function.c @@ -0,0 +1,5 @@ +unsigned int fact(unsigned n) { + if(n==0) + return 1; + return n * fact(n-1); +} diff --git a/Lect6/65-68/main.c b/Lect6/65-68/main.c new file mode 100644 index 0000000..c8c0c56 --- /dev/null +++ b/Lect6/65-68/main.c @@ -0,0 +1,11 @@ +#include + +extern unsigned int fact(unsigned int); + +int main (void) { + unsigned int n; + scanf("%u",&n); + + printf ("fact = %lld\n", fact ( n )); + return 0; +} \ No newline at end of file diff --git a/Lect6/65-68/main.o b/Lect6/65-68/main.o new file mode 100644 index 0000000..5609812 Binary files /dev/null and b/Lect6/65-68/main.o differ diff --git a/Lect6/65-68/prog.exe b/Lect6/65-68/prog.exe new file mode 100644 index 0000000..f04cee4 Binary files /dev/null and b/Lect6/65-68/prog.exe differ diff --git a/Lect6/71.c b/Lect6/71.c new file mode 100644 index 0000000..b4adb2d --- /dev/null +++ b/Lect6/71.c @@ -0,0 +1,19 @@ +#include +#include + +_Bool checkPass(char *p) { + if(strcmp(p,"secret")==0) + return 1; + return 0; +} + +int main(void){ + char password[100]; + printf("Input your password: "); + scanf("%s",password); + if(checkPass(password)) + printf("Access granted\n"); + else + printf("Access denied\n"); + return 0; +} diff --git a/Lect6/71.exe b/Lect6/71.exe new file mode 100644 index 0000000..70d7664 Binary files /dev/null and b/Lect6/71.exe differ diff --git a/Lect6/71.o b/Lect6/71.o new file mode 100644 index 0000000..90da73b Binary files /dev/null and b/Lect6/71.o differ diff --git a/Lect6/71.txt b/Lect6/71.txt new file mode 100644 index 0000000..6193807 --- /dev/null +++ b/Lect6/71.txt @@ -0,0 +1,3318 @@ +!This program cannot be run in DOS mode. +.text +`.data +.rdata +@.pdata +@.xdata +@.bss +.idata +.CRT +.tls +.rsrc +@.reloc +B/19 +B/31 +B/45 +B/57 +B/70 +B/81 +B/97 +B/113 +8MZu +HcP + + + + + + + + + + + + + + + + + + + + + + + +9GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +char +size_t +long long unsigned int +long long int +uintptr_t +wchar_t +short unsigned int +long int +unsigned int +long unsigned int +unsigned char +_EXCEPTION_RECORD +ExceptionCode +ExceptionFlags +ExceptionAddress +NumberParameters +ExceptionInformation +._CONTEXT +P1Home +P2Home +P3Home +P4Home +P5Home +P6Home +ContextFlags +MxCsr +SegCs +SegDs +SegEs +SegFs +SegGs +SegSs +EFlags +VectorRegister +VectorControl +DebugControl +LastBranchToRip +LastBranchFromRip +LastExceptionToRip +LastExceptionFromRip +BYTE +WORD +DWORD +float +__globallocalestatus +signed char +short int +ULONG_PTR +DWORD64 +PVOID +LONG +LONGLONG +ULONGLONG +EXCEPTION_ROUTINE +PEXCEPTION_ROUTINE +=_M128A +High +/M128A +_onexit_t +double +long double +_invalid_parameter_handler +_Float16 +__bf16 +._XMM_SAVE_AREA32 +ControlWord +StatusWord +TagWord +Reserved1 +ErrorOpcode +ErrorOffset +ErrorSelector +Reserved2 +DataOffset +DataSelector +Reserved3 +MxCsr +MxCsr_Mask +FloatRegisters +XmmRegisters +Reserved4 +/XMM_SAVE_AREA32 +Header +Legacy +Xmm0 +Xmm1 +Xmm2 +Xmm3 +Xmm4 +Xmm5 +Xmm6 +Xmm7 +Xmm8 +Xmm9 +Xmm10 +Xmm11 +Xmm12 +Xmm13 +Xmm14 +Xmm15 +1FltSave +1FloatSave +PCONTEXT +EXCEPTION_RECORD +PEXCEPTION_RECORD +_EXCEPTION_POINTERS +ContextRecord +EXCEPTION_POINTERS +Next +prev +_EXCEPTION_REGISTRATION_RECORD +Handler +handler +FiberData +Version +_NT_TIB +ExceptionList +StackBase +StackLimit +SubSystemTib +ArbitraryUserPointer +Self +NT_TIB +PNT_TIB +2JOB_OBJECT_NET_RATE_CONTROL_FLAGS +JOB_OBJECT_NET_RATE_CONTROL_ENABLE +JOB_OBJECT_NET_RATE_CONTROL_MAX_BANDWIDTH +JOB_OBJECT_NET_RATE_CONTROL_DSCP_TAG +JOB_OBJECT_NET_RATE_CONTROL_VALID_FLAGS +_IMAGE_DOS_HEADER +e_magic +e_cblp +e_cp +e_crlc +e_cparhdr +e_minalloc +e_maxalloc +e_ss +e_sp +e_csum +e_ip +e_cs +e_lfarlc +e_ovno +e_res +e_oemid +e_oeminfo +e_res2 +e_lfanew +IMAGE_DOS_HEADER +PIMAGE_DOS_HEADER +_IMAGE_FILE_HEADER +Machine +NumberOfSections +TimeDateStamp +PointerToSymbolTable +NumberOfSymbols +SizeOfOptionalHeader +Characteristics +IMAGE_FILE_HEADER +_IMAGE_DATA_DIRECTORY +VirtualAddress +Size +IMAGE_DATA_DIRECTORY +_IMAGE_OPTIONAL_HEADER +Magic +BaseOfData +PIMAGE_OPTIONAL_HEADER32 +_IMAGE_OPTIONAL_HEADER64 +Magic +IMAGE_OPTIONAL_HEADER64 +PIMAGE_OPTIONAL_HEADER64 +C_IMAGE_NT_HEADERS64 +Signature +FileHeader +OptionalHeader +PIMAGE_NT_HEADERS64 +PIMAGE_NT_HEADERS +PIMAGE_TLS_CALLBACK +PTOP_LEVEL_EXCEPTION_FILTER +LPTOP_LEVEL_EXCEPTION_FILTER +DtagCOINITBASE +COINITBASE_MULTITHREADED +2VARENUM +VT_EMPTY +VT_NULL +VT_I2 +VT_I4 +VT_R4 +VT_R8 +VT_CY +VT_DATE +VT_BSTR +VT_DISPATCH +VT_ERROR +VT_BOOL +VT_VARIANT +VT_UNKNOWN +VT_DECIMAL +VT_I1 +VT_UI1 +VT_UI2 +VT_UI4 +VT_I8 +VT_UI8 +VT_INT +VT_UINT +VT_VOID +VT_HRESULT +VT_PTR +VT_SAFEARRAY +VT_CARRAY +VT_USERDEFINED +VT_LPSTR +VT_LPWSTR +VT_RECORD +VT_INT_PTR +VT_UINT_PTR +VT_FILETIME +VT_BLOB +VT_STREAM +VT_STORAGE +VT_STREAMED_OBJECT +VT_STORED_OBJECT +VT_BLOB_OBJECT +VT_CF +VT_CLSID +VT_VERSIONED_STREAM +VT_BSTR_BLOB +VT_VECTOR +VT_ARRAY +VT_BYREF +VT_RESERVED +VT_ILLEGAL +VT_ILLEGALMASKED +VT_TYPEMASK +_dowildcard +_newmode +__imp___initenv +newmode +_startupinfo +__uninitialized +__initializing +__initialized +__native_startup_state +__native_startup_lock +_PVFV +_PIFV +I_exception +type +name +arg1 +arg2 +retval +_TCHAR +__ImageBase +_fmode +_commode +__xi_a +__xi_z +__xc_a +__xc_z +__dyn_tls_init_callback +__mingw_app_type +argc +argv +envp +Jargret +mainret +managedapp +has_cctor +startinfo +__mingw_oldexcpt_handler +4__mingw_pcinit +4__mingw_pcppinit +_MINGW_INSTALL_DEBUG_MATHERR +'__mingw_initltsdrot_force +'__mingw_initltsdyn_force +'__mingw_initltssuo_force +K__mingw_module_is_dll +(_onexit +memcpy +strlen +(malloc +"_cexit +C Lexit +main +"__main +"_fpreset +_set_invalid_parameter_handler +_gnu_exception_handler +SetUnhandledExceptionFilter +"_pei386_runtime_relocator +_initterm +_amsg_exit +Sleep +__getmainargs +(_matherr +__mingw_setusermatherr +)_setargv +)__p__commode +)__p__fmode +__set_app_type +Matexit +Nfunc +Oduplicate_ppstrings +Qcheck_managed_app +pDOSHeader +pPEHeader +pNTHeader32 +pNTHeader64 +5__tmainCRTStartup +lock_free +fiberid +nested +7mainCRTStartup +7WinMainCRTStartup +8pre_cpp_init +5pre_c_init +8__mingw_invalidParameterHandler + expression +R function +Q file +X line +Y pReserved +X_TEB +YNtCurrentTeb +,_InterlockedExchangePointer +Target +Value +,_InterlockedCompareExchangePointer +Destination +ExChange +Comperand +,__readgsqword +Offset +Zmemcpy +__builtin_memcpy +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +char +long long unsigned int +long long int +ptrdiff_t +short unsigned int +long int +unsigned int +long unsigned int +unsigned char +float +signed char +short int +double +long double +_Float16 +__bf16 +JOB_OBJECT_NET_RATE_CONTROL_FLAGS +JOB_OBJECT_NET_RATE_CONTROL_ENABLE +JOB_OBJECT_NET_RATE_CONTROL_MAX_BANDWIDTH +JOB_OBJECT_NET_RATE_CONTROL_DSCP_TAG +JOB_OBJECT_NET_RATE_CONTROL_VALID_FLAGS +tagCOINITBASE +COINITBASE_MULTITHREADED +VARENUM +VT_EMPTY +VT_NULL +VT_I2 +VT_I4 +VT_R4 +VT_R8 +VT_CY +VT_DATE +VT_BSTR +VT_DISPATCH +VT_ERROR +VT_BOOL +VT_VARIANT +VT_UNKNOWN +VT_DECIMAL +VT_I1 +VT_UI1 +VT_UI2 +VT_UI4 +VT_I8 +VT_UI8 +VT_INT +VT_UINT +VT_VOID +VT_HRESULT +VT_PTR +VT_SAFEARRAY +VT_CARRAY +VT_USERDEFINED +VT_LPSTR +VT_LPWSTR +VT_RECORD +VT_INT_PTR +VT_UINT_PTR +VT_FILETIME +VT_BLOB +VT_STREAM +VT_STORAGE +VT_STREAMED_OBJECT +VT_STORED_OBJECT +VT_BLOB_OBJECT +VT_CF +VT_CLSID +VT_VERSIONED_STREAM +VT_BSTR_BLOB +VT_VECTOR +VT_ARRAY +VT_BYREF +VT_RESERVED +VT_ILLEGAL +VT_ILLEGALMASKED +VT_TYPEMASK +func_ptr +__CTOR_LIST__ +__DTOR_LIST__ +initialized +atexit +__main + __do_global_ctors +nptrs + __do_global_dtors +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +char +long long unsigned int +long long int +short unsigned int +long int +unsigned int +long unsigned int +unsigned char +float +signed char +short int +double +long double +_Float16 +__bf16 +JOB_OBJECT_NET_RATE_CONTROL_FLAGS +JOB_OBJECT_NET_RATE_CONTROL_ENABLE +JOB_OBJECT_NET_RATE_CONTROL_MAX_BANDWIDTH +JOB_OBJECT_NET_RATE_CONTROL_DSCP_TAG +JOB_OBJECT_NET_RATE_CONTROL_VALID_FLAGS + tagCOINITBASE +COINITBASE_MULTITHREADED +VARENUM +VT_EMPTY +VT_NULL +VT_I2 +VT_I4 +VT_R4 +VT_R8 +VT_CY +VT_DATE +VT_BSTR +VT_DISPATCH +VT_ERROR +VT_BOOL +VT_VARIANT +VT_UNKNOWN +VT_DECIMAL +VT_I1 +VT_UI1 +VT_UI2 +VT_UI4 +VT_I8 +VT_UI8 +VT_INT +VT_UINT +VT_VOID +VT_HRESULT +VT_PTR +VT_SAFEARRAY +VT_CARRAY +VT_USERDEFINED +VT_LPSTR +VT_LPWSTR +VT_RECORD +VT_INT_PTR +VT_UINT_PTR +VT_FILETIME +VT_BLOB +VT_STREAM +VT_STORAGE +VT_STREAMED_OBJECT +VT_STORED_OBJECT +VT_BLOB_OBJECT +VT_CF +VT_CLSID +VT_VERSIONED_STREAM +VT_BSTR_BLOB +VT_VECTOR +VT_ARRAY +VT_BYREF +VT_RESERVED +VT_ILLEGAL +VT_ILLEGALMASKED +VT_TYPEMASK +__uninitialized +__initializing +__initialized +__native_startup_state +__native_startup_lock +__native_dllmain_reason +__native_vcclrit_reason +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +_dowildcard +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +char +long long unsigned int +long long int +short unsigned int +long int +unsigned int +long unsigned int +unsigned char +float +signed char +short int +double +long double +_Float16 +__bf16 +_setargv +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +_newmode +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +char +long long unsigned int +long long int +uintptr_t +short unsigned int +long int +unsigned int +long unsigned int +unsigned char +ULONG +WINBOOL +BOOL +DWORD +float +LPVOID +signed char +short int +ULONG_PTR +PVOID +HANDLE +ULONGLONG +double +long double +_Float16 +__bf16 +JOB_OBJECT_NET_RATE_CONTROL_FLAGS + JOB_OBJECT_NET_RATE_CONTROL_ENABLE + JOB_OBJECT_NET_RATE_CONTROL_MAX_BANDWIDTH + JOB_OBJECT_NET_RATE_CONTROL_DSCP_TAG + JOB_OBJECT_NET_RATE_CONTROL_VALID_FLAGS +PIMAGE_TLS_CALLBACK +_IMAGE_TLS_DIRECTORY64 +StartAddressOfRawData +EndAddressOfRawData +AddressOfIndex +AddressOfCallBacks +SizeOfZeroFill +Characteristics +IMAGE_TLS_DIRECTORY64 +IMAGE_TLS_DIRECTORY +_PVFV +_tls_index +_tls_start +_tls_end +__xl_a +__xl_z +_tls_used +__xd_a +__xd_z +_CRT_MT +__dyn_tls_init_callback +__xl_c +__xl_d +__mingw_initltsdrot_force +__mingw_initltsdyn_force +__mingw_initltssuo_force +__mingw_TLScallback +__dyn_tls_dtor +__tlregdtor +func +__dyn_tls_init +pfunc +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +_commode +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +char +long long unsigned int +long long int +short unsigned int +long int +unsigned int +long unsigned int +unsigned char +_PVFV +__xi_a +__xi_z +__xc_a +__xc_z +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +double +char +long long unsigned int +long long int +short unsigned int +long int +unsigned int +long unsigned int +unsigned char +float +long double +_exception +type +name +arg1 +arg2 +retval +_iobuf +_ptr +_cnt +_base +_flag +_file +_charbuf +_bufsiz +_tmpfname +FILE +fprintf +__acrt_iob_func +_matherr +pexcept +type +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +_fpreset +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +__mingw_app_type +'GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +__gnuc_va_list +__builtin_va_list +char +va_list +size_t +long long unsigned int +long long int +ptrdiff_t +short unsigned int +long int +unsigned int +long unsigned int +unsigned char +ULONG +WINBOOL +BYTE +WORD +DWORD +float +PBYTE +LPBYTE +PDWORD +LPVOID +LPCVOID +signed char +short int +ULONG_PTR +SIZE_T +PVOID +LONG +double +long double +_Float16 +__bf16 +JOB_OBJECT_NET_RATE_CONTROL_FLAGS +JOB_OBJECT_NET_RATE_CONTROL_ENABLE +JOB_OBJECT_NET_RATE_CONTROL_MAX_BANDWIDTH +JOB_OBJECT_NET_RATE_CONTROL_DSCP_TAG +JOB_OBJECT_NET_RATE_CONTROL_VALID_FLAGS +_MEMORY_BASIC_INFORMATION +BaseAddress +AllocationBase +AllocationProtect +PartitionId +RegionSize +State +Protect +Type +MEMORY_BASIC_INFORMATION +PMEMORY_BASIC_INFORMATION +_IMAGE_DOS_HEADER +e_magic +e_cblp +e_cp +e_crlc +e_cparhdr +e_minalloc +e_maxalloc +e_ss +e_sp +e_csum +e_ip +e_cs +e_lfarlc +e_ovno +e_res +e_oemid +e_oeminfo +e_res2 +e_lfanew +IMAGE_DOS_HEADER +PhysicalAddress +VirtualSize +_IMAGE_SECTION_HEADER +Name +Misc +VirtualAddress +SizeOfRawData +PointerToRawData +PointerToRelocations +PointerToLinenumbers +NumberOfRelocations +NumberOfLinenumbers +Characteristics +PIMAGE_SECTION_HEADER +-tagCOINITBASE +COINITBASE_MULTITHREADED +VARENUM +VT_EMPTY +VT_NULL +VT_I2 +VT_I4 +VT_R4 +VT_R8 +VT_CY +VT_DATE +VT_BSTR +VT_DISPATCH +VT_ERROR +VT_BOOL +VT_VARIANT +VT_UNKNOWN +VT_DECIMAL +VT_I1 +VT_UI1 +VT_UI2 +VT_UI4 +VT_I8 +VT_UI8 +VT_INT +VT_UINT +VT_VOID +VT_HRESULT +VT_PTR +VT_SAFEARRAY +VT_CARRAY +VT_USERDEFINED +VT_LPSTR +VT_LPWSTR +VT_RECORD +VT_INT_PTR +VT_UINT_PTR +VT_FILETIME +VT_BLOB +VT_STREAM +VT_STORAGE +VT_STREAMED_OBJECT +VT_STORED_OBJECT +VT_BLOB_OBJECT +VT_CF +VT_CLSID +VT_VERSIONED_STREAM +VT_BSTR_BLOB +VT_VECTOR +VT_ARRAY +VT_BYREF +VT_RESERVED +VT_ILLEGAL +VT_ILLEGALMASKED +VT_TYPEMASK +._iobuf +_ptr +_cnt + & % +_base +_flag + ( % +_file + ) % +_charbuf + * % +_bufsiz + + % +_tmpfname +FILE +__RUNTIME_PSEUDO_RELOC_LIST__ +__RUNTIME_PSEUDO_RELOC_LIST_END__ +__ImageBase +addend +target +runtime_pseudo_reloc_item_v1 +target +flags +runtime_pseudo_reloc_item_v2 +magic1 +magic2 +version +runtime_pseudo_reloc_v2 +old_protect +base_address +region_size +sec_start +hash +the_secs +maxSections +GetLastError +VirtualProtect +VirtualQuery +_GetPEImageBase +__mingw_GetSectionForAddress +memcpy +1abort +(2vfprintf +__acrt_iob_func +__mingw_GetSectionCount +3_pei386_runtime_relocator +4was_init +5mSecs +#do_pseudo_reloc +start +base +addr_imp +reldata +reloc_target +v2_hdr +bits +newval +max_unsigned +min_signed +#__write_memory +addr + +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/gccmain.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +gccmain.c +gccmain.c +winnt.h +combaseapi.h +wtypes.h +corecrt.h +stdlib.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/natstart.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +C:/M/B/src/mingw-w64/mingw-w64-crt/include +natstart.c +winnt.h +combaseapi.h +wtypes.h +internal.h +natstart.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/wildcard.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +wildcard.c +wildcard.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/dllargv.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +dllargv.c +dllargv.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/_newmode.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +_newmode.c +_newmode.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/tlssup.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +tlssup.c +tlssup.c +corecrt.h +minwindef.h +basetsd.h +winnt.h +corecrt_startup.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/xncommod.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +xncommod.c +xncommod.c +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/cinitexe.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +cinitexe.c +cinitexe.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/merr.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +merr.c +merr.c +math.h +stdio.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/CRT_fp10.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +CRT_fp10.c +CRT_fp10.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/mingw_helpers.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +mingw_helpers.c +mingw_helpers.c +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/pseudo-reloc.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +pseudo-reloc.c +pseudo-reloc.c +vadefs.h +corecrt.h +minwindef.h +basetsd.h +winnt.h +combaseapi.h +wtypes.h +stdio.h +memoryapi.h +errhandlingapi.h +string.h +stdlib.h + +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/usermatherr.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +usermatherr.c +usermatherr.c +math.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/xtxtmode.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +xtxtmode.c +xtxtmode.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/crt_handler.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +crt_handler.c +crt_handler.c +winnt.h +minwindef.h +basetsd.h +errhandlingapi.h +combaseapi.h +wtypes.h +signal.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/tlsthrd.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +tlsthrd.c +tlsthrd.c +corecrt.h +minwindef.h +basetsd.h +winnt.h +minwinbase.h +synchapi.h +stdlib.h +processthreadsapi.h +errhandlingapi.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/tlsmcrt.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +tlsmcrt.c +tlsmcrt.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/pseudo-reloc-list.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +pseudo-reloc-list.c +pseudo-reloc-list.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/pesect.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +pesect.c +pesect.c +corecrt.h +minwindef.h +basetsd.h +winnt.h +string.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/misc/mingw_matherr.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/misc +mingw_matherr.c +mingw_matherr.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/stdio/ucrt_vfprintf.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/stdio +D:/a/msys64/ucrt64/include +ucrt_vfprintf.c +ucrt_vfprintf.c +vadefs.h +corecrt.h +stdio.h +C:/M/B/src/mingw-w64/mingw-w64-crt/stdio/ucrt_scanf.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/stdio +D:/a/msys64/ucrt64/include +ucrt_scanf.c +ucrt_scanf.c +vadefs.h +corecrt.h +stdio.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/stdio/ucrt_printf.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/stdio +D:/a/msys64/ucrt64/include +ucrt_printf.c +ucrt_printf.c +vadefs.h +corecrt.h +stdio.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/stdio/ucrt_fprintf.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/stdio +D:/a/msys64/ucrt64/include +ucrt_fprintf.c +ucrt_fprintf.c +vadefs.h +corecrt.h +stdio.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/misc/__initenv.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/misc +D:/a/msys64/ucrt64/include +C:/M/B/src/mingw-w64/mingw-w64-crt/include +__initenv.c +winnt.h +combaseapi.h +wtypes.h +internal.h +__initenv.c +corecrt.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/ucrtbase_compat.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +C:/M/B/src/mingw-w64/mingw-w64-crt/include +ucrtbase_compat.c +ucrtbase_compat.c +time.h +vadefs.h +corecrt.h +stdlib.h +winnt.h +combaseapi.h +wtypes.h +internal.h +corecrt_startup.h +stdio.h +sx3% +Xt:p +.file +crtexe.c +envp +argv +argc +mainret +.l_endw +.l_start +.l_end +atexit +.text +.data +.bss +.xdata +.pdata +.file +cygming-crtbeg +.text +.data +.bss +.xdata +.pdata +.file +71.c +main +.text +.data +.bss +.rdata +.xdata +.pdata +.file +gccmain.c +__main +.text +.data +.bss +.xdata +.pdata +.file +natstart.c +.text +.data +.bss +.file +wildcard.c +.text +.data +.bss +.file +dllargv.c +_setargv +.text +.data +.bss +.xdata +.pdata +.file +_newmode.c +.text +.data +.bss +.file +tlssup.c +__xd_a +__xd_z +.text +.data +.bss +.xdata +.pdata +.CRT$XLD@ +.CRT$XLC8 +.rdata +.CRT$XDZX +.CRT$XDAP +.CRT$XLZH +.CRT$XLA0 +.tls$ZZZ +.tls +.file +xncommod.c +.text +.data +.bss +.file +cinitexe.c +.text +.data +.bss +.CRT$XCZ +.CRT$XCA +.CRT$XIZ( +.CRT$XIA +.file +merr.c +_matherr +.text +.data +.bss +.rdata +.xdata +.pdata +.file +CRT_fp10.c +_fpreset +fpreset +.text +.data +.bss +.xdata +.pdata +.file +mingw_helpers. +.text +.data +.bss +.file +pseudo-reloc.c +the_secs +.text +.data +.bss +.rdata +.xdata +.pdata +.file +usermatherr.c +.text +.data +.bss +.xdata +.pdata +.file +xtxtmode.c +.text +.data +.bss +.file +crt_handler.c +.text +.data +.bss +.xdata +.rdata +.pdata +.file +tlsthrd.c +.text +.data +.bss +.xdata +.pdata +.file +tlsmcrt.c +.text +.data +.bss +.file +.text +.data +.bss +.file +pesect.c +.text +.data +.bss +.xdata +.pdata +.text +.data +.bss +.text +.data +.bss +.file +mingw_matherr. +.text +.data +.bss +.file +ucrt_vfprintf. +vfprintf +.text +.data +.bss +.xdata +.pdata +.file +ucrt_scanf.c +scanf +.text +.data +.bss +.xdata +.pdata +.file +ucrt_printf.c +printf +.text +.data +.bss +.xdata +.pdata +.file +ucrt_fprintf.c +fprintf +.text +.data +.bss +.xdata +.pdata +.file +__initenv.c +.text +.data +.bss +.file +ucrtbase_compa +_onexit +tzset +_tzset +.text +.data +.bss +.xdata +.pdata +.rdata +.text +.data +.bss +.idata$7 +.idata$5` +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5h +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5p +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5x +.idata$4 +.idata$6 +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2 +.idata$4 +.idata$5` +.file +fake +.text +.data +.bss +.idata$4 +.idata$5 +.idata$7 +.text +.data +.bss +.idata$7t +.idata$5@ +.idata$4` +.idata$6 +.text +.data +.bss +.idata$7x +.idata$5H +.idata$4h +.idata$6 +.text +.data +.bss +.idata$7| +.idata$5P +.idata$4p +.idata$6 +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2 +.idata$4` +.idata$5@ +.file +fake +.text +.data +.bss +.idata$4x +.idata$5X +.idata$7 +.text +.data +.bss +.idata$74 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$78 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7< +.idata$5 +.idata$4( +.idata$6" +.text +.data +.bss +.idata$7@ +.idata$5 +.idata$40 +.idata$60 +.text +.data +.bss +.idata$7D +.idata$5 +.idata$48 +.idata$6J +.text +.data +.bss +.idata$7H +.idata$5 +.idata$4@ +.idata$6d +.text +.data +.bss +.idata$7L +.idata$5( +.idata$4H +.idata$6 +.text +.data +.bss +.idata$7P +.idata$50 +.idata$4P +.idata$6 +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2x +.idata$4 +.idata$5 +.file +fake +.text +.data +.bss +.idata$4X +.idata$58 +.idata$7T +.text +.data +.bss +.idata$7 +.idata$5h +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5p +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5x +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6" +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6: +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6P +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6^ +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6f +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2d +.idata$4 +.idata$5h +.file +fake +.text +.data +.bss +.idata$4 +.idata$5 +.idata$7 +.text +.data +.bss +.idata$7 +.idata$5P +.idata$4p +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5X +.idata$4x +.idata$6 +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2P +.idata$4p +.idata$5P +.file +fake +.text +.data +.bss +.idata$4 +.idata$5` +.idata$7 +.text +.data +.bss +.idata$7| +.idata$5@ +.idata$4` +.idata$6 +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2< +.idata$4` +.idata$5@ +.file +fake +.text +.data +.bss +.idata$4h +.idata$5H +.idata$7 +.text +.data +.bss +.idata$7L +.idata$5 +.idata$48 +.idata$6r +.text +.data +.bss +.idata$7P +.idata$5 +.idata$4@ +.idata$6 +.text +.data +.bss +.idata$7T +.idata$5( +.idata$4H +.idata$6 +.text +.data +.bss +.idata$7X +.idata$50 +.idata$4P +.idata$6 +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2( +.idata$48 +.idata$5 +.file +fake +.text +.data +.bss +.idata$4X +.idata$58 +.idata$7\ +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6R +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4( +.idata$6b +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2 +.idata$4 +.idata$5 +.file +fake +.text +.data +.bss +.idata$40 +.idata$5 +.idata$7$ +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6B +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$60 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6" +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2 +.idata$4 +.idata$5 +.file +fake +.text +.data +.bss +.idata$4 +.idata$5 +.idata$7 +.file +cygming-crtend +.text +.data +.bss +.rsrc +__xc_z +__xl_a +_cexit +__xl_d +_tls_end +__tzname +memcpy +puts +malloc +_CRT_MT +abort +__dll__ +calloc +Sleep +_commodep +__xi_z +signal +strncmp +__xl_z +__end__ +strcmp +__xi_a +__xc_a +_fmode +__xl_c +_newmodeP +fwrite +exit +_exit +strlen +free +.debug_aranges +.debug_info +.debug_abbrev +.debug_line +.debug_frame +.debug_str +.debug_line_str +.debug_loclists +.debug_rnglists +__mingw_invalidParameterHandler +pre_c_init +.rdata$.refptr.__mingw_initltsdrot_force +.rdata$.refptr.__mingw_initltsdyn_force +.rdata$.refptr.__mingw_initltssuo_force +.rdata$.refptr.__ImageBase +.rdata$.refptr.__mingw_app_type +managedapp +.rdata$.refptr._fmode +.rdata$.refptr._commode +.rdata$.refptr._MINGW_INSTALL_DEBUG_MATHERR +.rdata$.refptr._matherr +pre_cpp_init +.rdata$.refptr._newmode +startinfo +.rdata$.refptr._dowildcard +__tmainCRTStartup +.rdata$.refptr.__native_startup_lock +.rdata$.refptr.__native_startup_state +has_cctor +.rdata$.refptr.__dyn_tls_init_callback +.rdata$.refptr._gnu_exception_handler +.rdata$.refptr.__mingw_oldexcpt_handler +.rdata$.refptr.__imp___initenv +.rdata$.refptr.__xc_z +.rdata$.refptr.__xc_a +.rdata$.refptr.__xi_z +.rdata$.refptr.__xi_a +WinMainCRTStartup +.l_startw +mainCRTStartup +.CRT$XCAA +.CRT$XIAA +.debug_info +.debug_abbrev +.debug_loclists +.debug_aranges +.debug_rnglists +.debug_line +.debug_str +.debug_line_str +.rdata$zzz +.debug_frame +__gcc_register_frame +__gcc_deregister_frame +checkPass +__do_global_dtors +__do_global_ctors +.rdata$.refptr.__CTOR_LIST__ +initialized +__dyn_tls_dtor +__dyn_tls_init +.rdata$.refptr._CRT_MT +__tlregdtor +__report_error +mark_section_writable +maxSections +_pei386_runtime_relocator +was_init.0 +.rdata$.refptr.__RUNTIME_PSEUDO_RELOC_LIST_END__ +.rdata$.refptr.__RUNTIME_PSEUDO_RELOC_LIST__ +__mingw_raise_matherr +stUserMathErr +__mingw_setusermatherr +_gnu_exception_handler +__mingwthr_run_key_dtors.part.0 +__mingwthr_cs +key_dtor_list +___w64_mingwthr_add_key_dtor +__mingwthr_cs_init +___w64_mingwthr_remove_key_dtor +__mingw_TLScallback +pseudo-reloc-list.c +_ValidateImageBase +_FindPESection +_FindPESectionByName +__mingw_GetSectionForAddress +__mingw_GetSectionCount +_FindPESectionExec +_GetPEImageBase +_IsNonwritableInCurrentImage +__mingw_enum_import_library_names +local__winitenv +local__initenv +_get_output_format +__getmainargs +__wgetmainargs +at_quick_exit +.rdata$.refptr.__mingw_module_is_dll +_amsg_exit +__ms_fwprintf +.rdata$.refptr.__imp__tzset +initial_daylight +initial_timezone +initial_tznames +initial_tzname0 +initial_tzname1 +register_frame_ctor +.text.startup +.xdata.startup +.pdata.startup +.ctors.65535 +___RUNTIME_PSEUDO_RELOC_LIST__ +__daylight +__stdio_common_vfwprintf +__imp_abort +__lib64_libkernel32_a_iname +__imp___p__environ +__data_start__ +___DTOR_LIST__ +__imp_timezone +_head_lib64_libapi_ms_win_crt_private_l1_1_0_a +SetUnhandledExceptionFilter +.refptr.__mingw_initltsdrot_force +__imp_calloc +__imp___p__fmode +__imp___p___argc +__imp_tzname +__imp_scanf +___tls_start__ +.refptr.__native_startup_state +_set_invalid_parameter_handler +__imp_tzset +GetLastError +__imp__initialize_wide_environment +__rt_psrelocs_start +__dll_characteristics__ +__size_of_stack_commit__ +__lib64_libapi_ms_win_crt_time_l1_1_0_a_iname +__mingw_module_is_dll +__size_of_stack_reserve__ +__major_subsystem_version__ +___crt_xl_start__ +__imp_DeleteCriticalSection +__imp__set_invalid_parameter_handler +.refptr.__CTOR_LIST__ +VirtualQuery +__imp___p___argv +___crt_xi_start__ +__imp__amsg_exit +___crt_xi_end__ +.refptr.__mingw_module_is_dll +.refptr.__imp___initenv +_tls_start +__imp___stdio_common_vfscanf +.refptr._matherr +.refptr.__RUNTIME_PSEUDO_RELOC_LIST__ +__mingw_oldexcpt_handler +TlsGetValue +__imp_strcmp +__bss_start__ +__imp___C_specific_handler +___RUNTIME_PSEUDO_RELOC_LIST_END__ +__imp___tzname +__size_of_heap_commit__ +__imp___stdio_common_vfprintf +__imp_GetLastError +.refptr._dowildcard +__imp__initialize_narrow_environment +__mingw_initltsdrot_force +__imp_free +__imp__configure_wide_argv +__imp_at_quick_exit +__lib64_libapi_ms_win_crt_math_l1_1_0_a_iname +__p__environ +.refptr.__mingw_app_type +__mingw_initltssuo_force +VirtualProtect +_head_lib64_libapi_ms_win_crt_environment_l1_1_0_a +__imp__tzset +___crt_xp_start__ +__imp_LeaveCriticalSection +__C_specific_handler +.refptr.__mingw_oldexcpt_handler +.refptr.__RUNTIME_PSEUDO_RELOC_LIST_END__ +__imp___ms_fwprintf +___crt_xp_end__ +__minor_os_version__ +__p___argv +__lib64_libapi_ms_win_crt_string_l1_1_0_a_iname +EnterCriticalSection +_MINGW_INSTALL_DEBUG_MATHERR +__imp_puts +_set_new_mode +.refptr.__xi_a +.refptr._CRT_MT +_head_lib64_libapi_ms_win_crt_math_l1_1_0_a +__imp__exit +__section_alignment__ +__native_dllmain_reason +__lib64_libapi_ms_win_crt_private_l1_1_0_a_iname +_tls_used +__IAT_end__ +_head_lib64_libapi_ms_win_crt_time_l1_1_0_a +__imp_memcpy +__RUNTIME_PSEUDO_RELOC_LIST__ +__stdio_common_vfscanf +.refptr._newmode +__data_end__ +__imp_fwrite +__CTOR_LIST__ +__imp__set_new_mode +_head_lib64_libapi_ms_win_crt_heap_l1_1_0_a +__imp___getmainargs +_head_lib64_libkernel32_a +__bss_end__ +__native_vcclrit_reason +___crt_xc_end__ +.refptr.__mingw_initltssuo_force +__p__fmode +.refptr.__native_startup_lock +__imp_EnterCriticalSection +_tls_index +__acrt_iob_func +__native_startup_state +___crt_xc_start__ +___CTOR_LIST__ +.refptr.__dyn_tls_init_callback +__imp_signal +_head_lib64_libapi_ms_win_crt_string_l1_1_0_a +.refptr.__mingw_initltsdyn_force +__rt_psrelocs_size +.refptr.__ImageBase +__lib64_libapi_ms_win_crt_runtime_l1_1_0_a_iname +__imp___p___wargv +__imp_strlen +__imp_malloc +.refptr._gnu_exception_handler +__imp___wgetmainargs +__imp___daylight +__file_alignment__ +__imp_InitializeCriticalSection +__p__wenviron +_initialize_narrow_environment +_crt_at_quick_exit +InitializeCriticalSection +__imp_exit +_head_lib64_libapi_ms_win_crt_stdio_l1_1_0_a +__imp_vfprintf +__major_os_version__ +__mingw_pcinit +__imp___initenv +__IAT_start__ +__imp__cexit +__imp___stdio_common_vfwprintf +__imp_SetUnhandledExceptionFilter +__imp__onexit +__DTOR_LIST__ +__set_app_type +__imp_Sleep +LeaveCriticalSection +__imp___setusermatherr +__size_of_heap_reserve__ +___crt_xt_start__ +__subsystem__ +__imp_TlsGetValue +__imp___p__wenviron +__setusermatherr +__imp___timezone +.refptr._commode +__imp_fprintf +_configure_wide_argv +__mingw_pcppinit +__imp___p__commode +__imp__crt_atexit +__lib64_libapi_ms_win_crt_environment_l1_1_0_a_iname +__p___argc +__imp_VirtualProtect +___tls_end__ +.refptr.__imp__tzset +__imp_VirtualQuery +__imp__initterm +__mingw_initltsdyn_force +_dowildcard +__lib64_libapi_ms_win_crt_stdio_l1_1_0_a_iname +__dyn_tls_init_callback +__timezone +__lib64_libapi_ms_win_crt_heap_l1_1_0_a_iname +_initterm +__imp_strncmp +.refptr._fmode +__imp___acrt_iob_func +__major_image_version__ +__loader_flags__ +___chkstk_ms +__native_startup_lock +__p__commode +__rt_psrelocs_end +__minor_subsystem_version__ +__minor_image_version__ +__imp___set_app_type +__imp__crt_at_quick_exit +__imp_printf +.refptr.__xc_a +_configure_narrow_argv +.refptr.__xi_z +_crt_atexit +.refptr._MINGW_INSTALL_DEBUG_MATHERR +DeleteCriticalSection +_initialize_wide_environment +__imp__configure_narrow_argv +_head_lib64_libapi_ms_win_crt_runtime_l1_1_0_a +__RUNTIME_PSEUDO_RELOC_LIST_END__ +__imp___winitenv +.refptr.__xc_z +__imp__get_output_format +___crt_xt_end__ +__stdio_common_vfprintf +__imp_daylight +__p___wargv +__mingw_app_type diff --git a/Lect6/72.bat b/Lect6/72.bat new file mode 100644 index 0000000..e532d8d --- /dev/null +++ b/Lect6/72.bat @@ -0,0 +1 @@ +strings 71.exe > 71.txt diff --git a/Lect6/73-74.c b/Lect6/73-74.c new file mode 100644 index 0000000..1cfb64e --- /dev/null +++ b/Lect6/73-74.c @@ -0,0 +1,33 @@ +#include +#include +#include + + + uint64_t getHash(char const *s) { + const int p = 31; + uint64_t hash = 0, p_pow = 1; + while(*s) { + hash += (*s++ - 'a' + 1) * p_pow; + p_pow *= p; + } + printf("%llu\n",hash); + return hash; +} + +_Bool checkPass(char *p) { + if(getHash(p) == 577739920)//secret + return 1; + return 0; +} + +int main(void){ + char password[100]; + printf("Input your password: "); + scanf("%s",password); + + if(checkPass(password)) + printf("Access granted\n"); + else + printf("Access denied\n"); + return 0; +} diff --git a/Lect6/73-74.exe b/Lect6/73-74.exe new file mode 100644 index 0000000..a058594 Binary files /dev/null and b/Lect6/73-74.exe differ diff --git a/Lect6/73-74.o b/Lect6/73-74.o new file mode 100644 index 0000000..2ef9a9f Binary files /dev/null and b/Lect6/73-74.o differ diff --git a/Lect6/74.bat b/Lect6/74.bat new file mode 100644 index 0000000..3b306b4 --- /dev/null +++ b/Lect6/74.bat @@ -0,0 +1 @@ +strings 73-74.exe > str73-74.txt diff --git a/Lect6/76-79/61.s b/Lect6/76-79/61.s new file mode 100644 index 0000000..4debe4f --- /dev/null +++ b/Lect6/76-79/61.s @@ -0,0 +1,3051 @@ + +73-74.exe: file format pei-x86-64 + + +Disassembly of section .text: + +0000000140001000 <__mingw_invalidParameterHandler>: + 140001000: c3 ret + 140001001: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 140001008: 00 00 00 00 + 14000100c: 0f 1f 40 00 nopl 0x0(%rax) + +0000000140001010 : + 140001010: 48 83 ec 28 sub $0x28,%rsp + 140001014: 48 8b 05 65 44 00 00 mov 0x4465(%rip),%rax # 140005480 <.refptr.__mingw_initltsdrot_force> + 14000101b: 31 c9 xor %ecx,%ecx + 14000101d: c7 00 01 00 00 00 movl $0x1,(%rax) + 140001023: 48 8b 05 66 44 00 00 mov 0x4466(%rip),%rax # 140005490 <.refptr.__mingw_initltsdyn_force> + 14000102a: c7 00 01 00 00 00 movl $0x1,(%rax) + 140001030: 48 8b 05 69 44 00 00 mov 0x4469(%rip),%rax # 1400054a0 <.refptr.__mingw_initltssuo_force> + 140001037: c7 00 01 00 00 00 movl $0x1,(%rax) + 14000103d: 48 8b 05 bc 43 00 00 mov 0x43bc(%rip),%rax # 140005400 <.refptr.__ImageBase> + 140001044: 66 81 38 4d 5a cmpw $0x5a4d,(%rax) + 140001049: 75 0f jne 14000105a + 14000104b: 48 63 50 3c movslq 0x3c(%rax),%rdx + 14000104f: 48 01 d0 add %rdx,%rax + 140001052: 81 38 50 45 00 00 cmpl $0x4550,(%rax) + 140001058: 74 66 je 1400010c0 + 14000105a: 48 8b 05 0f 44 00 00 mov 0x440f(%rip),%rax # 140005470 <.refptr.__mingw_app_type> + 140001061: 89 0d a5 6f 00 00 mov %ecx,0x6fa5(%rip) # 14000800c + 140001067: 8b 00 mov (%rax),%eax + 140001069: 85 c0 test %eax,%eax + 14000106b: 74 43 je 1400010b0 + 14000106d: b9 02 00 00 00 mov $0x2,%ecx + 140001072: e8 c9 19 00 00 call 140002a40 <__set_app_type> + 140001077: e8 34 19 00 00 call 1400029b0 <__p__fmode> + 14000107c: 48 8b 15 cd 44 00 00 mov 0x44cd(%rip),%rdx # 140005550 <.refptr._fmode> + 140001083: 8b 12 mov (%rdx),%edx + 140001085: 89 10 mov %edx,(%rax) + 140001087: e8 1c 19 00 00 call 1400029a8 <__p__commode> + 14000108c: 48 8b 15 9d 44 00 00 mov 0x449d(%rip),%rdx # 140005530 <.refptr._commode> + 140001093: 8b 12 mov (%rdx),%edx + 140001095: 89 10 mov %edx,(%rax) + 140001097: e8 c4 05 00 00 call 140001660 <_setargv> + 14000109c: 48 8b 05 3d 43 00 00 mov 0x433d(%rip),%rax # 1400053e0 <.refptr._MINGW_INSTALL_DEBUG_MATHERR> + 1400010a3: 83 38 01 cmpl $0x1,(%rax) + 1400010a6: 74 50 je 1400010f8 + 1400010a8: 31 c0 xor %eax,%eax + 1400010aa: 48 83 c4 28 add $0x28,%rsp + 1400010ae: c3 ret + 1400010af: 90 nop + 1400010b0: b9 01 00 00 00 mov $0x1,%ecx + 1400010b5: e8 86 19 00 00 call 140002a40 <__set_app_type> + 1400010ba: eb bb jmp 140001077 + 1400010bc: 0f 1f 40 00 nopl 0x0(%rax) + 1400010c0: 0f b7 50 18 movzwl 0x18(%rax),%edx + 1400010c4: 66 81 fa 0b 01 cmp $0x10b,%dx + 1400010c9: 74 45 je 140001110 + 1400010cb: 66 81 fa 0b 02 cmp $0x20b,%dx + 1400010d0: 75 88 jne 14000105a + 1400010d2: 83 b8 84 00 00 00 0e cmpl $0xe,0x84(%rax) + 1400010d9: 0f 86 7b ff ff ff jbe 14000105a + 1400010df: 8b 90 f8 00 00 00 mov 0xf8(%rax),%edx + 1400010e5: 31 c9 xor %ecx,%ecx + 1400010e7: 85 d2 test %edx,%edx + 1400010e9: 0f 95 c1 setne %cl + 1400010ec: e9 69 ff ff ff jmp 14000105a + 1400010f1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 1400010f8: 48 8b 0d 81 44 00 00 mov 0x4481(%rip),%rcx # 140005580 <.refptr._matherr> + 1400010ff: e8 cc 0c 00 00 call 140001dd0 <__mingw_setusermatherr> + 140001104: 31 c0 xor %eax,%eax + 140001106: 48 83 c4 28 add $0x28,%rsp + 14000110a: c3 ret + 14000110b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 140001110: 83 78 74 0e cmpl $0xe,0x74(%rax) + 140001114: 0f 86 40 ff ff ff jbe 14000105a + 14000111a: 44 8b 80 e8 00 00 00 mov 0xe8(%rax),%r8d + 140001121: 31 c9 xor %ecx,%ecx + 140001123: 45 85 c0 test %r8d,%r8d + 140001126: 0f 95 c1 setne %cl + 140001129: e9 2c ff ff ff jmp 14000105a + 14000112e: 66 90 xchg %ax,%ax + +0000000140001130 : + 140001130: 48 83 ec 38 sub $0x38,%rsp + 140001134: 48 8b 05 65 44 00 00 mov 0x4465(%rip),%rax # 1400055a0 <.refptr._newmode> + 14000113b: 4c 8d 05 d6 6e 00 00 lea 0x6ed6(%rip),%r8 # 140008018 + 140001142: 48 8d 15 d7 6e 00 00 lea 0x6ed7(%rip),%rdx # 140008020 + 140001149: 48 8d 0d d8 6e 00 00 lea 0x6ed8(%rip),%rcx # 140008028 + 140001150: 8b 00 mov (%rax),%eax + 140001152: 89 05 ac 6e 00 00 mov %eax,0x6eac(%rip) # 140008004 + 140001158: 48 8b 05 e1 43 00 00 mov 0x43e1(%rip),%rax # 140005540 <.refptr._dowildcard> + 14000115f: 44 8b 08 mov (%rax),%r9d + 140001162: 48 8d 05 9b 6e 00 00 lea 0x6e9b(%rip),%rax # 140008004 + 140001169: 48 89 44 24 20 mov %rax,0x20(%rsp) + 14000116e: e8 ed 15 00 00 call 140002760 <__getmainargs> + 140001173: 90 nop + 140001174: 48 83 c4 38 add $0x38,%rsp + 140001178: c3 ret + 140001179: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + +0000000140001180 <__tmainCRTStartup>: + 140001180: 41 54 push %r12 + 140001182: 55 push %rbp + 140001183: 57 push %rdi + 140001184: 56 push %rsi + 140001185: 53 push %rbx + 140001186: 48 83 ec 20 sub $0x20,%rsp + 14000118a: 48 8b 1d 3f 43 00 00 mov 0x433f(%rip),%rbx # 1400054d0 <.refptr.__native_startup_lock> + 140001191: 48 8b 2d 18 82 00 00 mov 0x8218(%rip),%rbp # 1400093b0 <__imp_Sleep> + 140001198: 31 ff xor %edi,%edi + 14000119a: 65 48 8b 04 25 30 00 mov %gs:0x30,%rax + 1400011a1: 00 00 + 1400011a3: 48 8b 70 08 mov 0x8(%rax),%rsi + 1400011a7: eb 17 jmp 1400011c0 <__tmainCRTStartup+0x40> + 1400011a9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 1400011b0: 48 39 c6 cmp %rax,%rsi + 1400011b3: 0f 84 67 01 00 00 je 140001320 <__tmainCRTStartup+0x1a0> + 1400011b9: b9 e8 03 00 00 mov $0x3e8,%ecx + 1400011be: ff d5 call *%rbp + 1400011c0: 48 89 f8 mov %rdi,%rax + 1400011c3: f0 48 0f b1 33 lock cmpxchg %rsi,(%rbx) + 1400011c8: 48 85 c0 test %rax,%rax + 1400011cb: 75 e3 jne 1400011b0 <__tmainCRTStartup+0x30> + 1400011cd: 48 8b 35 0c 43 00 00 mov 0x430c(%rip),%rsi # 1400054e0 <.refptr.__native_startup_state> + 1400011d4: 31 ff xor %edi,%edi + 1400011d6: 8b 06 mov (%rsi),%eax + 1400011d8: 83 f8 01 cmp $0x1,%eax + 1400011db: 0f 84 56 01 00 00 je 140001337 <__tmainCRTStartup+0x1b7> + 1400011e1: 8b 06 mov (%rsi),%eax + 1400011e3: 85 c0 test %eax,%eax + 1400011e5: 0f 84 b5 01 00 00 je 1400013a0 <__tmainCRTStartup+0x220> + 1400011eb: c7 05 13 6e 00 00 01 movl $0x1,0x6e13(%rip) # 140008008 + 1400011f2: 00 00 00 + 1400011f5: 8b 06 mov (%rsi),%eax + 1400011f7: 83 f8 01 cmp $0x1,%eax + 1400011fa: 0f 84 4c 01 00 00 je 14000134c <__tmainCRTStartup+0x1cc> + 140001200: 85 ff test %edi,%edi + 140001202: 0f 84 65 01 00 00 je 14000136d <__tmainCRTStartup+0x1ed> + 140001208: 48 8b 05 21 42 00 00 mov 0x4221(%rip),%rax # 140005430 <.refptr.__dyn_tls_init_callback> + 14000120f: 48 8b 00 mov (%rax),%rax + 140001212: 48 85 c0 test %rax,%rax + 140001215: 74 0c je 140001223 <__tmainCRTStartup+0xa3> + 140001217: 45 31 c0 xor %r8d,%r8d + 14000121a: ba 02 00 00 00 mov $0x2,%edx + 14000121f: 31 c9 xor %ecx,%ecx + 140001221: ff d0 call *%rax + 140001223: e8 08 08 00 00 call 140001a30 <_pei386_runtime_relocator> + 140001228: 48 8b 0d 41 43 00 00 mov 0x4341(%rip),%rcx # 140005570 <.refptr._gnu_exception_handler> + 14000122f: ff 15 6b 81 00 00 call *0x816b(%rip) # 1400093a0 <__imp_SetUnhandledExceptionFilter> + 140001235: 48 8b 15 84 42 00 00 mov 0x4284(%rip),%rdx # 1400054c0 <.refptr.__mingw_oldexcpt_handler> + 14000123c: 48 8d 0d bd fd ff ff lea -0x243(%rip),%rcx # 140001000 <__mingw_invalidParameterHandler> + 140001243: 48 89 02 mov %rax,(%rdx) + 140001246: e8 fd 17 00 00 call 140002a48 <_set_invalid_parameter_handler> + 14000124b: e8 f0 05 00 00 call 140001840 <_fpreset> + 140001250: 8b 1d d2 6d 00 00 mov 0x6dd2(%rip),%ebx # 140008028 + 140001256: 8d 7b 01 lea 0x1(%rbx),%edi + 140001259: 48 63 ff movslq %edi,%rdi + 14000125c: 48 c1 e7 03 shl $0x3,%rdi + 140001260: 48 89 f9 mov %rdi,%rcx + 140001263: e8 40 18 00 00 call 140002aa8 + 140001268: 4c 8b 25 b1 6d 00 00 mov 0x6db1(%rip),%r12 # 140008020 + 14000126f: 48 89 c5 mov %rax,%rbp + 140001272: 85 db test %ebx,%ebx + 140001274: 0f 8e 46 01 00 00 jle 1400013c0 <__tmainCRTStartup+0x240> + 14000127a: 48 83 ef 08 sub $0x8,%rdi + 14000127e: 31 db xor %ebx,%ebx + 140001280: 49 8b 0c 1c mov (%r12,%rbx,1),%rcx + 140001284: e8 07 17 00 00 call 140002990 + 140001289: 48 8d 70 01 lea 0x1(%rax),%rsi + 14000128d: 48 89 f1 mov %rsi,%rcx + 140001290: e8 13 18 00 00 call 140002aa8 + 140001295: 49 89 f0 mov %rsi,%r8 + 140001298: 48 89 44 1d 00 mov %rax,0x0(%rbp,%rbx,1) + 14000129d: 49 8b 14 1c mov (%r12,%rbx,1),%rdx + 1400012a1: 48 89 c1 mov %rax,%rcx + 1400012a4: 48 83 c3 08 add $0x8,%rbx + 1400012a8: e8 cb 17 00 00 call 140002a78 + 1400012ad: 48 39 df cmp %rbx,%rdi + 1400012b0: 75 ce jne 140001280 <__tmainCRTStartup+0x100> + 1400012b2: 48 01 ef add %rbp,%rdi + 1400012b5: 48 c7 07 00 00 00 00 movq $0x0,(%rdi) + 1400012bc: 48 89 2d 5d 6d 00 00 mov %rbp,0x6d5d(%rip) # 140008020 + 1400012c3: e8 78 03 00 00 call 140001640 <__main> + 1400012c8: 48 8b 05 81 41 00 00 mov 0x4181(%rip),%rax # 140005450 <.refptr.__imp___initenv> + 1400012cf: 4c 8b 05 42 6d 00 00 mov 0x6d42(%rip),%r8 # 140008018 + 1400012d6: 8b 0d 4c 6d 00 00 mov 0x6d4c(%rip),%ecx # 140008028 + 1400012dc: 48 8b 00 mov (%rax),%rax + 1400012df: 4c 89 00 mov %r8,(%rax) + 1400012e2: 48 8b 15 37 6d 00 00 mov 0x6d37(%rip),%rdx # 140008020 + 1400012e9: e8 1f 02 00 00 call 14000150d
+ 1400012ee: 8b 0d 18 6d 00 00 mov 0x6d18(%rip),%ecx # 14000800c + 1400012f4: 89 05 16 6d 00 00 mov %eax,0x6d16(%rip) # 140008010 + 1400012fa: 85 c9 test %ecx,%ecx + 1400012fc: 0f 84 c6 00 00 00 je 1400013c8 <__tmainCRTStartup+0x248> + 140001302: 8b 15 00 6d 00 00 mov 0x6d00(%rip),%edx # 140008008 + 140001308: 85 d2 test %edx,%edx + 14000130a: 74 74 je 140001380 <__tmainCRTStartup+0x200> + 14000130c: 48 83 c4 20 add $0x20,%rsp + 140001310: 5b pop %rbx + 140001311: 5e pop %rsi + 140001312: 5f pop %rdi + 140001313: 5d pop %rbp + 140001314: 41 5c pop %r12 + 140001316: c3 ret + 140001317: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 14000131e: 00 00 + 140001320: 48 8b 35 b9 41 00 00 mov 0x41b9(%rip),%rsi # 1400054e0 <.refptr.__native_startup_state> + 140001327: bf 01 00 00 00 mov $0x1,%edi + 14000132c: 8b 06 mov (%rsi),%eax + 14000132e: 83 f8 01 cmp $0x1,%eax + 140001331: 0f 85 aa fe ff ff jne 1400011e1 <__tmainCRTStartup+0x61> + 140001337: b9 1f 00 00 00 mov $0x1f,%ecx + 14000133c: e8 3f 15 00 00 call 140002880 <_amsg_exit> + 140001341: 8b 06 mov (%rsi),%eax + 140001343: 83 f8 01 cmp $0x1,%eax + 140001346: 0f 85 b4 fe ff ff jne 140001200 <__tmainCRTStartup+0x80> + 14000134c: 48 8b 15 ad 41 00 00 mov 0x41ad(%rip),%rdx # 140005500 <.refptr.__xc_z> + 140001353: 48 8b 0d 96 41 00 00 mov 0x4196(%rip),%rcx # 1400054f0 <.refptr.__xc_a> + 14000135a: e8 d9 16 00 00 call 140002a38 <_initterm> + 14000135f: c7 06 02 00 00 00 movl $0x2,(%rsi) + 140001365: 85 ff test %edi,%edi + 140001367: 0f 85 9b fe ff ff jne 140001208 <__tmainCRTStartup+0x88> + 14000136d: 31 c0 xor %eax,%eax + 14000136f: 48 87 03 xchg %rax,(%rbx) + 140001372: e9 91 fe ff ff jmp 140001208 <__tmainCRTStartup+0x88> + 140001377: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 14000137e: 00 00 + 140001380: e8 73 16 00 00 call 1400029f8 <_cexit> + 140001385: 8b 05 85 6c 00 00 mov 0x6c85(%rip),%eax # 140008010 + 14000138b: 48 83 c4 20 add $0x20,%rsp + 14000138f: 5b pop %rbx + 140001390: 5e pop %rsi + 140001391: 5f pop %rdi + 140001392: 5d pop %rbp + 140001393: 41 5c pop %r12 + 140001395: c3 ret + 140001396: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 14000139d: 00 00 00 + 1400013a0: 48 8b 15 79 41 00 00 mov 0x4179(%rip),%rdx # 140005520 <.refptr.__xi_z> + 1400013a7: 48 8b 0d 62 41 00 00 mov 0x4162(%rip),%rcx # 140005510 <.refptr.__xi_a> + 1400013ae: c7 06 01 00 00 00 movl $0x1,(%rsi) + 1400013b4: e8 7f 16 00 00 call 140002a38 <_initterm> + 1400013b9: e9 37 fe ff ff jmp 1400011f5 <__tmainCRTStartup+0x75> + 1400013be: 66 90 xchg %ax,%ax + 1400013c0: 48 89 c7 mov %rax,%rdi + 1400013c3: e9 ed fe ff ff jmp 1400012b5 <__tmainCRTStartup+0x135> + 1400013c8: 89 c1 mov %eax,%ecx + 1400013ca: e8 89 16 00 00 call 140002a58 + 1400013cf: 90 nop + +00000001400013d0 : + 1400013d0: 48 83 ec 28 sub $0x28,%rsp + +00000001400013d4 <.l_startw>: + 1400013d4: 48 8b 05 95 40 00 00 mov 0x4095(%rip),%rax # 140005470 <.refptr.__mingw_app_type> + 1400013db: c7 00 01 00 00 00 movl $0x1,(%rax) + 1400013e1: e8 9a fd ff ff call 140001180 <__tmainCRTStartup> + 1400013e6: 90 nop + +00000001400013e7 <.l_endw>: + 1400013e7: 90 nop + 1400013e8: 48 83 c4 28 add $0x28,%rsp + 1400013ec: c3 ret + 1400013ed: 0f 1f 00 nopl (%rax) + +00000001400013f0 : + 1400013f0: 48 83 ec 28 sub $0x28,%rsp + +00000001400013f4 <.l_start>: + 1400013f4: 48 8b 05 75 40 00 00 mov 0x4075(%rip),%rax # 140005470 <.refptr.__mingw_app_type> + 1400013fb: c7 00 00 00 00 00 movl $0x0,(%rax) + 140001401: e8 7a fd ff ff call 140001180 <__tmainCRTStartup> + 140001406: 90 nop + +0000000140001407 <.l_end>: + 140001407: 90 nop + 140001408: 48 83 c4 28 add $0x28,%rsp + 14000140c: c3 ret + 14000140d: 0f 1f 00 nopl (%rax) + +0000000140001410 : + 140001410: 48 83 ec 28 sub $0x28,%rsp + 140001414: e8 27 14 00 00 call 140002840 <_onexit> + 140001419: 48 83 f8 01 cmp $0x1,%rax + 14000141d: 19 c0 sbb %eax,%eax + 14000141f: 48 83 c4 28 add $0x28,%rsp + 140001423: c3 ret + 140001424: 90 nop + 140001425: 90 nop + 140001426: 90 nop + 140001427: 90 nop + 140001428: 90 nop + 140001429: 90 nop + 14000142a: 90 nop + 14000142b: 90 nop + 14000142c: 90 nop + 14000142d: 90 nop + 14000142e: 90 nop + 14000142f: 90 nop + +0000000140001430 <__gcc_register_frame>: + 140001430: 48 8d 0d 09 00 00 00 lea 0x9(%rip),%rcx # 140001440 <__gcc_deregister_frame> + 140001437: e9 d4 ff ff ff jmp 140001410 + 14000143c: 0f 1f 40 00 nopl 0x0(%rax) + +0000000140001440 <__gcc_deregister_frame>: + 140001440: c3 ret + 140001441: 90 nop + 140001442: 90 nop + 140001443: 90 nop + 140001444: 90 nop + 140001445: 90 nop + 140001446: 90 nop + 140001447: 90 nop + 140001448: 90 nop + 140001449: 90 nop + 14000144a: 90 nop + 14000144b: 90 nop + 14000144c: 90 nop + 14000144d: 90 nop + 14000144e: 90 nop + 14000144f: 90 nop + +0000000140001450 : + 140001450: e8 b0 1a 00 00 call 140002f05 <__fentry__> + 140001455: 55 push %rbp + 140001456: 48 89 e5 mov %rsp,%rbp + 140001459: 48 83 ec 40 sub $0x40,%rsp + 14000145d: 48 89 4d 10 mov %rcx,0x10(%rbp) + 140001461: c7 45 ec 1f 00 00 00 movl $0x1f,-0x14(%rbp) + 140001468: 48 c7 45 f8 00 00 00 movq $0x0,-0x8(%rbp) + 14000146f: 00 + 140001470: 48 c7 45 f0 01 00 00 movq $0x1,-0x10(%rbp) + 140001477: 00 + 140001478: eb 31 jmp 1400014ab + 14000147a: 48 8b 45 10 mov 0x10(%rbp),%rax + 14000147e: 48 8d 50 01 lea 0x1(%rax),%rdx + 140001482: 48 89 55 10 mov %rdx,0x10(%rbp) + 140001486: 0f b6 00 movzbl (%rax),%eax + 140001489: 0f be c0 movsbl %al,%eax + 14000148c: 83 e8 60 sub $0x60,%eax + 14000148f: 48 98 cltq + 140001491: 48 0f af 45 f0 imul -0x10(%rbp),%rax + 140001496: 48 01 45 f8 add %rax,-0x8(%rbp) + 14000149a: 8b 45 ec mov -0x14(%rbp),%eax + 14000149d: 48 98 cltq + 14000149f: 48 8b 55 f0 mov -0x10(%rbp),%rdx + 1400014a3: 48 0f af c2 imul %rdx,%rax + 1400014a7: 48 89 45 f0 mov %rax,-0x10(%rbp) + 1400014ab: 48 8b 45 10 mov 0x10(%rbp),%rax + 1400014af: 0f b6 00 movzbl (%rax),%eax + 1400014b2: 84 c0 test %al,%al + 1400014b4: 75 c4 jne 14000147a + 1400014b6: 48 8b 45 f8 mov -0x8(%rbp),%rax + 1400014ba: 48 89 c2 mov %rax,%rdx + 1400014bd: 48 8d 05 3c 3b 00 00 lea 0x3b3c(%rip),%rax # 140005000 <.rdata> + 1400014c4: 48 89 c1 mov %rax,%rcx + 1400014c7: e8 f4 11 00 00 call 1400026c0 + 1400014cc: 48 8b 45 f8 mov -0x8(%rbp),%rax + 1400014d0: 48 83 c4 40 add $0x40,%rsp + 1400014d4: 5d pop %rbp + 1400014d5: c3 ret + +00000001400014d6 : + 1400014d6: e8 2a 1a 00 00 call 140002f05 <__fentry__> + 1400014db: 55 push %rbp + 1400014dc: 48 89 e5 mov %rsp,%rbp + 1400014df: 48 83 ec 20 sub $0x20,%rsp + 1400014e3: 48 89 4d 10 mov %rcx,0x10(%rbp) + 1400014e7: 48 8b 45 10 mov 0x10(%rbp),%rax + 1400014eb: 48 89 c1 mov %rax,%rcx + 1400014ee: e8 5d ff ff ff call 140001450 + 1400014f3: 48 3d 90 9c 6f 22 cmp $0x226f9c90,%rax + 1400014f9: 74 07 je 140001502 + 1400014fb: b8 01 00 00 00 mov $0x1,%eax + 140001500: eb 05 jmp 140001507 + 140001502: b8 00 00 00 00 mov $0x0,%eax + 140001507: 48 83 c4 20 add $0x20,%rsp + 14000150b: 5d pop %rbp + 14000150c: c3 ret + +000000014000150d
: + 14000150d: e8 f3 19 00 00 call 140002f05 <__fentry__> + 140001512: 55 push %rbp + 140001513: 48 89 e5 mov %rsp,%rbp + 140001516: 48 81 ec 90 00 00 00 sub $0x90,%rsp + 14000151d: e8 ee 1e 00 00 call 140003410 <_monstartup> + 140001522: e8 19 01 00 00 call 140001640 <__main> + 140001527: 48 8d 05 d8 3a 00 00 lea 0x3ad8(%rip),%rax # 140005006 <.rdata+0x6> + 14000152e: 48 89 c1 mov %rax,%rcx + 140001531: e8 8a 11 00 00 call 1400026c0 + 140001536: 48 8d 45 90 lea -0x70(%rbp),%rax + 14000153a: 48 89 c2 mov %rax,%rdx + 14000153d: 48 8d 05 d8 3a 00 00 lea 0x3ad8(%rip),%rax # 14000501c <.rdata+0x1c> + 140001544: 48 89 c1 mov %rax,%rcx + 140001547: e8 24 11 00 00 call 140002670 + 14000154c: 48 8d 45 90 lea -0x70(%rbp),%rax + 140001550: 48 89 c1 mov %rax,%rcx + 140001553: e8 7e ff ff ff call 1400014d6 + 140001558: 84 c0 test %al,%al + 14000155a: 74 11 je 14000156d + 14000155c: 48 8d 05 bc 3a 00 00 lea 0x3abc(%rip),%rax # 14000501f <.rdata+0x1f> + 140001563: 48 89 c1 mov %rax,%rcx + 140001566: e8 6d 14 00 00 call 1400029d8 + 14000156b: eb 0f jmp 14000157c + 14000156d: 48 8d 05 ba 3a 00 00 lea 0x3aba(%rip),%rax # 14000502e <.rdata+0x2e> + 140001574: 48 89 c1 mov %rax,%rcx + 140001577: e8 5c 14 00 00 call 1400029d8 + 14000157c: b8 00 00 00 00 mov $0x0,%eax + 140001581: 48 81 c4 90 00 00 00 add $0x90,%rsp + 140001588: 5d pop %rbp + 140001589: c3 ret + 14000158a: 90 nop + 14000158b: 90 nop + 14000158c: 90 nop + 14000158d: 90 nop + 14000158e: 90 nop + 14000158f: 90 nop + +0000000140001590 <__do_global_dtors>: + 140001590: 48 83 ec 28 sub $0x28,%rsp + 140001594: 48 8b 05 65 2a 00 00 mov 0x2a65(%rip),%rax # 140004000 <__data_start__> + 14000159b: 48 8b 00 mov (%rax),%rax + 14000159e: 48 85 c0 test %rax,%rax + 1400015a1: 74 22 je 1400015c5 <__do_global_dtors+0x35> + 1400015a3: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 1400015a8: ff d0 call *%rax + 1400015aa: 48 8b 05 4f 2a 00 00 mov 0x2a4f(%rip),%rax # 140004000 <__data_start__> + 1400015b1: 48 8d 50 08 lea 0x8(%rax),%rdx + 1400015b5: 48 8b 40 08 mov 0x8(%rax),%rax + 1400015b9: 48 89 15 40 2a 00 00 mov %rdx,0x2a40(%rip) # 140004000 <__data_start__> + 1400015c0: 48 85 c0 test %rax,%rax + 1400015c3: 75 e3 jne 1400015a8 <__do_global_dtors+0x18> + 1400015c5: 48 83 c4 28 add $0x28,%rsp + 1400015c9: c3 ret + 1400015ca: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + +00000001400015d0 <__do_global_ctors>: + 1400015d0: 56 push %rsi + 1400015d1: 53 push %rbx + 1400015d2: 48 83 ec 28 sub $0x28,%rsp + 1400015d6: 48 8b 15 13 3e 00 00 mov 0x3e13(%rip),%rdx # 1400053f0 <.refptr.__CTOR_LIST__> + 1400015dd: 48 8b 02 mov (%rdx),%rax + 1400015e0: 89 c1 mov %eax,%ecx + 1400015e2: 83 f8 ff cmp $0xffffffff,%eax + 1400015e5: 74 39 je 140001620 <__do_global_ctors+0x50> + 1400015e7: 85 c9 test %ecx,%ecx + 1400015e9: 74 20 je 14000160b <__do_global_ctors+0x3b> + 1400015eb: 89 c8 mov %ecx,%eax + 1400015ed: 83 e9 01 sub $0x1,%ecx + 1400015f0: 48 8d 1c c2 lea (%rdx,%rax,8),%rbx + 1400015f4: 48 29 c8 sub %rcx,%rax + 1400015f7: 48 8d 74 c2 f8 lea -0x8(%rdx,%rax,8),%rsi + 1400015fc: 0f 1f 40 00 nopl 0x0(%rax) + 140001600: ff 13 call *(%rbx) + 140001602: 48 83 eb 08 sub $0x8,%rbx + 140001606: 48 39 f3 cmp %rsi,%rbx + 140001609: 75 f5 jne 140001600 <__do_global_ctors+0x30> + 14000160b: 48 8d 0d 7e ff ff ff lea -0x82(%rip),%rcx # 140001590 <__do_global_dtors> + 140001612: 48 83 c4 28 add $0x28,%rsp + 140001616: 5b pop %rbx + 140001617: 5e pop %rsi + 140001618: e9 f3 fd ff ff jmp 140001410 + 14000161d: 0f 1f 00 nopl (%rax) + 140001620: 31 c0 xor %eax,%eax + 140001622: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + 140001628: 44 8d 40 01 lea 0x1(%rax),%r8d + 14000162c: 89 c1 mov %eax,%ecx + 14000162e: 4a 83 3c c2 00 cmpq $0x0,(%rdx,%r8,8) + 140001633: 4c 89 c0 mov %r8,%rax + 140001636: 75 f0 jne 140001628 <__do_global_ctors+0x58> + 140001638: eb ad jmp 1400015e7 <__do_global_ctors+0x17> + 14000163a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + +0000000140001640 <__main>: + 140001640: 8b 05 fa 69 00 00 mov 0x69fa(%rip),%eax # 140008040 + 140001646: 85 c0 test %eax,%eax + 140001648: 74 06 je 140001650 <__main+0x10> + 14000164a: c3 ret + 14000164b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 140001650: c7 05 e6 69 00 00 01 movl $0x1,0x69e6(%rip) # 140008040 + 140001657: 00 00 00 + 14000165a: e9 71 ff ff ff jmp 1400015d0 <__do_global_ctors> + 14000165f: 90 nop + +0000000140001660 <_setargv>: + 140001660: 31 c0 xor %eax,%eax + 140001662: c3 ret + 140001663: 90 nop + 140001664: 90 nop + 140001665: 90 nop + 140001666: 90 nop + 140001667: 90 nop + 140001668: 90 nop + 140001669: 90 nop + 14000166a: 90 nop + 14000166b: 90 nop + 14000166c: 90 nop + 14000166d: 90 nop + 14000166e: 90 nop + 14000166f: 90 nop + +0000000140001670 <__dyn_tls_dtor>: + 140001670: 48 83 ec 28 sub $0x28,%rsp + 140001674: 83 fa 03 cmp $0x3,%edx + 140001677: 74 17 je 140001690 <__dyn_tls_dtor+0x20> + 140001679: 85 d2 test %edx,%edx + 14000167b: 74 13 je 140001690 <__dyn_tls_dtor+0x20> + 14000167d: b8 01 00 00 00 mov $0x1,%eax + 140001682: 48 83 c4 28 add $0x28,%rsp + 140001686: c3 ret + 140001687: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 14000168e: 00 00 + 140001690: e8 7b 0a 00 00 call 140002110 <__mingw_TLScallback> + 140001695: b8 01 00 00 00 mov $0x1,%eax + 14000169a: 48 83 c4 28 add $0x28,%rsp + 14000169e: c3 ret + 14000169f: 90 nop + +00000001400016a0 <__dyn_tls_init>: + 1400016a0: 56 push %rsi + 1400016a1: 53 push %rbx + 1400016a2: 48 83 ec 28 sub $0x28,%rsp + 1400016a6: 48 8b 05 23 3d 00 00 mov 0x3d23(%rip),%rax # 1400053d0 <.refptr._CRT_MT> + 1400016ad: 83 38 02 cmpl $0x2,(%rax) + 1400016b0: 74 06 je 1400016b8 <__dyn_tls_init+0x18> + 1400016b2: c7 00 02 00 00 00 movl $0x2,(%rax) + 1400016b8: 83 fa 02 cmp $0x2,%edx + 1400016bb: 74 13 je 1400016d0 <__dyn_tls_init+0x30> + 1400016bd: 83 fa 01 cmp $0x1,%edx + 1400016c0: 74 4e je 140001710 <__dyn_tls_init+0x70> + 1400016c2: b8 01 00 00 00 mov $0x1,%eax + 1400016c7: 48 83 c4 28 add $0x28,%rsp + 1400016cb: 5b pop %rbx + 1400016cc: 5e pop %rsi + 1400016cd: c3 ret + 1400016ce: 66 90 xchg %ax,%ax + 1400016d0: 48 8d 1d 81 89 00 00 lea 0x8981(%rip),%rbx # 14000a058 <__xd_z> + 1400016d7: 48 8d 35 7a 89 00 00 lea 0x897a(%rip),%rsi # 14000a058 <__xd_z> + 1400016de: 48 39 f3 cmp %rsi,%rbx + 1400016e1: 74 df je 1400016c2 <__dyn_tls_init+0x22> + 1400016e3: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 1400016e8: 48 8b 03 mov (%rbx),%rax + 1400016eb: 48 85 c0 test %rax,%rax + 1400016ee: 74 02 je 1400016f2 <__dyn_tls_init+0x52> + 1400016f0: ff d0 call *%rax + 1400016f2: 48 83 c3 08 add $0x8,%rbx + 1400016f6: 48 39 f3 cmp %rsi,%rbx + 1400016f9: 75 ed jne 1400016e8 <__dyn_tls_init+0x48> + 1400016fb: b8 01 00 00 00 mov $0x1,%eax + 140001700: 48 83 c4 28 add $0x28,%rsp + 140001704: 5b pop %rbx + 140001705: 5e pop %rsi + 140001706: c3 ret + 140001707: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 14000170e: 00 00 + 140001710: e8 fb 09 00 00 call 140002110 <__mingw_TLScallback> + 140001715: b8 01 00 00 00 mov $0x1,%eax + 14000171a: 48 83 c4 28 add $0x28,%rsp + 14000171e: 5b pop %rbx + 14000171f: 5e pop %rsi + 140001720: c3 ret + 140001721: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 140001728: 00 00 00 00 + 14000172c: 0f 1f 40 00 nopl 0x0(%rax) + +0000000140001730 <__tlregdtor>: + 140001730: 31 c0 xor %eax,%eax + 140001732: c3 ret + 140001733: 90 nop + 140001734: 90 nop + 140001735: 90 nop + 140001736: 90 nop + 140001737: 90 nop + 140001738: 90 nop + 140001739: 90 nop + 14000173a: 90 nop + 14000173b: 90 nop + 14000173c: 90 nop + 14000173d: 90 nop + 14000173e: 90 nop + 14000173f: 90 nop + +0000000140001740 <_matherr>: + 140001740: 56 push %rsi + 140001741: 53 push %rbx + 140001742: 48 83 ec 78 sub $0x78,%rsp + 140001746: 0f 11 74 24 40 movups %xmm6,0x40(%rsp) + 14000174b: 0f 11 7c 24 50 movups %xmm7,0x50(%rsp) + 140001750: 44 0f 11 44 24 60 movups %xmm8,0x60(%rsp) + 140001756: 83 39 06 cmpl $0x6,(%rcx) + 140001759: 0f 87 cd 00 00 00 ja 14000182c <_matherr+0xec> + 14000175f: 8b 01 mov (%rcx),%eax + 140001761: 48 8d 15 5c 3a 00 00 lea 0x3a5c(%rip),%rdx # 1400051c4 <.rdata+0x124> + 140001768: 48 63 04 82 movslq (%rdx,%rax,4),%rax + 14000176c: 48 01 d0 add %rdx,%rax + 14000176f: ff e0 jmp *%rax + 140001771: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140001778: 48 8d 1d 40 39 00 00 lea 0x3940(%rip),%rbx # 1400050bf <.rdata+0x1f> + 14000177f: f2 44 0f 10 41 20 movsd 0x20(%rcx),%xmm8 + 140001785: f2 0f 10 79 18 movsd 0x18(%rcx),%xmm7 + 14000178a: f2 0f 10 71 10 movsd 0x10(%rcx),%xmm6 + 14000178f: 48 8b 71 08 mov 0x8(%rcx),%rsi + 140001793: b9 02 00 00 00 mov $0x2,%ecx + 140001798: e8 03 12 00 00 call 1400029a0 <__acrt_iob_func> + 14000179d: f2 44 0f 11 44 24 30 movsd %xmm8,0x30(%rsp) + 1400017a4: 49 89 d8 mov %rbx,%r8 + 1400017a7: 48 8d 15 ea 39 00 00 lea 0x39ea(%rip),%rdx # 140005198 <.rdata+0xf8> + 1400017ae: f2 0f 11 7c 24 28 movsd %xmm7,0x28(%rsp) + 1400017b4: 48 89 c1 mov %rax,%rcx + 1400017b7: 49 89 f1 mov %rsi,%r9 + 1400017ba: f2 0f 11 74 24 20 movsd %xmm6,0x20(%rsp) + 1400017c0: e8 4b 0f 00 00 call 140002710 + 1400017c5: 90 nop + 1400017c6: 0f 10 74 24 40 movups 0x40(%rsp),%xmm6 + 1400017cb: 0f 10 7c 24 50 movups 0x50(%rsp),%xmm7 + 1400017d0: 31 c0 xor %eax,%eax + 1400017d2: 44 0f 10 44 24 60 movups 0x60(%rsp),%xmm8 + 1400017d8: 48 83 c4 78 add $0x78,%rsp + 1400017dc: 5b pop %rbx + 1400017dd: 5e pop %rsi + 1400017de: c3 ret + 1400017df: 90 nop + 1400017e0: 48 8d 1d b9 38 00 00 lea 0x38b9(%rip),%rbx # 1400050a0 <.rdata> + 1400017e7: eb 96 jmp 14000177f <_matherr+0x3f> + 1400017e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 1400017f0: 48 8d 1d 09 39 00 00 lea 0x3909(%rip),%rbx # 140005100 <.rdata+0x60> + 1400017f7: eb 86 jmp 14000177f <_matherr+0x3f> + 1400017f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140001800: 48 8d 1d d9 38 00 00 lea 0x38d9(%rip),%rbx # 1400050e0 <.rdata+0x40> + 140001807: e9 73 ff ff ff jmp 14000177f <_matherr+0x3f> + 14000180c: 0f 1f 40 00 nopl 0x0(%rax) + 140001810: 48 8d 1d 39 39 00 00 lea 0x3939(%rip),%rbx # 140005150 <.rdata+0xb0> + 140001817: e9 63 ff ff ff jmp 14000177f <_matherr+0x3f> + 14000181c: 0f 1f 40 00 nopl 0x0(%rax) + 140001820: 48 8d 1d 01 39 00 00 lea 0x3901(%rip),%rbx # 140005128 <.rdata+0x88> + 140001827: e9 53 ff ff ff jmp 14000177f <_matherr+0x3f> + 14000182c: 48 8d 1d 53 39 00 00 lea 0x3953(%rip),%rbx # 140005186 <.rdata+0xe6> + 140001833: e9 47 ff ff ff jmp 14000177f <_matherr+0x3f> + 140001838: 90 nop + 140001839: 90 nop + 14000183a: 90 nop + 14000183b: 90 nop + 14000183c: 90 nop + 14000183d: 90 nop + 14000183e: 90 nop + 14000183f: 90 nop + +0000000140001840 <_fpreset>: + 140001840: db e3 fninit + 140001842: c3 ret + 140001843: 90 nop + 140001844: 90 nop + 140001845: 90 nop + 140001846: 90 nop + 140001847: 90 nop + 140001848: 90 nop + 140001849: 90 nop + 14000184a: 90 nop + 14000184b: 90 nop + 14000184c: 90 nop + 14000184d: 90 nop + 14000184e: 90 nop + 14000184f: 90 nop + +0000000140001850 <__report_error>: + 140001850: 56 push %rsi + 140001851: 53 push %rbx + 140001852: 48 83 ec 38 sub $0x38,%rsp + 140001856: 48 89 cb mov %rcx,%rbx + 140001859: 48 8d 44 24 58 lea 0x58(%rsp),%rax + 14000185e: b9 02 00 00 00 mov $0x2,%ecx + 140001863: 48 89 54 24 58 mov %rdx,0x58(%rsp) + 140001868: 4c 89 44 24 60 mov %r8,0x60(%rsp) + 14000186d: 4c 89 4c 24 68 mov %r9,0x68(%rsp) + 140001872: 48 89 44 24 28 mov %rax,0x28(%rsp) + 140001877: e8 24 11 00 00 call 1400029a0 <__acrt_iob_func> + 14000187c: 41 b8 1b 00 00 00 mov $0x1b,%r8d + 140001882: ba 01 00 00 00 mov $0x1,%edx + 140001887: 48 8d 0d 52 39 00 00 lea 0x3952(%rip),%rcx # 1400051e0 <.rdata> + 14000188e: 49 89 c1 mov %rax,%r9 + 140001891: e8 3a 11 00 00 call 1400029d0 + 140001896: 48 8b 74 24 28 mov 0x28(%rsp),%rsi + 14000189b: b9 02 00 00 00 mov $0x2,%ecx + 1400018a0: e8 fb 10 00 00 call 1400029a0 <__acrt_iob_func> + 1400018a5: 48 89 da mov %rbx,%rdx + 1400018a8: 48 89 c1 mov %rax,%rcx + 1400018ab: 49 89 f0 mov %rsi,%r8 + 1400018ae: e8 9d 0d 00 00 call 140002650 + 1400018b3: e8 98 11 00 00 call 140002a50 + 1400018b8: 90 nop + 1400018b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + +00000001400018c0 : + 1400018c0: 57 push %rdi + 1400018c1: 56 push %rsi + 1400018c2: 53 push %rbx + 1400018c3: 48 83 ec 50 sub $0x50,%rsp + 1400018c7: 48 63 35 d6 67 00 00 movslq 0x67d6(%rip),%rsi # 1400080a4 + 1400018ce: 48 89 cb mov %rcx,%rbx + 1400018d1: 85 f6 test %esi,%esi + 1400018d3: 0f 8e 17 01 00 00 jle 1400019f0 + 1400018d9: 48 8b 05 c8 67 00 00 mov 0x67c8(%rip),%rax # 1400080a8 + 1400018e0: 45 31 c9 xor %r9d,%r9d + 1400018e3: 48 83 c0 18 add $0x18,%rax + 1400018e7: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 1400018ee: 00 00 + 1400018f0: 4c 8b 00 mov (%rax),%r8 + 1400018f3: 4c 39 c3 cmp %r8,%rbx + 1400018f6: 72 13 jb 14000190b + 1400018f8: 48 8b 50 08 mov 0x8(%rax),%rdx + 1400018fc: 8b 52 08 mov 0x8(%rdx),%edx + 1400018ff: 49 01 d0 add %rdx,%r8 + 140001902: 4c 39 c3 cmp %r8,%rbx + 140001905: 0f 82 8a 00 00 00 jb 140001995 + 14000190b: 41 83 c1 01 add $0x1,%r9d + 14000190f: 48 83 c0 28 add $0x28,%rax + 140001913: 41 39 f1 cmp %esi,%r9d + 140001916: 75 d8 jne 1400018f0 + 140001918: 48 89 d9 mov %rbx,%rcx + 14000191b: e8 10 0a 00 00 call 140002330 <__mingw_GetSectionForAddress> + 140001920: 48 89 c7 mov %rax,%rdi + 140001923: 48 85 c0 test %rax,%rax + 140001926: 0f 84 e6 00 00 00 je 140001a12 + 14000192c: 48 8b 05 75 67 00 00 mov 0x6775(%rip),%rax # 1400080a8 + 140001933: 48 8d 1c b6 lea (%rsi,%rsi,4),%rbx + 140001937: 48 c1 e3 03 shl $0x3,%rbx + 14000193b: 48 01 d8 add %rbx,%rax + 14000193e: 48 89 78 20 mov %rdi,0x20(%rax) + 140001942: c7 00 00 00 00 00 movl $0x0,(%rax) + 140001948: e8 23 0b 00 00 call 140002470 <_GetPEImageBase> + 14000194d: 8b 57 0c mov 0xc(%rdi),%edx + 140001950: 41 b8 30 00 00 00 mov $0x30,%r8d + 140001956: 48 8d 0c 10 lea (%rax,%rdx,1),%rcx + 14000195a: 48 8b 05 47 67 00 00 mov 0x6747(%rip),%rax # 1400080a8 + 140001961: 48 8d 54 24 20 lea 0x20(%rsp),%rdx + 140001966: 48 89 4c 18 18 mov %rcx,0x18(%rax,%rbx,1) + 14000196b: ff 15 5f 7a 00 00 call *0x7a5f(%rip) # 1400093d0 <__imp_VirtualQuery> + 140001971: 48 85 c0 test %rax,%rax + 140001974: 0f 84 7d 00 00 00 je 1400019f7 + 14000197a: 8b 44 24 44 mov 0x44(%rsp),%eax + 14000197e: 8d 50 fc lea -0x4(%rax),%edx + 140001981: 83 e2 fb and $0xfffffffb,%edx + 140001984: 74 08 je 14000198e + 140001986: 8d 50 c0 lea -0x40(%rax),%edx + 140001989: 83 e2 bf and $0xffffffbf,%edx + 14000198c: 75 12 jne 1400019a0 + 14000198e: 83 05 0f 67 00 00 01 addl $0x1,0x670f(%rip) # 1400080a4 + 140001995: 48 83 c4 50 add $0x50,%rsp + 140001999: 5b pop %rbx + 14000199a: 5e pop %rsi + 14000199b: 5f pop %rdi + 14000199c: c3 ret + 14000199d: 0f 1f 00 nopl (%rax) + 1400019a0: 83 f8 02 cmp $0x2,%eax + 1400019a3: 48 8b 4c 24 20 mov 0x20(%rsp),%rcx + 1400019a8: 48 8b 54 24 38 mov 0x38(%rsp),%rdx + 1400019ad: 41 b8 40 00 00 00 mov $0x40,%r8d + 1400019b3: b8 04 00 00 00 mov $0x4,%eax + 1400019b8: 44 0f 44 c0 cmove %eax,%r8d + 1400019bc: 48 03 1d e5 66 00 00 add 0x66e5(%rip),%rbx # 1400080a8 + 1400019c3: 48 89 4b 08 mov %rcx,0x8(%rbx) + 1400019c7: 49 89 d9 mov %rbx,%r9 + 1400019ca: 48 89 53 10 mov %rdx,0x10(%rbx) + 1400019ce: ff 15 f4 79 00 00 call *0x79f4(%rip) # 1400093c8 <__imp_VirtualProtect> + 1400019d4: 85 c0 test %eax,%eax + 1400019d6: 75 b6 jne 14000198e + 1400019d8: ff 15 92 79 00 00 call *0x7992(%rip) # 140009370 <__imp_GetLastError> + 1400019de: 48 8d 0d 73 38 00 00 lea 0x3873(%rip),%rcx # 140005258 <.rdata+0x78> + 1400019e5: 89 c2 mov %eax,%edx + 1400019e7: e8 64 fe ff ff call 140001850 <__report_error> + 1400019ec: 0f 1f 40 00 nopl 0x0(%rax) + 1400019f0: 31 f6 xor %esi,%esi + 1400019f2: e9 21 ff ff ff jmp 140001918 + 1400019f7: 48 8b 05 aa 66 00 00 mov 0x66aa(%rip),%rax # 1400080a8 + 1400019fe: 8b 57 08 mov 0x8(%rdi),%edx + 140001a01: 48 8d 0d 18 38 00 00 lea 0x3818(%rip),%rcx # 140005220 <.rdata+0x40> + 140001a08: 4c 8b 44 18 18 mov 0x18(%rax,%rbx,1),%r8 + 140001a0d: e8 3e fe ff ff call 140001850 <__report_error> + 140001a12: 48 89 da mov %rbx,%rdx + 140001a15: 48 8d 0d e4 37 00 00 lea 0x37e4(%rip),%rcx # 140005200 <.rdata+0x20> + 140001a1c: e8 2f fe ff ff call 140001850 <__report_error> + 140001a21: 90 nop + 140001a22: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 140001a29: 00 00 00 00 + 140001a2d: 0f 1f 00 nopl (%rax) + +0000000140001a30 <_pei386_runtime_relocator>: + 140001a30: 55 push %rbp + 140001a31: 41 57 push %r15 + 140001a33: 41 56 push %r14 + 140001a35: 41 55 push %r13 + 140001a37: 41 54 push %r12 + 140001a39: 57 push %rdi + 140001a3a: 56 push %rsi + 140001a3b: 53 push %rbx + 140001a3c: 48 83 ec 48 sub $0x48,%rsp + 140001a40: 48 8d 6c 24 40 lea 0x40(%rsp),%rbp + 140001a45: 44 8b 25 54 66 00 00 mov 0x6654(%rip),%r12d # 1400080a0 + 140001a4c: 45 85 e4 test %r12d,%r12d + 140001a4f: 74 17 je 140001a68 <_pei386_runtime_relocator+0x38> + 140001a51: 48 8d 65 08 lea 0x8(%rbp),%rsp + 140001a55: 5b pop %rbx + 140001a56: 5e pop %rsi + 140001a57: 5f pop %rdi + 140001a58: 41 5c pop %r12 + 140001a5a: 41 5d pop %r13 + 140001a5c: 41 5e pop %r14 + 140001a5e: 41 5f pop %r15 + 140001a60: 5d pop %rbp + 140001a61: c3 ret + 140001a62: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + 140001a68: c7 05 2e 66 00 00 01 movl $0x1,0x662e(%rip) # 1400080a0 + 140001a6f: 00 00 00 + 140001a72: e8 39 09 00 00 call 1400023b0 <__mingw_GetSectionCount> + 140001a77: 48 98 cltq + 140001a79: 48 8d 04 80 lea (%rax,%rax,4),%rax + 140001a7d: 48 8d 04 c5 0f 00 00 lea 0xf(,%rax,8),%rax + 140001a84: 00 + 140001a85: 48 83 e0 f0 and $0xfffffffffffffff0,%rax + 140001a89: e8 82 0b 00 00 call 140002610 <___chkstk_ms> + 140001a8e: 4c 8b 2d 7b 39 00 00 mov 0x397b(%rip),%r13 # 140005410 <.refptr.__RUNTIME_PSEUDO_RELOC_LIST_END__> + 140001a95: 48 8b 1d 84 39 00 00 mov 0x3984(%rip),%rbx # 140005420 <.refptr.__RUNTIME_PSEUDO_RELOC_LIST__> + 140001a9c: c7 05 fe 65 00 00 00 movl $0x0,0x65fe(%rip) # 1400080a4 + 140001aa3: 00 00 00 + 140001aa6: 48 29 c4 sub %rax,%rsp + 140001aa9: 48 8d 44 24 30 lea 0x30(%rsp),%rax + 140001aae: 48 89 05 f3 65 00 00 mov %rax,0x65f3(%rip) # 1400080a8 + 140001ab5: 4c 89 e8 mov %r13,%rax + 140001ab8: 48 29 d8 sub %rbx,%rax + 140001abb: 48 83 f8 07 cmp $0x7,%rax + 140001abf: 7e 90 jle 140001a51 <_pei386_runtime_relocator+0x21> + 140001ac1: 8b 13 mov (%rbx),%edx + 140001ac3: 48 83 f8 0b cmp $0xb,%rax + 140001ac7: 0f 8f 03 01 00 00 jg 140001bd0 <_pei386_runtime_relocator+0x1a0> + 140001acd: 8b 03 mov (%rbx),%eax + 140001acf: 85 c0 test %eax,%eax + 140001ad1: 0f 85 69 02 00 00 jne 140001d40 <_pei386_runtime_relocator+0x310> + 140001ad7: 8b 43 04 mov 0x4(%rbx),%eax + 140001ada: 85 c0 test %eax,%eax + 140001adc: 0f 85 5e 02 00 00 jne 140001d40 <_pei386_runtime_relocator+0x310> + 140001ae2: 8b 53 08 mov 0x8(%rbx),%edx + 140001ae5: 83 fa 01 cmp $0x1,%edx + 140001ae8: 0f 85 92 02 00 00 jne 140001d80 <_pei386_runtime_relocator+0x350> + 140001aee: 48 83 c3 0c add $0xc,%rbx + 140001af2: 4c 39 eb cmp %r13,%rbx + 140001af5: 0f 83 56 ff ff ff jae 140001a51 <_pei386_runtime_relocator+0x21> + 140001afb: 4c 8b 35 fe 38 00 00 mov 0x38fe(%rip),%r14 # 140005400 <.refptr.__ImageBase> + 140001b02: 41 bf ff ff ff ff mov $0xffffffff,%r15d + 140001b08: eb 65 jmp 140001b6f <_pei386_runtime_relocator+0x13f> + 140001b0a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + 140001b10: 83 f9 08 cmp $0x8,%ecx + 140001b13: 0f 84 d7 00 00 00 je 140001bf0 <_pei386_runtime_relocator+0x1c0> + 140001b19: 83 f9 10 cmp $0x10,%ecx + 140001b1c: 0f 85 50 02 00 00 jne 140001d72 <_pei386_runtime_relocator+0x342> + 140001b22: 0f b7 37 movzwl (%rdi),%esi + 140001b25: 81 e2 c0 00 00 00 and $0xc0,%edx + 140001b2b: 66 85 f6 test %si,%si + 140001b2e: 0f 89 cc 01 00 00 jns 140001d00 <_pei386_runtime_relocator+0x2d0> + 140001b34: 48 81 ce 00 00 ff ff or $0xffffffffffff0000,%rsi + 140001b3b: 48 29 c6 sub %rax,%rsi + 140001b3e: 4c 01 ce add %r9,%rsi + 140001b41: 85 d2 test %edx,%edx + 140001b43: 75 12 jne 140001b57 <_pei386_runtime_relocator+0x127> + 140001b45: 48 81 fe 00 80 ff ff cmp $0xffffffffffff8000,%rsi + 140001b4c: 7c 65 jl 140001bb3 <_pei386_runtime_relocator+0x183> + 140001b4e: 48 81 fe ff ff 00 00 cmp $0xffff,%rsi + 140001b55: 7f 5c jg 140001bb3 <_pei386_runtime_relocator+0x183> + 140001b57: 48 89 f9 mov %rdi,%rcx + 140001b5a: e8 61 fd ff ff call 1400018c0 + 140001b5f: 66 89 37 mov %si,(%rdi) + 140001b62: 48 83 c3 0c add $0xc,%rbx + 140001b66: 4c 39 eb cmp %r13,%rbx + 140001b69: 0f 83 d1 00 00 00 jae 140001c40 <_pei386_runtime_relocator+0x210> + 140001b6f: 8b 03 mov (%rbx),%eax + 140001b71: 8b 53 08 mov 0x8(%rbx),%edx + 140001b74: 8b 7b 04 mov 0x4(%rbx),%edi + 140001b77: 4c 01 f0 add %r14,%rax + 140001b7a: 0f b6 ca movzbl %dl,%ecx + 140001b7d: 4c 8b 08 mov (%rax),%r9 + 140001b80: 4c 01 f7 add %r14,%rdi + 140001b83: 83 f9 20 cmp $0x20,%ecx + 140001b86: 0f 84 0c 01 00 00 je 140001c98 <_pei386_runtime_relocator+0x268> + 140001b8c: 76 82 jbe 140001b10 <_pei386_runtime_relocator+0xe0> + 140001b8e: 83 f9 40 cmp $0x40,%ecx + 140001b91: 0f 85 db 01 00 00 jne 140001d72 <_pei386_runtime_relocator+0x342> + 140001b97: 48 8b 37 mov (%rdi),%rsi + 140001b9a: 89 d1 mov %edx,%ecx + 140001b9c: 48 29 c6 sub %rax,%rsi + 140001b9f: 4c 01 ce add %r9,%rsi + 140001ba2: 81 e1 c0 00 00 00 and $0xc0,%ecx + 140001ba8: 0f 85 42 01 00 00 jne 140001cf0 <_pei386_runtime_relocator+0x2c0> + 140001bae: 48 85 f6 test %rsi,%rsi + 140001bb1: 78 af js 140001b62 <_pei386_runtime_relocator+0x132> + 140001bb3: 48 89 74 24 20 mov %rsi,0x20(%rsp) + 140001bb8: 89 ca mov %ecx,%edx + 140001bba: 49 89 f8 mov %rdi,%r8 + 140001bbd: 48 8d 0d 24 37 00 00 lea 0x3724(%rip),%rcx # 1400052e8 <.rdata+0x108> + 140001bc4: e8 87 fc ff ff call 140001850 <__report_error> + 140001bc9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140001bd0: 85 d2 test %edx,%edx + 140001bd2: 0f 85 68 01 00 00 jne 140001d40 <_pei386_runtime_relocator+0x310> + 140001bd8: 8b 43 04 mov 0x4(%rbx),%eax + 140001bdb: 89 c2 mov %eax,%edx + 140001bdd: 0b 53 08 or 0x8(%rbx),%edx + 140001be0: 0f 85 f4 fe ff ff jne 140001ada <_pei386_runtime_relocator+0xaa> + 140001be6: 48 83 c3 0c add $0xc,%rbx + 140001bea: e9 de fe ff ff jmp 140001acd <_pei386_runtime_relocator+0x9d> + 140001bef: 90 nop + 140001bf0: 0f b6 37 movzbl (%rdi),%esi + 140001bf3: 81 e2 c0 00 00 00 and $0xc0,%edx + 140001bf9: 40 84 f6 test %sil,%sil + 140001bfc: 0f 89 26 01 00 00 jns 140001d28 <_pei386_runtime_relocator+0x2f8> + 140001c02: 48 81 ce 00 ff ff ff or $0xffffffffffffff00,%rsi + 140001c09: 48 29 c6 sub %rax,%rsi + 140001c0c: 4c 01 ce add %r9,%rsi + 140001c0f: 85 d2 test %edx,%edx + 140001c11: 75 0f jne 140001c22 <_pei386_runtime_relocator+0x1f2> + 140001c13: 48 81 fe ff 00 00 00 cmp $0xff,%rsi + 140001c1a: 7f 97 jg 140001bb3 <_pei386_runtime_relocator+0x183> + 140001c1c: 48 83 fe 80 cmp $0xffffffffffffff80,%rsi + 140001c20: 7c 91 jl 140001bb3 <_pei386_runtime_relocator+0x183> + 140001c22: 48 89 f9 mov %rdi,%rcx + 140001c25: 48 83 c3 0c add $0xc,%rbx + 140001c29: e8 92 fc ff ff call 1400018c0 + 140001c2e: 40 88 37 mov %sil,(%rdi) + 140001c31: 4c 39 eb cmp %r13,%rbx + 140001c34: 0f 82 35 ff ff ff jb 140001b6f <_pei386_runtime_relocator+0x13f> + 140001c3a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + 140001c40: 8b 15 5e 64 00 00 mov 0x645e(%rip),%edx # 1400080a4 + 140001c46: 85 d2 test %edx,%edx + 140001c48: 0f 8e 03 fe ff ff jle 140001a51 <_pei386_runtime_relocator+0x21> + 140001c4e: 48 8b 35 73 77 00 00 mov 0x7773(%rip),%rsi # 1400093c8 <__imp_VirtualProtect> + 140001c55: 31 db xor %ebx,%ebx + 140001c57: 48 8d 7d fc lea -0x4(%rbp),%rdi + 140001c5b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 140001c60: 48 8b 05 41 64 00 00 mov 0x6441(%rip),%rax # 1400080a8 + 140001c67: 48 01 d8 add %rbx,%rax + 140001c6a: 44 8b 00 mov (%rax),%r8d + 140001c6d: 45 85 c0 test %r8d,%r8d + 140001c70: 74 0d je 140001c7f <_pei386_runtime_relocator+0x24f> + 140001c72: 48 8b 50 10 mov 0x10(%rax),%rdx + 140001c76: 48 8b 48 08 mov 0x8(%rax),%rcx + 140001c7a: 49 89 f9 mov %rdi,%r9 + 140001c7d: ff d6 call *%rsi + 140001c7f: 41 83 c4 01 add $0x1,%r12d + 140001c83: 48 83 c3 28 add $0x28,%rbx + 140001c87: 44 3b 25 16 64 00 00 cmp 0x6416(%rip),%r12d # 1400080a4 + 140001c8e: 7c d0 jl 140001c60 <_pei386_runtime_relocator+0x230> + 140001c90: e9 bc fd ff ff jmp 140001a51 <_pei386_runtime_relocator+0x21> + 140001c95: 0f 1f 00 nopl (%rax) + 140001c98: 8b 37 mov (%rdi),%esi + 140001c9a: 81 e2 c0 00 00 00 and $0xc0,%edx + 140001ca0: 85 f6 test %esi,%esi + 140001ca2: 79 74 jns 140001d18 <_pei386_runtime_relocator+0x2e8> + 140001ca4: 49 bb 00 00 00 00 ff movabs $0xffffffff00000000,%r11 + 140001cab: ff ff ff + 140001cae: 4c 09 de or %r11,%rsi + 140001cb1: 48 29 c6 sub %rax,%rsi + 140001cb4: 4c 01 ce add %r9,%rsi + 140001cb7: 85 d2 test %edx,%edx + 140001cb9: 75 1c jne 140001cd7 <_pei386_runtime_relocator+0x2a7> + 140001cbb: 4c 39 fe cmp %r15,%rsi + 140001cbe: 0f 8f ef fe ff ff jg 140001bb3 <_pei386_runtime_relocator+0x183> + 140001cc4: 48 b8 ff ff ff 7f ff movabs $0xffffffff7fffffff,%rax + 140001ccb: ff ff ff + 140001cce: 48 39 c6 cmp %rax,%rsi + 140001cd1: 0f 8e dc fe ff ff jle 140001bb3 <_pei386_runtime_relocator+0x183> + 140001cd7: 48 89 f9 mov %rdi,%rcx + 140001cda: e8 e1 fb ff ff call 1400018c0 + 140001cdf: 89 37 mov %esi,(%rdi) + 140001ce1: e9 7c fe ff ff jmp 140001b62 <_pei386_runtime_relocator+0x132> + 140001ce6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 140001ced: 00 00 00 + 140001cf0: 48 89 f9 mov %rdi,%rcx + 140001cf3: e8 c8 fb ff ff call 1400018c0 + 140001cf8: 48 89 37 mov %rsi,(%rdi) + 140001cfb: e9 62 fe ff ff jmp 140001b62 <_pei386_runtime_relocator+0x132> + 140001d00: 48 29 c6 sub %rax,%rsi + 140001d03: 4c 01 ce add %r9,%rsi + 140001d06: 85 d2 test %edx,%edx + 140001d08: 0f 84 37 fe ff ff je 140001b45 <_pei386_runtime_relocator+0x115> + 140001d0e: e9 44 fe ff ff jmp 140001b57 <_pei386_runtime_relocator+0x127> + 140001d13: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 140001d18: 48 29 c6 sub %rax,%rsi + 140001d1b: 4c 01 ce add %r9,%rsi + 140001d1e: 85 d2 test %edx,%edx + 140001d20: 74 99 je 140001cbb <_pei386_runtime_relocator+0x28b> + 140001d22: eb b3 jmp 140001cd7 <_pei386_runtime_relocator+0x2a7> + 140001d24: 0f 1f 40 00 nopl 0x0(%rax) + 140001d28: 48 29 c6 sub %rax,%rsi + 140001d2b: 4c 01 ce add %r9,%rsi + 140001d2e: 85 d2 test %edx,%edx + 140001d30: 0f 84 dd fe ff ff je 140001c13 <_pei386_runtime_relocator+0x1e3> + 140001d36: e9 e7 fe ff ff jmp 140001c22 <_pei386_runtime_relocator+0x1f2> + 140001d3b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 140001d40: 4c 39 eb cmp %r13,%rbx + 140001d43: 0f 83 08 fd ff ff jae 140001a51 <_pei386_runtime_relocator+0x21> + 140001d49: 4c 8b 35 b0 36 00 00 mov 0x36b0(%rip),%r14 # 140005400 <.refptr.__ImageBase> + 140001d50: 8b 73 04 mov 0x4(%rbx),%esi + 140001d53: 8b 3b mov (%rbx),%edi + 140001d55: 48 83 c3 08 add $0x8,%rbx + 140001d59: 4c 01 f6 add %r14,%rsi + 140001d5c: 03 3e add (%rsi),%edi + 140001d5e: 48 89 f1 mov %rsi,%rcx + 140001d61: e8 5a fb ff ff call 1400018c0 + 140001d66: 89 3e mov %edi,(%rsi) + 140001d68: 4c 39 eb cmp %r13,%rbx + 140001d6b: 72 e3 jb 140001d50 <_pei386_runtime_relocator+0x320> + 140001d6d: e9 ce fe ff ff jmp 140001c40 <_pei386_runtime_relocator+0x210> + 140001d72: 89 ca mov %ecx,%edx + 140001d74: 48 8d 0d 3d 35 00 00 lea 0x353d(%rip),%rcx # 1400052b8 <.rdata+0xd8> + 140001d7b: e8 d0 fa ff ff call 140001850 <__report_error> + 140001d80: 48 8d 0d f9 34 00 00 lea 0x34f9(%rip),%rcx # 140005280 <.rdata+0xa0> + 140001d87: e8 c4 fa ff ff call 140001850 <__report_error> + 140001d8c: 90 nop + 140001d8d: 90 nop + 140001d8e: 90 nop + 140001d8f: 90 nop + +0000000140001d90 <__mingw_raise_matherr>: + 140001d90: 48 83 ec 58 sub $0x58,%rsp + 140001d94: 48 8b 05 15 63 00 00 mov 0x6315(%rip),%rax # 1400080b0 + 140001d9b: 66 0f 14 d3 unpcklpd %xmm3,%xmm2 + 140001d9f: 48 85 c0 test %rax,%rax + 140001da2: 74 25 je 140001dc9 <__mingw_raise_matherr+0x39> + 140001da4: f2 0f 10 84 24 80 00 movsd 0x80(%rsp),%xmm0 + 140001dab: 00 00 + 140001dad: 89 4c 24 20 mov %ecx,0x20(%rsp) + 140001db1: 48 8d 4c 24 20 lea 0x20(%rsp),%rcx + 140001db6: 48 89 54 24 28 mov %rdx,0x28(%rsp) + 140001dbb: 0f 11 54 24 30 movups %xmm2,0x30(%rsp) + 140001dc0: f2 0f 11 44 24 40 movsd %xmm0,0x40(%rsp) + 140001dc6: ff d0 call *%rax + 140001dc8: 90 nop + 140001dc9: 48 83 c4 58 add $0x58,%rsp + 140001dcd: c3 ret + 140001dce: 66 90 xchg %ax,%ax + +0000000140001dd0 <__mingw_setusermatherr>: + 140001dd0: 48 89 0d d9 62 00 00 mov %rcx,0x62d9(%rip) # 1400080b0 + 140001dd7: e9 a4 0c 00 00 jmp 140002a80 <__setusermatherr> + 140001ddc: 90 nop + 140001ddd: 90 nop + 140001dde: 90 nop + 140001ddf: 90 nop + +0000000140001de0 <_gnu_exception_handler>: + 140001de0: 53 push %rbx + 140001de1: 48 83 ec 20 sub $0x20,%rsp + 140001de5: 48 8b 11 mov (%rcx),%rdx + 140001de8: 8b 02 mov (%rdx),%eax + 140001dea: 48 89 cb mov %rcx,%rbx + 140001ded: 89 c1 mov %eax,%ecx + 140001def: 81 e1 ff ff ff 20 and $0x20ffffff,%ecx + 140001df5: 81 f9 43 43 47 20 cmp $0x20474343,%ecx + 140001dfb: 0f 84 bf 00 00 00 je 140001ec0 <_gnu_exception_handler+0xe0> + 140001e01: 3d 96 00 00 c0 cmp $0xc0000096,%eax + 140001e06: 77 47 ja 140001e4f <_gnu_exception_handler+0x6f> + 140001e08: 3d 8b 00 00 c0 cmp $0xc000008b,%eax + 140001e0d: 76 61 jbe 140001e70 <_gnu_exception_handler+0x90> + 140001e0f: 05 73 ff ff 3f add $0x3fffff73,%eax + 140001e14: 83 f8 09 cmp $0x9,%eax + 140001e17: 0f 87 93 00 00 00 ja 140001eb0 <_gnu_exception_handler+0xd0> + 140001e1d: 48 8d 15 1c 35 00 00 lea 0x351c(%rip),%rdx # 140005340 <.rdata> + 140001e24: 48 63 04 82 movslq (%rdx,%rax,4),%rax + 140001e28: 48 01 d0 add %rdx,%rax + 140001e2b: ff e0 jmp *%rax + 140001e2d: 0f 1f 00 nopl (%rax) + 140001e30: 31 d2 xor %edx,%edx + 140001e32: b9 08 00 00 00 mov $0x8,%ecx + 140001e37: e8 24 0c 00 00 call 140002a60 + 140001e3c: 48 83 f8 01 cmp $0x1,%rax + 140001e40: 0f 84 3e 01 00 00 je 140001f84 <_gnu_exception_handler+0x1a4> + 140001e46: 48 85 c0 test %rax,%rax + 140001e49: 0f 85 01 01 00 00 jne 140001f50 <_gnu_exception_handler+0x170> + 140001e4f: 48 8b 05 7a 62 00 00 mov 0x627a(%rip),%rax # 1400080d0 <__mingw_oldexcpt_handler> + 140001e56: 48 85 c0 test %rax,%rax + 140001e59: 74 75 je 140001ed0 <_gnu_exception_handler+0xf0> + 140001e5b: 48 89 d9 mov %rbx,%rcx + 140001e5e: 48 83 c4 20 add $0x20,%rsp + 140001e62: 5b pop %rbx + 140001e63: 48 ff e0 rex.W jmp *%rax + 140001e66: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 140001e6d: 00 00 00 + 140001e70: 3d 05 00 00 c0 cmp $0xc0000005,%eax + 140001e75: 0f 84 a5 00 00 00 je 140001f20 <_gnu_exception_handler+0x140> + 140001e7b: 76 63 jbe 140001ee0 <_gnu_exception_handler+0x100> + 140001e7d: 3d 08 00 00 c0 cmp $0xc0000008,%eax + 140001e82: 74 2c je 140001eb0 <_gnu_exception_handler+0xd0> + 140001e84: 3d 1d 00 00 c0 cmp $0xc000001d,%eax + 140001e89: 75 c4 jne 140001e4f <_gnu_exception_handler+0x6f> + 140001e8b: 31 d2 xor %edx,%edx + 140001e8d: b9 04 00 00 00 mov $0x4,%ecx + 140001e92: e8 c9 0b 00 00 call 140002a60 + 140001e97: 48 83 f8 01 cmp $0x1,%rax + 140001e9b: 0f 84 cf 00 00 00 je 140001f70 <_gnu_exception_handler+0x190> + 140001ea1: 48 85 c0 test %rax,%rax + 140001ea4: 74 a9 je 140001e4f <_gnu_exception_handler+0x6f> + 140001ea6: b9 04 00 00 00 mov $0x4,%ecx + 140001eab: ff d0 call *%rax + 140001ead: 0f 1f 00 nopl (%rax) + 140001eb0: b8 ff ff ff ff mov $0xffffffff,%eax + 140001eb5: eb 1b jmp 140001ed2 <_gnu_exception_handler+0xf2> + 140001eb7: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 140001ebe: 00 00 + 140001ec0: f6 42 04 01 testb $0x1,0x4(%rdx) + 140001ec4: 0f 85 37 ff ff ff jne 140001e01 <_gnu_exception_handler+0x21> + 140001eca: eb e4 jmp 140001eb0 <_gnu_exception_handler+0xd0> + 140001ecc: 0f 1f 40 00 nopl 0x0(%rax) + 140001ed0: 31 c0 xor %eax,%eax + 140001ed2: 48 83 c4 20 add $0x20,%rsp + 140001ed6: 5b pop %rbx + 140001ed7: c3 ret + 140001ed8: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) + 140001edf: 00 + 140001ee0: 3d 02 00 00 80 cmp $0x80000002,%eax + 140001ee5: 0f 85 64 ff ff ff jne 140001e4f <_gnu_exception_handler+0x6f> + 140001eeb: eb c3 jmp 140001eb0 <_gnu_exception_handler+0xd0> + 140001eed: 0f 1f 00 nopl (%rax) + 140001ef0: 31 d2 xor %edx,%edx + 140001ef2: b9 08 00 00 00 mov $0x8,%ecx + 140001ef7: e8 64 0b 00 00 call 140002a60 + 140001efc: 48 83 f8 01 cmp $0x1,%rax + 140001f00: 0f 85 40 ff ff ff jne 140001e46 <_gnu_exception_handler+0x66> + 140001f06: ba 01 00 00 00 mov $0x1,%edx + 140001f0b: b9 08 00 00 00 mov $0x8,%ecx + 140001f10: e8 4b 0b 00 00 call 140002a60 + 140001f15: eb 99 jmp 140001eb0 <_gnu_exception_handler+0xd0> + 140001f17: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 140001f1e: 00 00 + 140001f20: 31 d2 xor %edx,%edx + 140001f22: b9 0b 00 00 00 mov $0xb,%ecx + 140001f27: e8 34 0b 00 00 call 140002a60 + 140001f2c: 48 83 f8 01 cmp $0x1,%rax + 140001f30: 74 2a je 140001f5c <_gnu_exception_handler+0x17c> + 140001f32: 48 85 c0 test %rax,%rax + 140001f35: 0f 84 14 ff ff ff je 140001e4f <_gnu_exception_handler+0x6f> + 140001f3b: b9 0b 00 00 00 mov $0xb,%ecx + 140001f40: ff d0 call *%rax + 140001f42: e9 69 ff ff ff jmp 140001eb0 <_gnu_exception_handler+0xd0> + 140001f47: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 140001f4e: 00 00 + 140001f50: b9 08 00 00 00 mov $0x8,%ecx + 140001f55: ff d0 call *%rax + 140001f57: e9 54 ff ff ff jmp 140001eb0 <_gnu_exception_handler+0xd0> + 140001f5c: ba 01 00 00 00 mov $0x1,%edx + 140001f61: b9 0b 00 00 00 mov $0xb,%ecx + 140001f66: e8 f5 0a 00 00 call 140002a60 + 140001f6b: e9 40 ff ff ff jmp 140001eb0 <_gnu_exception_handler+0xd0> + 140001f70: ba 01 00 00 00 mov $0x1,%edx + 140001f75: b9 04 00 00 00 mov $0x4,%ecx + 140001f7a: e8 e1 0a 00 00 call 140002a60 + 140001f7f: e9 2c ff ff ff jmp 140001eb0 <_gnu_exception_handler+0xd0> + 140001f84: ba 01 00 00 00 mov $0x1,%edx + 140001f89: b9 08 00 00 00 mov $0x8,%ecx + 140001f8e: e8 cd 0a 00 00 call 140002a60 + 140001f93: e8 a8 f8 ff ff call 140001840 <_fpreset> + 140001f98: e9 13 ff ff ff jmp 140001eb0 <_gnu_exception_handler+0xd0> + 140001f9d: 90 nop + 140001f9e: 90 nop + 140001f9f: 90 nop + +0000000140001fa0 <__mingwthr_run_key_dtors.part.0>: + 140001fa0: 41 54 push %r12 + 140001fa2: 55 push %rbp + 140001fa3: 57 push %rdi + 140001fa4: 56 push %rsi + 140001fa5: 53 push %rbx + 140001fa6: 48 83 ec 20 sub $0x20,%rsp + 140001faa: 4c 8d 25 4f 61 00 00 lea 0x614f(%rip),%r12 # 140008100 <__mingwthr_cs> + 140001fb1: 4c 89 e1 mov %r12,%rcx + 140001fb4: ff 15 9e 73 00 00 call *0x739e(%rip) # 140009358 <__imp_EnterCriticalSection> + 140001fba: 48 8b 1d 1f 61 00 00 mov 0x611f(%rip),%rbx # 1400080e0 + 140001fc1: 48 85 db test %rbx,%rbx + 140001fc4: 74 36 je 140001ffc <__mingwthr_run_key_dtors.part.0+0x5c> + 140001fc6: 48 8b 2d f3 73 00 00 mov 0x73f3(%rip),%rbp # 1400093c0 <__imp_TlsGetValue> + 140001fcd: 48 8b 3d 9c 73 00 00 mov 0x739c(%rip),%rdi # 140009370 <__imp_GetLastError> + 140001fd4: 0f 1f 40 00 nopl 0x0(%rax) + 140001fd8: 8b 0b mov (%rbx),%ecx + 140001fda: ff d5 call *%rbp + 140001fdc: 48 89 c6 mov %rax,%rsi + 140001fdf: ff d7 call *%rdi + 140001fe1: 48 85 f6 test %rsi,%rsi + 140001fe4: 74 0d je 140001ff3 <__mingwthr_run_key_dtors.part.0+0x53> + 140001fe6: 85 c0 test %eax,%eax + 140001fe8: 75 09 jne 140001ff3 <__mingwthr_run_key_dtors.part.0+0x53> + 140001fea: 48 8b 43 08 mov 0x8(%rbx),%rax + 140001fee: 48 89 f1 mov %rsi,%rcx + 140001ff1: ff d0 call *%rax + 140001ff3: 48 8b 5b 10 mov 0x10(%rbx),%rbx + 140001ff7: 48 85 db test %rbx,%rbx + 140001ffa: 75 dc jne 140001fd8 <__mingwthr_run_key_dtors.part.0+0x38> + 140001ffc: 4c 89 e1 mov %r12,%rcx + 140001fff: 48 83 c4 20 add $0x20,%rsp + 140002003: 5b pop %rbx + 140002004: 5e pop %rsi + 140002005: 5f pop %rdi + 140002006: 5d pop %rbp + 140002007: 41 5c pop %r12 + 140002009: 48 ff 25 78 73 00 00 rex.W jmp *0x7378(%rip) # 140009388 <__imp_LeaveCriticalSection> + +0000000140002010 <___w64_mingwthr_add_key_dtor>: + 140002010: 57 push %rdi + 140002011: 56 push %rsi + 140002012: 53 push %rbx + 140002013: 48 83 ec 20 sub $0x20,%rsp + 140002017: 8b 05 cb 60 00 00 mov 0x60cb(%rip),%eax # 1400080e8 <__mingwthr_cs_init> + 14000201d: 89 cf mov %ecx,%edi + 14000201f: 48 89 d6 mov %rdx,%rsi + 140002022: 85 c0 test %eax,%eax + 140002024: 75 0a jne 140002030 <___w64_mingwthr_add_key_dtor+0x20> + 140002026: 31 c0 xor %eax,%eax + 140002028: 48 83 c4 20 add $0x20,%rsp + 14000202c: 5b pop %rbx + 14000202d: 5e pop %rsi + 14000202e: 5f pop %rdi + 14000202f: c3 ret + 140002030: ba 18 00 00 00 mov $0x18,%edx + 140002035: b9 01 00 00 00 mov $0x1,%ecx + 14000203a: e8 59 0a 00 00 call 140002a98 + 14000203f: 48 89 c3 mov %rax,%rbx + 140002042: 48 85 c0 test %rax,%rax + 140002045: 74 33 je 14000207a <___w64_mingwthr_add_key_dtor+0x6a> + 140002047: 48 89 70 08 mov %rsi,0x8(%rax) + 14000204b: 48 8d 35 ae 60 00 00 lea 0x60ae(%rip),%rsi # 140008100 <__mingwthr_cs> + 140002052: 89 38 mov %edi,(%rax) + 140002054: 48 89 f1 mov %rsi,%rcx + 140002057: ff 15 fb 72 00 00 call *0x72fb(%rip) # 140009358 <__imp_EnterCriticalSection> + 14000205d: 48 8b 05 7c 60 00 00 mov 0x607c(%rip),%rax # 1400080e0 + 140002064: 48 89 f1 mov %rsi,%rcx + 140002067: 48 89 1d 72 60 00 00 mov %rbx,0x6072(%rip) # 1400080e0 + 14000206e: 48 89 43 10 mov %rax,0x10(%rbx) + 140002072: ff 15 10 73 00 00 call *0x7310(%rip) # 140009388 <__imp_LeaveCriticalSection> + 140002078: eb ac jmp 140002026 <___w64_mingwthr_add_key_dtor+0x16> + 14000207a: 83 c8 ff or $0xffffffff,%eax + 14000207d: eb a9 jmp 140002028 <___w64_mingwthr_add_key_dtor+0x18> + 14000207f: 90 nop + +0000000140002080 <___w64_mingwthr_remove_key_dtor>: + 140002080: 56 push %rsi + 140002081: 53 push %rbx + 140002082: 48 83 ec 28 sub $0x28,%rsp + 140002086: 8b 05 5c 60 00 00 mov 0x605c(%rip),%eax # 1400080e8 <__mingwthr_cs_init> + 14000208c: 89 cb mov %ecx,%ebx + 14000208e: 85 c0 test %eax,%eax + 140002090: 75 0e jne 1400020a0 <___w64_mingwthr_remove_key_dtor+0x20> + 140002092: 31 c0 xor %eax,%eax + 140002094: 48 83 c4 28 add $0x28,%rsp + 140002098: 5b pop %rbx + 140002099: 5e pop %rsi + 14000209a: c3 ret + 14000209b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 1400020a0: 48 8d 35 59 60 00 00 lea 0x6059(%rip),%rsi # 140008100 <__mingwthr_cs> + 1400020a7: 48 89 f1 mov %rsi,%rcx + 1400020aa: ff 15 a8 72 00 00 call *0x72a8(%rip) # 140009358 <__imp_EnterCriticalSection> + 1400020b0: 48 8b 0d 29 60 00 00 mov 0x6029(%rip),%rcx # 1400080e0 + 1400020b7: 48 85 c9 test %rcx,%rcx + 1400020ba: 74 27 je 1400020e3 <___w64_mingwthr_remove_key_dtor+0x63> + 1400020bc: 31 d2 xor %edx,%edx + 1400020be: eb 0b jmp 1400020cb <___w64_mingwthr_remove_key_dtor+0x4b> + 1400020c0: 48 89 ca mov %rcx,%rdx + 1400020c3: 48 85 c0 test %rax,%rax + 1400020c6: 74 1b je 1400020e3 <___w64_mingwthr_remove_key_dtor+0x63> + 1400020c8: 48 89 c1 mov %rax,%rcx + 1400020cb: 8b 01 mov (%rcx),%eax + 1400020cd: 39 d8 cmp %ebx,%eax + 1400020cf: 48 8b 41 10 mov 0x10(%rcx),%rax + 1400020d3: 75 eb jne 1400020c0 <___w64_mingwthr_remove_key_dtor+0x40> + 1400020d5: 48 85 d2 test %rdx,%rdx + 1400020d8: 74 1e je 1400020f8 <___w64_mingwthr_remove_key_dtor+0x78> + 1400020da: 48 89 42 10 mov %rax,0x10(%rdx) + 1400020de: e8 bd 09 00 00 call 140002aa0 + 1400020e3: 48 89 f1 mov %rsi,%rcx + 1400020e6: ff 15 9c 72 00 00 call *0x729c(%rip) # 140009388 <__imp_LeaveCriticalSection> + 1400020ec: 31 c0 xor %eax,%eax + 1400020ee: 48 83 c4 28 add $0x28,%rsp + 1400020f2: 5b pop %rbx + 1400020f3: 5e pop %rsi + 1400020f4: c3 ret + 1400020f5: 0f 1f 00 nopl (%rax) + 1400020f8: 48 89 05 e1 5f 00 00 mov %rax,0x5fe1(%rip) # 1400080e0 + 1400020ff: eb dd jmp 1400020de <___w64_mingwthr_remove_key_dtor+0x5e> + 140002101: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 140002108: 00 00 00 00 + 14000210c: 0f 1f 40 00 nopl 0x0(%rax) + +0000000140002110 <__mingw_TLScallback>: + 140002110: 53 push %rbx + 140002111: 48 83 ec 20 sub $0x20,%rsp + 140002115: 83 fa 02 cmp $0x2,%edx + 140002118: 0f 84 b2 00 00 00 je 1400021d0 <__mingw_TLScallback+0xc0> + 14000211e: 77 30 ja 140002150 <__mingw_TLScallback+0x40> + 140002120: 85 d2 test %edx,%edx + 140002122: 74 4c je 140002170 <__mingw_TLScallback+0x60> + 140002124: 8b 05 be 5f 00 00 mov 0x5fbe(%rip),%eax # 1400080e8 <__mingwthr_cs_init> + 14000212a: 85 c0 test %eax,%eax + 14000212c: 0f 84 be 00 00 00 je 1400021f0 <__mingw_TLScallback+0xe0> + 140002132: c7 05 ac 5f 00 00 01 movl $0x1,0x5fac(%rip) # 1400080e8 <__mingwthr_cs_init> + 140002139: 00 00 00 + 14000213c: b8 01 00 00 00 mov $0x1,%eax + 140002141: 48 83 c4 20 add $0x20,%rsp + 140002145: 5b pop %rbx + 140002146: c3 ret + 140002147: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 14000214e: 00 00 + 140002150: 83 fa 03 cmp $0x3,%edx + 140002153: 75 e7 jne 14000213c <__mingw_TLScallback+0x2c> + 140002155: 8b 05 8d 5f 00 00 mov 0x5f8d(%rip),%eax # 1400080e8 <__mingwthr_cs_init> + 14000215b: 85 c0 test %eax,%eax + 14000215d: 74 dd je 14000213c <__mingw_TLScallback+0x2c> + 14000215f: e8 3c fe ff ff call 140001fa0 <__mingwthr_run_key_dtors.part.0> + 140002164: eb d6 jmp 14000213c <__mingw_TLScallback+0x2c> + 140002166: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 14000216d: 00 00 00 + 140002170: 8b 05 72 5f 00 00 mov 0x5f72(%rip),%eax # 1400080e8 <__mingwthr_cs_init> + 140002176: 85 c0 test %eax,%eax + 140002178: 75 66 jne 1400021e0 <__mingw_TLScallback+0xd0> + 14000217a: 8b 05 68 5f 00 00 mov 0x5f68(%rip),%eax # 1400080e8 <__mingwthr_cs_init> + 140002180: 83 f8 01 cmp $0x1,%eax + 140002183: 75 b7 jne 14000213c <__mingw_TLScallback+0x2c> + 140002185: 48 8b 1d 54 5f 00 00 mov 0x5f54(%rip),%rbx # 1400080e0 + 14000218c: 48 85 db test %rbx,%rbx + 14000218f: 74 18 je 1400021a9 <__mingw_TLScallback+0x99> + 140002191: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140002198: 48 89 d9 mov %rbx,%rcx + 14000219b: 48 8b 5b 10 mov 0x10(%rbx),%rbx + 14000219f: e8 fc 08 00 00 call 140002aa0 + 1400021a4: 48 85 db test %rbx,%rbx + 1400021a7: 75 ef jne 140002198 <__mingw_TLScallback+0x88> + 1400021a9: 48 8d 0d 50 5f 00 00 lea 0x5f50(%rip),%rcx # 140008100 <__mingwthr_cs> + 1400021b0: 48 c7 05 25 5f 00 00 movq $0x0,0x5f25(%rip) # 1400080e0 + 1400021b7: 00 00 00 00 + 1400021bb: c7 05 23 5f 00 00 00 movl $0x0,0x5f23(%rip) # 1400080e8 <__mingwthr_cs_init> + 1400021c2: 00 00 00 + 1400021c5: ff 15 7d 71 00 00 call *0x717d(%rip) # 140009348 <__imp_DeleteCriticalSection> + 1400021cb: e9 6c ff ff ff jmp 14000213c <__mingw_TLScallback+0x2c> + 1400021d0: e8 6b f6 ff ff call 140001840 <_fpreset> + 1400021d5: b8 01 00 00 00 mov $0x1,%eax + 1400021da: 48 83 c4 20 add $0x20,%rsp + 1400021de: 5b pop %rbx + 1400021df: c3 ret + 1400021e0: e8 bb fd ff ff call 140001fa0 <__mingwthr_run_key_dtors.part.0> + 1400021e5: eb 93 jmp 14000217a <__mingw_TLScallback+0x6a> + 1400021e7: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 1400021ee: 00 00 + 1400021f0: 48 8d 0d 09 5f 00 00 lea 0x5f09(%rip),%rcx # 140008100 <__mingwthr_cs> + 1400021f7: ff 15 83 71 00 00 call *0x7183(%rip) # 140009380 <__imp_InitializeCriticalSection> + 1400021fd: e9 30 ff ff ff jmp 140002132 <__mingw_TLScallback+0x22> + 140002202: 90 nop + 140002203: 90 nop + 140002204: 90 nop + 140002205: 90 nop + 140002206: 90 nop + 140002207: 90 nop + 140002208: 90 nop + 140002209: 90 nop + 14000220a: 90 nop + 14000220b: 90 nop + 14000220c: 90 nop + 14000220d: 90 nop + 14000220e: 90 nop + 14000220f: 90 nop + +0000000140002210 <_ValidateImageBase>: + 140002210: 31 c0 xor %eax,%eax + 140002212: 66 81 39 4d 5a cmpw $0x5a4d,(%rcx) + 140002217: 75 0f jne 140002228 <_ValidateImageBase+0x18> + 140002219: 48 63 51 3c movslq 0x3c(%rcx),%rdx + 14000221d: 48 01 d1 add %rdx,%rcx + 140002220: 81 39 50 45 00 00 cmpl $0x4550,(%rcx) + 140002226: 74 08 je 140002230 <_ValidateImageBase+0x20> + 140002228: c3 ret + 140002229: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140002230: 31 c0 xor %eax,%eax + 140002232: 66 81 79 18 0b 02 cmpw $0x20b,0x18(%rcx) + 140002238: 0f 94 c0 sete %al + 14000223b: c3 ret + 14000223c: 0f 1f 40 00 nopl 0x0(%rax) + +0000000140002240 <_FindPESection>: + 140002240: 48 63 41 3c movslq 0x3c(%rcx),%rax + 140002244: 48 01 c1 add %rax,%rcx + 140002247: 0f b7 41 14 movzwl 0x14(%rcx),%eax + 14000224b: 44 0f b7 41 06 movzwl 0x6(%rcx),%r8d + 140002250: 48 8d 44 01 18 lea 0x18(%rcx,%rax,1),%rax + 140002255: 66 45 85 c0 test %r8w,%r8w + 140002259: 74 32 je 14000228d <_FindPESection+0x4d> + 14000225b: 41 8d 48 ff lea -0x1(%r8),%ecx + 14000225f: 48 8d 0c 89 lea (%rcx,%rcx,4),%rcx + 140002263: 4c 8d 4c c8 28 lea 0x28(%rax,%rcx,8),%r9 + 140002268: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) + 14000226f: 00 + 140002270: 44 8b 40 0c mov 0xc(%rax),%r8d + 140002274: 4c 89 c1 mov %r8,%rcx + 140002277: 4c 39 c2 cmp %r8,%rdx + 14000227a: 72 08 jb 140002284 <_FindPESection+0x44> + 14000227c: 03 48 08 add 0x8(%rax),%ecx + 14000227f: 48 39 ca cmp %rcx,%rdx + 140002282: 72 0b jb 14000228f <_FindPESection+0x4f> + 140002284: 48 83 c0 28 add $0x28,%rax + 140002288: 4c 39 c8 cmp %r9,%rax + 14000228b: 75 e3 jne 140002270 <_FindPESection+0x30> + 14000228d: 31 c0 xor %eax,%eax + 14000228f: c3 ret + +0000000140002290 <_FindPESectionByName>: + 140002290: 57 push %rdi + 140002291: 56 push %rsi + 140002292: 53 push %rbx + 140002293: 48 83 ec 20 sub $0x20,%rsp + 140002297: 48 89 ce mov %rcx,%rsi + 14000229a: e8 f1 06 00 00 call 140002990 + 14000229f: 48 83 f8 08 cmp $0x8,%rax + 1400022a3: 77 7b ja 140002320 <_FindPESectionByName+0x90> + 1400022a5: 48 8b 15 54 31 00 00 mov 0x3154(%rip),%rdx # 140005400 <.refptr.__ImageBase> + 1400022ac: 31 db xor %ebx,%ebx + 1400022ae: 66 81 3a 4d 5a cmpw $0x5a4d,(%rdx) + 1400022b3: 75 59 jne 14000230e <_FindPESectionByName+0x7e> + 1400022b5: 48 63 42 3c movslq 0x3c(%rdx),%rax + 1400022b9: 48 01 d0 add %rdx,%rax + 1400022bc: 81 38 50 45 00 00 cmpl $0x4550,(%rax) + 1400022c2: 75 4a jne 14000230e <_FindPESectionByName+0x7e> + 1400022c4: 66 81 78 18 0b 02 cmpw $0x20b,0x18(%rax) + 1400022ca: 75 42 jne 14000230e <_FindPESectionByName+0x7e> + 1400022cc: 0f b7 50 14 movzwl 0x14(%rax),%edx + 1400022d0: 48 8d 5c 10 18 lea 0x18(%rax,%rdx,1),%rbx + 1400022d5: 0f b7 50 06 movzwl 0x6(%rax),%edx + 1400022d9: 66 85 d2 test %dx,%dx + 1400022dc: 74 42 je 140002320 <_FindPESectionByName+0x90> + 1400022de: 8d 42 ff lea -0x1(%rdx),%eax + 1400022e1: 48 8d 04 80 lea (%rax,%rax,4),%rax + 1400022e5: 48 8d 7c c3 28 lea 0x28(%rbx,%rax,8),%rdi + 1400022ea: eb 0d jmp 1400022f9 <_FindPESectionByName+0x69> + 1400022ec: 0f 1f 40 00 nopl 0x0(%rax) + 1400022f0: 48 83 c3 28 add $0x28,%rbx + 1400022f4: 48 39 fb cmp %rdi,%rbx + 1400022f7: 74 27 je 140002320 <_FindPESectionByName+0x90> + 1400022f9: 41 b8 08 00 00 00 mov $0x8,%r8d + 1400022ff: 48 89 f2 mov %rsi,%rdx + 140002302: 48 89 d9 mov %rbx,%rcx + 140002305: e8 8e 06 00 00 call 140002998 + 14000230a: 85 c0 test %eax,%eax + 14000230c: 75 e2 jne 1400022f0 <_FindPESectionByName+0x60> + 14000230e: 48 89 d8 mov %rbx,%rax + 140002311: 48 83 c4 20 add $0x20,%rsp + 140002315: 5b pop %rbx + 140002316: 5e pop %rsi + 140002317: 5f pop %rdi + 140002318: c3 ret + 140002319: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140002320: 31 db xor %ebx,%ebx + 140002322: 48 89 d8 mov %rbx,%rax + 140002325: 48 83 c4 20 add $0x20,%rsp + 140002329: 5b pop %rbx + 14000232a: 5e pop %rsi + 14000232b: 5f pop %rdi + 14000232c: c3 ret + 14000232d: 0f 1f 00 nopl (%rax) + +0000000140002330 <__mingw_GetSectionForAddress>: + 140002330: 48 8b 15 c9 30 00 00 mov 0x30c9(%rip),%rdx # 140005400 <.refptr.__ImageBase> + 140002337: 31 c0 xor %eax,%eax + 140002339: 66 81 3a 4d 5a cmpw $0x5a4d,(%rdx) + 14000233e: 75 10 jne 140002350 <__mingw_GetSectionForAddress+0x20> + 140002340: 4c 63 42 3c movslq 0x3c(%rdx),%r8 + 140002344: 49 01 d0 add %rdx,%r8 + 140002347: 41 81 38 50 45 00 00 cmpl $0x4550,(%r8) + 14000234e: 74 08 je 140002358 <__mingw_GetSectionForAddress+0x28> + 140002350: c3 ret + 140002351: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140002358: 66 41 81 78 18 0b 02 cmpw $0x20b,0x18(%r8) + 14000235f: 75 ef jne 140002350 <__mingw_GetSectionForAddress+0x20> + 140002361: 41 0f b7 40 14 movzwl 0x14(%r8),%eax + 140002366: 48 29 d1 sub %rdx,%rcx + 140002369: 49 8d 44 00 18 lea 0x18(%r8,%rax,1),%rax + 14000236e: 45 0f b7 40 06 movzwl 0x6(%r8),%r8d + 140002373: 66 45 85 c0 test %r8w,%r8w + 140002377: 74 34 je 1400023ad <__mingw_GetSectionForAddress+0x7d> + 140002379: 41 8d 50 ff lea -0x1(%r8),%edx + 14000237d: 48 8d 14 92 lea (%rdx,%rdx,4),%rdx + 140002381: 4c 8d 4c d0 28 lea 0x28(%rax,%rdx,8),%r9 + 140002386: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 14000238d: 00 00 00 + 140002390: 44 8b 40 0c mov 0xc(%rax),%r8d + 140002394: 4c 89 c2 mov %r8,%rdx + 140002397: 4c 39 c1 cmp %r8,%rcx + 14000239a: 72 08 jb 1400023a4 <__mingw_GetSectionForAddress+0x74> + 14000239c: 03 50 08 add 0x8(%rax),%edx + 14000239f: 48 39 d1 cmp %rdx,%rcx + 1400023a2: 72 ac jb 140002350 <__mingw_GetSectionForAddress+0x20> + 1400023a4: 48 83 c0 28 add $0x28,%rax + 1400023a8: 4c 39 c8 cmp %r9,%rax + 1400023ab: 75 e3 jne 140002390 <__mingw_GetSectionForAddress+0x60> + 1400023ad: 31 c0 xor %eax,%eax + 1400023af: c3 ret + +00000001400023b0 <__mingw_GetSectionCount>: + 1400023b0: 48 8b 05 49 30 00 00 mov 0x3049(%rip),%rax # 140005400 <.refptr.__ImageBase> + 1400023b7: 31 c9 xor %ecx,%ecx + 1400023b9: 66 81 38 4d 5a cmpw $0x5a4d,(%rax) + 1400023be: 75 0f jne 1400023cf <__mingw_GetSectionCount+0x1f> + 1400023c0: 48 63 50 3c movslq 0x3c(%rax),%rdx + 1400023c4: 48 01 d0 add %rdx,%rax + 1400023c7: 81 38 50 45 00 00 cmpl $0x4550,(%rax) + 1400023cd: 74 09 je 1400023d8 <__mingw_GetSectionCount+0x28> + 1400023cf: 89 c8 mov %ecx,%eax + 1400023d1: c3 ret + 1400023d2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + 1400023d8: 66 81 78 18 0b 02 cmpw $0x20b,0x18(%rax) + 1400023de: 75 ef jne 1400023cf <__mingw_GetSectionCount+0x1f> + 1400023e0: 0f b7 48 06 movzwl 0x6(%rax),%ecx + 1400023e4: 89 c8 mov %ecx,%eax + 1400023e6: c3 ret + 1400023e7: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 1400023ee: 00 00 + +00000001400023f0 <_FindPESectionExec>: + 1400023f0: 4c 8b 05 09 30 00 00 mov 0x3009(%rip),%r8 # 140005400 <.refptr.__ImageBase> + 1400023f7: 31 c0 xor %eax,%eax + 1400023f9: 66 41 81 38 4d 5a cmpw $0x5a4d,(%r8) + 1400023ff: 75 0f jne 140002410 <_FindPESectionExec+0x20> + 140002401: 49 63 50 3c movslq 0x3c(%r8),%rdx + 140002405: 4c 01 c2 add %r8,%rdx + 140002408: 81 3a 50 45 00 00 cmpl $0x4550,(%rdx) + 14000240e: 74 08 je 140002418 <_FindPESectionExec+0x28> + 140002410: c3 ret + 140002411: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140002418: 66 81 7a 18 0b 02 cmpw $0x20b,0x18(%rdx) + 14000241e: 75 f0 jne 140002410 <_FindPESectionExec+0x20> + 140002420: 0f b7 42 14 movzwl 0x14(%rdx),%eax + 140002424: 44 0f b7 42 06 movzwl 0x6(%rdx),%r8d + 140002429: 48 8d 44 02 18 lea 0x18(%rdx,%rax,1),%rax + 14000242e: 66 45 85 c0 test %r8w,%r8w + 140002432: 74 2c je 140002460 <_FindPESectionExec+0x70> + 140002434: 41 8d 50 ff lea -0x1(%r8),%edx + 140002438: 48 8d 14 92 lea (%rdx,%rdx,4),%rdx + 14000243c: 48 8d 54 d0 28 lea 0x28(%rax,%rdx,8),%rdx + 140002441: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140002448: f6 40 27 20 testb $0x20,0x27(%rax) + 14000244c: 74 09 je 140002457 <_FindPESectionExec+0x67> + 14000244e: 48 85 c9 test %rcx,%rcx + 140002451: 74 bd je 140002410 <_FindPESectionExec+0x20> + 140002453: 48 83 e9 01 sub $0x1,%rcx + 140002457: 48 83 c0 28 add $0x28,%rax + 14000245b: 48 39 c2 cmp %rax,%rdx + 14000245e: 75 e8 jne 140002448 <_FindPESectionExec+0x58> + 140002460: 31 c0 xor %eax,%eax + 140002462: c3 ret + 140002463: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 14000246a: 00 00 00 00 + 14000246e: 66 90 xchg %ax,%ax + +0000000140002470 <_GetPEImageBase>: + 140002470: 48 8b 05 89 2f 00 00 mov 0x2f89(%rip),%rax # 140005400 <.refptr.__ImageBase> + 140002477: 31 d2 xor %edx,%edx + 140002479: 66 81 38 4d 5a cmpw $0x5a4d,(%rax) + 14000247e: 75 0f jne 14000248f <_GetPEImageBase+0x1f> + 140002480: 48 63 48 3c movslq 0x3c(%rax),%rcx + 140002484: 48 01 c1 add %rax,%rcx + 140002487: 81 39 50 45 00 00 cmpl $0x4550,(%rcx) + 14000248d: 74 09 je 140002498 <_GetPEImageBase+0x28> + 14000248f: 48 89 d0 mov %rdx,%rax + 140002492: c3 ret + 140002493: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 140002498: 66 81 79 18 0b 02 cmpw $0x20b,0x18(%rcx) + 14000249e: 48 0f 44 d0 cmove %rax,%rdx + 1400024a2: 48 89 d0 mov %rdx,%rax + 1400024a5: c3 ret + 1400024a6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 1400024ad: 00 00 00 + +00000001400024b0 <_IsNonwritableInCurrentImage>: + 1400024b0: 48 8b 15 49 2f 00 00 mov 0x2f49(%rip),%rdx # 140005400 <.refptr.__ImageBase> + 1400024b7: 31 c0 xor %eax,%eax + 1400024b9: 66 81 3a 4d 5a cmpw $0x5a4d,(%rdx) + 1400024be: 75 10 jne 1400024d0 <_IsNonwritableInCurrentImage+0x20> + 1400024c0: 4c 63 42 3c movslq 0x3c(%rdx),%r8 + 1400024c4: 49 01 d0 add %rdx,%r8 + 1400024c7: 41 81 38 50 45 00 00 cmpl $0x4550,(%r8) + 1400024ce: 74 08 je 1400024d8 <_IsNonwritableInCurrentImage+0x28> + 1400024d0: c3 ret + 1400024d1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 1400024d8: 66 41 81 78 18 0b 02 cmpw $0x20b,0x18(%r8) + 1400024df: 75 ef jne 1400024d0 <_IsNonwritableInCurrentImage+0x20> + 1400024e1: 48 29 d1 sub %rdx,%rcx + 1400024e4: 45 0f b7 48 06 movzwl 0x6(%r8),%r9d + 1400024e9: 41 0f b7 50 14 movzwl 0x14(%r8),%edx + 1400024ee: 49 8d 54 10 18 lea 0x18(%r8,%rdx,1),%rdx + 1400024f3: 66 45 85 c9 test %r9w,%r9w + 1400024f7: 74 d7 je 1400024d0 <_IsNonwritableInCurrentImage+0x20> + 1400024f9: 41 8d 41 ff lea -0x1(%r9),%eax + 1400024fd: 48 8d 04 80 lea (%rax,%rax,4),%rax + 140002501: 4c 8d 4c c2 28 lea 0x28(%rdx,%rax,8),%r9 + 140002506: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 14000250d: 00 00 00 + 140002510: 44 8b 42 0c mov 0xc(%rdx),%r8d + 140002514: 4c 89 c0 mov %r8,%rax + 140002517: 4c 39 c1 cmp %r8,%rcx + 14000251a: 72 08 jb 140002524 <_IsNonwritableInCurrentImage+0x74> + 14000251c: 03 42 08 add 0x8(%rdx),%eax + 14000251f: 48 39 c1 cmp %rax,%rcx + 140002522: 72 0c jb 140002530 <_IsNonwritableInCurrentImage+0x80> + 140002524: 48 83 c2 28 add $0x28,%rdx + 140002528: 4c 39 ca cmp %r9,%rdx + 14000252b: 75 e3 jne 140002510 <_IsNonwritableInCurrentImage+0x60> + 14000252d: 31 c0 xor %eax,%eax + 14000252f: c3 ret + 140002530: 8b 42 24 mov 0x24(%rdx),%eax + 140002533: f7 d0 not %eax + 140002535: c1 e8 1f shr $0x1f,%eax + 140002538: c3 ret + 140002539: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + +0000000140002540 <__mingw_enum_import_library_names>: + 140002540: 4c 8b 1d b9 2e 00 00 mov 0x2eb9(%rip),%r11 # 140005400 <.refptr.__ImageBase> + 140002547: 45 31 c9 xor %r9d,%r9d + 14000254a: 66 41 81 3b 4d 5a cmpw $0x5a4d,(%r11) + 140002550: 75 10 jne 140002562 <__mingw_enum_import_library_names+0x22> + 140002552: 4d 63 43 3c movslq 0x3c(%r11),%r8 + 140002556: 4d 01 d8 add %r11,%r8 + 140002559: 41 81 38 50 45 00 00 cmpl $0x4550,(%r8) + 140002560: 74 0e je 140002570 <__mingw_enum_import_library_names+0x30> + 140002562: 4c 89 c8 mov %r9,%rax + 140002565: c3 ret + 140002566: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 14000256d: 00 00 00 + 140002570: 66 41 81 78 18 0b 02 cmpw $0x20b,0x18(%r8) + 140002577: 75 e9 jne 140002562 <__mingw_enum_import_library_names+0x22> + 140002579: 41 8b 80 90 00 00 00 mov 0x90(%r8),%eax + 140002580: 85 c0 test %eax,%eax + 140002582: 74 de je 140002562 <__mingw_enum_import_library_names+0x22> + 140002584: 41 0f b7 50 14 movzwl 0x14(%r8),%edx + 140002589: 45 0f b7 50 06 movzwl 0x6(%r8),%r10d + 14000258e: 49 8d 54 10 18 lea 0x18(%r8,%rdx,1),%rdx + 140002593: 66 45 85 d2 test %r10w,%r10w + 140002597: 74 c9 je 140002562 <__mingw_enum_import_library_names+0x22> + 140002599: 45 8d 42 ff lea -0x1(%r10),%r8d + 14000259d: 4f 8d 04 80 lea (%r8,%r8,4),%r8 + 1400025a1: 4e 8d 54 c2 28 lea 0x28(%rdx,%r8,8),%r10 + 1400025a6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 1400025ad: 00 00 00 + 1400025b0: 44 8b 4a 0c mov 0xc(%rdx),%r9d + 1400025b4: 4d 89 c8 mov %r9,%r8 + 1400025b7: 4c 39 c8 cmp %r9,%rax + 1400025ba: 72 09 jb 1400025c5 <__mingw_enum_import_library_names+0x85> + 1400025bc: 44 03 42 08 add 0x8(%rdx),%r8d + 1400025c0: 4c 39 c0 cmp %r8,%rax + 1400025c3: 72 13 jb 1400025d8 <__mingw_enum_import_library_names+0x98> + 1400025c5: 48 83 c2 28 add $0x28,%rdx + 1400025c9: 49 39 d2 cmp %rdx,%r10 + 1400025cc: 75 e2 jne 1400025b0 <__mingw_enum_import_library_names+0x70> + 1400025ce: 45 31 c9 xor %r9d,%r9d + 1400025d1: 4c 89 c8 mov %r9,%rax + 1400025d4: c3 ret + 1400025d5: 0f 1f 00 nopl (%rax) + 1400025d8: 4c 01 d8 add %r11,%rax + 1400025db: eb 0a jmp 1400025e7 <__mingw_enum_import_library_names+0xa7> + 1400025dd: 0f 1f 00 nopl (%rax) + 1400025e0: 83 e9 01 sub $0x1,%ecx + 1400025e3: 48 83 c0 14 add $0x14,%rax + 1400025e7: 44 8b 40 04 mov 0x4(%rax),%r8d + 1400025eb: 45 85 c0 test %r8d,%r8d + 1400025ee: 75 07 jne 1400025f7 <__mingw_enum_import_library_names+0xb7> + 1400025f0: 8b 50 0c mov 0xc(%rax),%edx + 1400025f3: 85 d2 test %edx,%edx + 1400025f5: 74 d7 je 1400025ce <__mingw_enum_import_library_names+0x8e> + 1400025f7: 85 c9 test %ecx,%ecx + 1400025f9: 7f e5 jg 1400025e0 <__mingw_enum_import_library_names+0xa0> + 1400025fb: 44 8b 48 0c mov 0xc(%rax),%r9d + 1400025ff: 4d 01 d9 add %r11,%r9 + 140002602: 4c 89 c8 mov %r9,%rax + 140002605: c3 ret + 140002606: 90 nop + 140002607: 90 nop + 140002608: 90 nop + 140002609: 90 nop + 14000260a: 90 nop + 14000260b: 90 nop + 14000260c: 90 nop + 14000260d: 90 nop + 14000260e: 90 nop + 14000260f: 90 nop + +0000000140002610 <___chkstk_ms>: + 140002610: 51 push %rcx + 140002611: 50 push %rax + 140002612: 48 3d 00 10 00 00 cmp $0x1000,%rax + 140002618: 48 8d 4c 24 18 lea 0x18(%rsp),%rcx + 14000261d: 72 19 jb 140002638 <___chkstk_ms+0x28> + 14000261f: 48 81 e9 00 10 00 00 sub $0x1000,%rcx + 140002626: 48 83 09 00 orq $0x0,(%rcx) + 14000262a: 48 2d 00 10 00 00 sub $0x1000,%rax + 140002630: 48 3d 00 10 00 00 cmp $0x1000,%rax + 140002636: 77 e7 ja 14000261f <___chkstk_ms+0xf> + 140002638: 48 29 c1 sub %rax,%rcx + 14000263b: 48 83 09 00 orq $0x0,(%rcx) + 14000263f: 58 pop %rax + 140002640: 59 pop %rcx + 140002641: c3 ret + 140002642: 90 nop + 140002643: 90 nop + 140002644: 90 nop + 140002645: 90 nop + 140002646: 90 nop + 140002647: 90 nop + 140002648: 90 nop + 140002649: 90 nop + 14000264a: 90 nop + 14000264b: 90 nop + 14000264c: 90 nop + 14000264d: 90 nop + 14000264e: 90 nop + 14000264f: 90 nop + +0000000140002650 : + 140002650: 48 83 ec 38 sub $0x38,%rsp + 140002654: 45 31 c9 xor %r9d,%r9d + 140002657: 4c 89 44 24 20 mov %r8,0x20(%rsp) + 14000265c: 49 89 d0 mov %rdx,%r8 + 14000265f: 48 89 ca mov %rcx,%rdx + 140002662: 31 c9 xor %ecx,%ecx + 140002664: e8 4f 03 00 00 call 1400029b8 <__stdio_common_vfprintf> + 140002669: 48 83 c4 38 add $0x38,%rsp + 14000266d: c3 ret + 14000266e: 90 nop + 14000266f: 90 nop + +0000000140002670 : + 140002670: 56 push %rsi + 140002671: 53 push %rbx + 140002672: 48 83 ec 48 sub $0x48,%rsp + 140002676: 48 89 cb mov %rcx,%rbx + 140002679: 48 8d 74 24 68 lea 0x68(%rsp),%rsi + 14000267e: 31 c9 xor %ecx,%ecx + 140002680: 48 89 54 24 68 mov %rdx,0x68(%rsp) + 140002685: 4c 89 44 24 70 mov %r8,0x70(%rsp) + 14000268a: 4c 89 4c 24 78 mov %r9,0x78(%rsp) + 14000268f: 48 89 74 24 38 mov %rsi,0x38(%rsp) + 140002694: e8 07 03 00 00 call 1400029a0 <__acrt_iob_func> + 140002699: 48 89 74 24 20 mov %rsi,0x20(%rsp) + 14000269e: 45 31 c9 xor %r9d,%r9d + 1400026a1: 49 89 d8 mov %rbx,%r8 + 1400026a4: 48 89 c2 mov %rax,%rdx + 1400026a7: 31 c9 xor %ecx,%ecx + 1400026a9: e8 12 03 00 00 call 1400029c0 <__stdio_common_vfscanf> + 1400026ae: 48 83 c4 48 add $0x48,%rsp + 1400026b2: 5b pop %rbx + 1400026b3: 5e pop %rsi + 1400026b4: c3 ret + 1400026b5: 90 nop + 1400026b6: 90 nop + 1400026b7: 90 nop + 1400026b8: 90 nop + 1400026b9: 90 nop + 1400026ba: 90 nop + 1400026bb: 90 nop + 1400026bc: 90 nop + 1400026bd: 90 nop + 1400026be: 90 nop + 1400026bf: 90 nop + +00000001400026c0 : + 1400026c0: 56 push %rsi + 1400026c1: 53 push %rbx + 1400026c2: 48 83 ec 48 sub $0x48,%rsp + 1400026c6: 48 89 cb mov %rcx,%rbx + 1400026c9: 48 8d 74 24 68 lea 0x68(%rsp),%rsi + 1400026ce: b9 01 00 00 00 mov $0x1,%ecx + 1400026d3: 48 89 54 24 68 mov %rdx,0x68(%rsp) + 1400026d8: 4c 89 44 24 70 mov %r8,0x70(%rsp) + 1400026dd: 4c 89 4c 24 78 mov %r9,0x78(%rsp) + 1400026e2: 48 89 74 24 38 mov %rsi,0x38(%rsp) + 1400026e7: e8 b4 02 00 00 call 1400029a0 <__acrt_iob_func> + 1400026ec: 48 89 74 24 20 mov %rsi,0x20(%rsp) + 1400026f1: 45 31 c9 xor %r9d,%r9d + 1400026f4: 49 89 d8 mov %rbx,%r8 + 1400026f7: 48 89 c2 mov %rax,%rdx + 1400026fa: 31 c9 xor %ecx,%ecx + 1400026fc: e8 b7 02 00 00 call 1400029b8 <__stdio_common_vfprintf> + 140002701: 48 83 c4 48 add $0x48,%rsp + 140002705: 5b pop %rbx + 140002706: 5e pop %rsi + 140002707: c3 ret + 140002708: 90 nop + 140002709: 90 nop + 14000270a: 90 nop + 14000270b: 90 nop + 14000270c: 90 nop + 14000270d: 90 nop + 14000270e: 90 nop + 14000270f: 90 nop + +0000000140002710 : + 140002710: 48 83 ec 48 sub $0x48,%rsp + 140002714: 48 8d 44 24 60 lea 0x60(%rsp),%rax + 140002719: 4c 89 44 24 60 mov %r8,0x60(%rsp) + 14000271e: 49 89 d0 mov %rdx,%r8 + 140002721: 48 89 ca mov %rcx,%rdx + 140002724: 48 89 44 24 20 mov %rax,0x20(%rsp) + 140002729: 31 c9 xor %ecx,%ecx + 14000272b: 4c 89 4c 24 68 mov %r9,0x68(%rsp) + 140002730: 45 31 c9 xor %r9d,%r9d + 140002733: 48 89 44 24 38 mov %rax,0x38(%rsp) + 140002738: e8 7b 02 00 00 call 1400029b8 <__stdio_common_vfprintf> + 14000273d: 48 83 c4 48 add $0x48,%rsp + 140002741: c3 ret + 140002742: 90 nop + 140002743: 90 nop + 140002744: 90 nop + 140002745: 90 nop + 140002746: 90 nop + 140002747: 90 nop + 140002748: 90 nop + 140002749: 90 nop + 14000274a: 90 nop + 14000274b: 90 nop + 14000274c: 90 nop + 14000274d: 90 nop + 14000274e: 90 nop + 14000274f: 90 nop + +0000000140002750 <_get_output_format>: + 140002750: 31 c0 xor %eax,%eax + 140002752: c3 ret + 140002753: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 14000275a: 00 00 00 00 + 14000275e: 66 90 xchg %ax,%ax + +0000000140002760 <__getmainargs>: + 140002760: 41 54 push %r12 + 140002762: 55 push %rbp + 140002763: 57 push %rdi + 140002764: 56 push %rsi + 140002765: 53 push %rbx + 140002766: 48 83 ec 20 sub $0x20,%rsp + 14000276a: 4c 8b 64 24 70 mov 0x70(%rsp),%r12 + 14000276f: 44 89 cd mov %r9d,%ebp + 140002772: 48 89 d6 mov %rdx,%rsi + 140002775: 4c 89 c3 mov %r8,%rbx + 140002778: 48 89 cf mov %rcx,%rdi + 14000277b: e8 a8 02 00 00 call 140002a28 <_initialize_narrow_environment> + 140002780: 83 fd 01 cmp $0x1,%ebp + 140002783: b9 01 00 00 00 mov $0x1,%ecx + 140002788: 83 d9 ff sbb $0xffffffff,%ecx + 14000278b: e8 70 02 00 00 call 140002a00 <_configure_narrow_argv> + 140002790: e8 4b 02 00 00 call 1400029e0 <__p___argc> + 140002795: 8b 00 mov (%rax),%eax + 140002797: 89 07 mov %eax,(%rdi) + 140002799: e8 4a 02 00 00 call 1400029e8 <__p___argv> + 14000279e: 48 8b 00 mov (%rax),%rax + 1400027a1: 48 89 06 mov %rax,(%rsi) + 1400027a4: e8 07 03 00 00 call 140002ab0 <__p__environ> + 1400027a9: 48 8b 00 mov (%rax),%rax + 1400027ac: 48 89 03 mov %rax,(%rbx) + 1400027af: 4d 85 e4 test %r12,%r12 + 1400027b2: 74 09 je 1400027bd <__getmainargs+0x5d> + 1400027b4: 41 8b 0c 24 mov (%r12),%ecx + 1400027b8: e8 d3 02 00 00 call 140002a90 <_set_new_mode> + 1400027bd: 31 c0 xor %eax,%eax + 1400027bf: 48 83 c4 20 add $0x20,%rsp + 1400027c3: 5b pop %rbx + 1400027c4: 5e pop %rsi + 1400027c5: 5f pop %rdi + 1400027c6: 5d pop %rbp + 1400027c7: 41 5c pop %r12 + 1400027c9: c3 ret + 1400027ca: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + +00000001400027d0 <__wgetmainargs>: + 1400027d0: 41 54 push %r12 + 1400027d2: 55 push %rbp + 1400027d3: 57 push %rdi + 1400027d4: 56 push %rsi + 1400027d5: 53 push %rbx + 1400027d6: 48 83 ec 20 sub $0x20,%rsp + 1400027da: 4c 8b 64 24 70 mov 0x70(%rsp),%r12 + 1400027df: 44 89 cd mov %r9d,%ebp + 1400027e2: 48 89 d6 mov %rdx,%rsi + 1400027e5: 4c 89 c3 mov %r8,%rbx + 1400027e8: 48 89 cf mov %rcx,%rdi + 1400027eb: e8 40 02 00 00 call 140002a30 <_initialize_wide_environment> + 1400027f0: 83 fd 01 cmp $0x1,%ebp + 1400027f3: b9 01 00 00 00 mov $0x1,%ecx + 1400027f8: 83 d9 ff sbb $0xffffffff,%ecx + 1400027fb: e8 08 02 00 00 call 140002a08 <_configure_wide_argv> + 140002800: e8 db 01 00 00 call 1400029e0 <__p___argc> + 140002805: 8b 00 mov (%rax),%eax + 140002807: 89 07 mov %eax,(%rdi) + 140002809: e8 e2 01 00 00 call 1400029f0 <__p___wargv> + 14000280e: 48 8b 00 mov (%rax),%rax + 140002811: 48 89 06 mov %rax,(%rsi) + 140002814: e8 9f 02 00 00 call 140002ab8 <__p__wenviron> + 140002819: 48 8b 00 mov (%rax),%rax + 14000281c: 48 89 03 mov %rax,(%rbx) + 14000281f: 4d 85 e4 test %r12,%r12 + 140002822: 74 09 je 14000282d <__wgetmainargs+0x5d> + 140002824: 41 8b 0c 24 mov (%r12),%ecx + 140002828: e8 63 02 00 00 call 140002a90 <_set_new_mode> + 14000282d: 31 c0 xor %eax,%eax + 14000282f: 48 83 c4 20 add $0x20,%rsp + 140002833: 5b pop %rbx + 140002834: 5e pop %rsi + 140002835: 5f pop %rdi + 140002836: 5d pop %rbp + 140002837: 41 5c pop %r12 + 140002839: c3 ret + 14000283a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + +0000000140002840 <_onexit>: + 140002840: 53 push %rbx + 140002841: 48 83 ec 20 sub $0x20,%rsp + 140002845: 48 89 cb mov %rcx,%rbx + 140002848: e8 cb 01 00 00 call 140002a18 <_crt_atexit> + 14000284d: 85 c0 test %eax,%eax + 14000284f: b8 00 00 00 00 mov $0x0,%eax + 140002854: 48 0f 44 c3 cmove %rbx,%rax + 140002858: 48 83 c4 20 add $0x20,%rsp + 14000285c: 5b pop %rbx + 14000285d: c3 ret + 14000285e: 66 90 xchg %ax,%ax + +0000000140002860 : + 140002860: 48 8b 05 49 2c 00 00 mov 0x2c49(%rip),%rax # 1400054b0 <.refptr.__mingw_module_is_dll> + 140002867: 80 38 00 cmpb $0x0,(%rax) + 14000286a: 74 04 je 140002870 + 14000286c: 31 c0 xor %eax,%eax + 14000286e: c3 ret + 14000286f: 90 nop + 140002870: e9 9b 01 00 00 jmp 140002a10 <_crt_at_quick_exit> + 140002875: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 14000287c: 00 00 00 00 + +0000000140002880 <_amsg_exit>: + 140002880: 53 push %rbx + 140002881: 48 83 ec 20 sub $0x20,%rsp + 140002885: 89 cb mov %ecx,%ebx + 140002887: b9 02 00 00 00 mov $0x2,%ecx + 14000288c: e8 0f 01 00 00 call 1400029a0 <__acrt_iob_func> + 140002891: 41 89 d8 mov %ebx,%r8d + 140002894: 48 8d 15 d5 2a 00 00 lea 0x2ad5(%rip),%rdx # 140005370 <.rdata> + 14000289b: 48 89 c1 mov %rax,%rcx + 14000289e: e8 6d fe ff ff call 140002710 + 1400028a3: b9 ff 00 00 00 mov $0xff,%ecx + 1400028a8: e8 73 01 00 00 call 140002a20 <_exit> + 1400028ad: 90 nop + 1400028ae: 66 90 xchg %ax,%ax + +00000001400028b0 <__ms_fwprintf>: + 1400028b0: 48 83 ec 48 sub $0x48,%rsp + 1400028b4: 48 8d 44 24 60 lea 0x60(%rsp),%rax + 1400028b9: 4c 89 44 24 60 mov %r8,0x60(%rsp) + 1400028be: 49 89 d0 mov %rdx,%r8 + 1400028c1: 48 89 ca mov %rcx,%rdx + 1400028c4: 48 89 44 24 20 mov %rax,0x20(%rsp) + 1400028c9: b9 04 00 00 00 mov $0x4,%ecx + 1400028ce: 4c 89 4c 24 68 mov %r9,0x68(%rsp) + 1400028d3: 45 31 c9 xor %r9d,%r9d + 1400028d6: 48 89 44 24 38 mov %rax,0x38(%rsp) + 1400028db: e8 e8 00 00 00 call 1400029c8 <__stdio_common_vfwprintf> + 1400028e0: 48 83 c4 48 add $0x48,%rsp + 1400028e4: c3 ret + 1400028e5: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 1400028ec: 00 00 00 00 + +00000001400028f0 : + 1400028f0: 48 83 ec 28 sub $0x28,%rsp + 1400028f4: 48 8b 05 65 2b 00 00 mov 0x2b65(%rip),%rax # 140005460 <.refptr.__imp__tzset> + 1400028fb: ff 10 call *(%rax) + 1400028fd: e8 7e 00 00 00 call 140002980 <__tzname> + 140002902: 48 89 05 d7 17 00 00 mov %rax,0x17d7(%rip) # 1400040e0 <__imp_tzname> + 140002909: e8 6a 00 00 00 call 140002978 <__timezone> + 14000290e: 48 89 05 c3 17 00 00 mov %rax,0x17c3(%rip) # 1400040d8 <__imp_timezone> + 140002915: e8 56 00 00 00 call 140002970 <__daylight> + 14000291a: 48 89 05 af 17 00 00 mov %rax,0x17af(%rip) # 1400040d0 <__imp_daylight> + 140002921: 48 83 c4 28 add $0x28,%rsp + 140002925: c3 ret + 140002926: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 14000292d: 00 00 00 + +0000000140002930 <_tzset>: + 140002930: 48 83 ec 28 sub $0x28,%rsp + 140002934: 48 8b 05 25 2b 00 00 mov 0x2b25(%rip),%rax # 140005460 <.refptr.__imp__tzset> + 14000293b: ff 10 call *(%rax) + 14000293d: e8 3e 00 00 00 call 140002980 <__tzname> + 140002942: 48 89 05 97 17 00 00 mov %rax,0x1797(%rip) # 1400040e0 <__imp_tzname> + 140002949: e8 2a 00 00 00 call 140002978 <__timezone> + 14000294e: 48 89 05 83 17 00 00 mov %rax,0x1783(%rip) # 1400040d8 <__imp_timezone> + 140002955: e8 16 00 00 00 call 140002970 <__daylight> + 14000295a: 48 89 05 6f 17 00 00 mov %rax,0x176f(%rip) # 1400040d0 <__imp_daylight> + 140002961: 48 83 c4 28 add $0x28,%rsp + 140002965: c3 ret + 140002966: 90 nop + 140002967: 90 nop + 140002968: 90 nop + 140002969: 90 nop + 14000296a: 90 nop + 14000296b: 90 nop + 14000296c: 90 nop + 14000296d: 90 nop + 14000296e: 90 nop + 14000296f: 90 nop + +0000000140002970 <__daylight>: + 140002970: ff 25 fa 6b 00 00 jmp *0x6bfa(%rip) # 140009570 <__imp___daylight> + 140002976: 90 nop + 140002977: 90 nop + +0000000140002978 <__timezone>: + 140002978: ff 25 fa 6b 00 00 jmp *0x6bfa(%rip) # 140009578 <__imp___timezone> + 14000297e: 90 nop + 14000297f: 90 nop + +0000000140002980 <__tzname>: + 140002980: ff 25 fa 6b 00 00 jmp *0x6bfa(%rip) # 140009580 <__imp___tzname> + 140002986: 90 nop + 140002987: 90 nop + +0000000140002988 <.text>: + 140002988: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) + 14000298f: 00 + +0000000140002990 : + 140002990: ff 25 c2 6b 00 00 jmp *0x6bc2(%rip) # 140009558 <__imp_strlen> + 140002996: 90 nop + 140002997: 90 nop + +0000000140002998 : + 140002998: ff 25 c2 6b 00 00 jmp *0x6bc2(%rip) # 140009560 <__imp_strncmp> + 14000299e: 90 nop + 14000299f: 90 nop + +00000001400029a0 <__acrt_iob_func>: + 1400029a0: ff 25 4a 6b 00 00 jmp *0x6b4a(%rip) # 1400094f0 <__imp___acrt_iob_func> + 1400029a6: 90 nop + 1400029a7: 90 nop + +00000001400029a8 <__p__commode>: + 1400029a8: ff 25 4a 6b 00 00 jmp *0x6b4a(%rip) # 1400094f8 <__imp___p__commode> + 1400029ae: 90 nop + 1400029af: 90 nop + +00000001400029b0 <__p__fmode>: + 1400029b0: ff 25 4a 6b 00 00 jmp *0x6b4a(%rip) # 140009500 <__imp___p__fmode> + 1400029b6: 90 nop + 1400029b7: 90 nop + +00000001400029b8 <__stdio_common_vfprintf>: + 1400029b8: ff 25 4a 6b 00 00 jmp *0x6b4a(%rip) # 140009508 <__imp___stdio_common_vfprintf> + 1400029be: 90 nop + 1400029bf: 90 nop + +00000001400029c0 <__stdio_common_vfscanf>: + 1400029c0: ff 25 4a 6b 00 00 jmp *0x6b4a(%rip) # 140009510 <__imp___stdio_common_vfscanf> + 1400029c6: 90 nop + 1400029c7: 90 nop + +00000001400029c8 <__stdio_common_vfwprintf>: + 1400029c8: ff 25 4a 6b 00 00 jmp *0x6b4a(%rip) # 140009518 <__imp___stdio_common_vfwprintf> + 1400029ce: 90 nop + 1400029cf: 90 nop + +00000001400029d0 : + 1400029d0: ff 25 62 6b 00 00 jmp *0x6b62(%rip) # 140009538 <__imp_fwrite> + 1400029d6: 90 nop + 1400029d7: 90 nop + +00000001400029d8 : + 1400029d8: ff 25 62 6b 00 00 jmp *0x6b62(%rip) # 140009540 <__imp_puts> + 1400029de: 90 nop + 1400029df: 90 nop + +00000001400029e0 <__p___argc>: + 1400029e0: ff 25 6a 6a 00 00 jmp *0x6a6a(%rip) # 140009450 <__imp___p___argc> + 1400029e6: 90 nop + 1400029e7: 90 nop + +00000001400029e8 <__p___argv>: + 1400029e8: ff 25 6a 6a 00 00 jmp *0x6a6a(%rip) # 140009458 <__imp___p___argv> + 1400029ee: 90 nop + 1400029ef: 90 nop + +00000001400029f0 <__p___wargv>: + 1400029f0: ff 25 6a 6a 00 00 jmp *0x6a6a(%rip) # 140009460 <__imp___p___wargv> + 1400029f6: 90 nop + 1400029f7: 90 nop + +00000001400029f8 <_cexit>: + 1400029f8: ff 25 6a 6a 00 00 jmp *0x6a6a(%rip) # 140009468 <__imp__cexit> + 1400029fe: 90 nop + 1400029ff: 90 nop + +0000000140002a00 <_configure_narrow_argv>: + 140002a00: ff 25 6a 6a 00 00 jmp *0x6a6a(%rip) # 140009470 <__imp__configure_narrow_argv> + 140002a06: 90 nop + 140002a07: 90 nop + +0000000140002a08 <_configure_wide_argv>: + 140002a08: ff 25 6a 6a 00 00 jmp *0x6a6a(%rip) # 140009478 <__imp__configure_wide_argv> + 140002a0e: 90 nop + 140002a0f: 90 nop + +0000000140002a10 <_crt_at_quick_exit>: + 140002a10: ff 25 6a 6a 00 00 jmp *0x6a6a(%rip) # 140009480 <__imp__crt_at_quick_exit> + 140002a16: 90 nop + 140002a17: 90 nop + +0000000140002a18 <_crt_atexit>: + 140002a18: ff 25 6a 6a 00 00 jmp *0x6a6a(%rip) # 140009488 <__imp__crt_atexit> + 140002a1e: 90 nop + 140002a1f: 90 nop + +0000000140002a20 <_exit>: + 140002a20: ff 25 72 6a 00 00 jmp *0x6a72(%rip) # 140009498 <__imp__exit> + 140002a26: 90 nop + 140002a27: 90 nop + +0000000140002a28 <_initialize_narrow_environment>: + 140002a28: ff 25 72 6a 00 00 jmp *0x6a72(%rip) # 1400094a0 <__imp__initialize_narrow_environment> + 140002a2e: 90 nop + 140002a2f: 90 nop + +0000000140002a30 <_initialize_wide_environment>: + 140002a30: ff 25 72 6a 00 00 jmp *0x6a72(%rip) # 1400094a8 <__imp__initialize_wide_environment> + 140002a36: 90 nop + 140002a37: 90 nop + +0000000140002a38 <_initterm>: + 140002a38: ff 25 72 6a 00 00 jmp *0x6a72(%rip) # 1400094b0 <__imp__initterm> + 140002a3e: 90 nop + 140002a3f: 90 nop + +0000000140002a40 <__set_app_type>: + 140002a40: ff 25 72 6a 00 00 jmp *0x6a72(%rip) # 1400094b8 <__imp___set_app_type> + 140002a46: 90 nop + 140002a47: 90 nop + +0000000140002a48 <_set_invalid_parameter_handler>: + 140002a48: ff 25 72 6a 00 00 jmp *0x6a72(%rip) # 1400094c0 <__imp__set_invalid_parameter_handler> + 140002a4e: 90 nop + 140002a4f: 90 nop + +0000000140002a50 : + 140002a50: ff 25 72 6a 00 00 jmp *0x6a72(%rip) # 1400094c8 <__imp_abort> + 140002a56: 90 nop + 140002a57: 90 nop + +0000000140002a58 : + 140002a58: ff 25 72 6a 00 00 jmp *0x6a72(%rip) # 1400094d0 <__imp_exit> + 140002a5e: 90 nop + 140002a5f: 90 nop + +0000000140002a60 : + 140002a60: ff 25 7a 6a 00 00 jmp *0x6a7a(%rip) # 1400094e0 <__imp_signal> + 140002a66: 90 nop + 140002a67: 90 nop + 140002a68: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) + 140002a6f: 00 + +0000000140002a70 <__C_specific_handler>: + 140002a70: ff 25 c2 69 00 00 jmp *0x69c2(%rip) # 140009438 <__imp___C_specific_handler> + 140002a76: 90 nop + 140002a77: 90 nop + +0000000140002a78 : + 140002a78: ff 25 c2 69 00 00 jmp *0x69c2(%rip) # 140009440 <__imp_memcpy> + 140002a7e: 90 nop + 140002a7f: 90 nop + +0000000140002a80 <__setusermatherr>: + 140002a80: ff 25 a2 69 00 00 jmp *0x69a2(%rip) # 140009428 <__imp___setusermatherr> + 140002a86: 90 nop + 140002a87: 90 nop + 140002a88: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) + 140002a8f: 00 + +0000000140002a90 <_set_new_mode>: + 140002a90: ff 25 6a 69 00 00 jmp *0x696a(%rip) # 140009400 <__imp__set_new_mode> + 140002a96: 90 nop + 140002a97: 90 nop + +0000000140002a98 : + 140002a98: ff 25 6a 69 00 00 jmp *0x696a(%rip) # 140009408 <__imp_calloc> + 140002a9e: 90 nop + 140002a9f: 90 nop + +0000000140002aa0 : + 140002aa0: ff 25 6a 69 00 00 jmp *0x696a(%rip) # 140009410 <__imp_free> + 140002aa6: 90 nop + 140002aa7: 90 nop + +0000000140002aa8 : + 140002aa8: ff 25 6a 69 00 00 jmp *0x696a(%rip) # 140009418 <__imp_malloc> + 140002aae: 90 nop + 140002aaf: 90 nop + +0000000140002ab0 <__p__environ>: + 140002ab0: ff 25 32 69 00 00 jmp *0x6932(%rip) # 1400093e8 <__imp___p__environ> + 140002ab6: 90 nop + 140002ab7: 90 nop + +0000000140002ab8 <__p__wenviron>: + 140002ab8: ff 25 32 69 00 00 jmp *0x6932(%rip) # 1400093f0 <__imp___p__wenviron> + 140002abe: 90 nop + 140002abf: 90 nop + +0000000140002ac0 : + 140002ac0: ff 25 0a 69 00 00 jmp *0x690a(%rip) # 1400093d0 <__imp_VirtualQuery> + 140002ac6: 90 nop + 140002ac7: 90 nop + +0000000140002ac8 : + 140002ac8: ff 25 fa 68 00 00 jmp *0x68fa(%rip) # 1400093c8 <__imp_VirtualProtect> + 140002ace: 90 nop + 140002acf: 90 nop + +0000000140002ad0 : + 140002ad0: ff 25 ea 68 00 00 jmp *0x68ea(%rip) # 1400093c0 <__imp_TlsGetValue> + 140002ad6: 90 nop + 140002ad7: 90 nop + +0000000140002ad8 : + 140002ad8: ff 25 d2 68 00 00 jmp *0x68d2(%rip) # 1400093b0 <__imp_Sleep> + 140002ade: 90 nop + 140002adf: 90 nop + +0000000140002ae0 : + 140002ae0: ff 25 ba 68 00 00 jmp *0x68ba(%rip) # 1400093a0 <__imp_SetUnhandledExceptionFilter> + 140002ae6: 90 nop + 140002ae7: 90 nop + +0000000140002ae8 : + 140002ae8: ff 25 9a 68 00 00 jmp *0x689a(%rip) # 140009388 <__imp_LeaveCriticalSection> + 140002aee: 90 nop + 140002aef: 90 nop + +0000000140002af0 : + 140002af0: ff 25 8a 68 00 00 jmp *0x688a(%rip) # 140009380 <__imp_InitializeCriticalSection> + 140002af6: 90 nop + 140002af7: 90 nop + +0000000140002af8 : + 140002af8: ff 25 72 68 00 00 jmp *0x6872(%rip) # 140009370 <__imp_GetLastError> + 140002afe: 90 nop + 140002aff: 90 nop + +0000000140002b00 : + 140002b00: ff 25 52 68 00 00 jmp *0x6852(%rip) # 140009358 <__imp_EnterCriticalSection> + 140002b06: 90 nop + 140002b07: 90 nop + +0000000140002b08 : + 140002b08: ff 25 3a 68 00 00 jmp *0x683a(%rip) # 140009348 <__imp_DeleteCriticalSection> + 140002b0e: 90 nop + 140002b0f: 90 nop + +0000000140002b10 : + 140002b10: 55 push %rbp + 140002b11: 57 push %rdi + 140002b12: 56 push %rsi + 140002b13: 53 push %rbx + 140002b14: 48 83 ec 28 sub $0x28,%rsp + 140002b18: 48 b8 c3 f5 28 5c 8f movabs $0x28f5c28f5c28f5c3,%rax + 140002b1f: c2 f5 28 + 140002b22: 48 89 ce mov %rcx,%rsi + 140002b25: 48 8d 4a 03 lea 0x3(%rdx),%rcx + 140002b29: 48 83 e1 fc and $0xfffffffffffffffc,%rcx + 140002b2d: 48 83 e6 fc and $0xfffffffffffffffc,%rsi + 140002b31: 48 89 cd mov %rcx,%rbp + 140002b34: 48 29 f5 sub %rsi,%rbp + 140002b37: 48 8d 54 2d 00 lea 0x0(%rbp,%rbp,1),%rdx + 140002b3c: 48 89 ef mov %rbp,%rdi + 140002b3f: 48 c1 ea 02 shr $0x2,%rdx + 140002b43: 48 d1 ef shr %rdi + 140002b46: 48 f7 e2 mul %rdx + 140002b49: 48 c1 ea 02 shr $0x2,%rdx + 140002b4d: 89 d0 mov %edx,%eax + 140002b4f: 83 fa 31 cmp $0x31,%edx + 140002b52: 7e 24 jle 140002b78 + 140002b54: 81 fa fe ff 00 00 cmp $0xfffe,%edx + 140002b5a: 0f 8e 10 01 00 00 jle 140002c70 + 140002b60: b8 fe ff 00 00 mov $0xfffe,%eax + 140002b65: ba e0 ff 0f 00 mov $0xfffe0,%edx + 140002b6a: bb e0 ff 0f 00 mov $0xfffe0,%ebx + 140002b6f: eb 16 jmp 140002b87 + 140002b71: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140002b78: b8 32 00 00 00 mov $0x32,%eax + 140002b7d: ba 20 03 00 00 mov $0x320,%edx + 140002b82: bb 20 03 00 00 mov $0x320,%ebx + 140002b87: 48 89 0d fa 15 00 00 mov %rcx,0x15fa(%rip) # 140004188 <_gmonparam+0x48> + 140002b8e: 8d 0c 7a lea (%rdx,%rdi,2),%ecx + 140002b91: 48 63 c9 movslq %ecx,%rcx + 140002b94: 48 89 35 e5 15 00 00 mov %rsi,0x15e5(%rip) # 140004180 <_gmonparam+0x40> + 140002b9b: 48 89 2d ee 15 00 00 mov %rbp,0x15ee(%rip) # 140004190 <_gmonparam+0x50> + 140002ba2: 48 89 3d a7 15 00 00 mov %rdi,0x15a7(%rip) # 140004150 <_gmonparam+0x10> + 140002ba9: 48 c7 05 e4 15 00 00 movq $0x2,0x15e4(%rip) # 140004198 <_gmonparam+0x58> + 140002bb0: 02 00 00 00 + 140002bb4: 48 89 3d a5 15 00 00 mov %rdi,0x15a5(%rip) # 140004160 <_gmonparam+0x20> + 140002bbb: 89 05 b7 15 00 00 mov %eax,0x15b7(%rip) # 140004178 <_gmonparam+0x38> + 140002bc1: 48 89 1d a8 15 00 00 mov %rbx,0x15a8(%rip) # 140004170 <_gmonparam+0x30> + 140002bc8: e8 db fe ff ff call 140002aa8 + 140002bcd: 48 85 c0 test %rax,%rax + 140002bd0: 0f 84 bc 00 00 00 je 140002c92 + 140002bd6: 48 89 c1 mov %rax,%rcx + 140002bd9: 4c 8d 44 1d 00 lea 0x0(%rbp,%rbx,1),%r8 + 140002bde: 31 d2 xor %edx,%edx + 140002be0: e8 fb 07 00 00 call 1400033e0 + 140002be5: 48 8d 0c 18 lea (%rax,%rbx,1),%rcx + 140002be9: 49 89 c1 mov %rax,%r9 + 140002bec: 48 89 05 75 15 00 00 mov %rax,0x1575(%rip) # 140004168 <_gmonparam+0x28> + 140002bf3: 48 8d 04 39 lea (%rcx,%rdi,1),%rax + 140002bf7: 48 89 0d 4a 15 00 00 mov %rcx,0x154a(%rip) # 140004148 <_gmonparam+0x8> + 140002bfe: 48 89 05 53 15 00 00 mov %rax,0x1553(%rip) # 140004158 <_gmonparam+0x18> + 140002c05: 31 c0 xor %eax,%eax + 140002c07: 66 41 89 41 0c mov %ax,0xc(%r9) + 140002c0c: 48 39 ef cmp %rbp,%rdi + 140002c0f: 73 2f jae 140002c40 + 140002c11: 66 0f ef c0 pxor %xmm0,%xmm0 + 140002c15: f3 48 0f 2a c7 cvtsi2ss %rdi,%xmm0 + 140002c1a: 48 85 ed test %rbp,%rbp + 140002c1d: 78 61 js 140002c80 + 140002c1f: 66 0f ef c9 pxor %xmm1,%xmm1 + 140002c23: f3 48 0f 2a cd cvtsi2ss %rbp,%xmm1 + 140002c28: f3 0f 5e c1 divss %xmm1,%xmm0 + 140002c2c: f3 0f 59 05 90 27 00 mulss 0x2790(%rip),%xmm0 # 1400053c4 <.rdata+0x34> + 140002c33: 00 + 140002c34: f3 0f 2c c0 cvttss2si %xmm0,%eax + 140002c38: 41 89 c1 mov %eax,%r9d + 140002c3b: eb 0e jmp 140002c4b + 140002c3d: 0f 1f 00 nopl (%rax) + 140002c40: 41 b9 00 00 01 00 mov $0x10000,%r9d + 140002c46: b8 00 00 01 00 mov $0x10000,%eax + 140002c4b: 49 89 f0 mov %rsi,%r8 + 140002c4e: 48 89 fa mov %rdi,%rdx + 140002c51: 89 05 29 55 00 00 mov %eax,0x5529(%rip) # 140008180 + 140002c57: e8 f4 06 00 00 call 140003350 + 140002c5c: c7 05 da 14 00 00 00 movl $0x0,0x14da(%rip) # 140004140 <_gmonparam> + 140002c63: 00 00 00 + 140002c66: 48 83 c4 28 add $0x28,%rsp + 140002c6a: 5b pop %rbx + 140002c6b: 5e pop %rsi + 140002c6c: 5f pop %rdi + 140002c6d: 5d pop %rbp + 140002c6e: c3 ret + 140002c6f: 90 nop + 140002c70: 48 63 da movslq %edx,%rbx + 140002c73: 48 c1 e3 04 shl $0x4,%rbx + 140002c77: 89 da mov %ebx,%edx + 140002c79: e9 09 ff ff ff jmp 140002b87 + 140002c7e: 66 90 xchg %ax,%ax + 140002c80: 48 d1 ed shr %rbp + 140002c83: 66 0f ef c9 pxor %xmm1,%xmm1 + 140002c87: f3 48 0f 2a cd cvtsi2ss %rbp,%xmm1 + 140002c8c: f3 0f 58 c9 addss %xmm1,%xmm1 + 140002c90: eb 96 jmp 140002c28 + 140002c92: 41 b8 1b 00 00 00 mov $0x1b,%r8d + 140002c98: 48 8d 15 f1 26 00 00 lea 0x26f1(%rip),%rdx # 140005390 <.rdata> + 140002c9f: b9 02 00 00 00 mov $0x2,%ecx + 140002ca4: 48 83 c4 28 add $0x28,%rsp + 140002ca8: 5b pop %rbx + 140002ca9: 5e pop %rsi + 140002caa: 5f pop %rdi + 140002cab: 5d pop %rbp + 140002cac: e9 47 07 00 00 jmp 1400033f8 + 140002cb1: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 140002cb8: 00 00 00 00 + 140002cbc: 0f 1f 40 00 nopl 0x0(%rax) + +0000000140002cc0 <_mcleanup>: + 140002cc0: 41 54 push %r12 + 140002cc2: 55 push %rbp + 140002cc3: 57 push %rdi + 140002cc4: 56 push %rsi + 140002cc5: 53 push %rbx + 140002cc6: 48 83 c4 80 add $0xffffffffffffff80,%rsp + 140002cca: 0f 11 74 24 70 movups %xmm6,0x70(%rsp) + 140002ccf: 83 3d 6a 14 00 00 02 cmpl $0x2,0x146a(%rip) # 140004140 <_gmonparam> + 140002cd6: 0f 84 6b 01 00 00 je 140002e47 <_mcleanup+0x187> + 140002cdc: 45 31 c9 xor %r9d,%r9d + 140002cdf: 45 31 c0 xor %r8d,%r8d + 140002ce2: 31 d2 xor %edx,%edx + 140002ce4: 31 c9 xor %ecx,%ecx + 140002ce6: e8 65 06 00 00 call 140003350 + 140002ceb: 41 b8 b6 01 00 00 mov $0x1b6,%r8d + 140002cf1: ba 01 83 00 00 mov $0x8301,%edx + 140002cf6: 48 8d 1d 23 14 00 00 lea 0x1423(%rip),%rbx # 140004120 + 140002cfd: c7 05 39 14 00 00 03 movl $0x3,0x1439(%rip) # 140004140 <_gmonparam> + 140002d04: 00 00 00 + 140002d07: 48 89 d9 mov %rbx,%rcx + 140002d0a: e8 e1 06 00 00 call 1400033f0 + 140002d0f: 89 c6 mov %eax,%esi + 140002d11: 85 c0 test %eax,%eax + 140002d13: 0f 88 17 01 00 00 js 140002e30 <_mcleanup+0x170> + 140002d19: 8b 05 31 14 00 00 mov 0x1431(%rip),%eax # 140004150 <_gmonparam+0x10> + 140002d1f: 48 8d 54 24 40 lea 0x40(%rsp),%rdx + 140002d24: 89 f1 mov %esi,%ecx + 140002d26: 31 ff xor %edi,%edi + 140002d28: f3 0f 6f 0d 50 14 00 movdqu 0x1450(%rip),%xmm1 # 140004180 <_gmonparam+0x40> + 140002d2f: 00 + 140002d30: 41 b8 28 00 00 00 mov $0x28,%r8d + 140002d36: 48 8d 6c 24 20 lea 0x20(%rsp),%rbp + 140002d3b: 83 c0 28 add $0x28,%eax + 140002d3e: 89 44 24 50 mov %eax,0x50(%rsp) + 140002d42: 48 b8 79 18 05 00 64 movabs $0x6400051879,%rax + 140002d49: 00 00 00 + 140002d4c: 0f 11 4c 24 40 movups %xmm1,0x40(%rsp) + 140002d51: 48 89 44 24 54 mov %rax,0x54(%rsp) + 140002d56: e8 9d 06 00 00 call 1400033f8 + 140002d5b: 44 8b 05 ee 13 00 00 mov 0x13ee(%rip),%r8d # 140004150 <_gmonparam+0x10> + 140002d62: 48 8b 15 df 13 00 00 mov 0x13df(%rip),%rdx # 140004148 <_gmonparam+0x8> + 140002d69: 89 f1 mov %esi,%ecx + 140002d6b: e8 88 06 00 00 call 1400033f8 + 140002d70: 48 8b 05 e9 13 00 00 mov 0x13e9(%rip),%rax # 140004160 <_gmonparam+0x20> + 140002d77: 48 d1 e8 shr %rax + 140002d7a: 44 8d 60 ff lea -0x1(%rax),%r12d + 140002d7e: 85 c0 test %eax,%eax + 140002d80: 7f 1a jg 140002d9c <_mcleanup+0xdc> + 140002d82: e9 8e 00 00 00 jmp 140002e15 <_mcleanup+0x155> + 140002d87: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 140002d8e: 00 00 + 140002d90: 48 8d 47 01 lea 0x1(%rdi),%rax + 140002d94: 49 39 fc cmp %rdi,%r12 + 140002d97: 74 7c je 140002e15 <_mcleanup+0x155> + 140002d99: 48 89 c7 mov %rax,%rdi + 140002d9c: 48 8b 05 b5 13 00 00 mov 0x13b5(%rip),%rax # 140004158 <_gmonparam+0x18> + 140002da3: 0f b7 1c 78 movzwl (%rax,%rdi,2),%ebx + 140002da7: 66 85 db test %bx,%bx + 140002daa: 74 e4 je 140002d90 <_mcleanup+0xd0> + 140002dac: 48 8b 05 e5 13 00 00 mov 0x13e5(%rip),%rax # 140004198 <_gmonparam+0x58> + 140002db3: 48 8b 15 c6 13 00 00 mov 0x13c6(%rip),%rdx # 140004180 <_gmonparam+0x40> + 140002dba: 48 0f af c7 imul %rdi,%rax + 140002dbe: 48 8d 04 42 lea (%rdx,%rax,2),%rax + 140002dc2: 66 48 0f 6e f0 movq %rax,%xmm6 + 140002dc7: 48 8b 05 9a 13 00 00 mov 0x139a(%rip),%rax # 140004168 <_gmonparam+0x28> + 140002dce: 66 90 xchg %ax,%ax + 140002dd0: 48 63 db movslq %ebx,%rbx + 140002dd3: 66 0f 6f c6 movdqa %xmm6,%xmm0 + 140002dd7: 41 b8 18 00 00 00 mov $0x18,%r8d + 140002ddd: 48 89 ea mov %rbp,%rdx + 140002de0: 48 c1 e3 04 shl $0x4,%rbx + 140002de4: 89 f1 mov %esi,%ecx + 140002de6: 0f 16 04 18 movhps (%rax,%rbx,1),%xmm0 + 140002dea: 8b 44 18 08 mov 0x8(%rax,%rbx,1),%eax + 140002dee: 0f 11 44 24 20 movups %xmm0,0x20(%rsp) + 140002df3: 89 44 24 30 mov %eax,0x30(%rsp) + 140002df7: e8 fc 05 00 00 call 1400033f8 + 140002dfc: 48 8b 05 65 13 00 00 mov 0x1365(%rip),%rax # 140004168 <_gmonparam+0x28> + 140002e03: 0f b7 5c 18 0c movzwl 0xc(%rax,%rbx,1),%ebx + 140002e08: 85 db test %ebx,%ebx + 140002e0a: 75 c4 jne 140002dd0 <_mcleanup+0x110> + 140002e0c: 48 8d 47 01 lea 0x1(%rdi),%rax + 140002e10: 49 39 fc cmp %rdi,%r12 + 140002e13: 75 84 jne 140002d99 <_mcleanup+0xd9> + 140002e15: 89 f1 mov %esi,%ecx + 140002e17: e8 cc 05 00 00 call 1400033e8 + 140002e1c: 90 nop + 140002e1d: 0f 10 74 24 70 movups 0x70(%rsp),%xmm6 + 140002e22: 48 83 ec 80 sub $0xffffffffffffff80,%rsp + 140002e26: 5b pop %rbx + 140002e27: 5e pop %rsi + 140002e28: 5f pop %rdi + 140002e29: 5d pop %rbp + 140002e2a: 41 5c pop %r12 + 140002e2c: c3 ret + 140002e2d: 0f 1f 00 nopl (%rax) + 140002e30: 0f 10 74 24 70 movups 0x70(%rsp),%xmm6 + 140002e35: 48 89 d9 mov %rbx,%rcx + 140002e38: 48 83 ec 80 sub $0xffffffffffffff80,%rsp + 140002e3c: 5b pop %rbx + 140002e3d: 5e pop %rsi + 140002e3e: 5f pop %rdi + 140002e3f: 5d pop %rbp + 140002e40: 41 5c pop %r12 + 140002e42: e9 c1 05 00 00 jmp 140003408 + 140002e47: 41 b8 19 00 00 00 mov $0x19,%r8d + 140002e4d: 48 8d 15 57 25 00 00 lea 0x2557(%rip),%rdx # 1400053ab <.rdata+0x1b> + 140002e54: b9 02 00 00 00 mov $0x2,%ecx + 140002e59: e8 9a 05 00 00 call 1400033f8 + 140002e5e: e9 79 fe ff ff jmp 140002cdc <_mcleanup+0x1c> + 140002e63: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 140002e6a: 00 00 00 00 + 140002e6e: 66 90 xchg %ax,%ax + +0000000140002e70 : + 140002e70: 48 83 ec 28 sub $0x28,%rsp + 140002e74: 85 c9 test %ecx,%ecx + 140002e76: 74 38 je 140002eb0 + 140002e78: 44 8b 0d 01 53 00 00 mov 0x5301(%rip),%r9d # 140008180 + 140002e7f: 4c 8b 05 fa 12 00 00 mov 0x12fa(%rip),%r8 # 140004180 <_gmonparam+0x40> + 140002e86: 48 8b 15 c3 12 00 00 mov 0x12c3(%rip),%rdx # 140004150 <_gmonparam+0x10> + 140002e8d: 48 8b 0d b4 12 00 00 mov 0x12b4(%rip),%rcx # 140004148 <_gmonparam+0x8> + 140002e94: e8 b7 04 00 00 call 140003350 + 140002e99: 31 c0 xor %eax,%eax + 140002e9b: 89 05 9f 12 00 00 mov %eax,0x129f(%rip) # 140004140 <_gmonparam> + 140002ea1: 48 83 c4 28 add $0x28,%rsp + 140002ea5: c3 ret + 140002ea6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 140002ead: 00 00 00 + 140002eb0: 45 31 c9 xor %r9d,%r9d + 140002eb3: 45 31 c0 xor %r8d,%r8d + 140002eb6: 31 d2 xor %edx,%edx + 140002eb8: 31 c9 xor %ecx,%ecx + 140002eba: e8 91 04 00 00 call 140003350 + 140002ebf: b8 03 00 00 00 mov $0x3,%eax + 140002ec4: 89 05 76 12 00 00 mov %eax,0x1276(%rip) # 140004140 <_gmonparam> + 140002eca: 48 83 c4 28 add $0x28,%rsp + 140002ece: c3 ret + 140002ecf: 90 nop + +0000000140002ed0 <_mcount>: + 140002ed0: 55 push %rbp + 140002ed1: 48 89 e5 mov %rsp,%rbp + 140002ed4: 50 push %rax + 140002ed5: 51 push %rcx + 140002ed6: 52 push %rdx + 140002ed7: 41 50 push %r8 + 140002ed9: 41 51 push %r9 + 140002edb: 41 52 push %r10 + 140002edd: 41 53 push %r11 + 140002edf: 48 8b 55 08 mov 0x8(%rbp),%rdx + 140002ee3: 48 8b 45 00 mov 0x0(%rbp),%rax + 140002ee7: 48 8b 48 08 mov 0x8(%rax),%rcx + 140002eeb: 48 83 ec 28 sub $0x28,%rsp + 140002eef: e8 4c 00 00 00 call 140002f40 <_mcount_private> + 140002ef4: 48 83 c4 28 add $0x28,%rsp + 140002ef8: 41 5b pop %r11 + 140002efa: 41 5a pop %r10 + 140002efc: 41 59 pop %r9 + 140002efe: 41 58 pop %r8 + 140002f00: 5a pop %rdx + 140002f01: 59 pop %rcx + 140002f02: 58 pop %rax + 140002f03: c9 leave + 140002f04: c3 ret + +0000000140002f05 <__fentry__>: + 140002f05: 55 push %rbp + 140002f06: 48 89 e5 mov %rsp,%rbp + 140002f09: 50 push %rax + 140002f0a: 51 push %rcx + 140002f0b: 52 push %rdx + 140002f0c: 41 50 push %r8 + 140002f0e: 41 51 push %r9 + 140002f10: 41 52 push %r10 + 140002f12: 41 53 push %r11 + 140002f14: 48 8b 55 08 mov 0x8(%rbp),%rdx + 140002f18: 48 8b 4d 10 mov 0x10(%rbp),%rcx + 140002f1c: 48 83 ec 28 sub $0x28,%rsp + 140002f20: e8 1b 00 00 00 call 140002f40 <_mcount_private> + 140002f25: 48 83 c4 28 add $0x28,%rsp + 140002f29: 41 5b pop %r11 + 140002f2b: 41 5a pop %r10 + 140002f2d: 41 59 pop %r9 + 140002f2f: 41 58 pop %r8 + 140002f31: 5a pop %rdx + 140002f32: 59 pop %rcx + 140002f33: 58 pop %rax + 140002f34: c9 leave + 140002f35: c3 ret + 140002f36: 90 nop + 140002f37: 90 nop + 140002f38: 90 nop + 140002f39: 90 nop + 140002f3a: 90 nop + 140002f3b: 90 nop + 140002f3c: 90 nop + 140002f3d: 90 nop + 140002f3e: 90 nop + 140002f3f: 90 nop + +0000000140002f40 <_mcount_private>: + 140002f40: 48 89 c8 mov %rcx,%rax + 140002f43: 48 8b 0d 16 26 00 00 mov 0x2616(%rip),%rcx # 140005560 <.refptr._gmonparam> + 140002f4a: 49 89 d0 mov %rdx,%r8 + 140002f4d: 44 8b 09 mov (%rcx),%r9d + 140002f50: 45 85 c9 test %r9d,%r9d + 140002f53: 75 57 jne 140002fac <_mcount_private+0x6c> + 140002f55: c7 01 01 00 00 00 movl $0x1,(%rcx) + 140002f5b: 48 2b 41 40 sub 0x40(%rcx),%rax + 140002f5f: 48 39 41 50 cmp %rax,0x50(%rcx) + 140002f63: 72 69 jb 140002fce <_mcount_private+0x8e> + 140002f65: 48 8b 51 58 mov 0x58(%rcx),%rdx + 140002f69: 4c 8b 51 18 mov 0x18(%rcx),%r10 + 140002f6d: 48 83 fa 02 cmp $0x2,%rdx + 140002f71: 0f 84 d9 00 00 00 je 140003050 <_mcount_private+0x110> + 140002f77: 4c 8d 0c 12 lea (%rdx,%rdx,1),%r9 + 140002f7b: 31 d2 xor %edx,%edx + 140002f7d: 49 f7 f1 div %r9 + 140002f80: 4d 8d 1c 42 lea (%r10,%rax,2),%r11 + 140002f84: 41 0f b7 13 movzwl (%r11),%edx + 140002f88: 4c 8b 51 28 mov 0x28(%rcx),%r10 + 140002f8c: 66 85 d2 test %dx,%dx + 140002f8f: 75 47 jne 140002fd8 <_mcount_private+0x98> + 140002f91: 41 0f b7 42 0c movzwl 0xc(%r10),%eax + 140002f96: 83 c0 01 add $0x1,%eax + 140002f99: 66 41 89 42 0c mov %ax,0xc(%r10) + 140002f9e: 0f b7 d0 movzwl %ax,%edx + 140002fa1: 39 51 38 cmp %edx,0x38(%rcx) + 140002fa4: 7f 0a jg 140002fb0 <_mcount_private+0x70> + 140002fa6: c7 01 02 00 00 00 movl $0x2,(%rcx) + 140002fac: c3 ret + 140002fad: 0f 1f 00 nopl (%rax) + 140002fb0: 66 41 89 03 mov %ax,(%r11) + 140002fb4: 0f b7 c0 movzwl %ax,%eax + 140002fb7: 31 d2 xor %edx,%edx + 140002fb9: 48 c1 e0 04 shl $0x4,%rax + 140002fbd: 4c 01 d0 add %r10,%rax + 140002fc0: 4c 89 00 mov %r8,(%rax) + 140002fc3: c7 40 08 01 00 00 00 movl $0x1,0x8(%rax) + 140002fca: 66 89 50 0c mov %dx,0xc(%rax) + 140002fce: c7 01 00 00 00 00 movl $0x0,(%rcx) + 140002fd4: c3 ret + 140002fd5: 0f 1f 00 nopl (%rax) + 140002fd8: 48 c1 e2 04 shl $0x4,%rdx + 140002fdc: 4c 01 d2 add %r10,%rdx + 140002fdf: 4c 39 02 cmp %r8,(%rdx) + 140002fe2: 75 1f jne 140003003 <_mcount_private+0xc3> + 140002fe4: 83 42 08 01 addl $0x1,0x8(%rdx) + 140002fe8: eb e4 jmp 140002fce <_mcount_private+0x8e> + 140002fea: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + 140002ff0: 41 0f b7 c1 movzwl %r9w,%eax + 140002ff4: 48 c1 e0 04 shl $0x4,%rax + 140002ff8: 4c 01 d0 add %r10,%rax + 140002ffb: 4c 39 00 cmp %r8,(%rax) + 140002ffe: 74 60 je 140003060 <_mcount_private+0x120> + 140003000: 48 89 c2 mov %rax,%rdx + 140003003: 44 0f b7 4a 0c movzwl 0xc(%rdx),%r9d + 140003008: 66 45 85 c9 test %r9w,%r9w + 14000300c: 75 e2 jne 140002ff0 <_mcount_private+0xb0> + 14000300e: 41 0f b7 42 0c movzwl 0xc(%r10),%eax + 140003013: 83 c0 01 add $0x1,%eax + 140003016: 66 41 89 42 0c mov %ax,0xc(%r10) + 14000301b: 0f b7 d0 movzwl %ax,%edx + 14000301e: 39 51 38 cmp %edx,0x38(%rcx) + 140003021: 7e 83 jle 140002fa6 <_mcount_private+0x66> + 140003023: 0f b7 d0 movzwl %ax,%edx + 140003026: 48 c1 e2 04 shl $0x4,%rdx + 14000302a: 49 01 d2 add %rdx,%r10 + 14000302d: 41 0f b7 13 movzwl (%r11),%edx + 140003031: 4d 89 02 mov %r8,(%r10) + 140003034: 41 c7 42 08 01 00 00 movl $0x1,0x8(%r10) + 14000303b: 00 + 14000303c: 66 41 89 52 0c mov %dx,0xc(%r10) + 140003041: 66 41 89 03 mov %ax,(%r11) + 140003045: eb 87 jmp 140002fce <_mcount_private+0x8e> + 140003047: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 14000304e: 00 00 + 140003050: 48 c1 e8 02 shr $0x2,%rax + 140003054: 4d 8d 1c 42 lea (%r10,%rax,2),%r11 + 140003058: e9 27 ff ff ff jmp 140002f84 <_mcount_private+0x44> + 14000305d: 0f 1f 00 nopl (%rax) + 140003060: 44 0f b7 40 0c movzwl 0xc(%rax),%r8d + 140003065: 83 40 08 01 addl $0x1,0x8(%rax) + 140003069: 66 44 89 42 0c mov %r8w,0xc(%rdx) + 14000306e: 41 0f b7 13 movzwl (%r11),%edx + 140003072: 66 89 50 0c mov %dx,0xc(%rax) + 140003076: 66 45 89 0b mov %r9w,(%r11) + 14000307a: e9 4f ff ff ff jmp 140002fce <_mcount_private+0x8e> + 14000307f: 90 nop + +0000000140003080 : + 140003080: 56 push %rsi + 140003081: 53 push %rbx + 140003082: 48 81 ec f8 04 00 00 sub $0x4f8,%rsp + 140003089: 48 c7 c6 ff ff ff ff mov $0xffffffffffffffff,%rsi + 140003090: 48 89 cb mov %rcx,%rbx + 140003093: ff 15 1f 63 00 00 call *0x631f(%rip) # 1400093b8 <__imp_SuspendThread> + 140003099: 83 f8 ff cmp $0xffffffff,%eax + 14000309c: 74 23 je 1400030c1 + 14000309e: c7 44 24 50 03 00 10 movl $0x100003,0x50(%rsp) + 1400030a5: 00 + 1400030a6: 48 8d 54 24 20 lea 0x20(%rsp),%rdx + 1400030ab: 48 89 d9 mov %rbx,%rcx + 1400030ae: ff 15 c4 62 00 00 call *0x62c4(%rip) # 140009378 <__imp_GetThreadContext> + 1400030b4: 85 c0 test %eax,%eax + 1400030b6: 75 18 jne 1400030d0 + 1400030b8: 48 89 d9 mov %rbx,%rcx + 1400030bb: ff 15 cf 62 00 00 call *0x62cf(%rip) # 140009390 <__imp_ResumeThread> + 1400030c1: 48 89 f0 mov %rsi,%rax + 1400030c4: 48 81 c4 f8 04 00 00 add $0x4f8,%rsp + 1400030cb: 5b pop %rbx + 1400030cc: 5e pop %rsi + 1400030cd: c3 ret + 1400030ce: 66 90 xchg %ax,%ax + 1400030d0: 48 8b b4 24 18 01 00 mov 0x118(%rsp),%rsi + 1400030d7: 00 + 1400030d8: eb de jmp 1400030b8 + 1400030da: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + +00000001400030e0 : + 1400030e0: 56 push %rsi + 1400030e1: 53 push %rbx + 1400030e2: 48 83 ec 28 sub $0x28,%rsp + 1400030e6: 48 8b 35 eb 62 00 00 mov 0x62eb(%rip),%rsi # 1400093d8 <__imp_WaitForSingleObject> + 1400030ed: 48 89 cb mov %rcx,%rbx + 1400030f0: 48 8b 0b mov (%rbx),%rcx + 1400030f3: e8 88 ff ff ff call 140003080 + 1400030f8: 48 8b 53 20 mov 0x20(%rbx),%rdx + 1400030fc: 48 39 d0 cmp %rdx,%rax + 1400030ff: 72 31 jb 140003132 + 140003101: 48 3b 43 28 cmp 0x28(%rbx),%rax + 140003105: 73 2b jae 140003132 + 140003107: 48 29 d0 sub %rdx,%rax + 14000310a: 8b 4b 30 mov 0x30(%rbx),%ecx + 14000310d: 48 89 c2 mov %rax,%rdx + 140003110: 48 c1 e8 11 shr $0x11,%rax + 140003114: 48 d1 ea shr %rdx + 140003117: 48 0f af c1 imul %rcx,%rax + 14000311b: 0f b7 d2 movzwl %dx,%edx + 14000311e: 48 0f af d1 imul %rcx,%rdx + 140003122: 48 c1 ea 10 shr $0x10,%rdx + 140003126: 48 01 d0 add %rdx,%rax + 140003129: 48 8b 53 18 mov 0x18(%rbx),%rdx + 14000312d: 66 83 04 42 01 addw $0x1,(%rdx,%rax,2) + 140003132: 48 8b 4b 10 mov 0x10(%rbx),%rcx + 140003136: ba 0a 00 00 00 mov $0xa,%edx + 14000313b: ff d6 call *%rsi + 14000313d: 85 c0 test %eax,%eax + 14000313f: 75 af jne 1400030f0 + 140003141: 48 83 c4 28 add $0x28,%rsp + 140003145: 5b pop %rbx + 140003146: 5e pop %rsi + 140003147: c3 ret + 140003148: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) + 14000314f: 00 + +0000000140003150 : + 140003150: 41 55 push %r13 + 140003152: 41 54 push %r12 + 140003154: 55 push %rbp + 140003155: 57 push %rdi + 140003156: 56 push %rsi + 140003157: 53 push %rbx + 140003158: 48 83 ec 58 sub $0x58,%rsp + 14000315c: 44 8b a4 24 b0 00 00 mov 0xb0(%rsp),%r12d + 140003163: 00 + 140003164: 48 89 cb mov %rcx,%rbx + 140003167: 48 89 d5 mov %rdx,%rbp + 14000316a: 4c 89 c6 mov %r8,%rsi + 14000316d: 4c 89 cf mov %r9,%rdi + 140003170: 41 81 fc 00 00 01 00 cmp $0x10000,%r12d + 140003177: 0f 87 7b 01 00 00 ja 1400032f8 + 14000317d: 48 8b 51 08 mov 0x8(%rcx),%rdx + 140003181: 48 85 d2 test %rdx,%rdx + 140003184: 74 28 je 1400031ae + 140003186: 48 8b 49 10 mov 0x10(%rcx),%rcx + 14000318a: 45 31 c9 xor %r9d,%r9d + 14000318d: 41 b8 ff ff ff ff mov $0xffffffff,%r8d + 140003193: ff 15 0f 62 00 00 call *0x620f(%rip) # 1400093a8 <__imp_SignalObjectAndWait> + 140003199: 48 8b 4b 10 mov 0x10(%rbx),%rcx + 14000319d: 4c 8b 2d 8c 61 00 00 mov 0x618c(%rip),%r13 # 140009330 <__IAT_start__> + 1400031a4: 41 ff d5 call *%r13 + 1400031a7: 48 8b 4b 08 mov 0x8(%rbx),%rcx + 1400031ab: 41 ff d5 call *%r13 + 1400031ae: 48 8b 0b mov (%rbx),%rcx + 1400031b1: 48 85 c9 test %rcx,%rcx + 1400031b4: 74 06 je 1400031bc + 1400031b6: ff 15 74 61 00 00 call *0x6174(%rip) # 140009330 <__IAT_start__> + 1400031bc: 45 31 ed xor %r13d,%r13d + 1400031bf: 45 85 e4 test %r12d,%r12d + 1400031c2: 75 14 jne 1400031d8 + 1400031c4: 44 89 e8 mov %r13d,%eax + 1400031c7: 48 83 c4 58 add $0x58,%rsp + 1400031cb: 5b pop %rbx + 1400031cc: 5e pop %rsi + 1400031cd: 5f pop %rdi + 1400031ce: 5d pop %rbp + 1400031cf: 41 5c pop %r12 + 1400031d1: 41 5d pop %r13 + 1400031d3: c3 ret + 1400031d4: 0f 1f 40 00 nopl 0x0(%rax) + 1400031d8: 49 89 f0 mov %rsi,%r8 + 1400031db: 31 d2 xor %edx,%edx + 1400031dd: 48 89 e9 mov %rbp,%rcx + 1400031e0: e8 fb 01 00 00 call 1400033e0 + 1400031e5: 48 89 f0 mov %rsi,%rax + 1400031e8: 44 89 e1 mov %r12d,%ecx + 1400031eb: 31 d2 xor %edx,%edx + 1400031ed: 48 d1 e8 shr %rax + 1400031f0: 66 0f ef c0 pxor %xmm0,%xmm0 + 1400031f4: 48 c7 43 30 00 00 00 movq $0x0,0x30(%rbx) + 1400031fb: 00 + 1400031fc: 48 c1 e0 10 shl $0x10,%rax + 140003200: 0f 11 03 movups %xmm0,(%rbx) + 140003203: 48 f7 f1 div %rcx + 140003206: 0f 11 43 10 movups %xmm0,0x10(%rbx) + 14000320a: 0f 11 43 20 movups %xmm0,0x20(%rbx) + 14000320e: 48 89 2d a3 4f 00 00 mov %rbp,0x4fa3(%rip) # 1400081b8 + 140003215: 48 8b 2d 44 61 00 00 mov 0x6144(%rip),%rbp # 140009360 <__imp_GetCurrentProcess> + 14000321c: 48 89 3d 9d 4f 00 00 mov %rdi,0x4f9d(%rip) # 1400081c0 + 140003223: 44 89 25 a6 4f 00 00 mov %r12d,0x4fa6(%rip) # 1400081d0 + 14000322a: 48 8d 04 47 lea (%rdi,%rax,2),%rax + 14000322e: 48 89 05 93 4f 00 00 mov %rax,0x4f93(%rip) # 1400081c8 + 140003235: ff d5 call *%rbp + 140003237: 48 89 c7 mov %rax,%rdi + 14000323a: ff 15 28 61 00 00 call *0x6128(%rip) # 140009368 <__imp_GetCurrentThread> + 140003240: 48 89 c6 mov %rax,%rsi + 140003243: ff d5 call *%rbp + 140003245: c7 44 24 30 02 00 00 movl $0x2,0x30(%rsp) + 14000324c: 00 + 14000324d: 49 89 d9 mov %rbx,%r9 + 140003250: 49 89 f8 mov %rdi,%r8 + 140003253: c7 44 24 28 00 00 00 movl $0x0,0x28(%rsp) + 14000325a: 00 + 14000325b: 48 89 c1 mov %rax,%rcx + 14000325e: 48 89 f2 mov %rsi,%rdx + 140003261: c7 44 24 20 00 00 00 movl $0x0,0x20(%rsp) + 140003268: 00 + 140003269: ff 15 e1 60 00 00 call *0x60e1(%rip) # 140009350 <__imp_DuplicateHandle> + 14000326f: 85 c0 test %eax,%eax + 140003271: 74 6d je 1400032e0 + 140003273: 45 31 c9 xor %r9d,%r9d + 140003276: 45 31 c0 xor %r8d,%r8d + 140003279: ba 01 00 00 00 mov $0x1,%edx + 14000327e: 31 c9 xor %ecx,%ecx + 140003280: ff 15 b2 60 00 00 call *0x60b2(%rip) # 140009338 <__imp_CreateEventA> + 140003286: 48 89 43 10 mov %rax,0x10(%rbx) + 14000328a: 48 85 c0 test %rax,%rax + 14000328d: 0f 84 9f 00 00 00 je 140003332 + 140003293: 48 8d 44 24 4c lea 0x4c(%rsp),%rax + 140003298: 31 c9 xor %ecx,%ecx + 14000329a: 49 89 d9 mov %rbx,%r9 + 14000329d: 31 d2 xor %edx,%edx + 14000329f: 48 89 44 24 28 mov %rax,0x28(%rsp) + 1400032a4: 4c 8d 05 35 fe ff ff lea -0x1cb(%rip),%r8 # 1400030e0 + 1400032ab: c7 44 24 20 00 00 00 movl $0x0,0x20(%rsp) + 1400032b2: 00 + 1400032b3: ff 15 87 60 00 00 call *0x6087(%rip) # 140009340 <__imp_CreateThread> + 1400032b9: 48 89 43 08 mov %rax,0x8(%rbx) + 1400032bd: 48 89 c1 mov %rax,%rcx + 1400032c0: 48 85 c0 test %rax,%rax + 1400032c3: 74 49 je 14000330e + 1400032c5: ba 0f 00 00 00 mov $0xf,%edx + 1400032ca: ff 15 c8 60 00 00 call *0x60c8(%rip) # 140009398 <__imp_SetThreadPriority> + 1400032d0: 44 89 e8 mov %r13d,%eax + 1400032d3: 48 83 c4 58 add $0x58,%rsp + 1400032d7: 5b pop %rbx + 1400032d8: 5e pop %rsi + 1400032d9: 5f pop %rdi + 1400032da: 5d pop %rbp + 1400032db: 41 5c pop %r12 + 1400032dd: 41 5d pop %r13 + 1400032df: c3 ret + 1400032e0: e8 1b 01 00 00 call 140003400 <_errno> + 1400032e5: c7 00 03 00 00 00 movl $0x3,(%rax) + 1400032eb: 41 83 cd ff or $0xffffffff,%r13d + 1400032ef: e9 d0 fe ff ff jmp 1400031c4 + 1400032f4: 0f 1f 40 00 nopl 0x0(%rax) + 1400032f8: e8 03 01 00 00 call 140003400 <_errno> + 1400032fd: 41 bd ff ff ff ff mov $0xffffffff,%r13d + 140003303: c7 00 16 00 00 00 movl $0x16,(%rax) + 140003309: e9 b6 fe ff ff jmp 1400031c4 + 14000330e: 48 8b 0b mov (%rbx),%rcx + 140003311: 48 8b 35 18 60 00 00 mov 0x6018(%rip),%rsi # 140009330 <__IAT_start__> + 140003318: ff d6 call *%rsi + 14000331a: 48 8b 4b 10 mov 0x10(%rbx),%rcx + 14000331e: ff d6 call *%rsi + 140003320: 31 c0 xor %eax,%eax + 140003322: 48 89 03 mov %rax,(%rbx) + 140003325: e8 d6 00 00 00 call 140003400 <_errno> + 14000332a: c7 00 0b 00 00 00 movl $0xb,(%rax) + 140003330: eb b9 jmp 1400032eb + 140003332: 31 c9 xor %ecx,%ecx + 140003334: ff 15 f6 5f 00 00 call *0x5ff6(%rip) # 140009330 <__IAT_start__> + 14000333a: 31 d2 xor %edx,%edx + 14000333c: 48 89 13 mov %rdx,(%rbx) + 14000333f: e8 bc 00 00 00 call 140003400 <_errno> + 140003344: c7 00 0b 00 00 00 movl $0xb,(%rax) + 14000334a: eb 9f jmp 1400032eb + 14000334c: 0f 1f 40 00 nopl 0x0(%rax) + +0000000140003350 : + 140003350: 48 83 ec 38 sub $0x38,%rsp + 140003354: 44 89 4c 24 20 mov %r9d,0x20(%rsp) + 140003359: 4d 89 c1 mov %r8,%r9 + 14000335c: 49 89 d0 mov %rdx,%r8 + 14000335f: 48 89 ca mov %rcx,%rdx + 140003362: 48 8d 0d 37 4e 00 00 lea 0x4e37(%rip),%rcx # 1400081a0 + 140003369: e8 e2 fd ff ff call 140003150 + 14000336e: 48 83 c4 38 add $0x38,%rsp + 140003372: c3 ret + 140003373: 90 nop + 140003374: 90 nop + 140003375: 90 nop + 140003376: 90 nop + 140003377: 90 nop + 140003378: 90 nop + 140003379: 90 nop + 14000337a: 90 nop + 14000337b: 90 nop + 14000337c: 90 nop + 14000337d: 90 nop + 14000337e: 90 nop + 14000337f: 90 nop + +0000000140003380 : + 140003380: ff 25 52 60 00 00 jmp *0x6052(%rip) # 1400093d8 <__imp_WaitForSingleObject> + 140003386: 90 nop + 140003387: 90 nop + +0000000140003388 : + 140003388: ff 25 2a 60 00 00 jmp *0x602a(%rip) # 1400093b8 <__imp_SuspendThread> + 14000338e: 90 nop + 14000338f: 90 nop + +0000000140003390 : + 140003390: ff 25 12 60 00 00 jmp *0x6012(%rip) # 1400093a8 <__imp_SignalObjectAndWait> + 140003396: 90 nop + 140003397: 90 nop + +0000000140003398 : + 140003398: ff 25 fa 5f 00 00 jmp *0x5ffa(%rip) # 140009398 <__imp_SetThreadPriority> + 14000339e: 90 nop + 14000339f: 90 nop + +00000001400033a0 : + 1400033a0: ff 25 ea 5f 00 00 jmp *0x5fea(%rip) # 140009390 <__imp_ResumeThread> + 1400033a6: 90 nop + 1400033a7: 90 nop + +00000001400033a8 : + 1400033a8: ff 25 ca 5f 00 00 jmp *0x5fca(%rip) # 140009378 <__imp_GetThreadContext> + 1400033ae: 90 nop + 1400033af: 90 nop + +00000001400033b0 : + 1400033b0: ff 25 b2 5f 00 00 jmp *0x5fb2(%rip) # 140009368 <__imp_GetCurrentThread> + 1400033b6: 90 nop + 1400033b7: 90 nop + +00000001400033b8 : + 1400033b8: ff 25 a2 5f 00 00 jmp *0x5fa2(%rip) # 140009360 <__imp_GetCurrentProcess> + 1400033be: 90 nop + 1400033bf: 90 nop + +00000001400033c0 : + 1400033c0: ff 25 8a 5f 00 00 jmp *0x5f8a(%rip) # 140009350 <__imp_DuplicateHandle> + 1400033c6: 90 nop + 1400033c7: 90 nop + +00000001400033c8 : + 1400033c8: ff 25 72 5f 00 00 jmp *0x5f72(%rip) # 140009340 <__imp_CreateThread> + 1400033ce: 90 nop + 1400033cf: 90 nop + +00000001400033d0 : + 1400033d0: ff 25 62 5f 00 00 jmp *0x5f62(%rip) # 140009338 <__imp_CreateEventA> + 1400033d6: 90 nop + 1400033d7: 90 nop + +00000001400033d8 : + 1400033d8: ff 25 52 5f 00 00 jmp *0x5f52(%rip) # 140009330 <__IAT_start__> + 1400033de: 90 nop + 1400033df: 90 nop + +00000001400033e0 : + 1400033e0: ff 25 6a 61 00 00 jmp *0x616a(%rip) # 140009550 <__imp_memset> + 1400033e6: 90 nop + 1400033e7: 90 nop + +00000001400033e8 : + 1400033e8: ff 25 32 61 00 00 jmp *0x6132(%rip) # 140009520 <__imp_close> + 1400033ee: 90 nop + 1400033ef: 90 nop + +00000001400033f0 : + 1400033f0: ff 25 32 61 00 00 jmp *0x6132(%rip) # 140009528 <__imp_open> + 1400033f6: 90 nop + 1400033f7: 90 nop + +00000001400033f8 : + 1400033f8: ff 25 32 61 00 00 jmp *0x6132(%rip) # 140009530 <__imp_write> + 1400033fe: 90 nop + 1400033ff: 90 nop + +0000000140003400 <_errno>: + 140003400: ff 25 8a 60 00 00 jmp *0x608a(%rip) # 140009490 <__imp__errno> + 140003406: 90 nop + 140003407: 90 nop + +0000000140003408 : + 140003408: ff 25 ca 60 00 00 jmp *0x60ca(%rip) # 1400094d8 <__imp_perror> + 14000340e: 90 nop + 14000340f: 90 nop + +0000000140003410 <_monstartup>: + 140003410: 48 83 ec 28 sub $0x28,%rsp + 140003414: 8b 05 16 4c 00 00 mov 0x4c16(%rip),%eax # 140008030 + 14000341a: 8d 50 01 lea 0x1(%rax),%edx + 14000341d: 89 15 0d 4c 00 00 mov %edx,0x4c0d(%rip) # 140008030 + 140003423: 85 c0 test %eax,%eax + 140003425: 74 05 je 14000342c <_monstartup+0x1c> + 140003427: 48 83 c4 28 add $0x28,%rsp + 14000342b: c3 ret + 14000342c: 48 8b 15 7d 21 00 00 mov 0x217d(%rip),%rdx # 1400055b0 <.refptr.etext> + 140003433: 48 8b 0d 06 20 00 00 mov 0x2006(%rip),%rcx # 140005440 <.refptr.__eprol> + 14000343a: e8 d1 f6 ff ff call 140002b10 + 14000343f: 48 8b 0d 4a 21 00 00 mov 0x214a(%rip),%rcx # 140005590 <.refptr._mcleanup> + 140003446: 48 83 c4 28 add $0x28,%rsp + 14000344a: e9 c1 df ff ff jmp 140001410 + 14000344f: 90 nop + +0000000140003450 : + 140003450: e9 db df ff ff jmp 140001430 <__gcc_register_frame> + 140003455: 90 nop + 140003456: 90 nop + 140003457: 90 nop + 140003458: 90 nop + 140003459: 90 nop + 14000345a: 90 nop + 14000345b: 90 nop + 14000345c: 90 nop + 14000345d: 90 nop + 14000345e: 90 nop + 14000345f: 90 nop + +0000000140003460 <__CTOR_LIST__>: + 140003460: ff (bad) + 140003461: ff (bad) + 140003462: ff (bad) + 140003463: ff (bad) + 140003464: ff (bad) + 140003465: ff (bad) + 140003466: ff (bad) + 140003467: ff .byte 0xff + +0000000140003468 <.ctors>: + 140003468: 10 34 00 adc %dh,(%rax,%rax,1) + 14000346b: 40 01 00 rex add %eax,(%rax) + ... + +0000000140003470 <.ctors.65535>: + 140003470: 50 push %rax + 140003471: 34 00 xor $0x0,%al + 140003473: 40 01 00 rex add %eax,(%rax) + ... + +0000000140003480 <__DTOR_LIST__>: + 140003480: ff (bad) + 140003481: ff (bad) + 140003482: ff (bad) + 140003483: ff (bad) + 140003484: ff (bad) + 140003485: ff (bad) + 140003486: ff (bad) + 140003487: ff 00 incl (%rax) + 140003489: 00 00 add %al,(%rax) + 14000348b: 00 00 add %al,(%rax) + 14000348d: 00 00 add %al,(%rax) + ... diff --git a/Lect6/76-79/73-74.c b/Lect6/76-79/73-74.c new file mode 100644 index 0000000..bd026f5 --- /dev/null +++ b/Lect6/76-79/73-74.c @@ -0,0 +1,31 @@ +#include +#include +#include + + + uint64_t getHash(char const *s) { + const int p = 31; + uint64_t hash = 0, p_pow = 1; + while(*s) { + hash += (*s++ - 'a' + 1) * p_pow; + p_pow *= p; + } + printf("%llu\n",hash); + return hash; +} +_Bool checkPass(char *p) { + if(getHash(p) == 577739920)//secret + return 1; + return 0; +} +int main(void){ + char password[100]; + printf("Input your password: "); + scanf("%s",password); + + if(checkPass(password)) + printf("Access granted\n"); + else + printf("Access denied\n"); + return 0; +} diff --git a/Lect6/76-79/73-74.exe b/Lect6/76-79/73-74.exe new file mode 100644 index 0000000..c9cd787 Binary files /dev/null and b/Lect6/76-79/73-74.exe differ diff --git a/Lect6/76-79/73-74.o b/Lect6/76-79/73-74.o new file mode 100644 index 0000000..36b09cf Binary files /dev/null and b/Lect6/76-79/73-74.o differ diff --git a/Lect6/76-79/76.bat b/Lect6/76-79/76.bat new file mode 100644 index 0000000..34f03c2 --- /dev/null +++ b/Lect6/76-79/76.bat @@ -0,0 +1 @@ +objdump -d 73-74.exe > 61.s \ No newline at end of file diff --git a/Lect6/76-79/crack/61.s b/Lect6/76-79/crack/61.s new file mode 100644 index 0000000..0dc7523 --- /dev/null +++ b/Lect6/76-79/crack/61.s @@ -0,0 +1,2299 @@ + +73-74.exe: file format pei-x86-64 + + +Disassembly of section .text: + +0000000140001000 <__mingw_invalidParameterHandler>: + 140001000: c3 ret + 140001001: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 140001008: 00 00 00 00 + 14000100c: 0f 1f 40 00 nopl 0x0(%rax) + +0000000140001010 : + 140001010: 48 83 ec 28 sub $0x28,%rsp + 140001014: 48 8b 05 15 34 00 00 mov 0x3415(%rip),%rax # 140004430 <.refptr.__mingw_initltsdrot_force> + 14000101b: 31 c9 xor %ecx,%ecx + 14000101d: c7 00 01 00 00 00 movl $0x1,(%rax) + 140001023: 48 8b 05 16 34 00 00 mov 0x3416(%rip),%rax # 140004440 <.refptr.__mingw_initltsdyn_force> + 14000102a: c7 00 01 00 00 00 movl $0x1,(%rax) + 140001030: 48 8b 05 19 34 00 00 mov 0x3419(%rip),%rax # 140004450 <.refptr.__mingw_initltssuo_force> + 140001037: c7 00 01 00 00 00 movl $0x1,(%rax) + 14000103d: 48 8b 05 7c 33 00 00 mov 0x337c(%rip),%rax # 1400043c0 <.refptr.__ImageBase> + 140001044: 66 81 38 4d 5a cmpw $0x5a4d,(%rax) + 140001049: 75 0f jne 14000105a + 14000104b: 48 63 50 3c movslq 0x3c(%rax),%rdx + 14000104f: 48 01 d0 add %rdx,%rax + 140001052: 81 38 50 45 00 00 cmpl $0x4550,(%rax) + 140001058: 74 66 je 1400010c0 + 14000105a: 48 8b 05 bf 33 00 00 mov 0x33bf(%rip),%rax # 140004420 <.refptr.__mingw_app_type> + 140001061: 89 0d a5 5f 00 00 mov %ecx,0x5fa5(%rip) # 14000700c + 140001067: 8b 00 mov (%rax),%eax + 140001069: 85 c0 test %eax,%eax + 14000106b: 74 43 je 1400010b0 + 14000106d: b9 02 00 00 00 mov $0x2,%ecx + 140001072: e8 b9 19 00 00 call 140002a30 <__set_app_type> + 140001077: e8 24 19 00 00 call 1400029a0 <__p__fmode> + 14000107c: 48 8b 15 7d 34 00 00 mov 0x347d(%rip),%rdx # 140004500 <.refptr._fmode> + 140001083: 8b 12 mov (%rdx),%edx + 140001085: 89 10 mov %edx,(%rax) + 140001087: e8 0c 19 00 00 call 140002998 <__p__commode> + 14000108c: 48 8b 15 4d 34 00 00 mov 0x344d(%rip),%rdx # 1400044e0 <.refptr._commode> + 140001093: 8b 12 mov (%rdx),%edx + 140001095: 89 10 mov %edx,(%rax) + 140001097: e8 b4 05 00 00 call 140001650 <_setargv> + 14000109c: 48 8b 05 fd 32 00 00 mov 0x32fd(%rip),%rax # 1400043a0 <.refptr._MINGW_INSTALL_DEBUG_MATHERR> + 1400010a3: 83 38 01 cmpl $0x1,(%rax) + 1400010a6: 74 50 je 1400010f8 + 1400010a8: 31 c0 xor %eax,%eax + 1400010aa: 48 83 c4 28 add $0x28,%rsp + 1400010ae: c3 ret + 1400010af: 90 nop + 1400010b0: b9 01 00 00 00 mov $0x1,%ecx + 1400010b5: e8 76 19 00 00 call 140002a30 <__set_app_type> + 1400010ba: eb bb jmp 140001077 + 1400010bc: 0f 1f 40 00 nopl 0x0(%rax) + 1400010c0: 0f b7 50 18 movzwl 0x18(%rax),%edx + 1400010c4: 66 81 fa 0b 01 cmp $0x10b,%dx + 1400010c9: 74 45 je 140001110 + 1400010cb: 66 81 fa 0b 02 cmp $0x20b,%dx + 1400010d0: 75 88 jne 14000105a + 1400010d2: 83 b8 84 00 00 00 0e cmpl $0xe,0x84(%rax) + 1400010d9: 0f 86 7b ff ff ff jbe 14000105a + 1400010df: 8b 90 f8 00 00 00 mov 0xf8(%rax),%edx + 1400010e5: 31 c9 xor %ecx,%ecx + 1400010e7: 85 d2 test %edx,%edx + 1400010e9: 0f 95 c1 setne %cl + 1400010ec: e9 69 ff ff ff jmp 14000105a + 1400010f1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 1400010f8: 48 8b 0d 21 34 00 00 mov 0x3421(%rip),%rcx # 140004520 <.refptr._matherr> + 1400010ff: e8 bc 0c 00 00 call 140001dc0 <__mingw_setusermatherr> + 140001104: 31 c0 xor %eax,%eax + 140001106: 48 83 c4 28 add $0x28,%rsp + 14000110a: c3 ret + 14000110b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 140001110: 83 78 74 0e cmpl $0xe,0x74(%rax) + 140001114: 0f 86 40 ff ff ff jbe 14000105a + 14000111a: 44 8b 80 e8 00 00 00 mov 0xe8(%rax),%r8d + 140001121: 31 c9 xor %ecx,%ecx + 140001123: 45 85 c0 test %r8d,%r8d + 140001126: 0f 95 c1 setne %cl + 140001129: e9 2c ff ff ff jmp 14000105a + 14000112e: 66 90 xchg %ax,%ax + +0000000140001130 : + 140001130: 48 83 ec 38 sub $0x38,%rsp + 140001134: 48 8b 05 f5 33 00 00 mov 0x33f5(%rip),%rax # 140004530 <.refptr._newmode> + 14000113b: 4c 8d 05 d6 5e 00 00 lea 0x5ed6(%rip),%r8 # 140007018 + 140001142: 48 8d 15 d7 5e 00 00 lea 0x5ed7(%rip),%rdx # 140007020 + 140001149: 48 8d 0d d8 5e 00 00 lea 0x5ed8(%rip),%rcx # 140007028 + 140001150: 8b 00 mov (%rax),%eax + 140001152: 89 05 ac 5e 00 00 mov %eax,0x5eac(%rip) # 140007004 + 140001158: 48 8b 05 91 33 00 00 mov 0x3391(%rip),%rax # 1400044f0 <.refptr._dowildcard> + 14000115f: 44 8b 08 mov (%rax),%r9d + 140001162: 48 8d 05 9b 5e 00 00 lea 0x5e9b(%rip),%rax # 140007004 + 140001169: 48 89 44 24 20 mov %rax,0x20(%rsp) + 14000116e: e8 dd 15 00 00 call 140002750 <__getmainargs> + 140001173: 90 nop + 140001174: 48 83 c4 38 add $0x38,%rsp + 140001178: c3 ret + 140001179: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + +0000000140001180 <__tmainCRTStartup>: + 140001180: 41 54 push %r12 + 140001182: 55 push %rbp + 140001183: 57 push %rdi + 140001184: 56 push %rsi + 140001185: 53 push %rbx + 140001186: 48 83 ec 20 sub $0x20,%rsp + 14000118a: 48 8b 1d ef 32 00 00 mov 0x32ef(%rip),%rbx # 140004480 <.refptr.__native_startup_lock> + 140001191: 48 8b 2d 38 71 00 00 mov 0x7138(%rip),%rbp # 1400082d0 <__imp_Sleep> + 140001198: 31 ff xor %edi,%edi + 14000119a: 65 48 8b 04 25 30 00 mov %gs:0x30,%rax + 1400011a1: 00 00 + 1400011a3: 48 8b 70 08 mov 0x8(%rax),%rsi + 1400011a7: eb 17 jmp 1400011c0 <__tmainCRTStartup+0x40> + 1400011a9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 1400011b0: 48 39 c6 cmp %rax,%rsi + 1400011b3: 0f 84 67 01 00 00 je 140001320 <__tmainCRTStartup+0x1a0> + 1400011b9: b9 e8 03 00 00 mov $0x3e8,%ecx + 1400011be: ff d5 call *%rbp + 1400011c0: 48 89 f8 mov %rdi,%rax + 1400011c3: f0 48 0f b1 33 lock cmpxchg %rsi,(%rbx) + 1400011c8: 48 85 c0 test %rax,%rax + 1400011cb: 75 e3 jne 1400011b0 <__tmainCRTStartup+0x30> + 1400011cd: 48 8b 35 bc 32 00 00 mov 0x32bc(%rip),%rsi # 140004490 <.refptr.__native_startup_state> + 1400011d4: 31 ff xor %edi,%edi + 1400011d6: 8b 06 mov (%rsi),%eax + 1400011d8: 83 f8 01 cmp $0x1,%eax + 1400011db: 0f 84 56 01 00 00 je 140001337 <__tmainCRTStartup+0x1b7> + 1400011e1: 8b 06 mov (%rsi),%eax + 1400011e3: 85 c0 test %eax,%eax + 1400011e5: 0f 84 b5 01 00 00 je 1400013a0 <__tmainCRTStartup+0x220> + 1400011eb: c7 05 13 5e 00 00 01 movl $0x1,0x5e13(%rip) # 140007008 + 1400011f2: 00 00 00 + 1400011f5: 8b 06 mov (%rsi),%eax + 1400011f7: 83 f8 01 cmp $0x1,%eax + 1400011fa: 0f 84 4c 01 00 00 je 14000134c <__tmainCRTStartup+0x1cc> + 140001200: 85 ff test %edi,%edi + 140001202: 0f 84 65 01 00 00 je 14000136d <__tmainCRTStartup+0x1ed> + 140001208: 48 8b 05 e1 31 00 00 mov 0x31e1(%rip),%rax # 1400043f0 <.refptr.__dyn_tls_init_callback> + 14000120f: 48 8b 00 mov (%rax),%rax + 140001212: 48 85 c0 test %rax,%rax + 140001215: 74 0c je 140001223 <__tmainCRTStartup+0xa3> + 140001217: 45 31 c0 xor %r8d,%r8d + 14000121a: ba 02 00 00 00 mov $0x2,%edx + 14000121f: 31 c9 xor %ecx,%ecx + 140001221: ff d0 call *%rax + 140001223: e8 f8 07 00 00 call 140001a20 <_pei386_runtime_relocator> + 140001228: 48 8b 0d e1 32 00 00 mov 0x32e1(%rip),%rcx # 140004510 <.refptr._gnu_exception_handler> + 14000122f: ff 15 93 70 00 00 call *0x7093(%rip) # 1400082c8 <__imp_SetUnhandledExceptionFilter> + 140001235: 48 8b 15 34 32 00 00 mov 0x3234(%rip),%rdx # 140004470 <.refptr.__mingw_oldexcpt_handler> + 14000123c: 48 8d 0d bd fd ff ff lea -0x243(%rip),%rcx # 140001000 <__mingw_invalidParameterHandler> + 140001243: 48 89 02 mov %rax,(%rdx) + 140001246: e8 ed 17 00 00 call 140002a38 <_set_invalid_parameter_handler> + 14000124b: e8 e0 05 00 00 call 140001830 <_fpreset> + 140001250: 8b 1d d2 5d 00 00 mov 0x5dd2(%rip),%ebx # 140007028 + 140001256: 8d 7b 01 lea 0x1(%rbx),%edi + 140001259: 48 63 ff movslq %edi,%rdi + 14000125c: 48 c1 e7 03 shl $0x3,%rdi + 140001260: 48 89 f9 mov %rdi,%rcx + 140001263: e8 30 18 00 00 call 140002a98 + 140001268: 4c 8b 25 b1 5d 00 00 mov 0x5db1(%rip),%r12 # 140007020 + 14000126f: 48 89 c5 mov %rax,%rbp + 140001272: 85 db test %ebx,%ebx + 140001274: 0f 8e 46 01 00 00 jle 1400013c0 <__tmainCRTStartup+0x240> + 14000127a: 48 83 ef 08 sub $0x8,%rdi + 14000127e: 31 db xor %ebx,%ebx + 140001280: 49 8b 0c 1c mov (%r12,%rbx,1),%rcx + 140001284: e8 f7 16 00 00 call 140002980 + 140001289: 48 8d 70 01 lea 0x1(%rax),%rsi + 14000128d: 48 89 f1 mov %rsi,%rcx + 140001290: e8 03 18 00 00 call 140002a98 + 140001295: 49 89 f0 mov %rsi,%r8 + 140001298: 48 89 44 1d 00 mov %rax,0x0(%rbp,%rbx,1) + 14000129d: 49 8b 14 1c mov (%r12,%rbx,1),%rdx + 1400012a1: 48 89 c1 mov %rax,%rcx + 1400012a4: 48 83 c3 08 add $0x8,%rbx + 1400012a8: e8 bb 17 00 00 call 140002a68 + 1400012ad: 48 39 df cmp %rbx,%rdi + 1400012b0: 75 ce jne 140001280 <__tmainCRTStartup+0x100> + 1400012b2: 48 01 ef add %rbp,%rdi + 1400012b5: 48 c7 07 00 00 00 00 movq $0x0,(%rdi) + 1400012bc: 48 89 2d 5d 5d 00 00 mov %rbp,0x5d5d(%rip) # 140007020 + 1400012c3: e8 68 03 00 00 call 140001630 <__main> + 1400012c8: 48 8b 05 31 31 00 00 mov 0x3131(%rip),%rax # 140004400 <.refptr.__imp___initenv> + 1400012cf: 4c 8b 05 42 5d 00 00 mov 0x5d42(%rip),%r8 # 140007018 + 1400012d6: 8b 0d 4c 5d 00 00 mov 0x5d4c(%rip),%ecx # 140007028 + 1400012dc: 48 8b 00 mov (%rax),%rax + 1400012df: 4c 89 00 mov %r8,(%rax) + 1400012e2: 48 8b 15 37 5d 00 00 mov 0x5d37(%rip),%rdx # 140007020 + 1400012e9: e8 15 02 00 00 call 140001503
+ 1400012ee: 8b 0d 18 5d 00 00 mov 0x5d18(%rip),%ecx # 14000700c + 1400012f4: 89 05 16 5d 00 00 mov %eax,0x5d16(%rip) # 140007010 + 1400012fa: 85 c9 test %ecx,%ecx + 1400012fc: 0f 84 c6 00 00 00 je 1400013c8 <__tmainCRTStartup+0x248> + 140001302: 8b 15 00 5d 00 00 mov 0x5d00(%rip),%edx # 140007008 + 140001308: 85 d2 test %edx,%edx + 14000130a: 74 74 je 140001380 <__tmainCRTStartup+0x200> + 14000130c: 48 83 c4 20 add $0x20,%rsp + 140001310: 5b pop %rbx + 140001311: 5e pop %rsi + 140001312: 5f pop %rdi + 140001313: 5d pop %rbp + 140001314: 41 5c pop %r12 + 140001316: c3 ret + 140001317: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 14000131e: 00 00 + 140001320: 48 8b 35 69 31 00 00 mov 0x3169(%rip),%rsi # 140004490 <.refptr.__native_startup_state> + 140001327: bf 01 00 00 00 mov $0x1,%edi + 14000132c: 8b 06 mov (%rsi),%eax + 14000132e: 83 f8 01 cmp $0x1,%eax + 140001331: 0f 85 aa fe ff ff jne 1400011e1 <__tmainCRTStartup+0x61> + 140001337: b9 1f 00 00 00 mov $0x1f,%ecx + 14000133c: e8 2f 15 00 00 call 140002870 <_amsg_exit> + 140001341: 8b 06 mov (%rsi),%eax + 140001343: 83 f8 01 cmp $0x1,%eax + 140001346: 0f 85 b4 fe ff ff jne 140001200 <__tmainCRTStartup+0x80> + 14000134c: 48 8b 15 5d 31 00 00 mov 0x315d(%rip),%rdx # 1400044b0 <.refptr.__xc_z> + 140001353: 48 8b 0d 46 31 00 00 mov 0x3146(%rip),%rcx # 1400044a0 <.refptr.__xc_a> + 14000135a: e8 c9 16 00 00 call 140002a28 <_initterm> + 14000135f: c7 06 02 00 00 00 movl $0x2,(%rsi) + 140001365: 85 ff test %edi,%edi + 140001367: 0f 85 9b fe ff ff jne 140001208 <__tmainCRTStartup+0x88> + 14000136d: 31 c0 xor %eax,%eax + 14000136f: 48 87 03 xchg %rax,(%rbx) + 140001372: e9 91 fe ff ff jmp 140001208 <__tmainCRTStartup+0x88> + 140001377: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 14000137e: 00 00 + 140001380: e8 63 16 00 00 call 1400029e8 <_cexit> + 140001385: 8b 05 85 5c 00 00 mov 0x5c85(%rip),%eax # 140007010 + 14000138b: 48 83 c4 20 add $0x20,%rsp + 14000138f: 5b pop %rbx + 140001390: 5e pop %rsi + 140001391: 5f pop %rdi + 140001392: 5d pop %rbp + 140001393: 41 5c pop %r12 + 140001395: c3 ret + 140001396: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 14000139d: 00 00 00 + 1400013a0: 48 8b 15 29 31 00 00 mov 0x3129(%rip),%rdx # 1400044d0 <.refptr.__xi_z> + 1400013a7: 48 8b 0d 12 31 00 00 mov 0x3112(%rip),%rcx # 1400044c0 <.refptr.__xi_a> + 1400013ae: c7 06 01 00 00 00 movl $0x1,(%rsi) + 1400013b4: e8 6f 16 00 00 call 140002a28 <_initterm> + 1400013b9: e9 37 fe ff ff jmp 1400011f5 <__tmainCRTStartup+0x75> + 1400013be: 66 90 xchg %ax,%ax + 1400013c0: 48 89 c7 mov %rax,%rdi + 1400013c3: e9 ed fe ff ff jmp 1400012b5 <__tmainCRTStartup+0x135> + 1400013c8: 89 c1 mov %eax,%ecx + 1400013ca: e8 79 16 00 00 call 140002a48 + 1400013cf: 90 nop + +00000001400013d0 : + 1400013d0: 48 83 ec 28 sub $0x28,%rsp + +00000001400013d4 <.l_startw>: + 1400013d4: 48 8b 05 45 30 00 00 mov 0x3045(%rip),%rax # 140004420 <.refptr.__mingw_app_type> + 1400013db: c7 00 01 00 00 00 movl $0x1,(%rax) + 1400013e1: e8 9a fd ff ff call 140001180 <__tmainCRTStartup> + 1400013e6: 90 nop + +00000001400013e7 <.l_endw>: + 1400013e7: 90 nop + 1400013e8: 48 83 c4 28 add $0x28,%rsp + 1400013ec: c3 ret + 1400013ed: 0f 1f 00 nopl (%rax) + +00000001400013f0 : + 1400013f0: 48 83 ec 28 sub $0x28,%rsp + +00000001400013f4 <.l_start>: + 1400013f4: 48 8b 05 25 30 00 00 mov 0x3025(%rip),%rax # 140004420 <.refptr.__mingw_app_type> + 1400013fb: c7 00 00 00 00 00 movl $0x0,(%rax) + 140001401: e8 7a fd ff ff call 140001180 <__tmainCRTStartup> + 140001406: 90 nop + +0000000140001407 <.l_end>: + 140001407: 90 nop + 140001408: 48 83 c4 28 add $0x28,%rsp + 14000140c: c3 ret + 14000140d: 0f 1f 00 nopl (%rax) + +0000000140001410 : + 140001410: 48 83 ec 28 sub $0x28,%rsp + 140001414: e8 17 14 00 00 call 140002830 <_onexit> + 140001419: 48 83 f8 01 cmp $0x1,%rax + 14000141d: 19 c0 sbb %eax,%eax + 14000141f: 48 83 c4 28 add $0x28,%rsp + 140001423: c3 ret + 140001424: 90 nop + 140001425: 90 nop + 140001426: 90 nop + 140001427: 90 nop + 140001428: 90 nop + 140001429: 90 nop + 14000142a: 90 nop + 14000142b: 90 nop + 14000142c: 90 nop + 14000142d: 90 nop + 14000142e: 90 nop + 14000142f: 90 nop + +0000000140001430 <__gcc_register_frame>: + 140001430: 48 8d 0d 09 00 00 00 lea 0x9(%rip),%rcx # 140001440 <__gcc_deregister_frame> + 140001437: e9 d4 ff ff ff jmp 140001410 + 14000143c: 0f 1f 40 00 nopl 0x0(%rax) + +0000000140001440 <__gcc_deregister_frame>: + 140001440: c3 ret + 140001441: 90 nop + 140001442: 90 nop + 140001443: 90 nop + 140001444: 90 nop + 140001445: 90 nop + 140001446: 90 nop + 140001447: 90 nop + 140001448: 90 nop + 140001449: 90 nop + 14000144a: 90 nop + 14000144b: 90 nop + 14000144c: 90 nop + 14000144d: 90 nop + 14000144e: 90 nop + 14000144f: 90 nop + +0000000140001450 : + 140001450: 55 push %rbp + 140001451: 48 89 e5 mov %rsp,%rbp + 140001454: 48 83 ec 40 sub $0x40,%rsp + 140001458: 48 89 4d 10 mov %rcx,0x10(%rbp) + 14000145c: c7 45 ec 1f 00 00 00 movl $0x1f,-0x14(%rbp) + 140001463: 48 c7 45 f8 00 00 00 movq $0x0,-0x8(%rbp) + 14000146a: 00 + 14000146b: 48 c7 45 f0 01 00 00 movq $0x1,-0x10(%rbp) + 140001472: 00 + 140001473: eb 31 jmp 1400014a6 + 140001475: 48 8b 45 10 mov 0x10(%rbp),%rax + 140001479: 48 8d 50 01 lea 0x1(%rax),%rdx + 14000147d: 48 89 55 10 mov %rdx,0x10(%rbp) + 140001481: 0f b6 00 movzbl (%rax),%eax + 140001484: 0f be c0 movsbl %al,%eax + 140001487: 83 e8 60 sub $0x60,%eax + 14000148a: 48 98 cltq + 14000148c: 48 0f af 45 f0 imul -0x10(%rbp),%rax + 140001491: 48 01 45 f8 add %rax,-0x8(%rbp) + 140001495: 8b 45 ec mov -0x14(%rbp),%eax + 140001498: 48 98 cltq + 14000149a: 48 8b 55 f0 mov -0x10(%rbp),%rdx + 14000149e: 48 0f af c2 imul %rdx,%rax + 1400014a2: 48 89 45 f0 mov %rax,-0x10(%rbp) + 1400014a6: 48 8b 45 10 mov 0x10(%rbp),%rax + 1400014aa: 0f b6 00 movzbl (%rax),%eax + 1400014ad: 84 c0 test %al,%al + 1400014af: 75 c4 jne 140001475 + 1400014b1: 48 8b 45 f8 mov -0x8(%rbp),%rax + 1400014b5: 48 89 c2 mov %rax,%rdx + 1400014b8: 48 8d 05 41 2b 00 00 lea 0x2b41(%rip),%rax # 140004000 <.rdata> + 1400014bf: 48 89 c1 mov %rax,%rcx + 1400014c2: e8 e9 11 00 00 call 1400026b0 + 1400014c7: 48 8b 45 f8 mov -0x8(%rbp),%rax + 1400014cb: 48 83 c4 40 add $0x40,%rsp + 1400014cf: 5d pop %rbp + 1400014d0: c3 ret + +00000001400014d1 : + 1400014d1: 55 push %rbp + 1400014d2: 48 89 e5 mov %rsp,%rbp + 1400014d5: 48 83 ec 20 sub $0x20,%rsp + 1400014d9: 48 89 4d 10 mov %rcx,0x10(%rbp) + 1400014dd: 48 8b 45 10 mov 0x10(%rbp),%rax + 1400014e1: 48 89 c1 mov %rax,%rcx + 1400014e4: e8 67 ff ff ff call 140001450 + 1400014e9: 48 3d 90 9c 6f 22 cmp $0x226f9c90,%rax + 1400014ef: 74 07 je 1400014f8 + 1400014f1: b8 01 00 00 00 mov $0x1,%eax + 1400014f6: eb 05 jmp 1400014fd + 1400014f8: b8 00 00 00 00 mov $0x0,%eax + 1400014fd: 48 83 c4 20 add $0x20,%rsp + 140001501: 5d pop %rbp + 140001502: c3 ret + +0000000140001503
: + 140001503: 55 push %rbp + 140001504: 48 89 e5 mov %rsp,%rbp + 140001507: 48 81 ec 90 00 00 00 sub $0x90,%rsp + 14000150e: e8 1d 01 00 00 call 140001630 <__main> + 140001513: 48 8d 05 ec 2a 00 00 lea 0x2aec(%rip),%rax # 140004006 <.rdata+0x6> + 14000151a: 48 89 c1 mov %rax,%rcx + 14000151d: e8 8e 11 00 00 call 1400026b0 + 140001522: 48 8d 45 90 lea -0x70(%rbp),%rax + 140001526: 48 89 c2 mov %rax,%rdx + 140001529: 48 8d 05 ec 2a 00 00 lea 0x2aec(%rip),%rax # 14000401c <.rdata+0x1c> + 140001530: 48 89 c1 mov %rax,%rcx + 140001533: e8 28 11 00 00 call 140002660 + 140001538: 48 8d 45 90 lea -0x70(%rbp),%rax + 14000153c: 48 89 c1 mov %rax,%rcx + 14000153f: e8 8d ff ff ff call 1400014d1 + 140001544: 84 c0 test %al,%al + 140001546: 74 11 je 140001559 + 140001548: 48 8d 05 d0 2a 00 00 lea 0x2ad0(%rip),%rax # 14000401f <.rdata+0x1f> + 14000154f: 48 89 c1 mov %rax,%rcx + 140001552: e8 71 14 00 00 call 1400029c8 + 140001557: eb 0f jmp 140001568 + 140001559: 48 8d 05 ce 2a 00 00 lea 0x2ace(%rip),%rax # 14000402e <.rdata+0x2e> + 140001560: 48 89 c1 mov %rax,%rcx + 140001563: e8 60 14 00 00 call 1400029c8 + 140001568: b8 00 00 00 00 mov $0x0,%eax + 14000156d: 48 81 c4 90 00 00 00 add $0x90,%rsp + 140001574: 5d pop %rbp + 140001575: c3 ret + 140001576: 90 nop + 140001577: 90 nop + 140001578: 90 nop + 140001579: 90 nop + 14000157a: 90 nop + 14000157b: 90 nop + 14000157c: 90 nop + 14000157d: 90 nop + 14000157e: 90 nop + 14000157f: 90 nop + +0000000140001580 <__do_global_dtors>: + 140001580: 48 83 ec 28 sub $0x28,%rsp + 140001584: 48 8b 05 75 1a 00 00 mov 0x1a75(%rip),%rax # 140003000 <__data_start__> + 14000158b: 48 8b 00 mov (%rax),%rax + 14000158e: 48 85 c0 test %rax,%rax + 140001591: 74 22 je 1400015b5 <__do_global_dtors+0x35> + 140001593: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 140001598: ff d0 call *%rax + 14000159a: 48 8b 05 5f 1a 00 00 mov 0x1a5f(%rip),%rax # 140003000 <__data_start__> + 1400015a1: 48 8d 50 08 lea 0x8(%rax),%rdx + 1400015a5: 48 8b 40 08 mov 0x8(%rax),%rax + 1400015a9: 48 89 15 50 1a 00 00 mov %rdx,0x1a50(%rip) # 140003000 <__data_start__> + 1400015b0: 48 85 c0 test %rax,%rax + 1400015b3: 75 e3 jne 140001598 <__do_global_dtors+0x18> + 1400015b5: 48 83 c4 28 add $0x28,%rsp + 1400015b9: c3 ret + 1400015ba: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + +00000001400015c0 <__do_global_ctors>: + 1400015c0: 56 push %rsi + 1400015c1: 53 push %rbx + 1400015c2: 48 83 ec 28 sub $0x28,%rsp + 1400015c6: 48 8b 15 e3 2d 00 00 mov 0x2de3(%rip),%rdx # 1400043b0 <.refptr.__CTOR_LIST__> + 1400015cd: 48 8b 02 mov (%rdx),%rax + 1400015d0: 89 c1 mov %eax,%ecx + 1400015d2: 83 f8 ff cmp $0xffffffff,%eax + 1400015d5: 74 39 je 140001610 <__do_global_ctors+0x50> + 1400015d7: 85 c9 test %ecx,%ecx + 1400015d9: 74 20 je 1400015fb <__do_global_ctors+0x3b> + 1400015db: 89 c8 mov %ecx,%eax + 1400015dd: 83 e9 01 sub $0x1,%ecx + 1400015e0: 48 8d 1c c2 lea (%rdx,%rax,8),%rbx + 1400015e4: 48 29 c8 sub %rcx,%rax + 1400015e7: 48 8d 74 c2 f8 lea -0x8(%rdx,%rax,8),%rsi + 1400015ec: 0f 1f 40 00 nopl 0x0(%rax) + 1400015f0: ff 13 call *(%rbx) + 1400015f2: 48 83 eb 08 sub $0x8,%rbx + 1400015f6: 48 39 f3 cmp %rsi,%rbx + 1400015f9: 75 f5 jne 1400015f0 <__do_global_ctors+0x30> + 1400015fb: 48 8d 0d 7e ff ff ff lea -0x82(%rip),%rcx # 140001580 <__do_global_dtors> + 140001602: 48 83 c4 28 add $0x28,%rsp + 140001606: 5b pop %rbx + 140001607: 5e pop %rsi + 140001608: e9 03 fe ff ff jmp 140001410 + 14000160d: 0f 1f 00 nopl (%rax) + 140001610: 31 c0 xor %eax,%eax + 140001612: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + 140001618: 44 8d 40 01 lea 0x1(%rax),%r8d + 14000161c: 89 c1 mov %eax,%ecx + 14000161e: 4a 83 3c c2 00 cmpq $0x0,(%rdx,%r8,8) + 140001623: 4c 89 c0 mov %r8,%rax + 140001626: 75 f0 jne 140001618 <__do_global_ctors+0x58> + 140001628: eb ad jmp 1400015d7 <__do_global_ctors+0x17> + 14000162a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + +0000000140001630 <__main>: + 140001630: 8b 05 fa 59 00 00 mov 0x59fa(%rip),%eax # 140007030 + 140001636: 85 c0 test %eax,%eax + 140001638: 74 06 je 140001640 <__main+0x10> + 14000163a: c3 ret + 14000163b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 140001640: c7 05 e6 59 00 00 01 movl $0x1,0x59e6(%rip) # 140007030 + 140001647: 00 00 00 + 14000164a: e9 71 ff ff ff jmp 1400015c0 <__do_global_ctors> + 14000164f: 90 nop + +0000000140001650 <_setargv>: + 140001650: 31 c0 xor %eax,%eax + 140001652: c3 ret + 140001653: 90 nop + 140001654: 90 nop + 140001655: 90 nop + 140001656: 90 nop + 140001657: 90 nop + 140001658: 90 nop + 140001659: 90 nop + 14000165a: 90 nop + 14000165b: 90 nop + 14000165c: 90 nop + 14000165d: 90 nop + 14000165e: 90 nop + 14000165f: 90 nop + +0000000140001660 <__dyn_tls_dtor>: + 140001660: 48 83 ec 28 sub $0x28,%rsp + 140001664: 83 fa 03 cmp $0x3,%edx + 140001667: 74 17 je 140001680 <__dyn_tls_dtor+0x20> + 140001669: 85 d2 test %edx,%edx + 14000166b: 74 13 je 140001680 <__dyn_tls_dtor+0x20> + 14000166d: b8 01 00 00 00 mov $0x1,%eax + 140001672: 48 83 c4 28 add $0x28,%rsp + 140001676: c3 ret + 140001677: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 14000167e: 00 00 + 140001680: e8 7b 0a 00 00 call 140002100 <__mingw_TLScallback> + 140001685: b8 01 00 00 00 mov $0x1,%eax + 14000168a: 48 83 c4 28 add $0x28,%rsp + 14000168e: c3 ret + 14000168f: 90 nop + +0000000140001690 <__dyn_tls_init>: + 140001690: 56 push %rsi + 140001691: 53 push %rbx + 140001692: 48 83 ec 28 sub $0x28,%rsp + 140001696: 48 8b 05 f3 2c 00 00 mov 0x2cf3(%rip),%rax # 140004390 <.refptr._CRT_MT> + 14000169d: 83 38 02 cmpl $0x2,(%rax) + 1400016a0: 74 06 je 1400016a8 <__dyn_tls_init+0x18> + 1400016a2: c7 00 02 00 00 00 movl $0x2,(%rax) + 1400016a8: 83 fa 02 cmp $0x2,%edx + 1400016ab: 74 13 je 1400016c0 <__dyn_tls_init+0x30> + 1400016ad: 83 fa 01 cmp $0x1,%edx + 1400016b0: 74 4e je 140001700 <__dyn_tls_init+0x70> + 1400016b2: b8 01 00 00 00 mov $0x1,%eax + 1400016b7: 48 83 c4 28 add $0x28,%rsp + 1400016bb: 5b pop %rbx + 1400016bc: 5e pop %rsi + 1400016bd: c3 ret + 1400016be: 66 90 xchg %ax,%ax + 1400016c0: 48 8d 1d 91 79 00 00 lea 0x7991(%rip),%rbx # 140009058 <__xd_z> + 1400016c7: 48 8d 35 8a 79 00 00 lea 0x798a(%rip),%rsi # 140009058 <__xd_z> + 1400016ce: 48 39 f3 cmp %rsi,%rbx + 1400016d1: 74 df je 1400016b2 <__dyn_tls_init+0x22> + 1400016d3: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 1400016d8: 48 8b 03 mov (%rbx),%rax + 1400016db: 48 85 c0 test %rax,%rax + 1400016de: 74 02 je 1400016e2 <__dyn_tls_init+0x52> + 1400016e0: ff d0 call *%rax + 1400016e2: 48 83 c3 08 add $0x8,%rbx + 1400016e6: 48 39 f3 cmp %rsi,%rbx + 1400016e9: 75 ed jne 1400016d8 <__dyn_tls_init+0x48> + 1400016eb: b8 01 00 00 00 mov $0x1,%eax + 1400016f0: 48 83 c4 28 add $0x28,%rsp + 1400016f4: 5b pop %rbx + 1400016f5: 5e pop %rsi + 1400016f6: c3 ret + 1400016f7: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 1400016fe: 00 00 + 140001700: e8 fb 09 00 00 call 140002100 <__mingw_TLScallback> + 140001705: b8 01 00 00 00 mov $0x1,%eax + 14000170a: 48 83 c4 28 add $0x28,%rsp + 14000170e: 5b pop %rbx + 14000170f: 5e pop %rsi + 140001710: c3 ret + 140001711: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 140001718: 00 00 00 00 + 14000171c: 0f 1f 40 00 nopl 0x0(%rax) + +0000000140001720 <__tlregdtor>: + 140001720: 31 c0 xor %eax,%eax + 140001722: c3 ret + 140001723: 90 nop + 140001724: 90 nop + 140001725: 90 nop + 140001726: 90 nop + 140001727: 90 nop + 140001728: 90 nop + 140001729: 90 nop + 14000172a: 90 nop + 14000172b: 90 nop + 14000172c: 90 nop + 14000172d: 90 nop + 14000172e: 90 nop + 14000172f: 90 nop + +0000000140001730 <_matherr>: + 140001730: 56 push %rsi + 140001731: 53 push %rbx + 140001732: 48 83 ec 78 sub $0x78,%rsp + 140001736: 0f 11 74 24 40 movups %xmm6,0x40(%rsp) + 14000173b: 0f 11 7c 24 50 movups %xmm7,0x50(%rsp) + 140001740: 44 0f 11 44 24 60 movups %xmm8,0x60(%rsp) + 140001746: 83 39 06 cmpl $0x6,(%rcx) + 140001749: 0f 87 cd 00 00 00 ja 14000181c <_matherr+0xec> + 14000174f: 8b 01 mov (%rcx),%eax + 140001751: 48 8d 15 6c 2a 00 00 lea 0x2a6c(%rip),%rdx # 1400041c4 <.rdata+0x124> + 140001758: 48 63 04 82 movslq (%rdx,%rax,4),%rax + 14000175c: 48 01 d0 add %rdx,%rax + 14000175f: ff e0 jmp *%rax + 140001761: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140001768: 48 8d 1d 50 29 00 00 lea 0x2950(%rip),%rbx # 1400040bf <.rdata+0x1f> + 14000176f: f2 44 0f 10 41 20 movsd 0x20(%rcx),%xmm8 + 140001775: f2 0f 10 79 18 movsd 0x18(%rcx),%xmm7 + 14000177a: f2 0f 10 71 10 movsd 0x10(%rcx),%xmm6 + 14000177f: 48 8b 71 08 mov 0x8(%rcx),%rsi + 140001783: b9 02 00 00 00 mov $0x2,%ecx + 140001788: e8 03 12 00 00 call 140002990 <__acrt_iob_func> + 14000178d: f2 44 0f 11 44 24 30 movsd %xmm8,0x30(%rsp) + 140001794: 49 89 d8 mov %rbx,%r8 + 140001797: 48 8d 15 fa 29 00 00 lea 0x29fa(%rip),%rdx # 140004198 <.rdata+0xf8> + 14000179e: f2 0f 11 7c 24 28 movsd %xmm7,0x28(%rsp) + 1400017a4: 48 89 c1 mov %rax,%rcx + 1400017a7: 49 89 f1 mov %rsi,%r9 + 1400017aa: f2 0f 11 74 24 20 movsd %xmm6,0x20(%rsp) + 1400017b0: e8 4b 0f 00 00 call 140002700 + 1400017b5: 90 nop + 1400017b6: 0f 10 74 24 40 movups 0x40(%rsp),%xmm6 + 1400017bb: 0f 10 7c 24 50 movups 0x50(%rsp),%xmm7 + 1400017c0: 31 c0 xor %eax,%eax + 1400017c2: 44 0f 10 44 24 60 movups 0x60(%rsp),%xmm8 + 1400017c8: 48 83 c4 78 add $0x78,%rsp + 1400017cc: 5b pop %rbx + 1400017cd: 5e pop %rsi + 1400017ce: c3 ret + 1400017cf: 90 nop + 1400017d0: 48 8d 1d c9 28 00 00 lea 0x28c9(%rip),%rbx # 1400040a0 <.rdata> + 1400017d7: eb 96 jmp 14000176f <_matherr+0x3f> + 1400017d9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 1400017e0: 48 8d 1d 19 29 00 00 lea 0x2919(%rip),%rbx # 140004100 <.rdata+0x60> + 1400017e7: eb 86 jmp 14000176f <_matherr+0x3f> + 1400017e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 1400017f0: 48 8d 1d e9 28 00 00 lea 0x28e9(%rip),%rbx # 1400040e0 <.rdata+0x40> + 1400017f7: e9 73 ff ff ff jmp 14000176f <_matherr+0x3f> + 1400017fc: 0f 1f 40 00 nopl 0x0(%rax) + 140001800: 48 8d 1d 49 29 00 00 lea 0x2949(%rip),%rbx # 140004150 <.rdata+0xb0> + 140001807: e9 63 ff ff ff jmp 14000176f <_matherr+0x3f> + 14000180c: 0f 1f 40 00 nopl 0x0(%rax) + 140001810: 48 8d 1d 11 29 00 00 lea 0x2911(%rip),%rbx # 140004128 <.rdata+0x88> + 140001817: e9 53 ff ff ff jmp 14000176f <_matherr+0x3f> + 14000181c: 48 8d 1d 63 29 00 00 lea 0x2963(%rip),%rbx # 140004186 <.rdata+0xe6> + 140001823: e9 47 ff ff ff jmp 14000176f <_matherr+0x3f> + 140001828: 90 nop + 140001829: 90 nop + 14000182a: 90 nop + 14000182b: 90 nop + 14000182c: 90 nop + 14000182d: 90 nop + 14000182e: 90 nop + 14000182f: 90 nop + +0000000140001830 <_fpreset>: + 140001830: db e3 fninit + 140001832: c3 ret + 140001833: 90 nop + 140001834: 90 nop + 140001835: 90 nop + 140001836: 90 nop + 140001837: 90 nop + 140001838: 90 nop + 140001839: 90 nop + 14000183a: 90 nop + 14000183b: 90 nop + 14000183c: 90 nop + 14000183d: 90 nop + 14000183e: 90 nop + 14000183f: 90 nop + +0000000140001840 <__report_error>: + 140001840: 56 push %rsi + 140001841: 53 push %rbx + 140001842: 48 83 ec 38 sub $0x38,%rsp + 140001846: 48 89 cb mov %rcx,%rbx + 140001849: 48 8d 44 24 58 lea 0x58(%rsp),%rax + 14000184e: b9 02 00 00 00 mov $0x2,%ecx + 140001853: 48 89 54 24 58 mov %rdx,0x58(%rsp) + 140001858: 4c 89 44 24 60 mov %r8,0x60(%rsp) + 14000185d: 4c 89 4c 24 68 mov %r9,0x68(%rsp) + 140001862: 48 89 44 24 28 mov %rax,0x28(%rsp) + 140001867: e8 24 11 00 00 call 140002990 <__acrt_iob_func> + 14000186c: 41 b8 1b 00 00 00 mov $0x1b,%r8d + 140001872: ba 01 00 00 00 mov $0x1,%edx + 140001877: 48 8d 0d 62 29 00 00 lea 0x2962(%rip),%rcx # 1400041e0 <.rdata> + 14000187e: 49 89 c1 mov %rax,%r9 + 140001881: e8 3a 11 00 00 call 1400029c0 + 140001886: 48 8b 74 24 28 mov 0x28(%rsp),%rsi + 14000188b: b9 02 00 00 00 mov $0x2,%ecx + 140001890: e8 fb 10 00 00 call 140002990 <__acrt_iob_func> + 140001895: 48 89 da mov %rbx,%rdx + 140001898: 48 89 c1 mov %rax,%rcx + 14000189b: 49 89 f0 mov %rsi,%r8 + 14000189e: e8 9d 0d 00 00 call 140002640 + 1400018a3: e8 98 11 00 00 call 140002a40 + 1400018a8: 90 nop + 1400018a9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + +00000001400018b0 : + 1400018b0: 57 push %rdi + 1400018b1: 56 push %rsi + 1400018b2: 53 push %rbx + 1400018b3: 48 83 ec 50 sub $0x50,%rsp + 1400018b7: 48 63 35 d6 57 00 00 movslq 0x57d6(%rip),%rsi # 140007094 + 1400018be: 48 89 cb mov %rcx,%rbx + 1400018c1: 85 f6 test %esi,%esi + 1400018c3: 0f 8e 17 01 00 00 jle 1400019e0 + 1400018c9: 48 8b 05 c8 57 00 00 mov 0x57c8(%rip),%rax # 140007098 + 1400018d0: 45 31 c9 xor %r9d,%r9d + 1400018d3: 48 83 c0 18 add $0x18,%rax + 1400018d7: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 1400018de: 00 00 + 1400018e0: 4c 8b 00 mov (%rax),%r8 + 1400018e3: 4c 39 c3 cmp %r8,%rbx + 1400018e6: 72 13 jb 1400018fb + 1400018e8: 48 8b 50 08 mov 0x8(%rax),%rdx + 1400018ec: 8b 52 08 mov 0x8(%rdx),%edx + 1400018ef: 49 01 d0 add %rdx,%r8 + 1400018f2: 4c 39 c3 cmp %r8,%rbx + 1400018f5: 0f 82 8a 00 00 00 jb 140001985 + 1400018fb: 41 83 c1 01 add $0x1,%r9d + 1400018ff: 48 83 c0 28 add $0x28,%rax + 140001903: 41 39 f1 cmp %esi,%r9d + 140001906: 75 d8 jne 1400018e0 + 140001908: 48 89 d9 mov %rbx,%rcx + 14000190b: e8 10 0a 00 00 call 140002320 <__mingw_GetSectionForAddress> + 140001910: 48 89 c7 mov %rax,%rdi + 140001913: 48 85 c0 test %rax,%rax + 140001916: 0f 84 e6 00 00 00 je 140001a02 + 14000191c: 48 8b 05 75 57 00 00 mov 0x5775(%rip),%rax # 140007098 + 140001923: 48 8d 1c b6 lea (%rsi,%rsi,4),%rbx + 140001927: 48 c1 e3 03 shl $0x3,%rbx + 14000192b: 48 01 d8 add %rbx,%rax + 14000192e: 48 89 78 20 mov %rdi,0x20(%rax) + 140001932: c7 00 00 00 00 00 movl $0x0,(%rax) + 140001938: e8 23 0b 00 00 call 140002460 <_GetPEImageBase> + 14000193d: 8b 57 0c mov 0xc(%rdi),%edx + 140001940: 41 b8 30 00 00 00 mov $0x30,%r8d + 140001946: 48 8d 0c 10 lea (%rax,%rdx,1),%rcx + 14000194a: 48 8b 05 47 57 00 00 mov 0x5747(%rip),%rax # 140007098 + 140001951: 48 8d 54 24 20 lea 0x20(%rsp),%rdx + 140001956: 48 89 4c 18 18 mov %rcx,0x18(%rax,%rbx,1) + 14000195b: ff 15 87 69 00 00 call *0x6987(%rip) # 1400082e8 <__imp_VirtualQuery> + 140001961: 48 85 c0 test %rax,%rax + 140001964: 0f 84 7d 00 00 00 je 1400019e7 + 14000196a: 8b 44 24 44 mov 0x44(%rsp),%eax + 14000196e: 8d 50 fc lea -0x4(%rax),%edx + 140001971: 83 e2 fb and $0xfffffffb,%edx + 140001974: 74 08 je 14000197e + 140001976: 8d 50 c0 lea -0x40(%rax),%edx + 140001979: 83 e2 bf and $0xffffffbf,%edx + 14000197c: 75 12 jne 140001990 + 14000197e: 83 05 0f 57 00 00 01 addl $0x1,0x570f(%rip) # 140007094 + 140001985: 48 83 c4 50 add $0x50,%rsp + 140001989: 5b pop %rbx + 14000198a: 5e pop %rsi + 14000198b: 5f pop %rdi + 14000198c: c3 ret + 14000198d: 0f 1f 00 nopl (%rax) + 140001990: 83 f8 02 cmp $0x2,%eax + 140001993: 48 8b 4c 24 20 mov 0x20(%rsp),%rcx + 140001998: 48 8b 54 24 38 mov 0x38(%rsp),%rdx + 14000199d: 41 b8 40 00 00 00 mov $0x40,%r8d + 1400019a3: b8 04 00 00 00 mov $0x4,%eax + 1400019a8: 44 0f 44 c0 cmove %eax,%r8d + 1400019ac: 48 03 1d e5 56 00 00 add 0x56e5(%rip),%rbx # 140007098 + 1400019b3: 48 89 4b 08 mov %rcx,0x8(%rbx) + 1400019b7: 49 89 d9 mov %rbx,%r9 + 1400019ba: 48 89 53 10 mov %rdx,0x10(%rbx) + 1400019be: ff 15 1c 69 00 00 call *0x691c(%rip) # 1400082e0 <__imp_VirtualProtect> + 1400019c4: 85 c0 test %eax,%eax + 1400019c6: 75 b6 jne 14000197e + 1400019c8: ff 15 e2 68 00 00 call *0x68e2(%rip) # 1400082b0 <__imp_GetLastError> + 1400019ce: 48 8d 0d 83 28 00 00 lea 0x2883(%rip),%rcx # 140004258 <.rdata+0x78> + 1400019d5: 89 c2 mov %eax,%edx + 1400019d7: e8 64 fe ff ff call 140001840 <__report_error> + 1400019dc: 0f 1f 40 00 nopl 0x0(%rax) + 1400019e0: 31 f6 xor %esi,%esi + 1400019e2: e9 21 ff ff ff jmp 140001908 + 1400019e7: 48 8b 05 aa 56 00 00 mov 0x56aa(%rip),%rax # 140007098 + 1400019ee: 8b 57 08 mov 0x8(%rdi),%edx + 1400019f1: 48 8d 0d 28 28 00 00 lea 0x2828(%rip),%rcx # 140004220 <.rdata+0x40> + 1400019f8: 4c 8b 44 18 18 mov 0x18(%rax,%rbx,1),%r8 + 1400019fd: e8 3e fe ff ff call 140001840 <__report_error> + 140001a02: 48 89 da mov %rbx,%rdx + 140001a05: 48 8d 0d f4 27 00 00 lea 0x27f4(%rip),%rcx # 140004200 <.rdata+0x20> + 140001a0c: e8 2f fe ff ff call 140001840 <__report_error> + 140001a11: 90 nop + 140001a12: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 140001a19: 00 00 00 00 + 140001a1d: 0f 1f 00 nopl (%rax) + +0000000140001a20 <_pei386_runtime_relocator>: + 140001a20: 55 push %rbp + 140001a21: 41 57 push %r15 + 140001a23: 41 56 push %r14 + 140001a25: 41 55 push %r13 + 140001a27: 41 54 push %r12 + 140001a29: 57 push %rdi + 140001a2a: 56 push %rsi + 140001a2b: 53 push %rbx + 140001a2c: 48 83 ec 48 sub $0x48,%rsp + 140001a30: 48 8d 6c 24 40 lea 0x40(%rsp),%rbp + 140001a35: 44 8b 25 54 56 00 00 mov 0x5654(%rip),%r12d # 140007090 + 140001a3c: 45 85 e4 test %r12d,%r12d + 140001a3f: 74 17 je 140001a58 <_pei386_runtime_relocator+0x38> + 140001a41: 48 8d 65 08 lea 0x8(%rbp),%rsp + 140001a45: 5b pop %rbx + 140001a46: 5e pop %rsi + 140001a47: 5f pop %rdi + 140001a48: 41 5c pop %r12 + 140001a4a: 41 5d pop %r13 + 140001a4c: 41 5e pop %r14 + 140001a4e: 41 5f pop %r15 + 140001a50: 5d pop %rbp + 140001a51: c3 ret + 140001a52: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + 140001a58: c7 05 2e 56 00 00 01 movl $0x1,0x562e(%rip) # 140007090 + 140001a5f: 00 00 00 + 140001a62: e8 39 09 00 00 call 1400023a0 <__mingw_GetSectionCount> + 140001a67: 48 98 cltq + 140001a69: 48 8d 04 80 lea (%rax,%rax,4),%rax + 140001a6d: 48 8d 04 c5 0f 00 00 lea 0xf(,%rax,8),%rax + 140001a74: 00 + 140001a75: 48 83 e0 f0 and $0xfffffffffffffff0,%rax + 140001a79: e8 82 0b 00 00 call 140002600 <___chkstk_ms> + 140001a7e: 4c 8b 2d 4b 29 00 00 mov 0x294b(%rip),%r13 # 1400043d0 <.refptr.__RUNTIME_PSEUDO_RELOC_LIST_END__> + 140001a85: 48 8b 1d 54 29 00 00 mov 0x2954(%rip),%rbx # 1400043e0 <.refptr.__RUNTIME_PSEUDO_RELOC_LIST__> + 140001a8c: c7 05 fe 55 00 00 00 movl $0x0,0x55fe(%rip) # 140007094 + 140001a93: 00 00 00 + 140001a96: 48 29 c4 sub %rax,%rsp + 140001a99: 48 8d 44 24 30 lea 0x30(%rsp),%rax + 140001a9e: 48 89 05 f3 55 00 00 mov %rax,0x55f3(%rip) # 140007098 + 140001aa5: 4c 89 e8 mov %r13,%rax + 140001aa8: 48 29 d8 sub %rbx,%rax + 140001aab: 48 83 f8 07 cmp $0x7,%rax + 140001aaf: 7e 90 jle 140001a41 <_pei386_runtime_relocator+0x21> + 140001ab1: 8b 13 mov (%rbx),%edx + 140001ab3: 48 83 f8 0b cmp $0xb,%rax + 140001ab7: 0f 8f 03 01 00 00 jg 140001bc0 <_pei386_runtime_relocator+0x1a0> + 140001abd: 8b 03 mov (%rbx),%eax + 140001abf: 85 c0 test %eax,%eax + 140001ac1: 0f 85 69 02 00 00 jne 140001d30 <_pei386_runtime_relocator+0x310> + 140001ac7: 8b 43 04 mov 0x4(%rbx),%eax + 140001aca: 85 c0 test %eax,%eax + 140001acc: 0f 85 5e 02 00 00 jne 140001d30 <_pei386_runtime_relocator+0x310> + 140001ad2: 8b 53 08 mov 0x8(%rbx),%edx + 140001ad5: 83 fa 01 cmp $0x1,%edx + 140001ad8: 0f 85 92 02 00 00 jne 140001d70 <_pei386_runtime_relocator+0x350> + 140001ade: 48 83 c3 0c add $0xc,%rbx + 140001ae2: 4c 39 eb cmp %r13,%rbx + 140001ae5: 0f 83 56 ff ff ff jae 140001a41 <_pei386_runtime_relocator+0x21> + 140001aeb: 4c 8b 35 ce 28 00 00 mov 0x28ce(%rip),%r14 # 1400043c0 <.refptr.__ImageBase> + 140001af2: 41 bf ff ff ff ff mov $0xffffffff,%r15d + 140001af8: eb 65 jmp 140001b5f <_pei386_runtime_relocator+0x13f> + 140001afa: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + 140001b00: 83 f9 08 cmp $0x8,%ecx + 140001b03: 0f 84 d7 00 00 00 je 140001be0 <_pei386_runtime_relocator+0x1c0> + 140001b09: 83 f9 10 cmp $0x10,%ecx + 140001b0c: 0f 85 50 02 00 00 jne 140001d62 <_pei386_runtime_relocator+0x342> + 140001b12: 0f b7 37 movzwl (%rdi),%esi + 140001b15: 81 e2 c0 00 00 00 and $0xc0,%edx + 140001b1b: 66 85 f6 test %si,%si + 140001b1e: 0f 89 cc 01 00 00 jns 140001cf0 <_pei386_runtime_relocator+0x2d0> + 140001b24: 48 81 ce 00 00 ff ff or $0xffffffffffff0000,%rsi + 140001b2b: 48 29 c6 sub %rax,%rsi + 140001b2e: 4c 01 ce add %r9,%rsi + 140001b31: 85 d2 test %edx,%edx + 140001b33: 75 12 jne 140001b47 <_pei386_runtime_relocator+0x127> + 140001b35: 48 81 fe 00 80 ff ff cmp $0xffffffffffff8000,%rsi + 140001b3c: 7c 65 jl 140001ba3 <_pei386_runtime_relocator+0x183> + 140001b3e: 48 81 fe ff ff 00 00 cmp $0xffff,%rsi + 140001b45: 7f 5c jg 140001ba3 <_pei386_runtime_relocator+0x183> + 140001b47: 48 89 f9 mov %rdi,%rcx + 140001b4a: e8 61 fd ff ff call 1400018b0 + 140001b4f: 66 89 37 mov %si,(%rdi) + 140001b52: 48 83 c3 0c add $0xc,%rbx + 140001b56: 4c 39 eb cmp %r13,%rbx + 140001b59: 0f 83 d1 00 00 00 jae 140001c30 <_pei386_runtime_relocator+0x210> + 140001b5f: 8b 03 mov (%rbx),%eax + 140001b61: 8b 53 08 mov 0x8(%rbx),%edx + 140001b64: 8b 7b 04 mov 0x4(%rbx),%edi + 140001b67: 4c 01 f0 add %r14,%rax + 140001b6a: 0f b6 ca movzbl %dl,%ecx + 140001b6d: 4c 8b 08 mov (%rax),%r9 + 140001b70: 4c 01 f7 add %r14,%rdi + 140001b73: 83 f9 20 cmp $0x20,%ecx + 140001b76: 0f 84 0c 01 00 00 je 140001c88 <_pei386_runtime_relocator+0x268> + 140001b7c: 76 82 jbe 140001b00 <_pei386_runtime_relocator+0xe0> + 140001b7e: 83 f9 40 cmp $0x40,%ecx + 140001b81: 0f 85 db 01 00 00 jne 140001d62 <_pei386_runtime_relocator+0x342> + 140001b87: 48 8b 37 mov (%rdi),%rsi + 140001b8a: 89 d1 mov %edx,%ecx + 140001b8c: 48 29 c6 sub %rax,%rsi + 140001b8f: 4c 01 ce add %r9,%rsi + 140001b92: 81 e1 c0 00 00 00 and $0xc0,%ecx + 140001b98: 0f 85 42 01 00 00 jne 140001ce0 <_pei386_runtime_relocator+0x2c0> + 140001b9e: 48 85 f6 test %rsi,%rsi + 140001ba1: 78 af js 140001b52 <_pei386_runtime_relocator+0x132> + 140001ba3: 48 89 74 24 20 mov %rsi,0x20(%rsp) + 140001ba8: 89 ca mov %ecx,%edx + 140001baa: 49 89 f8 mov %rdi,%r8 + 140001bad: 48 8d 0d 34 27 00 00 lea 0x2734(%rip),%rcx # 1400042e8 <.rdata+0x108> + 140001bb4: e8 87 fc ff ff call 140001840 <__report_error> + 140001bb9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140001bc0: 85 d2 test %edx,%edx + 140001bc2: 0f 85 68 01 00 00 jne 140001d30 <_pei386_runtime_relocator+0x310> + 140001bc8: 8b 43 04 mov 0x4(%rbx),%eax + 140001bcb: 89 c2 mov %eax,%edx + 140001bcd: 0b 53 08 or 0x8(%rbx),%edx + 140001bd0: 0f 85 f4 fe ff ff jne 140001aca <_pei386_runtime_relocator+0xaa> + 140001bd6: 48 83 c3 0c add $0xc,%rbx + 140001bda: e9 de fe ff ff jmp 140001abd <_pei386_runtime_relocator+0x9d> + 140001bdf: 90 nop + 140001be0: 0f b6 37 movzbl (%rdi),%esi + 140001be3: 81 e2 c0 00 00 00 and $0xc0,%edx + 140001be9: 40 84 f6 test %sil,%sil + 140001bec: 0f 89 26 01 00 00 jns 140001d18 <_pei386_runtime_relocator+0x2f8> + 140001bf2: 48 81 ce 00 ff ff ff or $0xffffffffffffff00,%rsi + 140001bf9: 48 29 c6 sub %rax,%rsi + 140001bfc: 4c 01 ce add %r9,%rsi + 140001bff: 85 d2 test %edx,%edx + 140001c01: 75 0f jne 140001c12 <_pei386_runtime_relocator+0x1f2> + 140001c03: 48 81 fe ff 00 00 00 cmp $0xff,%rsi + 140001c0a: 7f 97 jg 140001ba3 <_pei386_runtime_relocator+0x183> + 140001c0c: 48 83 fe 80 cmp $0xffffffffffffff80,%rsi + 140001c10: 7c 91 jl 140001ba3 <_pei386_runtime_relocator+0x183> + 140001c12: 48 89 f9 mov %rdi,%rcx + 140001c15: 48 83 c3 0c add $0xc,%rbx + 140001c19: e8 92 fc ff ff call 1400018b0 + 140001c1e: 40 88 37 mov %sil,(%rdi) + 140001c21: 4c 39 eb cmp %r13,%rbx + 140001c24: 0f 82 35 ff ff ff jb 140001b5f <_pei386_runtime_relocator+0x13f> + 140001c2a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + 140001c30: 8b 15 5e 54 00 00 mov 0x545e(%rip),%edx # 140007094 + 140001c36: 85 d2 test %edx,%edx + 140001c38: 0f 8e 03 fe ff ff jle 140001a41 <_pei386_runtime_relocator+0x21> + 140001c3e: 48 8b 35 9b 66 00 00 mov 0x669b(%rip),%rsi # 1400082e0 <__imp_VirtualProtect> + 140001c45: 31 db xor %ebx,%ebx + 140001c47: 48 8d 7d fc lea -0x4(%rbp),%rdi + 140001c4b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 140001c50: 48 8b 05 41 54 00 00 mov 0x5441(%rip),%rax # 140007098 + 140001c57: 48 01 d8 add %rbx,%rax + 140001c5a: 44 8b 00 mov (%rax),%r8d + 140001c5d: 45 85 c0 test %r8d,%r8d + 140001c60: 74 0d je 140001c6f <_pei386_runtime_relocator+0x24f> + 140001c62: 48 8b 50 10 mov 0x10(%rax),%rdx + 140001c66: 48 8b 48 08 mov 0x8(%rax),%rcx + 140001c6a: 49 89 f9 mov %rdi,%r9 + 140001c6d: ff d6 call *%rsi + 140001c6f: 41 83 c4 01 add $0x1,%r12d + 140001c73: 48 83 c3 28 add $0x28,%rbx + 140001c77: 44 3b 25 16 54 00 00 cmp 0x5416(%rip),%r12d # 140007094 + 140001c7e: 7c d0 jl 140001c50 <_pei386_runtime_relocator+0x230> + 140001c80: e9 bc fd ff ff jmp 140001a41 <_pei386_runtime_relocator+0x21> + 140001c85: 0f 1f 00 nopl (%rax) + 140001c88: 8b 37 mov (%rdi),%esi + 140001c8a: 81 e2 c0 00 00 00 and $0xc0,%edx + 140001c90: 85 f6 test %esi,%esi + 140001c92: 79 74 jns 140001d08 <_pei386_runtime_relocator+0x2e8> + 140001c94: 49 bb 00 00 00 00 ff movabs $0xffffffff00000000,%r11 + 140001c9b: ff ff ff + 140001c9e: 4c 09 de or %r11,%rsi + 140001ca1: 48 29 c6 sub %rax,%rsi + 140001ca4: 4c 01 ce add %r9,%rsi + 140001ca7: 85 d2 test %edx,%edx + 140001ca9: 75 1c jne 140001cc7 <_pei386_runtime_relocator+0x2a7> + 140001cab: 4c 39 fe cmp %r15,%rsi + 140001cae: 0f 8f ef fe ff ff jg 140001ba3 <_pei386_runtime_relocator+0x183> + 140001cb4: 48 b8 ff ff ff 7f ff movabs $0xffffffff7fffffff,%rax + 140001cbb: ff ff ff + 140001cbe: 48 39 c6 cmp %rax,%rsi + 140001cc1: 0f 8e dc fe ff ff jle 140001ba3 <_pei386_runtime_relocator+0x183> + 140001cc7: 48 89 f9 mov %rdi,%rcx + 140001cca: e8 e1 fb ff ff call 1400018b0 + 140001ccf: 89 37 mov %esi,(%rdi) + 140001cd1: e9 7c fe ff ff jmp 140001b52 <_pei386_runtime_relocator+0x132> + 140001cd6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 140001cdd: 00 00 00 + 140001ce0: 48 89 f9 mov %rdi,%rcx + 140001ce3: e8 c8 fb ff ff call 1400018b0 + 140001ce8: 48 89 37 mov %rsi,(%rdi) + 140001ceb: e9 62 fe ff ff jmp 140001b52 <_pei386_runtime_relocator+0x132> + 140001cf0: 48 29 c6 sub %rax,%rsi + 140001cf3: 4c 01 ce add %r9,%rsi + 140001cf6: 85 d2 test %edx,%edx + 140001cf8: 0f 84 37 fe ff ff je 140001b35 <_pei386_runtime_relocator+0x115> + 140001cfe: e9 44 fe ff ff jmp 140001b47 <_pei386_runtime_relocator+0x127> + 140001d03: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 140001d08: 48 29 c6 sub %rax,%rsi + 140001d0b: 4c 01 ce add %r9,%rsi + 140001d0e: 85 d2 test %edx,%edx + 140001d10: 74 99 je 140001cab <_pei386_runtime_relocator+0x28b> + 140001d12: eb b3 jmp 140001cc7 <_pei386_runtime_relocator+0x2a7> + 140001d14: 0f 1f 40 00 nopl 0x0(%rax) + 140001d18: 48 29 c6 sub %rax,%rsi + 140001d1b: 4c 01 ce add %r9,%rsi + 140001d1e: 85 d2 test %edx,%edx + 140001d20: 0f 84 dd fe ff ff je 140001c03 <_pei386_runtime_relocator+0x1e3> + 140001d26: e9 e7 fe ff ff jmp 140001c12 <_pei386_runtime_relocator+0x1f2> + 140001d2b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 140001d30: 4c 39 eb cmp %r13,%rbx + 140001d33: 0f 83 08 fd ff ff jae 140001a41 <_pei386_runtime_relocator+0x21> + 140001d39: 4c 8b 35 80 26 00 00 mov 0x2680(%rip),%r14 # 1400043c0 <.refptr.__ImageBase> + 140001d40: 8b 73 04 mov 0x4(%rbx),%esi + 140001d43: 8b 3b mov (%rbx),%edi + 140001d45: 48 83 c3 08 add $0x8,%rbx + 140001d49: 4c 01 f6 add %r14,%rsi + 140001d4c: 03 3e add (%rsi),%edi + 140001d4e: 48 89 f1 mov %rsi,%rcx + 140001d51: e8 5a fb ff ff call 1400018b0 + 140001d56: 89 3e mov %edi,(%rsi) + 140001d58: 4c 39 eb cmp %r13,%rbx + 140001d5b: 72 e3 jb 140001d40 <_pei386_runtime_relocator+0x320> + 140001d5d: e9 ce fe ff ff jmp 140001c30 <_pei386_runtime_relocator+0x210> + 140001d62: 89 ca mov %ecx,%edx + 140001d64: 48 8d 0d 4d 25 00 00 lea 0x254d(%rip),%rcx # 1400042b8 <.rdata+0xd8> + 140001d6b: e8 d0 fa ff ff call 140001840 <__report_error> + 140001d70: 48 8d 0d 09 25 00 00 lea 0x2509(%rip),%rcx # 140004280 <.rdata+0xa0> + 140001d77: e8 c4 fa ff ff call 140001840 <__report_error> + 140001d7c: 90 nop + 140001d7d: 90 nop + 140001d7e: 90 nop + 140001d7f: 90 nop + +0000000140001d80 <__mingw_raise_matherr>: + 140001d80: 48 83 ec 58 sub $0x58,%rsp + 140001d84: 48 8b 05 15 53 00 00 mov 0x5315(%rip),%rax # 1400070a0 + 140001d8b: 66 0f 14 d3 unpcklpd %xmm3,%xmm2 + 140001d8f: 48 85 c0 test %rax,%rax + 140001d92: 74 25 je 140001db9 <__mingw_raise_matherr+0x39> + 140001d94: f2 0f 10 84 24 80 00 movsd 0x80(%rsp),%xmm0 + 140001d9b: 00 00 + 140001d9d: 89 4c 24 20 mov %ecx,0x20(%rsp) + 140001da1: 48 8d 4c 24 20 lea 0x20(%rsp),%rcx + 140001da6: 48 89 54 24 28 mov %rdx,0x28(%rsp) + 140001dab: 0f 11 54 24 30 movups %xmm2,0x30(%rsp) + 140001db0: f2 0f 11 44 24 40 movsd %xmm0,0x40(%rsp) + 140001db6: ff d0 call *%rax + 140001db8: 90 nop + 140001db9: 48 83 c4 58 add $0x58,%rsp + 140001dbd: c3 ret + 140001dbe: 66 90 xchg %ax,%ax + +0000000140001dc0 <__mingw_setusermatherr>: + 140001dc0: 48 89 0d d9 52 00 00 mov %rcx,0x52d9(%rip) # 1400070a0 + 140001dc7: e9 a4 0c 00 00 jmp 140002a70 <__setusermatherr> + 140001dcc: 90 nop + 140001dcd: 90 nop + 140001dce: 90 nop + 140001dcf: 90 nop + +0000000140001dd0 <_gnu_exception_handler>: + 140001dd0: 53 push %rbx + 140001dd1: 48 83 ec 20 sub $0x20,%rsp + 140001dd5: 48 8b 11 mov (%rcx),%rdx + 140001dd8: 8b 02 mov (%rdx),%eax + 140001dda: 48 89 cb mov %rcx,%rbx + 140001ddd: 89 c1 mov %eax,%ecx + 140001ddf: 81 e1 ff ff ff 20 and $0x20ffffff,%ecx + 140001de5: 81 f9 43 43 47 20 cmp $0x20474343,%ecx + 140001deb: 0f 84 bf 00 00 00 je 140001eb0 <_gnu_exception_handler+0xe0> + 140001df1: 3d 96 00 00 c0 cmp $0xc0000096,%eax + 140001df6: 77 47 ja 140001e3f <_gnu_exception_handler+0x6f> + 140001df8: 3d 8b 00 00 c0 cmp $0xc000008b,%eax + 140001dfd: 76 61 jbe 140001e60 <_gnu_exception_handler+0x90> + 140001dff: 05 73 ff ff 3f add $0x3fffff73,%eax + 140001e04: 83 f8 09 cmp $0x9,%eax + 140001e07: 0f 87 93 00 00 00 ja 140001ea0 <_gnu_exception_handler+0xd0> + 140001e0d: 48 8d 15 2c 25 00 00 lea 0x252c(%rip),%rdx # 140004340 <.rdata> + 140001e14: 48 63 04 82 movslq (%rdx,%rax,4),%rax + 140001e18: 48 01 d0 add %rdx,%rax + 140001e1b: ff e0 jmp *%rax + 140001e1d: 0f 1f 00 nopl (%rax) + 140001e20: 31 d2 xor %edx,%edx + 140001e22: b9 08 00 00 00 mov $0x8,%ecx + 140001e27: e8 24 0c 00 00 call 140002a50 + 140001e2c: 48 83 f8 01 cmp $0x1,%rax + 140001e30: 0f 84 3e 01 00 00 je 140001f74 <_gnu_exception_handler+0x1a4> + 140001e36: 48 85 c0 test %rax,%rax + 140001e39: 0f 85 01 01 00 00 jne 140001f40 <_gnu_exception_handler+0x170> + 140001e3f: 48 8b 05 7a 52 00 00 mov 0x527a(%rip),%rax # 1400070c0 <__mingw_oldexcpt_handler> + 140001e46: 48 85 c0 test %rax,%rax + 140001e49: 74 75 je 140001ec0 <_gnu_exception_handler+0xf0> + 140001e4b: 48 89 d9 mov %rbx,%rcx + 140001e4e: 48 83 c4 20 add $0x20,%rsp + 140001e52: 5b pop %rbx + 140001e53: 48 ff e0 rex.W jmp *%rax + 140001e56: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 140001e5d: 00 00 00 + 140001e60: 3d 05 00 00 c0 cmp $0xc0000005,%eax + 140001e65: 0f 84 a5 00 00 00 je 140001f10 <_gnu_exception_handler+0x140> + 140001e6b: 76 63 jbe 140001ed0 <_gnu_exception_handler+0x100> + 140001e6d: 3d 08 00 00 c0 cmp $0xc0000008,%eax + 140001e72: 74 2c je 140001ea0 <_gnu_exception_handler+0xd0> + 140001e74: 3d 1d 00 00 c0 cmp $0xc000001d,%eax + 140001e79: 75 c4 jne 140001e3f <_gnu_exception_handler+0x6f> + 140001e7b: 31 d2 xor %edx,%edx + 140001e7d: b9 04 00 00 00 mov $0x4,%ecx + 140001e82: e8 c9 0b 00 00 call 140002a50 + 140001e87: 48 83 f8 01 cmp $0x1,%rax + 140001e8b: 0f 84 cf 00 00 00 je 140001f60 <_gnu_exception_handler+0x190> + 140001e91: 48 85 c0 test %rax,%rax + 140001e94: 74 a9 je 140001e3f <_gnu_exception_handler+0x6f> + 140001e96: b9 04 00 00 00 mov $0x4,%ecx + 140001e9b: ff d0 call *%rax + 140001e9d: 0f 1f 00 nopl (%rax) + 140001ea0: b8 ff ff ff ff mov $0xffffffff,%eax + 140001ea5: eb 1b jmp 140001ec2 <_gnu_exception_handler+0xf2> + 140001ea7: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 140001eae: 00 00 + 140001eb0: f6 42 04 01 testb $0x1,0x4(%rdx) + 140001eb4: 0f 85 37 ff ff ff jne 140001df1 <_gnu_exception_handler+0x21> + 140001eba: eb e4 jmp 140001ea0 <_gnu_exception_handler+0xd0> + 140001ebc: 0f 1f 40 00 nopl 0x0(%rax) + 140001ec0: 31 c0 xor %eax,%eax + 140001ec2: 48 83 c4 20 add $0x20,%rsp + 140001ec6: 5b pop %rbx + 140001ec7: c3 ret + 140001ec8: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) + 140001ecf: 00 + 140001ed0: 3d 02 00 00 80 cmp $0x80000002,%eax + 140001ed5: 0f 85 64 ff ff ff jne 140001e3f <_gnu_exception_handler+0x6f> + 140001edb: eb c3 jmp 140001ea0 <_gnu_exception_handler+0xd0> + 140001edd: 0f 1f 00 nopl (%rax) + 140001ee0: 31 d2 xor %edx,%edx + 140001ee2: b9 08 00 00 00 mov $0x8,%ecx + 140001ee7: e8 64 0b 00 00 call 140002a50 + 140001eec: 48 83 f8 01 cmp $0x1,%rax + 140001ef0: 0f 85 40 ff ff ff jne 140001e36 <_gnu_exception_handler+0x66> + 140001ef6: ba 01 00 00 00 mov $0x1,%edx + 140001efb: b9 08 00 00 00 mov $0x8,%ecx + 140001f00: e8 4b 0b 00 00 call 140002a50 + 140001f05: eb 99 jmp 140001ea0 <_gnu_exception_handler+0xd0> + 140001f07: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 140001f0e: 00 00 + 140001f10: 31 d2 xor %edx,%edx + 140001f12: b9 0b 00 00 00 mov $0xb,%ecx + 140001f17: e8 34 0b 00 00 call 140002a50 + 140001f1c: 48 83 f8 01 cmp $0x1,%rax + 140001f20: 74 2a je 140001f4c <_gnu_exception_handler+0x17c> + 140001f22: 48 85 c0 test %rax,%rax + 140001f25: 0f 84 14 ff ff ff je 140001e3f <_gnu_exception_handler+0x6f> + 140001f2b: b9 0b 00 00 00 mov $0xb,%ecx + 140001f30: ff d0 call *%rax + 140001f32: e9 69 ff ff ff jmp 140001ea0 <_gnu_exception_handler+0xd0> + 140001f37: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 140001f3e: 00 00 + 140001f40: b9 08 00 00 00 mov $0x8,%ecx + 140001f45: ff d0 call *%rax + 140001f47: e9 54 ff ff ff jmp 140001ea0 <_gnu_exception_handler+0xd0> + 140001f4c: ba 01 00 00 00 mov $0x1,%edx + 140001f51: b9 0b 00 00 00 mov $0xb,%ecx + 140001f56: e8 f5 0a 00 00 call 140002a50 + 140001f5b: e9 40 ff ff ff jmp 140001ea0 <_gnu_exception_handler+0xd0> + 140001f60: ba 01 00 00 00 mov $0x1,%edx + 140001f65: b9 04 00 00 00 mov $0x4,%ecx + 140001f6a: e8 e1 0a 00 00 call 140002a50 + 140001f6f: e9 2c ff ff ff jmp 140001ea0 <_gnu_exception_handler+0xd0> + 140001f74: ba 01 00 00 00 mov $0x1,%edx + 140001f79: b9 08 00 00 00 mov $0x8,%ecx + 140001f7e: e8 cd 0a 00 00 call 140002a50 + 140001f83: e8 a8 f8 ff ff call 140001830 <_fpreset> + 140001f88: e9 13 ff ff ff jmp 140001ea0 <_gnu_exception_handler+0xd0> + 140001f8d: 90 nop + 140001f8e: 90 nop + 140001f8f: 90 nop + +0000000140001f90 <__mingwthr_run_key_dtors.part.0>: + 140001f90: 41 54 push %r12 + 140001f92: 55 push %rbp + 140001f93: 57 push %rdi + 140001f94: 56 push %rsi + 140001f95: 53 push %rbx + 140001f96: 48 83 ec 20 sub $0x20,%rsp + 140001f9a: 4c 8d 25 5f 51 00 00 lea 0x515f(%rip),%r12 # 140007100 <__mingwthr_cs> + 140001fa1: 4c 89 e1 mov %r12,%rcx + 140001fa4: ff 15 fe 62 00 00 call *0x62fe(%rip) # 1400082a8 <__imp_EnterCriticalSection> + 140001faa: 48 8b 1d 2f 51 00 00 mov 0x512f(%rip),%rbx # 1400070e0 + 140001fb1: 48 85 db test %rbx,%rbx + 140001fb4: 74 36 je 140001fec <__mingwthr_run_key_dtors.part.0+0x5c> + 140001fb6: 48 8b 2d 1b 63 00 00 mov 0x631b(%rip),%rbp # 1400082d8 <__imp_TlsGetValue> + 140001fbd: 48 8b 3d ec 62 00 00 mov 0x62ec(%rip),%rdi # 1400082b0 <__imp_GetLastError> + 140001fc4: 0f 1f 40 00 nopl 0x0(%rax) + 140001fc8: 8b 0b mov (%rbx),%ecx + 140001fca: ff d5 call *%rbp + 140001fcc: 48 89 c6 mov %rax,%rsi + 140001fcf: ff d7 call *%rdi + 140001fd1: 48 85 f6 test %rsi,%rsi + 140001fd4: 74 0d je 140001fe3 <__mingwthr_run_key_dtors.part.0+0x53> + 140001fd6: 85 c0 test %eax,%eax + 140001fd8: 75 09 jne 140001fe3 <__mingwthr_run_key_dtors.part.0+0x53> + 140001fda: 48 8b 43 08 mov 0x8(%rbx),%rax + 140001fde: 48 89 f1 mov %rsi,%rcx + 140001fe1: ff d0 call *%rax + 140001fe3: 48 8b 5b 10 mov 0x10(%rbx),%rbx + 140001fe7: 48 85 db test %rbx,%rbx + 140001fea: 75 dc jne 140001fc8 <__mingwthr_run_key_dtors.part.0+0x38> + 140001fec: 4c 89 e1 mov %r12,%rcx + 140001fef: 48 83 c4 20 add $0x20,%rsp + 140001ff3: 5b pop %rbx + 140001ff4: 5e pop %rsi + 140001ff5: 5f pop %rdi + 140001ff6: 5d pop %rbp + 140001ff7: 41 5c pop %r12 + 140001ff9: 48 ff 25 c0 62 00 00 rex.W jmp *0x62c0(%rip) # 1400082c0 <__imp_LeaveCriticalSection> + +0000000140002000 <___w64_mingwthr_add_key_dtor>: + 140002000: 57 push %rdi + 140002001: 56 push %rsi + 140002002: 53 push %rbx + 140002003: 48 83 ec 20 sub $0x20,%rsp + 140002007: 8b 05 db 50 00 00 mov 0x50db(%rip),%eax # 1400070e8 <__mingwthr_cs_init> + 14000200d: 89 cf mov %ecx,%edi + 14000200f: 48 89 d6 mov %rdx,%rsi + 140002012: 85 c0 test %eax,%eax + 140002014: 75 0a jne 140002020 <___w64_mingwthr_add_key_dtor+0x20> + 140002016: 31 c0 xor %eax,%eax + 140002018: 48 83 c4 20 add $0x20,%rsp + 14000201c: 5b pop %rbx + 14000201d: 5e pop %rsi + 14000201e: 5f pop %rdi + 14000201f: c3 ret + 140002020: ba 18 00 00 00 mov $0x18,%edx + 140002025: b9 01 00 00 00 mov $0x1,%ecx + 14000202a: e8 59 0a 00 00 call 140002a88 + 14000202f: 48 89 c3 mov %rax,%rbx + 140002032: 48 85 c0 test %rax,%rax + 140002035: 74 33 je 14000206a <___w64_mingwthr_add_key_dtor+0x6a> + 140002037: 48 89 70 08 mov %rsi,0x8(%rax) + 14000203b: 48 8d 35 be 50 00 00 lea 0x50be(%rip),%rsi # 140007100 <__mingwthr_cs> + 140002042: 89 38 mov %edi,(%rax) + 140002044: 48 89 f1 mov %rsi,%rcx + 140002047: ff 15 5b 62 00 00 call *0x625b(%rip) # 1400082a8 <__imp_EnterCriticalSection> + 14000204d: 48 8b 05 8c 50 00 00 mov 0x508c(%rip),%rax # 1400070e0 + 140002054: 48 89 f1 mov %rsi,%rcx + 140002057: 48 89 1d 82 50 00 00 mov %rbx,0x5082(%rip) # 1400070e0 + 14000205e: 48 89 43 10 mov %rax,0x10(%rbx) + 140002062: ff 15 58 62 00 00 call *0x6258(%rip) # 1400082c0 <__imp_LeaveCriticalSection> + 140002068: eb ac jmp 140002016 <___w64_mingwthr_add_key_dtor+0x16> + 14000206a: 83 c8 ff or $0xffffffff,%eax + 14000206d: eb a9 jmp 140002018 <___w64_mingwthr_add_key_dtor+0x18> + 14000206f: 90 nop + +0000000140002070 <___w64_mingwthr_remove_key_dtor>: + 140002070: 56 push %rsi + 140002071: 53 push %rbx + 140002072: 48 83 ec 28 sub $0x28,%rsp + 140002076: 8b 05 6c 50 00 00 mov 0x506c(%rip),%eax # 1400070e8 <__mingwthr_cs_init> + 14000207c: 89 cb mov %ecx,%ebx + 14000207e: 85 c0 test %eax,%eax + 140002080: 75 0e jne 140002090 <___w64_mingwthr_remove_key_dtor+0x20> + 140002082: 31 c0 xor %eax,%eax + 140002084: 48 83 c4 28 add $0x28,%rsp + 140002088: 5b pop %rbx + 140002089: 5e pop %rsi + 14000208a: c3 ret + 14000208b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 140002090: 48 8d 35 69 50 00 00 lea 0x5069(%rip),%rsi # 140007100 <__mingwthr_cs> + 140002097: 48 89 f1 mov %rsi,%rcx + 14000209a: ff 15 08 62 00 00 call *0x6208(%rip) # 1400082a8 <__imp_EnterCriticalSection> + 1400020a0: 48 8b 0d 39 50 00 00 mov 0x5039(%rip),%rcx # 1400070e0 + 1400020a7: 48 85 c9 test %rcx,%rcx + 1400020aa: 74 27 je 1400020d3 <___w64_mingwthr_remove_key_dtor+0x63> + 1400020ac: 31 d2 xor %edx,%edx + 1400020ae: eb 0b jmp 1400020bb <___w64_mingwthr_remove_key_dtor+0x4b> + 1400020b0: 48 89 ca mov %rcx,%rdx + 1400020b3: 48 85 c0 test %rax,%rax + 1400020b6: 74 1b je 1400020d3 <___w64_mingwthr_remove_key_dtor+0x63> + 1400020b8: 48 89 c1 mov %rax,%rcx + 1400020bb: 8b 01 mov (%rcx),%eax + 1400020bd: 39 d8 cmp %ebx,%eax + 1400020bf: 48 8b 41 10 mov 0x10(%rcx),%rax + 1400020c3: 75 eb jne 1400020b0 <___w64_mingwthr_remove_key_dtor+0x40> + 1400020c5: 48 85 d2 test %rdx,%rdx + 1400020c8: 74 1e je 1400020e8 <___w64_mingwthr_remove_key_dtor+0x78> + 1400020ca: 48 89 42 10 mov %rax,0x10(%rdx) + 1400020ce: e8 bd 09 00 00 call 140002a90 + 1400020d3: 48 89 f1 mov %rsi,%rcx + 1400020d6: ff 15 e4 61 00 00 call *0x61e4(%rip) # 1400082c0 <__imp_LeaveCriticalSection> + 1400020dc: 31 c0 xor %eax,%eax + 1400020de: 48 83 c4 28 add $0x28,%rsp + 1400020e2: 5b pop %rbx + 1400020e3: 5e pop %rsi + 1400020e4: c3 ret + 1400020e5: 0f 1f 00 nopl (%rax) + 1400020e8: 48 89 05 f1 4f 00 00 mov %rax,0x4ff1(%rip) # 1400070e0 + 1400020ef: eb dd jmp 1400020ce <___w64_mingwthr_remove_key_dtor+0x5e> + 1400020f1: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 1400020f8: 00 00 00 00 + 1400020fc: 0f 1f 40 00 nopl 0x0(%rax) + +0000000140002100 <__mingw_TLScallback>: + 140002100: 53 push %rbx + 140002101: 48 83 ec 20 sub $0x20,%rsp + 140002105: 83 fa 02 cmp $0x2,%edx + 140002108: 0f 84 b2 00 00 00 je 1400021c0 <__mingw_TLScallback+0xc0> + 14000210e: 77 30 ja 140002140 <__mingw_TLScallback+0x40> + 140002110: 85 d2 test %edx,%edx + 140002112: 74 4c je 140002160 <__mingw_TLScallback+0x60> + 140002114: 8b 05 ce 4f 00 00 mov 0x4fce(%rip),%eax # 1400070e8 <__mingwthr_cs_init> + 14000211a: 85 c0 test %eax,%eax + 14000211c: 0f 84 be 00 00 00 je 1400021e0 <__mingw_TLScallback+0xe0> + 140002122: c7 05 bc 4f 00 00 01 movl $0x1,0x4fbc(%rip) # 1400070e8 <__mingwthr_cs_init> + 140002129: 00 00 00 + 14000212c: b8 01 00 00 00 mov $0x1,%eax + 140002131: 48 83 c4 20 add $0x20,%rsp + 140002135: 5b pop %rbx + 140002136: c3 ret + 140002137: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 14000213e: 00 00 + 140002140: 83 fa 03 cmp $0x3,%edx + 140002143: 75 e7 jne 14000212c <__mingw_TLScallback+0x2c> + 140002145: 8b 05 9d 4f 00 00 mov 0x4f9d(%rip),%eax # 1400070e8 <__mingwthr_cs_init> + 14000214b: 85 c0 test %eax,%eax + 14000214d: 74 dd je 14000212c <__mingw_TLScallback+0x2c> + 14000214f: e8 3c fe ff ff call 140001f90 <__mingwthr_run_key_dtors.part.0> + 140002154: eb d6 jmp 14000212c <__mingw_TLScallback+0x2c> + 140002156: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 14000215d: 00 00 00 + 140002160: 8b 05 82 4f 00 00 mov 0x4f82(%rip),%eax # 1400070e8 <__mingwthr_cs_init> + 140002166: 85 c0 test %eax,%eax + 140002168: 75 66 jne 1400021d0 <__mingw_TLScallback+0xd0> + 14000216a: 8b 05 78 4f 00 00 mov 0x4f78(%rip),%eax # 1400070e8 <__mingwthr_cs_init> + 140002170: 83 f8 01 cmp $0x1,%eax + 140002173: 75 b7 jne 14000212c <__mingw_TLScallback+0x2c> + 140002175: 48 8b 1d 64 4f 00 00 mov 0x4f64(%rip),%rbx # 1400070e0 + 14000217c: 48 85 db test %rbx,%rbx + 14000217f: 74 18 je 140002199 <__mingw_TLScallback+0x99> + 140002181: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140002188: 48 89 d9 mov %rbx,%rcx + 14000218b: 48 8b 5b 10 mov 0x10(%rbx),%rbx + 14000218f: e8 fc 08 00 00 call 140002a90 + 140002194: 48 85 db test %rbx,%rbx + 140002197: 75 ef jne 140002188 <__mingw_TLScallback+0x88> + 140002199: 48 8d 0d 60 4f 00 00 lea 0x4f60(%rip),%rcx # 140007100 <__mingwthr_cs> + 1400021a0: 48 c7 05 35 4f 00 00 movq $0x0,0x4f35(%rip) # 1400070e0 + 1400021a7: 00 00 00 00 + 1400021ab: c7 05 33 4f 00 00 00 movl $0x0,0x4f33(%rip) # 1400070e8 <__mingwthr_cs_init> + 1400021b2: 00 00 00 + 1400021b5: ff 15 e5 60 00 00 call *0x60e5(%rip) # 1400082a0 <__IAT_start__> + 1400021bb: e9 6c ff ff ff jmp 14000212c <__mingw_TLScallback+0x2c> + 1400021c0: e8 6b f6 ff ff call 140001830 <_fpreset> + 1400021c5: b8 01 00 00 00 mov $0x1,%eax + 1400021ca: 48 83 c4 20 add $0x20,%rsp + 1400021ce: 5b pop %rbx + 1400021cf: c3 ret + 1400021d0: e8 bb fd ff ff call 140001f90 <__mingwthr_run_key_dtors.part.0> + 1400021d5: eb 93 jmp 14000216a <__mingw_TLScallback+0x6a> + 1400021d7: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 1400021de: 00 00 + 1400021e0: 48 8d 0d 19 4f 00 00 lea 0x4f19(%rip),%rcx # 140007100 <__mingwthr_cs> + 1400021e7: ff 15 cb 60 00 00 call *0x60cb(%rip) # 1400082b8 <__imp_InitializeCriticalSection> + 1400021ed: e9 30 ff ff ff jmp 140002122 <__mingw_TLScallback+0x22> + 1400021f2: 90 nop + 1400021f3: 90 nop + 1400021f4: 90 nop + 1400021f5: 90 nop + 1400021f6: 90 nop + 1400021f7: 90 nop + 1400021f8: 90 nop + 1400021f9: 90 nop + 1400021fa: 90 nop + 1400021fb: 90 nop + 1400021fc: 90 nop + 1400021fd: 90 nop + 1400021fe: 90 nop + 1400021ff: 90 nop + +0000000140002200 <_ValidateImageBase>: + 140002200: 31 c0 xor %eax,%eax + 140002202: 66 81 39 4d 5a cmpw $0x5a4d,(%rcx) + 140002207: 75 0f jne 140002218 <_ValidateImageBase+0x18> + 140002209: 48 63 51 3c movslq 0x3c(%rcx),%rdx + 14000220d: 48 01 d1 add %rdx,%rcx + 140002210: 81 39 50 45 00 00 cmpl $0x4550,(%rcx) + 140002216: 74 08 je 140002220 <_ValidateImageBase+0x20> + 140002218: c3 ret + 140002219: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140002220: 31 c0 xor %eax,%eax + 140002222: 66 81 79 18 0b 02 cmpw $0x20b,0x18(%rcx) + 140002228: 0f 94 c0 sete %al + 14000222b: c3 ret + 14000222c: 0f 1f 40 00 nopl 0x0(%rax) + +0000000140002230 <_FindPESection>: + 140002230: 48 63 41 3c movslq 0x3c(%rcx),%rax + 140002234: 48 01 c1 add %rax,%rcx + 140002237: 0f b7 41 14 movzwl 0x14(%rcx),%eax + 14000223b: 44 0f b7 41 06 movzwl 0x6(%rcx),%r8d + 140002240: 48 8d 44 01 18 lea 0x18(%rcx,%rax,1),%rax + 140002245: 66 45 85 c0 test %r8w,%r8w + 140002249: 74 32 je 14000227d <_FindPESection+0x4d> + 14000224b: 41 8d 48 ff lea -0x1(%r8),%ecx + 14000224f: 48 8d 0c 89 lea (%rcx,%rcx,4),%rcx + 140002253: 4c 8d 4c c8 28 lea 0x28(%rax,%rcx,8),%r9 + 140002258: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) + 14000225f: 00 + 140002260: 44 8b 40 0c mov 0xc(%rax),%r8d + 140002264: 4c 89 c1 mov %r8,%rcx + 140002267: 4c 39 c2 cmp %r8,%rdx + 14000226a: 72 08 jb 140002274 <_FindPESection+0x44> + 14000226c: 03 48 08 add 0x8(%rax),%ecx + 14000226f: 48 39 ca cmp %rcx,%rdx + 140002272: 72 0b jb 14000227f <_FindPESection+0x4f> + 140002274: 48 83 c0 28 add $0x28,%rax + 140002278: 4c 39 c8 cmp %r9,%rax + 14000227b: 75 e3 jne 140002260 <_FindPESection+0x30> + 14000227d: 31 c0 xor %eax,%eax + 14000227f: c3 ret + +0000000140002280 <_FindPESectionByName>: + 140002280: 57 push %rdi + 140002281: 56 push %rsi + 140002282: 53 push %rbx + 140002283: 48 83 ec 20 sub $0x20,%rsp + 140002287: 48 89 ce mov %rcx,%rsi + 14000228a: e8 f1 06 00 00 call 140002980 + 14000228f: 48 83 f8 08 cmp $0x8,%rax + 140002293: 77 7b ja 140002310 <_FindPESectionByName+0x90> + 140002295: 48 8b 15 24 21 00 00 mov 0x2124(%rip),%rdx # 1400043c0 <.refptr.__ImageBase> + 14000229c: 31 db xor %ebx,%ebx + 14000229e: 66 81 3a 4d 5a cmpw $0x5a4d,(%rdx) + 1400022a3: 75 59 jne 1400022fe <_FindPESectionByName+0x7e> + 1400022a5: 48 63 42 3c movslq 0x3c(%rdx),%rax + 1400022a9: 48 01 d0 add %rdx,%rax + 1400022ac: 81 38 50 45 00 00 cmpl $0x4550,(%rax) + 1400022b2: 75 4a jne 1400022fe <_FindPESectionByName+0x7e> + 1400022b4: 66 81 78 18 0b 02 cmpw $0x20b,0x18(%rax) + 1400022ba: 75 42 jne 1400022fe <_FindPESectionByName+0x7e> + 1400022bc: 0f b7 50 14 movzwl 0x14(%rax),%edx + 1400022c0: 48 8d 5c 10 18 lea 0x18(%rax,%rdx,1),%rbx + 1400022c5: 0f b7 50 06 movzwl 0x6(%rax),%edx + 1400022c9: 66 85 d2 test %dx,%dx + 1400022cc: 74 42 je 140002310 <_FindPESectionByName+0x90> + 1400022ce: 8d 42 ff lea -0x1(%rdx),%eax + 1400022d1: 48 8d 04 80 lea (%rax,%rax,4),%rax + 1400022d5: 48 8d 7c c3 28 lea 0x28(%rbx,%rax,8),%rdi + 1400022da: eb 0d jmp 1400022e9 <_FindPESectionByName+0x69> + 1400022dc: 0f 1f 40 00 nopl 0x0(%rax) + 1400022e0: 48 83 c3 28 add $0x28,%rbx + 1400022e4: 48 39 fb cmp %rdi,%rbx + 1400022e7: 74 27 je 140002310 <_FindPESectionByName+0x90> + 1400022e9: 41 b8 08 00 00 00 mov $0x8,%r8d + 1400022ef: 48 89 f2 mov %rsi,%rdx + 1400022f2: 48 89 d9 mov %rbx,%rcx + 1400022f5: e8 8e 06 00 00 call 140002988 + 1400022fa: 85 c0 test %eax,%eax + 1400022fc: 75 e2 jne 1400022e0 <_FindPESectionByName+0x60> + 1400022fe: 48 89 d8 mov %rbx,%rax + 140002301: 48 83 c4 20 add $0x20,%rsp + 140002305: 5b pop %rbx + 140002306: 5e pop %rsi + 140002307: 5f pop %rdi + 140002308: c3 ret + 140002309: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140002310: 31 db xor %ebx,%ebx + 140002312: 48 89 d8 mov %rbx,%rax + 140002315: 48 83 c4 20 add $0x20,%rsp + 140002319: 5b pop %rbx + 14000231a: 5e pop %rsi + 14000231b: 5f pop %rdi + 14000231c: c3 ret + 14000231d: 0f 1f 00 nopl (%rax) + +0000000140002320 <__mingw_GetSectionForAddress>: + 140002320: 48 8b 15 99 20 00 00 mov 0x2099(%rip),%rdx # 1400043c0 <.refptr.__ImageBase> + 140002327: 31 c0 xor %eax,%eax + 140002329: 66 81 3a 4d 5a cmpw $0x5a4d,(%rdx) + 14000232e: 75 10 jne 140002340 <__mingw_GetSectionForAddress+0x20> + 140002330: 4c 63 42 3c movslq 0x3c(%rdx),%r8 + 140002334: 49 01 d0 add %rdx,%r8 + 140002337: 41 81 38 50 45 00 00 cmpl $0x4550,(%r8) + 14000233e: 74 08 je 140002348 <__mingw_GetSectionForAddress+0x28> + 140002340: c3 ret + 140002341: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140002348: 66 41 81 78 18 0b 02 cmpw $0x20b,0x18(%r8) + 14000234f: 75 ef jne 140002340 <__mingw_GetSectionForAddress+0x20> + 140002351: 41 0f b7 40 14 movzwl 0x14(%r8),%eax + 140002356: 48 29 d1 sub %rdx,%rcx + 140002359: 49 8d 44 00 18 lea 0x18(%r8,%rax,1),%rax + 14000235e: 45 0f b7 40 06 movzwl 0x6(%r8),%r8d + 140002363: 66 45 85 c0 test %r8w,%r8w + 140002367: 74 34 je 14000239d <__mingw_GetSectionForAddress+0x7d> + 140002369: 41 8d 50 ff lea -0x1(%r8),%edx + 14000236d: 48 8d 14 92 lea (%rdx,%rdx,4),%rdx + 140002371: 4c 8d 4c d0 28 lea 0x28(%rax,%rdx,8),%r9 + 140002376: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 14000237d: 00 00 00 + 140002380: 44 8b 40 0c mov 0xc(%rax),%r8d + 140002384: 4c 89 c2 mov %r8,%rdx + 140002387: 4c 39 c1 cmp %r8,%rcx + 14000238a: 72 08 jb 140002394 <__mingw_GetSectionForAddress+0x74> + 14000238c: 03 50 08 add 0x8(%rax),%edx + 14000238f: 48 39 d1 cmp %rdx,%rcx + 140002392: 72 ac jb 140002340 <__mingw_GetSectionForAddress+0x20> + 140002394: 48 83 c0 28 add $0x28,%rax + 140002398: 4c 39 c8 cmp %r9,%rax + 14000239b: 75 e3 jne 140002380 <__mingw_GetSectionForAddress+0x60> + 14000239d: 31 c0 xor %eax,%eax + 14000239f: c3 ret + +00000001400023a0 <__mingw_GetSectionCount>: + 1400023a0: 48 8b 05 19 20 00 00 mov 0x2019(%rip),%rax # 1400043c0 <.refptr.__ImageBase> + 1400023a7: 31 c9 xor %ecx,%ecx + 1400023a9: 66 81 38 4d 5a cmpw $0x5a4d,(%rax) + 1400023ae: 75 0f jne 1400023bf <__mingw_GetSectionCount+0x1f> + 1400023b0: 48 63 50 3c movslq 0x3c(%rax),%rdx + 1400023b4: 48 01 d0 add %rdx,%rax + 1400023b7: 81 38 50 45 00 00 cmpl $0x4550,(%rax) + 1400023bd: 74 09 je 1400023c8 <__mingw_GetSectionCount+0x28> + 1400023bf: 89 c8 mov %ecx,%eax + 1400023c1: c3 ret + 1400023c2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + 1400023c8: 66 81 78 18 0b 02 cmpw $0x20b,0x18(%rax) + 1400023ce: 75 ef jne 1400023bf <__mingw_GetSectionCount+0x1f> + 1400023d0: 0f b7 48 06 movzwl 0x6(%rax),%ecx + 1400023d4: 89 c8 mov %ecx,%eax + 1400023d6: c3 ret + 1400023d7: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) + 1400023de: 00 00 + +00000001400023e0 <_FindPESectionExec>: + 1400023e0: 4c 8b 05 d9 1f 00 00 mov 0x1fd9(%rip),%r8 # 1400043c0 <.refptr.__ImageBase> + 1400023e7: 31 c0 xor %eax,%eax + 1400023e9: 66 41 81 38 4d 5a cmpw $0x5a4d,(%r8) + 1400023ef: 75 0f jne 140002400 <_FindPESectionExec+0x20> + 1400023f1: 49 63 50 3c movslq 0x3c(%r8),%rdx + 1400023f5: 4c 01 c2 add %r8,%rdx + 1400023f8: 81 3a 50 45 00 00 cmpl $0x4550,(%rdx) + 1400023fe: 74 08 je 140002408 <_FindPESectionExec+0x28> + 140002400: c3 ret + 140002401: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140002408: 66 81 7a 18 0b 02 cmpw $0x20b,0x18(%rdx) + 14000240e: 75 f0 jne 140002400 <_FindPESectionExec+0x20> + 140002410: 0f b7 42 14 movzwl 0x14(%rdx),%eax + 140002414: 44 0f b7 42 06 movzwl 0x6(%rdx),%r8d + 140002419: 48 8d 44 02 18 lea 0x18(%rdx,%rax,1),%rax + 14000241e: 66 45 85 c0 test %r8w,%r8w + 140002422: 74 2c je 140002450 <_FindPESectionExec+0x70> + 140002424: 41 8d 50 ff lea -0x1(%r8),%edx + 140002428: 48 8d 14 92 lea (%rdx,%rdx,4),%rdx + 14000242c: 48 8d 54 d0 28 lea 0x28(%rax,%rdx,8),%rdx + 140002431: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 140002438: f6 40 27 20 testb $0x20,0x27(%rax) + 14000243c: 74 09 je 140002447 <_FindPESectionExec+0x67> + 14000243e: 48 85 c9 test %rcx,%rcx + 140002441: 74 bd je 140002400 <_FindPESectionExec+0x20> + 140002443: 48 83 e9 01 sub $0x1,%rcx + 140002447: 48 83 c0 28 add $0x28,%rax + 14000244b: 48 39 c2 cmp %rax,%rdx + 14000244e: 75 e8 jne 140002438 <_FindPESectionExec+0x58> + 140002450: 31 c0 xor %eax,%eax + 140002452: c3 ret + 140002453: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 14000245a: 00 00 00 00 + 14000245e: 66 90 xchg %ax,%ax + +0000000140002460 <_GetPEImageBase>: + 140002460: 48 8b 05 59 1f 00 00 mov 0x1f59(%rip),%rax # 1400043c0 <.refptr.__ImageBase> + 140002467: 31 d2 xor %edx,%edx + 140002469: 66 81 38 4d 5a cmpw $0x5a4d,(%rax) + 14000246e: 75 0f jne 14000247f <_GetPEImageBase+0x1f> + 140002470: 48 63 48 3c movslq 0x3c(%rax),%rcx + 140002474: 48 01 c1 add %rax,%rcx + 140002477: 81 39 50 45 00 00 cmpl $0x4550,(%rcx) + 14000247d: 74 09 je 140002488 <_GetPEImageBase+0x28> + 14000247f: 48 89 d0 mov %rdx,%rax + 140002482: c3 ret + 140002483: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) + 140002488: 66 81 79 18 0b 02 cmpw $0x20b,0x18(%rcx) + 14000248e: 48 0f 44 d0 cmove %rax,%rdx + 140002492: 48 89 d0 mov %rdx,%rax + 140002495: c3 ret + 140002496: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 14000249d: 00 00 00 + +00000001400024a0 <_IsNonwritableInCurrentImage>: + 1400024a0: 48 8b 15 19 1f 00 00 mov 0x1f19(%rip),%rdx # 1400043c0 <.refptr.__ImageBase> + 1400024a7: 31 c0 xor %eax,%eax + 1400024a9: 66 81 3a 4d 5a cmpw $0x5a4d,(%rdx) + 1400024ae: 75 10 jne 1400024c0 <_IsNonwritableInCurrentImage+0x20> + 1400024b0: 4c 63 42 3c movslq 0x3c(%rdx),%r8 + 1400024b4: 49 01 d0 add %rdx,%r8 + 1400024b7: 41 81 38 50 45 00 00 cmpl $0x4550,(%r8) + 1400024be: 74 08 je 1400024c8 <_IsNonwritableInCurrentImage+0x28> + 1400024c0: c3 ret + 1400024c1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + 1400024c8: 66 41 81 78 18 0b 02 cmpw $0x20b,0x18(%r8) + 1400024cf: 75 ef jne 1400024c0 <_IsNonwritableInCurrentImage+0x20> + 1400024d1: 48 29 d1 sub %rdx,%rcx + 1400024d4: 45 0f b7 48 06 movzwl 0x6(%r8),%r9d + 1400024d9: 41 0f b7 50 14 movzwl 0x14(%r8),%edx + 1400024de: 49 8d 54 10 18 lea 0x18(%r8,%rdx,1),%rdx + 1400024e3: 66 45 85 c9 test %r9w,%r9w + 1400024e7: 74 d7 je 1400024c0 <_IsNonwritableInCurrentImage+0x20> + 1400024e9: 41 8d 41 ff lea -0x1(%r9),%eax + 1400024ed: 48 8d 04 80 lea (%rax,%rax,4),%rax + 1400024f1: 4c 8d 4c c2 28 lea 0x28(%rdx,%rax,8),%r9 + 1400024f6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 1400024fd: 00 00 00 + 140002500: 44 8b 42 0c mov 0xc(%rdx),%r8d + 140002504: 4c 89 c0 mov %r8,%rax + 140002507: 4c 39 c1 cmp %r8,%rcx + 14000250a: 72 08 jb 140002514 <_IsNonwritableInCurrentImage+0x74> + 14000250c: 03 42 08 add 0x8(%rdx),%eax + 14000250f: 48 39 c1 cmp %rax,%rcx + 140002512: 72 0c jb 140002520 <_IsNonwritableInCurrentImage+0x80> + 140002514: 48 83 c2 28 add $0x28,%rdx + 140002518: 4c 39 ca cmp %r9,%rdx + 14000251b: 75 e3 jne 140002500 <_IsNonwritableInCurrentImage+0x60> + 14000251d: 31 c0 xor %eax,%eax + 14000251f: c3 ret + 140002520: 8b 42 24 mov 0x24(%rdx),%eax + 140002523: f7 d0 not %eax + 140002525: c1 e8 1f shr $0x1f,%eax + 140002528: c3 ret + 140002529: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) + +0000000140002530 <__mingw_enum_import_library_names>: + 140002530: 4c 8b 1d 89 1e 00 00 mov 0x1e89(%rip),%r11 # 1400043c0 <.refptr.__ImageBase> + 140002537: 45 31 c9 xor %r9d,%r9d + 14000253a: 66 41 81 3b 4d 5a cmpw $0x5a4d,(%r11) + 140002540: 75 10 jne 140002552 <__mingw_enum_import_library_names+0x22> + 140002542: 4d 63 43 3c movslq 0x3c(%r11),%r8 + 140002546: 4d 01 d8 add %r11,%r8 + 140002549: 41 81 38 50 45 00 00 cmpl $0x4550,(%r8) + 140002550: 74 0e je 140002560 <__mingw_enum_import_library_names+0x30> + 140002552: 4c 89 c8 mov %r9,%rax + 140002555: c3 ret + 140002556: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 14000255d: 00 00 00 + 140002560: 66 41 81 78 18 0b 02 cmpw $0x20b,0x18(%r8) + 140002567: 75 e9 jne 140002552 <__mingw_enum_import_library_names+0x22> + 140002569: 41 8b 80 90 00 00 00 mov 0x90(%r8),%eax + 140002570: 85 c0 test %eax,%eax + 140002572: 74 de je 140002552 <__mingw_enum_import_library_names+0x22> + 140002574: 41 0f b7 50 14 movzwl 0x14(%r8),%edx + 140002579: 45 0f b7 50 06 movzwl 0x6(%r8),%r10d + 14000257e: 49 8d 54 10 18 lea 0x18(%r8,%rdx,1),%rdx + 140002583: 66 45 85 d2 test %r10w,%r10w + 140002587: 74 c9 je 140002552 <__mingw_enum_import_library_names+0x22> + 140002589: 45 8d 42 ff lea -0x1(%r10),%r8d + 14000258d: 4f 8d 04 80 lea (%r8,%r8,4),%r8 + 140002591: 4e 8d 54 c2 28 lea 0x28(%rdx,%r8,8),%r10 + 140002596: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 14000259d: 00 00 00 + 1400025a0: 44 8b 4a 0c mov 0xc(%rdx),%r9d + 1400025a4: 4d 89 c8 mov %r9,%r8 + 1400025a7: 4c 39 c8 cmp %r9,%rax + 1400025aa: 72 09 jb 1400025b5 <__mingw_enum_import_library_names+0x85> + 1400025ac: 44 03 42 08 add 0x8(%rdx),%r8d + 1400025b0: 4c 39 c0 cmp %r8,%rax + 1400025b3: 72 13 jb 1400025c8 <__mingw_enum_import_library_names+0x98> + 1400025b5: 48 83 c2 28 add $0x28,%rdx + 1400025b9: 49 39 d2 cmp %rdx,%r10 + 1400025bc: 75 e2 jne 1400025a0 <__mingw_enum_import_library_names+0x70> + 1400025be: 45 31 c9 xor %r9d,%r9d + 1400025c1: 4c 89 c8 mov %r9,%rax + 1400025c4: c3 ret + 1400025c5: 0f 1f 00 nopl (%rax) + 1400025c8: 4c 01 d8 add %r11,%rax + 1400025cb: eb 0a jmp 1400025d7 <__mingw_enum_import_library_names+0xa7> + 1400025cd: 0f 1f 00 nopl (%rax) + 1400025d0: 83 e9 01 sub $0x1,%ecx + 1400025d3: 48 83 c0 14 add $0x14,%rax + 1400025d7: 44 8b 40 04 mov 0x4(%rax),%r8d + 1400025db: 45 85 c0 test %r8d,%r8d + 1400025de: 75 07 jne 1400025e7 <__mingw_enum_import_library_names+0xb7> + 1400025e0: 8b 50 0c mov 0xc(%rax),%edx + 1400025e3: 85 d2 test %edx,%edx + 1400025e5: 74 d7 je 1400025be <__mingw_enum_import_library_names+0x8e> + 1400025e7: 85 c9 test %ecx,%ecx + 1400025e9: 7f e5 jg 1400025d0 <__mingw_enum_import_library_names+0xa0> + 1400025eb: 44 8b 48 0c mov 0xc(%rax),%r9d + 1400025ef: 4d 01 d9 add %r11,%r9 + 1400025f2: 4c 89 c8 mov %r9,%rax + 1400025f5: c3 ret + 1400025f6: 90 nop + 1400025f7: 90 nop + 1400025f8: 90 nop + 1400025f9: 90 nop + 1400025fa: 90 nop + 1400025fb: 90 nop + 1400025fc: 90 nop + 1400025fd: 90 nop + 1400025fe: 90 nop + 1400025ff: 90 nop + +0000000140002600 <___chkstk_ms>: + 140002600: 51 push %rcx + 140002601: 50 push %rax + 140002602: 48 3d 00 10 00 00 cmp $0x1000,%rax + 140002608: 48 8d 4c 24 18 lea 0x18(%rsp),%rcx + 14000260d: 72 19 jb 140002628 <___chkstk_ms+0x28> + 14000260f: 48 81 e9 00 10 00 00 sub $0x1000,%rcx + 140002616: 48 83 09 00 orq $0x0,(%rcx) + 14000261a: 48 2d 00 10 00 00 sub $0x1000,%rax + 140002620: 48 3d 00 10 00 00 cmp $0x1000,%rax + 140002626: 77 e7 ja 14000260f <___chkstk_ms+0xf> + 140002628: 48 29 c1 sub %rax,%rcx + 14000262b: 48 83 09 00 orq $0x0,(%rcx) + 14000262f: 58 pop %rax + 140002630: 59 pop %rcx + 140002631: c3 ret + 140002632: 90 nop + 140002633: 90 nop + 140002634: 90 nop + 140002635: 90 nop + 140002636: 90 nop + 140002637: 90 nop + 140002638: 90 nop + 140002639: 90 nop + 14000263a: 90 nop + 14000263b: 90 nop + 14000263c: 90 nop + 14000263d: 90 nop + 14000263e: 90 nop + 14000263f: 90 nop + +0000000140002640 : + 140002640: 48 83 ec 38 sub $0x38,%rsp + 140002644: 45 31 c9 xor %r9d,%r9d + 140002647: 4c 89 44 24 20 mov %r8,0x20(%rsp) + 14000264c: 49 89 d0 mov %rdx,%r8 + 14000264f: 48 89 ca mov %rcx,%rdx + 140002652: 31 c9 xor %ecx,%ecx + 140002654: e8 4f 03 00 00 call 1400029a8 <__stdio_common_vfprintf> + 140002659: 48 83 c4 38 add $0x38,%rsp + 14000265d: c3 ret + 14000265e: 90 nop + 14000265f: 90 nop + +0000000140002660 : + 140002660: 56 push %rsi + 140002661: 53 push %rbx + 140002662: 48 83 ec 48 sub $0x48,%rsp + 140002666: 48 89 cb mov %rcx,%rbx + 140002669: 48 8d 74 24 68 lea 0x68(%rsp),%rsi + 14000266e: 31 c9 xor %ecx,%ecx + 140002670: 48 89 54 24 68 mov %rdx,0x68(%rsp) + 140002675: 4c 89 44 24 70 mov %r8,0x70(%rsp) + 14000267a: 4c 89 4c 24 78 mov %r9,0x78(%rsp) + 14000267f: 48 89 74 24 38 mov %rsi,0x38(%rsp) + 140002684: e8 07 03 00 00 call 140002990 <__acrt_iob_func> + 140002689: 48 89 74 24 20 mov %rsi,0x20(%rsp) + 14000268e: 45 31 c9 xor %r9d,%r9d + 140002691: 49 89 d8 mov %rbx,%r8 + 140002694: 48 89 c2 mov %rax,%rdx + 140002697: 31 c9 xor %ecx,%ecx + 140002699: e8 12 03 00 00 call 1400029b0 <__stdio_common_vfscanf> + 14000269e: 48 83 c4 48 add $0x48,%rsp + 1400026a2: 5b pop %rbx + 1400026a3: 5e pop %rsi + 1400026a4: c3 ret + 1400026a5: 90 nop + 1400026a6: 90 nop + 1400026a7: 90 nop + 1400026a8: 90 nop + 1400026a9: 90 nop + 1400026aa: 90 nop + 1400026ab: 90 nop + 1400026ac: 90 nop + 1400026ad: 90 nop + 1400026ae: 90 nop + 1400026af: 90 nop + +00000001400026b0 : + 1400026b0: 56 push %rsi + 1400026b1: 53 push %rbx + 1400026b2: 48 83 ec 48 sub $0x48,%rsp + 1400026b6: 48 89 cb mov %rcx,%rbx + 1400026b9: 48 8d 74 24 68 lea 0x68(%rsp),%rsi + 1400026be: b9 01 00 00 00 mov $0x1,%ecx + 1400026c3: 48 89 54 24 68 mov %rdx,0x68(%rsp) + 1400026c8: 4c 89 44 24 70 mov %r8,0x70(%rsp) + 1400026cd: 4c 89 4c 24 78 mov %r9,0x78(%rsp) + 1400026d2: 48 89 74 24 38 mov %rsi,0x38(%rsp) + 1400026d7: e8 b4 02 00 00 call 140002990 <__acrt_iob_func> + 1400026dc: 48 89 74 24 20 mov %rsi,0x20(%rsp) + 1400026e1: 45 31 c9 xor %r9d,%r9d + 1400026e4: 49 89 d8 mov %rbx,%r8 + 1400026e7: 48 89 c2 mov %rax,%rdx + 1400026ea: 31 c9 xor %ecx,%ecx + 1400026ec: e8 b7 02 00 00 call 1400029a8 <__stdio_common_vfprintf> + 1400026f1: 48 83 c4 48 add $0x48,%rsp + 1400026f5: 5b pop %rbx + 1400026f6: 5e pop %rsi + 1400026f7: c3 ret + 1400026f8: 90 nop + 1400026f9: 90 nop + 1400026fa: 90 nop + 1400026fb: 90 nop + 1400026fc: 90 nop + 1400026fd: 90 nop + 1400026fe: 90 nop + 1400026ff: 90 nop + +0000000140002700 : + 140002700: 48 83 ec 48 sub $0x48,%rsp + 140002704: 48 8d 44 24 60 lea 0x60(%rsp),%rax + 140002709: 4c 89 44 24 60 mov %r8,0x60(%rsp) + 14000270e: 49 89 d0 mov %rdx,%r8 + 140002711: 48 89 ca mov %rcx,%rdx + 140002714: 48 89 44 24 20 mov %rax,0x20(%rsp) + 140002719: 31 c9 xor %ecx,%ecx + 14000271b: 4c 89 4c 24 68 mov %r9,0x68(%rsp) + 140002720: 45 31 c9 xor %r9d,%r9d + 140002723: 48 89 44 24 38 mov %rax,0x38(%rsp) + 140002728: e8 7b 02 00 00 call 1400029a8 <__stdio_common_vfprintf> + 14000272d: 48 83 c4 48 add $0x48,%rsp + 140002731: c3 ret + 140002732: 90 nop + 140002733: 90 nop + 140002734: 90 nop + 140002735: 90 nop + 140002736: 90 nop + 140002737: 90 nop + 140002738: 90 nop + 140002739: 90 nop + 14000273a: 90 nop + 14000273b: 90 nop + 14000273c: 90 nop + 14000273d: 90 nop + 14000273e: 90 nop + 14000273f: 90 nop + +0000000140002740 <_get_output_format>: + 140002740: 31 c0 xor %eax,%eax + 140002742: c3 ret + 140002743: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 14000274a: 00 00 00 00 + 14000274e: 66 90 xchg %ax,%ax + +0000000140002750 <__getmainargs>: + 140002750: 41 54 push %r12 + 140002752: 55 push %rbp + 140002753: 57 push %rdi + 140002754: 56 push %rsi + 140002755: 53 push %rbx + 140002756: 48 83 ec 20 sub $0x20,%rsp + 14000275a: 4c 8b 64 24 70 mov 0x70(%rsp),%r12 + 14000275f: 44 89 cd mov %r9d,%ebp + 140002762: 48 89 d6 mov %rdx,%rsi + 140002765: 4c 89 c3 mov %r8,%rbx + 140002768: 48 89 cf mov %rcx,%rdi + 14000276b: e8 a8 02 00 00 call 140002a18 <_initialize_narrow_environment> + 140002770: 83 fd 01 cmp $0x1,%ebp + 140002773: b9 01 00 00 00 mov $0x1,%ecx + 140002778: 83 d9 ff sbb $0xffffffff,%ecx + 14000277b: e8 70 02 00 00 call 1400029f0 <_configure_narrow_argv> + 140002780: e8 4b 02 00 00 call 1400029d0 <__p___argc> + 140002785: 8b 00 mov (%rax),%eax + 140002787: 89 07 mov %eax,(%rdi) + 140002789: e8 4a 02 00 00 call 1400029d8 <__p___argv> + 14000278e: 48 8b 00 mov (%rax),%rax + 140002791: 48 89 06 mov %rax,(%rsi) + 140002794: e8 07 03 00 00 call 140002aa0 <__p__environ> + 140002799: 48 8b 00 mov (%rax),%rax + 14000279c: 48 89 03 mov %rax,(%rbx) + 14000279f: 4d 85 e4 test %r12,%r12 + 1400027a2: 74 09 je 1400027ad <__getmainargs+0x5d> + 1400027a4: 41 8b 0c 24 mov (%r12),%ecx + 1400027a8: e8 d3 02 00 00 call 140002a80 <_set_new_mode> + 1400027ad: 31 c0 xor %eax,%eax + 1400027af: 48 83 c4 20 add $0x20,%rsp + 1400027b3: 5b pop %rbx + 1400027b4: 5e pop %rsi + 1400027b5: 5f pop %rdi + 1400027b6: 5d pop %rbp + 1400027b7: 41 5c pop %r12 + 1400027b9: c3 ret + 1400027ba: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + +00000001400027c0 <__wgetmainargs>: + 1400027c0: 41 54 push %r12 + 1400027c2: 55 push %rbp + 1400027c3: 57 push %rdi + 1400027c4: 56 push %rsi + 1400027c5: 53 push %rbx + 1400027c6: 48 83 ec 20 sub $0x20,%rsp + 1400027ca: 4c 8b 64 24 70 mov 0x70(%rsp),%r12 + 1400027cf: 44 89 cd mov %r9d,%ebp + 1400027d2: 48 89 d6 mov %rdx,%rsi + 1400027d5: 4c 89 c3 mov %r8,%rbx + 1400027d8: 48 89 cf mov %rcx,%rdi + 1400027db: e8 40 02 00 00 call 140002a20 <_initialize_wide_environment> + 1400027e0: 83 fd 01 cmp $0x1,%ebp + 1400027e3: b9 01 00 00 00 mov $0x1,%ecx + 1400027e8: 83 d9 ff sbb $0xffffffff,%ecx + 1400027eb: e8 08 02 00 00 call 1400029f8 <_configure_wide_argv> + 1400027f0: e8 db 01 00 00 call 1400029d0 <__p___argc> + 1400027f5: 8b 00 mov (%rax),%eax + 1400027f7: 89 07 mov %eax,(%rdi) + 1400027f9: e8 e2 01 00 00 call 1400029e0 <__p___wargv> + 1400027fe: 48 8b 00 mov (%rax),%rax + 140002801: 48 89 06 mov %rax,(%rsi) + 140002804: e8 9f 02 00 00 call 140002aa8 <__p__wenviron> + 140002809: 48 8b 00 mov (%rax),%rax + 14000280c: 48 89 03 mov %rax,(%rbx) + 14000280f: 4d 85 e4 test %r12,%r12 + 140002812: 74 09 je 14000281d <__wgetmainargs+0x5d> + 140002814: 41 8b 0c 24 mov (%r12),%ecx + 140002818: e8 63 02 00 00 call 140002a80 <_set_new_mode> + 14000281d: 31 c0 xor %eax,%eax + 14000281f: 48 83 c4 20 add $0x20,%rsp + 140002823: 5b pop %rbx + 140002824: 5e pop %rsi + 140002825: 5f pop %rdi + 140002826: 5d pop %rbp + 140002827: 41 5c pop %r12 + 140002829: c3 ret + 14000282a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) + +0000000140002830 <_onexit>: + 140002830: 53 push %rbx + 140002831: 48 83 ec 20 sub $0x20,%rsp + 140002835: 48 89 cb mov %rcx,%rbx + 140002838: e8 cb 01 00 00 call 140002a08 <_crt_atexit> + 14000283d: 85 c0 test %eax,%eax + 14000283f: b8 00 00 00 00 mov $0x0,%eax + 140002844: 48 0f 44 c3 cmove %rbx,%rax + 140002848: 48 83 c4 20 add $0x20,%rsp + 14000284c: 5b pop %rbx + 14000284d: c3 ret + 14000284e: 66 90 xchg %ax,%ax + +0000000140002850 : + 140002850: 48 8b 05 09 1c 00 00 mov 0x1c09(%rip),%rax # 140004460 <.refptr.__mingw_module_is_dll> + 140002857: 80 38 00 cmpb $0x0,(%rax) + 14000285a: 74 04 je 140002860 + 14000285c: 31 c0 xor %eax,%eax + 14000285e: c3 ret + 14000285f: 90 nop + 140002860: e9 9b 01 00 00 jmp 140002a00 <_crt_at_quick_exit> + 140002865: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 14000286c: 00 00 00 00 + +0000000140002870 <_amsg_exit>: + 140002870: 53 push %rbx + 140002871: 48 83 ec 20 sub $0x20,%rsp + 140002875: 89 cb mov %ecx,%ebx + 140002877: b9 02 00 00 00 mov $0x2,%ecx + 14000287c: e8 0f 01 00 00 call 140002990 <__acrt_iob_func> + 140002881: 41 89 d8 mov %ebx,%r8d + 140002884: 48 8d 15 e5 1a 00 00 lea 0x1ae5(%rip),%rdx # 140004370 <.rdata> + 14000288b: 48 89 c1 mov %rax,%rcx + 14000288e: e8 6d fe ff ff call 140002700 + 140002893: b9 ff 00 00 00 mov $0xff,%ecx + 140002898: e8 73 01 00 00 call 140002a10 <_exit> + 14000289d: 90 nop + 14000289e: 66 90 xchg %ax,%ax + +00000001400028a0 <__ms_fwprintf>: + 1400028a0: 48 83 ec 48 sub $0x48,%rsp + 1400028a4: 48 8d 44 24 60 lea 0x60(%rsp),%rax + 1400028a9: 4c 89 44 24 60 mov %r8,0x60(%rsp) + 1400028ae: 49 89 d0 mov %rdx,%r8 + 1400028b1: 48 89 ca mov %rcx,%rdx + 1400028b4: 48 89 44 24 20 mov %rax,0x20(%rsp) + 1400028b9: b9 04 00 00 00 mov $0x4,%ecx + 1400028be: 4c 89 4c 24 68 mov %r9,0x68(%rsp) + 1400028c3: 45 31 c9 xor %r9d,%r9d + 1400028c6: 48 89 44 24 38 mov %rax,0x38(%rsp) + 1400028cb: e8 e8 00 00 00 call 1400029b8 <__stdio_common_vfwprintf> + 1400028d0: 48 83 c4 48 add $0x48,%rsp + 1400028d4: c3 ret + 1400028d5: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) + 1400028dc: 00 00 00 00 + +00000001400028e0 : + 1400028e0: 48 83 ec 28 sub $0x28,%rsp + 1400028e4: 48 8b 05 25 1b 00 00 mov 0x1b25(%rip),%rax # 140004410 <.refptr.__imp__tzset> + 1400028eb: ff 10 call *(%rax) + 1400028ed: e8 7e 00 00 00 call 140002970 <__tzname> + 1400028f2: 48 89 05 e7 07 00 00 mov %rax,0x7e7(%rip) # 1400030e0 <__imp_tzname> + 1400028f9: e8 6a 00 00 00 call 140002968 <__timezone> + 1400028fe: 48 89 05 d3 07 00 00 mov %rax,0x7d3(%rip) # 1400030d8 <__imp_timezone> + 140002905: e8 56 00 00 00 call 140002960 <__daylight> + 14000290a: 48 89 05 bf 07 00 00 mov %rax,0x7bf(%rip) # 1400030d0 <__imp_daylight> + 140002911: 48 83 c4 28 add $0x28,%rsp + 140002915: c3 ret + 140002916: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) + 14000291d: 00 00 00 + +0000000140002920 <_tzset>: + 140002920: 48 83 ec 28 sub $0x28,%rsp + 140002924: 48 8b 05 e5 1a 00 00 mov 0x1ae5(%rip),%rax # 140004410 <.refptr.__imp__tzset> + 14000292b: ff 10 call *(%rax) + 14000292d: e8 3e 00 00 00 call 140002970 <__tzname> + 140002932: 48 89 05 a7 07 00 00 mov %rax,0x7a7(%rip) # 1400030e0 <__imp_tzname> + 140002939: e8 2a 00 00 00 call 140002968 <__timezone> + 14000293e: 48 89 05 93 07 00 00 mov %rax,0x793(%rip) # 1400030d8 <__imp_timezone> + 140002945: e8 16 00 00 00 call 140002960 <__daylight> + 14000294a: 48 89 05 7f 07 00 00 mov %rax,0x77f(%rip) # 1400030d0 <__imp_daylight> + 140002951: 48 83 c4 28 add $0x28,%rsp + 140002955: c3 ret + 140002956: 90 nop + 140002957: 90 nop + 140002958: 90 nop + 140002959: 90 nop + 14000295a: 90 nop + 14000295b: 90 nop + 14000295c: 90 nop + 14000295d: 90 nop + 14000295e: 90 nop + 14000295f: 90 nop + +0000000140002960 <__daylight>: + 140002960: ff 25 ea 5a 00 00 jmp *0x5aea(%rip) # 140008450 <__imp___daylight> + 140002966: 90 nop + 140002967: 90 nop + +0000000140002968 <__timezone>: + 140002968: ff 25 ea 5a 00 00 jmp *0x5aea(%rip) # 140008458 <__imp___timezone> + 14000296e: 90 nop + 14000296f: 90 nop + +0000000140002970 <__tzname>: + 140002970: ff 25 ea 5a 00 00 jmp *0x5aea(%rip) # 140008460 <__imp___tzname> + 140002976: 90 nop + 140002977: 90 nop + +0000000140002978 <.text>: + 140002978: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) + 14000297f: 00 + +0000000140002980 : + 140002980: ff 25 b2 5a 00 00 jmp *0x5ab2(%rip) # 140008438 <__imp_strlen> + 140002986: 90 nop + 140002987: 90 nop + +0000000140002988 : + 140002988: ff 25 b2 5a 00 00 jmp *0x5ab2(%rip) # 140008440 <__imp_strncmp> + 14000298e: 90 nop + 14000298f: 90 nop + +0000000140002990 <__acrt_iob_func>: + 140002990: ff 25 5a 5a 00 00 jmp *0x5a5a(%rip) # 1400083f0 <__imp___acrt_iob_func> + 140002996: 90 nop + 140002997: 90 nop + +0000000140002998 <__p__commode>: + 140002998: ff 25 5a 5a 00 00 jmp *0x5a5a(%rip) # 1400083f8 <__imp___p__commode> + 14000299e: 90 nop + 14000299f: 90 nop + +00000001400029a0 <__p__fmode>: + 1400029a0: ff 25 5a 5a 00 00 jmp *0x5a5a(%rip) # 140008400 <__imp___p__fmode> + 1400029a6: 90 nop + 1400029a7: 90 nop + +00000001400029a8 <__stdio_common_vfprintf>: + 1400029a8: ff 25 5a 5a 00 00 jmp *0x5a5a(%rip) # 140008408 <__imp___stdio_common_vfprintf> + 1400029ae: 90 nop + 1400029af: 90 nop + +00000001400029b0 <__stdio_common_vfscanf>: + 1400029b0: ff 25 5a 5a 00 00 jmp *0x5a5a(%rip) # 140008410 <__imp___stdio_common_vfscanf> + 1400029b6: 90 nop + 1400029b7: 90 nop + +00000001400029b8 <__stdio_common_vfwprintf>: + 1400029b8: ff 25 5a 5a 00 00 jmp *0x5a5a(%rip) # 140008418 <__imp___stdio_common_vfwprintf> + 1400029be: 90 nop + 1400029bf: 90 nop + +00000001400029c0 : + 1400029c0: ff 25 5a 5a 00 00 jmp *0x5a5a(%rip) # 140008420 <__imp_fwrite> + 1400029c6: 90 nop + 1400029c7: 90 nop + +00000001400029c8 : + 1400029c8: ff 25 5a 5a 00 00 jmp *0x5a5a(%rip) # 140008428 <__imp_puts> + 1400029ce: 90 nop + 1400029cf: 90 nop + +00000001400029d0 <__p___argc>: + 1400029d0: ff 25 8a 59 00 00 jmp *0x598a(%rip) # 140008360 <__imp___p___argc> + 1400029d6: 90 nop + 1400029d7: 90 nop + +00000001400029d8 <__p___argv>: + 1400029d8: ff 25 8a 59 00 00 jmp *0x598a(%rip) # 140008368 <__imp___p___argv> + 1400029de: 90 nop + 1400029df: 90 nop + +00000001400029e0 <__p___wargv>: + 1400029e0: ff 25 8a 59 00 00 jmp *0x598a(%rip) # 140008370 <__imp___p___wargv> + 1400029e6: 90 nop + 1400029e7: 90 nop + +00000001400029e8 <_cexit>: + 1400029e8: ff 25 8a 59 00 00 jmp *0x598a(%rip) # 140008378 <__imp__cexit> + 1400029ee: 90 nop + 1400029ef: 90 nop + +00000001400029f0 <_configure_narrow_argv>: + 1400029f0: ff 25 8a 59 00 00 jmp *0x598a(%rip) # 140008380 <__imp__configure_narrow_argv> + 1400029f6: 90 nop + 1400029f7: 90 nop + +00000001400029f8 <_configure_wide_argv>: + 1400029f8: ff 25 8a 59 00 00 jmp *0x598a(%rip) # 140008388 <__imp__configure_wide_argv> + 1400029fe: 90 nop + 1400029ff: 90 nop + +0000000140002a00 <_crt_at_quick_exit>: + 140002a00: ff 25 8a 59 00 00 jmp *0x598a(%rip) # 140008390 <__imp__crt_at_quick_exit> + 140002a06: 90 nop + 140002a07: 90 nop + +0000000140002a08 <_crt_atexit>: + 140002a08: ff 25 8a 59 00 00 jmp *0x598a(%rip) # 140008398 <__imp__crt_atexit> + 140002a0e: 90 nop + 140002a0f: 90 nop + +0000000140002a10 <_exit>: + 140002a10: ff 25 8a 59 00 00 jmp *0x598a(%rip) # 1400083a0 <__imp__exit> + 140002a16: 90 nop + 140002a17: 90 nop + +0000000140002a18 <_initialize_narrow_environment>: + 140002a18: ff 25 8a 59 00 00 jmp *0x598a(%rip) # 1400083a8 <__imp__initialize_narrow_environment> + 140002a1e: 90 nop + 140002a1f: 90 nop + +0000000140002a20 <_initialize_wide_environment>: + 140002a20: ff 25 8a 59 00 00 jmp *0x598a(%rip) # 1400083b0 <__imp__initialize_wide_environment> + 140002a26: 90 nop + 140002a27: 90 nop + +0000000140002a28 <_initterm>: + 140002a28: ff 25 8a 59 00 00 jmp *0x598a(%rip) # 1400083b8 <__imp__initterm> + 140002a2e: 90 nop + 140002a2f: 90 nop + +0000000140002a30 <__set_app_type>: + 140002a30: ff 25 8a 59 00 00 jmp *0x598a(%rip) # 1400083c0 <__imp___set_app_type> + 140002a36: 90 nop + 140002a37: 90 nop + +0000000140002a38 <_set_invalid_parameter_handler>: + 140002a38: ff 25 8a 59 00 00 jmp *0x598a(%rip) # 1400083c8 <__imp__set_invalid_parameter_handler> + 140002a3e: 90 nop + 140002a3f: 90 nop + +0000000140002a40 : + 140002a40: ff 25 8a 59 00 00 jmp *0x598a(%rip) # 1400083d0 <__imp_abort> + 140002a46: 90 nop + 140002a47: 90 nop + +0000000140002a48 : + 140002a48: ff 25 8a 59 00 00 jmp *0x598a(%rip) # 1400083d8 <__imp_exit> + 140002a4e: 90 nop + 140002a4f: 90 nop + +0000000140002a50 : + 140002a50: ff 25 8a 59 00 00 jmp *0x598a(%rip) # 1400083e0 <__imp_signal> + 140002a56: 90 nop + 140002a57: 90 nop + 140002a58: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) + 140002a5f: 00 + +0000000140002a60 <__C_specific_handler>: + 140002a60: ff 25 e2 58 00 00 jmp *0x58e2(%rip) # 140008348 <__imp___C_specific_handler> + 140002a66: 90 nop + 140002a67: 90 nop + +0000000140002a68 : + 140002a68: ff 25 e2 58 00 00 jmp *0x58e2(%rip) # 140008350 <__imp_memcpy> + 140002a6e: 90 nop + 140002a6f: 90 nop + +0000000140002a70 <__setusermatherr>: + 140002a70: ff 25 c2 58 00 00 jmp *0x58c2(%rip) # 140008338 <__imp___setusermatherr> + 140002a76: 90 nop + 140002a77: 90 nop + 140002a78: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) + 140002a7f: 00 + +0000000140002a80 <_set_new_mode>: + 140002a80: ff 25 8a 58 00 00 jmp *0x588a(%rip) # 140008310 <__imp__set_new_mode> + 140002a86: 90 nop + 140002a87: 90 nop + +0000000140002a88 : + 140002a88: ff 25 8a 58 00 00 jmp *0x588a(%rip) # 140008318 <__imp_calloc> + 140002a8e: 90 nop + 140002a8f: 90 nop + +0000000140002a90 : + 140002a90: ff 25 8a 58 00 00 jmp *0x588a(%rip) # 140008320 <__imp_free> + 140002a96: 90 nop + 140002a97: 90 nop + +0000000140002a98 : + 140002a98: ff 25 8a 58 00 00 jmp *0x588a(%rip) # 140008328 <__imp_malloc> + 140002a9e: 90 nop + 140002a9f: 90 nop + +0000000140002aa0 <__p__environ>: + 140002aa0: ff 25 52 58 00 00 jmp *0x5852(%rip) # 1400082f8 <__imp___p__environ> + 140002aa6: 90 nop + 140002aa7: 90 nop + +0000000140002aa8 <__p__wenviron>: + 140002aa8: ff 25 52 58 00 00 jmp *0x5852(%rip) # 140008300 <__imp___p__wenviron> + 140002aae: 90 nop + 140002aaf: 90 nop + +0000000140002ab0 : + 140002ab0: ff 25 32 58 00 00 jmp *0x5832(%rip) # 1400082e8 <__imp_VirtualQuery> + 140002ab6: 90 nop + 140002ab7: 90 nop + +0000000140002ab8 : + 140002ab8: ff 25 22 58 00 00 jmp *0x5822(%rip) # 1400082e0 <__imp_VirtualProtect> + 140002abe: 90 nop + 140002abf: 90 nop + +0000000140002ac0 : + 140002ac0: ff 25 12 58 00 00 jmp *0x5812(%rip) # 1400082d8 <__imp_TlsGetValue> + 140002ac6: 90 nop + 140002ac7: 90 nop + +0000000140002ac8 : + 140002ac8: ff 25 02 58 00 00 jmp *0x5802(%rip) # 1400082d0 <__imp_Sleep> + 140002ace: 90 nop + 140002acf: 90 nop + +0000000140002ad0 : + 140002ad0: ff 25 f2 57 00 00 jmp *0x57f2(%rip) # 1400082c8 <__imp_SetUnhandledExceptionFilter> + 140002ad6: 90 nop + 140002ad7: 90 nop + +0000000140002ad8 : + 140002ad8: ff 25 e2 57 00 00 jmp *0x57e2(%rip) # 1400082c0 <__imp_LeaveCriticalSection> + 140002ade: 90 nop + 140002adf: 90 nop + +0000000140002ae0 : + 140002ae0: ff 25 d2 57 00 00 jmp *0x57d2(%rip) # 1400082b8 <__imp_InitializeCriticalSection> + 140002ae6: 90 nop + 140002ae7: 90 nop + +0000000140002ae8 : + 140002ae8: ff 25 c2 57 00 00 jmp *0x57c2(%rip) # 1400082b0 <__imp_GetLastError> + 140002aee: 90 nop + 140002aef: 90 nop + +0000000140002af0 : + 140002af0: ff 25 b2 57 00 00 jmp *0x57b2(%rip) # 1400082a8 <__imp_EnterCriticalSection> + 140002af6: 90 nop + 140002af7: 90 nop + +0000000140002af8 : + 140002af8: ff 25 a2 57 00 00 jmp *0x57a2(%rip) # 1400082a0 <__IAT_start__> + 140002afe: 90 nop + 140002aff: 90 nop + +0000000140002b00 : + 140002b00: e9 2b e9 ff ff jmp 140001430 <__gcc_register_frame> + 140002b05: 90 nop + 140002b06: 90 nop + 140002b07: 90 nop + 140002b08: 90 nop + 140002b09: 90 nop + 140002b0a: 90 nop + 140002b0b: 90 nop + 140002b0c: 90 nop + 140002b0d: 90 nop + 140002b0e: 90 nop + 140002b0f: 90 nop + +0000000140002b10 <__CTOR_LIST__>: + 140002b10: ff (bad) + 140002b11: ff (bad) + 140002b12: ff (bad) + 140002b13: ff (bad) + 140002b14: ff (bad) + 140002b15: ff (bad) + 140002b16: ff (bad) + 140002b17: ff .byte 0xff + +0000000140002b18 <.ctors.65535>: + 140002b18: 00 2b add %ch,(%rbx) + 140002b1a: 00 40 01 add %al,0x1(%rax) + ... + +0000000140002b28 <__DTOR_LIST__>: + 140002b28: ff (bad) + 140002b29: ff (bad) + 140002b2a: ff (bad) + 140002b2b: ff (bad) + 140002b2c: ff (bad) + 140002b2d: ff (bad) + 140002b2e: ff (bad) + 140002b2f: ff 00 incl (%rax) + 140002b31: 00 00 add %al,(%rax) + 140002b33: 00 00 add %al,(%rax) + 140002b35: 00 00 add %al,(%rax) + ... diff --git a/Lect6/76-79/crack/73-74.exe b/Lect6/76-79/crack/73-74.exe new file mode 100644 index 0000000..87b2fc9 Binary files /dev/null and b/Lect6/76-79/crack/73-74.exe differ diff --git a/Lect6/76-79/crack/76.bat b/Lect6/76-79/crack/76.bat new file mode 100644 index 0000000..34f03c2 --- /dev/null +++ b/Lect6/76-79/crack/76.bat @@ -0,0 +1 @@ +objdump -d 73-74.exe > 61.s \ No newline at end of file diff --git a/Lect6/76-79/gmon.out b/Lect6/76-79/gmon.out new file mode 100644 index 0000000..9e26816 Binary files /dev/null and b/Lect6/76-79/gmon.out differ diff --git a/Lect6/gmon.out b/Lect6/gmon.out new file mode 100644 index 0000000..b753a31 Binary files /dev/null and b/Lect6/gmon.out differ diff --git a/Lect6/main.asm b/Lect6/main.asm new file mode 100644 index 0000000..61ccfdf --- /dev/null +++ b/Lect6/main.asm @@ -0,0 +1,88 @@ + +main.o: file format pe-x86-64 + + +Disassembly of section .text: + +0000000000000000
: + 0: 55 push %rbp + 1: 48 89 e5 mov %rsp,%rbp + 4: 48 83 ec 20 sub $0x20,%rsp + 8: e8 00 00 00 00 call d + d: 48 8d 05 00 00 00 00 lea 0x0(%rip),%rax # 14 + 14: 48 89 c1 mov %rax,%rcx + 17: e8 00 00 00 00 call 1c + 1c: b8 00 00 00 00 mov $0x0,%eax + 21: 48 83 c4 20 add $0x20,%rsp + 25: 5d pop %rbp + 26: c3 ret + 27: 90 nop + 28: 90 nop + 29: 90 nop + 2a: 90 nop + 2b: 90 nop + 2c: 90 nop + 2d: 90 nop + 2e: 90 nop + 2f: 90 nop + +Disassembly of section .rdata: + +0000000000000000 <.rdata>: + 0: 48 rex.W + 1: 65 6c gs insb (%dx),%es:(%rdi) + 3: 6c insb (%dx),%es:(%rdi) + 4: 6f outsl %ds:(%rsi),(%dx) + 5: 20 77 6f and %dh,0x6f(%rdi) + 8: 72 6c jb 76 <.rdata+0x76> + a: 64 21 00 and %eax,%fs:(%rax) + d: 00 00 add %al,(%rax) + ... + +Disassembly of section .xdata: + +0000000000000000 <.xdata>: + 0: 01 08 add %ecx,(%rax) + 2: 03 05 08 32 04 03 add 0x3043208(%rip),%eax # 3043210 <.xdata+0x3043210> + 8: 01 50 00 add %edx,0x0(%rax) + ... + +Disassembly of section .pdata: + +0000000000000000 <.pdata>: + 0: 00 00 add %al,(%rax) + 2: 00 00 add %al,(%rax) + 4: 27 (bad) + 5: 00 00 add %al,(%rax) + 7: 00 00 add %al,(%rax) + 9: 00 00 add %al,(%rax) + ... + +Disassembly of section .rdata$zzz: + +0000000000000000 <.rdata$zzz>: + 0: 47 rex.RXB + 1: 43 rex.XB + 2: 43 3a 20 rex.XB cmp (%r8),%spl + 5: 28 52 65 sub %dl,0x65(%rdx) + 8: 76 32 jbe 3c <.rdata$zzz+0x3c> + a: 2c 20 sub $0x20,%al + c: 42 75 69 rex.X jne 78 <.rdata$zzz+0x78> + f: 6c insb (%dx),%es:(%rdi) + 10: 74 20 je 32 <.rdata$zzz+0x32> + 12: 62 (bad) + 13: 79 20 jns 35 <.rdata$zzz+0x35> + 15: 4d 53 rex.WRB push %r11 + 17: 59 pop %rcx + 18: 53 push %rbx + 19: 32 20 xor (%rax),%ah + 1b: 70 72 jo 8f <.rdata$zzz+0x8f> + 1d: 6f outsl %ds:(%rsi),(%dx) + 1e: 6a 65 push $0x65 + 20: 63 74 29 20 movsxd 0x20(%rcx,%rbp,1),%esi + 24: 31 33 xor %esi,(%rbx) + 26: 2e 32 2e cs xor (%rsi),%ch + 29: 30 00 xor %al,(%rax) + 2b: 00 00 add %al,(%rax) + 2d: 00 00 add %al,(%rax) + ... diff --git a/Lect6/main.c b/Lect6/main.c new file mode 100644 index 0000000..f4e548f --- /dev/null +++ b/Lect6/main.c @@ -0,0 +1,8 @@ +#include +#define HELLO_STR "Hello world!\n" +//первая программа +int main (void) +{ + printf(HELLO_STR ); + return 0; +} diff --git a/Lect6/main.i b/Lect6/main.i new file mode 100644 index 0000000..5673172 --- /dev/null +++ b/Lect6/main.i @@ -0,0 +1,1602 @@ +# 0 "main.c" +# 0 "" +# 0 "" +# 1 "main.c" +# 1 "D:/msys64/ucrt64/include/stdio.h" 1 3 +# 9 "D:/msys64/ucrt64/include/stdio.h" 3 +# 1 "D:/msys64/ucrt64/include/corecrt_stdio_config.h" 1 3 +# 10 "D:/msys64/ucrt64/include/corecrt_stdio_config.h" 3 +# 1 "D:/msys64/ucrt64/include/corecrt.h" 1 3 +# 10 "D:/msys64/ucrt64/include/corecrt.h" 3 +# 1 "D:/msys64/ucrt64/include/_mingw.h" 1 3 +# 10 "D:/msys64/ucrt64/include/_mingw.h" 3 +# 1 "D:/msys64/ucrt64/include/_mingw_mac.h" 1 3 +# 98 "D:/msys64/ucrt64/include/_mingw_mac.h" 3 + +# 107 "D:/msys64/ucrt64/include/_mingw_mac.h" 3 + +# 306 "D:/msys64/ucrt64/include/_mingw_mac.h" 3 + +# 384 "D:/msys64/ucrt64/include/_mingw_mac.h" 3 + +# 11 "D:/msys64/ucrt64/include/_mingw.h" 2 3 +# 1 "D:/msys64/ucrt64/include/_mingw_secapi.h" 1 3 +# 12 "D:/msys64/ucrt64/include/_mingw.h" 2 3 +# 282 "D:/msys64/ucrt64/include/_mingw.h" 3 +# 1 "D:/msys64/ucrt64/include/vadefs.h" 1 3 +# 9 "D:/msys64/ucrt64/include/vadefs.h" 3 +# 1 "D:/msys64/ucrt64/include/_mingw.h" 1 3 +# 661 "D:/msys64/ucrt64/include/_mingw.h" 3 +# 1 "D:/msys64/ucrt64/include/sdks/_mingw_ddk.h" 1 3 +# 662 "D:/msys64/ucrt64/include/_mingw.h" 2 3 +# 10 "D:/msys64/ucrt64/include/vadefs.h" 2 3 + + + + +#pragma pack(push,_CRT_PACKING) +# 24 "D:/msys64/ucrt64/include/vadefs.h" 3 + +# 24 "D:/msys64/ucrt64/include/vadefs.h" 3 + typedef __builtin_va_list __gnuc_va_list; + + + + + + + typedef __gnuc_va_list va_list; +# 103 "D:/msys64/ucrt64/include/vadefs.h" 3 +#pragma pack(pop) +# 283 "D:/msys64/ucrt64/include/_mingw.h" 2 3 +# 580 "D:/msys64/ucrt64/include/_mingw.h" 3 +void __attribute__((__cdecl__)) __debugbreak(void); +extern __inline__ __attribute__((__always_inline__,__gnu_inline__)) void __attribute__((__cdecl__)) __debugbreak(void) +{ + + __asm__ __volatile__("int {$}3":); + + + + + + + +} +# 601 "D:/msys64/ucrt64/include/_mingw.h" 3 +void __attribute__((__cdecl__)) __attribute__ ((__noreturn__)) __fastfail(unsigned int code); +extern __inline__ __attribute__((__always_inline__,__gnu_inline__)) void __attribute__((__cdecl__)) __attribute__ ((__noreturn__)) __fastfail(unsigned int code) +{ + + __asm__ __volatile__("int {$}0x29"::"c"(code)); +# 615 "D:/msys64/ucrt64/include/_mingw.h" 3 + __builtin_unreachable(); +} +# 641 "D:/msys64/ucrt64/include/_mingw.h" 3 +const char *__mingw_get_crt_info (void); +# 11 "D:/msys64/ucrt64/include/corecrt.h" 2 3 + + + + +#pragma pack(push,_CRT_PACKING) +# 35 "D:/msys64/ucrt64/include/corecrt.h" 3 +__extension__ typedef unsigned long long size_t; +# 45 "D:/msys64/ucrt64/include/corecrt.h" 3 +__extension__ typedef long long ssize_t; + + + + + + +typedef size_t rsize_t; +# 62 "D:/msys64/ucrt64/include/corecrt.h" 3 +__extension__ typedef long long intptr_t; +# 75 "D:/msys64/ucrt64/include/corecrt.h" 3 +__extension__ typedef unsigned long long uintptr_t; +# 88 "D:/msys64/ucrt64/include/corecrt.h" 3 +__extension__ typedef long long ptrdiff_t; +# 98 "D:/msys64/ucrt64/include/corecrt.h" 3 +typedef unsigned short wchar_t; + + + + + + + +typedef unsigned short wint_t; +typedef unsigned short wctype_t; + + + + + +typedef int errno_t; + + + + +typedef long __time32_t; + + + + +__extension__ typedef long long __time64_t; +# 138 "D:/msys64/ucrt64/include/corecrt.h" 3 +typedef __time64_t time_t; +# 430 "D:/msys64/ucrt64/include/corecrt.h" 3 +struct threadlocaleinfostruct; +struct threadmbcinfostruct; +typedef struct threadlocaleinfostruct *pthreadlocinfo; +typedef struct threadmbcinfostruct *pthreadmbcinfo; +struct __lc_time_data; + +typedef struct localeinfo_struct { + pthreadlocinfo locinfo; + pthreadmbcinfo mbcinfo; +} _locale_tstruct,*_locale_t; + + + +typedef struct tagLC_ID { + unsigned short wLanguage; + unsigned short wCountry; + unsigned short wCodePage; +} LC_ID,*LPLC_ID; + + + + +typedef struct threadlocaleinfostruct { + + const unsigned short *_locale_pctype; + int _locale_mb_cur_max; + unsigned int _locale_lc_codepage; +# 482 "D:/msys64/ucrt64/include/corecrt.h" 3 +} threadlocinfo; +# 501 "D:/msys64/ucrt64/include/corecrt.h" 3 +#pragma pack(pop) +# 11 "D:/msys64/ucrt64/include/corecrt_stdio_config.h" 2 3 +# 10 "D:/msys64/ucrt64/include/stdio.h" 2 3 + +#pragma pack(push,_CRT_PACKING) + + + + + + + + +# 33 "D:/msys64/ucrt64/include/stdio.h" 3 + struct _iobuf { + + void *_Placeholder; +# 46 "D:/msys64/ucrt64/include/stdio.h" 3 + }; + typedef struct _iobuf FILE; +# 99 "D:/msys64/ucrt64/include/stdio.h" 3 +# 1 "D:/msys64/ucrt64/include/_mingw_off_t.h" 1 3 + + + + + typedef long _off_t; + + typedef long off32_t; + + + + + + __extension__ typedef long long _off64_t; + + __extension__ typedef long long off64_t; +# 26 "D:/msys64/ucrt64/include/_mingw_off_t.h" 3 +typedef off32_t off_t; +# 100 "D:/msys64/ucrt64/include/stdio.h" 2 3 + +__attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) __acrt_iob_func(unsigned index); + + + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) __iob_func(void); +# 123 "D:/msys64/ucrt64/include/stdio.h" 3 + __extension__ typedef long long fpos_t; +# 167 "D:/msys64/ucrt64/include/stdio.h" 3 +extern + __attribute__((__format__ (gnu_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_sscanf(const char * __restrict__ _Src,const char * __restrict__ _Format,...); +extern + __attribute__((__format__ (gnu_scanf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vsscanf (const char * __restrict__ _Str,const char * __restrict__ Format,va_list argp); +extern + __attribute__((__format__ (gnu_scanf, 1, 2))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_scanf(const char * __restrict__ _Format,...); +extern + __attribute__((__format__ (gnu_scanf, 1, 0))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_vscanf(const char * __restrict__ Format, va_list argp); +extern + __attribute__((__format__ (gnu_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_fscanf(FILE * __restrict__ _File,const char * __restrict__ _Format,...); +extern + __attribute__((__format__ (gnu_scanf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vfscanf (FILE * __restrict__ fp, const char * __restrict__ Format,va_list argp); + +extern + __attribute__((__format__ (gnu_printf, 3, 0))) __attribute__ ((__nonnull__ (3))) + int __attribute__((__cdecl__)) __mingw_vsnprintf(char * __restrict__ _DstBuf,size_t _MaxCount,const char * __restrict__ _Format, + va_list _ArgList); +extern + __attribute__((__format__ (gnu_printf, 3, 4))) __attribute__ ((__nonnull__ (3))) + int __attribute__((__cdecl__)) __mingw_snprintf(char * __restrict__ s, size_t n, const char * __restrict__ format, ...); +extern + __attribute__((__format__ (gnu_printf, 1, 2))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_printf(const char * __restrict__ , ... ) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 1, 0))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_vprintf (const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_fprintf (FILE * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vfprintf (FILE * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_sprintf (char * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vsprintf (char * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 3))) __attribute__((nonnull (1,2))) + int __attribute__((__cdecl__)) __mingw_asprintf(char ** __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 0))) __attribute__((nonnull (1,2))) + int __attribute__((__cdecl__)) __mingw_vasprintf(char ** __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); + +extern + __attribute__((__format__ (ms_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_sscanf(const char * __restrict__ _Src,const char * __restrict__ _Format,...); +extern + __attribute__((__format__ (ms_scanf, 1, 2))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_scanf(const char * __restrict__ _Format,...); +extern + __attribute__((__format__ (ms_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_fscanf(FILE * __restrict__ _File,const char * __restrict__ _Format,...); + +extern + __attribute__((__format__ (ms_printf, 1, 2))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_printf(const char * __restrict__ , ... ) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (ms_printf, 1, 0))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_vprintf (const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (ms_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_fprintf (FILE * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (ms_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_vfprintf (FILE * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (ms_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_sprintf (char * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (ms_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_vsprintf (char * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); + + + int __attribute__((__cdecl__)) __stdio_common_vsprintf(unsigned long long options, char *str, size_t len, const char *format, _locale_t locale, va_list valist); + int __attribute__((__cdecl__)) __stdio_common_vfprintf(unsigned long long options, FILE *file, const char *format, _locale_t locale, va_list valist); + int __attribute__((__cdecl__)) __stdio_common_vsscanf(unsigned long long options, const char *input, size_t length, const char *format, _locale_t locale, va_list valist); + int __attribute__((__cdecl__)) __stdio_common_vfscanf(unsigned long long options, FILE *file, const char *format, _locale_t locale, va_list valist); +# 507 "D:/msys64/ucrt64/include/stdio.h" 3 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" + + __attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) fprintf(FILE * __restrict__ _File,const char * __restrict__ _Format,...); + __attribute__((__format__ (gnu_printf, 1, 2))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) printf(const char * __restrict__ _Format,...); + __attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) sprintf(char * __restrict__ _Dest,const char * __restrict__ _Format,...) ; + + __attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) vfprintf(FILE * __restrict__ _File,const char * __restrict__ _Format,va_list _ArgList); + __attribute__((__format__ (gnu_printf, 1, 0))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) vprintf(const char * __restrict__ _Format,va_list _ArgList); + __attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) vsprintf(char * __restrict__ _Dest,const char * __restrict__ _Format,va_list _Args) ; + + + __attribute__((__format__ (gnu_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) fscanf(FILE * __restrict__ _File,const char * __restrict__ _Format,...); + + __attribute__((__format__ (gnu_scanf, 1, 2))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) scanf(const char * __restrict__ _Format,...); + + __attribute__((__format__ (gnu_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) sscanf(const char * __restrict__ _Src,const char * __restrict__ _Format,...); + + + + + + + + __attribute__((__format__ (gnu_scanf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int vfscanf (FILE *__stream, const char *__format, __builtin_va_list __local_argv); + + __attribute__((__format__ (gnu_scanf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int vsscanf (const char * __restrict__ __source, const char * __restrict__ __format, __builtin_va_list __local_argv); + __attribute__((__format__ (gnu_scanf, 1, 0))) __attribute__ ((__nonnull__ (1))) + int vscanf(const char *__format, __builtin_va_list __local_argv); + + +#pragma GCC diagnostic pop +# 618 "D:/msys64/ucrt64/include/stdio.h" 3 + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _filbuf(FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _flsbuf(int _Ch,FILE *_File); + + + + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _fsopen(const char *_Filename,const char *_Mode,int _ShFlag); + + void __attribute__((__cdecl__)) clearerr(FILE *_File); + int __attribute__((__cdecl__)) fclose(FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fcloseall(void); + + + + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _fdopen(int _FileHandle,const char *_Mode); + + int __attribute__((__cdecl__)) feof(FILE *_File); + int __attribute__((__cdecl__)) ferror(FILE *_File); + int __attribute__((__cdecl__)) fflush(FILE *_File); + int __attribute__((__cdecl__)) fgetc(FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fgetchar(void); + int __attribute__((__cdecl__)) fgetpos(FILE * __restrict__ _File ,fpos_t * __restrict__ _Pos); + int __attribute__((__cdecl__)) fgetpos64(FILE * __restrict__ _File ,fpos_t * __restrict__ _Pos); + char *__attribute__((__cdecl__)) fgets(char * __restrict__ _Buf,int _MaxCount,FILE * __restrict__ _File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fileno(FILE *_File); + + + + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _tempnam(const char *_DirName,const char *_FilePrefix); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _flushall(void); + FILE *__attribute__((__cdecl__)) fopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode) ; + FILE *fopen64(const char * __restrict__ filename,const char * __restrict__ mode); + int __attribute__((__cdecl__)) fputc(int _Ch,FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fputchar(int _Ch); + int __attribute__((__cdecl__)) fputs(const char * __restrict__ _Str,FILE * __restrict__ _File); + size_t __attribute__((__cdecl__)) fread(void * __restrict__ _DstBuf,size_t _ElementSize,size_t _Count,FILE * __restrict__ _File); + FILE *__attribute__((__cdecl__)) freopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode,FILE * __restrict__ _File) ; + int __attribute__((__cdecl__)) fsetpos(FILE *_File,const fpos_t *_Pos); + int __attribute__((__cdecl__)) fsetpos64(FILE *_File,const fpos_t *_Pos); + int __attribute__((__cdecl__)) fseek(FILE *_File,long _Offset,int _Origin); + long __attribute__((__cdecl__)) ftell(FILE *_File); + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fseeki64(FILE *_File,long long _Offset,int _Origin); + __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _ftelli64(FILE *_File); + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int fseeko(FILE *_File, _off_t _Offset, int _Origin) { + return fseek(_File, _Offset, _Origin); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int fseeko64(FILE *_File, _off64_t _Offset, int _Origin) { + return _fseeki64(_File, _Offset, _Origin); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) _off_t ftello(FILE *_File) { + return ftell(_File); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) _off64_t ftello64(FILE *_File) { + return _ftelli64(_File); + } +# 698 "D:/msys64/ucrt64/include/stdio.h" 3 + size_t __attribute__((__cdecl__)) fwrite(const void * __restrict__ _Str,size_t _Size,size_t _Count,FILE * __restrict__ _File); + int __attribute__((__cdecl__)) getc(FILE *_File); + int __attribute__((__cdecl__)) getchar(void); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _getmaxstdio(void); + char *__attribute__((__cdecl__)) gets(char *_Buffer) + __attribute__((__warning__("Using gets() is always unsafe - use fgets() instead"))); + int __attribute__((__cdecl__)) _getw(FILE *_File); + + + void __attribute__((__cdecl__)) perror(const char *_ErrMsg); + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _pclose(FILE *_File); + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _popen(const char *_Command,const char *_Mode); + + + + + + int __attribute__((__cdecl__)) putc(int _Ch,FILE *_File); + int __attribute__((__cdecl__)) putchar(int _Ch); + int __attribute__((__cdecl__)) puts(const char *_Str); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _putw(int _Word,FILE *_File); + + + int __attribute__((__cdecl__)) remove(const char *_Filename); + int __attribute__((__cdecl__)) rename(const char *_OldFilename,const char *_NewFilename); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _unlink(const char *_Filename); + + int __attribute__((__cdecl__)) unlink(const char *_Filename) ; + + + void __attribute__((__cdecl__)) rewind(FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _rmtmp(void); + void __attribute__((__cdecl__)) setbuf(FILE * __restrict__ _File,char * __restrict__ _Buffer) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _setmaxstdio(int _Max); + __attribute__ ((__dllimport__)) unsigned int __attribute__((__cdecl__)) _set_output_format(unsigned int _Format); + __attribute__ ((__dllimport__)) unsigned int __attribute__((__cdecl__)) _get_output_format(void); + int __attribute__((__cdecl__)) setvbuf(FILE * __restrict__ _File,char * __restrict__ _Buf,int _Mode,size_t _Size); + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__pure__)) + __attribute__((__format__ (gnu_printf, 1, 2))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) _scprintf(const char * __restrict__ _Format,...) + { + __builtin_va_list __ap; + int __ret; + __builtin_va_start(__ap, _Format); + __ret = __stdio_common_vsprintf(0x0002ULL, ((void *)0), 0, _Format, ((void *)0), __ap); + __builtin_va_end(__ap); + return __ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__((__format__ (gnu_scanf, 3, 4))) __attribute__ ((__nonnull__ (3))) + int __attribute__((__cdecl__)) _snscanf(const char * __restrict__ _Src,size_t _MaxCount,const char * __restrict__ _Format,...) + { + __builtin_va_list __ap; + int __ret; + __builtin_va_start(__ap, _Format); + __ret = __stdio_common_vsscanf(0, _Src, _MaxCount, _Format, ((void *)0), __ap); + __builtin_va_end(__ap); + return __ret; + } + + + + + + + + __attribute__ ((__pure__)) + __attribute__((__format__ (ms_printf, 1, 0))) __attribute__ ((__nonnull__ (1))) + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscprintf(const char * __restrict__ _Format,va_list _ArgList); + FILE *__attribute__((__cdecl__)) tmpfile(void) ; + char *__attribute__((__cdecl__)) tmpnam(char *_Buffer); + int __attribute__((__cdecl__)) ungetc(int _Ch,FILE *_File); + + + __attribute__((__format__ (gnu_printf, 3, 0))) __attribute__ ((__nonnull__ (3))) + int __attribute__((__cdecl__)) _vsnprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,va_list _Args) ; + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__((__format__ (gnu_printf, 3, 4))) __attribute__ ((__nonnull__ (3))) + int __attribute__((__cdecl__)) _snprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,...) + { + __builtin_va_list __ap; + int __ret; + __builtin_va_start(__ap, _Format); + __ret = _vsnprintf(_Dest, _Count, _Format, __ap); + __builtin_va_end(__ap); + return __ret; + } +# 840 "D:/msys64/ucrt64/include/stdio.h" 3 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" + + __attribute__((__format__ (gnu_printf, 3, 0))) __attribute__ ((__nonnull__ (3))) + int vsnprintf (char * __restrict__ __stream, size_t __n, const char * __restrict__ __format, va_list __local_argv); + + __attribute__((__format__ (gnu_printf, 3, 4))) __attribute__ ((__nonnull__ (3))) + int snprintf (char * __restrict__ __stream, size_t __n, const char * __restrict__ __format, ...); +# 906 "D:/msys64/ucrt64/include/stdio.h" 3 +#pragma GCC diagnostic pop +# 1015 "D:/msys64/ucrt64/include/stdio.h" 3 + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _set_printf_count_output(int _Value); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _get_printf_count_output(void); + + + + + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vswscanf (const wchar_t * __restrict__ _Str,const wchar_t * __restrict__ Format,va_list argp); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_wscanf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_vwscanf(const wchar_t * __restrict__ Format, va_list argp); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vfwscanf (FILE * __restrict__ fp, const wchar_t * __restrict__ Format,va_list argp); + + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_wprintf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__nonnull__ (3))) + int __attribute__((__cdecl__)) __mingw_snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...); + __attribute__ ((__nonnull__ (3))) + int __attribute__((__cdecl__)) __mingw_vsnwprintf (wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , va_list); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ ,va_list); + + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_wscanf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); + + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_wprintf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ ,va_list); + + + int __attribute__((__cdecl__)) __stdio_common_vswprintf(unsigned long long options, wchar_t *str, size_t len, const wchar_t *format, _locale_t locale, va_list valist); + int __attribute__((__cdecl__)) __stdio_common_vfwprintf(unsigned long long options, FILE *file, const wchar_t *format, _locale_t locale, va_list valist); + int __attribute__((__cdecl__)) __stdio_common_vswscanf(unsigned long long options, const wchar_t *input, size_t length, const wchar_t *format, _locale_t locale, va_list valist); + int __attribute__((__cdecl__)) __stdio_common_vfwscanf(unsigned long long options, FILE *file, const wchar_t *format, _locale_t locale, va_list valist); +# 1220 "D:/msys64/ucrt64/include/stdio.h" 3 + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + int __attribute__((__cdecl__)) fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...) + { + __builtin_va_list __ap; + int __ret; + __builtin_va_start(__ap, _Format); + __ret = __stdio_common_vfwscanf(0x0002ULL, _File, _Format, ((void *)0), __ap); + __builtin_va_end(__ap); + return __ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + int __attribute__((__cdecl__)) swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...) + { + __builtin_va_list __ap; + int __ret; + __builtin_va_start(__ap, _Format); + __ret = __stdio_common_vswscanf(0x0002ULL, _Src, (size_t)-1, _Format, ((void *)0), __ap); + __builtin_va_end(__ap); + return __ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + int __attribute__((__cdecl__)) wscanf(const wchar_t * __restrict__ _Format,...) + { + __builtin_va_list __ap; + int __ret; + __builtin_va_start(__ap, _Format); + __ret = __stdio_common_vfwscanf(0x0002ULL, (__acrt_iob_func(0)), _Format, ((void *)0), __ap); + __builtin_va_end(__ap); + return __ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) + int vfwscanf (FILE *__stream, const wchar_t *__format, va_list __local_argv) + { + return __stdio_common_vfwscanf(0x0002ULL, __stream, __format, ((void *)0), __local_argv); + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) + int vswscanf (const wchar_t * __restrict__ __source, const wchar_t * __restrict__ __format, va_list __local_argv) + { + return __stdio_common_vswscanf(0x0002ULL, __source, (size_t)-1, __format, ((void *)0), __local_argv); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (1))) + int vwscanf(const wchar_t *__format, va_list __local_argv) + { + return __stdio_common_vfwscanf(0x0002ULL, (__acrt_iob_func(0)), __format, ((void *)0), __local_argv); + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + int __attribute__((__cdecl__)) fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...) + { + __builtin_va_list __ap; + int __ret; + __builtin_va_start(__ap, _Format); + __ret = __stdio_common_vfwprintf(0x0004ULL, _File, _Format, ((void *)0), __ap); + __builtin_va_end(__ap); + return __ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + int __attribute__((__cdecl__)) wprintf(const wchar_t * __restrict__ _Format,...) + { + __builtin_va_list __ap; + int __ret; + __builtin_va_start(__ap, _Format); + __ret = __stdio_common_vfwprintf(0x0004ULL, (__acrt_iob_func(1)), _Format, ((void *)0), __ap); + __builtin_va_end(__ap); + return __ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + int __attribute__((__cdecl__)) vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList) + { + return __stdio_common_vfwprintf(0x0004ULL, _File, _Format, ((void *)0), _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + int __attribute__((__cdecl__)) vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList) + { + return __stdio_common_vfwprintf(0x0004ULL, (__acrt_iob_func(1)), _Format, ((void *)0), _ArgList); + } +# 1346 "D:/msys64/ucrt64/include/stdio.h" 3 + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag); + + + wint_t __attribute__((__cdecl__)) fgetwc(FILE *_File); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _fgetwchar(void); + wint_t __attribute__((__cdecl__)) fputwc(wchar_t _Ch,FILE *_File); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _fputwchar(wchar_t _Ch); + wint_t __attribute__((__cdecl__)) getwc(FILE *_File); + wint_t __attribute__((__cdecl__)) getwchar(void); + wint_t __attribute__((__cdecl__)) putwc(wchar_t _Ch,FILE *_File); + wint_t __attribute__((__cdecl__)) putwchar(wchar_t _Ch); + wint_t __attribute__((__cdecl__)) ungetwc(wint_t _Ch,FILE *_File); + wchar_t *__attribute__((__cdecl__)) fgetws(wchar_t * __restrict__ _Dst,int _SizeInWords,FILE * __restrict__ _File); + int __attribute__((__cdecl__)) fputws(const wchar_t * __restrict__ _Str,FILE * __restrict__ _File); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _getws(wchar_t *_String) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _putws(const wchar_t *_Str); + + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + int __attribute__((__cdecl__)) _scwprintf(const wchar_t * __restrict__ _Format,...) + { + __builtin_va_list __ap; + int __ret; + __builtin_va_start(__ap, _Format); + __ret = __stdio_common_vswprintf(0x0004ULL | 0x0002ULL, ((void *)0), 0, _Format, ((void *)0), __ap); + __builtin_va_end(__ap); + return __ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + int __attribute__((__cdecl__)) _snwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...) + { + __builtin_va_list __ap; + int __ret; + __builtin_va_start(__ap, _Format); + __ret = __stdio_common_vswprintf(0x0004ULL | 0x0001ULL, _Dest, _Count, _Format, ((void *)0), __ap); + __builtin_va_end(__ap); + return __ret; + } + int __attribute__((__cdecl__)) _vsnwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args) ; + + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + int snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...) + { + __builtin_va_list __ap; + int __ret; + __builtin_va_start(__ap, format); + __ret = __stdio_common_vswprintf(0x0004ULL | 0x0002ULL, s, n, format, ((void *)0), __ap); + __builtin_va_end(__ap); + return __ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + int __attribute__((__cdecl__)) vsnwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, va_list arg) + { + int __ret = __stdio_common_vswprintf(0x0004ULL, s, n, format, ((void *)0), arg); + return __ret < 0 ? -1 : __ret; + } + + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + int __attribute__((__cdecl__)) _swprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,...) + { + __builtin_va_list __ap; + int __ret; + __builtin_va_start(__ap, _Format); + __ret = __stdio_common_vswprintf(0x0004ULL, _Dest, (size_t)-1, _Format, ((void *)0), __ap); + __builtin_va_end(__ap); + return __ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + int __attribute__((__cdecl__)) _vswprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,va_list _Args) + { + return __stdio_common_vswprintf(0x0004ULL, _Dest, (size_t)-1, _Format, ((void *)0), _Args); + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + int __attribute__((__cdecl__)) _vscwprintf(const wchar_t * __restrict__ _Format, va_list _ArgList) + { + int _Result = __stdio_common_vswprintf(0x0002ULL, ((void *)0), 0, _Format, ((void *)0), _ArgList); + return _Result < 0 ? -1 : _Result; + } +# 1463 "D:/msys64/ucrt64/include/stdio.h" 3 +# 1 "D:/msys64/ucrt64/include/swprintf.inl" 1 3 +# 25 "D:/msys64/ucrt64/include/swprintf.inl" 3 +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (3))) +int vswprintf (wchar_t *__stream, size_t __count, const wchar_t *__format, __builtin_va_list __local_argv) +{ + return vsnwprintf( __stream, __count, __format, __local_argv ); +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (3))) +int swprintf (wchar_t *__stream, size_t __count, const wchar_t *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; + + __builtin_va_start( __local_argv, __format ); + __retval = vswprintf( __stream, __count, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} +# 1464 "D:/msys64/ucrt64/include/stdio.h" 2 3 +# 1473 "D:/msys64/ucrt64/include/stdio.h" 3 + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwscanf(const wchar_t * __restrict__ _Src,size_t _MaxCount,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wfdopen(int _FileHandle ,const wchar_t *_Mode); + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wfopen(const wchar_t * __restrict__ _Filename,const wchar_t *__restrict__ _Mode) ; + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wfreopen(const wchar_t * __restrict__ _Filename,const wchar_t * __restrict__ _Mode,FILE * __restrict__ _OldFile) ; + + + + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _wperror(const wchar_t *_ErrMsg); + + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wpopen(const wchar_t *_Command,const wchar_t *_Mode); + + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wremove(const wchar_t *_Filename); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wtmpnam(wchar_t *_Buffer); + + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _fgetwc_nolock(FILE *_File); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _fputwc_nolock(wchar_t _Ch,FILE *_File); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _ungetwc_nolock(wint_t _Ch,FILE *_File); +# 1518 "D:/msys64/ucrt64/include/stdio.h" 3 + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fgetc_nolock(FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fputc_nolock(int _Char, FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _getc_nolock(FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _putc_nolock(int _Char, FILE *_File); +# 1533 "D:/msys64/ucrt64/include/stdio.h" 3 + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _lock_file(FILE *_File); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _unlock_file(FILE *_File); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fclose_nolock(FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fflush_nolock(FILE *_File); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _fread_nolock(void * __restrict__ _DstBuf,size_t _ElementSize,size_t _Count,FILE * __restrict__ _File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fseek_nolock(FILE *_File,long _Offset,int _Origin); + __attribute__ ((__dllimport__)) long __attribute__((__cdecl__)) _ftell_nolock(FILE *_File); + __extension__ __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fseeki64_nolock(FILE *_File,long long _Offset,int _Origin); + __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _ftelli64_nolock(FILE *_File); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _fwrite_nolock(const void * __restrict__ _DstBuf,size_t _Size,size_t _Count,FILE * __restrict__ _File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _ungetc_nolock(int _Ch,FILE *_File); + + + + + + + char *__attribute__((__cdecl__)) tempnam(const char *_Directory,const char *_FilePrefix) ; + int __attribute__((__cdecl__)) fcloseall(void) ; + FILE *__attribute__((__cdecl__)) fdopen(int _FileHandle,const char *_Format) ; + int __attribute__((__cdecl__)) fgetchar(void) ; + int __attribute__((__cdecl__)) fileno(FILE *_File) ; + int __attribute__((__cdecl__)) flushall(void) ; + int __attribute__((__cdecl__)) fputchar(int _Ch) ; + int __attribute__((__cdecl__)) getw(FILE *_File) ; + int __attribute__((__cdecl__)) putw(int _Ch,FILE *_File) ; + int __attribute__((__cdecl__)) rmtmp(void) ; +# 1577 "D:/msys64/ucrt64/include/stdio.h" 3 +int __attribute__((__cdecl__)) __mingw_str_wide_utf8 (const wchar_t * const wptr, char **mbptr, size_t * buflen); +# 1591 "D:/msys64/ucrt64/include/stdio.h" 3 +int __attribute__((__cdecl__)) __mingw_str_utf8_wide (const char *const mbptr, wchar_t ** wptr, size_t * buflen); +# 1600 "D:/msys64/ucrt64/include/stdio.h" 3 +void __attribute__((__cdecl__)) __mingw_str_free(void *ptr); + + + + + + + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnl(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnle(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnlp(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnlpe(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnv(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnve(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnvp(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnvpe(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); +# 1631 "D:/msys64/ucrt64/include/stdio.h" 3 + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnv(int _Mode,const char *_Filename,const char *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnve(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnvp(int _Mode,const char *_Filename,const char *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnvpe(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env); + + + + + + + + + + + + +#pragma pack(pop) + +# 1 "D:/msys64/ucrt64/include/sec_api/stdio_s.h" 1 3 +# 9 "D:/msys64/ucrt64/include/sec_api/stdio_s.h" 3 +# 1 "D:/msys64/ucrt64/include/stdio.h" 1 3 +# 10 "D:/msys64/ucrt64/include/sec_api/stdio_s.h" 2 3 +# 29 "D:/msys64/ucrt64/include/sec_api/stdio_s.h" 3 + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) clearerr_s(FILE *_File); + + size_t __attribute__((__cdecl__)) fread_s(void *_DstBuf,size_t _DstSize,size_t _ElementSize,size_t _Count,FILE *_File); + + + int __attribute__((__cdecl__)) __stdio_common_vsprintf_s(unsigned long long _Options, char *_Str, size_t _Len, const char *_Format, _locale_t _Locale, va_list _ArgList); + int __attribute__((__cdecl__)) __stdio_common_vsprintf_p(unsigned long long _Options, char *_Str, size_t _Len, const char *_Format, _locale_t _Locale, va_list _ArgList); + int __attribute__((__cdecl__)) __stdio_common_vsnprintf_s(unsigned long long _Options, char *_Str, size_t _Len, size_t _MaxCount, const char *_Format, _locale_t _Locale, va_list _ArgList); + int __attribute__((__cdecl__)) __stdio_common_vfprintf_s(unsigned long long _Options, FILE *_File, const char *_Format, _locale_t _Locale, va_list _ArgList); + int __attribute__((__cdecl__)) __stdio_common_vfprintf_p(unsigned long long _Options, FILE *_File, const char *_Format, _locale_t _Locale, va_list _ArgList); + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vfscanf_s_l(FILE *_File, const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vfscanf(0x0001ULL, _File, _Format, _Locale, _ArgList); + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) vfscanf_s(FILE *_File, const char *_Format, va_list _ArgList) + { + return _vfscanf_s_l(_File, _Format, ((void *)0), _ArgList); + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vscanf_s_l(const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return _vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList); + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) vscanf_s(const char *_Format, va_list _ArgList) + { + return _vfscanf_s_l((__acrt_iob_func(0)), _Format, ((void *)0), _ArgList); + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _fscanf_s_l(FILE *_File, const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vfscanf_s_l(_File, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) fscanf_s(FILE *_File, const char *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vfscanf_s_l(_File, _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _scanf_s_l(const char *_Format, _locale_t _Locale ,...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) scanf_s(const char *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vfscanf_s_l((__acrt_iob_func(0)), _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vfscanf_l(FILE *_File, const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vfscanf(0, _File, _Format, _Locale, _ArgList); + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vscanf_l(const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return _vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList); + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _fscanf_l(FILE *_File, const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vfscanf_l(_File, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _scanf_l(const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vsscanf_s_l(const char *_Src, const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vsscanf(0x0001ULL, _Src, (size_t)-1, _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) vsscanf_s(const char *_Src, const char *_Format, va_list _ArgList) + { + return _vsscanf_s_l(_Src, _Format, ((void *)0), _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _sscanf_s_l(const char *_Src, const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vsscanf_s_l(_Src, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) sscanf_s(const char *_Src, const char *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vsscanf_s_l(_Src, _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vsscanf_l(const char *_Src, const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vsscanf(0, _Src, (size_t)-1, _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _sscanf_l(const char *_Src, const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vsscanf_l(_Src, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _snscanf_s_l(const char *_Src, size_t _MaxCount, const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = __stdio_common_vsscanf(0x0001ULL, _Src, _MaxCount, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _snscanf_s(const char *_Src, size_t _MaxCount, const char *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = __stdio_common_vsscanf(0x0001ULL, _Src, _MaxCount, _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _snscanf_l(const char *_Src, size_t _MaxCount, const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = __stdio_common_vsscanf(0, _Src, _MaxCount, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vfprintf_s_l(FILE *_File, const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vfprintf_s(0, _File, _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) vfprintf_s(FILE *_File, const char *_Format, va_list _ArgList) + { + return _vfprintf_s_l(_File, _Format, ((void *)0), _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vprintf_s_l(const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return _vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) vprintf_s(const char *_Format, va_list _ArgList) + { + return _vfprintf_s_l((__acrt_iob_func(1)), _Format, ((void *)0), _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _fprintf_s_l(FILE *_File, const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vfprintf_s_l(_File, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _printf_s_l(const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) fprintf_s(FILE *_File, const char *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vfprintf_s_l(_File, _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) printf_s(const char *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vfprintf_s_l((__acrt_iob_func(1)), _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vsnprintf_c_l(char *_DstBuf, size_t _MaxCount, const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vsprintf(0, _DstBuf, _MaxCount, _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vsnprintf_c(char *_DstBuf, size_t _MaxCount, const char *_Format, va_list _ArgList) + { + return _vsnprintf_c_l(_DstBuf, _MaxCount, _Format, ((void *)0), _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _snprintf_c_l(char *_DstBuf, size_t _MaxCount, const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vsnprintf_c_l(_DstBuf, _MaxCount, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _snprintf_c(char *_DstBuf, size_t _MaxCount, const char *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vsnprintf_c_l(_DstBuf, _MaxCount, _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vsnprintf_s_l(char *_DstBuf, size_t _DstSize, size_t _MaxCount, const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vsnprintf_s(0, _DstBuf, _DstSize, _MaxCount, _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) vsnprintf_s(char *_DstBuf, size_t _DstSize, size_t _MaxCount, const char *_Format, va_list _ArgList) + { + return _vsnprintf_s_l(_DstBuf, _DstSize, _MaxCount, _Format, ((void *)0), _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vsnprintf_s(char *_DstBuf, size_t _DstSize, size_t _MaxCount, const char *_Format, va_list _ArgList) + { + return _vsnprintf_s_l(_DstBuf, _DstSize, _MaxCount, _Format, ((void *)0), _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _snprintf_s_l(char *_DstBuf, size_t _DstSize, size_t _MaxCount, const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vsnprintf_s_l(_DstBuf, _DstSize, _MaxCount, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _snprintf_s(char *_DstBuf, size_t _DstSize, size_t _MaxCount, const char *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vsnprintf_s_l(_DstBuf, _DstSize, _MaxCount, _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vsprintf_s_l(char *_DstBuf, size_t _DstSize, const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vsprintf_s(0, _DstBuf, _DstSize, _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) vsprintf_s(char *_DstBuf, size_t _Size, const char *_Format, va_list _ArgList) + { + return _vsprintf_s_l(_DstBuf, _Size, _Format, ((void *)0), _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _sprintf_s_l(char *_DstBuf, size_t _DstSize, const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vsprintf_s_l(_DstBuf, _DstSize, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) sprintf_s(char *_DstBuf, size_t _DstSize, const char *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vsprintf_s_l(_DstBuf, _DstSize, _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vfprintf_p_l(FILE *_File, const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vfprintf_p(0, _File, _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vfprintf_p(FILE *_File, const char *_Format, va_list _ArgList) + { + return _vfprintf_p_l(_File, _Format, ((void *)0), _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vprintf_p_l(const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return _vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vprintf_p(const char *_Format, va_list _ArgList) + { + return _vfprintf_p_l((__acrt_iob_func(1)), _Format, ((void *)0), _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _fprintf_p_l(FILE *_File, const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = __stdio_common_vfprintf_p(0, _File, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _fprintf_p(FILE *_File, const char *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vfprintf_p_l(_File, _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _printf_p_l(const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _printf_p(const char *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vfprintf_p_l((__acrt_iob_func(1)), _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vsprintf_p_l(char *_DstBuf, size_t _MaxCount, const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vsprintf_p(0, _DstBuf, _MaxCount, _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vsprintf_p(char *_Dst, size_t _MaxCount, const char *_Format, va_list _ArgList) + { + return _vsprintf_p_l(_Dst, _MaxCount, _Format, ((void *)0), _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _sprintf_p_l(char *_DstBuf, size_t _MaxCount, const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vsprintf_p_l(_DstBuf, _MaxCount, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _sprintf_p(char *_Dst, size_t _MaxCount, const char *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vsprintf_p_l(_Dst, _MaxCount, _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vscprintf_p_l(const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vsprintf_p(0x0002ULL, ((void *)0), 0, _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vscprintf_p(const char *_Format, va_list _ArgList) + { + return _vscprintf_p_l(_Format, ((void *)0), _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _scprintf_p_l(const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vscprintf_p_l(_Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _scprintf_p(const char *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vscprintf_p_l(_Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vfprintf_l(FILE *_File, const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vfprintf(0, _File, _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vprintf_l(const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return _vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _fprintf_l(FILE *_File, const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vfprintf_l(_File, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _printf_l(const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vsnprintf_l(char *_DstBuf, size_t _MaxCount, const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vsprintf(0x0001ULL, _DstBuf, _MaxCount, _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _snprintf_l(char *_DstBuf, size_t _MaxCount, const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vsnprintf_l(_DstBuf, _MaxCount, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vsprintf_l(char *_DstBuf, const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return _vsnprintf_l(_DstBuf, (size_t)-1, _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _sprintf_l(char *_DstBuf, const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vsprintf_l(_DstBuf, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vscprintf_l(const char *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vsprintf(0x0002ULL, ((void *)0), 0, _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _scprintf_l(const char *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vscprintf_l(_Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } +# 583 "D:/msys64/ucrt64/include/sec_api/stdio_s.h" 3 + + + + + + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) fopen_s(FILE **_File,const char *_Filename,const char *_Mode); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) freopen_s(FILE** _File, const char *_Filename, const char *_Mode, FILE *_Stream); + + __attribute__ ((__dllimport__)) char* __attribute__((__cdecl__)) gets_s(char*,rsize_t); + + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) tmpfile_s(FILE **_File); + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) tmpnam_s(char*,rsize_t); + + + + + + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _getws_s(wchar_t *_Str,size_t _SizeInWords); + + + + int __attribute__((__cdecl__)) __stdio_common_vswprintf_s(unsigned long long _Options, wchar_t *_Str, size_t _Len, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList); + int __attribute__((__cdecl__)) __stdio_common_vsnwprintf_s(unsigned long long _Options, wchar_t *_Str, size_t _Len, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList); + int __attribute__((__cdecl__)) __stdio_common_vfwprintf_s(unsigned long long _Options, FILE *_File, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList); + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vfwscanf_s_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vfwscanf(0x0002ULL | 0x0001ULL, _File, _Format, _Locale, _ArgList); + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) vfwscanf_s(FILE* _File, const wchar_t *_Format, va_list _ArgList) + { + return _vfwscanf_s_l(_File, _Format, ((void *)0), _ArgList); + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vwscanf_s_l(const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) + { + return _vfwscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList); + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) vwscanf_s(const wchar_t *_Format, va_list _ArgList) + { + return _vfwscanf_s_l((__acrt_iob_func(0)), _Format, ((void *)0), _ArgList); + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _fwscanf_s_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vfwscanf_s_l(_File, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) fwscanf_s(FILE *_File, const wchar_t *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vfwscanf_s_l(_File, _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _wscanf_s_l(const wchar_t *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vfwscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) wscanf_s(const wchar_t *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vfwscanf_s_l((__acrt_iob_func(0)), _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vswscanf_s_l(const wchar_t *_Src, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vswscanf(0x0002ULL | 0x0001ULL, _Src, (size_t)-1, _Format, _Locale, _ArgList); + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) vswscanf_s(const wchar_t *_Src, const wchar_t *_Format, va_list _ArgList) + { + return _vswscanf_s_l(_Src, _Format, ((void *)0), _ArgList); + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _swscanf_s_l(const wchar_t *_Src, const wchar_t *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vswscanf_s_l(_Src, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) swscanf_s(const wchar_t *_Src, const wchar_t *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vswscanf_s_l(_Src, _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vsnwscanf_s_l(const wchar_t *_Src, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vswscanf(0x0002ULL | 0x0001ULL, _Src, _MaxCount, _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _snwscanf_s_l(const wchar_t *_Src, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vsnwscanf_s_l(_Src, _MaxCount, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _snwscanf_s(const wchar_t *_Src, size_t _MaxCount, const wchar_t *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vsnwscanf_s_l(_Src, _MaxCount, _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vfwprintf_s_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vfwprintf_s(0x0004ULL, _File, _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vwprintf_s_l(const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) + { + return _vfwprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) vfwprintf_s(FILE *_File, const wchar_t *_Format, va_list _ArgList) + { + return _vfwprintf_s_l(_File, _Format, ((void *)0), _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) vwprintf_s(const wchar_t *_Format, va_list _ArgList) + { + return _vfwprintf_s_l((__acrt_iob_func(1)), _Format, ((void *)0), _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _fwprintf_s_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vfwprintf_s_l(_File, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _wprintf_s_l(const wchar_t *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vfwprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) fwprintf_s(FILE *_File, const wchar_t *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vfwprintf_s_l(_File, _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) wprintf_s(const wchar_t *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vfwprintf_s_l((__acrt_iob_func(1)), _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vswprintf_s_l(wchar_t *_DstBuf, size_t _DstSize, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vswprintf_s(0x0004ULL, _DstBuf, _DstSize, _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) vswprintf_s(wchar_t *_DstBuf, size_t _DstSize, const wchar_t *_Format, va_list _ArgList) + { + return _vswprintf_s_l(_DstBuf, _DstSize, _Format, ((void *)0), _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _swprintf_s_l(wchar_t *_DstBuf, size_t _DstSize, const wchar_t *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vswprintf_s_l(_DstBuf, _DstSize, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) swprintf_s(wchar_t *_DstBuf, size_t _DstSize, const wchar_t *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vswprintf_s_l(_DstBuf, _DstSize, _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vsnwprintf_s_l(wchar_t *_DstBuf, size_t _DstSize, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) + { + return __stdio_common_vsnwprintf_s(0x0004ULL, _DstBuf, _DstSize, _MaxCount, _Format, _Locale, _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _vsnwprintf_s(wchar_t *_DstBuf, size_t _DstSize, size_t _MaxCount, const wchar_t *_Format, va_list _ArgList) + { + return _vsnwprintf_s_l(_DstBuf, _DstSize, _MaxCount, _Format, ((void *)0), _ArgList); + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _snwprintf_s_l(wchar_t *_DstBuf, size_t _DstSize, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Locale); + _Ret = _vsnwprintf_s_l(_DstBuf, _DstSize, _MaxCount, _Format, _Locale, _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } + static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) int __attribute__((__cdecl__)) _snwprintf_s(wchar_t *_DstBuf, size_t _DstSize, size_t _MaxCount, const wchar_t *_Format, ...) + { + __builtin_va_list _ArgList; + int _Ret; + __builtin_va_start(_ArgList, _Format); + _Ret = _vsnwprintf_s_l(_DstBuf, _DstSize, _MaxCount, _Format, ((void *)0), _ArgList); + __builtin_va_end(_ArgList); + return _Ret; + } +# 862 "D:/msys64/ucrt64/include/sec_api/stdio_s.h" 3 + + + + + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wfopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wfreopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile); + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wtmpnam_s(wchar_t *_DstBuf,size_t _SizeInWords); + +# 912 "D:/msys64/ucrt64/include/sec_api/stdio_s.h" 3 + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _fread_nolock_s(void *_DstBuf,size_t _DstSize,size_t _ElementSize,size_t _Count,FILE *_File); +# 1650 "D:/msys64/ucrt64/include/stdio.h" 2 3 +# 2 "main.c" 2 + + + +# 4 "main.c" +int main (void) +{ + printf("Hello world!\n" ); + return 0; +} diff --git a/Lect6/main.o b/Lect6/main.o new file mode 100644 index 0000000..d06c33d Binary files /dev/null and b/Lect6/main.o differ diff --git a/Lect6/main.s b/Lect6/main.s new file mode 100644 index 0000000..eb5e2d0 --- /dev/null +++ b/Lect6/main.s @@ -0,0 +1,29 @@ + .file "main.c" + .text + .def __main; .scl 2; .type 32; .endef + .section .rdata,"dr" +.LC0: + .ascii "Hello world!\0" + .text + .globl main + .def main; .scl 2; .type 32; .endef + .seh_proc main +main: + pushq %rbp + .seh_pushreg %rbp + movq %rsp, %rbp + .seh_setframe %rbp, 0 + subq $32, %rsp + .seh_stackalloc 32 + .seh_endprologue + call __main + leaq .LC0(%rip), %rax + movq %rax, %rcx + call puts + movl $0, %eax + addq $32, %rsp + popq %rbp + ret + .seh_endproc + .ident "GCC: (Rev2, Built by MSYS2 project) 13.2.0" + .def puts; .scl 2; .type 32; .endef diff --git a/Lect6/program.exe b/Lect6/program.exe new file mode 100644 index 0000000..5b1bbb9 Binary files /dev/null and b/Lect6/program.exe differ diff --git a/Lect6/str73-74.txt b/Lect6/str73-74.txt new file mode 100644 index 0000000..1638f60 --- /dev/null +++ b/Lect6/str73-74.txt @@ -0,0 +1,3957 @@ +!This program cannot be run in DOS mode. +.text +`.data +.rdata +@.pdata +@.xdata +@.bss +.idata +.CRT +.tls +.rsrc +@.reloc +B/19 +B/31 +B/45 +B/57 +B/70 +B/81 +B/97 +B/113 +8MZu +HcP + + + + + + + + + + + + + + + + + + + + + + + +9GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +char +size_t +long long unsigned int +long long int +uintptr_t +wchar_t +short unsigned int +long int +unsigned int +long unsigned int +unsigned char +_EXCEPTION_RECORD +ExceptionCode +ExceptionFlags +ExceptionAddress +NumberParameters +ExceptionInformation +._CONTEXT +P1Home +P2Home +P3Home +P4Home +P5Home +P6Home +ContextFlags +MxCsr +SegCs +SegDs +SegEs +SegFs +SegGs +SegSs +EFlags +VectorRegister +VectorControl +DebugControl +LastBranchToRip +LastBranchFromRip +LastExceptionToRip +LastExceptionFromRip +BYTE +WORD +DWORD +float +__globallocalestatus +signed char +short int +ULONG_PTR +DWORD64 +PVOID +LONG +LONGLONG +ULONGLONG +EXCEPTION_ROUTINE +PEXCEPTION_ROUTINE +=_M128A +High +/M128A +_onexit_t +double +long double +_invalid_parameter_handler +_Float16 +__bf16 +._XMM_SAVE_AREA32 +ControlWord +StatusWord +TagWord +Reserved1 +ErrorOpcode +ErrorOffset +ErrorSelector +Reserved2 +DataOffset +DataSelector +Reserved3 +MxCsr +MxCsr_Mask +FloatRegisters +XmmRegisters +Reserved4 +/XMM_SAVE_AREA32 +Header +Legacy +Xmm0 +Xmm1 +Xmm2 +Xmm3 +Xmm4 +Xmm5 +Xmm6 +Xmm7 +Xmm8 +Xmm9 +Xmm10 +Xmm11 +Xmm12 +Xmm13 +Xmm14 +Xmm15 +1FltSave +1FloatSave +PCONTEXT +EXCEPTION_RECORD +PEXCEPTION_RECORD +_EXCEPTION_POINTERS +ContextRecord +EXCEPTION_POINTERS +Next +prev +_EXCEPTION_REGISTRATION_RECORD +Handler +handler +FiberData +Version +_NT_TIB +ExceptionList +StackBase +StackLimit +SubSystemTib +ArbitraryUserPointer +Self +NT_TIB +PNT_TIB +2JOB_OBJECT_NET_RATE_CONTROL_FLAGS +JOB_OBJECT_NET_RATE_CONTROL_ENABLE +JOB_OBJECT_NET_RATE_CONTROL_MAX_BANDWIDTH +JOB_OBJECT_NET_RATE_CONTROL_DSCP_TAG +JOB_OBJECT_NET_RATE_CONTROL_VALID_FLAGS +_IMAGE_DOS_HEADER +e_magic +e_cblp +e_cp +e_crlc +e_cparhdr +e_minalloc +e_maxalloc +e_ss +e_sp +e_csum +e_ip +e_cs +e_lfarlc +e_ovno +e_res +e_oemid +e_oeminfo +e_res2 +e_lfanew +IMAGE_DOS_HEADER +PIMAGE_DOS_HEADER +_IMAGE_FILE_HEADER +Machine +NumberOfSections +TimeDateStamp +PointerToSymbolTable +NumberOfSymbols +SizeOfOptionalHeader +Characteristics +IMAGE_FILE_HEADER +_IMAGE_DATA_DIRECTORY +VirtualAddress +Size +IMAGE_DATA_DIRECTORY +_IMAGE_OPTIONAL_HEADER +Magic +BaseOfData +PIMAGE_OPTIONAL_HEADER32 +_IMAGE_OPTIONAL_HEADER64 +Magic +IMAGE_OPTIONAL_HEADER64 +PIMAGE_OPTIONAL_HEADER64 +C_IMAGE_NT_HEADERS64 +Signature +FileHeader +OptionalHeader +PIMAGE_NT_HEADERS64 +PIMAGE_NT_HEADERS +PIMAGE_TLS_CALLBACK +PTOP_LEVEL_EXCEPTION_FILTER +LPTOP_LEVEL_EXCEPTION_FILTER +DtagCOINITBASE +COINITBASE_MULTITHREADED +2VARENUM +VT_EMPTY +VT_NULL +VT_I2 +VT_I4 +VT_R4 +VT_R8 +VT_CY +VT_DATE +VT_BSTR +VT_DISPATCH +VT_ERROR +VT_BOOL +VT_VARIANT +VT_UNKNOWN +VT_DECIMAL +VT_I1 +VT_UI1 +VT_UI2 +VT_UI4 +VT_I8 +VT_UI8 +VT_INT +VT_UINT +VT_VOID +VT_HRESULT +VT_PTR +VT_SAFEARRAY +VT_CARRAY +VT_USERDEFINED +VT_LPSTR +VT_LPWSTR +VT_RECORD +VT_INT_PTR +VT_UINT_PTR +VT_FILETIME +VT_BLOB +VT_STREAM +VT_STORAGE +VT_STREAMED_OBJECT +VT_STORED_OBJECT +VT_BLOB_OBJECT +VT_CF +VT_CLSID +VT_VERSIONED_STREAM +VT_BSTR_BLOB +VT_VECTOR +VT_ARRAY +VT_BYREF +VT_RESERVED +VT_ILLEGAL +VT_ILLEGALMASKED +VT_TYPEMASK +_dowildcard +_newmode +__imp___initenv +newmode +_startupinfo +__uninitialized +__initializing +__initialized +__native_startup_state +__native_startup_lock +_PVFV +_PIFV +I_exception +type +name +arg1 +arg2 +retval +_TCHAR +__ImageBase +_fmode +_commode +__xi_a +__xi_z +__xc_a +__xc_z +__dyn_tls_init_callback +__mingw_app_type +argc +argv +envp +Jargret +mainret +managedapp +has_cctor +startinfo +__mingw_oldexcpt_handler +4__mingw_pcinit +4__mingw_pcppinit +_MINGW_INSTALL_DEBUG_MATHERR +'__mingw_initltsdrot_force +'__mingw_initltsdyn_force +'__mingw_initltssuo_force +K__mingw_module_is_dll +(_onexit +memcpy +strlen +(malloc +"_cexit +C Lexit +main +"__main +"_fpreset +_set_invalid_parameter_handler +_gnu_exception_handler +SetUnhandledExceptionFilter +"_pei386_runtime_relocator +_initterm +_amsg_exit +Sleep +__getmainargs +(_matherr +__mingw_setusermatherr +)_setargv +)__p__commode +)__p__fmode +__set_app_type +Matexit +Nfunc +Oduplicate_ppstrings +Qcheck_managed_app +pDOSHeader +pPEHeader +pNTHeader32 +pNTHeader64 +5__tmainCRTStartup +lock_free +fiberid +nested +7mainCRTStartup +7WinMainCRTStartup +8pre_cpp_init +5pre_c_init +8__mingw_invalidParameterHandler + expression +R function +Q file +X line +Y pReserved +X_TEB +YNtCurrentTeb +,_InterlockedExchangePointer +Target +Value +,_InterlockedCompareExchangePointer +Destination +ExChange +Comperand +,__readgsqword +Offset +Zmemcpy +__builtin_memcpy +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +char +size_t +long long unsigned int +long long int +short unsigned int +long int +unsigned int +long unsigned int +unsigned char +double +float +long double +u_char +etext +etext +eprol +__eprol + _mcleanup +atexit +monstartup +_monstartup +called +GNU C99 13.2.0 -mtune=generic -march=nocona -g -std=c99 -p +char +long long unsigned int +long long int +short unsigned int +long int +unsigned int +signed char +unsigned char +short int +uint64_t +scanf +printf +main +password +checkPass +_Bool +getHash +hash +p_pow +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +char +long long unsigned int +long long int +ptrdiff_t +short unsigned int +long int +unsigned int +long unsigned int +unsigned char +float +signed char +short int +double +long double +_Float16 +__bf16 +JOB_OBJECT_NET_RATE_CONTROL_FLAGS +JOB_OBJECT_NET_RATE_CONTROL_ENABLE +JOB_OBJECT_NET_RATE_CONTROL_MAX_BANDWIDTH +JOB_OBJECT_NET_RATE_CONTROL_DSCP_TAG +JOB_OBJECT_NET_RATE_CONTROL_VALID_FLAGS +tagCOINITBASE +COINITBASE_MULTITHREADED +VARENUM +VT_EMPTY +VT_NULL +VT_I2 +VT_I4 +VT_R4 +VT_R8 +VT_CY +VT_DATE +VT_BSTR +VT_DISPATCH +VT_ERROR +VT_BOOL +VT_VARIANT +VT_UNKNOWN +VT_DECIMAL +VT_I1 +VT_UI1 +VT_UI2 +VT_UI4 +VT_I8 +VT_UI8 +VT_INT +VT_UINT +VT_VOID +VT_HRESULT +VT_PTR +VT_SAFEARRAY +VT_CARRAY +VT_USERDEFINED +VT_LPSTR +VT_LPWSTR +VT_RECORD +VT_INT_PTR +VT_UINT_PTR +VT_FILETIME +VT_BLOB +VT_STREAM +VT_STORAGE +VT_STREAMED_OBJECT +VT_STORED_OBJECT +VT_BLOB_OBJECT +VT_CF +VT_CLSID +VT_VERSIONED_STREAM +VT_BSTR_BLOB +VT_VECTOR +VT_ARRAY +VT_BYREF +VT_RESERVED +VT_ILLEGAL +VT_ILLEGALMASKED +VT_TYPEMASK +func_ptr +__CTOR_LIST__ +__DTOR_LIST__ +initialized +atexit +__main + __do_global_ctors +nptrs + __do_global_dtors +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +char +long long unsigned int +long long int +short unsigned int +long int +unsigned int +long unsigned int +unsigned char +float +signed char +short int +double +long double +_Float16 +__bf16 +JOB_OBJECT_NET_RATE_CONTROL_FLAGS +JOB_OBJECT_NET_RATE_CONTROL_ENABLE +JOB_OBJECT_NET_RATE_CONTROL_MAX_BANDWIDTH +JOB_OBJECT_NET_RATE_CONTROL_DSCP_TAG +JOB_OBJECT_NET_RATE_CONTROL_VALID_FLAGS + tagCOINITBASE +COINITBASE_MULTITHREADED +VARENUM +VT_EMPTY +VT_NULL +VT_I2 +VT_I4 +VT_R4 +VT_R8 +VT_CY +VT_DATE +VT_BSTR +VT_DISPATCH +VT_ERROR +VT_BOOL +VT_VARIANT +VT_UNKNOWN +VT_DECIMAL +VT_I1 +VT_UI1 +VT_UI2 +VT_UI4 +VT_I8 +VT_UI8 +VT_INT +VT_UINT +VT_VOID +VT_HRESULT +VT_PTR +VT_SAFEARRAY +VT_CARRAY +VT_USERDEFINED +VT_LPSTR +VT_LPWSTR +VT_RECORD +VT_INT_PTR +VT_UINT_PTR +VT_FILETIME +VT_BLOB +VT_STREAM +VT_STORAGE +VT_STREAMED_OBJECT +VT_STORED_OBJECT +VT_BLOB_OBJECT +VT_CF +VT_CLSID +VT_VERSIONED_STREAM +VT_BSTR_BLOB +VT_VECTOR +VT_ARRAY +VT_BYREF +VT_RESERVED +VT_ILLEGAL +VT_ILLEGALMASKED +VT_TYPEMASK +__uninitialized +__initializing +__initialized +__native_startup_state +__native_startup_lock +__native_dllmain_reason +__native_vcclrit_reason +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +_dowildcard +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +char +long long unsigned int +long long int +short unsigned int +long int +unsigned int +long unsigned int +unsigned char +float +signed char +short int +double +long double +_Float16 +__bf16 +_setargv +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +_newmode +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +char +long long unsigned int +long long int +uintptr_t +short unsigned int +long int +unsigned int +long unsigned int +unsigned char +ULONG +WINBOOL +BOOL +DWORD +float +LPVOID +signed char +short int +ULONG_PTR +PVOID +HANDLE +ULONGLONG +double +long double +_Float16 +__bf16 +JOB_OBJECT_NET_RATE_CONTROL_FLAGS + JOB_OBJECT_NET_RATE_CONTROL_ENABLE + JOB_OBJECT_NET_RATE_CONTROL_MAX_BANDWIDTH + JOB_OBJECT_NET_RATE_CONTROL_DSCP_TAG + JOB_OBJECT_NET_RATE_CONTROL_VALID_FLAGS +PIMAGE_TLS_CALLBACK +_IMAGE_TLS_DIRECTORY64 +StartAddressOfRawData +EndAddressOfRawData +AddressOfIndex +AddressOfCallBacks +SizeOfZeroFill +Characteristics +IMAGE_TLS_DIRECTORY64 +IMAGE_TLS_DIRECTORY +_PVFV +_tls_index +_tls_start +_tls_end +__xl_a +__xl_z +_tls_used +__xd_a +__xd_z +_CRT_MT +__dyn_tls_init_callback +__xl_c +__xl_d +__mingw_initltsdrot_force +__mingw_initltsdyn_force +__mingw_initltssuo_force +__mingw_TLScallback +__dyn_tls_dtor +__tlregdtor +func +__dyn_tls_init +pfunc +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +_commode +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +char +long long unsigned int +long long int +short unsigned int +long int +unsigned int +long unsigned int +unsigned char +_PVFV +__xi_a +__xi_z +__xc_a +__xc_z +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +double +char +long long unsigned int +long long int +short unsigned int +long int +unsigned int +long unsigned int +unsigned char +float +long double +_exception +type +name +arg1 +arg2 +retval +_iobuf +_ptr +_cnt +_base +_flag +_file +_charbuf +_bufsiz +_tmpfname +FILE +fprintf +__acrt_iob_func +_matherr +pexcept +type +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +_fpreset +GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +__mingw_app_type +'GNU C99 13.2.0 -m64 -masm=att -mtune=generic -march=nocona -g -O2 -std=gnu99 +__gnuc_va_list +__builtin_va_list +char +va_list +size_t +long long unsigned int +long long int +ptrdiff_t +short unsigned int +long int +unsigned int +long unsigned int +unsigned char +ULONG +WINBOOL +BYTE +WORD +DWORD +float +PBYTE +LPBYTE +PDWORD +LPVOID +LPCVOID +signed char +short int +ULONG_PTR +SIZE_T +PVOID +LONG +double +long double +_Float16 +__bf16 +JOB_OBJECT_NET_RATE_CONTROL_FLAGS +JOB_OBJECT_NET_RATE_CONTROL_ENABLE +JOB_OBJECT_NET_RATE_CONTROL_MAX_BANDWIDTH +JOB_OBJECT_NET_RATE_CONTROL_DSCP_TAG +JOB_OBJECT_NET_RATE_CONTROL_VALID_FLAGS +_MEMORY_BASIC_INFORMATION +BaseAddress +AllocationBase +AllocationProtect +PartitionId +RegionSize +State +Protect +Type +MEMORY_BASIC_INFORMATION +PMEMORY_BASIC_INFORMATION +_IMAGE_DOS_HEADER +e_magic +e_cblp +e_cp +e_crlc +e_cparhdr +e_minalloc +e_maxalloc +e_ss +e_sp +e_csum +e_ip +e_cs +e_lfarlc +e_ovno +e_res +e_oemid +e_oeminfo +e_res2 +e_lfanew +IMAGE_DOS_HEADER +PhysicalAddress +VirtualSize +_IMAGE_SECTION_HEADER +Name +Misc +VirtualAddress +SizeOfRawData +PointerToRawData +PointerToRelocations +PointerToLinenumbers +NumberOfRelocations +NumberOfLinenumbers +Characteristics +PIMAGE_SECTION_HEADER +-tagCOINITBASE +COINITBASE_MULTITHREADED +VARENUM +VT_EMPTY +VT_NULL +VT_I2 +VT_I4 +VT_R4 +VT_R8 +VT_CY +VT_DATE +VT_BSTR +VT_DISPATCH +VT_ERROR +VT_BOOL +VT_VARIANT +VT_UNKNOWN +VT_DECIMAL +VT_I1 +VT_UI1 +VT_UI2 +VT_UI4 +VT_I8 +VT_UI8 +VT_INT +VT_UINT +VT_VOID +VT_HRESULT +VT_PTR +VT_SAFEARRAY +VT_CARRAY +VT_USERDEFINED +VT_LPSTR +VT_LPWSTR +VT_RECORD +VT_INT_PTR +VT_UINT_PTR +VT_FILETIME +VT_BLOB +VT_STREAM +VT_STORAGE +VT_STREAMED_OBJECT +VT_STORED_OBJECT +VT_BLOB_OBJECT +VT_CF +VT_CLSID +VT_VERSIONED_STREAM +VT_BSTR_BLOB +VT_VECTOR +VT_ARRAY +VT_BYREF +VT_RESERVED +VT_ILLEGAL +VT_ILLEGALMASKED +VT_TYPEMASK +._iobuf +_ptr +_cnt + & % +_base +_flag + ( % +_file + ) % +_charbuf + * % +_bufsiz + + % +_tmpfname +FILE +__RUNTIME_PSEUDO_RELOC_LIST__ +__RUNTIME_PSEUDO_RELOC_LIST_END__ +__ImageBase +addend +target +runtime_pseudo_reloc_item_v1 +target +flags +runtime_pseudo_reloc_item_v2 +magic1 +magic2 +version +runtime_pseudo_reloc_v2 +old_protect +base_address +region_size +sec_start +hash +the_secs +maxSections +GetLastError +VirtualProtect +VirtualQuery +_GetPEImageBase +__mingw_GetSectionForAddress +memcpy +1abort +(2vfprintf +__acrt_iob_func +__mingw_GetSectionCount +3_pei386_runtime_relocator +4was_init +5mSecs +#do_pseudo_reloc +start +base +addr_imp +reldata +reloc_target +v2_hdr +bits +newval +max_unsigned +min_signed +#__write_memory +addr + +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/profile/gcrt0.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/profile +D:/a/msys64/ucrt64/include +gcrt0.c +gcrt0.c +corecrt.h +_bsd_types.h +stdlib.h +73-74.c +D:\geekbrains.ru\Projects\C\MIPI_AdvancedCgit\MIPI_AdvancedC\Lect6 +D:/geekbrains.ru/Projects/C/MIPI_AdvancedCgit/MIPI_AdvancedC/Lect6 +D:/msys64/ucrt64/include +73-74.c +73-74.c +stdio.h +stdint.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/gccmain.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +gccmain.c +gccmain.c +winnt.h +combaseapi.h +wtypes.h +corecrt.h +stdlib.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/natstart.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +C:/M/B/src/mingw-w64/mingw-w64-crt/include +natstart.c +winnt.h +combaseapi.h +wtypes.h +internal.h +natstart.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/wildcard.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +wildcard.c +wildcard.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/dllargv.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +dllargv.c +dllargv.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/_newmode.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +_newmode.c +_newmode.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/tlssup.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +tlssup.c +tlssup.c +corecrt.h +minwindef.h +basetsd.h +winnt.h +corecrt_startup.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/xncommod.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +xncommod.c +xncommod.c +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/cinitexe.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +cinitexe.c +cinitexe.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/merr.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +merr.c +merr.c +math.h +stdio.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/CRT_fp10.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +CRT_fp10.c +CRT_fp10.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/mingw_helpers.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +mingw_helpers.c +mingw_helpers.c +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/pseudo-reloc.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +pseudo-reloc.c +pseudo-reloc.c +vadefs.h +corecrt.h +minwindef.h +basetsd.h +winnt.h +combaseapi.h +wtypes.h +stdio.h +memoryapi.h +errhandlingapi.h +string.h +stdlib.h + +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/usermatherr.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +usermatherr.c +usermatherr.c +math.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/xtxtmode.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +xtxtmode.c +xtxtmode.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/crt_handler.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +crt_handler.c +crt_handler.c +winnt.h +minwindef.h +basetsd.h +errhandlingapi.h +combaseapi.h +wtypes.h +signal.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/tlsthrd.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +tlsthrd.c +tlsthrd.c +corecrt.h +minwindef.h +basetsd.h +winnt.h +minwinbase.h +synchapi.h +stdlib.h +processthreadsapi.h +errhandlingapi.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/tlsmcrt.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +tlsmcrt.c +tlsmcrt.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/pseudo-reloc-list.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +pseudo-reloc-list.c +pseudo-reloc-list.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/pesect.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +pesect.c +pesect.c +corecrt.h +minwindef.h +basetsd.h +winnt.h +string.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/misc/mingw_matherr.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/misc +mingw_matherr.c +mingw_matherr.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/stdio/ucrt_vfprintf.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/stdio +D:/a/msys64/ucrt64/include +ucrt_vfprintf.c +ucrt_vfprintf.c +vadefs.h +corecrt.h +stdio.h +C:/M/B/src/mingw-w64/mingw-w64-crt/stdio/ucrt_scanf.c +C:\M\B\src\build-UCRT64 +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/stdio +D:/a/msys64/ucrt64/include +ucrt_scanf.c +ucrt_scanf.c +vadefs.h +corecrt.h +stdio.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/stdio/ucrt_printf.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/stdio +D:/a/msys64/ucrt64/include +ucrt_printf.c +ucrt_printf.c +vadefs.h +corecrt.h +stdio.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/stdio/ucrt_fprintf.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/stdio +D:/a/msys64/ucrt64/include +ucrt_fprintf.c +ucrt_fprintf.c +vadefs.h +corecrt.h +stdio.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/misc/__initenv.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/misc +D:/a/msys64/ucrt64/include +C:/M/B/src/mingw-w64/mingw-w64-crt/include +__initenv.c +winnt.h +combaseapi.h +wtypes.h +internal.h +__initenv.c +corecrt.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt/ucrtbase_compat.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/crt +D:/a/msys64/ucrt64/include +C:/M/B/src/mingw-w64/mingw-w64-crt/include +ucrtbase_compat.c +ucrtbase_compat.c +time.h +vadefs.h +corecrt.h +stdlib.h +winnt.h +combaseapi.h +wtypes.h +internal.h +corecrt_startup.h +stdio.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/profile/gmon.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/profile +D:/a/msys64/ucrt64/include +gmon.c +gmon.c +corecrt.h +_bsd_types.h +gmon.h +profil.h +io.h +stdlib.h +string.h + +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/profile +mcountFunc.S +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/profile/mcount.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/profile +D:/a/msys64/ucrt64/include +mcount.c +mcount.c +corecrt.h +_bsd_types.h +gmon.h +C:\M\B\src\build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/profile/profil.c +C:/M/B/src/build-UCRT64 +C:/M/B/src/mingw-w64/mingw-w64-crt/profile +D:/a/msys64/ucrt64/include +profil.c +profil.c +winnt.h +corecrt.h +minwindef.h +basetsd.h +minwinbase.h +profil.h +_bsd_types.h +processthreadsapi.h +synchapi.h +handleapi.h +winbase.h +string.h +stddef.h + +sx3% +Xt:p +.file +crtexe.c +envp +argv +argc +mainret +.l_endw +.l_start +.l_end +atexit +.text +.data +.bss +.xdata +.pdata +.file +gcrt0.c +__eprol +called.00 +.text +.data +.bss +.ctors +.file +cygming-crtbeg +.text +.data +.bss +.xdata +.pdata +.file +73-74.c +getHash +main +.text +.data +.bss +.rdata +.xdata +.pdata +.file +gccmain.c +__main +.text +.data +.bss +.xdata +.pdata +.file +natstart.c +.text +.data +.bss +.file +wildcard.c +.text +.data +.bss +.file +dllargv.c +_setargv` +.text +.data +.bss +.xdata +.pdata +.file +_newmode.c +.text +.data +.bss +.file +tlssup.c +__xd_a +__xd_z +.text +.data +.bss +.xdata +.pdata +.CRT$XLD@ +.CRT$XLC8 +.rdata +.CRT$XDZX +.CRT$XDAP +.CRT$XLZH +.CRT$XLA0 +.tls$ZZZ +.tls +.file +xncommod.c +.text +.data +.bss +.file +cinitexe.c +.text +.data +.bss +.CRT$XCZ +.CRT$XCA +.CRT$XIZ( +.CRT$XIA +.file +merr.c +_matherr@ +.text +.data +.bss +.rdata +.xdata +.pdata +.file +CRT_fp10.c +_fpreset@ +fpreset +.text +.data +.bss +.xdata +.pdata +.file +mingw_helpers. +.text +.data +.bss +.file +pseudo-reloc.c +the_secs +.text +.data +.bss +.rdata +.xdata +.pdata +.file +usermatherr.c +.text +.data +.bss +.xdata +.pdata +.file +xtxtmode.c +.text +.data +.bss +.file +crt_handler.c +.text +.data +.bss +.xdata +.rdata +.pdata +.file +tlsthrd.c +.text +.data +.bss +.xdata +.pdata +.file +tlsmcrt.c +.text +.data +.bss +.file +.text +.data +.bss +.file +pesect.c +.text +.data +.bss +.xdata +.pdata +.text +.data +.bss +.text +.data +.bss +.file +mingw_matherr. +.text +.data +.bss +.file +ucrt_vfprintf. +vfprintfP +.text +.data +.bss +.xdata +.pdata +.file +ucrt_scanf.c +scanf +.text +.data +.bss +.xdata +.pdata +.file +ucrt_printf.c +printf +.text +.data +.bss +.xdata +.pdata +.file +ucrt_fprintf.c +fprintf +.text +.data +.bss +.xdata +.pdata +.file +__initenv.c +.text +.data +.bss +.file +ucrtbase_compa +_onexit +tzset +_tzset +.text +.data +.bss +.xdata +.pdata +.rdata +.text +.data +.bss +.idata$7 +.idata$5p +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5x +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2 +.idata$4 +.idata$5p +.file +fake +.text +.data +.bss +.idata$4( +.idata$5 +.idata$7 +.text +.data +.bss +.idata$7 +.idata$5X +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5` +.idata$4 +.idata$6 +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2 +.idata$4 +.idata$5P +.file +fake +.text +.data +.bss +.idata$4 +.idata$5h +.idata$7 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6" +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$60 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6J +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6d +.text +.data +.bss +.idata$7 +.idata$58 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5@ +.idata$4 +.idata$6 +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2x +.idata$4 +.idata$5 +.file +fake +.text +.data +.bss +.idata$4 +.idata$5H +.idata$7 +.text +.data +.bss +.idata$7 +.idata$5P +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5X +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5` +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7$ +.idata$5h +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7( +.idata$5p +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7, +.idata$5x +.idata$4 +.idata$6 +.text +.data +.bss +.idata$70 +.idata$5 +.idata$4 +.idata$6& +.text +.data +.bss +.idata$74 +.idata$5 +.idata$4 +.idata$6< +.text +.data +.bss +.idata$7< +.idata$5 +.idata$40 +.idata$6T +.text +.data +.bss +.idata$7@ +.idata$5 +.idata$48 +.idata$6\ +.text +.data +.bss +.idata$7D +.idata$5 +.idata$4@ +.idata$6~ +.text +.data +.bss +.idata$7H +.idata$5 +.idata$4H +.idata$6 +.text +.data +.bss +.idata$7L +.idata$5 +.idata$4P +.idata$6 +.text +.data +.bss +.idata$7P +.idata$5 +.idata$4X +.idata$6 +.text +.data +.bss +.idata$7T +.idata$5 +.idata$4` +.idata$6 +.text +.data +.bss +.idata$7X +.idata$5 +.idata$4h +.idata$6 +.text +.data +.bss +.idata$7` +.idata$5 +.idata$4x +.idata$6 +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2d +.idata$4 +.idata$5P +.file +fake +.text +.data +.bss +.idata$4 +.idata$5 +.idata$7d +.text +.data +.bss +.idata$7 +.idata$58 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5@ +.idata$4 +.idata$6 +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2P +.idata$4 +.idata$58 +.file +fake +.text +.data +.bss +.idata$4 +.idata$5H +.idata$7 +.text +.data +.bss +.idata$7 +.idata$5( +.idata$4 +.idata$6 +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2< +.idata$4 +.idata$5( +.file +fake +.text +.data +.bss +.idata$4 +.idata$50 +.idata$7 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6^ +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6n +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6x +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2( +.idata$4 +.idata$5 +.file +fake +.text +.data +.bss +.idata$4 +.idata$5 +.idata$7 +.text +.data +.bss +.idata$7h +.idata$5 +.idata$4 +.idata$6> +.text +.data +.bss +.idata$7l +.idata$5 +.idata$4 +.idata$6N +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2 +.idata$4 +.idata$5 +.file +fake +.text +.data +.bss +.idata$4 +.idata$5 +.idata$7p +.text +.data +.bss +.idata$7P +.idata$5 +.idata$4h +.idata$6 +.text +.data +.bss +.idata$7L +.idata$5 +.idata$4` +.idata$6 +.text +.data +.bss +.idata$7H +.idata$5 +.idata$4X +.idata$6 +.text +.data +.bss +.idata$7@ +.idata$5 +.idata$4H +.idata$6 +.text +.data +.bss +.idata$78 +.idata$5 +.idata$48 +.idata$6 +.text +.data +.bss +.idata$7, +.idata$5 +.idata$4 +.idata$6p +.text +.data +.bss +.idata$7( +.idata$5 +.idata$4 +.idata$6T +.text +.data +.bss +.idata$7 +.idata$5p +.idata$4 +.idata$60 +.text +.data +.bss +.idata$7 +.idata$5X +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5H +.idata$4 +.idata$6 +.file +fake +hname +fthunk +.text +.data +.bss +.idata$2 +.idata$4 +.idata$50 +.file +fake +.text +.data +.bss +.idata$4x +.idata$5 +.idata$7X +.file +gmon.c +s_scale +.text +.data +.bss +.rdata +.xdata +.pdata +.file +mcountFunc.S +_mcount +.text +.data +.bss +.file +mcount.c +.text +.data +.bss +.xdata +.pdata +.file +profil.c +prof +profil +.text +.data +.bss +.xdata +.pdata +.text +.data +.bss +.idata$7T +.idata$5 +.idata$4p +.idata$6( +.text +.data +.bss +.idata$7D +.idata$5 +.idata$4P +.idata$6 +.text +.data +.bss +.idata$7< +.idata$5 +.idata$4@ +.idata$6 +.text +.data +.bss +.idata$74 +.idata$5 +.idata$40 +.idata$6 +.text +.data +.bss +.idata$70 +.idata$5 +.idata$4( +.idata$6 +.text +.data +.bss +.idata$7$ +.idata$5x +.idata$4 +.idata$6@ +.text +.data +.bss +.idata$7 +.idata$5h +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5` +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5P +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5@ +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$58 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$50 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5P +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$5( +.idata$4 +.idata$6 +.text +.data +.bss +.idata$7 +.idata$50 +.idata$4 +.idata$6 +.text +.data +.bss +.idata$78 +.idata$5 +.idata$4( +.idata$6J +.text +.data +.bss +.idata$7\ +.idata$5 +.idata$4p +.idata$6 +.file +cygming-crtend +.text +.data +.bss +.rsrc +__xc_z +__xl_a +_cexit +__xl_d +_tls_end +__tzname +memcpy +perror +puts +malloc +_CRT_MT +abort +__dll__ +calloc +write +Sleep +_commode +etext +__xi_z +signal +strncmp +memset +__xl_z +__end__ +__xi_a +__xc_a +_fmode +__xl_c +_newmode` +fwrite +exit +_errno +_exit +strlen +open +close +free +.debug_aranges +.debug_info +.debug_abbrev +.debug_line +.debug_frame +.debug_str +.debug_line_str +.debug_loclists +.debug_rnglists +__mingw_invalidParameterHandler +pre_c_init +.rdata$.refptr.__mingw_initltsdrot_force +.rdata$.refptr.__mingw_initltsdyn_force +.rdata$.refptr.__mingw_initltssuo_force +.rdata$.refptr.__ImageBase +.rdata$.refptr.__mingw_app_type +managedapp +.rdata$.refptr._fmode +.rdata$.refptr._commode +.rdata$.refptr._MINGW_INSTALL_DEBUG_MATHERR +.rdata$.refptr._matherr +pre_cpp_init +.rdata$.refptr._newmode +startinfo +.rdata$.refptr._dowildcard +__tmainCRTStartup +.rdata$.refptr.__native_startup_lock +.rdata$.refptr.__native_startup_state +has_cctor +.rdata$.refptr.__dyn_tls_init_callback +.rdata$.refptr._gnu_exception_handler +.rdata$.refptr.__mingw_oldexcpt_handler +.rdata$.refptr.__imp___initenv +.rdata$.refptr.__xc_z +.rdata$.refptr.__xc_a +.rdata$.refptr.__xi_z +.rdata$.refptr.__xi_a +WinMainCRTStartup +.l_startw +mainCRTStartup +.CRT$XCAA +.CRT$XIAA +.debug_info +.debug_abbrev +.debug_loclists +.debug_aranges +.debug_rnglists +.debug_line +.debug_str +.debug_line_str +.rdata$zzz +.debug_frame +_monstartup +.rdata$.refptr.etext +.rdata$.refptr.__eprol +.rdata$.refptr._mcleanup +.text.startup +.xdata.startup +.pdata.startup +__gcc_register_frame +__gcc_deregister_frame +checkPass +__do_global_dtors +__do_global_ctors +.rdata$.refptr.__CTOR_LIST__ +initialized +__dyn_tls_dtor +__dyn_tls_init +.rdata$.refptr._CRT_MT +__tlregdtor +__report_error +mark_section_writable +maxSections +_pei386_runtime_relocator +was_init.0 +.rdata$.refptr.__RUNTIME_PSEUDO_RELOC_LIST_END__ +.rdata$.refptr.__RUNTIME_PSEUDO_RELOC_LIST__ +__mingw_raise_matherr +stUserMathErr +__mingw_setusermatherr +_gnu_exception_handler +__mingwthr_run_key_dtors.part.0 +__mingwthr_cs +key_dtor_list +___w64_mingwthr_add_key_dtor +__mingwthr_cs_init +___w64_mingwthr_remove_key_dtor +__mingw_TLScallback +pseudo-reloc-list.c +_ValidateImageBase +_FindPESection +_FindPESectionByName +__mingw_GetSectionForAddress +__mingw_GetSectionCount +_FindPESectionExec +_GetPEImageBase +_IsNonwritableInCurrentImage +__mingw_enum_import_library_names +local__winitenv +local__initenv +_get_output_format +__getmainargs +__wgetmainargs +at_quick_exit +.rdata$.refptr.__mingw_module_is_dll +_amsg_exit +__ms_fwprintf +.rdata$.refptr.__imp__tzset +initial_daylight +initial_timezone +initial_tznames +initial_tzname0 +initial_tzname1 +monstartup +_mcleanup +gmon_out.0 +moncontrol +_mcount_private +.rdata$.refptr._gmonparam +get_thrpc +profthr_func +profile_ctl +register_frame_ctor +.ctors.65535 +__imp_ResumeThread +___RUNTIME_PSEUDO_RELOC_LIST__ +__daylight +__stdio_common_vfwprintf +__imp_abort +__lib64_libkernel32_a_iname +__imp___p__environ +__data_start__ +___DTOR_LIST__ +__imp_timezone +_head_lib64_libapi_ms_win_crt_private_l1_1_0_a +SetUnhandledExceptionFilter +.refptr.__mingw_initltsdrot_force +__imp_calloc +__imp___p__fmode +__imp___p___argc +__imp_tzname +__imp_scanf +___tls_start__ +.refptr.__native_startup_state +_set_invalid_parameter_handler +__imp_tzset +GetThreadContext +GetLastError +__imp__initialize_wide_environment +.refptr.etext +__rt_psrelocs_start +__dll_characteristics__ +__size_of_stack_commit__ +__lib64_libapi_ms_win_crt_time_l1_1_0_a_iname +__mingw_module_is_dll +__size_of_stack_reserve__ +__major_subsystem_version__ +___crt_xl_start__ +__imp_DeleteCriticalSection +__imp__set_invalid_parameter_handler +.refptr.__CTOR_LIST__ +VirtualQuery +__imp___p___argv +___crt_xi_start__ +__imp__amsg_exit +___crt_xi_end__ +.refptr.__mingw_module_is_dll +__imp__errno +.refptr.__imp___initenv +_tls_start +_mcount_top +__imp___stdio_common_vfscanf +.refptr._matherr +.refptr.__RUNTIME_PSEUDO_RELOC_LIST__ +__mingw_oldexcpt_handler +__imp_SetThreadPriority +.refptr._mcleanup +TlsGetValue +__bss_start__ +__imp___C_specific_handler +___RUNTIME_PSEUDO_RELOC_LIST_END__ +__imp___tzname +__size_of_heap_commit__ +__imp___stdio_common_vfprintf +__imp_GetLastError +.refptr._dowildcard +__imp__initialize_narrow_environment +__mingw_initltsdrot_force +__imp_free +__fentry__ +__imp__configure_wide_argv +SignalObjectAndWait +__imp_at_quick_exit +__lib64_libapi_ms_win_crt_math_l1_1_0_a_iname +__p__environ +.refptr.__mingw_app_type +__mingw_initltssuo_force +VirtualProtect +_head_lib64_libapi_ms_win_crt_environment_l1_1_0_a +__imp__tzset +___crt_xp_start__ +__imp_LeaveCriticalSection +__C_specific_handler +.refptr.__mingw_oldexcpt_handler +.refptr.__RUNTIME_PSEUDO_RELOC_LIST_END__ +__imp___ms_fwprintf +___crt_xp_end__ +__imp_CloseHandle +__minor_os_version__ +__p___argv +__lib64_libapi_ms_win_crt_string_l1_1_0_a_iname +EnterCriticalSection +_MINGW_INSTALL_DEBUG_MATHERR +__imp_puts +_set_new_mode +.refptr.__xi_a +__imp_CreateEventA +.refptr._CRT_MT +_head_lib64_libapi_ms_win_crt_math_l1_1_0_a +__imp_write +__imp__exit +__section_alignment__ +__native_dllmain_reason +__lib64_libapi_ms_win_crt_private_l1_1_0_a_iname +_tls_used +SetThreadPriority +__imp_memset +__IAT_end__ +_head_lib64_libapi_ms_win_crt_time_l1_1_0_a +.refptr.__eprol +__imp_memcpy +__RUNTIME_PSEUDO_RELOC_LIST__ +__stdio_common_vfscanf +.refptr._newmode +__data_end__ +__imp_fwrite +__CTOR_LIST__ +__imp__set_new_mode +_head_lib64_libapi_ms_win_crt_heap_l1_1_0_a +__imp___getmainargs +_head_lib64_libkernel32_a +__bss_end__ +__native_vcclrit_reason +___crt_xc_end__ +.refptr.__mingw_initltssuo_force +__imp_GetCurrentThread +__p__fmode +.refptr.__native_startup_lock +__imp_EnterCriticalSection +__imp_open +_tls_index +__acrt_iob_func +__native_startup_state +___crt_xc_start__ +__imp_GetThreadContext +___CTOR_LIST__ +_gmonparam +.refptr.__dyn_tls_init_callback +__imp_signal +_head_lib64_libapi_ms_win_crt_string_l1_1_0_a +.refptr.__mingw_initltsdyn_force +__rt_psrelocs_size +__imp_SignalObjectAndWait +.refptr.__ImageBase +__lib64_libapi_ms_win_crt_runtime_l1_1_0_a_iname +__imp___p___wargv +__imp_strlen +__imp_malloc +.refptr._gnu_exception_handler +__imp___wgetmainargs +ResumeThread +__imp___daylight +__file_alignment__ +__imp_InitializeCriticalSection +CloseHandle +__p__wenviron +_initialize_narrow_environment +_crt_at_quick_exit +InitializeCriticalSection +__imp_exit +__imp_CreateThread +_head_lib64_libapi_ms_win_crt_stdio_l1_1_0_a +__imp_vfprintf +__major_os_version__ +__mingw_pcinit +__imp___initenv +__IAT_start__ +DuplicateHandle +GetCurrentThread +__imp__cexit +__imp___stdio_common_vfwprintf +__imp_SetUnhandledExceptionFilter +__imp_perror +__imp__onexit +__DTOR_LIST__ +__set_app_type +__imp_Sleep +LeaveCriticalSection +__imp___setusermatherr +__size_of_heap_reserve__ +___crt_xt_start__ +__subsystem__ +__imp_TlsGetValue +__imp___p__wenviron +GetCurrentProcess +__setusermatherr +__imp___timezone +.refptr._commode +__imp_fprintf +_configure_wide_argv +__mingw_pcppinit +__imp___p__commode +__imp__crt_atexit +__lib64_libapi_ms_win_crt_environment_l1_1_0_a_iname +__p___argc +__imp_SuspendThread +__imp_VirtualProtect +___tls_end__ +.refptr.__imp__tzset +__imp_VirtualQuery +__imp__initterm +__mingw_initltsdyn_force +_dowildcard +__lib64_libapi_ms_win_crt_stdio_l1_1_0_a_iname +__dyn_tls_init_callback +__timezone +__lib64_libapi_ms_win_crt_heap_l1_1_0_a_iname +_initterm +__imp_WaitForSingleObject +__imp_strncmp +.refptr._fmode +__imp___acrt_iob_func +__major_image_version__ +WaitForSingleObject +__loader_flags__ +__imp_close +___chkstk_ms +__native_startup_lock +__p__commode +__rt_psrelocs_end +.refptr._gmonparam +__minor_subsystem_version__ +__minor_image_version__ +__imp___set_app_type +__imp__crt_at_quick_exit +__imp_printf +.refptr.__xc_a +CreateEventA +_configure_narrow_argv +CreateThread +.refptr.__xi_z +_crt_atexit +.refptr._MINGW_INSTALL_DEBUG_MATHERR +DeleteCriticalSection +_initialize_wide_environment +__imp__configure_narrow_argv +_head_lib64_libapi_ms_win_crt_runtime_l1_1_0_a +__RUNTIME_PSEUDO_RELOC_LIST_END__ +__imp___winitenv +SuspendThread +__imp_GetCurrentProcess +__imp_DuplicateHandle +.refptr.__xc_z +__imp__get_output_format +___crt_xt_end__ +__stdio_common_vfprintf +__imp_daylight +__p___wargv +__mingw_app_type diff --git a/Lect7/08.c b/Lect7/08.c new file mode 100644 index 0000000..40ef60d --- /dev/null +++ b/Lect7/08.c @@ -0,0 +1,12 @@ +#include +#include + +typedef struct list { + uint32_t id; + struct list *next; +} list; + +int main(void) +{ + return 0; +} diff --git a/Lect7/10_1_0.c b/Lect7/10_1_0.c new file mode 100644 index 0000000..37fd2dc --- /dev/null +++ b/Lect7/10_1_0.c @@ -0,0 +1,20 @@ +#include +#include +#include + +typedef struct list { + uint32_t id; + struct list *next; +} list; + +int main(void) +{ + list* head=NULL; + + head = calloc(1,sizeof(list)); + head->id = 1; + + printf("%d \n",head->id); + + return 0; +} diff --git a/Lect7/10_1_1.c b/Lect7/10_1_1.c new file mode 100644 index 0000000..ce7ec18 --- /dev/null +++ b/Lect7/10_1_1.c @@ -0,0 +1,23 @@ +#include +#include +#include + +typedef struct list { + uint32_t id; + struct list *next; +} list; + +int main(void) +{ + list* head=NULL; + + head = calloc(1,sizeof(list)); + head->id = 1; + + head->next = calloc(1,sizeof(list)); + head->next->id = 2; + + printf("%d %d\n",head->id, head->next->id); + + return 0; +} diff --git a/Lect7/10_1_2.c b/Lect7/10_1_2.c new file mode 100644 index 0000000..07c8150 --- /dev/null +++ b/Lect7/10_1_2.c @@ -0,0 +1,26 @@ +#include +#include +#include + +typedef struct list { + uint32_t id; + struct list *next; +} list; + +int main(void) +{ + list* head=NULL; + + head = calloc(1,sizeof(list)); + head->id = 1; + + head->next = calloc(1,sizeof(list)); + head->next->id = 2; + + head->next->next = calloc(1,sizeof(list)); + head->next->next->id = 3; + + printf("%d %d %d\n",head->id, head->next->id, head->next->next->id); + + return 0; +} diff --git a/Lect7/10_2_0.c b/Lect7/10_2_0.c new file mode 100644 index 0000000..4a675a7 --- /dev/null +++ b/Lect7/10_2_0.c @@ -0,0 +1,22 @@ +#include +#include +#include + +typedef struct list { + uint32_t id; + struct list *next; +} list; + +int main(void) +{ + list* head=NULL; + + head = malloc(sizeof(list)); + head->id = 1; + + /* Важно занести NULL в последний элемент */ + head->next = NULL; + + printf("%d \n",head->id); + return 0; +} diff --git a/Lect7/10_2_1.c b/Lect7/10_2_1.c new file mode 100644 index 0000000..ac26407 --- /dev/null +++ b/Lect7/10_2_1.c @@ -0,0 +1,25 @@ +#include +#include +#include + +typedef struct list { + uint32_t id; + struct list *next; +} list; + +int main(void) +{ + list* head=NULL; + + head = malloc(sizeof(list)); + head->id = 1; + + head->next = malloc(sizeof(list)); + head->next->id = 2; + +/* Важно занести NULL в последний элемент */ + head->next->next = NULL; + + printf("%d %d\n",head->id, head->next->id); + return 0; +} diff --git a/Lect7/10_2_3.c b/Lect7/10_2_3.c new file mode 100644 index 0000000..cc40fd4 --- /dev/null +++ b/Lect7/10_2_3.c @@ -0,0 +1,28 @@ +#include +#include +#include + +typedef struct list { + uint32_t id; + struct list *next; +} list; + +int main(void) +{ + list* head=NULL; + + head = malloc(sizeof(list)); + head->id = 1; + + head->next = malloc(sizeof(list)); + head->next->id = 2; + + head->next->next = malloc(sizeof(list)); + head->next->next->id = 3; + +/* Важно занести NULL в последний элемент */ + head->next->next->next=NULL; + + printf("%d %d %d\n",head->id, head->next->id, head->next->next->id); + return 0; +} diff --git a/Lect7/11_1.c b/Lect7/11_1.c new file mode 100644 index 0000000..e0cf0ef --- /dev/null +++ b/Lect7/11_1.c @@ -0,0 +1,37 @@ +#include +#include +#include + +typedef struct list { + uint32_t id; + struct list *next; +} list; + +//Итерационная печать +void printListIteration(list *p) +{ + while(p) + { + printf("%d ",p->id); + p = p->next; + } + printf("\n"); +} + +int main(void) +{ + list* head=NULL; + + head = calloc(1,sizeof(list)); + head->id = 1; + + head->next = calloc(1,sizeof(list)); + head->next->id = 2; + + head->next->next = calloc(1,sizeof(list)); + head->next->next->id = 3; + + printListIteration(head); + + return 0; +} diff --git a/Lect7/11_2.c b/Lect7/11_2.c new file mode 100644 index 0000000..6479e54 --- /dev/null +++ b/Lect7/11_2.c @@ -0,0 +1,37 @@ +#include +#include +#include + +typedef struct list { + uint32_t id; + struct list *next; +} list; + +//Рекурсивная печать +void printListRecurs(list *p) +{ + if(p) + { + printf("%d ",p->id); + printListRecurs(p->next); + } + printf("\n"); +} + +int main(void) +{ + list* head = NULL; + + head = calloc(1,sizeof(list)); + head->id = 1; + + head->next = calloc(1,sizeof(list)); + head->next->id = 2; + + head->next->next = calloc(1,sizeof(list)); + head->next->next->id = 3; + + printListRecurs(head); + + return 0; +} diff --git a/Lect7/12_1.c b/Lect7/12_1.c new file mode 100644 index 0000000..38d9238 --- /dev/null +++ b/Lect7/12_1.c @@ -0,0 +1,41 @@ +#include +#include +#include + +typedef struct list { + uint32_t id; + struct list *next; +} list; + +//Итерационная печать +void printListIteration(list *p) +{ + while(p) + { + printf("%d ",p->id); + p = p->next; + } + printf("\n"); +} + +/* Без заглавного элемента */ +void insert(list **head, int32_t value) +{ + list *new = calloc(1,sizeof(list)); + new->id = value; + new->next = *head; + *head = new; +} + +int main(void) +{ + list* L = NULL; + + insert(&L,3); + insert(&L,2); + insert(&L,1); + + printListIteration(L); + + return 0; +} diff --git a/Lect7/12_2.c b/Lect7/12_2.c new file mode 100644 index 0000000..f6a326c --- /dev/null +++ b/Lect7/12_2.c @@ -0,0 +1,41 @@ +#include +#include +#include + +typedef struct list { + uint32_t id; + struct list *next; +} list; + +//Итерационная печать +void printListIteration(list *p) +{ + while(p) + { + printf("%d ",p->id); + p = p->next; + } + printf("\n"); +} + +/* Без заглавного элемента и без двойного указателя*/ +list* insert2(list *head, int32_t value) +{ + list *new = calloc(1,sizeof(list)); + new->id = value; + new->next = head; + return new; +} + +int main(void) +{ + list* L=NULL; + + L = insert2(L,3); + L = insert2(L,2); + L = insert2(L,1); + + printListIteration(L); + + return 0; +} diff --git a/Lect7/14_insert_head.c b/Lect7/14_insert_head.c new file mode 100644 index 0000000..319a3c5 --- /dev/null +++ b/Lect7/14_insert_head.c @@ -0,0 +1,42 @@ +#include +#include +#include + +typedef struct list { + uint32_t id; + struct list *next; +} list; + +//Итерационная печать +void printListIteration(list *p) +{ + while(p) + { + printf("%d ",p->id); + p = p->next; + } + printf("\n"); +} + +/* С заглавным элементом, в этом случае двойной указатель не нужен*/ +void insert3(list *head, int32_t value) +{ + list *new = calloc(1,sizeof(list)); + new->id = value; + new->next = head->next; //в списке точно есть хотя бы одно звено + head->next = new; +} + +int main(void) +{ + list* L = calloc(1,sizeof(list)); // Добавляем заглавное звено + L->id = -1; // Эти данные не используются + + insert3(L,3); + insert3(L,2); + insert3(L,1); + + printListIteration(L); + + return 0; +} diff --git a/Lect7/15_insert_end.c b/Lect7/15_insert_end.c new file mode 100644 index 0000000..fcc33c0 --- /dev/null +++ b/Lect7/15_insert_end.c @@ -0,0 +1,54 @@ +#include +#include +#include + +typedef struct list { + uint32_t id; + struct list *next; +} list; + +//Итерационная печать +void printListIteration(list *p) +{ + while(p) + { + printf("%d ",p->id); + p = p->next; + } + printf("\n"); +} + +/* Без заглавного элемента c использованием двойного указателя*/ +void insert_end(list **head, int32_t value) +{ + list *new = calloc(1,sizeof(list)); + new->id = value; + if( *head == NULL ) + { // пустой список + *head = new; // изменяем голову списка + } + else + { + list *p = *head; + while(p->next != NULL) + p = p->next; //идем в конец списка + //~ for(;p->next;p = p->next){} //идем в конец списка + p->next = new; + + + } +} + + +int main(void) +{ + list* L = NULL; + + insert_end(&L,1); + insert_end(&L,2); + insert_end(&L,3); + + printListIteration(L); + + return 0; +} diff --git a/Lect7/16.c b/Lect7/16.c new file mode 100644 index 0000000..c863080 --- /dev/null +++ b/Lect7/16.c @@ -0,0 +1,51 @@ +#include +#include +#include + +typedef struct list { + uint32_t id; + struct list *next; +} list; + +//Итерационная печать +void printListIteration(list *p) +{ + while(p) + { + printf("%d ",p->id); + p = p->next; + } + printf("\n"); +} + +/* Без заглавного элемента и без двойного указателя*/ +list* insert_end2(list *head, int32_t value) +{ + list *new = calloc(1,sizeof(list)); + new->id = value; + if( head == NULL ) + {// пустой список + return new; + } + else + { + list *p = head; + while(p->next != NULL) + p = p->next; //идем в конец списка + p->next = new; + return head; + } +} + +int main(void) +{ + list* L = NULL; + + L = insert_end2(L,1); + L = insert_end2(L,2); + L = insert_end2(L,3); + + printListIteration(L); + + return 0; +} diff --git a/Lect7/17.c b/Lect7/17.c new file mode 100644 index 0000000..00e1827 --- /dev/null +++ b/Lect7/17.c @@ -0,0 +1,46 @@ +#include +#include +#include + +typedef struct list { + uint32_t id; + struct list *next; +} list; + +//Итерационная печать +void printListIteration(list *p) +{ + while(p) + { + printf("%d ",p->id); + p = p->next; + } + printf("\n"); +} + +/* Без заглавного элемента, рекурсивный вариант*/ +void insert_end_recurs(list **head, int32_t value) +{ + if(*head == NULL) + { + (*head) = calloc(1,sizeof(list)); + (*head)->id = value; + } + else + { + insert_end_recurs( &((*head)->next), value ); + } +} + +int main(void) +{ + list* L = NULL; + + insert_end_recurs(&L,1); + insert_end_recurs(&L,2); + insert_end_recurs(&L,3); + + printListIteration(L); + + return 0; +} diff --git a/Lect7/21_tree.c b/Lect7/21_tree.c new file mode 100644 index 0000000..0e6ea5f --- /dev/null +++ b/Lect7/21_tree.c @@ -0,0 +1,13 @@ +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left, *right; + struct tree *parent; // необязательное поле +} tree; + +int main(void) +{ + return 0; +} diff --git a/Lect7/22_0.c b/Lect7/22_0.c new file mode 100644 index 0000000..e2ad9ae --- /dev/null +++ b/Lect7/22_0.c @@ -0,0 +1,18 @@ +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left, *right; + struct tree *parent; // необязательное поле +} tree; + +int main(void) +{ + tree *tr = NULL; + + tr = calloc(1,sizeof(tree)); + tr->key = 1; + + return 0; +} diff --git a/Lect7/22_1.c b/Lect7/22_1.c new file mode 100644 index 0000000..d710c50 --- /dev/null +++ b/Lect7/22_1.c @@ -0,0 +1,24 @@ +#include +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left, *right; + struct tree *parent; // необязательное поле +} tree; + +int main(void) +{ + tree *tr = NULL; + + tr = calloc(1,sizeof(tree)); + tr->key = 1; + + tr->right = calloc(1,sizeof(tree)); + tr->right->key = 5; + + + + return 0; +} diff --git a/Lect7/22_2.c b/Lect7/22_2.c new file mode 100644 index 0000000..c25e533 --- /dev/null +++ b/Lect7/22_2.c @@ -0,0 +1,28 @@ +#include +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left, *right; + struct tree *parent; // необязательное поле +} tree; + +int main(void) +{ + tree *tr = NULL; + + tr = calloc(1,sizeof(tree)); + tr->key = 1; + + tr->right = calloc(1,sizeof(tree)); + tr->right->key = 5; + + tr->left = calloc(1,sizeof(tree)); + tr->left->key = 2; + + tr->left->left = calloc(1,sizeof(tree)); + tr->left->left->key=3; + + return 0; +} diff --git a/Lect7/22_3.c b/Lect7/22_3.c new file mode 100644 index 0000000..b81d432 --- /dev/null +++ b/Lect7/22_3.c @@ -0,0 +1,31 @@ +#include +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left, *right; + struct tree *parent; // необязательное поле +} tree; + +int main(void) +{ + tree *tr = NULL; + + tr = calloc(1,sizeof(tree)); + tr->key = 1; + + tr->right = calloc(1,sizeof(tree)); + tr->right->key = 5; + + tr->left = calloc(1,sizeof(tree)); + tr->left->key = 2; + + tr->left->left = calloc(1,sizeof(tree)); + tr->left->left->key=3; + + tr->left->right = calloc(1,sizeof(tree)); + tr->left->right->key=4; + + return 0; +} diff --git a/Lect7/26_Preorder.c b/Lect7/26_Preorder.c new file mode 100644 index 0000000..939fd44 --- /dev/null +++ b/Lect7/26_Preorder.c @@ -0,0 +1,47 @@ +#include +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left, *right; + struct tree *parent; // необязательное поле +} tree; + + +void preorder(tree *root) +{ + if(root == NULL) + return; + printf("%d ",root->key); + if(root->left)//! NULL + preorder(root->left); + if(root->right)//! NULL + preorder(root->right); +} + + +int main(void) +{ + tree *tr = NULL; + + tr = calloc(1,sizeof(tree)); + tr->key = 1; + + tr->right = calloc(1,sizeof(tree)); + tr->right->key = 5; + + tr->left = calloc(1,sizeof(tree)); + tr->left->key = 2; + + tr->left->left = calloc(1,sizeof(tree)); + tr->left->left->key=3; + + tr->left->right = calloc(1,sizeof(tree)); + tr->left->right->key=4; + + printf("Preorder\n"); + preorder(tr); + + return 0; +} diff --git a/Lect7/27_Inorder.c b/Lect7/27_Inorder.c new file mode 100644 index 0000000..24a56a8 --- /dev/null +++ b/Lect7/27_Inorder.c @@ -0,0 +1,57 @@ +#include +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left, *right; + struct tree *parent; // необязательное поле +} tree; + +void preorder(tree *root) +{ + if(root == NULL) + return; + printf("%d ",root->key); + if(root->left)//! NULL + preorder(root->left); + if(root->right)//! NULL + preorder(root->right); +} + +void inorder(tree *root) { + if(root == NULL) + return; + if(root->left) + inorder(root->left); + printf("%d ",root->key); + if(root->right) + inorder(root->right); +} + +int main(void) +{ + tree *tr = NULL; + + tr = calloc(1,sizeof(tree)); + tr->key = 1; + + tr->right = calloc(1,sizeof(tree)); + tr->right->key = 5; + + tr->left = calloc(1,sizeof(tree)); + tr->left->key = 2; + + tr->left->left = calloc(1,sizeof(tree)); + tr->left->left->key=3; + + tr->left->right = calloc(1,sizeof(tree)); + tr->left->right->key=4; + + printf("Preorder\n"); + preorder(tr); + printf("\nInorder\n"); + inorder(tr); + + return 0; +} diff --git a/Lect7/28_Postorder.c b/Lect7/28_Postorder.c new file mode 100644 index 0000000..7b43043 --- /dev/null +++ b/Lect7/28_Postorder.c @@ -0,0 +1,72 @@ +#include +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left, *right; + struct tree *parent; // необязательное поле +} tree; + + +void preorder(tree *root) +{ + if(root == NULL) + return; + printf("%d ",root->key); + if(root->left)//! NULL + preorder(root->left); + if(root->right)//! NULL + preorder(root->right); +} + +void inorder(tree *root) { + if(root == NULL) + return; + if(root->left) + inorder(root->left); + printf("%d ",root->key); + if(root->right) + inorder(root->right); +} + +void postorder(tree *root) +{ + if(root == NULL) + return; + if(root->left) + postorder(root->left); + if(root->right) + postorder(root->right); + printf("%d ",root->key); +} + + +int main(void) +{ + tree *tr = NULL; + + tr = calloc(1,sizeof(tree)); + tr->key = 1; + + tr->right = calloc(1,sizeof(tree)); + tr->right->key = 5; + + tr->left = calloc(1,sizeof(tree)); + tr->left->key = 2; + + tr->left->left = calloc(1,sizeof(tree)); + tr->left->left->key=3; + + tr->left->right = calloc(1,sizeof(tree)); + tr->left->right->key=4; + + printf("Preorder\n"); + preorder(tr); + printf("\nInorder\n"); + inorder(tr); + printf("\nPostorder\n"); + postorder(tr); + + return 0; +} diff --git a/Lect7/31_printBFS.c b/Lect7/31_printBFS.c new file mode 100644 index 0000000..1120c3e --- /dev/null +++ b/Lect7/31_printBFS.c @@ -0,0 +1,74 @@ +#include +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left, *right; + struct tree *parent; // необязательное поле +} tree; + +//Вычисляем высоту дерева +int heightTree(tree* p) +{ + if (p == NULL) + return 0; + else + { + /* вычисляем высоту каждого поддерева */ + int lheight = heightTree(p->left); + int rheight = heightTree(p->right); + + if (lheight > rheight) + return (lheight + 1); + else + return (rheight + 1); + } +} +//Печатаем все узлы на уровне level +void printCurrentLevel(tree* root, int level) +{ + if (root == NULL) + return; + if (level == 1) + printf("%d ", root->key); + else if (level > 1) + { + //если поменять местами то будет обход справа на лево + printCurrentLevel(root->right, level - 1); + + printCurrentLevel(root->left, level - 1); + } +} +//функция печати +void printBFS(tree* root) +{ + int h = heightTree(root); + for (int i = 1; i <= h; i++) + printCurrentLevel(root, i); +} + +int main(void) +{ + tree *tr = NULL; + + tr = calloc(1,sizeof(tree)); + tr->key = 1; + + tr->right = calloc(1,sizeof(tree)); + tr->right->key = 5; + + tr->left = calloc(1,sizeof(tree)); + tr->left->key = 2; + + tr->left->left = calloc(1,sizeof(tree)); + tr->left->left->key=3; + + tr->left->right = calloc(1,sizeof(tree)); + tr->left->right->key=4; + + printf("BFS (Breadth First Traversal)\n"); + printBFS(tr); + + return 0; +} diff --git a/Lect7/35_IsBST_Yes.c b/Lect7/35_IsBST_Yes.c new file mode 100644 index 0000000..e6defb0 --- /dev/null +++ b/Lect7/35_IsBST_Yes.c @@ -0,0 +1,127 @@ +#include +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left; + struct tree *right; + struct tree *parent; // необязательное поле +} tree; + +//Вычисляем высоту дерева +int heightTree(tree* p) +{ + if (p == NULL) + return 0; + else + { + /* вычисляем высоту каждого поддерева */ + int lheight = heightTree(p->left); + int rheight = heightTree(p->right); + + if (lheight > rheight) + return (lheight + 1); + else + return (rheight + 1); + } +} +//Печатаем все узлы на уровне level +void printCurrentLevel(tree* root, int level) +{ + if (root == NULL) + return; + if (level == 1) + printf("%d ", root->key); + else if (level > 1) + { + //если поменять местами то будет обход справа на лево + printCurrentLevel(root->left, level - 1); + printCurrentLevel(root->right, level - 1); + } +} +//функция печати +void printBFS(tree* root) +{ + int h = heightTree(root); + for (int i = 1; i <= h; i++) + printCurrentLevel(root, i); +} + +void preorder(tree *root) +{ + if(root == NULL) + return; + printf("%d ",root->key); + if(root->left) + preorder(root->left); + if(root->right) + preorder(root->right); +} + +typedef enum {false=0,true=1} bool; +bool isBST(tree* root) +{ +static tree *prev = NULL; + // traverse the tree in inorder fashion and keep track of prev node + if (root) + { + if (!isBST(root->left)) + return false; + // Allows only distinct valued nodes + if (prev != NULL && root->key <= prev->key) + return false; + prev = root; + return isBST(root->right); + } + return true; +} + +void inorder(tree *root) { + if(root == NULL) + return; + if(root->left) + inorder(root->left); + printf("%d ",root->key); + if(root->right) + inorder(root->right); +} + +int main(void) +{ + tree *tr = NULL; +//переимновываем узлы в предыдущем дереве + tr = calloc(1,sizeof(tree)); + tr->key = 8; + tr->right = calloc(1,sizeof(tree)); + tr->right->key = 10; + tr->left = calloc(1,sizeof(tree)); + tr->left->key = 3; + tr->left->left = calloc(1,sizeof(tree)); + tr->left->left->key=1; + tr->left->right = calloc(1,sizeof(tree)); + tr->left->right->key=6; +//добавляем узлы от 6 +//~ tr->left->right->key=6; + tr->left->right->left = calloc(1,sizeof(tree)); + tr->left->right->left->key = 4;//слева + tr->left->right->right = calloc(1,sizeof(tree)); + tr->left->right->right->key = 7;//справа +//добавляем узлы от 10 +//~ tr->right->key = 10; + tr->right->right = calloc(1,sizeof(tree)); + tr->right->right->key=14; + tr->right->right->left = calloc(1,sizeof(tree)); + tr->right->right->left->key=13; +//печатаем дерево + printf("BFS (Breadth First Traversal)\n"); + printBFS(tr); + printf("\nPreorder\n"); + preorder(tr); + printf("\n"); + printf("Is BST? %s\n",isBST(tr)?"YES":"NO"); + printf("\ninorder\n"); + inorder(tr); + + return 0; +} diff --git a/Lect7/38_isBST_NO.c b/Lect7/38_isBST_NO.c new file mode 100644 index 0000000..f6c4028 --- /dev/null +++ b/Lect7/38_isBST_NO.c @@ -0,0 +1,121 @@ +#include +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left; + struct tree *right; + struct tree *parent; // необязательное поле +} tree; + +//Вычисляем высоту дерева +int heightTree(tree* p) +{ + if (p == NULL) + return 0; + else + { + /* вычисляем высоту каждого поддерева */ + int lheight = heightTree(p->left); + int rheight = heightTree(p->right); + + if (lheight > rheight) + return (lheight + 1); + else + return (rheight + 1); + } +} +//Печатаем все узлы на уровне level +void printCurrentLevel(tree* root, int level) +{ + if (root == NULL) + return; + if (level == 1) + printf("%d ", root->key); + else if (level > 1) + { + //если поменять местами то будет обход справа на лево + printCurrentLevel(root->left, level - 1); + printCurrentLevel(root->right, level - 1); + } +} +//функция печати +void printBFS(tree* root) +{ + int h = heightTree(root); + for (int i = 1; i <= h; i++) + printCurrentLevel(root, i); +} + +void preorder(tree *root) +{ + if(root == NULL) + return; + printf("%d ",root->key); + if(root->left) + preorder(root->left); + if(root->right) + preorder(root->right); +} + + +_Bool isValidBST(tree* root,tree *minNode,tree* maxNode) +{ + if(!root) + return 1; + printf("root->key=%d minNode->key= %d maxNode->key%d \n",root->key,minNode->key,maxNode->key); + + if((minNode && root->key <= minNode->key) || + (maxNode && root->key >= maxNode->key)) + { + printf("0\n"); + return 0; + } + return isValidBST(root->left,minNode,root) && + isValidBST(root->right,root,maxNode); +} + +typedef enum {false=0,true=1} bool; +bool isBST(tree* root) +{ +static tree *prev = NULL; + // traverse the tree in inorder fashion and keep track of prev node + if (root) + { + if (!isBST(root->left)) + return false; + // Allows only distinct valued nodes + if (prev != NULL && root->key <= prev->key) + return false; + prev = root; + return isBST(root->right); + } + return true; +} + +int main(void) +{ + tree *tr = NULL; +//переимновываем узлы в предыдущем дереве + tr = calloc(1,sizeof(tree)); + tr->key = 5; + tr->right = calloc(1,sizeof(tree)); + tr->right->key = 4; + tr->left = calloc(1,sizeof(tree)); + tr->left->key = 1; +//добавляем узлы от 4 +//~ tr->right->key = 4; + tr->right->right = calloc(1,sizeof(tree)); + tr->right->right->key = 6; + tr->right->left = calloc(1,sizeof(tree)); + tr->right->left->key = 3; +//печатаем дерево + printf("BFS (Breadth First Traversal)\n"); + printBFS(tr); + printf("\nPreorder\n"); + preorder(tr); + printf("\n"); + printf("Is BST? %s\n",isBST(tr)?"YES":"NO"); + return 0; +} diff --git a/Lect7/40_insertBST.c b/Lect7/40_insertBST.c new file mode 100644 index 0000000..4607591 --- /dev/null +++ b/Lect7/40_insertBST.c @@ -0,0 +1,116 @@ +#include +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left, *right; + struct tree *parent; // необязательное поле +} tree; + + +void preorder(tree *root) +{ + if(root == NULL) + return; + printf("%d ",root->key); + if(root->left)//! NULL + preorder(root->left); + if(root->right)//! NULL + preorder(root->right); +} + +void inorder(tree *root) { + if(root == NULL) + return; + if(root->left) + inorder(root->left); + printf("%d ",root->key); + if(root->right) + inorder(root->right); +} + +void postorder(tree *root) +{ + if(root == NULL) + return; + if(root->left) + postorder(root->left); + if(root->right) + postorder(root->right); + printf("%d ",root->key); +} + + +//Вычисляем высоту дерева +int heightTree(tree* p) +{ + if (p == NULL) + return 0; + else + { + /* вычисляем высоту каждого поддерева */ + int lheight = heightTree(p->left); + int rheight = heightTree(p->right); + + if (lheight > rheight) + return (lheight + 1); + else + return (rheight + 1); + } +} +//Печатаем все узлы на уровне level +void printCurrentLevel(tree* root, int level) +{ + if (root == NULL) + return; + if (level == 1) + printf("%d ", root->key); + else if (level > 1) + { + //если поменять местами то будет обход справа на лево + printCurrentLevel(root->left, level - 1); + printCurrentLevel(root->right, level - 1); + } +} +//функция печати +void printBFS(tree* root) +{ + int h = heightTree(root); + for (int i = 1; i <= h; i++) + printCurrentLevel(root, i); +} + +void insert(tree **root,int key, tree *pt) { + if(!(*root)) + { +// дерево пустое или дошли до нужного места + *root=(tree *)calloc(1,sizeof(tree)); + (*root)->key=key; + (*root)->parent=pt; +// c calloc строчка ниже не нужа + (*root)->left=(*root)->right= NULL; + } + else if( key < (*root)->key) + insert( &((*root)->left) ,key,*root); + else + insert( &((*root)->right),key,*root); +} + +int main(void) +{ + tree *tr = NULL; + insert(&tr,10,NULL); + insert(&tr,5, NULL); + insert(&tr,15,NULL); + insert(&tr,3, NULL); + insert(&tr,7 ,NULL); + insert(&tr,18,NULL); + insert(&tr,1, NULL); + insert(&tr,6 ,NULL); + printf("BFS (Breadth First Traversal)\n"); + printBFS(tr); + printf("\nInorder\n"); + inorder(tr); + return 0; +} diff --git a/Lect7/42_insertBST_8.c b/Lect7/42_insertBST_8.c new file mode 100644 index 0000000..04c1e3c --- /dev/null +++ b/Lect7/42_insertBST_8.c @@ -0,0 +1,123 @@ +#include +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left, *right; + struct tree *parent; // необязательное поле +} tree; + + +void preorder(tree *root) +{ + if(root == NULL) + return; + printf("%d ",root->key); + if(root->left)//! NULL + preorder(root->left); + if(root->right)//! NULL + preorder(root->right); +} + +void inorder(tree *root) { + if(root == NULL) + return; + if(root->left) + inorder(root->left); + printf("%d ",root->key); + if(root->right) + inorder(root->right); +} + +void postorder(tree *root) +{ + if(root == NULL) + return; + if(root->left) + postorder(root->left); + if(root->right) + postorder(root->right); + printf("%d ",root->key); +} + + +//Вычисляем высоту дерева +int heightTree(tree* p) +{ + if (p == NULL) + return 0; + else + { + /* вычисляем высоту каждого поддерева */ + int lheight = heightTree(p->left); + int rheight = heightTree(p->right); + + if (lheight > rheight) + return (lheight + 1); + else + return (rheight + 1); + } +} +//Печатаем все узлы на уровне level +void printCurrentLevel(tree* root, int level) +{ + if (root == NULL) + return; + if (level == 1) + printf("%d ", root->key); + else if (level > 1) + { + //если поменять местами то будет обход справа на лево + printCurrentLevel(root->left, level - 1); + printCurrentLevel(root->right, level - 1); + } +} +//функция печати +void printBFS(tree* root) +{ + int h = heightTree(root); + for (int i = 1; i <= h; i++) + printCurrentLevel(root, i); +} + +void insert(tree **root,int key, tree *pt) { + if(!(*root)) + { +// дерево пустое или дошли до нужного места + *root=(tree *)calloc(1,sizeof(tree)); + (*root)->key=key; + (*root)->parent=pt; +// c calloc строчка ниже не нужа + (*root)->left=(*root)->right= NULL; + } + else if( key < (*root)->key) + insert( &((*root)->left) ,key,*root); + else + insert( &((*root)->right),key,*root); +} + +int main(void) +{ + tree *tr = NULL; + insert(&tr,10,NULL); + insert(&tr,5, NULL); + insert(&tr,15,NULL); + insert(&tr,3, NULL); + insert(&tr,7 ,NULL); + insert(&tr,18,NULL); + insert(&tr,1, NULL); + insert(&tr,6 ,NULL); + + printf("BFS (Breadth First Traversal)\n"); + printBFS(tr); + printf("\nInorder\n"); + inorder(tr); + insert(&tr,8, NULL); + printf("\n"); + printf("BFS (Breadth First Traversal)\n"); + printBFS(tr); + printf("\nInorder\n"); + inorder(tr); + return 0; +} diff --git a/Lect7/45_search.c b/Lect7/45_search.c new file mode 100644 index 0000000..1309a53 --- /dev/null +++ b/Lect7/45_search.c @@ -0,0 +1,158 @@ +#include +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left, *right; + struct tree *parent; // необязательное поле +} tree; + + +void preorder(tree *root) +{ + if(root == NULL) + return; + printf("%d ",root->key); + if(root->left)//! NULL + preorder(root->left); + if(root->right)//! NULL + preorder(root->right); +} + +void inorder(tree *root) { + if(root == NULL) + return; + if(root->left) + inorder(root->left); + printf("%d ",root->key); + if(root->right) + inorder(root->right); +} + +void postorder(tree *root) +{ + if(root == NULL) + return; + if(root->left) + postorder(root->left); + if(root->right) + postorder(root->right); + printf("%d ",root->key); +} + + +//Вычисляем высоту дерева +int heightTree(tree* p) +{ + if (p == NULL) + return 0; + else + { + /* вычисляем высоту каждого поддерева */ + int lheight = heightTree(p->left); + int rheight = heightTree(p->right); + + if (lheight > rheight) + return (lheight + 1); + else + return (rheight + 1); + } +} +//Печатаем все узлы на уровне level +void printCurrentLevel(tree* root, int level) +{ + if (root == NULL) + return; + if (level == 1) + printf("%d ", root->key); + else if (level > 1) + { + //если поменять местами то будет обход справа на лево + printCurrentLevel(root->left, level - 1); + printCurrentLevel(root->right, level - 1); + } +} +//функция печати +void printBFS(tree* root) +{ + int h = heightTree(root); + for (int i = 1; i <= h; i++) + printCurrentLevel(root, i); +} + +void insert(tree **root,int key, tree *pt) { + if(!(*root)) + { +// дерево пустое или дошли до нужного места + *root=(tree *)calloc(1,sizeof(tree)); + (*root)->key=key; + (*root)->parent=pt; +// c calloc строчка ниже не нужа + (*root)->left=(*root)->right= NULL; + } + else if( key < (*root)->key) + insert( &((*root)->left) ,key,*root); + else + insert( &((*root)->right),key,*root); +} + +/* Рекурсивная реализация */ +tree* search_tree(tree *root, int key) +{ + if(root==NULL || root->key == key) + return root; + else if(root->key > key) + return search_tree(root->left, key); + else + return search_tree(root->right, key); +} + +/* Итеративная версия */ +tree* search_tree_i(tree *root, int key){ + tree *find=root; + while(find && find->key!=key) { + if( key < find->key ) + find = find->left; + else + find = find->right; + } + return find; +} + +int main(void) +{ + tree *tr = NULL; + insert(&tr,10,NULL); + insert(&tr,5, NULL); + insert(&tr,15,NULL); + insert(&tr,3, NULL); + insert(&tr,7 ,NULL); + insert(&tr,18,NULL); + insert(&tr,1, NULL); + insert(&tr,6 ,NULL); + printf("BFS (Breadth First Traversal)\n"); + printBFS(tr); + printf("\nInorder\n"); + inorder(tr); + insert(&tr,8, NULL); + printf("\n"); + printf("BFS (Breadth First Traversal)\n"); + printBFS(tr); + printf("\nInorder\n"); + inorder(tr); +tree *node; + node = search_tree(tr,20); + if(node) + printf("\nsearch_tree = %d\n",node->key); + else + printf("\nNO\n"); + node = search_tree_i(tr,20); + if(node) + printf("search_tree_i = %d\n",node->key); + else + printf("\nNO\n"); + + + return 0; +} diff --git a/Lect7/52_searchKey.c b/Lect7/52_searchKey.c new file mode 100644 index 0000000..52bad46 --- /dev/null +++ b/Lect7/52_searchKey.c @@ -0,0 +1,177 @@ +#include +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left, *right; + struct tree *parent; // необязательное поле +} tree; + + +void preorder(tree *root) +{ + if(root == NULL) + return; + printf("%d ",root->key); + if(root->left)//! NULL + preorder(root->left); + if(root->right)//! NULL + preorder(root->right); +} + +void inorder(tree *root) { + if(root == NULL) + return; + if(root->left) + inorder(root->left); + printf("%d ",root->key); + if(root->right) + inorder(root->right); +} + +void postorder(tree *root) +{ + if(root == NULL) + return; + if(root->left) + postorder(root->left); + if(root->right) + postorder(root->right); + printf("%d ",root->key); +} + + +//Вычисляем высоту дерева +int heightTree(tree* p) +{ + if (p == NULL) + return 0; + else + { + /* вычисляем высоту каждого поддерева */ + int lheight = heightTree(p->left); + int rheight = heightTree(p->right); + + if (lheight > rheight) + return (lheight + 1); + else + return (rheight + 1); + } +} +//Печатаем все узлы на уровне level +void printCurrentLevel(tree* root, int level) +{ + if (root == NULL) + return; + if (level == 1) + printf("%d ", root->key); + else if (level > 1) + { + //если поменять местами то будет обход справа на лево + printCurrentLevel(root->left, level - 1); + printCurrentLevel(root->right, level - 1); + } +} +//функция печати +void printBFS(tree* root) +{ + int h = heightTree(root); + for (int i = 1; i <= h; i++) + printCurrentLevel(root, i); +} + +void insert(tree **root,int key, tree *pt) { + if(!(*root)) + { +// дерево пустое или дошли до нужного места + *root=(tree *)calloc(1,sizeof(tree)); + (*root)->key=key; + (*root)->parent=pt; +// c calloc строчка ниже не нужа + (*root)->left=(*root)->right= NULL; + } + else if( key < (*root)->key) + insert( &((*root)->left) ,key,*root); + else + insert( &((*root)->right),key,*root); +} + +/* Рекурсивная реализация */ +tree* search_tree(tree *root, int key) +{ + if(root==NULL || root->key == key) + return root; + else if(root->key > key) + return search_tree(root->left, key); + else + return search_tree(root->right, key); +} + +/* Итеративная версия */ +tree* search_tree_i(tree *root, int key){ + tree *find=root; + while(find && find->key!=key) { + if( key < find->key ) + find = find->left; + else + find = find->right; + } + return find; +} + + +tree * searchKey(tree *root, int key) +{ + if(!root) + return NULL; + if(root->key == key) + return root; + if(key < root->key ) + return searchKey(root->left, key); + return searchKey(root->right, key); +} + +tree* min_tree(tree *root) +{ + tree *find=root; + while(find && find->left) { + find = find->left; + } + return find; +} + + +int main(void) +{ + tree *tr = NULL; + insert(&tr,10,NULL); + insert(&tr,5, NULL); + insert(&tr,15,NULL); + insert(&tr,3, NULL); + insert(&tr,7 ,NULL); + insert(&tr,18,NULL); + insert(&tr,1, NULL); + insert(&tr,6 ,NULL); + printf("BFS (Breadth First Traversal)\n"); + printBFS(tr); + printf("\nInorder\n"); + inorder(tr); + insert(&tr,8, NULL); + printf("\n"); + printf("BFS (Breadth First Traversal)\n"); + printBFS(tr); + printf("\nInorder\n"); + inorder(tr); +tree *node; + node = search_tree(tr,8); + printf("\nsearch_tree = %d\n",node->key); + node = search_tree_i(tr,8); + printf("search_tree_i = %d\n",node->key); + node = searchKey(tr,8); + printf("searchKey = %d\n",node->key); + node = min_tree(tr); + printf("min_tree = %d\n",node->key); + + return 0; +} diff --git a/Lect7/53_left_follower_key.c b/Lect7/53_left_follower_key.c new file mode 100644 index 0000000..f7294fc --- /dev/null +++ b/Lect7/53_left_follower_key.c @@ -0,0 +1,196 @@ +#include +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left, *right; + struct tree *parent; // необязательное поле +} tree; + + +void preorder(tree *root) +{ + if(root == NULL) + return; + printf("%d ",root->key); + if(root->left)//! NULL + preorder(root->left); + if(root->right)//! NULL + preorder(root->right); +} + +void inorder(tree *root) { + if(root == NULL) + return; + if(root->left) + inorder(root->left); + printf("%d ",root->key); + if(root->right) + inorder(root->right); +} + +void postorder(tree *root) +{ + if(root == NULL) + return; + if(root->left) + postorder(root->left); + if(root->right) + postorder(root->right); + printf("%d ",root->key); +} + + +//Вычисляем высоту дерева +int heightTree(tree* p) +{ + if (p == NULL) + return 0; + else + { + /* вычисляем высоту каждого поддерева */ + int lheight = heightTree(p->left); + int rheight = heightTree(p->right); + + if (lheight > rheight) + return (lheight + 1); + else + return (rheight + 1); + } +} +//Печатаем все узлы на уровне level +void printCurrentLevel(tree* root, int level) +{ + if (root == NULL) + return; + if (level == 1) + printf("%d ", root->key); + else if (level > 1) + { + //если поменять местами то будет обход справа на лево + printCurrentLevel(root->left, level - 1); + printCurrentLevel(root->right, level - 1); + } +} +//функция печати +void printBFS(tree* root) +{ + int h = heightTree(root); + for (int i = 1; i <= h; i++) + printCurrentLevel(root, i); +} + +void insert(tree **root,int key, tree *pt) { + if(!(*root)) + { +// дерево пустое или дошли до нужного места + *root=(tree *)calloc(1,sizeof(tree)); + (*root)->key=key; + (*root)->parent=pt; +// c calloc строчка ниже не нужа + (*root)->left=(*root)->right= NULL; + } + else if( key < (*root)->key) + insert( &((*root)->left) ,key,*root); + else + insert( &((*root)->right),key,*root); +} + +/* Рекурсивная реализация */ +tree* search_tree(tree *root, int key) +{ + if(root==NULL || root->key == key) + return root; + else if(root->key > key) + return search_tree(root->left, key); + else + return search_tree(root->right, key); +} + +/* Итеративная версия */ +tree* search_tree_i(tree *root, int key){ + tree *find=root; + while(find && find->key!=key) { + if( key < find->key ) + find = find->left; + else + find = find->right; + } + return find; +} + + +tree * searchKey(tree *root, int key) +{ + if(!root) + return NULL; + if(root->key == key) + return root; + if(key < root->key ) + return searchKey(root->left, key); + return searchKey(root->right, key); +} + +tree* min_tree(tree *root) +{ + tree *find=root; + while(find && find->left) { + find = find->left; + } + return find; +} + +tree* left_follower_key(tree *root) { + if(root==NULL) + return root; + if(root->right) + return min_tree(root->right); + else { + tree *y = root->parent; + tree *x = root; + while(y && x==y->right) { + x = y; + y = y->parent; + } + return y; + } +} + +int main(void) +{ + tree *tr = NULL; + insert(&tr,10,NULL); + insert(&tr,5, NULL); + insert(&tr,15,NULL); + insert(&tr,3, NULL); + insert(&tr,7 ,NULL); + insert(&tr,18,NULL); + insert(&tr,1, NULL); + insert(&tr,6 ,NULL); + printf("BFS (Breadth First Traversal)\n"); + printBFS(tr); + printf("\nInorder\n"); + inorder(tr); + insert(&tr,8, NULL); + printf("\n"); + printf("BFS (Breadth First Traversal)\n"); + printBFS(tr); + printf("\nInorder\n"); + inorder(tr); +tree *node; + node = search_tree(tr,8); + printf("\nsearch_tree = %d\n",node->key); + node = search_tree_i(tr,8); + printf("search_tree_i = %d\n",node->key); + node = searchKey(tr,8); + printf("searchKey = %d\n",node->key); + node = min_tree(tr); + printf("min_tree = %d\n",node->key); + node = left_follower_key(tr); + printf("root=%d left_follower_key = %d\n",tr->key,node->key); + node = left_follower_key(tr->right); + printf("root=%d left_follower_key = %d\n",tr->right->key,node->key); + + return 0; +} diff --git a/Lect7/54_delete.c b/Lect7/54_delete.c new file mode 100644 index 0000000..366b128 --- /dev/null +++ b/Lect7/54_delete.c @@ -0,0 +1,227 @@ +#include +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left, *right; + struct tree *parent; // необязательное поле +} tree; + + +void preorder(tree *root) +{ + if(root == NULL) + return; + printf("%d ",root->key); + if(root->left)//! NULL + preorder(root->left); + if(root->right)//! NULL + preorder(root->right); +} + +void inorder(tree *root) { + if(root == NULL) + return; + if(root->left) + inorder(root->left); + printf("%d ",root->key); + if(root->right) + inorder(root->right); +} + +void postorder(tree *root) +{ + if(root == NULL) + return; + if(root->left) + postorder(root->left); + if(root->right) + postorder(root->right); + printf("%d ",root->key); +} + + +//Вычисляем высоту дерева +int heightTree(tree* p) +{ + if (p == NULL) + return 0; + else + { + /* вычисляем высоту каждого поддерева */ + int lheight = heightTree(p->left); + int rheight = heightTree(p->right); + + if (lheight > rheight) + return (lheight + 1); + else + return (rheight + 1); + } +} +//Печатаем все узлы на уровне level +void printCurrentLevel(tree* root, int level) +{ + if (root == NULL) + return; + if (level == 1) + printf("%d ", root->key); + else if (level > 1) + { + //если поменять местами то будет обход справа на лево + printCurrentLevel(root->left, level - 1); + printCurrentLevel(root->right, level - 1); + } +} +//функция печати +void printBFS(tree* root) +{ + int h = heightTree(root); + for (int i = 1; i <= h; i++) + printCurrentLevel(root, i); +} + +void insert(tree **root,int key, tree *pt) { + if(!(*root)) + { +// дерево пустое или дошли до нужного места + *root=(tree *)calloc(1,sizeof(tree)); + (*root)->key=key; + (*root)->parent=pt; +// c calloc строчка ниже не нужа + (*root)->left=(*root)->right= NULL; + } + else if( key < (*root)->key) + insert( &((*root)->left) ,key,*root); + else + insert( &((*root)->right),key,*root); +} + +/* Рекурсивная реализация */ +tree* search_tree(tree *root, int key) +{ + if(root==NULL || root->key == key) + return root; + else if(root->key > key) + return search_tree(root->left, key); + else + return search_tree(root->right, key); +} + +/* Итеративная версия */ +tree* search_tree_i(tree *root, int key){ + tree *find=root; + while(find && find->key!=key) { + if( key < find->key ) + find = find->left; + else + find = find->right; + } + return find; +} + + +tree * searchKey(tree *root, int key) +{ + if(!root) + return NULL; + if(root->key == key) + return root; + if(key < root->key ) + return searchKey(root->left, key); + return searchKey(root->right, key); +} + +tree* min_tree(tree *root) +{ + tree *find=root; + while(find && find->left) { + find = find->left; + } + return find; +} + +tree* left_follower_key(tree *root) { + if(root==NULL) + return root; + if(root->right) + return min_tree(root->right); + else { + tree *y = root->parent; + tree *x = root; + while(y && x==y->right) { + x = y; + y = y->parent; + } + return y; + } +} + + /* Удаление узла из дерева */ +tree* delete(tree *root, tree* pt) { + tree *remove = NULL, *remove_son; + /* Нет потомков или один потомок. Удаляем сам узел */ + if(pt->left == NULL || pt->right == NULL) + remove = pt; + else + /* Два потомка. Удаляем его последователя. + * У последователя только один правый потомок, + * потому что это самый левый элемент правого поддерева.*/ + remove = left_follower_key(pt);// Всегда только один потомок + /* Прикрепляем потомка удаляемого элемента к + * родителю, либо делаем этого потомка корнем дерева*/ + if(remove -> left != NULL) // не сработает если это последователь pt + remove_son = remove->left; + else + remove_son = remove->right; + if( remove_son ) // обновляем родителя у удаляемого потомка + remove_son->parent = remove->parent; + if(remove->parent==NULL) // если удаляем корень + root = remove_son; + else if (remove == remove->parent->left) + remove->parent->left = remove_son; + else + remove->parent->right = remove_son; + if(pt != remove) + pt->key = remove->key; + return remove; +} + + +int main(void) +{ + tree *tr = NULL; + insert(&tr,10,NULL); + insert(&tr,5, NULL); + insert(&tr,15,NULL); + insert(&tr,3, NULL); + insert(&tr,7 ,NULL); + insert(&tr,18,NULL); + insert(&tr,1, NULL); + insert(&tr,6 ,NULL); + printf("BFS (Breadth First Traversal)\n"); + printBFS(tr); + printf("\nInorder\n"); + inorder(tr); + insert(&tr,8, NULL); + printf("\n"); + printf("BFS (Breadth First Traversal)\n"); + printBFS(tr); + printf("\nInorder\n"); + inorder(tr); +tree *node; + node = search_tree(tr,8); + printf("\nsearch_tree = %d\n",node->key); + node = search_tree_i(tr,8); + printf("search_tree_i = %d\n",node->key); + node = searchKey(tr,8); + printf("searchKey = %d\n",node->key); + node = min_tree(tr); + printf("min_tree = %d\n",node->key); + node = left_follower_key(tr); + printf("root=%d left_follower_key = %d\n",tr->key,node->key); + node = left_follower_key(tr->right); + printf("root=%d left_follower_key = %d\n",tr->right->key,node->key); + + return 0; +} diff --git a/Lect7/55_delete_test.c b/Lect7/55_delete_test.c new file mode 100644 index 0000000..09bb93f --- /dev/null +++ b/Lect7/55_delete_test.c @@ -0,0 +1,218 @@ +#include +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left, *right; + struct tree *parent; // необязательное поле +} tree; + + +void preorder(tree *root) +{ + if(root == NULL) + return; + printf("%d ",root->key); + if(root->left)//! NULL + preorder(root->left); + if(root->right)//! NULL + preorder(root->right); +} + +void inorder(tree *root) { + if(root == NULL) + return; + if(root->left) + inorder(root->left); + printf("%d ",root->key); + if(root->right) + inorder(root->right); +} + +void postorder(tree *root) +{ + if(root == NULL) + return; + if(root->left) + postorder(root->left); + if(root->right) + postorder(root->right); + printf("%d ",root->key); +} + + +//Вычисляем высоту дерева +int heightTree(tree* p) +{ + if (p == NULL) + return 0; + else + { + /* вычисляем высоту каждого поддерева */ + int lheight = heightTree(p->left); + int rheight = heightTree(p->right); + + if (lheight > rheight) + return (lheight + 1); + else + return (rheight + 1); + } +} +//Печатаем все узлы на уровне level +void printCurrentLevel(tree* root, int level) +{ + if (root == NULL) + return; + if (level == 1) + printf("%d ", root->key); + else if (level > 1) + { + //если поменять местами то будет обход справа на лево + printCurrentLevel(root->left, level - 1); + printCurrentLevel(root->right, level - 1); + } +} +//функция печати +void printBFS(tree* root) +{ + int h = heightTree(root); + for (int i = 1; i <= h; i++) + printCurrentLevel(root, i); +} + +void insert(tree **root,int key, tree *pt) { + if(!(*root)) + { +// дерево пустое или дошли до нужного места + *root=(tree *)calloc(1,sizeof(tree)); + (*root)->key=key; + (*root)->parent=pt; +// c calloc строчка ниже не нужа + (*root)->left=(*root)->right= NULL; + } + else if( key < (*root)->key) + insert( &((*root)->left) ,key,*root); + else + insert( &((*root)->right),key,*root); +} + +/* Рекурсивная реализация */ +tree* search_tree(tree *root, int key) +{ + if(root==NULL || root->key == key) + return root; + else if(root->key > key) + return search_tree(root->left, key); + else + return search_tree(root->right, key); +} + +/* Итеративная версия */ +tree* search_tree_i(tree *root, int key){ + tree *find=root; + while(find && find->key!=key) { + if( key < find->key ) + find = find->left; + else + find = find->right; + } + return find; +} + + +tree * searchKey(tree *root, int key) +{ + if(!root) + return NULL; + if(root->key == key) + return root; + if(key < root->key ) + return searchKey(root->left, key); + return searchKey(root->right, key); +} + +tree* min_tree(tree *root) +{ + tree *find=root; + while(find && find->left) { + find = find->left; + } + return find; +} + +tree* left_follower_key(tree *root) { + if(root==NULL) + return root; + if(root->right) + return min_tree(root->right); + else { + tree *y = root->parent; + tree *x = root; + while(y && x==y->right) { + x = y; + y = y->parent; + } + return y; + } +} + + /* Удаление узла из дерева */ +tree* delete(tree *root, tree* pt) { + tree *remove = NULL, *remove_son; + /* Нет потомков или один потомок. Удаляем сам узел */ + if(pt->left == NULL || pt->right == NULL) + remove = pt; + else + /* Два потомка. Удаляем его последователя.У последователя только один правый потомок, потому что это самый левый элемент правого поддерева.*/ + remove = left_follower_key(pt);// Всегда только один потомок + /* Прикрепляем потомка удаляемого элемента к +родителю, либо делаем этого потомка корнем дерева*/ + if(remove -> left != NULL) // не сработает если это последователь pt + remove_son = remove->left; + else + remove_son = remove->right; + if( remove_son ) // обновляем родителя у удаляемого потомка + remove_son->parent = remove->parent; + if(remove->parent==NULL) // если удаляем корень + root = remove_son; + else if (remove == remove->parent->left) + remove->parent->left = remove_son; + else + remove->parent->right = remove_son; + if(pt != remove) + pt->key = remove->key; + return remove; +} + + int main() +{ + tree *tr = NULL; + insert(&tr,10,NULL); + insert(&tr,5, NULL); + insert(&tr,15,NULL); + insert(&tr,3, NULL); + insert(&tr,7 ,NULL); + insert(&tr,13,NULL); + insert(&tr,18,NULL); + insert(&tr,1, NULL); + insert(&tr,6 ,NULL); + printBFS(tr); + printf("\n"); + + preorder(tr); + printf("\n"); + postorder(tr); + printf("\n"); + inorder(tr); + printf("\n"); + printBFS(searchKey(tr,15)); + printf("\n"); + tree *del = NULL; + del = delete(tr,searchKey(tr,15)); + free(del); + inorder(tr); + printf("\n"); + return 0; +} + diff --git a/Lect7/66_AVL_tree.c b/Lect7/66_AVL_tree.c new file mode 100644 index 0000000..584fe57 --- /dev/null +++ b/Lect7/66_AVL_tree.c @@ -0,0 +1,17 @@ +#include +#include +#include + +struct node { + int key; + uint32_t height; + struct node *left; + struct node *right; +}; + + +int main(void) +{ + return 0; +} + diff --git a/Lect7/67_insert.c b/Lect7/67_insert.c new file mode 100644 index 0000000..6a3ff8c --- /dev/null +++ b/Lect7/67_insert.c @@ -0,0 +1,33 @@ +#include +#include +#include + +struct node { + int key; + uint32_t height; + struct node *left; + struct node *right; +}; + +struct node* insert(struct node *p, int k) +{ + if( p==NULL ) { + p=(struct node*)calloc(1,sizeof(struct node)); + p->key=k; + return p; + } + if( k < p->key ) + p->left = insert(p->left, k); + else + p->right = insert(p->right,k); + return balance(p); + //~ return p;//без балансировки обычное дерево поиска +} + + + +int main(void) +{ + return 0; +} + diff --git a/Lect7/68_bfactor.c b/Lect7/68_bfactor.c new file mode 100644 index 0000000..77ca339 --- /dev/null +++ b/Lect7/68_bfactor.c @@ -0,0 +1,52 @@ +#include +#include +#include + +struct node { + int key; + uint32_t height; + struct node *left; + struct node *right; +}; + +struct node* insert(struct node *p, int k) +{ + if( p==NULL ) { + p=malloc(sizeof(struct node)); + p->key=k; + p->height=0; + p->left = p->right=NULL; + return p; + } + if( k < p->key ) + p->left = insert( p->left,k); + else + p->right = insert( p->right,k); + return balance(p); +} + +/* Высота поддерева */ +uint32_t height(struct node* p) { + return p?p->height:0; +} + + +/* Вычисляем баланс фактор узла */ +int bfactor(struct node* p) { + return height(p->right)-height(p->left); +} + +/* Восстанавливаем корректно значение высоты */ +void fixheight(struct node* p) +{ + uint32_t hl = height(p->left); + uint32_t hr = height(p->right); + p->height = (hl>hr?hl:hr)+1; +} + + +int main(void) +{ + return 0; +} + diff --git a/Lect7/70_rotate.c b/Lect7/70_rotate.c new file mode 100644 index 0000000..76e532c --- /dev/null +++ b/Lect7/70_rotate.c @@ -0,0 +1,72 @@ +#include +#include +#include + +struct node { + int key; + uint32_t height; + struct node *left; + struct node *right; +}; + +struct node* insert(struct node *p, int k) +{ + if( p==NULL ) { + p=malloc(sizeof(struct node)); + p->key=k; + p->height=0; + p->left = p->right=NULL; + return p; + } + if( k < p->key ) + p->left = insert( p->left,k); + else + p->right = insert( p->right,k); + return balance(p); +} + +/* Высота поддерева */ +uint32_t height(struct node* p) { + return p?p->height:0; +} + + +/* Вычисляем баланс фактор узла */ +int bfactor(struct node* p) { + return height(p->right)-height(p->left); +} + +/* Восстанавливаем корректно значение высоты */ +void fixheight(struct node* p) +{ + uint32_t hl = height(p->left); + uint32_t hr = height(p->right); + p->height = (hl>hr?hl:hr)+1; +} + +/* левый поворот вокруг Y */ +struct node* rotateleft(struct node* Y) { + struct node* X = Y->right; + Y->right = X->left; + X->left = Y; + fixheight(Y); + fixheight(X); + return X; +} + +/* правый поворот вокруг X */ +struct node* rotateright(struct node* X) { + struct node* Y = X->left; + X->left = Y->right; + Y->right = X; + fixheight(X); + fixheight(Y); + return Y; +} + + +int main(void) +{ + return 0; +} + diff --git a/Lect7/70_test_AVL.c b/Lect7/70_test_AVL.c new file mode 100644 index 0000000..4a3a094 --- /dev/null +++ b/Lect7/70_test_AVL.c @@ -0,0 +1,157 @@ +#include +#include +#include + +struct node { + int key; + uint32_t height; + struct node *left; + struct node *right; +}; + +struct node* balance(struct node* p); + +struct node* insert(struct node *p, int k) +{ + if( p==NULL ) { + p=malloc(sizeof(struct node)); + p->key=k; + p->height=0; + p->left = p->right=NULL; + return p; + } + if( k < p->key ) + p->left = insert( p->left,k); + else + p->right = insert( p->right,k); + return balance(p); +} + +/* Высота поддерева */ +uint32_t height(struct node* p) { + return p?p->height:0; +} + + +/* Вычисляем баланс фактор узла */ +int bfactor(struct node* p) { + return height(p->right)-height(p->left); +} + +/* Восстанавливаем корректно значение высоты */ +void fixheight(struct node* p) +{ + uint32_t hl = height(p->left); + uint32_t hr = height(p->right); + p->height = (hl>hr?hl:hr)+1; +} + +/* левый поворот вокруг Y */ +struct node* rotateleft(struct node* Y) { + struct node* X = Y->right; + Y->right = X->left; + X->left = Y; + fixheight(Y); + fixheight(X); + return X; +} + +/* правый поворот вокруг X */ +struct node* rotateright(struct node* X) { + struct node* Y = X->left; + X->left = Y->right; + Y->right = X; + fixheight(X); + fixheight(Y); + return Y; +} + +/* балансировка узла p */ +struct node* balance(struct node* p) +{ + fixheight(p); + if( bfactor(p)==2) + { + if( bfactor(p->right) < 0 ) + p->right = rotateright(p->right); + return rotateleft(p); + } + if( bfactor(p)==-2 ) + { + if( bfactor(p->left) > 0 ) + p->left = rotateleft(p->left); + return rotateright(p); + } + return p; // балансировка не нужна +} + +void inorder(struct node *root) { + if(root == NULL) + return; + if(root->left) + inorder(root->left); + printf("%d ",root->key); + if(root->right) + inorder(root->right); +} + +//Вычисляем высоту дерева +int heightTree(struct node* p) +{ + if (p == NULL) + return 0; + else + { + /* вычисляем высоту каждого поддерева */ + int lheight = heightTree(p->left); + int rheight = heightTree(p->right); + + if (lheight > rheight) + return (lheight + 1); + else + return (rheight + 1); + } +} +//Печатаем все узлы на уровне level +void printCurrentLevel(struct node* root, int level) +{ + if (root == NULL) + return; + if (level == 1) + printf("%d ", root->key); + else if (level > 1) + { + //если поменять местами то будет обход справа на лево + printCurrentLevel(root->left, level - 1); + printCurrentLevel(root->right, level - 1); + } +} +//функция печати +void printBFS(struct node* root) +{ + int h = heightTree(root); + for (int i = 1; i <= h; i++) + printCurrentLevel(root, i); +} + + +int main(void) +{ + struct node* tr=NULL; + tr = insert(tr,10); + tr = insert(tr,5); + tr = insert(tr,15); + tr = insert(tr,3); + tr = insert(tr,7); + tr = insert(tr,13); + tr = insert(tr,18); + tr = insert(tr,1); + tr = insert(tr,6); + + printf("\nInorder\n"); + inorder(tr); + printf("\nBFS (Breadth First Traversal)\n"); + printBFS(tr); + return 0; +} + diff --git a/Lect7/72_test_AVL.c b/Lect7/72_test_AVL.c new file mode 100644 index 0000000..d05c95b --- /dev/null +++ b/Lect7/72_test_AVL.c @@ -0,0 +1,157 @@ +#include +#include +#include + +struct node { + int key; + uint32_t height; + struct node *left; + struct node *right; +}; + +struct node* balance(struct node* p); + +struct node* insert(struct node *p, int k) +{ + if( p==NULL ) { + p=malloc(sizeof(struct node)); + p->key=k; + p->height=0; + p->left = p->right=NULL; + return p; + } + if( k < p->key ) + p->left = insert( p->left,k); + else + p->right = insert( p->right,k); + return balance(p); +} + +/* Высота поддерева */ +uint32_t height(struct node* p) { + return p?p->height:0; +} + + +/* Вычисляем баланс фактор узла */ +int bfactor(struct node* p) { + return height(p->right)-height(p->left); +} + +/* Восстанавливаем корректно значение высоты */ +void fixheight(struct node* p) +{ + uint32_t hl = height(p->left); + uint32_t hr = height(p->right); + p->height = (hl>hr?hl:hr)+1; +} + +/* левый поворот вокруг Y */ +struct node* rotateleft(struct node* Y) { + struct node* X = Y->right; + Y->right = X->left; + X->left = Y; + fixheight(Y); + fixheight(X); + return X; +} + +/* правый поворот вокруг X */ +struct node* rotateright(struct node* X) { + struct node* Y = X->left; + X->left = Y->right; + Y->right = X; + fixheight(X); + fixheight(Y); + return Y; +} + +/* балансировка узла p */ +struct node* balance(struct node* p) +{ + fixheight(p); + if( bfactor(p)==2) + { + if( bfactor(p->right) < 0 ) + p->right = rotateright(p->right); + return rotateleft(p); + } + if( bfactor(p)==-2 ) + { + if( bfactor(p->left) > 0 ) + p->left = rotateleft(p->left); + return rotateright(p); + } + return p; // балансировка не нужна +} + +void inorder(struct node *root) { + if(root == NULL) + return; + if(root->left) + inorder(root->left); + printf("%d ",root->key); + if(root->right) + inorder(root->right); +} + +//Вычисляем высоту дерева +int heightTree(struct node* p) +{ + if (p == NULL) + return 0; + else + { + /* вычисляем высоту каждого поддерева */ + int lheight = heightTree(p->left); + int rheight = heightTree(p->right); + + if (lheight > rheight) + return (lheight + 1); + else + return (rheight + 1); + } +} +//Печатаем все узлы на уровне level +void printCurrentLevel(struct node* root, int level) +{ + if (root == NULL) + return; + if (level == 1) + printf("%d ", root->key); + else if (level > 1) + { + //если поменять местами то будет обход справа на лево + printCurrentLevel(root->left, level - 1); + printCurrentLevel(root->right, level - 1); + } +} +//функция печати +void printBFS(struct node* root) +{ + int h = heightTree(root); + for (int i = 1; i <= h; i++) + printCurrentLevel(root, i); +} + + +int main(void) +{ + struct node* tr=NULL; + tr = insert(tr,1); + tr = insert(tr,3); + tr = insert(tr,5); + tr = insert(tr,6); + tr = insert(tr,7); + tr = insert(tr,10); + tr = insert(tr,15); + tr = insert(tr,13); + tr = insert(tr,18); + + printf("\nInorder\n"); + inorder(tr); + printf("\nBFS (Breadth First Traversal)\n"); + printBFS(tr); + return 0; +} + diff --git a/Lect7/73-74_delete.c b/Lect7/73-74_delete.c new file mode 100644 index 0000000..15abcd0 --- /dev/null +++ b/Lect7/73-74_delete.c @@ -0,0 +1,207 @@ +#include +#include +#include + +struct node { + int key; + uint32_t height; + struct node *left; + struct node *right; +}; + +struct node* balance(struct node* p); + +struct node* insert(struct node *p, int k) +{ + if( p==NULL ) { + p=malloc(sizeof(struct node)); + p->key=k; + p->height=0; + p->left = p->right=NULL; + return p; + } + if( k < p->key ) + p->left = insert( p->left,k); + else + p->right = insert( p->right,k); + return balance(p); +} + +/* Высота поддерева */ +uint32_t height(struct node* p) { + return p?p->height:0; +} + + +/* Вычисляем баланс фактор узла */ +int bfactor(struct node* p) { + return height(p->right)-height(p->left); +} + +/* Восстанавливаем корректно значение высоты */ +void fixheight(struct node* p) +{ + uint32_t hl = height(p->left); + uint32_t hr = height(p->right); + p->height = (hl>hr?hl:hr)+1; +} + +/* левый поворот вокруг Y */ +struct node* rotateleft(struct node* Y) { + struct node* X = Y->right; + Y->right = X->left; + X->left = Y; + fixheight(Y); + fixheight(X); + return X; +} + +/* правый поворот вокруг X */ +struct node* rotateright(struct node* X) { + struct node* Y = X->left; + X->left = Y->right; + Y->right = X; + fixheight(X); + fixheight(Y); + return Y; +} + +/* балансировка узла p */ +struct node* balance(struct node* p) +{ + fixheight(p); + if( bfactor(p)==2) + { + if( bfactor(p->right) < 0 ) + p->right = rotateright(p->right); + return rotateleft(p); + } + if( bfactor(p)==-2 ) + { + if( bfactor(p->left) > 0 ) + p->left = rotateleft(p->left); + return rotateright(p); + } + return p; // балансировка не нужна +} +/* Находим минимальный ключ в этом поддереве. + * По свойству двоичного дерева поиска этот ключ находится + * в конце левой ветки, начиная от корня дерева */ +struct node* findmin(struct node* p) // поиск узла с минимальным ключом в дереве p +{ + return p->left?findmin(p->left):p; +} +// удаление узла с минимальным ключом из дерева p +struct node* removemin(struct node* p) +{ + if( p->left==0 ) + return p->right; + p->left = removemin(p->left); + return balance(p); +} + + /* удаление ключа k из дерева p */ +struct node *removenode(struct node *p, int k) +{ + /* ищем нужный ключ */ + if( !p ) return 0; // если не нашли + if( k < p->key ) + p->left = removenode(p->left,k); + else if( k > p->key ) + p->right = removenode(p->right,k); + else // k == p->key + { + struct node* q = p->left; + struct node* r = p->right; + free(p); + /* Если правого поддерева нет то по свойству АВЛ-дерева слева у этого узламожет быть только один единственный дочерний узел (дерево высоты 1), либо узел p вообще лист */ + if( !r ) + return q; + /* Находим последователя. Извлекаем его оттуда, + * слева к min подвешиваем q, справа — то, что получилось из r, + * возвращаем min после его балансировки. */ + struct node* min = findmin(r); + min->right = removemin(r); + min->left = q; + return balance(min); + } + return balance(p); +} + +void inorder(struct node *root) { + if(root == NULL) + return; + if(root->left) + inorder(root->left); + printf("%d ",root->key); + if(root->right) + inorder(root->right); +} + +//Вычисляем высоту дерева +int heightTree(struct node* p) +{ + if (p == NULL) + return 0; + else + { + /* вычисляем высоту каждого поддерева */ + int lheight = heightTree(p->left); + int rheight = heightTree(p->right); + + if (lheight > rheight) + return (lheight + 1); + else + return (rheight + 1); + } +} +//Печатаем все узлы на уровне level +void printCurrentLevel(struct node* root, int level) +{ + if (root == NULL) + return; + if (level == 1) + printf("%d ", root->key); + else if (level > 1) + { + //если поменять местами то будет обход справа на лево + printCurrentLevel(root->left, level - 1); + printCurrentLevel(root->right, level - 1); + } +} +//функция печати +void printBFS(struct node* root) +{ + int h = heightTree(root); + for (int i = 1; i <= h; i++) + printCurrentLevel(root, i); +} + +int main(void) +{ + struct node* tr=NULL; + tr = insert(tr,10); + tr = insert(tr,5); + tr = insert(tr,15); + tr = insert(tr,3); + tr = insert(tr,7); + tr = insert(tr,13); + tr = insert(tr,18); + tr = insert(tr,1); + tr = insert(tr,6); + + printf("\nInorder\n"); + inorder(tr); + printf("\nBFS (Breadth First Traversal)\n"); + printBFS(tr); + + tr = removenode(tr,10); + + printf("\nInorder\n"); + inorder(tr); + printf("\nBFS (Breadth First Traversal)\n"); + printBFS(tr); + + return 0; +} + diff --git a/Lect8/11.txt b/Lect8/11.txt new file mode 100644 index 0000000..2817302 --- /dev/null +++ b/Lect8/11.txt @@ -0,0 +1,5 @@ +set xrange[-2:2] +set yrange[-1:10] +plot x*x+3 +plot x*x+3, 0 +plot x**5+3, 0 \ No newline at end of file diff --git a/Lect8/17-18_FindLineSearch.c b/Lect8/17-18_FindLineSearch.c new file mode 100644 index 0000000..93612ed --- /dev/null +++ b/Lect8/17-18_FindLineSearch.c @@ -0,0 +1,31 @@ +#include +#include + +typedef float(*function)(float); + +float rootFindLineSearch(float xl, float xr, float eps, function f) +{ + float minx = xl, nextstep; + nextstep = fabs(xr-xl)/(1/eps); //разбиваем на отрезки интервал + int stepcount=0; + for(float x=xl; x +#include + +typedef float(*function)(float); + +//(-2, -1.5) (-1.5, -1) (-1, -0.5) (-0.5, 0) +float f(float x) { + return 8*x*x*x*x + 32*x*x*x + 40*x*x + 16*x + 1; +} + +int signF(float x) +{ + return f(x)==0 ? 0 : (f(x) < 0 ? -1:+1); +} + +float rootFindLineSearch(float xl, float xr, float eps, function f) { + float x, minx = xl, nextstep; + nextstep = fabs(xr-xl)/(1/eps); //разбиваем на отрезки интервал + int stepcount=0; + for(x=xl; xeps) { //вещественный модуль разницы или floatabs + stepcount++; + xm=(xl+xr)/2; // середина отрезка + if(signF(xl) != signF(xm)) //если знак отличается + xr=xm; + else + xl=xm; + } + printf("Find Div Search root for %d steps\n",stepcount); //статистика + return (xl+xr)/2; +} + + float rootFindDiv2(float xl, float xr, float eps, function f) { + int stepcount=0; //число шагов + float xm; + while(fabs(xr-xl)>eps) { //вещественный модуль разницы + stepcount++; + xm=(xl+xr)/2; // середина отрезка + if(f(xr)==0) { // нашли решение на правой границе + printf("Find root for %d steps\n",stepcount); + return xr; + } + if(f(xl)==0) { // нашли решение на левой границе + printf("Find root for %d steps\n",stepcount); + return xl; + } + if(signF(xl) != signF(xm)) //если знак отличается + xr=xm; + else + xl=xm; + } + printf("Find root for %d steps\n",stepcount); //статистика + return (xl+xr)/2; +} + + +int main() +{ +float points[4][2] = {{-2, -1.5},{-1.5, -1},{-1, 0.5},{-0.5, 0}}; + for(int i=0;i<4;i++) + { + printf("------------------Root%d----------------------\n",i); + printf("Find Line Search root1 = %f\n",rootFindLineSearch(points[i][0],points[i][1],0.001,f)); + printf("Find Div Search root1 = %f\n",rootFindDiv(points[i][0],points[i][1],0.001,f)); + printf("Find Div2 Search root1 = %f\n",rootFindDiv2(points[i][0],points[i][1],0.001,f)); + } + return 0; +} + + diff --git a/Lect8/33_rootFindChord.c b/Lect8/33_rootFindChord.c new file mode 100644 index 0000000..22f66b9 --- /dev/null +++ b/Lect8/33_rootFindChord.c @@ -0,0 +1,91 @@ +#include +#include + +typedef float(*function)(float); + +//(-2, -1.5) (-1.5, -1) (-1, -0.5) (-0.5, 0) +float f(float x) { + return 8*x*x*x*x + 32*x*x*x + 40*x*x + 16*x + 1; +} + +int signF(float x) +{ + return f(x)==0 ? 0 : (f(x) < 0 ? -1:+1); +} + +float rootFindLineSearch(float xl, float xr, float eps, function f) { + float x, minx = xl, nextstep; + nextstep = fabs(xr-xl)/(1/eps); //разбиваем на отрезки интервал + int stepcount=0; + for(x=xl; xeps) { //вещественный модуль разницы или floatabs + stepcount++; + xm=(xl+xr)/2; // середина отрезка + if(signF(xl) != signF(xm)) //если знак отличается + xr=xm; + else + xl=xm; + } + printf("Find Div Search root for %d steps\n",stepcount); //статистика + return (xl+xr)/2; +} + + float rootFindDiv2(float xl, float xr, float eps, function f) { + int stepcount=0; //число шагов + float xm; + while(fabs(xr-xl)>eps) { //вещественный модуль разницы + stepcount++; + xm=(xl+xr)/2; // середина отрезка + if(f(xr)==0) { // нашли решение на правой границе + printf("Find root for %d steps\n",stepcount); + return xr; + } + if(f(xl)==0) { // нашли решение на левой границе + printf("Find root for %d steps\n",stepcount); + return xl; + } + if(signF(xl) != signF(xm)) //если знак отличается + xr=xm; + else + xl=xm; + } + printf("Find root for %d steps\n",stepcount); //статистика + return (xl+xr)/2; +} + +float rootFindChord(float xl, float xr, float eps, function f) { + int stepcount=0; + while(fabs(xr - xl) > eps) { + xl = xr - (xr - xl) * f(xr) / (f(xr) - f(xl)); + xr = xl - (xl - xr) * f(xl) / (f(xl) - f(xr)); + stepcount++; + } + printf("Find Chord Search root for %d steps\n",stepcount); + return xr; +} + + +int main() { +float points[4][2] = {{-2, -1.8},{-1.5, -1},{-1, -0.5},{-0.2, 0}}; + for(int i=0;i<4;i++) + { + printf("------------------Root%d----------------------\n",i); + printf("Find Line Search root = %f\n", rootFindLineSearch(points[i][0],points[i][1],0.001,f)); + printf("Find Div Search root = %f\n", rootFindDiv(points[i][0],points[i][1],0.001,f)); + printf("Find Chord Search root = %f\n", rootFindChord(points[i][0],points[i][1],0.001,f)); + } + return 0; +} + + diff --git a/Lect8/41_rootFindTangent.c b/Lect8/41_rootFindTangent.c new file mode 100644 index 0000000..a55c445 --- /dev/null +++ b/Lect8/41_rootFindTangent.c @@ -0,0 +1,114 @@ +#include +#include + +typedef float(*function)(float); + +//(-2, -1.5) (-1.5, -1) (-1, -0.5) (-0.5, 0) +float f(float x) { + return 8*x*x*x*x + 32*x*x*x + 40*x*x + 16*x + 1; +} + +int signF(float x) +{ + return f(x)==0 ? 0 : (f(x) < 0 ? -1:+1); +} + +float rootFindLineSearch(float xl, float xr, float eps, function f) { + float x, minx = xl, nextstep; + nextstep = fabs(xr-xl)/(1/eps); //разбиваем на отрезки интервал + int stepcount=0; + for(x=xl; xeps) { //вещественный модуль разницы или floatabs + stepcount++; + xm=(xl+xr)/2; // середина отрезка + if(signF(xl) != signF(xm)) //если знак отличается + xr=xm; + else + xl=xm; + } + printf("Find Div Search root for %d steps\n",stepcount); //статистика + return (xl+xr)/2; +} + + float rootFindDiv2(float xl, float xr, float eps, function f) { + int stepcount=0; //число шагов + float xm; + while(fabs(xr-xl)>eps) { //вещественный модуль разницы + stepcount++; + xm=(xl+xr)/2; // середина отрезка + if(f(xr)==0) { // нашли решение на правой границе + printf("Find root for %d steps\n",stepcount); + return xr; + } + if(f(xl)==0) { // нашли решение на левой границе + printf("Find root for %d steps\n",stepcount); + return xl; + } + if(signF(xl) != signF(xm)) //если знак отличается + xr=xm; + else + xl=xm; + } + printf("Find root for %d steps\n",stepcount); //статистика + return (xl+xr)/2; +} + +float rootFindChord(float xl, float xr, float eps, function f) { + int stepcount=0; + while(fabs(xr - xl) > eps) { + xl = xr - (xr - xl) * f(xr) / (f(xr) - f(xl)); + xr = xl - (xl - xr) * f(xl) / (f(xl) - f(xr)); + stepcount++; + } + printf("Find Chord Search root for %d steps\n",stepcount); + return xr; +} + +float rootFindTangent(float xn, float eps, function f, function df ) { + float x1 = xn - f(xn)/df(xn); + float x0 = xn; + int stepcount=0; + while(fabs(x0-x1) > eps) { + x0 = x1; + x1 = x1 - f(x1)/df(x1); + stepcount++; + } + printf("Find Tangent Search root for %d steps\n",stepcount); + return x1; +} + +float df(float x) { + return 32*x*x*x + 96*x*x + 80*x + 16; +} + +float ddf(float x) { + return 96*x*x + 192*x + 80; +} + + + +int main() { +float points[4][2] = {{-2, -1.5},{-1.5, -1},{-1, -0.5},{-0.5, 0}}; + for(int i=0;i<4;i++) + { + printf("------------------Root%d----------------------\n",i); + printf("Find Line Search root = %f\n", rootFindLineSearch(points[i][0],points[i][1],0.001,f)); + printf("Find Div Search root = %f\n", rootFindDiv(points[i][0],points[i][1],0.001,f)); + printf("Find Chord Search root = %f\n", rootFindChord(points[i][0],points[i][1],0.001,f)); + printf("Find Find Tangent root = %f\n", rootFindTangent(points[i][0],0.001,f,df)); + } + return 0; +} + + diff --git a/Lect8/42_2_rootFindCombine.c b/Lect8/42_2_rootFindCombine.c new file mode 100644 index 0000000..3d0db17 --- /dev/null +++ b/Lect8/42_2_rootFindCombine.c @@ -0,0 +1,115 @@ +#include +#include + +typedef float(*function)(float); + +//(-2, -1.5) (-1.5, -1) (-1, -0.5) (-0.5, 0) +float f(float x) { + return 8*x*x*x*x + 32*x*x*x + 40*x*x + 16*x + 1; +} + +int signF(float x) +{ + return f(x)==0 ? 0 : (f(x) < 0 ? -1:+1); +} + +float rootFindLineSearch(float xl, float xr, float eps, function f) { + float x, minx = xl, nextstep; + nextstep = fabs(xr-xl)/(1/eps); //разбиваем на отрезки интервал + int stepcount=0; + for(x=xl; xeps) { //вещественный модуль разницы или floatabs + stepcount++; + xm=(xl+xr)/2; // середина отрезка + if(signF(xl) != signF(xm)) //если знак отличается + xr=xm; + else + xl=xm; + } + printf("Find Div Search root for %d steps\n",stepcount); //статистика + return (xl+xr)/2; +} + + float rootFindDiv2(float xl, float xr, float eps, function f) { + int stepcount=0; //число шагов + float xm; + while(fabs(xr-xl)>eps) { //вещественный модуль разницы + stepcount++; + xm=(xl+xr)/2; // середина отрезка + if(f(xr)==0) { // нашли решение на правой границе + printf("Find root for %d steps\n",stepcount); + return xr; + } + if(f(xl)==0) { // нашли решение на левой границе + printf("Find root for %d steps\n",stepcount); + return xl; + } + if(signF(xl) != signF(xm)) //если знак отличается + xr=xm; + else + xl=xm; + } + printf("Find root for %d steps\n",stepcount); //статистика + return (xl+xr)/2; +} + +float rootFindChord(float xl, float xr, float eps, function f) { + int stepcount=0; + while(fabs(xr - xl) > eps) { + xl = xr - (xr - xl) * f(xr) / (f(xr) - f(xl)); + xr = xl - (xl - xr) * f(xl) / (f(xl) - f(xr)); + stepcount++; + } + printf("Find Chord Search root for %d steps\n",stepcount); + return xr; +} + +float rootFindTangent(float xn, float eps, function f, function df ) { + float x1 = xn - f(xn)/df(xn); + float x0 = xn; + int stepcount=0; + while(fabs(x0-x1) > eps) { + x0 = x1; + x1 = x1 - f(x1)/df(x1); + stepcount++; + } + printf("Find Tangent Search root for %d steps\n",stepcount); + return x1; +} + +float df(float x) { + return 32*x*x*x + 96*x*x + 80*x + 16; +} + +float ddf(float x) { + return 96*x*x + 192*x + 80; +} + +int main() { +const float points[4][2] = {{-2, -1.5},{-1.5, -1},{-0.7, -0.5},{-0.01, 0}}; +const float eps = 0.0001; + for(int i=0;i<4;i++) + { + printf("------------------Root%d----------------------\n",i); + printf("Find Line Search root = %f\n", rootFindLineSearch(points[i][0],points[i][1],eps,f)); + printf("Find Div Search root = %f\n", rootFindDiv(points[i][0],points[i][1],eps,f)); + printf("Find Chord Search root = %f\n", rootFindChord(points[i][0],points[i][1],eps,f)); + printf("Find Find Tangent root = %f\n", rootFindTangent(points[i][0],eps,f,df)); + } + return 0; +} + + + + diff --git a/Lect8/42_rootFindTangent.c b/Lect8/42_rootFindTangent.c new file mode 100644 index 0000000..08e96e6 --- /dev/null +++ b/Lect8/42_rootFindTangent.c @@ -0,0 +1,111 @@ +#include +#include + +typedef float(*function)(float); + +//(-2, -1.5) (-1.5, -1) (-1, -0.5) (-0.5, 0) +float f(float x) { + return 8*x*x*x*x + 32*x*x*x + 40*x*x + 16*x + 1; +} + +int signF(float x) +{ + return f(x)==0 ? 0 : (f(x) < 0 ? -1:+1); +} + +float rootFindLineSearch(float xl, float xr, float eps, function f) { + float x, minx = xl, nextstep; + nextstep = fabs(xr-xl)/(1/eps); //разбиваем на отрезки интервал + int stepcount=0; + for(x=xl; xeps) { //вещественный модуль разницы или floatabs + stepcount++; + xm=(xl+xr)/2; // середина отрезка + if(signF(xl) != signF(xm)) //если знак отличается + xr=xm; + else + xl=xm; + } + printf("Find Div Search root for %d steps\n",stepcount); //статистика + return (xl+xr)/2; +} + + float rootFindDiv2(float xl, float xr, float eps, function f) { + int stepcount=0; //число шагов + float xm; + while(fabs(xr-xl)>eps) { //вещественный модуль разницы + stepcount++; + xm=(xl+xr)/2; // середина отрезка + if(f(xr)==0) { // нашли решение на правой границе + printf("Find root for %d steps\n",stepcount); + return xr; + } + if(f(xl)==0) { // нашли решение на левой границе + printf("Find root for %d steps\n",stepcount); + return xl; + } + if(signF(xl) != signF(xm)) //если знак отличается + xr=xm; + else + xl=xm; + } + printf("Find root for %d steps\n",stepcount); //статистика + return (xl+xr)/2; +} + +float rootFindChord(float xl, float xr, float eps, function f) { + int stepcount=0; + while(fabs(xr - xl) > eps) { + xl = xr - (xr - xl) * f(xr) / (f(xr) - f(xl)); + xr = xl - (xl - xr) * f(xl) / (f(xl) - f(xr)); + stepcount++; + } + printf("Find Chord Search root for %d steps\n",stepcount); + return xr; +} + +float rootFindTangent(float xn, float eps, function f, function df ) { + float x1 = xn - f(xn)/df(xn); + float x0 = xn; + int stepcount=0; + while(fabs(x0-x1) > eps) { + x0 = x1; + x1 = x1 - f(x1)/df(x1); + stepcount++; + } + printf("Find Tangent Search root for %d steps\n",stepcount); + return x1; +} + +float df(float x) { + return 32*x*x*x + 96*x*x + 80*x + 16; +} + +int main() +{ + + +float points[4][2] = {{-2, -1.5},{-1.5, -1},{-0.7, 0.5},{-0.01, 0}}; + for(int i=0;i<4;i++) + { + printf("------------------Root%d----------------------\n",i); + printf("Find Line Search root = %f\n", rootFindLineSearch(points[i][0],points[i][1],0.001,f)); + printf("Find Div Search root = %f\n", rootFindDiv(points[i][0],points[i][1],0.001,f)); + printf("Find Chord Search root = %f\n", rootFindChord(points[i][0],points[i][1],0.001,f)); + printf("Find Find Tangent root = %f\n", rootFindTangent(points[i][0],0.001,f,df)); + } + + return 0; +} + diff --git a/Lect8/48-49_rootFindCombine.c b/Lect8/48-49_rootFindCombine.c new file mode 100644 index 0000000..21eecdc --- /dev/null +++ b/Lect8/48-49_rootFindCombine.c @@ -0,0 +1,131 @@ +#include +#include + +typedef float(*function)(float); + +//(-2, -1.5) (-1.5, -1) (-1, -0.5) (-0.5, 0) +float f(float x) { + return 8*x*x*x*x + 32*x*x*x + 40*x*x + 16*x + 1; +} + +int signF(float x) +{ + return f(x)==0 ? 0 : (f(x) < 0 ? -1:+1); +} + +float rootFindLineSearch(float xl, float xr, float eps, function f) { + float x, minx = xl, nextstep; + nextstep = fabs(xr-xl)/(1/eps); //разбиваем на отрезки интервал + int stepcount=0; + for(x=xl; xeps) { //вещественный модуль разницы или floatabs + stepcount++; + xm=(xl+xr)/2; // середина отрезка + if(signF(xl) != signF(xm)) //если знак отличается + xr=xm; + else + xl=xm; + } + printf("Find Div Search root for %d steps\n",stepcount); //статистика + return (xl+xr)/2; +} + + float rootFindDiv2(float xl, float xr, float eps, function f) { + int stepcount=0; //число шагов + float xm; + while(fabs(xr-xl)>eps) { //вещественный модуль разницы + stepcount++; + xm=(xl+xr)/2; // середина отрезка + if(f(xr)==0) { // нашли решение на правой границе + printf("Find root for %d steps\n",stepcount); + return xr; + } + if(f(xl)==0) { // нашли решение на левой границе + printf("Find root for %d steps\n",stepcount); + return xl; + } + if(signF(xl) != signF(xm)) //если знак отличается + xr=xm; + else + xl=xm; + } + printf("Find root for %d steps\n",stepcount); //статистика + return (xl+xr)/2; +} + +float rootFindChord(float xl, float xr, float eps, function f) { + int stepcount=0; + while(fabs(xr - xl) > eps) { + xl = xr - (xr - xl) * f(xr) / (f(xr) - f(xl)); + xr = xl - (xl - xr) * f(xl) / (f(xl) - f(xr)); + stepcount++; + } + printf("Find Chord Search root for %d steps\n",stepcount); + return xr; +} + +float rootFindTangent(float xn, float eps, function f, function df ) { + float x1 = xn - f(xn)/df(xn); + float x0 = xn; + int stepcount=0; + while(fabs(x0-x1) > eps) { + x0 = x1; + x1 = x1 - f(x1)/df(x1); + stepcount++; + } + printf("Find Tangent Search root for %d steps\n",stepcount); + return x1; +} + +float df(float x) { + return 32*x*x*x + 96*x*x + 80*x + 16; +} + +float ddf(float x) { + return 96*x*x + 192*x + 80; +} + + +float rootFindCombine(float xl, float xr, float eps, function f, function df, function ddf ) { + int stepcount=0; + while(fabs(xl-xr) > 2*eps) { + if( f(xl)*ddf(xl)<0 ) + xl = xl - (f(xl)*(xl - xr))/(f(xl) - f(xr)); + else + xl = xl - f(xl)/df(xl); + if( f(xr)*ddf(xr)<0 ) + xr = xr - (f(xr)*(xr - xl))/(f(xr) - f(xl)); + else + xr = xr - f(xr)/df(xr); + stepcount++; + } printf("Find Tangent Search root for %d steps\n",stepcount); return (xl+xr)/2; +} + +int main() { +const float points[4][2] = {{-2, -1.5},{-1.5, -1},{-0.7, -0.5},{-0.16, -0.001}}; +const float eps = 0.0001; + for(int i=0;i<4;i++) { + printf("------------------Root%d----------------------\n",i); + printf("Find Line Search root = %f\n", rootFindLineSearch(points[i][0],points[i][1],eps,f)); + printf("Find Div Search root = %f\n", rootFindDiv(points[i][0],points[i][1],eps,f)); + printf("Find Chord Search root = %f\n", rootFindChord(points[i][0],points[i][1],eps,f)); + printf("Find Find Tangent root = %f\n", rootFindTangent(points[i][0],eps,f,df)); + printf("Find Combine Search root = %f\n", rootFindCombine(points[i][0],points[i][1],eps,f,df,ddf)); + } + return 0; +} + + + + diff --git a/Lect8/57_calcIntegralSquare.c b/Lect8/57_calcIntegralSquare.c new file mode 100644 index 0000000..687a55a --- /dev/null +++ b/Lect8/57_calcIntegralSquare.c @@ -0,0 +1,34 @@ +#include +#include + +typedef float(*function)(float); + +//(-2, -1.5) (-1.5, -1) (-1, -0.5) (-0.5, 0) +float f(float x) { + return 8*x*x*x*x + 32*x*x*x + 40*x*x + 16*x + 1; +} + +float testf(float x){ + return 2; +} + +float calcIntegralSquare(float xl, float xr, size_t n, function f) { + float sum = 0; + float h = (xr-xl)/n; + for(size_t i=0; i +#include + +typedef float(*function)(float); + +//(-2, -1.5) (-1.5, -1) (-1, -0.5) (-0.5, 0) +float f(float x) { + return 8*x*x*x*x + 32*x*x*x + 40*x*x + 16*x + 1; +} + +float testf(float x){ + return 2; +} + +float calcIntegralSquare(float xl, float xr, size_t n, function f) { + float sum = 0; + float h = (xr-xl)/n; + for(size_t i=0; i +#include + +typedef float(*function)(float); + +//(-2, -1.5) (-1.5, -1) (-1, -0.5) (-0.5, 0) +float f(float x) { + return 8*x*x*x*x + 32*x*x*x + 40*x*x + 16*x + 1; +} + +float testf(float x){ + return 2; +} + +float calcIntegralSquare(float xl, float xr, size_t n, function f) { + float sum = 0; + float h = (xr-xl)/n; + for(size_t i=0; i +#include + +typedef float(*function)(float); + +//(-2, -1.5) (-1.5, -1) (-1, -0.5) (-0.5, 0) +float f(float x) { + return 8*x*x*x*x + 32*x*x*x + 40*x*x + 16*x + 1; +} + +float testf(float x){ + return 2; +} + +float calcIntegralSquare(float xl, float xr, size_t n, function f) { + float sum = 0; + float h = (xr-xl)/n; + for(size_t i=0; i +#include +#include + +typedef float(*function)(float); + +//(-2, -1.5) (-1.5, -1) (-1, -0.5) (-0.5, 0) +float f(float x) { + return 8*x*x*x*x + 32*x*x*x + 40*x*x + 16*x + 1; +} + +float testf(float x){ + return 2; +} + +float calcIntegralSquare(float xl, float xr, size_t n, function f) { + float sum = 0; + float h = (xr-xl)/n; + for(size_t i=0; i +#include +#include +#include +#include +#include +#include +#include +#include + +int main() +{ + /* ---------- ИНИЦИАЛИЗАЦИЯ ПЕРЕМЕННЫХ СЕРВЕРА---------- */ + + /* + 1. client/server - два файл-дескриптора. + Эти две перемнные хранят значение сокетов, + которые вернула система при подключении. + 2. portNum нужен для хранения номера порта, на котором происходит соединение. + 3. isExit - булевая переменная, признак завершения программы. + 4. Сервер считывает сообщение из сокет соединения в буффер обмена для приема/отправки данных к/от сервера. + + */ + int server;//файл-дескриптор сервера + int client;//файл-дескриптор клиента + int portNum = 1500;//номера порта, на котором происходит соединение (0 до 65535) + bool isExit = false;//булевая переменная, признак завершения программы. + int bufsize = 1024;//размер буффера + char buffer[bufsize]; //буффер обмена для приема/отправки данных к/от сервера +/* + 5. A sockaddr_in - структура, содержащая интернет адрес, с которым будет установлено соединение. + Эта структура уже определена в netinet/in.h, поэтому нет необходимости + заново ее задавать. + DEFINITION: + struct sockaddr_in + { + short sin_family; + u_short sin_port; + struct in_addr sin_addr; + char sin_zero[8]; + }; + 6. serv_addr будет содержать адрес сервера + 7. socklen_t - длиной по крайней мере 32 бита +*/ + struct sockaddr_in server_addr; + socklen_t size; + + /* ---------- УСТАНОВКА СОКЕТ СОЕДИНЕНИЯ ----------*/ + /* --------------- socket() функция ------------------*/ + + /* + Socket() функция создает новый сокет. + На вход получает 3 аргумента, + a. AF_INET: доменный адрес сокета. + b. SOCK_STREAM: тип сокета. Потоковый сокет, в котором сообщение + читается последовательным потоком(TCP). + c. Третий это аргумент протокола: всегда должен быть 0. + Операционная система выберет самый подходящий протокол. + Функция возвращает файл-дескриптор целое число - соединение, которое используется для всех ссылок + на этот сокет. Если произошла ошибка соединения, то возвращается -1. + */ + + server = socket(AF_INET, SOCK_STREAM, 0); + printf("SERVER\n"); + + if (server < 0) + { + printf("Error establishing socket...\n"); + exit(1); + } + + printf("=> Socket server has been created...\n"); + + /* + Переменная serv_addr - структура sockaddr_in. + sin_family содержит код для адресной семьи. + Всегда должна быть установлена AF_INET. + INADDR_ANY содержит IP-адрес хоста. Для сервера - это + IP-адрес компьютера, на котором работает сервер. + htons() функция переводит номер порта из порядка байтов хоста + в номер порта в порядке байтов сети. + + */ + + server_addr.sin_family = AF_INET; + server_addr.sin_addr.s_addr = htons(INADDR_ANY); + server_addr.sin_port = htons(portNum); + + /* ---------- ПРИВЯЗКА СОКЕТА ---------- */ + /* ---------------- bind() ---------------- */ + + /* + bind() функция привязывает сокет к адресу, то есть в нашем случае + к адресу сервера и номеру порта, на котором сервер будет работать. + Для этого нужны три аргумента: файл дескриптор сокета, указатель на структуру + типа sockaddr (должен указывать на правильный тип) + * + */ + + if ((bind(server, (struct sockaddr*)&server_addr,sizeof(server_addr))) < 0) + { + printf("=> Error binding connection, the socket has already been established...\n"); + return -1; + } + + size = sizeof(server_addr); + printf("=> Looking for clients...\n"); + + /* ------------- ПРОСЛУШИВАНИЕ СОКЕТА ------------- */ + /* ---------------- listen() ---------------- */ + + /* + Функция listen позволяет прослушивать сокета для подключения. + Программа будет в состоянии простоя, если подключений не обнаружится. + Первый аргумент - это файл дескриптор сокета, второй - количество клиентов, + то есть количество подключений, которое сервер может обработать, пока процесс + обрабатывает определенное подключение. Максимальное число клиентов во многих системах равняется 5. + */ + + listen(server, 1); + + /* ------------- ПОДКЛЮЧЕНИЕ КЛИЕНТОВ ------------- */ + /* ----------------- accept() ------------------- */ + + /* + Система accept() вызывает процесс блокировки пока клиент подключается к серверу. + К тому же, она пробуждает процесс, когда подключение с клиентом было успешно установлено. + Она возвращает новый файл дескриптор, и вся связь по этому подключению должна + осуществляться, используя новый файл дескриптор. Второй аргумент - указатель на + адрес клиента, третий - размер структуры. + */ + + int clientCount = 1; + client = accept(server,(struct sockaddr *)&server_addr,&size); + + // первая проверка действительности подключения + if (client < 0) + printf("=> Error on accepting..."); + +//Основной цикл + while (client > 0) + { + printf("=> Connected with the client %d, you are good to go...\n",clientCount); + printf("\n=> Enter # to end the connection\n"); +//..... + strcpy(buffer, "=> Server connected...\n"); + send(client, buffer, bufsize, 0); + + + /* + Примечание: мы перейдем в этот момент только после того, как + клиент успешно подключится к нашему серверу. + Произойдет чтение сокета. Заметим, что read() будет + блокировать до момента наличия чего-то для чтения + Чтение будет происходить maximum 1024 символов в пакете + */ + do { + printf("Client: "); + do { + recv(client, buffer, bufsize, 0); + printf("%s ",buffer); + if (buffer[0] == '#') + { + isExit = true; + } + } while (buffer[0] != '*' && buffer[0] != '#'); + + printf("\nServer: "); + do { + scanf("%s",buffer); + send(client, buffer, bufsize, 0); + if (buffer[0] == '#') + { + isExit = true; + } + } while (buffer[0] != '*' && buffer[0] != '#'); + + + } while (!isExit); + + /* + Как только соединение будет установлено, оба конца связи могут + писать и читать соединение. Все, написанное клиентом, будет прочитано сервером, + а все, написанное сервером, будет прочитано клиентом. + */ + + /* ---------------- ЗАВЕРШЕНИЕ СОЕДИНЕНИЯ ------------- */ + /* ----------------- close() --------------- */ + + /* + Как только сервер нажмет # для завершения соединения, + цикл завершится и закроет серверное сокет соединение + и клиентсткое соединение. + */ + + // inet_ntoa переводит данные пакета в IP-адрес, который был взят у клиента + printf("\n\n=> Connection terminated with IP %s\n",inet_ntoa(server_addr.sin_addr)); + close(client); + close(server); + printf("\nGoodbye..."); + isExit = false; + //~ exit(1); + return 0; + } + return 0; +} diff --git a/Seminar1/32_40_client.c b/Seminar1/32_40_client.c new file mode 100644 index 0000000..f48c45c --- /dev/null +++ b/Seminar1/32_40_client.c @@ -0,0 +1,162 @@ +/*! + * Simple chat program (client side).cpp - http://github.com/hassanyf + * Version - 2.0.1 + * + * Copyright (c) 2016 Hassan M. Yousuf + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int main() +{ + /* ---------- ИНИЦИАЛИЗАЦИЯ ПЕРЕМЕННЫХ КЛИЕНТА---------- */ + + /* + 1. client - файл-дескриптор, хранящий значение сокета, + которые вернула система при подключении к серверу. + 2. portNum нужен для хранения номера порта, на котором происходит соединение. + 3. isExit - булевая переменная, признак завершения программы. + 4. Клиент считывает сообщение из сокета соединения в буффер обмена для приема/отправки данных к/от сервера + 5. sockaddr_in - структура, содержащая интернет адрес, с которым будет установлено соединение. + Эта структура уже определена в netinet/in.h, поэтому нет необходимости + заново ее задавать. + DEFINITION: + struct sockaddr_in + { + short sin_family; + u_short sin_port; + struct in_addr sin_addr; + char sin_zero[8]; + }; + + 6. serv_addr будет содержать адрес сервера + */ + + int client; + int portNum = 1500; // Номер порта один для сервера и клиента! + bool isExit = false; + int bufsize = 1024; + char buffer[bufsize]; + char* ip = "127.0.0.1"; + + struct sockaddr_in server_addr; + + /* + Socket() функция создает новый сокет. + На вход получает 3 аргумента, + a. AF_INET: доменный адрес сокета. + b. SOCK_STREAM: тип сокета. Потоковый сокет, в котором сообщение + читается последовательным потоком(TCP). + c. Третий это аргумент протокола: всегда должен быть 0. + Операционная система выберет самый подходящий протокол. + Функция возвращает файл-дескриптор целое число - соединение, которое используется для всех ссылок + на этот сокет. Если произошла ошибка соединения, то возвращается -1. + */ + + /* ---------- УСТАНОВКА СОКЕТ ПОДКЛЮЧЕНИЯ ----------*/ + /* --------------- socket() функция ------------------*/ + + client = socket(AF_INET, SOCK_STREAM, 0); + + printf("CLIENT\n"); + + if (client < 0) + { + printf("Error establishing socket...\n"); + exit(1); + } + + printf("=> Socket client has been created...\n"); + + /* + Переменная serv_addr - это структура sockaddr_in. + sin_family содержит код для адресной семьи. + Всегда должна быть установлена AF_INET. + htons() переводит номер порта из порядка байтов хоста + в номер порта в порядке байтов сети. + */ + + server_addr.sin_family = AF_INET; + server_addr.sin_port = htons(portNum); + + // эта функция возвращает 1, если IP-адрес действительный + // и 0, если недействительный + // inet_pton переводит IP-адрес в пакеты + // inet_ntoa переводит обратно из пакета в IP-адрес + + inet_pton(AF_INET, ip, &server_addr.sin_addr); + + /* ---------- СОЕДИНЕНИЕ СОКЕТА ---------- */ + /* ---------------- connect() ---------------- */ + + if (connect(client,(struct sockaddr *)&server_addr, sizeof(server_addr)) == 0) + printf("=> Connection to the server %s with port number: %d\n",inet_ntoa(server_addr.sin_addr),portNum); + + if (connect(client,(struct sockaddr *)&server_addr, sizeof(server_addr)) == 0) + printf("=> Connection to the server port number: %d \n",portNum); + + /* + Функция connect вызывается клиентом для установки соединения с сервером. + Ей нужны 3 аргумента: файловый дескриптор сокета, адрес хоста, к которому + клиент хочет подключится (включая номер порта), и размер адреса. + Функция возвращает 0 при успехе и 1 при неудаче. + Примечание: клиенту нужно знать номер порта сервера, + а не свой номер порта. + */ + + printf("=> Awaiting confirmation from the server...\n"); + recv(client, buffer, bufsize, 0); + printf("=> Connection confirmed, you are good to go...\n"); + + printf("\n\n=> Enter # to end the connection\n"); + + // При достижении соединения, клиент может послать сообщение первым. + + do { + printf("Client: "); + do { + scanf("%s",buffer); + send(client, buffer, bufsize, 0); + if (buffer[0] == '#') + { + isExit = true; + } + } while (buffer[0] != '*' && buffer[0] != '#'); + + printf("Server: "); + do { + recv(client, buffer, bufsize, 0); + printf("%s ",buffer); + if (buffer[0] == '#') + { + //~ buffer[0] = '*'; + isExit = true; + } + } while (buffer[0] != '*' && buffer[0] != '#'); + printf("\n"); + + } while (!isExit); + + /* ---------------- ЗАВЕРШЕНИЕ СОЕДИНЕНИЯ ------------- */ + /* ----------------- close() --------------- */ + + /* + Как только сервер нажмет # для завершения соединения, + цикл завершится и закроет серверное сокет соединение + и клиентсткое соединение. + */ + + printf("\n=> Connection terminated.\n\nGoodbye...\n"); + + close(client); + return 0; +} diff --git a/Seminar1/43_client_1.c b/Seminar1/43_client_1.c new file mode 100644 index 0000000..996444c --- /dev/null +++ b/Seminar1/43_client_1.c @@ -0,0 +1,173 @@ +/*! + * Simple chat program (client side).cpp - http://github.com/hassanyf + * Version - 2.0.1 + * + * Copyright (c) 2016 Hassan M. Yousuf + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int main() +{ + /* ---------- ИНИЦИАЛИЗАЦИЯ ПЕРЕМЕННЫХ КЛИЕНТА---------- */ + + /* + 1. client - файл-дескриптор, хранящий значение сокета, + которые вернула система при подключении к серверу. + 2. portNum нужен для хранения номера порта, на котором происходит соединение. + 3. isExit - булевая переменная, признак завершения программы. + 4. Клиент считывает сообщение из сокета соединения в буффер обмена для приема/отправки данных к/от сервера + 5. sockaddr_in - структура, содержащая интернет адрес, с которым будет установлено соединение. + Эта структура уже определена в netinet/in.h, поэтому нет необходимости + заново ее задавать. + DEFINITION: + struct sockaddr_in + { + short sin_family; + u_short sin_port; + struct in_addr sin_addr; + char sin_zero[8]; + }; + + 6. serv_addr будет содержать адрес сервера + */ + + int client; + int portNum = 1500; // Номер порта один для сервера и клиента! + bool isExit = false; + int bufsize = 1024; + char buffer[bufsize]; + char* ip = "127.0.0.1"; + + struct sockaddr_in server_addr; + + /* + Socket() функция создает новый сокет. + На вход получает 3 аргумента, + a. AF_INET: доменный адрес сокета. + b. SOCK_STREAM: тип сокета. Потоковый сокет, в котором сообщение + читается последовательным потоком(TCP). + c. Третий это аргумент протокола: всегда должен быть 0. + Операционная система выберет самый подходящий протокол. + Функция возвращает файл-дескриптор целое число - соединение, которое используется для всех ссылок + на этот сокет. Если произошла ошибка соединения, то возвращается -1. + */ + + /* ---------- УСТАНОВКА СОКЕТ ПОДКЛЮЧЕНИЯ ----------*/ + /* --------------- socket() функция ------------------*/ + + client = socket(AF_INET, SOCK_STREAM, 0); + + printf("CLIENT\n"); + + if (client < 0) + { + printf("Error establishing socket...\n"); + exit(1); + } + + printf("=> Socket client has been created...\n"); + + /* + Переменная serv_addr - это структура sockaddr_in. + sin_family содержит код для адресной семьи. + Всегда должна быть установлена AF_INET. + htons() переводит номер порта из порядка байтов хоста + в номер порта в порядке байтов сети. + */ + + server_addr.sin_family = AF_INET; + server_addr.sin_port = htons(portNum); + + // эта функция возвращает 1, если IP-адрес действительный + // и 0, если недействительный + // inet_pton переводит IP-адрес в пакеты + // inet_ntoa переводит обратно из пакета в IP-адрес + + inet_pton(AF_INET, ip, &server_addr.sin_addr); + + /* ---------- СОЕДИНЕНИЕ СОКЕТА ---------- */ + /* ---------------- connect() ---------------- */ + + if (connect(client,(struct sockaddr *)&server_addr, sizeof(server_addr)) == 0) + printf("=> Connection to the server %s with port number: %d\n",inet_ntoa(server_addr.sin_addr),portNum); + + if (connect(client,(struct sockaddr *)&server_addr, sizeof(server_addr)) == 0) + printf("=> Connection to the server port number: %d \n",portNum); + + /* + Функция connect вызывается клиентом для установки соединения с сервером. + Ей нужны 3 аргумента: файловый дескриптор сокета, адрес хоста, к которому + клиент хочет подключится (включая номер порта), и размер адреса. + Функция возвращает 0 при успехе и 1 при неудаче. + Примечание: клиенту нужно знать номер порта сервера, + а не свой номер порта. + */ + + printf("=> Awaiting confirmation from the server...\n"); + recv(client, buffer, bufsize, 0); + printf("=> Connection confirmed, you are good to go...\n"); + + printf("\n\n=> Enter # to end the connection\n"); + + // При достижении соединения, клиент может послать сообщение первым. + + do { + printf("Client: "); +#if 0 + do { + scanf("%s",buffer); + send(client, buffer, bufsize, 0); + if (buffer[0] == '#') + { + isExit = true; + } + } while (buffer[0] != '*' && buffer[0] != '#'); +#else + char c; + int cntr = 0; + while((c=getchar())!='\n')//till end of line + buffer[cntr++]=c; + buffer[cntr++] = 0; + if (buffer[0] == '#') + isExit = true; + send(client, buffer, bufsize, 0); + send(client, "*", 2, 0); +#endif + printf("Server: "); + do { + recv(client, buffer, bufsize, 0); + printf("%s ",buffer); + if (buffer[0] == '#') + { + //~ buffer[0] = '*'; + isExit = true; + } + } while (buffer[0] != '*' && buffer[0] != '#'); + printf("\n"); + + } while (!isExit); + + /* ---------------- ЗАВЕРШЕНИЕ СОЕДИНЕНИЯ ------------- */ + /* ----------------- close() --------------- */ + + /* + Как только сервер нажмет # для завершения соединения, + цикл завершится и закроет серверное сокет соединение + и клиентсткое соединение. + */ + + printf("\n=> Connection terminated.\n\nGoodbye...\n"); + + close(client); + return 0; +} diff --git a/Seminar1/43_server_1.c b/Seminar1/43_server_1.c new file mode 100644 index 0000000..b4673d7 --- /dev/null +++ b/Seminar1/43_server_1.c @@ -0,0 +1,229 @@ +/*! + * Simple chat program (server side).cpp - http://github.com/hassanyf + * Version - 2.0.1 + * + * Copyright (c) 2016 Hassan M. Yousuf + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int main() +{ + /* ---------- ИНИЦИАЛИЗАЦИЯ ПЕРЕМЕННЫХ СЕРВЕРА---------- */ + + /* + 1. client/server - два файл-дескриптора. + Эти две перемнные хранят значение сокетов, + которые вернула система при подключении. + 2. portNum нужен для хранения номера порта, на котором происходит соединение. + 3. isExit - булевая переменная, признак завершения программы. + 4. Сервер считывает сообщение из сокет соединения в буффер обмена для приема/отправки данных к/от сервера. + + */ + int server;//файл-дескриптор сервера + int client;//файл-дескриптор клиента + int portNum = 1500;//номера порта, на котором происходит соединение (0 до 65535) + bool isExit = false;//булевая переменная, признак завершения программы. + int bufsize = 1024;//размер буффера + char buffer[bufsize]; //буффер обмена для приема/отправки данных к/от сервера +/* + 5. A sockaddr_in - структура, содержащая интернет адрес, с которым будет установлено соединение. + Эта структура уже определена в netinet/in.h, поэтому нет необходимости + заново ее задавать. + DEFINITION: + struct sockaddr_in + { + short sin_family; + u_short sin_port; + struct in_addr sin_addr; + char sin_zero[8]; + }; + 6. serv_addr будет содержать адрес сервера + 7. socklen_t - длиной по крайней мере 32 бита +*/ + struct sockaddr_in server_addr; + socklen_t size; + + /* ---------- УСТАНОВКА СОКЕТ СОЕДИНЕНИЯ ----------*/ + /* --------------- socket() функция ------------------*/ + + /* + Socket() функция создает новый сокет. + На вход получает 3 аргумента, + a. AF_INET: доменный адрес сокета. + b. SOCK_STREAM: тип сокета. Потоковый сокет, в котором сообщение + читается последовательным потоком(TCP). + c. Третий это аргумент протокола: всегда должен быть 0. + Операционная система выберет самый подходящий протокол. + Функция возвращает файл-дескриптор целое число - соединение, которое используется для всех ссылок + на этот сокет. Если произошла ошибка соединения, то возвращается -1. + */ + + server = socket(AF_INET, SOCK_STREAM, 0); + printf("SERVER\n"); + + if (server < 0) + { + printf("Error establishing socket...\n"); + exit(1); + } + + printf("=> Socket server has been created...\n"); + + /* + Переменная serv_addr - структура sockaddr_in. + sin_family содержит код для адресной семьи. + Всегда должна быть установлена AF_INET. + INADDR_ANY содержит IP-адрес хоста. Для сервера - это + IP-адрес компьютера, на котором работает сервер. + htons() функция переводит номер порта из порядка байтов хоста + в номер порта в порядке байтов сети. + + */ + + server_addr.sin_family = AF_INET; + server_addr.sin_addr.s_addr = htons(INADDR_ANY); + server_addr.sin_port = htons(portNum); + + /* ---------- ПРИВЯЗКА СОКЕТА ---------- */ + /* ---------------- bind() ---------------- */ + + /* + bind() функция привязывает сокет к адресу, то есть в нашем случае + к адресу сервера и номеру порта, на котором сервер будет работать. + Для этого нужны три аргумента: файл дескриптор сокета, указатель на структуру + типа sockaddr (должен указывать на правильный тип) + * + */ + + if ((bind(server, (struct sockaddr*)&server_addr,sizeof(server_addr))) < 0) + { + printf("=> Error binding connection, the socket has already been established...\n"); + return -1; + } + + + + size = sizeof(server_addr); + printf("=> Looking for clients...\n"); + + /* ------------- ПРОСЛУШИВАНИЕ СОКЕТА ------------- */ + /* ---------------- listen() ---------------- */ + + /* + Функция listen позволяет прослушивать сокета для подключения. + Программа будет в состоянии простоя, если подключений не обнаружится. + Первый аргумент - это файл дескриптор сокета, второй - количество клиентов, + то есть количество подключений, которое сервер может обработать, пока процесс + обрабатывает определенное подключение. Максимальное число клиентов во многих системах равняется 5. + */ + + listen(server, 1); + + /* ------------- ПОДКЛЮЧЕНИЕ КЛИЕНТОВ ------------- */ + /* ----------------- accept() ------------------- */ + + /* + Система accept() вызывает процесс блокировки пока клиент подключается к серверу. + К тому же, она пробуждает процесс, когда подключение с клиентом было успешно установлено. + Она возвращает новый файл дескриптор, и вся связь по этому подключению должна + осуществляться, используя новый файл дескриптор. Второй аргумент - указатель на + адрес клиента, третий - размер структуры. + */ + + int clientCount = 1; + client = accept(server,(struct sockaddr *)&server_addr,&size); + + // первая проверка действительности подключения + if (client < 0) + printf("=> Error on accepting..."); + +//Основной цикл + while (client > 0) + { + printf("=> Connected with the client %d, you are good to go...\n",clientCount); + printf("\n=> Enter # to end the connection\n"); +//..... + strcpy(buffer, "=> Server connected...\n"); + send(client, buffer, bufsize, 0); + + + /* + Примечание: мы перейдем в этот момент только после того, как + клиент успешно подключится к нашему серверу. + Произойдет чтение сокета. Заметим, что read() будет + блокировать до момента наличия чего-то для чтения + Чтение будет происходить maximum 1024 символов в пакете + */ + do { + printf("Client: "); + do { + recv(client, buffer, bufsize, 0); + printf("%s ",buffer); + if (buffer[0] == '#') + { + isExit = true; + } + } while (buffer[0] != '*' && buffer[0] != '#'); + + printf("\nServer: "); + +#if 0 + do { + scanf("%s",buffer); + send(client, buffer, bufsize, 0); + if (buffer[0] == '#') + { + isExit = true; + } + } while (buffer[0] != '*' && buffer[0] != '#'); +#else + char c; + int cntr = 0; + while((c=getchar())!='\n')//till end of line + buffer[cntr++]=c; + buffer[cntr++] = 0; + if (buffer[0] == '#') + isExit = true; + send(client, buffer, bufsize, 0); + send(client, "*", 2, 0); +#endif + + + + } while (!isExit); + + /* + Как только соединение будет установлено, оба конца связи могут + писать и читать соединение. Все, написанное клиентом, будет прочитано сервером, + а все, написанное сервером, будет прочитано клиентом. + */ + + /* ---------------- ЗАВЕРШЕНИЕ СОЕДИНЕНИЯ ------------- */ + /* ----------------- close() --------------- */ + + /* + Как только сервер нажмет # для завершения соединения, + цикл завершится и закроет серверное сокет соединение + и клиентсткое соединение. + */ + + // inet_ntoa переводит данные пакета в IP-адрес, который был взят у клиента + printf("\n\n=> Connection terminated with IP %s\n",inet_ntoa(server_addr.sin_addr)); + close(client); + close(server); + printf("\nGoodbye..."); + isExit = false; + //~ exit(1); + return 0; + } + return 0; +} diff --git a/Seminar1/46-49_server_web.c b/Seminar1/46-49_server_web.c new file mode 100644 index 0000000..d2aea8a --- /dev/null +++ b/Seminar1/46-49_server_web.c @@ -0,0 +1,192 @@ +/*! + * Simple chat program (server side).cpp - http://github.com/hassanyf + * Version - 2.0.1 + * + * Copyright (c) 2016 Hassan M. Yousuf + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int main() +{ + /* ---------- ИНИЦИАЛИЗАЦИЯ ПЕРЕМЕННЫХ СЕРВЕРА---------- */ + + /* + 1. client/server - два файл-дескриптора. + Эти две перемнные хранят значение сокетов, + которые вернула система при подключении. + 2. portNum нужен для хранения номера порта, на котором происходит соединение. + 3. isExit - булевая переменная, признак завершения программы. + 4. Сервер считывает сообщение из сокет соединения в буффер обмена для приема/отправки данных к/от сервера. + + */ + int server;//файл-дескриптор сервера + int client;//файл-дескриптор клиента + int portNum = 8000;//номера порта, на котором происходит соединение (0 до 65535) + bool isExit = false;//булевая переменная, признак завершения программы. + int bufsize = 1024;//размер буффера + char buffer[bufsize]; //буффер обмена для приема/отправки данных к/от сервера +/* + 5. A sockaddr_in - структура, содержащая интернет адрес, с которым будет установлено соединение. + Эта структура уже определена в netinet/in.h, поэтому нет необходимости + заново ее задавать. + DEFINITION: + struct sockaddr_in + { + short sin_family; + u_short sin_port; + struct in_addr sin_addr; + char sin_zero[8]; + }; + 6. serv_addr будет содержать адрес сервера + 7. socklen_t - длиной по крайней мере 32 бита +*/ + struct sockaddr_in server_addr; + socklen_t size; + + /* ---------- УСТАНОВКА СОКЕТ СОЕДИНЕНИЯ ----------*/ + /* --------------- socket() функция ------------------*/ + + /* + Socket() функция создает новый сокет. + На вход получает 3 аргумента, + a. AF_INET: доменный адрес сокета. + b. SOCK_STREAM: тип сокета. Потоковый сокет, в котором сообщение + читается последовательным потоком(TCP). + c. Третий это аргумент протокола: всегда должен быть 0. + Операционная система выберет самый подходящий протокол. + Функция возвращает файл-дескриптор целое число - соединение, которое используется для всех ссылок + на этот сокет. Если произошла ошибка соединения, то возвращается -1. + */ + + server = socket(AF_INET, SOCK_STREAM, 0); + printf("SERVER\n"); + + if (server < 0) + { + printf("Error establishing socket...\n"); + exit(1); + } + + printf("=> Socket server has been created...\n"); + + /* + Переменная serv_addr - структура sockaddr_in. + sin_family содержит код для адресной семьи. + Всегда должна быть установлена AF_INET. + INADDR_ANY содержит IP-адрес хоста. Для сервера - это + IP-адрес компьютера, на котором работает сервер. + htons() функция переводит номер порта из порядка байтов хоста + в номер порта в порядке байтов сети. + + */ + + server_addr.sin_family = AF_INET; + server_addr.sin_addr.s_addr = htons(INADDR_ANY); + server_addr.sin_port = htons(portNum); + + /* ---------- ПРИВЯЗКА СОКЕТА ---------- */ + /* ---------------- bind() ---------------- */ + + /* + bind() функция привязывает сокет к адресу, то есть в нашем случае + к адресу сервера и номеру порта, на котором сервер будет работать. + Для этого нужны три аргумента: файл дескриптор сокета, указатель на структуру + типа sockaddr (должен указывать на правильный тип) + * + */ + + if ((bind(server, (struct sockaddr*)&server_addr,sizeof(server_addr))) < 0) + { + printf("=> Error binding connection, the socket has already been established...\n"); + return -1; + } + + + + size = sizeof(server_addr); + printf("=> Looking for clients...\n"); + + /* ------------- ПРОСЛУШИВАНИЕ СОКЕТА ------------- */ + /* ---------------- listen() ---------------- */ + + /* + Функция listen позволяет прослушивать сокета для подключения. + Программа будет в состоянии простоя, если подключений не обнаружится. + Первый аргумент - это файл дескриптор сокета, второй - количество клиентов, + то есть количество подключений, которое сервер может обработать, пока процесс + обрабатывает определенное подключение. Максимальное число клиентов во многих системах равняется 5. + */ + + listen(server, 1); + + /* ------------- ПОДКЛЮЧЕНИЕ КЛИЕНТОВ ------------- */ + /* ----------------- accept() ------------------- */ + + /* + Система accept() вызывает процесс блокировки пока клиент подключается к серверу. + К тому же, она пробуждает процесс, когда подключение с клиентом было успешно установлено. + Она возвращает новый файл дескриптор, и вся связь по этому подключению должна + осуществляться, используя новый файл дескриптор. Второй аргумент - указатель на + адрес клиента, третий - размер структуры. + */ + + int clientCount = 1; + client = accept(server,(struct sockaddr *)&server_addr,&size); + + // первая проверка действительности подключения + if (client < 0) + printf("=> Error on accepting..."); + +//Основной цикл + //~ while (client > 0) + { + printf("=> Connected with the client %d, you are good to go...\n",clientCount); + printf("\n=> Enter # to end the connection\n"); +//..... + + /* + Примечание: мы перейдем в этот момент только после того, как + клиент успешно подключится к нашему серверу. + Произойдет чтение сокета. Заметим, что read() будет + блокировать до момента наличия чего-то для чтения + Чтение будет происходить maximum 1024 символов в пакете + */ + //~ do { + int result = recv(client, buffer, bufsize, 0); + if (result < 0) + { + // ошибка получения данных + printf("\n\n=> Connection terminated error %d with IP %s\n",result,inet_ntoa(server_addr.sin_addr)); + close(client); + exit(1); + } + + char response[1024] = "HTTP/1.1 200 OK\r\n" + "Version: HTTP/1.1\r\n" + "Content-Type: text/html; charset=utf-8\r\n" + "\r\n\r\n" + "Test C++ HTTP Server\n" + "

Test page

\n" + "

This is body of the test page...

\n" + "

Request headers

\n" + "Test C++ Http Server\n"; + + + send(client, response,strlen(response), 0); + } + printf("\n\n=> Connection terminated with IP %s\n",inet_ntoa(server_addr.sin_addr)); + close(client); + close(server); + printf("\nGoodbye..."); + isExit = false; + return 0; +} diff --git a/Seminar1/52_53_server_web2.c b/Seminar1/52_53_server_web2.c new file mode 100644 index 0000000..de0e57b --- /dev/null +++ b/Seminar1/52_53_server_web2.c @@ -0,0 +1,224 @@ +/*! + * Simple chat program (server side).cpp - http://github.com/hassanyf + * Version - 2.0.1 + * + * Copyright (c) 2016 Hassan M. Yousuf + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int main() +{ + /* ---------- ИНИЦИАЛИЗАЦИЯ ПЕРЕМЕННЫХ СЕРВЕРА---------- */ + + /* + 1. client/server - два файл-дескриптора. + Эти две перемнные хранят значение сокетов, + которые вернула система при подключении. + 2. portNum нужен для хранения номера порта, на котором происходит соединение. + 3. isExit - булевая переменная, признак завершения программы. + 4. Сервер считывает сообщение из сокет соединения в буффер обмена для приема/отправки данных к/от сервера. + + */ + int server;//файл-дескриптор сервера + int client;//файл-дескриптор клиента + int portNum = 8000;//номера порта, на котором происходит соединение (0 до 65535) + bool isExit = false;//булевая переменная, признак завершения программы. + int bufsize = 1024;//размер буффера + char buffer[bufsize]; //буффер обмена для приема/отправки данных к/от сервера +/* + 5. A sockaddr_in - структура, содержащая интернет адрес, с которым будет установлено соединение. + Эта структура уже определена в netinet/in.h, поэтому нет необходимости + заново ее задавать. + DEFINITION: + struct sockaddr_in + { + short sin_family; + u_short sin_port; + struct in_addr sin_addr; + char sin_zero[8]; + }; + 6. serv_addr будет содержать адрес сервера + 7. socklen_t - длиной по крайней мере 32 бита +*/ + struct sockaddr_in server_addr; + socklen_t size; + + /* ---------- УСТАНОВКА СОКЕТ СОЕДИНЕНИЯ ----------*/ + /* --------------- socket() функция ------------------*/ + + /* + Socket() функция создает новый сокет. + На вход получает 3 аргумента, + a. AF_INET: доменный адрес сокета. + b. SOCK_STREAM: тип сокета. Потоковый сокет, в котором сообщение + читается последовательным потоком(TCP). + c. Третий это аргумент протокола: всегда должен быть 0. + Операционная система выберет самый подходящий протокол. + Функция возвращает файл-дескриптор целое число - соединение, которое используется для всех ссылок + на этот сокет. Если произошла ошибка соединения, то возвращается -1. + */ + + server = socket(AF_INET, SOCK_STREAM, 0); + printf("SERVER\n"); + + if (server < 0) + { + printf("Error establishing socket...\n"); + exit(1); + } + + printf("=> Socket server has been created...\n"); + + /* + Переменная serv_addr - структура sockaddr_in. + sin_family содержит код для адресной семьи. + Всегда должна быть установлена AF_INET. + INADDR_ANY содержит IP-адрес хоста. Для сервера - это + IP-адрес компьютера, на котором работает сервер. + htons() функция переводит номер порта из порядка байтов хоста + в номер порта в порядке байтов сети. + + */ + + server_addr.sin_family = AF_INET; + server_addr.sin_addr.s_addr = htons(INADDR_ANY); + server_addr.sin_port = htons(portNum); + + /* ---------- ПРИВЯЗКА СОКЕТА ---------- */ + /* ---------------- bind() ---------------- */ + + /* + bind() функция привязывает сокет к адресу, то есть в нашем случае + к адресу сервера и номеру порта, на котором сервер будет работать. + Для этого нужны три аргумента: файл дескриптор сокета, указатель на структуру + типа sockaddr (должен указывать на правильный тип) + * + */ + + if ((bind(server, (struct sockaddr*)&server_addr,sizeof(server_addr))) < 0) + { + printf("=> Error binding connection, the socket has already been established...\n"); + return -1; + } + + + + size = sizeof(server_addr); + printf("=> Looking for clients...\n"); + + /* ------------- ПРОСЛУШИВАНИЕ СОКЕТА ------------- */ + /* ---------------- listen() ---------------- */ + + /* + Функция listen позволяет прослушивать сокета для подключения. + Программа будет в состоянии простоя, если подключений не обнаружится. + Первый аргумент - это файл дескриптор сокета, второй - количество клиентов, + то есть количество подключений, которое сервер может обработать, пока процесс + обрабатывает определенное подключение. Максимальное число клиентов во многих системах равняется 5. + */ + + listen(server, 1); + + /* ------------- ПОДКЛЮЧЕНИЕ КЛИЕНТОВ ------------- */ + /* ----------------- accept() ------------------- */ + + /* + Система accept() вызывает процесс блокировки пока клиент подключается к серверу. + К тому же, она пробуждает процесс, когда подключение с клиентом было успешно установлено. + Она возвращает новый файл дескриптор, и вся связь по этому подключению должна + осуществляться, используя новый файл дескриптор. Второй аргумент - указатель на + адрес клиента, третий - размер структуры. + */ + + + + int clientCount = 1; + + + while(!isExit) + { + client = accept(server,(struct sockaddr *)&server_addr,&size); + + // первая проверка действительности подключения + if (client < 0) + printf("=> Error on accepting..."); + +//Основной цикл + if(client > 0) + { + printf("=> Connected with the client %d, you are good to go...\n",clientCount); +//..... + + /* + Примечание: мы перейдем в этот момент только после того, как + клиент успешно подключится к нашему серверу. + Произойдет чтение сокета. Заметим, что read() будет + блокировать до момента наличия чего-то для чтения + Чтение будет происходить maximum 1024 символов в пакете + */ + int result = recv(client, buffer, bufsize, 0); + if (result < 0) + { + // ошибка получения данных + printf("\n\n=> Connection terminated error %d with IP %s\n",result,inet_ntoa(server_addr.sin_addr)); + close(client); + exit(1); + } + // Мы знаем фактический размер полученных данных, поэтому ставим метку конца строки + // В буфере запроса. + buffer[result] = '\0'; + char response[1024] = "HTTP/1.1 200 OK\r\n" + "Version: HTTP/1.1\r\n" + "Content-Type: text/html; charset=utf-8\r\n" + "\r\n\r\n" + "" + "" + " " + " " + " " + "

ESP32 - Web Server

" + "

LED #1" + " " + " " + "  " + " " + " " + " " + "

" + "

LED #2" + " " + " " + "  " + " " + " " + " " + "

"; + strcat(response,""); + printf("%s\n",buffer); + send(client, response,strlen(response), 0); + printf("\n\n=> Connection terminated with IP %s\n",inet_ntoa(server_addr.sin_addr)); + close(client); + printf("\n=> Press any key and , # to end the connection\n"); + char c; + while((c=getchar())!='\n') + if(c=='#') + { + isExit=true; + } + } + } + close(server); + printf("\nGoodbye..."); + isExit = false; + return 0; +} diff --git a/Seminar1/56_server_web2_hw.c b/Seminar1/56_server_web2_hw.c new file mode 100644 index 0000000..b2eab61 --- /dev/null +++ b/Seminar1/56_server_web2_hw.c @@ -0,0 +1,230 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int main() +{ + /* ---------- ИНИЦИАЛИЗАЦИЯ ПЕРЕМЕННЫХ СЕРВЕРА---------- */ + + /* + 1. client/server - два файл-дескриптора. + Эти две перемнные хранят значение сокетов, + которые вернула система при подключении. + 2. portNum нужен для хранения номера порта, на котором происходит соединение. + 3. isExit - булевая переменная, признак завершения программы. + 4. Сервер считывает сообщение из сокет соединения в буффер обмена для приема/отправки данных к/от сервера. + + */ + int server;//файл-дескриптор сервера + int client;//файл-дескриптор клиента + int portNum = 8000;//номера порта, на котором происходит соединение (0 до 65535) + bool isExit = false;//булевая переменная, признак завершения программы. + int bufsize = 1024;//размер буффера + char buffer[bufsize]; //буффер обмена для приема/отправки данных к/от сервера +/* + 5. A sockaddr_in - структура, содержащая интернет адрес, с которым будет установлено соединение. + Эта структура уже определена в netinet/in.h, поэтому нет необходимости + заново ее задавать. + DEFINITION: + struct sockaddr_in + { + short sin_family; + u_short sin_port; + struct in_addr sin_addr; + char sin_zero[8]; + }; + 6. serv_addr будет содержать адрес сервера + 7. socklen_t - длиной по крайней мере 32 бита +*/ + struct sockaddr_in server_addr; + socklen_t size; + + /* ---------- УСТАНОВКА СОКЕТ СОЕДИНЕНИЯ ----------*/ + /* --------------- socket() функция ------------------*/ + + /* + Socket() функция создает новый сокет. + На вход получает 3 аргумента, + a. AF_INET: доменный адрес сокета. + b. SOCK_STREAM: тип сокета. Потоковый сокет, в котором сообщение + читается последовательным потоком(TCP). + c. Третий это аргумент протокола: всегда должен быть 0. + Операционная система выберет самый подходящий протокол. + Функция возвращает файл-дескриптор целое число - соединение, которое используется для всех ссылок + на этот сокет. Если произошла ошибка соединения, то возвращается -1. + */ + + server = socket(AF_INET, SOCK_STREAM, 0); + printf("SERVER\n"); + + if (server < 0) + { + printf("Error establishing socket...\n"); + exit(1); + } + + printf("=> Socket server has been created...\n"); + + /* + Переменная serv_addr - структура sockaddr_in. + sin_family содержит код для адресной семьи. + Всегда должна быть установлена AF_INET. + INADDR_ANY содержит IP-адрес хоста. Для сервера - это + IP-адрес компьютера, на котором работает сервер. + htons() функция переводит номер порта из порядка байтов хоста + в номер порта в порядке байтов сети. + + */ + + server_addr.sin_family = AF_INET; + server_addr.sin_addr.s_addr = htons(INADDR_ANY); + server_addr.sin_port = htons(portNum); + + /* ---------- ПРИВЯЗКА СОКЕТА ---------- */ + /* ---------------- bind() ---------------- */ + + /* + bind() функция привязывает сокет к адресу, то есть в нашем случае + к адресу сервера и номеру порта, на котором сервер будет работать. + Для этого нужны три аргумента: файл дескриптор сокета, указатель на структуру + типа sockaddr (должен указывать на правильный тип) + * + */ + + if ((bind(server, (struct sockaddr*)&server_addr,sizeof(server_addr))) < 0) + { + printf("=> Error binding connection, the socket has already been established...\n"); + return -1; + } + + + + size = sizeof(server_addr); + printf("=> Looking for clients...\n"); + + /* ------------- ПРОСЛУШИВАНИЕ СОКЕТА ------------- */ + /* ---------------- listen() ---------------- */ + + /* + Функция listen позволяет прослушивать сокета для подключения. + Программа будет в состоянии простоя, если подключений не обнаружится. + Первый аргумент - это файл дескриптор сокета, второй - количество клиентов, + то есть количество подключений, которое сервер может обработать, пока процесс + обрабатывает определенное подключение. Максимальное число клиентов во многих системах равняется 5. + */ + + listen(server, 1); + + /* ------------- ПОДКЛЮЧЕНИЕ КЛИЕНТОВ ------------- */ + /* ----------------- accept() ------------------- */ + + /* + Система accept() вызывает процесс блокировки пока клиент подключается к серверу. + К тому же, она пробуждает процесс, когда подключение с клиентом было успешно установлено. + Она возвращает новый файл дескриптор, и вся связь по этому подключению должна + осуществляться, используя новый файл дескриптор. Второй аргумент - указатель на + адрес клиента, третий - размер структуры. + */ + + + + int clientCount = 1; + + + while(!isExit) + { + client = accept(server,(struct sockaddr *)&server_addr,&size); + + // первая проверка действительности подключения + if (client < 0) + printf("=> Error on accepting..."); + +//Основной цикл + if(client > 0) + { + printf("=> Connected with the client %d, you are good to go...\n",clientCount); +//..... + + /* + Примечание: мы перейдем в этот момент только после того, как + клиент успешно подключится к нашему серверу. + Произойдет чтение сокета. Заметим, что read() будет + блокировать до момента наличия чего-то для чтения + Чтение будет происходить maximum 1024 символов в пакете + */ + int result = recv(client, buffer, bufsize, 0); + if (result < 0) + { + // ошибка получения данных + printf("\n\n=> Connection terminated error %d with IP %s\n",result,inet_ntoa(server_addr.sin_addr)); + close(client); + exit(1); + } + // Мы знаем фактический размер полученных данных, поэтому ставим метку конца строки + // В буфере запроса. + buffer[result] = '\0'; + char response[1024] = "HTTP/1.1 200 OK\r\n" + "Version: HTTP/1.1\r\n" + "Content-Type: text/html; charset=utf-8\r\n" + "\r\n\r\n" + "" + "" + " " + " " + " " + "

ESP32 - Web Server

" + "

LED #1" + " " + " " + "  " + " " + " " + " " + "

" + "

LED #2" + " " + " " + "  " + " " + " " + " " + "

"; + strcat(response,""); + printf("%s\n",buffer); + char* get_str_on1 = strstr(buffer,"/on1"); + char* get_str_on2 = strstr(buffer,"/on2"); + char* get_str_off1 = strstr(buffer,"/off1"); + char* get_str_off2 = strstr(buffer,"/off2"); + if(get_str_on1) + printf("%s\n",get_str_on1); + if (get_str_on2) + printf("%s\n",get_str_on2); + if (get_str_off1) + printf("%s\n",get_str_off1); + if (get_str_off2) + printf("%s\n",get_str_off2); + + send(client, response,strlen(response), 0); + printf("\n\n=> Connection terminated with IP %s\n",inet_ntoa(server_addr.sin_addr)); + close(client); + printf("\n=> Press any key and , # to end the connection\n"); + char c; + while((c=getchar())!='\n') + if(c=='#') + { + isExit=true; + } + } + } + close(server); + printf("\nGoodbye..."); + isExit = false; + return 0; +} diff --git a/Seminar1/59_invertTree.c b/Seminar1/59_invertTree.c new file mode 100644 index 0000000..6400388 --- /dev/null +++ b/Seminar1/59_invertTree.c @@ -0,0 +1,111 @@ +#include +#include +#include + +typedef struct tree { + int key;//datatype + struct tree *left, *right; + struct tree *parent; // необязательное поле +} tree; + +//Вычисляем высоту дерева +int heightTree(tree* p) +{ + if (p == NULL) + return 0; + else + { + /* вычисляем высоту каждого поддерева */ + int lheight = heightTree(p->left); + int rheight = heightTree(p->right); + + if (lheight > rheight) + return (lheight + 1); + else + return (rheight + 1); + } +} +//Печатаем все узлы на уровне level +void printCurrentLevel(tree* root, int level) +{ + if (root == NULL) + return; + if (level == 1) + printf("%d ", root->key); + else if (level > 1) + { + //если поменять местами то будет обход справа на лево + printCurrentLevel(root->left, level - 1); + printCurrentLevel(root->right, level - 1); + } +} +//функция печати +void printBFS(tree* root) +{ + int h = heightTree(root); + for (int i = 1; i <= h; i++) + printCurrentLevel(root, i); +} + +void preorder(tree *root) +{ + if(root == NULL) + return; + printf("%d ",root->key); + if(root->left) + preorder(root->left); + if(root->right) + preorder(root->right); +} +//Как инвертировать двоичное дерево +void swap(tree *node) +{ + tree *tmp = node->left; + node->left = node->right; + node->right = tmp;; +} +tree* invertTree(tree *root) +{ + if(root) + { + invertTree(root->left); + invertTree(root->right); + swap(root); + } + return root; +} + + +int main(void) +{ + tree *tr = NULL; +//переимновываем узлы в предыдущем дереве + tr = calloc(1,sizeof(tree)); + tr->key = 14; + tr->right = calloc(1,sizeof(tree)); + tr->right->key = 17; + tr->left = calloc(1,sizeof(tree)); + tr->left->key = 9; + tr->left->left = calloc(1,sizeof(tree)); + tr->left->left->key=1; +//добавляем узлы справа от 17 +//~ tr->right->key = 17; + tr->right->left = calloc(1,sizeof(tree)); + tr->right->left->key = 15;//слева + tr->right->right = calloc(1,sizeof(tree)); + tr->right->right->key = 20;//справа +//печатаем дерево + printf("BFS (Breadth First Traversal)\n"); + printBFS(tr); + printf("\nPreorder\n"); + preorder(tr); + printf("\n"); + invertTree(tr); + printf("BFS (Breadth First Traversal)\n"); + printBFS(tr); + printf("\nPreorder\n"); + preorder(tr); + printf("\n"); + + return 0; +} diff --git a/Seminar1/HW/bytestuff.c b/Seminar1/HW/bytestuff.c new file mode 100644 index 0000000..0b70c66 --- /dev/null +++ b/Seminar1/HW/bytestuff.c @@ -0,0 +1,84 @@ + +//typedef enum {false, true} bool; + + +#define SOP 0x7E +#define EOP 0x7E +#define ESC 0x7D +#define XOR 0x20 + + +//добавление байтстафинга 1 байта +int bytestuff(uint8_t *buf0,uint8_t byte,int len) +{ + switch(byte) + { + case SOP: + buf0[len++] = ESC; + buf0[len++] = SOP^XOR; + break; + case ESC: + buf0[len++] = ESC; + buf0[len++] = ESC^XOR; + break; + default: + buf0[len++] = byte; + break; + } + return len; +} + +typedef enum {WAIT_SOF,ESC_SEQ,WAIT_EOF} STATE_RX; +//--------------------------------------------------------------------------- +//разборщик очищенного принятного пакета +void dispel_rx_buf0(uint8_t* buf0,int len) +{ + for(int i=0;i +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int main() +{ + /* ---------- ИНИЦИАЛИЗАЦИЯ ПЕРЕМЕННЫХ КЛИЕНТА---------- */ + + /* + 1. client - файл-дескриптор, хранящий значение сокета, + которые вернула система при подключении к серверу. + 2. portNum нужен для хранения номера порта, на котором происходит соединение. + 3. isExit - булевая переменная, признак завершения программы. + 4. Клиент считывает сообщение из сокета соединения в буффер обмена для приема/отправки данных к/от сервера + 5. sockaddr_in - структура, содержащая интернет адрес, с которым будет установлено соединение. + Эта структура уже определена в netinet/in.h, поэтому нет необходимости + заново ее задавать. + DEFINITION: + struct sockaddr_in + { + short sin_family; + u_short sin_port; + struct in_addr sin_addr; + char sin_zero[8]; + }; + + 6. serv_addr будет содержать адрес сервера + */ + + int client; + int portNum = 1500; // Номер порта один для сервера и клиента! + bool isExit = false; + int bufsize = 1024; + char buffer[bufsize]; + char* ip = "127.0.0.1"; + + struct sockaddr_in server_addr; + + /* + Socket() функция создает новый сокет. + На вход получает 3 аргумента, + a. AF_INET: доменный адрес сокета. + b. SOCK_STREAM: тип сокета. Потоковый сокет, в котором сообщение + читается последовательным потоком(TCP). + c. Третий это аргумент протокола: всегда должен быть 0. + Операционная система выберет самый подходящий протокол. + Функция возвращает файл-дескриптор целое число - соединение, которое используется для всех ссылок + на этот сокет. Если произошла ошибка соединения, то возвращается -1. + */ + + /* ---------- УСТАНОВКА СОКЕТ ПОДКЛЮЧЕНИЯ ----------*/ + /* --------------- socket() функция ------------------*/ + + client = socket(AF_INET, SOCK_STREAM, 0); + + printf("CLIENT\n"); + + if (client < 0) + { + printf("Error establishing socket...\n"); + exit(1); + } + + printf("=> Socket client has been created...\n"); + + /* + Переменная serv_addr - это структура sockaddr_in. + sin_family содержит код для адресной семьи. + Всегда должна быть установлена AF_INET. + htons() переводит номер порта из порядка байтов хоста + в номер порта в порядке байтов сети. + */ + + server_addr.sin_family = AF_INET; + server_addr.sin_port = htons(portNum); + + // эта функция возвращает 1, если IP-адрес действительный + // и 0, если недействительный + // inet_pton переводит IP-адрес в пакеты + // inet_ntoa переводит обратно из пакета в IP-адрес + + inet_pton(AF_INET, ip, &server_addr.sin_addr); + + /* ---------- СОЕДИНЕНИЕ СОКЕТА ---------- */ + /* ---------------- connect() ---------------- */ + + if (connect(client,(struct sockaddr *)&server_addr, sizeof(server_addr)) == 0) + printf("=> Connection to the server %s with port number: %d\n",inet_ntoa(server_addr.sin_addr),portNum); + + if (connect(client,(struct sockaddr *)&server_addr, sizeof(server_addr)) == 0) + printf("=> Connection to the server port number: %d \n",portNum); + + /* + Функция connect вызывается клиентом для установки соединения с сервером. + Ей нужны 3 аргумента: файловый дескриптор сокета, адрес хоста, к которому + клиент хочет подключится (включая номер порта), и размер адреса. + Функция возвращает 0 при успехе и 1 при неудаче. + Примечание: клиенту нужно знать номер порта сервера, + а не свой номер порта. + */ + + printf("=> Awaiting confirmation from the server...\n"); + recv(client, buffer, bufsize, 0); + printf("=> Connection confirmed, you are good to go...\n"); + + printf("\n\n=> Enter # to end the connection\n"); + + // При достижении соединения, клиент может послать сообщение первым. + + do { + char c; + + printf("Client: "); + + c = 0x7E; + send(client, &c, 1, 0); //SOP + + do + { + c = getchar(); + if(c == 0x7E) + { + c = 0x7D; send(client, &c, 1, 0); + c = 0x5E; send(client, &c, 1, 0); + continue; + } + if(c == 0x7D) + { + c = 0x7D; send(client, &c, 1, 0); + c = 0x5D; send(client, &c, 1, 0); + continue; + } + send(client, &c, 1, 0); + if(c == '#') + { + isExit = true; + break; + } + } while (c != '\n'); + c = 0x7E; + send(client, &c, 1, 0); //EOP + + + printf("Server: "); + + do + { + recv(client, &c, 1, 0); + } while (c != 0x7E); //SOP + + recv(client, &c, 1, 0); + while (c != 0x7E) //EOP + { + if(c == 0x7D) + { + recv(client, &c, 1, 0); + if(c == 0x5E) + { + c = 0x7E; + } + else if(c == 0x5D) + { + c = 0x7D; + } + else + { + printf("%c", 0x7D); + continue; + } + } + printf("%c", c); + if (c == '#') + { + isExit = true; + } + recv(client, &c, 1, 0); + } + + } while (!isExit); + + /* ---------------- ЗАВЕРШЕНИЕ СОЕДИНЕНИЯ ------------- */ + /* ----------------- close() --------------- */ + + /* + Как только сервер нажмет # для завершения соединения, + цикл завершится и закроет серверное сокет соединение + и клиентсткое соединение. + */ + + printf("\n=> Connection terminated.\n\nGoodbye...\n"); + + close(client); + return 0; +} \ No newline at end of file diff --git a/Seminar1/HW/server_bytestuff.c b/Seminar1/HW/server_bytestuff.c new file mode 100644 index 0000000..f4a7ba5 --- /dev/null +++ b/Seminar1/HW/server_bytestuff.c @@ -0,0 +1,254 @@ +/*! + * Simple chat program (server side).cpp - http://github.com/hassanyf + * Version - 2.0.1 + * + * Copyright (c) 2016 Hassan M. Yousuf + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int main() +{ + /* ---------- ИНИЦИАЛИЗАЦИЯ ПЕРЕМЕННЫХ СЕРВЕРА---------- */ + + /* + 1. client/server - два файл-дескриптора. + Эти две перемнные хранят значение сокетов, + которые вернула система при подключении. + 2. portNum нужен для хранения номера порта, на котором происходит соединение. + 3. isExit - булевая переменная, признак завершения программы. + 4. Сервер считывает сообщение из сокет соединения в буффер обмена для приема/отправки данных к/от сервера. + + */ + int server;//файл-дескриптор сервера + int client;//файл-дескриптор клиента + int portNum = 1500;//номера порта, на котором происходит соединение (0 до 65535) + bool isExit = false;//булевая переменная, признак завершения программы. + int bufsize = 1024;//размер буффера + char buffer[bufsize]; //буффер обмена для приема/отправки данных к/от сервера +/* + 5. A sockaddr_in - структура, содержащая интернет адрес, с которым будет установлено соединение. + Эта структура уже определена в netinet/in.h, поэтому нет необходимости + заново ее задавать. + DEFINITION: + struct sockaddr_in + { + short sin_family; + u_short sin_port; + struct in_addr sin_addr; + char sin_zero[8]; + }; + 6. serv_addr будет содержать адрес сервера + 7. socklen_t - длиной по крайней мере 32 бита +*/ + struct sockaddr_in server_addr; + socklen_t size; + + /* ---------- УСТАНОВКА СОКЕТ СОЕДИНЕНИЯ ----------*/ + /* --------------- socket() функция ------------------*/ + + /* + Socket() функция создает новый сокет. + На вход получает 3 аргумента, + a. AF_INET: доменный адрес сокета. + b. SOCK_STREAM: тип сокета. Потоковый сокет, в котором сообщение + читается последовательным потоком(TCP). + c. Третий это аргумент протокола: всегда должен быть 0. + Операционная система выберет самый подходящий протокол. + Функция возвращает файл-дескриптор целое число - соединение, которое используется для всех ссылок + на этот сокет. Если произошла ошибка соединения, то возвращается -1. + */ + + server = socket(AF_INET, SOCK_STREAM, 0); + printf("SERVER\n"); + + if (server < 0) + { + printf("Error establishing socket...\n"); + exit(1); + } + + printf("=> Socket server has been created...\n"); + + /* + Переменная serv_addr - структура sockaddr_in. + sin_family содержит код для адресной семьи. + Всегда должна быть установлена AF_INET. + INADDR_ANY содержит IP-адрес хоста. Для сервера - это + IP-адрес компьютера, на котором работает сервер. + htons() функция переводит номер порта из порядка байтов хоста + в номер порта в порядке байтов сети. + + */ + + server_addr.sin_family = AF_INET; + server_addr.sin_addr.s_addr = htons(INADDR_ANY); + server_addr.sin_port = htons(portNum); + + /* ---------- ПРИВЯЗКА СОКЕТА ---------- */ + /* ---------------- bind() ---------------- */ + + /* + bind() функция привязывает сокет к адресу, то есть в нашем случае + к адресу сервера и номеру порта, на котором сервер будет работать. + Для этого нужны три аргумента: файл дескриптор сокета, указатель на структуру + типа sockaddr (должен указывать на правильный тип) + * + */ + + if ((bind(server, (struct sockaddr*)&server_addr,sizeof(server_addr))) < 0) + { + printf("=> Error binding connection, the socket has already been established...\n"); + return -1; + } + + size = sizeof(server_addr); + printf("=> Looking for clients...\n"); + + /* ------------- ПРОСЛУШИВАНИЕ СОКЕТА ------------- */ + /* ---------------- listen() ---------------- */ + + /* + Функция listen позволяет прослушивать сокета для подключения. + Программа будет в состоянии простоя, если подключений не обнаружится. + Первый аргумент - это файл дескриптор сокета, второй - количество клиентов, + то есть количество подключений, которое сервер может обработать, пока процесс + обрабатывает определенное подключение. Максимальное число клиентов во многих системах равняется 5. + */ + + listen(server, 1); + + /* ------------- ПОДКЛЮЧЕНИЕ КЛИЕНТОВ ------------- */ + /* ----------------- accept() ------------------- */ + + /* + Система accept() вызывает процесс блокировки пока клиент подключается к серверу. + К тому же, она пробуждает процесс, когда подключение с клиентом было успешно установлено. + Она возвращает новый файл дескриптор, и вся связь по этому подключению должна + осуществляться, используя новый файл дескриптор. Второй аргумент - указатель на + адрес клиента, третий - размер структуры. + */ + + int clientCount = 1; + client = accept(server,(struct sockaddr *)&server_addr,&size); + + // первая проверка действительности подключения + if (client < 0) + printf("=> Error on accepting..."); + +//Основной цикл + while (client > 0) + { + printf("=> Connected with the client %d, you are good to go...\n",clientCount); + printf("\n=> Enter # to end the connection\n"); +//..... + strcpy(buffer, "=> Server connected...\n"); + send(client, buffer, bufsize, 0); + + + do { + char c; + + printf("Client: "); + + do + { + recv(client, &c, 1, 0); + } while (c != 0x7E); //SOP + + recv(client, &c, 1, 0); + while (c != 0x7E) //EOP + { + if(c == 0x7D) + { + recv(client, &c, 1, 0); + if(c == 0x5E) + { + c = 0x7E; + } + else if(c == 0x5D) + { + c = 0x7D; + } + else + { + printf("%c", 0x7D); + continue; + } + } + printf("%c", c); + if (c == '#') + { + isExit = true; + } + recv(client, &c, 1, 0); + } + + + + printf("Server: "); + + c = 0x7E; + send(client, &c, 1, 0); //SOP + do + { + c = getchar(); + if(c == 0x7E) + { + c = 0x7D; send(client, &c, 1, 0); + c = 0x5E; send(client, &c, 1, 0); + continue; + } + if(c == 0x7D) + { + c = 0x7D; send(client, &c, 1, 0); + c = 0x5D; send(client, &c, 1, 0); + continue; + } + send(client, &c, 1, 0); + if(c == '#') + { + isExit = true; + break; + } + } while (c != '\n'); + c = 0x7E; + send(client, &c, 1, 0); //EOP + + + } while (!isExit); + + /* + Как только соединение будет установлено, оба конца связи могут + писать и читать соединение. Все, написанное клиентом, будет прочитано сервером, + а все, написанное сервером, будет прочитано клиентом. + */ + + /* ---------------- ЗАВЕРШЕНИЕ СОЕДИНЕНИЯ ------------- */ + /* ----------------- close() --------------- */ + + /* + Как только сервер нажмет # для завершения соединения, + цикл завершится и закроет серверное сокет соединение + и клиентсткое соединение. + */ + + // inet_ntoa переводит данные пакета в IP-адрес, который был взят у клиента + printf("\n\n=> Connection terminated with IP %s\n",inet_ntoa(server_addr.sin_addr)); + close(client); + close(server); + printf("\nGoodbye..."); + isExit = false; + //~ exit(1); + return 0; + } + return 0; +} \ No newline at end of file diff --git a/Seminar1/Windows/Client_part.cpp b/Seminar1/Windows/Client_part.cpp new file mode 100644 index 0000000..2b455a3 --- /dev/null +++ b/Seminar1/Windows/Client_part.cpp @@ -0,0 +1,118 @@ +// Client part for Server-Client chat. Developed by Mr_Dezz + +#include +#include +#include +#include +#include +#include + +#pragma comment(lib, "ws2_32.lib") + +using namespace std; + + +int main(void) +{ + //Key constants + const char SERVER_IP[] = "127.0.0.1"; // Enter IPv4 address of Server + const short SERVER_PORT_NUM = 5000; // Enter Listening port on Server side + const short BUFF_SIZE = 1024; // Maximum size of buffer for exchange info between server and client + + // Key variables for all program + int erStat; // For checking errors in sockets functions + + //IP in string format to numeric format for socket functions. Data is in "ip_to_num" + in_addr ip_to_num; + inet_pton(AF_INET, SERVER_IP, &ip_to_num); + + + // WinSock initialization + WSADATA wsData; + erStat = WSAStartup(MAKEWORD(2,2), &wsData); + + if (erStat != 0) { + cout << "Error WinSock version initializaion #"; + cout << WSAGetLastError(); + return 1; + } + else + cout << "WinSock initialization is OK" << endl; + + // Socket initialization + SOCKET ClientSock = socket(AF_INET, SOCK_STREAM, 0); + + if (ClientSock == INVALID_SOCKET) { + cout << "Error initialization socket # " << WSAGetLastError() << endl; + closesocket(ClientSock); + WSACleanup(); + } + else + cout << "Client socket initialization is OK" << endl; + + // Establishing a connection to Server + sockaddr_in servInfo; + + ZeroMemory(&servInfo, sizeof(servInfo)); + + servInfo.sin_family = AF_INET; + servInfo.sin_addr = ip_to_num; + servInfo.sin_port = htons(SERVER_PORT_NUM); + + erStat = connect(ClientSock, (sockaddr*)&servInfo, sizeof(servInfo)); + + if (erStat != 0) { + cout << "Connection to Server is FAILED. Error # " << WSAGetLastError() << endl; + closesocket(ClientSock); + WSACleanup(); + return 1; + } + else + cout << "Connection established SUCCESSFULLY. Ready to send a message to Server" << endl; + + + //Exchange text data between Server and Client. Disconnection if a Client send "xxx" + + vector servBuff(BUFF_SIZE), clientBuff(BUFF_SIZE); // Buffers for sending and receiving data + short packet_size = 0; // The size of sending / receiving packet in bytes + + while (true) { + + cout << "Your (Client) message to Server: "; + fgets(clientBuff.data(), clientBuff.size(), stdin); + + // Check whether client like to stop chatting + if (clientBuff[0] == 'x' && clientBuff[1] == 'x' && clientBuff[2] == 'x') { + shutdown(ClientSock, SD_BOTH); + closesocket(ClientSock); + WSACleanup(); + return 0; + } + + packet_size = send(ClientSock, clientBuff.data(), clientBuff.size(), 0); + + if (packet_size == SOCKET_ERROR) { + cout << "Can't send message to Server. Error # " << WSAGetLastError() << endl; + closesocket(ClientSock); + WSACleanup(); + return 1; + } + + packet_size = recv(ClientSock, servBuff.data(), servBuff.size(), 0); + + if (packet_size == SOCKET_ERROR) { + cout << "Can't receive message from Server. Error # " << WSAGetLastError() << endl; + closesocket(ClientSock); + WSACleanup(); + return 1; + } + else + cout << "Server message: " << servBuff.data() << endl; + + } + + closesocket(ClientSock); + WSACleanup(); + + return 0; +} diff --git a/Seminar1/Windows/Server_part.cpp b/Seminar1/Windows/Server_part.cpp new file mode 100644 index 0000000..00f3371 --- /dev/null +++ b/Seminar1/Windows/Server_part.cpp @@ -0,0 +1,156 @@ +// Server part of Server-Client chat. Developed by Mr_Dezz + +#include +#include +#include +#include +#include + +#pragma comment(lib, "Ws2_32.lib") + +using namespace std; + + +int main(void) +{ + + //Key constants + const char IP_SERV[] = "127.0.0.1"; // Enter local Server IP address + const int PORT_NUM = 5000; // Enter Open working server port + const short BUFF_SIZE = 1024; // Maximum size of buffer for exchange info between server and client + + // Key variables for all program + int erStat; // Keeps socket errors status + + //IP in string format to numeric format for socket functions. Data is in "ip_to_num" + in_addr ip_to_num; + erStat = inet_pton(AF_INET, IP_SERV, &ip_to_num); + + if (erStat <= 0) { + cout << "Error in IP translation to special numeric format" << endl; + return 1; + } + + + // WinSock initialization + WSADATA wsData; + + erStat = WSAStartup(MAKEWORD(2,2), &wsData); + + if ( erStat != 0 ) { + cout << "Error WinSock version initializaion #"; + cout << WSAGetLastError(); + return 1; + } + else + cout << "WinSock initialization is OK" << endl; + + // Server socket initialization + SOCKET ServSock = socket(AF_INET, SOCK_STREAM, 0); + + if (ServSock == INVALID_SOCKET) { + cout << "Error initialization socket # " << WSAGetLastError() << endl; + closesocket(ServSock); + WSACleanup(); + return 1; + } + else + cout << "Server socket initialization is OK" << endl; + + // Server socket binding + sockaddr_in servInfo; + ZeroMemory(&servInfo, sizeof(servInfo)); // Initializing servInfo structure + + servInfo.sin_family = AF_INET; + servInfo.sin_addr = ip_to_num; + servInfo.sin_port = htons(PORT_NUM); + + erStat = bind(ServSock, (sockaddr*)&servInfo, sizeof(servInfo)); + + if ( erStat != 0 ) { + cout << "Error Socket binding to server info. Error # " << WSAGetLastError() << endl; + closesocket(ServSock); + WSACleanup(); + return 1; + } + else + cout << "Binding socket to Server info is OK" << endl; + + //Starting to listen to any Clients + erStat = listen(ServSock, SOMAXCONN); + + if ( erStat != 0 ) { + cout << "Can't start to listen to. Error # " << WSAGetLastError() << endl; + closesocket(ServSock); + WSACleanup(); + return 1; + } + else { + cout << "Listening..." << endl; + } + + //Client socket creation and acception in case of connection + sockaddr_in clientInfo; + ZeroMemory(&clientInfo, sizeof(clientInfo)); // Initializing clientInfo structure + + int clientInfo_size = sizeof(clientInfo); + + SOCKET ClientConn = accept(ServSock, (sockaddr*)&clientInfo, &clientInfo_size); + + if (ClientConn == INVALID_SOCKET) { + cout << "Client detected, but can't connect to a client. Error # " << WSAGetLastError() << endl; + closesocket(ServSock); + closesocket(ClientConn); + WSACleanup(); + return 1; + } + else { + cout << "Connection to a client established successfully" << endl; + char clientIP[22]; + + inet_ntop(AF_INET, &clientInfo.sin_addr, clientIP, INET_ADDRSTRLEN); // Convert connected client's IP to standard string format + + cout << "Client connected with IP address " << clientIP << endl; + + } + + //Exchange text data between Server and Client. Disconnection if a client send "xxx" + + vector servBuff(BUFF_SIZE), clientBuff(BUFF_SIZE); // Creation of buffers for sending and receiving data + short packet_size = 0; // The size of sending / receiving packet in bytes + + while (true) { + packet_size = recv(ClientConn, servBuff.data(), servBuff.size(), 0); // Receiving packet from client. Program is waiting (system pause) until receive + cout << "Client's message: " << servBuff.data() << endl; + + cout << "Your (host) message: "; + fgets(clientBuff.data(), clientBuff.size(), stdin); + + // Check whether server would like to stop chatting + if (clientBuff[0] == 'x' && clientBuff[1] == 'x' && clientBuff[2] == 'x') { + shutdown(ClientConn, SD_BOTH); + closesocket(ServSock); + closesocket(ClientConn); + WSACleanup(); + return 0; + } + + packet_size = send(ClientConn, clientBuff.data(), clientBuff.size(), 0); + + if (packet_size == SOCKET_ERROR) { + cout << "Can't send message to Client. Error # " << WSAGetLastError() << endl; + closesocket(ServSock); + closesocket(ClientConn); + WSACleanup(); + return 1; + } + + } + + closesocket(ServSock); + closesocket(ClientConn); + WSACleanup(); + + return 0; + +} diff --git a/Seminar1/Windows/http_server_v2.1.cpp b/Seminar1/Windows/http_server_v2.1.cpp new file mode 100644 index 0000000..f7a2a5e --- /dev/null +++ b/Seminar1/Windows/http_server_v2.1.cpp @@ -0,0 +1,163 @@ +#include +#include +#include + +//http://127.0.0.1:8000/ + +// Для корректной работы freeaddrinfo в MinGW +// Подробнее: http://stackoverflow.com/a/20306451 +#define _WIN32_WINNT 0x501 + +#include +#include + +// Необходимо, чтобы линковка происходила с DLL-библиотекой +// Для работы с сокетам +#pragma comment(lib, "Ws2_32.lib") + +using std::cerr; + +int main() +{ + WSADATA wsaData; // служебная структура для хранение информации + // о реализации Windows Sockets + // старт использования библиотеки сокетов процессом + // (подгружается Ws2_32.dll) + int result = WSAStartup(MAKEWORD(2, 2), &wsaData); + + // Если произошла ошибка подгрузки библиотеки + if (result != 0) { + cerr << "WSAStartup failed: " << result << "\n"; + return result; + } + + struct addrinfo* addr = NULL; // структура, хранящая информацию + // об IP-адресе слущающего сокета + + // Шаблон для инициализации структуры адреса + struct addrinfo hints; + ZeroMemory(&hints, sizeof(hints)); + + hints.ai_family = AF_INET; // AF_INET определяет, что будет + // использоваться сеть для работы с сокетом + hints.ai_socktype = SOCK_STREAM; // Задаем потоковый тип сокета + hints.ai_protocol = IPPROTO_TCP; // Используем протокол TCP + hints.ai_flags = AI_PASSIVE; // Сокет будет биндиться на адрес, + // чтобы принимать входящие соединения + + // Инициализируем структуру, хранящую адрес сокета - addr + // Наш HTTP-сервер будет висеть на 8000-м порту локалхоста + result = getaddrinfo("127.0.0.1", "8000", &hints, &addr); + + // Если инициализация структуры адреса завершилась с ошибкой, + // выведем сообщением об этом и завершим выполнение программы + if (result != 0) { + cerr << "getaddrinfo failed: " << result << "\n"; + WSACleanup(); // выгрузка библиотеки Ws2_32.dll + return 1; + } + + // Создание сокета + int listen_socket = socket(addr->ai_family, addr->ai_socktype, + addr->ai_protocol); + // Если создание сокета завершилось с ошибкой, выводим сообщение, + // освобождаем память, выделенную под структуру addr, + // выгружаем dll-библиотеку и закрываем программу + if (listen_socket == INVALID_SOCKET) { + cerr << "Error at socket: " << WSAGetLastError() << "\n"; + freeaddrinfo(addr); + WSACleanup(); + return 1; + } + + // Привязываем сокет к IP-адресу + result = bind(listen_socket, addr->ai_addr, (int)addr->ai_addrlen); + + // Если привязать адрес к сокету не удалось, то выводим сообщение + // об ошибке, освобождаем память, выделенную под структуру addr. + // и закрываем открытый сокет. + // Выгружаем DLL-библиотеку из памяти и закрываем программу. + if (result == SOCKET_ERROR) { + cerr << "bind failed with error: " << WSAGetLastError() << "\n"; + freeaddrinfo(addr); + closesocket(listen_socket); + WSACleanup(); + return 1; + } + + // Инициализируем слушающий сокет + if (listen(listen_socket, SOMAXCONN) == SOCKET_ERROR) { + cerr << "listen failed with error: " << WSAGetLastError() << "\n"; + closesocket(listen_socket); + WSACleanup(); + return 1; + } + + + const int max_client_buffer_size = 1024; + char buf[max_client_buffer_size]; + int client_socket = INVALID_SOCKET; + + for (;;) { + // Принимаем входящие соединения + client_socket = accept(listen_socket, NULL, NULL); + if (client_socket == INVALID_SOCKET) { + cerr << "accept failed: " << WSAGetLastError() << "\n"; + closesocket(listen_socket); + WSACleanup(); + return 1; + } + + result = recv(client_socket, buf, max_client_buffer_size, 0); + + std::stringstream response; // сюда будет записываться ответ клиенту + std::stringstream response_body; // тело ответа + + if (result == SOCKET_ERROR) { + // ошибка получения данных + cerr << "recv failed: " << result << "\n"; + closesocket(client_socket); + } else if (result == 0) { + // соединение закрыто клиентом + cerr << "connection closed...\n"; + } else if (result > 0) { + // Мы знаем фактический размер полученных данных, поэтому ставим метку конца строки + // В буфере запроса. + buf[result] = '\0'; + + // Данные успешно получены + // формируем тело ответа (HTML) + response_body << "Test C++ HTTP Server\n" + << "

Test page

\n" + << "

This is body of the test page...

\n" + << "

Request headers

\n" + << "
" << buf << "
\n" + << "Test C++ Http Server\n"; + + // Формируем весь ответ вместе с заголовками + response << "HTTP/1.1 200 OK\r\n" + << "Version: HTTP/1.1\r\n" + << "Content-Type: text/html; charset=utf-8\r\n" + << "Content-Length: " << response_body.str().length() + << "\r\n\r\n" + << response_body.str(); + + // Отправляем ответ клиенту с помощью функции send + result = send(client_socket, response.str().c_str(), + response.str().length(), 0); + + if (result == SOCKET_ERROR) { + // произошла ошибка при отправле данных + cerr << "send failed: " << WSAGetLastError() << "\n"; + } + // Закрываем соединение к клиентом + closesocket(client_socket); + } + } + + // Убираем за собой + closesocket(listen_socket); + freeaddrinfo(addr); + WSACleanup(); + return 0; +}