// File: /workspace/github_cpp_makefile_star2_O2/lianxings[P]ftp_benchmark/ftp_benchmark.cc
// Function: ftp2local_dispatcher(ftpInfo*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void ftp2local_dispatcher(ftpInfo * pFtp, string ftpPath, string localPath) 
{
    // normalize directory path format
    normalize_dir_format(localPath, ftpPath);

    // connect to ftp server and login
    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);
        goto error_out;
    }

    ftp2local_dispatcher_core(pFtp, ftpClient, ftpPath, localPath);

error_out:
    exitFlag = 1;
    tasksExecuteCV.notify_all();
    ftpClient->Quit();
    delete ftpClient;
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x688, %rsp            # imm = 0x688
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rdi
callq 0xbe13
pushq $0x8
popq %rdi
callq 0x43e0
movq %rax, %rbp
movq %rax, %rdi
callq 0xc110
movq %rbp, %rdi
movq %r15, %rsi
callq 0x54b6
testl %eax, %eax
js 0x6d27
leaq 0xb8(%rsp), %rdi
movq %r14, %rsi
callq 0x4510
leaq 0x70(%rsp), %rdi
movq %rbx, %rsi
callq 0x4510
movl $0x400, %edi            # imm = 0x400
callq 0x44f0
movq %rax, %r12
andq $0x0, 0x8(%rsp)
leaq 0x1b0(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x4510
leaq 0x1b0(%rsp), %rdi
callq 0xbc80
movl %eax, %ebx
leaq 0x1b0(%rsp), %rdi
callq 0x4170
testl %ebx, %ebx
je 0x6dc4
movq 0xb8(%rsp), %rsi
movq %rbp, %rdi
callq 0xdace
testl %eax, %eax
je 0x6ddc
leaq 0x70(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0xbe13
leaq 0x160(%rsp), %rdi
callq 0xa44a
movq %r15, 0x18(%rsp)
leaq 0xe8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x108(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq 0xd8(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x4200
leaq 0xf8(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x4200
leaq 0x160(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0xa6b2
leaq 0xd8(%rsp), %r14
leaq 0x280(%rsp), %rbx
leaq 0x260(%rsp), %r13
movq %r12, 0x60(%rsp)
movq 0x190(%rsp), %rax
cmpq 0x170(%rsp), %rax
je 0x6d49
leaq 0x160(%rsp), %rdi
callq 0xa7ca
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
movq %rax, 0x68(%rsp)
cmpl 0x68(%rsp), %ecx
je 0x6d11
movl %ecx, 0x14(%rsp)
movq 0x170(%rsp), %rsi
movq %r14, %rdi
callq 0xa466
leaq 0x160(%rsp), %rdi
callq 0xa962
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x4510
leaq 0x20(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x4510
movq 0x40(%rsp), %rdx
movq %rbx, %rdi
leaq 0xa515(%rip), %rsi      # 0x10d6b
xorl %eax, %eax
callq 0x4090
movq %rbx, %rdi
callq 0x4160
pushq $0x1
popq %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4120
leaq 0x240(%rsp), %rbx
movq %rbx, %rdi
leaq 0x40(%rsp), %rsi
callq 0xbf5d
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x4730
movq 0x28(%rsp), %rsi
decq %rsi
leaq 0x20(%rsp), %rdi
callq 0x4710
cmpb $0x2f, (%rax)
je 0x68b9
leaq 0x20(%rsp), %rdi
pushq $0x2f
popq %rsi
callq 0x4310
movq 0x20(%rsp), %rdi
callq 0x4580
testq %rax, %rax
jne 0x68df
movq 0x20(%rsp), %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x4190
testl %eax, %eax
js 0x6cef
movq (%rbp), %rax
andq $0x0, 0x1b0(%rax)
leaq 0x220(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x4510
leaq 0x220(%rsp), %r14
movq %r14, %rdi
pushq $0x2
popq %rsi
pushq $0x41
popq %rdx
movq %rbp, %rcx
movq 0x18(%rsp), %r8
leaq 0x8(%rsp), %r9
callq 0x55ec
movl %eax, %ebx
movq %r14, %rdi
callq 0x4170
testl %ebx, %ebx
leaq 0x1d0(%rsp), %r14
js 0x6c2e
movq 0x8(%rsp), %rcx
movq %rbp, %rdi
movq %r12, %rsi
movl $0x400, %edx            # imm = 0x400
callq 0xd81e
testl %eax, %eax
jle 0x6c12
movq %r13, %rdi
leaq 0x9f91(%rip), %rbx      # 0x108f2
movq %rbx, %rsi
movq %r14, %rdx
callq 0x9dca
leaq 0x140(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x9dca
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0xbea8
movq %r13, %rdi
leaq 0xa362(%rip), %rsi      # 0x10cfc
callq 0x40e0
pushq $0x7
popq %r14
testl %eax, %eax
je 0x6beb
movq %r13, %rdi
leaq 0xa346(%rip), %rsi      # 0x10cfb
callq 0x40e0
pushq $0x7
popq %r14
testl %eax, %eax
je 0x6beb
movq %r13, %rdi
leaq 0xa32c(%rip), %rsi      # 0x10cfc
pushq $-0x1
popq %rdx
callq 0x4380
cmpq $-0x1, %rax
je 0x6a1f
incq %rax
leaq 0x1d0(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
pushq $-0x1
popq %rcx
callq 0x4400
movq %r14, %rdi
leaq 0x98f3(%rip), %rsi      # 0x102f7
callq 0x40e0
movl %eax, %ebx
movq %r14, %rdi
callq 0x4170
pushq $0x7
popq %r14
testl %ebx, %ebx
je 0x6beb
movzbl (%r12), %eax
cmpl $0x2d, %eax
je 0x6acf
cmpl $0x64, %eax
jne 0x6be8
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
leaq 0x40(%rsp), %rsi
movq %r13, %rdx
callq 0x9e8b
leaq 0x1d0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
leaq 0xa3c0(%rip), %rdx      # 0x10e23
callq 0x9e6c
movq %rbx, %rdi
callq 0x4170
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
callq 0x4510
leaq 0xd8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4200
leaq 0xf8(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x4200
leaq 0x160(%rsp), %rdi
movq %rbx, %rsi
callq 0xa6b2
leaq 0x90(%rsp), %rdi
callq 0x4170
movq %r14, %rdi
callq 0x4170
jmp 0x6be8
movq 0x140(%rsp), %rdi
callq 0x45c0
movl %eax, %ebx
leaq 0x90(%rsp), %rdi
callq 0x9d36
leaq 0x118(%rsp), %rdi
callq 0x9d36
leaq 0x1d0(%rsp), %r14
movq %r14, %rdi
leaq 0x40(%rsp), %rsi
movq %r13, %rdx
callq 0x9e8b
leaq 0x90(%rsp), %rdi
movq %r14, %rsi
callq 0x44a0
movq %r14, %rdi
callq 0x4170
movq %r14, %rdi
leaq 0x20(%rsp), %rsi
movq %r13, %rdx
callq 0x9e8b
movq %rbp, %r15
movslq %ebx, %rbp
leaq 0x118(%rsp), %rdi
movq %r14, %rsi
callq 0x44a0
movq %r14, %rdi
callq 0x4170
movq %rbp, 0x138(%rsp)
movq %rbp, 0xb0(%rsp)
movq %r14, %rdi
callq 0x9d06
movq %r14, %rdi
leaq 0x90(%rsp), %r12
movq %r12, %rsi
callq 0x9d5a
leaq 0x1f8(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x9d5a
movq %r14, %rdi
callq 0x9c33
movl %eax, %ebx
pushq $0x8
popq %r14
testl %eax, %eax
js 0x6bba
lock
incq 0x10938(%rip)           # 0x174e8
addq %rbp, 0x10969(%rip)     # 0x17520
xorl %r14d, %r14d
leaq 0x1d0(%rsp), %rdi
callq 0x9db4
leaq 0x118(%rsp), %rdi
callq 0x4170
movq %r12, %rdi
callq 0x4170
testl %ebx, %ebx
movq %r15, %rbp
movq 0x60(%rsp), %r12
js 0x6beb
xorl %r14d, %r14d
leaq 0x140(%rsp), %rdi
callq 0x4170
movq %r13, %rdi
callq 0x4170
cmpl $0x8, %r14d
leaq 0x1d0(%rsp), %r14
jne 0x693a
xorl %ebx, %ebx
movq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0xd740
leaq 0xd8(%rsp), %r14
jmp 0x6cb2
movq 0x40(%rsp), %rdx
cmpl $-0x1, %ebx
je 0x6c5b
movq 0x18(%rsp), %rax
movq (%rax), %rcx
leaq 0x280(%rsp), %rbx
movq %rbx, %rdi
leaq 0xa16a(%rip), %rsi      # 0x10dbc
xorl %eax, %eax
callq 0x4090
jmp 0x6c74
leaq 0x280(%rsp), %rbx
movq %rbx, %rdi
leaq 0xa114(%rip), %rsi      # 0x10d81
xorl %eax, %eax
callq 0x4090
leaq 0xd8(%rsp), %r14
movq %rbx, %rdi
callq 0x4160
movq 0x10845(%rip), %rcx     # 0x174d0
movq %rbx, %rdi
pushq $0x1
popq %rsi
movq %rax, %rdx
callq 0x4720
movq %rbx, %rdi
callq 0x4160
pushq $0x2
popq %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4120
pushq $0x6
popq %rbx
leaq 0x240(%rsp), %rdi
callq 0x4170
leaq 0x20(%rsp), %rdi
callq 0x4170
leaq 0x40(%rsp), %rdi
callq 0x4170
cmpl $0x6, %ebx
je 0x6cdc
testl %ebx, %ebx
jne 0x6d14
movl 0x14(%rsp), %ecx
incl %ecx
leaq 0x280(%rsp), %rbx
jmp 0x67fd
movq 0x102d2(%rip), %rax     # 0x16fc8
movq (%rax), %rdi
movq 0x70(%rsp), %rdx
leaq 0x9fbe(%rip), %rsi      # 0x10cc3
xorl %eax, %eax
callq 0x4530
pushq $0x1
popq %rbx
jmp 0x6cb2
pushq $0x4
popq %rbx
testb $0x3, %bl
leaq 0x280(%rsp), %rbx
je 0x67ce
jmp 0x6d51
cmpl $-0x2, %eax
jne 0x6d82
movq 0x10295(%rip), %rax     # 0x16fc8
movq (%rax), %rdi
movq (%r15), %rdx
leaq 0xa099(%rip), %rsi      # 0x10dd9
xorl %eax, %eax
callq 0x4530
jmp 0x6d82
movq %r12, %rdi
callq 0x4480
leaq 0xd8(%rsp), %rdi
callq 0xa490
leaq 0x160(%rsp), %rdi
callq 0xad28
leaq 0x70(%rsp), %rdi
callq 0x4170
leaq 0xb8(%rsp), %rdi
callq 0x4170
pushq $0x1
popq %rax
xchgl %eax, 0x1074d(%rip)     # 0x174d8
leaq 0x106fe(%rip), %rdi     # 0x17490
callq 0x4660
movq %rbp, %rdi
callq 0xe196
movq %rbp, %rdi
callq 0xc1c4
pushq $0x8
popq %rsi
movq %rbp, %rdi
callq 0x43f0
addq $0x688, %rsp            # imm = 0x688
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x101fd(%rip), %rax     # 0x16fc8
movq (%rax), %rdi
movq 0x70(%rsp), %rdx
leaq 0x9f6d(%rip), %rsi      # 0x10d47
jmp 0x6df5
movq 0x101e5(%rip), %rax     # 0x16fc8
movq (%rax), %rdi
movq 0xb8(%rsp), %rdx
leaq 0x9eae(%rip), %rsi      # 0x10ca3
xorl %eax, %eax
callq 0x4530
jmp 0x6d6b
movq %rax, %r14
leaq 0x1b0(%rsp), %rdi
callq 0x4170
jmp 0x6f36
movq %rax, %r14
jmp 0x6f40
movq %rax, %r14
pushq $0x8
popq %rsi
movq %rbp, %rdi
callq 0x43f0
jmp 0x6f4d
jmp 0x6e7e
movq %rax, %r14
jmp 0x6f36
jmp 0x6ed9
jmp 0x6e55
jmp 0x6e50
jmp 0x6e55
jmp 0x6ed9
movq %rax, %r14
jmp 0x6ec3
movq %rax, %r14
jmp 0x6ea9
movq %rax, %r14
jmp 0x6e9c
movq %rax, %r14
leaq 0x220(%rsp), %rdi
jmp 0x6ef1
jmp 0x6e7e
movq %rax, %r14
jmp 0x6f12
jmp 0x6e76
movq %rax, %r14
jmp 0x6f08
movq %rax, %r14
jmp 0x6f1c
jmp 0x6ef8
jmp 0x6ed9
jmp 0x6ef8
movq %rax, %r14
leaq 0x1d0(%rsp), %rdi
callq 0x9db4
leaq 0x118(%rsp), %rdi
callq 0x4170
leaq 0x90(%rsp), %rdi
jmp 0x6ecb
movq %rax, %r14
leaq 0x90(%rsp), %rdi
callq 0x4170
leaq 0x1d0(%rsp), %rdi
callq 0x4170
jmp 0x6edc
movq %rax, %r14
jmp 0x6ee9
jmp 0x6ef8
movq %rax, %r14
leaq 0x140(%rsp), %rdi
callq 0x4170
leaq 0x260(%rsp), %rdi
callq 0x4170
jmp 0x6efb
movq %rax, %r14
leaq 0x240(%rsp), %rdi
callq 0x4170
leaq 0x20(%rsp), %rdi
callq 0x4170
leaq 0x40(%rsp), %rdi
callq 0x4170
leaq 0xd8(%rsp), %rdi
callq 0xa490
leaq 0x160(%rsp), %rdi
callq 0xad28
leaq 0x70(%rsp), %rdi
callq 0x4170
leaq 0xb8(%rsp), %rdi
callq 0x4170
movq %r14, %rdi
callq 0x46a0