// File: /workspace/github_cpp_makefile_star2_O1/lianxings[P]ftp_benchmark/ftp_benchmark.cc
// Function: local2ftp_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 local2ftp_dispatcher(ftpInfo * pFtp, string localPath, string ftpPath) 
{
    // 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;
    }
    
    // add task to queue
    local2ftp_dispatcher_core(ftpClient, localPath, ftpPath);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp            # imm = 0x2A8
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
movq %rdx, %rsi
callq 0xde1b
movl $0x8, %edi
callq 0x43f0
movq %rax, %r13
movq %rax, %rdi
callq 0xe240
movq %r13, %rdi
movq %r14, %rsi
callq 0x5cc5
testl %eax, %eax
js 0x673c
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0xd3ee
leaq 0xf8(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0xe8(%rsp), %rdi
callq 0xd3ee
leaq 0x1b0(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1a0(%rsp), %rdi
callq 0xd3ee
leaq 0x1a0(%rsp), %rdi
callq 0xdc70
movl %eax, %ebx
movq 0x1a0(%rsp), %rdi
cmpq %r14, %rdi
je 0x5fad
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x4400
testl %ebx, %ebx
je 0x6787
leaq 0x50(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0xde1b
movq 0xe8(%rsp), %rsi
movq %r13, %rdi
callq 0xfd94
testl %eax, %eax
je 0x6796
xorps %xmm0, %xmm0
leaq 0x1c0(%rsp), %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0xc412
leaq 0x170(%rsp), %rax
movq %rax, -0x10(%rax)
xorl %ecx, %ecx
movq %rcx, -0x8(%rax)
movb %cl, (%rax)
leaq 0x190(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rcx, -0x8(%rax)
movb %cl, (%rax)
leaq 0x160(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x4200
leaq 0x180(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x4200
leaq 0x1c0(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0xc58a
movq 0x1d0(%rsp), %rcx
movq 0x1f0(%rsp), %rax
cmpq %rcx, %rax
je 0x66df
leaq 0x228(%rsp), %r12
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
leaq 0x218(%rsp), %r14
movq %r13, 0x150(%rsp)
movq 0x1e0(%rsp), %r8
movq 0x208(%rsp), %rdx
movl 0x1e8(%rsp), %esi
movl %edx, %edi
subl %esi, %edi
negq %rdx
movl $0x0, %edx
sbbl %edx, %edx
leal (%rdi,%rdx,8), %edx
andl $-0x8, %edx
subq 0x1f8(%rsp), %rax
shrq $0x6, %rax
subq %rcx, %r8
shrq $0x6, %r8
addl %eax, %r8d
addl %edx, %r8d
movq %r8, 0x158(%rsp)
testl %r8d, %r8d
jle 0x66c6
xorl %eax, %eax
movl %eax, 0x4c(%rsp)
movq 0x1d0(%rsp), %rbx
leaq 0x160(%rsp), %rdi
movq %rbx, %rsi
callq 0x4200
addq $0x20, %rbx
leaq 0x180(%rsp), %rdi
movq %rbx, %rsi
callq 0x4200
leaq 0x1c0(%rsp), %rdi
callq 0xc876
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x160(%rsp), %rsi
movq 0x168(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0xd3ee
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x180(%rsp), %rsi
movq 0x188(%rsp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xd3ee
leaq 0x130(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xdfeb
movq 0x130(%rsp), %rsi
movq 0x138(%rsp), %rdx
movq %r15, %rdi
callq 0x4110
movq 0x10(%rsp), %rdx
movq %rdx, %rsi
subq $0x1, %rsi
jb 0x6835
movq 0x8(%rsp), %rax
cmpb $0x2f, (%rax,%rsi)
je 0x61d2
movq %r15, %rdi
movl $0x2f, %esi
callq 0x4320
movq 0x8(%rsp), %rsi
movq %r13, %rdi
callq 0xfd94
testl %eax, %eax
jne 0x61f8
movq 0x8(%rsp), %rsi
movq %r13, %rdi
callq 0xfd2e
testl %eax, %eax
je 0x67b2
movq 0x28(%rsp), %rdi
callq 0x4590
movq %rax, %r15
testq %rax, %rax
je 0x66b7
movq %r15, %rdi
callq 0x45c0
movq %rax, %rbx
testq %rax, %rax
je 0x662b
leaq 0x13(%rbx), %r13
movq %r13, %rdi
leaq 0xcadc(%rip), %rsi      # 0x12d0c
callq 0x4520
testl %eax, %eax
je 0x620e
movq %r13, %rdi
leaq 0xcac8(%rip), %rsi      # 0x12d0b
callq 0x4520
testl %eax, %eax
je 0x620e
movzbl 0x12(%rbx), %eax
cmpl $0xa, %eax
je 0x62d3
cmpl $0x8, %eax
je 0x62d3
cmpl $0x4, %eax
jne 0x620e
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rbx
movq %rbx, %rdi
callq 0xd3ee
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4750
movq %rbx, %rdi
leaq 0xcb98(%rip), %rsi      # 0x12e33
callq 0x4750
movq %r12, 0x218(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6530
movq %rdx, 0x218(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x228(%rsp)
jmp 0x6538
leaq 0xd0(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq %rbp, 0xc8(%rsp)
movb %bpl, 0xd0(%rsp)
movq %rbp, 0xe0(%rsp)
leaq 0x118(%rsp), %rax
movq %rax, 0x108(%rsp)
movq %rbp, 0x110(%rsp)
movb %bpl, 0x118(%rsp)
movq %rbp, 0x128(%rsp)
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq %rbp, 0x78(%rsp)
movb %bpl, 0x80(%rsp)
movq %rbp, 0x90(%rsp)
leaq 0xa8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq %rbp, 0xa0(%rsp)
movb %bpl, 0xa8(%rsp)
movq %rbp, 0xb8(%rsp)
movq %r12, 0x218(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0xd3ee
movq %r14, %rdi
movq %r13, %rsi
callq 0x4750
leaq 0xc0(%rsp), %rdi
movq %r14, %rsi
callq 0x44c0
movq 0x218(%rsp), %rdi
cmpq %r12, %rdi
je 0x63c2
movq 0x228(%rsp), %rsi
incq %rsi
callq 0x4400
movq %r12, 0x218(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0xd3ee
movq %r14, %rdi
movq %r13, %rsi
callq 0x4750
leaq 0x108(%rsp), %rdi
movq %r14, %rsi
callq 0x44c0
movq 0x218(%rsp), %rdi
cmpq %r12, %rdi
je 0x6417
movq 0x228(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0xc0(%rsp), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x4290
movl %eax, %ebx
testl %eax, %eax
js 0x6614
movl %ebx, %edi
movq %r14, %rsi
callq 0x4680
movl %ebx, %edi
callq 0x4770
movq 0x248(%rsp), %rax
movq %rax, 0x128(%rsp)
movq %rax, 0xe0(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x4200
movq 0xe0(%rsp), %rax
movq %rax, 0x90(%rsp)
leaq 0x98(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x4200
movq 0x128(%rsp), %rax
movq %rax, 0xb8(%rsp)
leaq 0x70(%rsp), %rdi
callq 0xbd42
movl %eax, %r13d
testl %eax, %eax
js 0x64ca
lock
incq 0x12045(%rip)           # 0x18500
movq 0x248(%rsp), %rax
addq %rax, 0x1206e(%rip)     # 0x18538
shrl $0x1f, %r13d
leaq 0x70(%rsp), %rdi
callq 0xbe58
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x64fd
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x6522
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x4400
testb %r13b, %r13b
je 0x620e
jmp 0x662b
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x220(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x6575
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4400
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xd3ee
leaq 0x160(%rsp), %rdi
movq %r14, %rsi
callq 0x4200
leaq 0x180(%rsp), %rdi
movq %rbx, %rsi
callq 0x4200
leaq 0x1c0(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0xc58a
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x65ee
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x218(%rsp), %rdi
cmpq %r12, %rdi
je 0x620e
movq 0x228(%rsp), %rsi
incq %rsi
callq 0x4400
jmp 0x620e
leaq 0xc0(%rsp), %rdi
movl %ebx, %esi
callq 0x47c4
xorl %r13d, %r13d
jmp 0x64ce
movq %r15, %rdi
callq 0x4630
movq 0x130(%rsp), %rdi
leaq 0x140(%rsp), %rax
cmpq %rax, %rdi
je 0x6658
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6674
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
movq 0x150(%rsp), %r13
je 0x6698
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4400
testq %r15, %r15
leaq 0x8(%rsp), %r15
je 0x66df
movl 0x4c(%rsp), %eax
incl %eax
cmpl 0x158(%rsp), %eax
jne 0x60f5
jmp 0x66c6
leaq 0x28(%rsp), %rdi
callq 0x47fd
jmp 0x6633
movq 0x1d0(%rsp), %rcx
movq 0x1f0(%rsp), %rax
cmpq %rcx, %rax
jne 0x609e
leaq 0x160(%rsp), %rdi
callq 0xc3dc
leaq 0x1c0(%rsp), %rdi
callq 0xcc08
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x671e
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x6741
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4400
jmp 0x6741
cmpl $-0x2, %eax
je 0x67a8
movq %r13, %rdi
callq 0x104c4
movl $0x1, %eax
xchgl %eax, 0x11d9c(%rip)     # 0x184f0
leaq 0x11d4d(%rip), %rdi     # 0x184a8
callq 0x46a0
movq %r13, %rdi
callq 0xe31a
movl $0x8, %esi
movq %r13, %rdi
callq 0x4400
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x50(%rsp), %rdi
callq 0x4845
jmp 0x66f9
leaq 0xe8(%rsp), %rdi
callq 0x4821
jmp 0x66f9
movq %r14, %rdi
callq 0x4869
jmp 0x6741
movq 0x1180f(%rip), %rax     # 0x17fc8
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
leaq 0xc50b(%rip), %rsi      # 0x12cd3
xorl %eax, %eax
callq 0x4540
movq 0x130(%rsp), %rdi
leaq 0x140(%rsp), %rax
cmpq %rax, %rdi
je 0x67f4
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6810
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x66df
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4400
jmp 0x66df
leaq 0xca5a(%rip), %rdi      # 0x13296
xorl %eax, %eax
callq 0x45a0
movq %rax, %rbx
movq 0x1a0(%rsp), %rdi
cmpq %r14, %rdi
je 0x6a1d
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x4400
jmp 0x6a1d
movq %rax, %rbx
jmp 0x6a42
movq %rax, %rbx
movl $0x8, %esi
movq %r13, %rdi
jmp 0x6a59
jmp 0x68a5
movq %rax, %rbx
jmp 0x6a1d
movq %rax, %rbx
jmp 0x69cb
jmp 0x68a5
jmp 0x69a3
movq %rax, %rbx
jmp 0x69e7
movq %rax, %rbx
jmp 0x6a03
jmp 0x68b9
movq %rax, %rbx
jmp 0x6933
jmp 0x69a3
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x69a6
movq 0x80(%rsp), %rsi
jmp 0x6999
jmp 0x69a3
jmp 0x694a
jmp 0x694a
jmp 0x68ec
jmp 0x694a
movq %rax, %rbx
movq 0x218(%rsp), %rdi
cmpq %r12, %rdi
je 0x694d
movq 0x228(%rsp), %rsi
incq %rsi
callq 0x4400
jmp 0x694d
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x6933
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x218(%rsp), %rdi
cmpq %r12, %rdi
je 0x69a6
movq 0x228(%rsp), %rsi
jmp 0x6999
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0xbe58
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x697c
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x69a6
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x4400
jmp 0x69a6
movq %rax, %rbx
movq 0x130(%rsp), %rdi
leaq 0x140(%rsp), %rax
cmpq %rax, %rdi
je 0x69cb
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x69e7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x6a03
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4400
leaq 0x160(%rsp), %rdi
callq 0xc3dc
leaq 0x1c0(%rsp), %rdi
callq 0xcc08
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x6a42
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x4400
leaq 0x60(%rsp), %rax
movq 0x50(%rsp), %rdi
cmpq %rax, %rdi
je 0x6a5e
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4400
movq %rbx, %rdi
callq 0x46f0