// File: lianxings[P]ftp_benchmark/ftp_benchmark.cc
// Function: ftp2null_worker(ftpInfo*, int, bool)
void ftp2null_worker(ftpInfo * pFtp, int id, bool verify) 
{
    string srcPath, dstPath;
    int ioUnit = 256 << 10;
    char * dataBuf = new char[ioUnit];
    char printBuf[1024];
    char sizeStrBuf[128];
    ftplib::accesstype type = ftplib::fileread;
    ftplib::transfermode mode = ftplib::image;
    ftphandle *nData = NULL;

    ftplib * ftpClient = new ftplib();
    int ret = connect_and_login_ftp (ftpClient, pFtp, 0);
    if (ret < 0) {
        if (ret == -2)
            fprintf(stderr, "login ftp server %s failed.\n", pFtp->ftpServer);
        --liveWorkThread;
        return;
    }

    while((!tasksQueue.empty()) || (!exitFlag)) {
        task<fileInfo> taskTmp;
        if (get_task_from_queue(taskTmp) < 0) 
            continue;

        fileInfo srcInfo, dstInfo;
        srcInfo = taskTmp.src;
        dstInfo = taskTmp.dst;
        srcPath = srcInfo.name;
        dstPath = dstInfo.name;
        memset(printBuf, 0, sizeof(printBuf));
        memset(printBuf, 0, sizeof(sizeStrBuf));
        size_to_string(srcInfo.size, sizeStrBuf);
        // get ftp data connection 
        int ret = build_ftp_data_connection(srcPath, type, mode, ftpClient, pFtp, &nData);
        if (ret < 0) {
            ++failed;
            errorSize += srcInfo.size;
            if (ret == -1)
                sprintf(printBuf, "\nget ftp data connection failed: source: %s, destination: null, size: %s\n",\
                                                                                   srcPath.c_str(), sizeStrBuf);
            else
                sprintf(printBuf, "\nre-login ftp server %s failed: source: %s, destination: null, size: %s\n",\
                                                                pFtp->ftpServer , srcPath.c_str(), sizeStrBuf);
            fwrite(printBuf, 1, strlen(printBuf), errorFd);
            write(2, printBuf, strlen(printBuf));
            continue;
        }

		char checkSumBuf[33] = {'\0'};
		char tmp[3] = {'\0'};
        Md5Context md5Context;
        MD5_HASH md5;
        if (verify){
            memset(checkSumBuf, 0, sizeof(checkSumBuf));
            memset(tmp, 0, sizeof(tmp));
            Md5Initialise( &md5Context );
        }

        int readed = 0;
        long long file_size = 0;
        while ((readed = ftpClient->FtpRead(dataBuf, ioUnit, nData)) > 0) {
            finishSize += readed;
            file_size += readed;
            if (verify) {
                Md5Update( &md5Context, (const void*)dataBuf, readed);
            }
        }
        if (readed < 0) {
            ++failed;
            errorSize += srcInfo.size;
            sprintf(printBuf, "\nread source file failed: source: %s, destination: null, size: %s\n",\
                srcPath.c_str(), sizeStrBuf);
            fwrite(printBuf, 1, strlen(printBuf), errorFd);
            write(1, printBuf, strlen(printBuf));
        } else {
            ++finished;
            if (verify) {
                Md5Finalise( &md5Context, &md5);
                for(int j = 0; j < sizeof(md5); j++) {
                    sprintf( tmp,"%2.2x", md5.bytes[j]);
                    strcat(checkSumBuf, tmp);
                }
            }
        }

        ftpClient->FtpClose(nData);

        if(gFtpDebug)
            printf("Thread:%-8ld  sock:%-4d  read file size: %lld\n", syscall(SYS_gettid), nData->handle, file_size);

        if (readed >= 0 && verify) {
            string newSrcPath = srcPath + ".md5";
            int ret = build_ftp_data_connection(newSrcPath, type, mode, ftpClient, pFtp, &nData);
            if (ret < 0) {
                if (ret == -1)
                    sprintf(printBuf, "\nget ftp data connection failed: source: %s, destination: null\n", newSrcPath.c_str());
                else
                    sprintf(printBuf, "\nre-login ftp server %s failed: source: %s, destination: null\n",\
                                                                   pFtp->ftpServer , newSrcPath.c_str());
                fwrite(printBuf, 1, strlen(printBuf), errorFd);
                write(2, printBuf, strlen(printBuf));
                continue;
            }

            memset(dataBuf, 0, ioUnit);
            if (ftpClient->FtpRead(dataBuf, ioUnit, nData) <= 0) {
                ++verifyFailed;
                sprintf(printBuf, "\nread md5 file %s failed\n", newSrcPath.c_str());
                fwrite(printBuf, 1, strlen(printBuf), errorFd);
                //write(1, printBuf, strlen(printBuf));
            } else if (strncmp(checkSumBuf, dataBuf, 32) != 0) {
                ++verifyFailed;
				sprintf(printBuf, "\nverify file '%s' failed: upload md5: %s, download md5: %s\n", \
                                                           srcPath.c_str(), dataBuf, checkSumBuf);
                fwrite(printBuf, 1, strlen(printBuf), errorFd);
                write(1, printBuf, strlen(printBuf));
			}
            ftpClient->FtpClose(nData);
        }

        if (failed > 10) {
            --liveWorkThread;
            break;
        }
    }

    ftpClient->Quit();
    delete ftpClient;
    delete [] dataBuf;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x7f0, %rsp            # imm = 0x7F0
movb %dl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
andb $0x1, %al
movb %al, -0xd(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x4650
leaq -0x50(%rbp), %rdi
callq 0x4650
movl $0x40000, -0x54(%rbp)   # imm = 0x40000
movslq -0x54(%rbp), %rdi
callq 0x4030
movq %rax, -0x710(%rbp)
jmp 0x8864
movq -0x710(%rbp), %rax
movq %rax, -0x60(%rbp)
movl $0x3, -0x4f4(%rbp)
movl $0x49, -0x4f8(%rbp)
movq $0x0, -0x500(%rbp)
movl $0x8, %edi
callq 0x44b0
movq %rax, -0x718(%rbp)
jmp 0x88a1
movq -0x718(%rbp), %rdi
callq 0x16370
jmp 0x88af
movq -0x718(%rbp), %rax
movq %rax, -0x508(%rbp)
movq -0x508(%rbp), %rdi
movq -0x8(%rbp), %rsi
xorl %edx, %edx
callq 0x5dd0
movl %eax, -0x71c(%rbp)
jmp 0x88d7
movl -0x71c(%rbp), %eax
movl %eax, -0x50c(%rbp)
cmpl $0x0, -0x50c(%rbp)
jge 0x8964
cmpl $-0x2, -0x50c(%rbp)
jne 0x8949
movq 0x1d6cc(%rip), %rax     # 0x25fc8
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rdx
leaq 0x14526(%rip), %rsi     # 0x1ce33
movb $0x0, %al
callq 0x4680
jmp 0x8949
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x93a3
movq -0x718(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
movl $0x8, %esi
callq 0x44c0
jmp 0x93a3
leaq 0x1dca0(%rip), %rdi     # 0x265f0
callq 0xd3c0
movl $0x1, -0x510(%rbp)
jmp 0x9388
jmp 0x8966
leaq 0x1db8b(%rip), %rdi     # 0x264f8
callq 0xd3f0
movb %al, -0x71d(%rbp)
jmp 0x897a
movb -0x71d(%rbp), %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x71e(%rbp)
jne 0x898f
jmp 0x89a9
leaq 0x1dc52(%rip), %rdi     # 0x265e8
callq 0xd230
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x71e(%rbp)
movb -0x71e(%rbp), %al
testb $0x1, %al
jne 0x89b8
jmp 0x9322
leaq -0x560(%rbp), %rdi
callq 0xd410
jmp 0x89c6
leaq -0x560(%rbp), %rdi
callq 0x5eb0
movl %eax, -0x724(%rbp)
jmp 0x89da
movl -0x724(%rbp), %eax
cmpl $0x0, %eax
jge 0x8a05
movl $0x2, -0x510(%rbp)
jmp 0x92c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x9311
leaq -0x588(%rbp), %rdi
callq 0xd460
jmp 0x8a13
leaq -0x5b0(%rbp), %rdi
callq 0xd460
jmp 0x8a21
leaq -0x588(%rbp), %rdi
leaq -0x560(%rbp), %rsi
callq 0xd4d0
jmp 0x8a36
leaq -0x538(%rbp), %rsi
leaq -0x5b0(%rbp), %rdi
callq 0xd4d0
jmp 0x8a4b
leaq -0x30(%rbp), %rdi
leaq -0x588(%rbp), %rsi
callq 0x4050
jmp 0x8a5d
leaq -0x50(%rbp), %rdi
leaq -0x5b0(%rbp), %rsi
callq 0x4050
jmp 0x8a6f
leaq -0x470(%rbp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x4250
xorps %xmm0, %xmm0
movaps %xmm0, -0x740(%rbp)
movaps %xmm0, -0x400(%rbp)
movaps %xmm0, -0x410(%rbp)
movaps %xmm0, -0x420(%rbp)
movaps %xmm0, -0x430(%rbp)
movaps %xmm0, -0x440(%rbp)
movaps %xmm0, -0x450(%rbp)
movaps %xmm0, -0x460(%rbp)
movaps %xmm0, -0x470(%rbp)
movq -0x568(%rbp), %rdi
leaq -0x4f0(%rbp), %rsi
callq 0x15a90
jmp 0x8ad9
leaq -0x5d8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x41c0
jmp 0x8aeb
movl -0x4f4(%rbp), %esi
movl -0x4f8(%rbp), %edx
movq -0x508(%rbp), %rcx
movq -0x8(%rbp), %r8
leaq -0x5d8(%rbp), %rdi
leaq -0x500(%rbp), %r9
callq 0x5fd0
movl %eax, -0x744(%rbp)
jmp 0x8b1d
leaq -0x5d8(%rbp), %rdi
callq 0x4280
movl -0x744(%rbp), %eax
movl %eax, -0x5b4(%rbp)
cmpl $0x0, -0x5b4(%rbp)
jge 0x8c97
leaq 0x1dabf(%rip), %rdi     # 0x26608
callq 0xd510
movq -0x568(%rbp), %rsi
leaq 0x1dacc(%rip), %rdi     # 0x26628
callq 0xd540
cmpl $-0x1, -0x5b4(%rbp)
jne 0x8be4
leaq -0x470(%rbp), %rax
movq %rax, -0x750(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x41b0
movq -0x750(%rbp), %rdi
movq %rax, %rdx
leaq -0x4f0(%rbp), %rcx
leaq 0x1398a(%rip), %rsi     # 0x1c523
movb $0x0, %al
callq 0x40d0
jmp 0x8c2f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x9305
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x92f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x5d8(%rbp), %rdi
callq 0x4280
jmp 0x92f9
leaq -0x470(%rbp), %rax
movq %rax, -0x760(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x758(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x41b0
movq -0x760(%rbp), %rdi
movq -0x758(%rbp), %rdx
movq %rax, %rcx
leaq -0x4f0(%rbp), %r8
leaq 0x13945(%rip), %rsi     # 0x1c56d
movb $0x0, %al
callq 0x40d0
leaq -0x470(%rbp), %rdi
movq %rdi, -0x768(%rbp)
callq 0x41d0
movq -0x768(%rbp), %rdi
movq %rax, %rdx
movq 0x1d98d(%rip), %rcx     # 0x265e0
movl $0x1, %esi
callq 0x4890
jmp 0x8c5f
leaq -0x470(%rbp), %rdi
movq %rdi, -0x770(%rbp)
callq 0x41d0
movq -0x770(%rbp), %rsi
movq %rax, %rdx
movl $0x2, %edi
callq 0x4160
jmp 0x8c88
movl $0x2, -0x510(%rbp)
jmp 0x92ab
leaq -0x600(%rbp), %rdi
xorl %esi, %esi
movl $0x21, %edx
callq 0x4250
leaq -0x604(%rbp), %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x4250
testb $0x1, -0xd(%rbp)
je 0x8cfb
xorps %xmm0, %xmm0
movaps %xmm0, -0x5f0(%rbp)
movaps %xmm0, -0x600(%rbp)
movb $0x0, -0x5e0(%rbp)
movb $0x0, -0x602(%rbp)
movw $0x0, -0x604(%rbp)
leaq -0x69c(%rbp), %rdi
callq 0x1a1d0
jmp 0x8cf9
jmp 0x8cfb
movl $0x0, -0x6b0(%rbp)
movq $0x0, -0x6b8(%rbp)
movq -0x508(%rbp), %rdi
movq -0x60(%rbp), %rsi
movl -0x54(%rbp), %edx
movq -0x500(%rbp), %rcx
callq 0x18800
movl %eax, -0x774(%rbp)
jmp 0x8d32
movl -0x774(%rbp), %eax
movl %eax, -0x6b0(%rbp)
cmpl $0x0, %eax
jle 0x8d8d
movslq -0x6b0(%rbp), %rsi
leaq 0x1d8cf(%rip), %rdi     # 0x26620
callq 0xd580
movslq -0x6b0(%rbp), %rax
addq -0x6b8(%rbp), %rax
movq %rax, -0x6b8(%rbp)
testb $0x1, -0xd(%rbp)
je 0x8d8b
movq -0x60(%rbp), %rsi
movl -0x6b0(%rbp), %edx
leaq -0x69c(%rbp), %rdi
callq 0x1a220
jmp 0x8d89
jmp 0x8d8b
jmp 0x8d10
cmpl $0x0, -0x6b0(%rbp)
jge 0x8e3f
leaq 0x1d867(%rip), %rdi     # 0x26608
callq 0xd510
movq -0x568(%rbp), %rsi
leaq 0x1d874(%rip), %rdi     # 0x26628
callq 0xd540
leaq -0x30(%rbp), %rdi
callq 0x41b0
movq %rax, %rdx
leaq 0x137ea(%rip), %rsi     # 0x1c5b6
xorl %eax, %eax
leaq -0x470(%rbp), %rdi
movq %rdi, -0x780(%rbp)
leaq -0x4f0(%rbp), %rcx
callq 0x40d0
movq -0x780(%rbp), %rdi
callq 0x41d0
movq -0x780(%rbp), %rdi
movq %rax, %rdx
movq 0x1d7db(%rip), %rcx     # 0x265e0
movl $0x1, %esi
callq 0x4890
jmp 0x8e11
leaq -0x470(%rbp), %rdi
movq %rdi, -0x788(%rbp)
callq 0x41d0
movq -0x788(%rbp), %rsi
movq %rax, %rdx
movl $0x1, %edi
callq 0x4160
jmp 0x8e3a
jmp 0x8ec9
leaq 0x1d7ba(%rip), %rdi     # 0x26600
callq 0xd510
testb $0x1, -0xd(%rbp)
je 0x8ec7
leaq -0x69c(%rbp), %rdi
leaq -0x6ac(%rbp), %rsi
callq 0x1b700
jmp 0x8e66
movl $0x0, -0x6bc(%rbp)
movslq -0x6bc(%rbp), %rax
cmpq $0x10, %rax
jae 0x8ec5
leaq -0x604(%rbp), %rdi
movslq -0x6bc(%rbp), %rax
movzbl -0x6ac(%rbp,%rax), %edx
leaq 0x134ae(%rip), %rsi     # 0x1c348
movb $0x0, %al
callq 0x40d0
leaq -0x600(%rbp), %rdi
leaq -0x604(%rbp), %rsi
callq 0x4830
movl -0x6bc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6bc(%rbp)
jmp 0x8e70
jmp 0x8ec7
jmp 0x8ec9
movq -0x508(%rbp), %rdi
movq -0x500(%rbp), %rsi
callq 0x18690
jmp 0x8ede
testb $0x1, 0x1d6eb(%rip)     # 0x265d0
je 0x8f23
xorl %eax, %eax
movb %al, -0x789(%rbp)
movl $0xba, %edi
callq 0x4090
movq %rax, %rsi
movb -0x789(%rbp), %al
movq -0x500(%rbp), %rcx
movl 0x10(%rcx), %edx
movq -0x6b8(%rbp), %rcx
leaq 0x136df(%rip), %rdi     # 0x1c5f9
callq 0x4070
jmp 0x8f21
jmp 0x8f23
cmpl $0x0, -0x6b0(%rbp)
jl 0x9277
testb $0x1, -0xd(%rbp)
je 0x9277
leaq 0x1340d(%rip), %rdx     # 0x1c34e
leaq -0x6e0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xd5c0
jmp 0x8f53
leaq -0x708(%rbp), %rdi
leaq -0x6e0(%rbp), %rsi
callq 0x41c0
jmp 0x8f68
movl -0x4f4(%rbp), %esi
movl -0x4f8(%rbp), %edx
movq -0x508(%rbp), %rcx
movq -0x8(%rbp), %r8
leaq -0x708(%rbp), %rdi
leaq -0x500(%rbp), %r9
callq 0x5fd0
movl %eax, -0x790(%rbp)
jmp 0x8f9a
leaq -0x708(%rbp), %rdi
callq 0x4280
movl -0x790(%rbp), %eax
movl %eax, -0x6e4(%rbp)
cmpl $0x0, -0x6e4(%rbp)
jge 0x90d9
cmpl $-0x1, -0x6e4(%rbp)
jne 0x902a
leaq -0x470(%rbp), %rax
movq %rax, -0x798(%rbp)
leaq -0x6e0(%rbp), %rdi
callq 0x41b0
movq -0x798(%rbp), %rdi
movq %rax, %rdx
leaq 0x13635(%rip), %rsi     # 0x1c628
movb $0x0, %al
callq 0x40d0
jmp 0x9071
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x9266
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x708(%rbp), %rdi
callq 0x4280
jmp 0x9266
leaq -0x470(%rbp), %rax
movq %rax, -0x7a8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x7a0(%rbp)
leaq -0x6e0(%rbp), %rdi
callq 0x41b0
movq -0x7a8(%rbp), %rdi
movq -0x7a0(%rbp), %rdx
movq %rax, %rcx
leaq 0x135fe(%rip), %rsi     # 0x1c668
movb $0x0, %al
callq 0x40d0
leaq -0x470(%rbp), %rdi
movq %rdi, -0x7b0(%rbp)
callq 0x41d0
movq -0x7b0(%rbp), %rdi
movq %rax, %rdx
movq 0x1d54b(%rip), %rcx     # 0x265e0
movl $0x1, %esi
callq 0x4890
jmp 0x90a1
leaq -0x470(%rbp), %rdi
movq %rdi, -0x7b8(%rbp)
callq 0x41d0
movq -0x7b8(%rbp), %rsi
movq %rax, %rdx
movl $0x2, %edi
callq 0x4160
jmp 0x90ca
movl $0x2, -0x510(%rbp)
jmp 0x924c
movq -0x60(%rbp), %rdi
movslq -0x54(%rbp), %rdx
xorl %esi, %esi
callq 0x4250
movq -0x508(%rbp), %rdi
movq -0x60(%rbp), %rsi
movl -0x54(%rbp), %edx
movq -0x500(%rbp), %rcx
callq 0x18800
movl %eax, -0x7bc(%rbp)
jmp 0x910a
movl -0x7bc(%rbp), %eax
cmpl $0x0, %eax
jg 0x917a
leaq 0x1d4fc(%rip), %rdi     # 0x26618
callq 0xd510
leaq -0x6e0(%rbp), %rdi
callq 0x41b0
movq %rax, %rdx
leaq 0x13396(%rip), %rsi     # 0x1c4cd
xorl %eax, %eax
leaq -0x470(%rbp), %rdi
movq %rdi, -0x7c8(%rbp)
callq 0x40d0
movq -0x7c8(%rbp), %rdi
callq 0x41d0
movq -0x7c8(%rbp), %rdi
movq %rax, %rdx
movq 0x1d477(%rip), %rcx     # 0x265e0
movl $0x1, %esi
callq 0x4890
jmp 0x9175
jmp 0x922d
leaq -0x600(%rbp), %rdi
movq -0x60(%rbp), %rsi
movl $0x20, %edx
callq 0x4200
cmpl $0x0, %eax
je 0x922b
leaq 0x1d479(%rip), %rdi     # 0x26618
callq 0xd510
leaq -0x30(%rbp), %rdi
callq 0x41b0
movq %rax, %rdx
movq -0x60(%rbp), %rcx
leaq 0x1332c(%rip), %rsi     # 0x1c4e7
xorl %eax, %eax
leaq -0x470(%rbp), %rdi
movq %rdi, -0x7d0(%rbp)
leaq -0x600(%rbp), %r8
callq 0x40d0
movq -0x7d0(%rbp), %rdi
callq 0x41d0
movq -0x7d0(%rbp), %rdi
movq %rax, %rdx
movq 0x1d3ec(%rip), %rcx     # 0x265e0
movl $0x1, %esi
callq 0x4890
jmp 0x9200
leaq -0x470(%rbp), %rdi
movq %rdi, -0x7d8(%rbp)
callq 0x41d0
movq -0x7d8(%rbp), %rsi
movq %rax, %rdx
movl $0x1, %edi
callq 0x4160
jmp 0x9229
jmp 0x922b
jmp 0x922d
movq -0x508(%rbp), %rdi
movq -0x500(%rbp), %rsi
callq 0x18690
jmp 0x9242
movl $0x0, -0x510(%rbp)
leaq -0x6e0(%rbp), %rdi
callq 0x4280
movl -0x510(%rbp), %eax
testl %eax, %eax
jne 0x92ab
jmp 0x9264
jmp 0x9277
leaq -0x6e0(%rbp), %rdi
callq 0x4280
jmp 0x92f9
leaq 0x1d38a(%rip), %rdi     # 0x26608
callq 0xd2c0
cmpq $0xa, %rax
jle 0x92a1
leaq 0x1d360(%rip), %rdi     # 0x265f0
callq 0xd3c0
movl $0x3, -0x510(%rbp)
jmp 0x92ab
movl $0x0, -0x510(%rbp)
leaq -0x5b0(%rbp), %rdi
callq 0xd640
leaq -0x588(%rbp), %rdi
callq 0xd640
leaq -0x560(%rbp), %rdi
callq 0xd660
movl -0x510(%rbp), %eax
movl %eax, -0x7dc(%rbp)
testl %eax, %eax
je 0x92f4
jmp 0x92e1
movl -0x7dc(%rbp), %eax
subl $0x2, %eax
je 0x8966
jmp 0x92f2
jmp 0x9322
jmp 0x8966
leaq -0x5b0(%rbp), %rdi
callq 0xd640
leaq -0x588(%rbp), %rdi
callq 0xd640
leaq -0x560(%rbp), %rdi
callq 0xd660
jmp 0x93a3
movq -0x508(%rbp), %rdi
callq 0x197d0
jmp 0x9330
movq -0x508(%rbp), %rax
movq %rax, -0x7e8(%rbp)
cmpq $0x0, %rax
je 0x9361
movq -0x7e8(%rbp), %rdi
callq 0x164c0
movq -0x7e8(%rbp), %rdi
movl $0x8, %esi
callq 0x44c0
movq -0x60(%rbp), %rax
movq %rax, -0x7f0(%rbp)
cmpq $0x0, %rax
je 0x937e
movq -0x7f0(%rbp), %rdi
callq 0x4600
movl $0x0, -0x510(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x4280
leaq -0x30(%rbp), %rdi
callq 0x4280
addq $0x7f0, %rsp            # imm = 0x7F0
popq %rbp
retq
leaq -0x50(%rbp), %rdi
callq 0x4280
leaq -0x30(%rbp), %rdi
callq 0x4280
movq -0x68(%rbp), %rdi
callq 0x4810
nop