// File: /workspace/github_cpp_makefile_star2_O3/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 0xdddf
movl $0x8, %edi
callq 0x43f0
movq %rax, %r12
movq %rax, %rdi
callq 0xe220
movq %r12, %rdi
movq %r14, %rsi
callq 0x5c9b
testl %eax, %eax
js 0x671a
leaq 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rdi
callq 0xd3a8
leaq 0x100(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0xf0(%rsp), %rdi
callq 0xd3a8
leaq 0x1b0(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1a0(%rsp), %rdi
callq 0xd3a8
leaq 0x1a0(%rsp), %rdi
callq 0xdc34
movl %eax, %ebx
movq 0x1a0(%rsp), %rdi
cmpq %r14, %rdi
je 0x5f9a
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x4400
testl %ebx, %ebx
je 0x6765
leaq 0x58(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0xdddf
movq 0xf0(%rsp), %rsi
movq %r12, %rdi
callq 0xfd48
testl %eax, %eax
je 0x6774
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 0xc3a8
movq %r12, 0x48(%rsp)
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 0x58(%rsp), %rsi
callq 0x4200
leaq 0x180(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x4200
leaq 0x1c0(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0xc520
movq 0x1d0(%rsp), %rax
movq 0x1f0(%rsp), %rcx
cmpq %rax, %rcx
je 0x66b8
leaq 0x228(%rsp), %r14
xorl %ebx, %ebx
leaq 0x218(%rsp), %rbp
leaq 0x78(%rsp), %r13
movq 0x208(%rsp), %rdx
movl 0x1e8(%rsp), %esi
movl %edx, %edi
subl %esi, %edi
negq %rdx
movl $0x0, %edx
sbbl %edx, %edx
movq 0x1e0(%rsp), %r8
leal (%rdi,%rdx,8), %edx
andl $-0x8, %edx
movq %rcx, %rsi
subq 0x1f8(%rsp), %rsi
shrq $0x6, %rsi
subq %rax, %r8
shrq $0x6, %r8
addl %esi, %r8d
addl %edx, %r8d
movq %r8, 0x158(%rsp)
testl %r8d, %r8d
jle 0x66af
xorl %eax, %eax
movl %eax, 0x54(%rsp)
movq 0x1d0(%rsp), %r15
leaq 0x160(%rsp), %rdi
movq %r15, %rsi
callq 0x4200
addq $0x20, %r15
leaq 0x180(%rsp), %rdi
movq %r15, %rsi
callq 0x4200
leaq 0x1c0(%rsp), %rdi
callq 0xc80c
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x160(%rsp), %rsi
movq 0x168(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0xd3a8
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x180(%rsp), %rsi
movq 0x188(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0xd3a8
leaq 0x138(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xdfca
movq 0x138(%rsp), %rsi
movq 0x140(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x4110
movq 0x10(%rsp), %rsi
subq $0x1, %rsi
jb 0x6813
movq 0x8(%rsp), %rax
cmpb $0x2f, (%rax,%rsi)
je 0x61c7
leaq 0x8(%rsp), %rdi
movl $0x2f, %esi
callq 0x4320
movq 0x8(%rsp), %rax
movq 0x48(%rsp), %rdi
movq %rax, %rsi
callq 0xfd48
testl %eax, %eax
jne 0x61ef
movq 0x8(%rsp), %rsi
movq 0x48(%rsp), %rdi
callq 0xfce2
testl %eax, %eax
je 0x6790
movq 0x28(%rsp), %rdi
callq 0x4580
movq %rax, %r15
testq %rax, %rax
je 0x6690
movq %r15, %rdi
callq 0x45b0
movq %rax, %r12
testq %rax, %rax
je 0x6611
movq %r12, %rax
cmpb $0x2e, 0x13(%r12)
jne 0x6237
movzbl 0x14(%rax), %ecx
testl %ecx, %ecx
je 0x6205
cmpl $0x2e, %ecx
jne 0x6237
cmpb $0x0, 0x15(%rax)
je 0x6205
addq $0x13, %r12
movzbl 0x12(%rax), %eax
cmpl $0xa, %eax
je 0x62bd
cmpl $0x8, %eax
je 0x62bd
cmpl $0x4, %eax
jne 0x6205
leaq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0xd3a8
movq %r13, %rdi
movq %r12, %rsi
callq 0x4740
movq %r13, %rdi
leaq 0xcbae(%rip), %rsi      # 0x12e33
callq 0x4740
movq %r14, 0x218(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6516
movq %rdx, 0x218(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x228(%rsp)
jmp 0x651d
leaq 0xd8(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq %rbx, 0xd0(%rsp)
movb %bl, 0xd8(%rsp)
movq %rbx, 0xe8(%rsp)
leaq 0x120(%rsp), %rax
movq %rax, 0x110(%rsp)
movq %rbx, 0x118(%rsp)
movb %bl, 0x120(%rsp)
movq %rbx, 0x130(%rsp)
leaq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
movq %rbx, 0x80(%rsp)
movb %bl, 0x88(%rsp)
movq %rbx, 0x98(%rsp)
leaq 0xb0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq %rbx, 0xa8(%rsp)
movb %bl, 0xb0(%rsp)
movq %rbx, 0xc0(%rsp)
movq %r14, 0x218(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0xd3a8
movq %rbp, %rdi
movq %r12, %rsi
callq 0x4740
leaq 0xc8(%rsp), %rdi
movq %rbp, %rsi
callq 0x44c0
movq 0x218(%rsp), %rdi
cmpq %r14, %rdi
je 0x63ab
movq 0x228(%rsp), %rsi
incq %rsi
callq 0x4400
movq %r14, 0x218(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0xd3a8
movq %rbp, %rdi
movq %r12, %rsi
callq 0x4740
leaq 0x110(%rsp), %rdi
movq %rbp, %rsi
callq 0x44c0
movq 0x218(%rsp), %rdi
cmpq %r14, %rdi
je 0x6400
movq 0x228(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0xc8(%rsp), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x4290
movl %eax, %r12d
testl %eax, %eax
js 0x65f9
movl %r12d, %edi
movq %rbp, %rsi
callq 0x4670
movl %r12d, %edi
callq 0x4760
movq 0x248(%rsp), %rax
movq %rax, 0x130(%rsp)
movq %rax, 0xe8(%rsp)
movq %r13, %rdi
leaq 0xc8(%rsp), %rsi
callq 0x4200
movq 0xe8(%rsp), %rax
movq %rax, 0x98(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x4200
movq 0x130(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq %r13, %rdi
callq 0xbd0f
movl %eax, %r12d
testl %eax, %eax
js 0x64b2
lock
incq 0x12055(%rip)           # 0x184f8
movq 0x248(%rsp), %rax
addq %rax, 0x1207e(%rip)     # 0x18530
shrl $0x1f, %r12d
movq %r13, %rdi
callq 0xbe24
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x64e3
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x6508
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x4400
testb %r12b, %r12b
je 0x6205
jmp 0x6611
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x220(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x655a
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x4400
leaq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0xd3a8
leaq 0x160(%rsp), %rdi
movq %rbp, %rsi
callq 0x4200
leaq 0x180(%rsp), %rdi
movq %r13, %rsi
callq 0x4200
leaq 0x1c0(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0xc520
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x65d3
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x218(%rsp), %rdi
cmpq %r14, %rdi
je 0x6205
movq 0x228(%rsp), %rsi
incq %rsi
callq 0x4400
jmp 0x6205
leaq 0xc8(%rsp), %rdi
movl %r12d, %esi
callq 0x47b4
xorl %r12d, %r12d
jmp 0x64b6
movq %r15, %rdi
callq 0x4620
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0x663e
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x665a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x6676
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4400
testq %r15, %r15
je 0x66b8
movl 0x54(%rsp), %eax
incl %eax
cmpl 0x158(%rsp), %eax
jne 0x60e2
jmp 0x669f
leaq 0x28(%rsp), %rdi
callq 0x47ed
jmp 0x6619
movq 0x1d0(%rsp), %rax
movq 0x1f0(%rsp), %rcx
cmpq %rax, %rcx
jne 0x6088
leaq 0x160(%rsp), %rdi
callq 0xc372
leaq 0x1c0(%rsp), %rdi
callq 0xcb9e
movq 0x48(%rsp), %r12
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0x66fc
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x671f
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4400
jmp 0x671f
cmpl $-0x2, %eax
je 0x6786
movq %r12, %rdi
callq 0x104b6
movl $0x1, %eax
xchgl %eax, 0x11db6(%rip)     # 0x184e8
leaq 0x11d67(%rip), %rdi     # 0x184a0
callq 0x4690
movq %r12, %rdi
callq 0xe318
movl $0x8, %esi
movq %r12, %rdi
callq 0x4400
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x58(%rsp), %rdi
callq 0x4835
jmp 0x66d7
leaq 0xf0(%rsp), %rdi
callq 0x4811
jmp 0x66d7
movq %r14, %rdi
callq 0x4859
jmp 0x671f
movq 0x11831(%rip), %rax     # 0x17fc8
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
leaq 0xc52d(%rip), %rsi      # 0x12cd3
xorl %eax, %eax
callq 0x4530
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0x67d2
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x67ee
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x66b8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4400
jmp 0x66b8
leaq 0xca7c(%rip), %rdi      # 0x13296
xorl %edx, %edx
xorl %eax, %eax
callq 0x4590
movq %rax, %r15
movq 0x1a0(%rsp), %rdi
cmpq %r14, %rdi
je 0x69fa
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x4400
jmp 0x69fa
movq %rax, %r15
jmp 0x6a1f
movq %rax, %r15
movl $0x8, %esi
movq %r12, %rdi
jmp 0x6a36
jmp 0x6885
movq %rax, %r15
jmp 0x69fa
jmp 0x6927
jmp 0x6885
movq %rax, %r15
jmp 0x69c4
movq %rax, %r15
jmp 0x69a8
movq %rax, %r15
jmp 0x69e0
jmp 0x6927
movq %rax, %r15
jmp 0x6910
jmp 0x6899
movq %rax, %r15
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x6983
movq 0x88(%rsp), %rsi
jmp 0x697b
jmp 0x6927
jmp 0x68c7
jmp 0x692c
jmp 0x692c
movq %rax, %r15
movq 0x218(%rsp), %rdi
cmpq %r14, %rdi
je 0x692f
movq 0x228(%rsp), %rsi
incq %rsi
callq 0x4400
jmp 0x692f
jmp 0x692c
movq %rax, %r15
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x6910
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x218(%rsp), %rdi
cmpq %r14, %rdi
je 0x6983
movq 0x228(%rsp), %rsi
jmp 0x697b
movq %rax, %r15
jmp 0x6983
movq %rax, %r15
leaq 0x78(%rsp), %rdi
callq 0xbe24
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x695e
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x6983
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0x69a8
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x69c4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x69e0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4400
leaq 0x160(%rsp), %rdi
callq 0xc372
leaq 0x1c0(%rsp), %rdi
callq 0xcb9e
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0x6a1f
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x4400
leaq 0x68(%rsp), %rax
movq 0x58(%rsp), %rdi
cmpq %rax, %rdi
je 0x6a3b
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4400
movq %r15, %rdi
callq 0x46e0