// File: /workspace/github_c_makefile_star2_O0/hasindu2008[P]f5p/f5pl.c
// Function: node_handler
void* node_handler(void* arg) {
    //thread index
    int32_t tid = *((int32_t*)arg);

    //buffer for socket communication
    char buffer[MAX_PATH_SIZE];

    //reset the hang counter
    core.num_hangs[tid] = 0;

    //open report file
    char report_fname[100];
    sprintf(report_fname, "dev%d.cfg", tid+1);
    FILE* report = fopen(report_fname, "w");
    NULL_CHK(report);

    while (1) {
        pthread_mutex_lock(&file_list_mutex);
        int32_t fidx = core.file_list_idx;

        //check if there are files remaining to be processed
        if (fidx < core.file_list_cnt) {
            core.file_list_idx++;
            pthread_mutex_unlock(&file_list_mutex);
        } else {
            pthread_mutex_unlock(&file_list_mutex);
            break;
        }

        fprintf(stderr, "[t%d(%s)::INFO] Connecting to %s.\n", tid,
                core.ip_list[tid], core.ip_list[tid]);
        int socketfd = TCP_client_connect_try(core.ip_list[tid], PORT,CONNECT_TIME_OUT);
        if(socketfd==-1){
            fprintf(stderr,
                        "[t%d(%s)::WARNING]\033[1;33m Connection initiation to device %s failed. Giving up hope on the device.\033[0m\n",
                        tid, core.ip_list[tid], core.ip_list[tid]);  
            pthread_mutex_lock(&file_list_mutex); //todo : this can be a different lock for efficiency
            int32_t failed_cnt = core.failed_cnt;
            core.failed_cnt++;
            core.failed[failed_cnt] = fidx;
            pthread_mutex_unlock(&file_list_mutex);  
            break;         
        }

        fprintf(stderr, "[t%d(%s)::INFO] Assigning %s (%d of %d) to %s.\n", tid,
                core.ip_list[tid], core.file_list[fidx], fidx+1 , core.file_list_cnt, core.ip_list[tid]);
        send_full_msg(socketfd, core.file_list[fidx],
                      strlen(core.file_list[fidx]));

        //receive the ''done' message (will block until done)
        int received = recv_full_msg_try(socketfd, buffer, MAX_PATH_SIZE, RECEIVE_TIME_OUT);

        //handle incase the socket has broken
        int32_t count = 0;
        while (received < 0) {
            count++;
            core.num_hangs[tid]++;
            fprintf(stderr,
                        "[t%d(%s)::WARNING]\033[1;33m Device %s has hung/disconnected. \033[0m\n",
                        tid, core.ip_list[tid], core.ip_list[tid]);            
            if (count >= MAX_CONSECUTIVE_FAILURES) { //if the device failed so many times
                fprintf(stderr,
                        "[t%d(%s)::ERROR]\033[1;31m Device %s failed %d times "
                        "consecutively. Retiring the device. \033[0m\n",
                        tid, core.ip_list[tid], core.ip_list[tid], count);
                pthread_mutex_lock(&file_list_mutex); //todo : this can be a different lock for efficiency
                int32_t failed_cnt = core.failed_cnt;
                core.failed_cnt++;
                core.failed[failed_cnt] = fidx;
                pthread_mutex_unlock(&file_list_mutex);
                fclose(report);
                fprintf(stderr,
                "[t%d(%s)::INFO] \033[1;34m Processed list: %s Elapsed time: %.3fh \033[0m\n",tid,core.ip_list[tid],report_fname,(realtime() - realtime0)/3600);
                pthread_exit(0);
            }
            fprintf(stderr, "[t%d(%s)::INFO] Connecting to %s\n", tid,
                    core.ip_list[tid], core.ip_list[tid]);
            socketfd = TCP_client_connect_try(core.ip_list[tid], PORT,CONNECT_TIME_OUT);
            if(socketfd==-1){ //complete device hang detection
                fprintf(stderr,
                            "[t%d(%s)::WARNING]\033[1;33m Connection initiation to device %s failed. Giving up hope on the device.\033[0m\n",
                            tid, core.ip_list[tid], core.ip_list[tid]);  
                pthread_mutex_lock(&file_list_mutex); //todo : this can be a different lock for efficiency
                int32_t failed_cnt = core.failed_cnt;
                core.failed_cnt++;
                core.failed[failed_cnt] = fidx;
                pthread_mutex_unlock(&file_list_mutex);  
                fclose(report);
                 fprintf(stderr,
                "[t%d(%s)::INFO] \033[1;34m Processed list: %s Elapsed time: %.3fh \033[0m\n",tid,core.ip_list[tid],report_fname,(realtime() - realtime0)/3600);
                pthread_exit(0);        
            }            
            fprintf(stderr, "[t%d(%s)::INFO] Assigning %s (%d of %d) to %s\n", tid,
                    core.ip_list[tid], core.file_list[fidx],  fidx+1 , core.file_list_cnt, core.ip_list[tid]);
            send_full_msg(socketfd, core.file_list[fidx],
                          strlen(core.file_list[fidx]));
            received = recv_full_msg_try(socketfd, buffer, MAX_PATH_SIZE, 5);
        }

        //print the message
        buffer[received] = '\0'; //null character before printing the string
        fprintf(stderr, "[t%d(%s)::INFO] Received message '%s'.\n", tid,
                core.ip_list[tid], buffer);

        if (strcmp(buffer, "done.") == 0) {
            //write to report
            fprintf(report, "%s\n", core.file_list[fidx]);
        } else if (strcmp(buffer, "crashed.") == 0) {
            fprintf(stderr,"[t%d(%s)::WARNING]\033[1;33m %s terminated due to a signal. Please inspect the device log.\033[0m\n",tid,core.ip_list[tid],
                    core.file_list[fidx]);
            int32_t failed_cnt = core.failed_other_cnt;
            core.failed_other_cnt++;
            core.failed_other[failed_cnt] = fidx;
        } else {
            fprintf(stderr,
                "[t%d(%s)::WARNING] \033[1;33m%s exited with a non 0 exit status. Please inspect the device log.\033[0m\n",tid,core.ip_list[tid],
                core.file_list[fidx]);
            int32_t failed_cnt = core.failed_other_cnt;
            core.failed_other_cnt++;
            core.failed_other[failed_cnt] = fidx;
        }

        //close the connection
        TCP_client_disconnect(socketfd);
    }
    fprintf(stderr,
                "[t%d(%s)::INFO] \033[1;34m Processed list: %s Elapsed time: %.3fh \033[0m\n",tid,core.ip_list[tid],report_fname,(realtime() - realtime0)/3600);

    fclose(report);
    pthread_exit(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1140, %rsp           # imm = 0x1140
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x5245(%rip), %rax      # 0x7198
movl $0x0, 0x401c(%rax,%rcx,4)
leaq -0x1080(%rbp), %rdi
movl -0xc(%rbp), %edx
addl $0x1, %edx
leaq 0x24e6(%rip), %rsi      # 0x4458
movb $0x0, %al
callq 0x1210
leaq -0x1080(%rbp), %rdi
leaq 0x24db(%rip), %rsi      # 0x4462
callq 0x11d0
movq %rax, -0x1088(%rbp)
movq -0x1088(%rbp), %rdi
leaq 0x24c3(%rip), %rsi      # 0x4464
leaq 0x24c9(%rip), %rdx      # 0x4471
movl $0x5e, %ecx
callq 0x3250
leaq 0x51af(%rip), %rdi      # 0x7168
callq 0x1270
movl 0x51dc(%rip), %eax      # 0x71a0
movl %eax, -0x108c(%rbp)
movl -0x108c(%rbp), %eax
cmpl 0x51ce(%rip), %eax      # 0x71a4
jge 0x1ff5
movl 0x51c2(%rip), %eax      # 0x71a0
addl $0x1, %eax
movl %eax, 0x51b9(%rip)      # 0x71a0
leaq 0x517a(%rip), %rdi      # 0x7168
callq 0x1170
jmp 0x2006
leaq 0x516c(%rip), %rdi      # 0x7168
callq 0x1170
jmp 0x2776
movq 0x4feb(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movl -0xc(%rbp), %edx
movq 0x518e(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x517f(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rsi
movq (%rax,%rsi,8), %r8
leaq 0x2440(%rip), %rsi      # 0x4478
movb $0x0, %al
callq 0x1160
movq 0x5162(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0x4e36, %esi           # imm = 0x4E36
movl $0xc8, %edx
callq 0x1cb0
movl %eax, -0x1090(%rbp)
cmpl $-0x1, -0x1090(%rbp)
jne 0x20f9
movq 0x4f81(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movl -0xc(%rbp), %edx
movq 0x5124(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x5115(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rsi
movq (%rax,%rsi,8), %r8
leaq 0x23f9(%rip), %rsi      # 0x449b
movb $0x0, %al
callq 0x1160
leaq 0x50b8(%rip), %rdi      # 0x7168
callq 0x1270
movl 0x90f5(%rip), %eax      # 0xb1b0
movl %eax, -0x1094(%rbp)
movl 0x90e9(%rip), %eax      # 0xb1b0
addl $0x1, %eax
movl %eax, 0x90e0(%rip)      # 0xb1b0
movl -0x108c(%rbp), %edx
movslq -0x1094(%rbp), %rcx
leaq 0x50b4(%rip), %rax      # 0x7198
movl %edx, 0x18(%rax,%rcx,4)
leaq 0x5079(%rip), %rdi      # 0x7168
callq 0x1170
jmp 0x2776
movq 0x4ef8(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movl -0xc(%rbp), %edx
movq 0x509b(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x507c(%rip), %rax      # 0x7198
movslq -0x108c(%rbp), %rsi
movq (%rax,%rsi,8), %r8
movl -0x108c(%rbp), %r9d
addl $0x1, %r9d
movl 0x506b(%rip), %r10d     # 0x71a4
movq 0x5068(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rsi
movq (%rax,%rsi,8), %rax
leaq 0x23b4(%rip), %rsi      # 0x4503
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x1160
movl -0x1090(%rbp), %eax
movl %eax, -0x10bc(%rbp)
movq 0x5026(%rip), %rax      # 0x7198
movslq -0x108c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x10b8(%rbp)
movq 0x500d(%rip), %rax      # 0x7198
movslq -0x108c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x10b0
movl -0x10bc(%rbp), %edi
movq -0x10b8(%rbp), %rsi
movq %rax, %rdx
callq 0x1390
movl -0x1090(%rbp), %edi
leaq -0x1010(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
movl $0x5, %ecx
callq 0x15d0
movl %eax, -0x1098(%rbp)
movl $0x0, -0x109c(%rbp)
cmpl $0x0, -0x1098(%rbp)
jge 0x25e2
movl -0x109c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x109c(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x4f95(%rip), %rax      # 0x7198
movl 0x401c(%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0x4f84(%rip), %rax      # 0x7198
movl %edx, 0x401c(%rax,%rcx,4)
movq 0x4dd6(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movl -0xc(%rbp), %edx
movq 0x4f79(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x4f6a(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rsi
movq (%rax,%rsi,8), %r8
leaq 0x22e6(%rip), %rsi      # 0x4533
movb $0x0, %al
callq 0x1160
cmpl $0x3, -0x109c(%rbp)
jl 0x2381
movq 0x4d90(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movl -0xc(%rbp), %edx
movq 0x4f33(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x4f24(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rsi
movq (%rax,%rsi,8), %r8
movl -0x109c(%rbp), %r9d
leaq 0x22da(%rip), %rsi      # 0x4574
movb $0x0, %al
callq 0x1160
leaq 0x4ec0(%rip), %rdi      # 0x7168
callq 0x1270
movl 0x8efd(%rip), %eax      # 0xb1b0
movl %eax, -0x10a0(%rbp)
movl 0x8ef1(%rip), %eax      # 0xb1b0
addl $0x1, %eax
movl %eax, 0x8ee8(%rip)      # 0xb1b0
movl -0x108c(%rbp), %edx
movslq -0x10a0(%rbp), %rcx
leaq 0x4ebc(%rip), %rax      # 0x7198
movl %edx, 0x18(%rax,%rcx,4)
leaq 0x4e81(%rip), %rdi      # 0x7168
callq 0x1170
movq -0x1088(%rbp), %rdi
callq 0x1090
movq 0x4cf9(%rip), %rax      # 0x6ff8
movq (%rax), %rax
movq %rax, -0x10e0(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x10d4(%rbp)
movq 0x4e8f(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x10d0(%rbp)
leaq -0x1080(%rbp), %rax
movq %rax, -0x10c8(%rbp)
callq 0x2810
movq -0x10e0(%rbp), %rdi
movl -0x10d4(%rbp), %edx
movq -0x10d0(%rbp), %rcx
movq -0x10c8(%rbp), %r8
subsd 0x4e32(%rip), %xmm0     # 0x7190
movsd 0x20e2(%rip), %xmm1     # 0x4448
divsd %xmm1, %xmm0
leaq 0x225f(%rip), %rsi      # 0x45d0
movb $0x1, %al
callq 0x1160
xorl %eax, %eax
movl %eax, %edi
callq 0x1180
movq 0x4c70(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movl -0xc(%rbp), %edx
movq 0x4e13(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x4e04(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rsi
movq (%rax,%rsi,8), %r8
leaq 0x2262(%rip), %rsi      # 0x4615
movb $0x0, %al
callq 0x1160
movq 0x4de7(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0x4e36, %esi           # imm = 0x4E36
movl $0xc8, %edx
callq 0x1cb0
movl %eax, -0x1090(%rbp)
cmpl $-0x1, -0x1090(%rbp)
jne 0x2504
movq 0x4c06(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movl -0xc(%rbp), %edx
movq 0x4da9(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x4d9a(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rsi
movq (%rax,%rsi,8), %r8
leaq 0x207e(%rip), %rsi      # 0x449b
movb $0x0, %al
callq 0x1160
leaq 0x4d3d(%rip), %rdi      # 0x7168
callq 0x1270
movl 0x8d7a(%rip), %eax      # 0xb1b0
movl %eax, -0x10a4(%rbp)
movl 0x8d6e(%rip), %eax      # 0xb1b0
addl $0x1, %eax
movl %eax, 0x8d65(%rip)      # 0xb1b0
movl -0x108c(%rbp), %edx
movslq -0x10a4(%rbp), %rcx
leaq 0x4d39(%rip), %rax      # 0x7198
movl %edx, 0x18(%rax,%rcx,4)
leaq 0x4cfe(%rip), %rdi      # 0x7168
callq 0x1170
movq -0x1088(%rbp), %rdi
callq 0x1090
movq 0x4b76(%rip), %rax      # 0x6ff8
movq (%rax), %rax
movq %rax, -0x1100(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x10f4(%rbp)
movq 0x4d0c(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x10f0(%rbp)
leaq -0x1080(%rbp), %rax
movq %rax, -0x10e8(%rbp)
callq 0x2810
movq -0x1100(%rbp), %rdi
movl -0x10f4(%rbp), %edx
movq -0x10f0(%rbp), %rcx
movq -0x10e8(%rbp), %r8
subsd 0x4caf(%rip), %xmm0     # 0x7190
movsd 0x1f5f(%rip), %xmm1     # 0x4448
divsd %xmm1, %xmm0
leaq 0x20dc(%rip), %rsi      # 0x45d0
movb $0x1, %al
callq 0x1160
xorl %eax, %eax
movl %eax, %edi
callq 0x1180
movq 0x4aed(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movl -0xc(%rbp), %edx
movq 0x4c90(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x4c71(%rip), %rax      # 0x7198
movslq -0x108c(%rbp), %rsi
movq (%rax,%rsi,8), %r8
movl -0x108c(%rbp), %r9d
addl $0x1, %r9d
movl 0x4c60(%rip), %r10d     # 0x71a4
movq 0x4c5d(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rsi
movq (%rax,%rsi,8), %rax
leaq 0x20dd(%rip), %rsi      # 0x4637
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x1160
movl -0x1090(%rbp), %eax
movl %eax, -0x110c(%rbp)
movq 0x4c1b(%rip), %rax      # 0x7198
movslq -0x108c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x1108(%rbp)
movq 0x4c02(%rip), %rax      # 0x7198
movslq -0x108c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x10b0
movl -0x110c(%rbp), %edi
movq -0x1108(%rbp), %rsi
movq %rax, %rdx
callq 0x1390
movl -0x1090(%rbp), %edi
leaq -0x1010(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
movl $0x5, %ecx
callq 0x15d0
movl %eax, -0x1098(%rbp)
jmp 0x21dc
movslq -0x1098(%rbp), %rax
movb $0x0, -0x1010(%rbp,%rax)
movq 0x4a00(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movl -0xc(%rbp), %edx
movq 0x4ba3(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq -0x1010(%rbp), %r8
leaq 0x204b(%rip), %rsi      # 0x4666
movb $0x0, %al
callq 0x1160
leaq -0x1010(%rbp), %rdi
leaq 0x205e(%rip), %rsi      # 0x468e
callq 0x1140
cmpl $0x0, %eax
jne 0x2666
movq -0x1088(%rbp), %rdi
movq 0x4b50(%rip), %rax      # 0x7198
movslq -0x108c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x1bb8(%rip), %rsi      # 0x4212
movb $0x0, %al
callq 0x1160
jmp 0x2766
leaq -0x1010(%rbp), %rdi
leaq 0x2020(%rip), %rsi      # 0x4694
callq 0x1140
cmpl $0x0, %eax
jne 0x26f2
movq 0x4973(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movl -0xc(%rbp), %edx
movq 0x4b16(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x4af7(%rip), %rax      # 0x7198
movslq -0x108c(%rbp), %rsi
movq (%rax,%rsi,8), %r8
leaq 0x1fea(%rip), %rsi      # 0x469d
movb $0x0, %al
callq 0x1160
movl 0xcef4(%rip), %eax      # 0xf5b4
movl %eax, -0x10a8(%rbp)
movl 0xcee8(%rip), %eax      # 0xf5b4
addl $0x1, %eax
movl %eax, 0xcedf(%rip)      # 0xf5b4
movl -0x108c(%rbp), %edx
movslq -0x10a8(%rbp), %rcx
leaq 0x4aaf(%rip), %rax      # 0x7198
movl %edx, 0x441c(%rax,%rcx,4)
jmp 0x2764
movq 0x48ff(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movl -0xc(%rbp), %edx
movq 0x4aa2(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x4a83(%rip), %rax      # 0x7198
movslq -0x108c(%rbp), %rsi
movq (%rax,%rsi,8), %r8
leaq 0x1fd3(%rip), %rsi      # 0x46fa
movb $0x0, %al
callq 0x1160
movl 0xce80(%rip), %eax      # 0xf5b4
movl %eax, -0x10ac(%rbp)
movl 0xce74(%rip), %eax      # 0xf5b4
addl $0x1, %eax
movl %eax, 0xce6b(%rip)      # 0xf5b4
movl -0x108c(%rbp), %edx
movslq -0x10ac(%rbp), %rcx
leaq 0x4a3b(%rip), %rax      # 0x7198
movl %edx, 0x441c(%rax,%rcx,4)
jmp 0x2766
movl -0x1090(%rbp), %edi
callq 0x1ee0
jmp 0x1fb2
movq 0x487b(%rip), %rax      # 0x6ff8
movq (%rax), %rax
movq %rax, -0x1130(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x1124(%rbp)
movq 0x4a11(%rip), %rax      # 0x71a8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x1120(%rbp)
leaq -0x1080(%rbp), %rax
movq %rax, -0x1118(%rbp)
callq 0x2810
movq -0x1130(%rbp), %rdi
movl -0x1124(%rbp), %edx
movq -0x1120(%rbp), %rcx
movq -0x1118(%rbp), %r8
subsd 0x49b4(%rip), %xmm0     # 0x7190
movsd 0x1c64(%rip), %xmm1     # 0x4448
divsd %xmm1, %xmm0
leaq 0x1de1(%rip), %rsi      # 0x45d0
movb $0x1, %al
callq 0x1160
movq -0x1088(%rbp), %rdi
callq 0x1090
xorl %eax, %eax
movl %eax, %edi
callq 0x1180
nopl (%rax,%rax)