// File: lianxings[P]ftp_benchmark/ftp_benchmark.cc
// Function: ftp2local_dispatcher_core(ftpInfo*, ftplib*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
static void ftp2local_dispatcher_core(ftpInfo * pFtp, ftplib * ftpClient, string ftpPath, string localPath) 
{
    ftplib::accesstype type = ftplib::dirverbose;
    ftplib::transfermode mode = ftplib::ascii;
    int ioUnit = 1 << 10;
    char *dataBuf = static_cast<char*>(malloc(ioUnit));
    char printBuf[1024];
    ftphandle *nData = NULL;

    // check if local path is directory
    if (!is_dir(localPath)) {
        fprintf(stderr, "\nlocal path '%s' is not directory.\n", localPath.c_str());
        return;
    }

    // check if ftp directory exists
    if (!ftpClient->Chdir(ftpPath.c_str())) {
        fprintf(stderr, "change to directory %s failed.\n", ftpPath.c_str());
        return;
    }

    // normalize directory path format
    normalize_dir_format(localPath, ftpPath);
    
    std::queue<task<string> > dirQue;
    task<string> taskTmp;
    taskTmp.src = ftpPath;
    taskTmp.dst = localPath;
    dirQue.push(taskTmp);
    
    while (!dirQue.empty()) {
        int queSize = dirQue.size();
        for (int i = 0; i < queSize; i++) {
            taskTmp = dirQue.front();
            dirQue.pop();
            string srcPath = taskTmp.src;
            string dstPath = taskTmp.dst;
            sprintf(printBuf, "\rlist directory %-45s", srcPath.c_str());
            write(1, printBuf, strlen(printBuf));
            // concat and create dst path at local
            string baseName = resolve_base_name(srcPath);
            dstPath += baseName;
            if (dstPath.at(dstPath.size() - 1) != '/') {
                dstPath.push_back('/');
            }
            if (!opendir(dstPath.c_str())) {
                if (mkdir(dstPath.c_str(), 0777) < 0) {
                    fprintf(stderr, "make directory %s failed.\n", localPath.c_str());
                    return;
                }
            }
            ftpClient->mp_ftphandle->offset = 0;
            int ret = build_ftp_data_connection(srcPath, type, mode, ftpClient, pFtp, &nData);
            if (ret < 0) {
                if (ret == -1)
                    sprintf(printBuf, "List directory %s failed: get ftp data connection failed.\n", srcPath.c_str());
                else
                    sprintf(printBuf, "List directory %s failed: re-login ftp server %s failed.\n",\
                                                                 srcPath.c_str(), pFtp->ftpServer);
                fwrite(printBuf, 1, strlen(printBuf), errorFd);
                write(2, printBuf, strlen(printBuf));
                continue;
            }
    
            while (ftpClient->FtpRead(dataBuf, ioUnit, nData) > 0) {
                string name = "";
                string sizeStr = "";
                resolve_list_entry(dataBuf, name, sizeStr);
                if (name.compare(".") == 0 || name.compare("..") == 0)
                    continue;
                size_t dotLoc = name.find_last_of(".");
                if (dotLoc != std::string::npos && name.substr(dotLoc + 1).compare("md5") == 0)
                    continue;
                if (dataBuf[0] == 'd') {  // the entry is directory
                    string nowSrcPath = srcPath + name + "/";
                    string nowDstPath = dstPath;
                    taskTmp.src = nowSrcPath;
                    taskTmp.dst = nowDstPath;
                    dirQue.push(taskTmp);
                } else if (dataBuf[0] == '-') {  // the entry is file
                    int64_t fileSize = atoi(sizeStr.c_str());
                    fileInfo srcInfo, dstInfo;
                    srcInfo.name = srcPath + name;
                    dstInfo.name = dstPath + name;
                    srcInfo.size = dstInfo.size = fileSize;
                    task<fileInfo> curTask;
                    curTask.src = srcInfo;
                    curTask.dst = dstInfo;
                    if (put_task_to_queue(curTask) < 0)
                        break;
                    ++fileNum;
                    totalFileSize += fileSize;
                }
            }
            ftpClient->FtpClose(nData); // close current data connection for reading next directory
        }
    }
    free(dataBuf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x830, %rsp            # imm = 0x830
movq %rdx, -0x780(%rbp)
movq %rcx, -0x778(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x2, -0x24(%rbp)
movl $0x41, -0x28(%rbp)
movl $0x400, -0x2c(%rbp)     # imm = 0x400
movslq -0x2c(%rbp), %rdi
callq 0x4620
movq -0x778(%rbp), %rsi
movq %rax, -0x38(%rbp)
movq $0x0, -0x448(%rbp)
leaq -0x468(%rbp), %rdi
movq %rdi, -0x770(%rbp)
callq 0x41c0
movq -0x770(%rbp), %rdi
callq 0x15a30
movl %eax, -0x764(%rbp)
jmp 0x7c34
movl -0x764(%rbp), %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x781(%rbp)
leaq -0x468(%rbp), %rdi
callq 0x4280
movb -0x781(%rbp), %al
testb $0x1, %al
jne 0x7c60
jmp 0x7cbd
movq -0x778(%rbp), %rdi
movq 0x1e35a(%rip), %rax     # 0x25fc8
movq (%rax), %rax
movq %rax, -0x790(%rbp)
callq 0x41b0
movq -0x790(%rbp), %rdi
movq %rax, %rdx
leaq 0x15113(%rip), %rsi     # 0x1cda1
movb $0x0, %al
callq 0x4680
jmp 0x87f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x470(%rbp)
movl %eax, -0x474(%rbp)
leaq -0x468(%rbp), %rdi
callq 0x4280
jmp 0x8814
movq -0x780(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x798(%rbp)
callq 0x41b0
movq -0x798(%rbp), %rdi
movq %rax, %rsi
callq 0x18d00
cmpl $0x0, %eax
jne 0x7d22
movq -0x780(%rbp), %rdi
movq 0x1e2d2(%rip), %rax     # 0x25fc8
movq (%rax), %rax
movq %rax, -0x7a0(%rbp)
callq 0x41b0
movq -0x7a0(%rbp), %rdi
movq %rax, %rdx
leaq 0x14fe7(%rip), %rsi     # 0x1ccfd
movb $0x0, %al
callq 0x4680
jmp 0x87f3
movq -0x780(%rbp), %rsi
movq -0x778(%rbp), %rdi
callq 0x15d20
leaq -0x4c8(%rbp), %rdi
callq 0xecd0
leaq -0x508(%rbp), %rdi
callq 0xed00
jmp 0x7d4f
movq -0x780(%rbp), %rsi
leaq -0x508(%rbp), %rdi
callq 0x4050
jmp 0x7d64
movq -0x778(%rbp), %rsi
leaq -0x4e8(%rbp), %rdi
callq 0x4050
jmp 0x7d79
leaq -0x4c8(%rbp), %rdi
leaq -0x508(%rbp), %rsi
callq 0xed30
jmp 0x7d8e
jmp 0x7d90
leaq -0x4c8(%rbp), %rdi
callq 0xed60
xorb $-0x1, %al
testb $0x1, %al
jne 0x7da7
jmp 0x87c8
leaq -0x4c8(%rbp), %rdi
callq 0xed80
movl %eax, -0x50c(%rbp)
movl $0x0, -0x510(%rbp)
movl -0x510(%rbp), %eax
cmpl -0x50c(%rbp), %eax
jge 0x87c3
leaq -0x4c8(%rbp), %rdi
callq 0xeda0
movq %rax, %rsi
leaq -0x508(%rbp), %rdi
callq 0xedc0
jmp 0x7df2
leaq -0x4c8(%rbp), %rdi
callq 0xee00
leaq -0x530(%rbp), %rdi
leaq -0x508(%rbp), %rsi
callq 0x41c0
jmp 0x7e13
leaq -0x4e8(%rbp), %rsi
leaq -0x550(%rbp), %rdi
callq 0x41c0
jmp 0x7e28
leaq -0x530(%rbp), %rdi
callq 0x41b0
movq %rax, %rdx
leaq 0x14f87(%rip), %rsi     # 0x1cdc5
xorl %eax, %eax
leaq -0x440(%rbp), %rdi
movq %rdi, -0x7a8(%rbp)
callq 0x40d0
movq -0x7a8(%rbp), %rdi
callq 0x41d0
movq -0x7a8(%rbp), %rsi
movq %rax, %rdx
movl $0x1, %edi
callq 0x4160
jmp 0x7e75
leaq -0x570(%rbp), %rdi
leaq -0x530(%rbp), %rsi
callq 0x15f20
jmp 0x7e8a
leaq -0x550(%rbp), %rdi
leaq -0x570(%rbp), %rsi
callq 0x45f0
jmp 0x7e9f
leaq -0x550(%rbp), %rdi
movq %rdi, -0x7b8(%rbp)
callq 0x42e0
movq -0x7b8(%rbp), %rdi
movq %rax, %rsi
decq %rsi
callq 0x4880
movq %rax, -0x7b0(%rbp)
jmp 0x7ecd
movq -0x7b0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x7f68
leaq -0x550(%rbp), %rdi
movl $0x2f, %esi
callq 0x43c0
jmp 0x7ef3
jmp 0x7f68
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x470(%rbp)
movl %eax, -0x474(%rbp)
jmp 0x8808
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x470(%rbp)
movl %eax, -0x474(%rbp)
jmp 0x87fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x470(%rbp)
movl %eax, -0x474(%rbp)
jmp 0x87b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x470(%rbp)
movl %eax, -0x474(%rbp)
jmp 0x87a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x470(%rbp)
movl %eax, -0x474(%rbp)
jmp 0x879d
leaq -0x550(%rbp), %rdi
callq 0x41b0
movq %rax, %rdi
callq 0x46e0
movq %rax, -0x7c0(%rbp)
jmp 0x7f85
movq -0x7c0(%rbp), %rax
cmpq $0x0, %rax
jne 0x7ff6
leaq -0x550(%rbp), %rdi
callq 0x41b0
movq %rax, %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x41f0
cmpl $0x0, %eax
jge 0x7ff4
movq -0x778(%rbp), %rdi
movq 0x1e00a(%rip), %rax     # 0x25fc8
movq (%rax), %rax
movq %rax, -0x7c8(%rbp)
callq 0x41b0
movq -0x7c8(%rbp), %rdi
movq %rax, %rdx
leaq 0x14d3f(%rip), %rsi     # 0x1cd1d
movb $0x0, %al
callq 0x4680
movl $0x1, -0x574(%rbp)
jmp 0x8744
jmp 0x7ff6
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq $0x0, 0x1b0(%rax)
leaq -0x598(%rbp), %rdi
leaq -0x530(%rbp), %rsi
callq 0x41c0
jmp 0x801d
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %edx
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %r8
leaq -0x598(%rbp), %rdi
leaq -0x448(%rbp), %r9
callq 0x5fd0
movl %eax, -0x7cc(%rbp)
jmp 0x8046
leaq -0x598(%rbp), %rdi
callq 0x4280
movl -0x7cc(%rbp), %eax
movl %eax, -0x578(%rbp)
cmpl $0x0, -0x578(%rbp)
jge 0x816c
cmpl $-0x1, -0x578(%rbp)
jne 0x80cb
leaq -0x440(%rbp), %rax
movq %rax, -0x7d8(%rbp)
leaq -0x530(%rbp), %rdi
callq 0x41b0
movq -0x7d8(%rbp), %rdi
movq %rax, %rdx
leaq 0x14d3c(%rip), %rsi     # 0x1cddb
movb $0x0, %al
callq 0x40d0
jmp 0x8104
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x470(%rbp)
movl %eax, -0x474(%rbp)
leaq -0x598(%rbp), %rdi
callq 0x4280
jmp 0x879d
leaq -0x440(%rbp), %rax
movq %rax, -0x7e0(%rbp)
leaq -0x530(%rbp), %rdi
callq 0x41b0
movq -0x7e0(%rbp), %rdi
movq %rax, %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rcx
leaq 0x14d19(%rip), %rsi     # 0x1ce16
movb $0x0, %al
callq 0x40d0
leaq -0x440(%rbp), %rdi
movq %rdi, -0x7e8(%rbp)
callq 0x41d0
movq -0x7e8(%rbp), %rdi
movq %rax, %rdx
movq 0x1e4b8(%rip), %rcx     # 0x265e0
movl $0x1, %esi
callq 0x4890
jmp 0x8134
leaq -0x440(%rbp), %rdi
movq %rdi, -0x7f0(%rbp)
callq 0x41d0
movq -0x7f0(%rbp), %rsi
movq %rax, %rdx
movl $0x2, %edi
callq 0x4160
jmp 0x815d
movl $0x6, -0x574(%rbp)
jmp 0x8744
jmp 0x816e
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x2c(%rbp), %edx
movq -0x448(%rbp), %rcx
callq 0x18800
movl %eax, -0x7f4(%rbp)
jmp 0x818d
movl -0x7f4(%rbp), %eax
cmpl $0x0, %eax
jle 0x8728
leaq -0x5b9(%rbp), %rdi
movq %rdi, -0x800(%rbp)
callq 0x4820
movq -0x800(%rbp), %rdx
leaq 0x1478f(%rip), %rsi     # 0x1c94c
leaq -0x5b8(%rbp), %rdi
callq 0xd720
jmp 0x81cb
leaq -0x5b9(%rbp), %rdi
callq 0x4510
leaq -0x5e1(%rbp), %rdi
movq %rdi, -0x808(%rbp)
callq 0x4820
movq -0x808(%rbp), %rdx
leaq 0x14754(%rip), %rsi     # 0x1c94c
leaq -0x5e0(%rbp), %rdi
callq 0xd720
jmp 0x8206
leaq -0x5e1(%rbp), %rdi
callq 0x4510
movq -0x38(%rbp), %rdi
leaq -0x5b8(%rbp), %rsi
leaq -0x5e0(%rbp), %rdx
callq 0x15e10
jmp 0x822b
leaq -0x5b8(%rbp), %rdi
leaq 0x14b1d(%rip), %rsi     # 0x1cd56
callq 0x4120
cmpl $0x0, %eax
je 0x825b
leaq -0x5b8(%rbp), %rdi
leaq 0x14b04(%rip), %rsi     # 0x1cd55
callq 0x4120
cmpl $0x0, %eax
jne 0x82c7
movl $0x7, -0x574(%rbp)
jmp 0x86cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x470(%rbp)
movl %eax, -0x474(%rbp)
leaq -0x5b9(%rbp), %rdi
callq 0x4510
jmp 0x879d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x470(%rbp)
movl %eax, -0x474(%rbp)
leaq -0x5e1(%rbp), %rdi
callq 0x4510
jmp 0x871a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x470(%rbp)
movl %eax, -0x474(%rbp)
jmp 0x870e
leaq -0x5b8(%rbp), %rdi
leaq 0x14a81(%rip), %rsi     # 0x1cd56
movq $-0x1, %rdx
callq 0x4440
movq %rax, -0x5f0(%rbp)
movq -0x5f0(%rbp), %rcx
movb $0x0, -0x611(%rbp)
xorl %eax, %eax
cmpq $-0x1, %rcx
movb %al, -0x809(%rbp)
je 0x8350
movq -0x5f0(%rbp), %rdx
incq %rdx
leaq -0x610(%rbp), %rdi
leaq -0x5b8(%rbp), %rsi
movq $-0x1, %rcx
callq 0x44d0
jmp 0x832a
movb $0x1, -0x611(%rbp)
leaq -0x610(%rbp), %rdi
leaq 0x14010(%rip), %rsi     # 0x1c34f
callq 0x4120
cmpl $0x0, %eax
sete %al
movb %al, -0x809(%rbp)
movb -0x809(%rbp), %al
movb %al, -0x80a(%rbp)
testb $0x1, -0x611(%rbp)
jne 0x8367
jmp 0x8373
leaq -0x610(%rbp), %rdi
callq 0x4280
movb -0x80a(%rbp), %al
testb $0x1, %al
jne 0x837f
jmp 0x838e
movl $0x7, -0x574(%rbp)
jmp 0x86cc
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x64, %eax
jne 0x84b9
leaq -0x658(%rbp), %rdi
leaq -0x530(%rbp), %rsi
leaq -0x5b8(%rbp), %rdx
callq 0xd8f0
jmp 0x83ba
leaq 0x14abc(%rip), %rdx     # 0x1ce7d
leaq -0x638(%rbp), %rdi
leaq -0x658(%rbp), %rsi
callq 0xd8a0
jmp 0x83d6
leaq -0x658(%rbp), %rdi
callq 0x4280
leaq -0x678(%rbp), %rdi
leaq -0x550(%rbp), %rsi
callq 0x41c0
jmp 0x83f7
leaq -0x508(%rbp), %rdi
leaq -0x638(%rbp), %rsi
callq 0x4050
jmp 0x840c
leaq -0x4e8(%rbp), %rdi
leaq -0x678(%rbp), %rsi
callq 0x4050
jmp 0x8421
leaq -0x4c8(%rbp), %rdi
leaq -0x508(%rbp), %rsi
callq 0xed30
jmp 0x8436
leaq -0x678(%rbp), %rdi
callq 0x4280
leaq -0x638(%rbp), %rdi
callq 0x4280
jmp 0x86c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x470(%rbp)
movl %eax, -0x474(%rbp)
leaq -0x658(%rbp), %rdi
callq 0x4280
jmp 0x870e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x470(%rbp)
movl %eax, -0x474(%rbp)
jmp 0x84a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x470(%rbp)
movl %eax, -0x474(%rbp)
leaq -0x678(%rbp), %rdi
callq 0x4280
leaq -0x638(%rbp), %rdi
callq 0x4280
jmp 0x870e
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x86c0
leaq -0x5e0(%rbp), %rdi
callq 0x41b0
movq %rax, %rdi
callq 0x4710
cltq
movq %rax, -0x680(%rbp)
leaq -0x6a8(%rbp), %rdi
callq 0xd460
jmp 0x84f4
leaq -0x6d0(%rbp), %rdi
callq 0xd460
jmp 0x8502
leaq -0x6f0(%rbp), %rdi
leaq -0x530(%rbp), %rsi
leaq -0x5b8(%rbp), %rdx
callq 0xd8f0
jmp 0x851e
leaq -0x6a8(%rbp), %rdi
leaq -0x6f0(%rbp), %rsi
movq %rsi, -0x818(%rbp)
callq 0x45c0
movq -0x818(%rbp), %rdi
callq 0x4280
leaq -0x710(%rbp), %rdi
leaq -0x550(%rbp), %rsi
leaq -0x5b8(%rbp), %rdx
callq 0xd8f0
jmp 0x8560
leaq -0x6d0(%rbp), %rdi
leaq -0x710(%rbp), %rsi
movq %rsi, -0x820(%rbp)
callq 0x45c0
movq -0x820(%rbp), %rdi
callq 0x4280
movq -0x680(%rbp), %rax
movq %rax, -0x6b0(%rbp)
movq %rax, -0x688(%rbp)
leaq -0x760(%rbp), %rdi
callq 0xd410
jmp 0x85a9
leaq -0x760(%rbp), %rdi
leaq -0x6a8(%rbp), %rsi
callq 0xd4d0
jmp 0x85be
leaq -0x738(%rbp), %rdi
leaq -0x6d0(%rbp), %rsi
callq 0xd4d0
jmp 0x85d3
leaq -0x760(%rbp), %rdi
callq 0xd0e0
movl %eax, -0x824(%rbp)
jmp 0x85e7
movl -0x824(%rbp), %eax
cmpl $0x0, %eax
jge 0x8649
movl $0x8, -0x574(%rbp)
jmp 0x8674
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x470(%rbp)
movl %eax, -0x474(%rbp)
jmp 0x86b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x470(%rbp)
movl %eax, -0x474(%rbp)
jmp 0x86a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x470(%rbp)
movl %eax, -0x474(%rbp)
leaq -0x760(%rbp), %rdi
callq 0xd660
jmp 0x86a6
leaq 0x1dfa8(%rip), %rdi     # 0x265f8
callq 0xd510
movq -0x680(%rbp), %rax
addq 0x1dfcd(%rip), %rax     # 0x26630
movq %rax, 0x1dfc6(%rip)     # 0x26630
movl $0x0, -0x574(%rbp)
leaq -0x760(%rbp), %rdi
callq 0xd660
leaq -0x6d0(%rbp), %rdi
callq 0xd640
leaq -0x6a8(%rbp), %rdi
callq 0xd640
movl -0x574(%rbp), %eax
testl %eax, %eax
jne 0x86cc
jmp 0x86a4
jmp 0x86c0
leaq -0x6d0(%rbp), %rdi
callq 0xd640
leaq -0x6a8(%rbp), %rdi
callq 0xd640
jmp 0x870e
jmp 0x86c2
movl $0x0, -0x574(%rbp)
leaq -0x5e0(%rbp), %rdi
callq 0x4280
leaq -0x5b8(%rbp), %rdi
callq 0x4280
movl -0x574(%rbp), %eax
movl %eax, -0x828(%rbp)
testl %eax, %eax
je 0x8709
jmp 0x86f6
movl -0x828(%rbp), %eax
subl $0x7, %eax
je 0x816e
jmp 0x8707
jmp 0x8728
jmp 0x816e
leaq -0x5e0(%rbp), %rdi
callq 0x4280
leaq -0x5b8(%rbp), %rdi
callq 0x4280
jmp 0x879d
movq -0x10(%rbp), %rdi
movq -0x448(%rbp), %rsi
callq 0x18690
jmp 0x873a
movl $0x0, -0x574(%rbp)
leaq -0x570(%rbp), %rdi
callq 0x4280
leaq -0x550(%rbp), %rdi
callq 0x4280
leaq -0x530(%rbp), %rdi
callq 0x4280
movl -0x574(%rbp), %eax
movl %eax, -0x82c(%rbp)
testl %eax, %eax
je 0x8787
jmp 0x877a
movl -0x82c(%rbp), %eax
subl $0x6, %eax
je 0x8789
jmp 0x87db
jmp 0x8789
movl -0x510(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x510(%rbp)
jmp 0x7dc3
leaq -0x570(%rbp), %rdi
callq 0x4280
leaq -0x550(%rbp), %rdi
callq 0x4280
leaq -0x530(%rbp), %rdi
callq 0x4280
jmp 0x87fc
jmp 0x7d90
movq -0x38(%rbp), %rdi
callq 0x45a0
movl $0x0, -0x574(%rbp)
leaq -0x508(%rbp), %rdi
callq 0xeee0
leaq -0x4c8(%rbp), %rdi
callq 0xef10
addq $0x830, %rsp            # imm = 0x830
popq %rbp
retq
leaq -0x508(%rbp), %rdi
callq 0xeee0
leaq -0x4c8(%rbp), %rdi
callq 0xef10
movq -0x470(%rbp), %rdi
callq 0x4810