// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftp_benchmark.cc
// Function: null2ftp_worker(ftpInfo*, recvParam*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
void null2ftp_worker(ftpInfo * pFtp, recvParam * pRecv, string ftpPath, int id) 
{
    // normalize directory path format
    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, "\nthread %d : login ftp server %s failed: %s\n",\
                     id, pFtp->ftpServer, ftpClient->mp_ftphandle->response);
        goto error_out;
    }

    // create work directory
    ftpPath = ftpPath + pRecv->testName +  "_thread_" + to_string(id);
    if (!ftpClient->Chdir(ftpPath.c_str())) {
        if (!ftpClient->Mkdir(ftpPath.c_str())) {
            fprintf(stderr, "make directory %s failed: %s\n",\
                ftpPath.c_str(), ftpClient->mp_ftphandle->response);
            goto error_out;
        }
    }

    null2ftp_worker_core(pRecv, ftpClient, ftpPath, 1, pFtp);	

error_out:
    ftpClient->Quit();
    delete ftpClient;
    --liveWorkThread;
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %ecx, %r13d
movq %rdx, %r12
movq %rsi, 0x40(%rsp)
movq %rdi, %r14
leaq 0x78(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x907d(%rip), %rdx      # 0x12902
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
movq %rdx, %rsi
callq 0xd43e
movq %rbx, %rdi
movq %r12, %rsi
callq 0xdddf
movl $0x8, %edi
callq 0x43f0
movq %rax, %rbx
movq %rax, %rdi
callq 0xe220
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5c9b
testl %eax, %eax
js 0x9914
leaq 0xa8(%rsp), %rdi
movq %r12, %rsi
movq 0x40(%rsp), %rdx
callq 0xbe5a
leaq 0x8dac(%rip), %rsi      # 0x1268c
leaq 0xa8(%rsp), %rdi
callq 0x4740
leaq 0x30(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9949
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x994f
cmpl $-0x2, %eax
jne 0x9ba0
movq 0xe6a4(%rip), %rax      # 0x17fc8
movq (%rax), %rdi
movq (%r14), %rcx
movl $0x88, %r8d
addq (%rbx), %r8
leaq 0x8d25(%rip), %rsi      # 0x1265f
movl %r13d, %edx
xorl %eax, %eax
callq 0x4530
jmp 0x9ba0
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl %r13d, %ebp
negl %ebp
cmovsl %r13d, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0x99c4
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x99bb
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x99c1
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x99c4
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x9988
addl $-0x3, %r15d
jmp 0x99c4
addl $-0x2, %r15d
jmp 0x99c4
decl %r15d
shrl $0x1f, %r13d
leal (%r15,%r13), %esi
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rsp, %rdi
movl $0x2d, %edx
callq 0x4470
movl %r13d, %edi
addq (%rsp), %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0xd33a
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r8
movq 0x8(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
leaq 0x30(%rsp), %r13
cmpq %r13, %rcx
je 0x9a1a
movq 0x30(%rsp), %rdi
movq (%rsp), %rsi
cmpq %rdi, %rax
leaq 0x78(%rsp), %rbp
jbe 0x9a41
movl $0xf, %edi
leaq 0x10(%rsp), %r9
cmpq %r9, %rsi
je 0x9a3c
movq 0x10(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x9a4d
leaq 0x20(%rsp), %rdi
callq 0x4110
jmp 0x9a59
movq %rsp, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4440
leaq 0x58(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x9a7d
movq %rsi, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x9a83
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x48(%rsp), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x44c0
movq (%r15), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x9aca
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4400
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9ae5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x9afc
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4400
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9b1d
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x4400
movq (%r12), %rsi
movq %rbx, %rdi
callq 0xfd48
testl %eax, %eax
jne 0x9b41
movq (%r12), %rsi
movq %rbx, %rdi
callq 0xfce2
testl %eax, %eax
je 0x9bed
leaq 0x98(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0xd3a8
leaq 0x88(%rsp), %rdx
movq 0x40(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %ecx
movq %r14, %r8
callq 0x9cd2
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x9ba0
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x4400
movq %rbx, %rdi
callq 0x104b6
movq %rbx, %rdi
callq 0xe318
movl $0x8, %esi
movq %rbx, %rdi
callq 0x4400
lock
decl 0xe92c(%rip)            # 0x184f0
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x9bdb
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4400
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xe3d4(%rip), %rax      # 0x17fc8
movq (%rax), %rdi
movq (%r12), %rdx
movl $0x88, %ecx
addq (%rbx), %rcx
leaq 0x8a8b(%rip), %rsi      # 0x12695
xorl %eax, %eax
callq 0x4530
jmp 0x9ba0
movq %rax, %r12
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x9cae
movq 0x98(%rsp), %rsi
jmp 0x9c8e
movq %rax, %r12
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9c54
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4400
jmp 0x9c54
movq %rax, %r12
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x9c75
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4400
jmp 0x9c75
movq %rax, %r12
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9cae
movq 0xb8(%rsp), %rsi
incq %rsi
jmp 0x9ca0
jmp 0x9cab
movq %rax, %r12
movl $0x8, %esi
movq %rbx, %rdi
callq 0x4400
jmp 0x9cae
jmp 0x9cab
jmp 0x9cab
movq %rax, %r12
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x9cca
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4400
movq %r12, %rdi
callq 0x46e0