// File: lianxings[P]ftp_benchmark/ftp_benchmark.cc
// Function: ftp2null_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 ftp2null_dispatcher(ftpInfo * pFtp, string ftpPath, string localPath) 
{
    // normalize directory path format
    // localDirPath is null, do not need to deal with it
    string nullStr("");
    normalize_dir_format(nullStr, ftpPath);

    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;
    }

    ftp2null_dispatcher_core(pFtp, ftpClient, ftpPath, localPath);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rsi, -0xb8(%rbp)
movq %rdx, -0xb0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x4820
movq -0xa8(%rbp), %rdx
leaq 0x13549(%rip), %rsi     # 0x1c94c
leaq -0x38(%rbp), %rdi
callq 0xd720
jmp 0x940e
leaq -0x39(%rbp), %rdi
callq 0x4510
movq -0xb8(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x15d20
jmp 0x9429
movl $0x8, %edi
callq 0x44b0
movq %rax, -0xc0(%rbp)
jmp 0x943c
movq -0xc0(%rbp), %rdi
callq 0x16370
jmp 0x944a
movq -0xc0(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
movq -0x8(%rbp), %rsi
xorl %edx, %edx
callq 0x5dd0
movl %eax, -0xc4(%rbp)
jmp 0x946c
movl -0xc4(%rbp), %eax
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
jge 0x94f1
cmpl $-0x2, -0x5c(%rbp)
jne 0x94ef
movq 0x1cb40(%rip), %rax     # 0x25fc8
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rdx
leaq 0x1399a(%rip), %rsi     # 0x1ce33
movb $0x0, %al
callq 0x4680
jmp 0x94ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x4510
jmp 0x9603
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x95fa
movq -0xc0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movl $0x8, %esi
callq 0x44c0
jmp 0x95fa
jmp 0x9563
movq -0xb8(%rbp), %rsi
movq -0x8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x41c0
jmp 0x9519
movq -0xb0(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x41c0
jmp 0x952e
movq -0xd0(%rbp), %rsi
movq -0xd8(%rbp), %rdi
leaq -0x80(%rbp), %rdx
leaq -0xa0(%rbp), %rcx
callq 0x9610
jmp 0x954e
leaq -0xa0(%rbp), %rdi
callq 0x4280
leaq -0x80(%rbp), %rdi
callq 0x4280
leaq 0x1d07e(%rip), %rdi     # 0x265e8
movl $0x1, %esi
callq 0xd690
leaq 0x1d025(%rip), %rdi     # 0x265a0
callq 0x47c0
movq -0x58(%rbp), %rdi
callq 0x197d0
jmp 0x958b
movq -0x58(%rbp), %rax
movq %rax, -0xe0(%rbp)
cmpq $0x0, %rax
je 0x95b9
movq -0xe0(%rbp), %rdi
callq 0x164c0
movq -0xe0(%rbp), %rdi
movl $0x8, %esi
callq 0x44c0
leaq -0x38(%rbp), %rdi
callq 0x4280
addq $0xe0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x95f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x4280
leaq -0x80(%rbp), %rdi
callq 0x4280
leaq -0x38(%rbp), %rdi
callq 0x4280
movq -0x48(%rbp), %rdi
callq 0x4810
nopl (%rax)