// File: /workspace/github_cpp_makefile_star2_O1/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 0x904d(%rip), %rdx      # 0x12902
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
movq %rdx, %rsi
callq 0xd47e
movq %rbx, %rdi
movq %r12, %rsi
callq 0xde1b
movl $0x8, %edi
callq 0x43f0
movq %rax, %rbx
movq %rax, %rdi
callq 0xe240
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5cc5
testl %eax, %eax
js 0x9944
leaq 0xa8(%rsp), %rdi
movq %r12, %rsi
movq 0x40(%rsp), %rdx
callq 0xbe8e
leaq 0x8d7c(%rip), %rsi      # 0x1268c
leaq 0xa8(%rsp), %rdi
callq 0x4750
leaq 0x30(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9979
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x997f
cmpl $-0x2, %eax
jne 0x9bd1
movq 0xe674(%rip), %rax      # 0x17fc8
movq (%rax), %rdi
movq (%r14), %rcx
movl $0x88, %r8d
addq (%rbx), %r8
leaq 0x8cf5(%rip), %rsi      # 0x1265f
movl %r13d, %edx
xorl %eax, %eax
callq 0x4540
jmp 0x9bd1
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 0x99f4
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x99eb
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x99f1
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x99f4
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x99b8
addl $-0x3, %r15d
jmp 0x99f4
addl $-0x2, %r15d
jmp 0x99f4
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 0xd380
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r8
movq 0x8(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
leaq 0x30(%rsp), %r13
cmpq %r13, %rcx
je 0x9a4a
movq 0x30(%rsp), %rsi
cmpq %rsi, %rax
leaq 0x78(%rsp), %rbp
jbe 0x9a6e
movl $0xf, %esi
leaq 0x10(%rsp), %rdi
cmpq %rdi, (%rsp)
je 0x9a69
movq 0x10(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x9a7e
movq (%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x4110
jmp 0x9a8a
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 0x9aae
movq %rsi, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x9ab4
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 0x9afb
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4400
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9b16
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x9b2d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4400
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9b4e
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x4400
movq (%r12), %rsi
movq %rbx, %rdi
callq 0xfd94
testl %eax, %eax
jne 0x9b72
movq (%r12), %rsi
movq %rbx, %rdi
callq 0xfd2e
testl %eax, %eax
je 0x9c1e
leaq 0x98(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0xd3ee
leaq 0x88(%rsp), %rdx
movq 0x40(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %ecx
movq %r14, %r8
callq 0x9d03
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x9bd1
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x4400
movq %rbx, %rdi
callq 0x104c4
movq %rbx, %rdi
callq 0xe31a
movl $0x8, %esi
movq %rbx, %rdi
callq 0x4400
lock
decl 0xe903(%rip)            # 0x184f8
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x9c0c
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 0xe3a3(%rip), %rax      # 0x17fc8
movq (%rax), %rdi
movq (%r12), %rdx
movl $0x88, %ecx
addq (%rbx), %rcx
leaq 0x8a5a(%rip), %rsi      # 0x12695
xorl %eax, %eax
callq 0x4540
jmp 0x9bd1
movq %rax, %r12
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x9cdf
movq 0x98(%rsp), %rsi
jmp 0x9cbf
movq %rax, %r12
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9c85
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4400
jmp 0x9c85
movq %rax, %r12
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x9ca6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4400
jmp 0x9ca6
movq %rax, %r12
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9cdf
movq 0xb8(%rsp), %rsi
incq %rsi
jmp 0x9cd1
jmp 0x9cdc
movq %rax, %r12
movl $0x8, %esi
movq %rbx, %rdi
callq 0x4400
jmp 0x9cdf
jmp 0x9cdc
jmp 0x9cdc
movq %rax, %r12
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x9cfb
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4400
movq %r12, %rdi
callq 0x46f0