LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/worklist.cpp
// Function: pictcore::WorkList::AddItem(pictcore::Parameter*)
void WorkList::AddItem( Parameter* param )
{
    if( !param->IsPending() )
    {
        assert( !param->GetBoundCount() );
        m_rep.push_back( param );
        param->MarkPending();
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, 0x8(%rsp)
cmpb $0x0, 0x3e(%rsi)
jne 0x10521
cmpb $0x1, 0x3d(%rsi)
je 0x10527
movq 0x30(%rdi), %rax
movq 0x40(%rdi), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x1050d
movq %rsi, (%rax)
addq $0x8, 0x30(%rdi)
jmp 0x1051d
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x7d54
movq (%rbx), %rsi
movb $0x1, 0x3e(%rsi)
addq $0x10, %rsp
popq %rbx
retq
leaq 0x1621f(%rip), %rdi     # 0x2674d
leaq 0x16574(%rip), %rsi     # 0x26aa9
leaq 0x16589(%rip), %rcx     # 0x26ac5
movl $0xe, %edx
callq 0x52c0
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/utils/utils.cpp
// Function: position_in_vector(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int position_in_vector(vector<string> vect, string target)
{
    for(int i=0; i<vect.size(); i++)
    {
        if(vect[i].compare(target) == 0)
        {
            return i;
        }
    }
    return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r15
movq (%rdi), %rdi
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpq %rdi, 0x8(%r15)
je 0x1074e
movq %rsi, %r14
xorl %r12d, %r12d
xorl %r13d, %r13d
addq %r12, %rdi
movq %r14, %rsi
callq 0x5050
testl %eax, %eax
je 0x1074b
incq %r13
movq (%r15), %rdi
movq 0x8(%r15), %rax
subq %rdi, %rax
sarq $0x5, %rax
addq $0x20, %r12
cmpq %r13, %rax
ja 0x10720
jmp 0x1074e
movl %r13d, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/input-parser/input-parser.cpp
// Function: input_parser(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>&, std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>&)
void input_parser(string input_file_path, vector<vector<string>> &parameter_matrix, vector<vector<string>> &constraint_matrix)
{
	
	std::ifstream input_file;
  	input_file.open(input_file_path, std::ios_base::in);

	parameter_parser(input_file, parameter_matrix);
	constraint_parser(input_file, constraint_matrix);
	
	input_file.close();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsp, %r12
movq %r12, %rdi
callq 0x5480
movq %r12, %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x5360
movq %rsp, %rdi
movq %r14, %rsi
callq 0x10c96
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x116c1
movq %rsp, %rdi
callq 0x50c0
movq %rsp, %rdi
callq 0x50d0
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x50d0
movq %rbx, %rdi
callq 0x56a0
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/java-source-code-parser/java-source-code-parser.cpp
// Function: get_method_and_values_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
vector<string> get_method_and_values_name(string method_prototype)
{
    smatch sm;
    vector<string> method_values_name;
    regex method_and_value_name_regex (R"rgx(\b\w+(?=\s*[,()]))rgx");

    while(regex_search(method_prototype, sm, method_and_value_name_regex))
    {
        method_values_name.push_back(sm[0]);
        method_prototype = sm.suffix();
    }
    return method_values_name;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x149a3(%rip), %rsi     # 0x26d71
leaq 0x48(%rsp), %rdi
movl $0x10, %edx
callq 0x125f6
leaq 0x10(%rsp), %rbp
leaq 0x20(%rsp), %r15
leaq 0x48(%rsp), %r12
movq %rsp, %r13
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x1d687
testb %al, %al
je 0x12510
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rdx
movq %rdx, %rax
subq %rcx, %rax
leaq -0x48(%rdx), %rsi
cmpq $0x48, %rax
movq %rcx, %rax
cmoveq %rsi, %rax
cmpq %rcx, %rdx
cmoveq %rsi, %rax
cmpb $0x1, 0x10(%rax)
jne 0x12450
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbp, (%rsp)
movq %r13, %rdi
callq 0x1f6dc
jmp 0x12462
movq %rbp, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x10a0c
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x12483
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53e0
movq 0x28(%rsp), %rax
movq %rax, %rdx
subq 0x20(%rsp), %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
movq $-0x48, %rcx
cmpq $0x4, %rdx
jb 0x124b6
movq $-0x18, %rcx
cmpb $0x1, 0x10(%rax,%rcx)
jne 0x124d4
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq %rbp, (%rsp)
movq %r13, %rdi
callq 0x1f6dc
jmp 0x124e6
movq %rbp, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x54e0
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x123ef
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53e0
jmp 0x123ef
leaq 0x48(%rsp), %rdi
callq 0x1265e
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x12531
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x53e0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x12574
jmp 0x12567
jmp 0x12567
movq %rax, %r14
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x1256a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53e0
jmp 0x1256a
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x1265e
movq %rbx, %rdi
callq 0x107a2
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x12593
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x53e0
movq %r14, %rdi
callq 0x56a0
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/junit-test-case-generator/junit-test-case-generator.cpp
// Function: add_oracle_to_arguments(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
string add_oracle_to_arguments(string prototype, bool interval_found)
{
    string arguments_with_oracle = "";
    if(interval_found)
    {
        arguments_with_oracle = (prototype.replace(prototype.find(")"),prototype.find(")"), ", double oracle, double delta)")); 

    }
    else
    {
        arguments_with_oracle = (prototype.replace(prototype.find(")"),prototype.find(")"), ", Object oracle)")); 
    }
    return arguments_with_oracle;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
leaq 0x8421(%rip), %rdx      # 0x27b9a
movq %rdx, %rsi
callq 0x74e8
leaq 0x6e19(%rip), %r15      # 0x265a1
movl $0x1, %ecx
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x5690
movq %rax, %r12
movl $0x1, %ecx
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x5690
leaq 0x8352(%rip), %rdx      # 0x27b08
leaq 0x836a(%rip), %rcx      # 0x27b27
testl %ebp, %ebp
cmovneq %rdx, %rcx
movl $0x1e, %edx
movl $0x10, %r8d
cmovneq %rdx, %r8
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x5460
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5210
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x1f814
movq (%r13), %rsi
incq %rsi
callq 0x53e0
movq %r14, %rdi
callq 0x56a0
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/junit-test-case-generator/junit-test-case-generator.cpp
// Function: delta_check(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
bool delta_check(string input_file_path, int num_of_parameters)
{
    ifstream test_with_oracle;
  	test_with_oracle.open(input_file_path, ios_base::in);
    string combination = "";

    while(!test_with_oracle.eof())
    {
        getline(test_with_oracle, combination);

        if((int) count(combination.begin(), combination.end(), ',') == (num_of_parameters + 1)) //If there's delta it is TRUE (+1 parameter)
        {
            test_with_oracle.close();
            return true;
        }
    }

    test_with_oracle.close();
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
movl %esi, %ebx
movq %rdi, %r14
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x5480
movq %r15, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x5360
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x833c(%rip), %rdx      # 0x27b9a
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x74e8
incl %ebx
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %r15
movq 0x28(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x48(%rsp,%rax), %ebp
testb $0x2, %bpl
jne 0x1f8d9
leaq (%rsp,%rax), %rdi
addq $0x28, %rdi
movl $0xa, %esi
callq 0x53b0
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x56f0
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x1f8d3
movq 0x8(%rsp), %rdx
xorl %esi, %esi
xorl %ecx, %ecx
xorl %edi, %edi
cmpb $0x2c, (%rdx,%rsi)
sete %dil
addl %edi, %ecx
incq %rsi
cmpq %rsi, %rax
jne 0x1f8bd
jmp 0x1f8d5
xorl %ecx, %ecx
cmpl %ecx, %ebx
jne 0x1f877
leaq 0x28(%rsp), %rdi
callq 0x50c0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1f8fa
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53e0
testb $0x2, %bpl
sete %bl
leaq 0x28(%rsp), %rdi
callq 0x50d0
movl %ebx, %eax
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1f926
jmp 0x1f921
movq %rax, %rbx
jmp 0x1f940
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1f940
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53e0
leaq 0x28(%rsp), %rdi
callq 0x50d0
movq %rbx, %rdi
callq 0x56a0
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftp_benchmark.cc
// Function: connect_and_login_ftp(ftplib*, ftpInfo*, int)
static int connect_and_login_ftp (ftplib* ftpClient, ftpInfo* pFtp, int retryTime) 
{
    int retry = 0;
    static int seeded = 0;
    if (!seeded) {
        struct timeval tv;
        gettimeofday(&tv, NULL);
        srand((unsigned)tv.tv_usec);
        seeded = 1;
    }

    while (true) {
        if (ftpClient->Connect(pFtp->ftpServer)) {
            break;
        }
        
        if (retryTime > 0) {
            retry++;
            if (retry >= retryTime) {
                return -1;
            }
        } else {
            unsigned int sleepTime = rand();
            sleepTime = sleepTime % 31 + 2;
            sleep(sleepTime);
        }
    }
    if (!ftpClient->Login(pFtp->user, pFtp->pass)) {
        return -2;
    }
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x0, 0x12887(%rip)     # 0x18538
jne 0x5d01
movq %rsp, %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x4630
movl 0x8(%r15), %edi
callq 0x43a0
movb $0x1, 0x12868(%rip)     # 0x18538
jmp 0x5d01
callq 0x40d0
movl %eax, %ecx
imulq $0x8421085, %rcx, %rcx  # imm = 0x8421085
shrq $0x20, %rcx
movl %eax, %edx
subl %ecx, %edx
shrl %edx
addl %ecx, %edx
shrl $0x4, %edx
movl %edx, %ecx
shll $0x5, %ecx
subl %ecx, %edx
leal (%rax,%rdx), %edi
addl $0x2, %edi
callq 0x42b0
movq (%r14), %rsi
movq %rbx, %rdi
callq 0xe8e4
testl %eax, %eax
je 0x5cd2
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rdi
callq 0xece8
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leal -0x2(,%rcx,2), %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftp_benchmark.cc
// Function: get_task_from_queue(task<fileInfo>&)
static int get_task_from_queue (task<fileInfo>& curTask)
{
    std::unique_lock<std::mutex> lock(tasksMutex);
    while ((tasksQueue.empty()) && (!exitFlag)) {
        tasksExecuteCV.wait(lock);
    }
    if (!tasksQueue.empty()) {
        curTask = tasksQueue.front();
        tasksQueue.pop();
        tasksProductCV.notify_one();
    } else {
        return -1;
    }
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x126fb(%rip), %rax     # 0x18448
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0xc2a4
movb $0x1, 0x8(%r14)
movq 0x126ba(%rip), %rax     # 0x18428
movq 0x12693(%rip), %r14     # 0x18408
cmpq %r14, %rax
jne 0x5dbe
leaq 0x1271f(%rip), %r15     # 0x184a0
leaq 0x8(%rsp), %r12
movl 0x1275c(%rip), %eax     # 0x184e8
testl %eax, %eax
jne 0x5db0
movq %r15, %rdi
movq %r12, %rsi
callq 0x4100
movq 0x12686(%rip), %rax     # 0x18428
movq 0x1265f(%rip), %r14     # 0x18408
cmpq %r14, %rax
je 0x5d86
jmp 0x5dbe
movq 0x12671(%rip), %rax     # 0x18428
movq 0x1264a(%rip), %r14     # 0x18408
cmpq %r14, %rax
je 0x5e07
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4200
movq 0x20(%r14), %rax
movq %rax, 0x20(%rbx)
leaq 0x28(%rbx), %rdi
leaq 0x28(%r14), %rsi
callq 0x4200
movq 0x48(%r14), %rax
movq %rax, 0x48(%rbx)
leaq 0x12606(%rip), %rdi     # 0x183f8
callq 0xc2e0
leaq 0x12672(%rip), %rdi     # 0x18470
callq 0x41d0
xorl %ebx, %ebx
jmp 0x5e0c
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq 0x8(%rsp), %rdi
callq 0xc28e
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xc28e
movq %rbx, %rdi
callq 0x46e0
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftp_benchmark.cc
// Function: build_ftp_data_connection(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ftplib::accesstype, ftplib::transfermode, ftplib*, ftpInfo*, ftphandle**)
static int build_ftp_data_connection (string accessPath, ftplib::accesstype type, 
                                            ftplib::transfermode mode, ftplib* ftpClient,
                                            ftpInfo* pFtp, ftphandle** nData) 
{
    int retry = 0;
    while (retry < 5) {
        retry++;
        if (!ftpClient->FtpAccess(accessPath.c_str(), type, mode, ftpClient->mp_ftphandle, nData)) {
            if (ftpClient->mp_ftphandle->handle > 0) 
                net_close(ftpClient->mp_ftphandle->handle);
            int ret = connect_and_login_ftp (ftpClient, pFtp, 0);
            if (ret == -2) {  // login failed
                return ret;
            }
        } else {
            return 0;   // get ftp data connection succeed
        }
    }
    return -1;  // retry 5 times but failed
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, (%rsp)
movq %rcx, %r15
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %r13
movl $0x6, %r14d
decl %r14d
je 0x5ea3
movq (%r13), %rsi
movq (%r15), %r8
movq %r15, %rdi
movl %r12d, %edx
movl %ebp, %ecx
movq %rbx, %r9
callq 0xefc2
testl %eax, %eax
jne 0x5eaa
movq (%r15), %rax
movl 0x10(%rax), %edi
testl %edi, %edi
jle 0x5e8b
callq 0x4760
movq %r15, %rdi
movq (%rsp), %rsi
callq 0x5c9b
cmpl $-0x2, %eax
jne 0x5e5c
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x5eac
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x5eac
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftp_benchmark.cc
// Function: usage(char*)
static void usage(char * cmd)
{
    printf("ftp benchmark tool.\n");
    printf("Usage: %s -n <ftp server> -u <user name> -p <password> -s <source path>  -d <destination path> -i\n", cmd);
    printf("options:\n");	
    printf("    -t     # the number of threads\n");
    printf("    -i     # verbose, show ftp messages\n");
    printf("    -v     # verify data correctness\n");
    printf("    -h     # show usage\n");
    printf("Example:\n");
    printf("    %s -n 10.1.1.1:21 -u user -p pass -s local:/home -d ftp:/dir -t 8                 # upload local directory to ftp server\n", cmd);
    printf("    %s -n 10.1.1.1 -u user -p pass -s null -d ftp:/dir -w 3 -l 3 -f 10 -S 64K:1M -t 8 # upload random files to  ftp directory\n", cmd);
    printf("    %s -n 10.1.1.1 -u user -p pass -s ftp:/dir -d local:/home -t 8                    # download files from ftp server to local directory\n", cmd);
    printf("    %s -n ftp.boss.xiaoyun -u user -p pass -s ftp:/dir  -d null -t 16                 # download files from ftp server to /dev/null\n\n", cmd);
    return;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x7688(%rip), %rdi      # 0x132f4
callq 0x45d0
leaq 0x7383(%rip), %rdi      # 0x12ffb
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4060
leaq 0x767f(%rip), %rdi      # 0x13308
callq 0x45d0
leaq 0x767c(%rip), %rdi      # 0x13311
callq 0x45d0
leaq 0x7693(%rip), %rdi      # 0x13334
callq 0x45d0
leaq 0x76af(%rip), %rdi      # 0x1335c
callq 0x45d0
leaq 0x76c8(%rip), %rdi      # 0x13381
callq 0x45d0
leaq 0x76d4(%rip), %rdi      # 0x13399
callq 0x45d0
leaq 0x738d(%rip), %rdi      # 0x1305e
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4060
leaq 0x73fa(%rip), %rdi      # 0x130dc
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4060
leaq 0x7468(%rip), %rdi      # 0x1315b
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4060
leaq 0x74e2(%rip), %rdi      # 0x131e6
movq %rbx, %rsi
xorl %eax, %eax
popq %rbx
jmp 0x4060
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftp_benchmark.cc
// Function: put_task_to_queue(task<fileInfo>&)
static int put_task_to_queue (task<fileInfo>& curTask) 
{
    std::unique_lock<std::mutex> lock(tasksMutex);
    while ((tasksQueue.size() >= maxQueueSize) && (liveWorkThread > 0)) {
        tasksProductCV.wait(lock);
    }
    if (liveWorkThread > 0) {
        tasksQueue.push(curTask);
        tasksExecuteCV.notify_one();
    } else {
        return -1;
    }
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0xc724(%rip), %rax      # 0x18448
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0xc2a4
movb $0x1, 0x8(%r14)
movabsq $-0x3333333333333333, %r12 # imm = 0xCCCCCCCCCCCCCCCD
leaq 0xc721(%rip), %r15      # 0x18470
movq 0xc6ea(%rip), %rax      # 0x18440
movq %rax, %rcx
subq 0xc6c0(%rip), %rcx      # 0x18420
sarq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
leaq (%rcx,%rcx,2), %rax
movq 0xc6b1(%rip), %rcx      # 0x18428
subq 0xc6b2(%rip), %rcx      # 0x18430
sarq $0x4, %rcx
imulq %r12, %rcx
leaq (%rcx,%rax,2), %rax
movq 0xc687(%rip), %rcx      # 0x18418
subq 0xc670(%rip), %rcx      # 0x18408
sarq $0x4, %rcx
imulq %r12, %rcx
addq %rax, %rcx
cmpq $0x4000, %rcx           # imm = 0x4000
jb 0xbdc3
movl 0xc73e(%rip), %eax      # 0x184f0
testl %eax, %eax
jle 0xbdc3
movq %r15, %rdi
movq %r14, %rsi
callq 0x4100
jmp 0xbd4f
movl 0xc727(%rip), %eax      # 0x184f0
testl %eax, %eax
jle 0xbdec
leaq 0xc624(%rip), %rdi      # 0x183f8
movq %rbx, %rsi
callq 0xc876
leaq 0xc6bd(%rip), %rdi      # 0x184a0
callq 0x41d0
xorl %ebx, %ebx
jmp 0xbdf1
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq 0x8(%rsp), %rdi
callq 0xc28e
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xc28e
movq %rbx, %rdi
callq 0x46e0
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftptest_utils.cc
// Function: size_to_string(unsigned long, char*)
void size_to_string(uint64_t size, char * buf)
{   
    uint64_t  multiplier = exbibytes;
    int i;

    for (i = 0; i < DIM(sizes); i++, multiplier /= 1024) {   
        if (size < multiplier)
            continue;
        if (size % multiplier == 0)
            sprintf(buf, "%llu %s", (unsigned long long)size / multiplier, sizes[i]);
        else
            sprintf(buf, "%.1f %s", (float) size / multiplier, sizes[i]);
        return ;
    }
    strcpy(buf, "0");
    return ;
}

// Assembly:
movabsq $0x1000000000000000, %r8 # imm = 0x1000000000000000
xorl %ecx, %ecx
cmpq %rdi, %r8
jbe 0xdc8a
shrq $0xa, %r8
addq $0x8, %rcx
cmpl $0x38, %ecx
jne 0xdc72
movw $0x30, (%rsi)
retq
leaq -0x1(%r8), %rax
testq %rdi, %rax
je 0xdc9f
testq %rdi, %rdi
js 0xdcc9
cvtsi2ss %rdi, %xmm0
jmp 0xdcde
movq %rdi, %rax
xorl %edx, %edx
divq %r8
leaq 0xa0a2(%rip), %rdx      # 0x17d50
movq (%rcx,%rdx), %rcx
leaq 0x597f(%rip), %rdx      # 0x13638
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
xorl %eax, %eax
jmp 0x40a0
movq %rdi, %rax
shrq %rax
andl $0x1, %edi
orq %rax, %rdi
cvtsi2ss %rdi, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %r8, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0xa05e(%rip), %rax      # 0x17d50
movq (%rcx,%rax), %rdx
leaq 0x5943(%rip), %rax      # 0x13640
movq %rsi, %rdi
movq %rax, %rsi
movb $0x1, %al
jmp 0x40a0
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftptest_utils.cc
// Function: string_to_size(char const*)
int64_t string_to_size(const char * str)
{
    char c;
    int64_t num;
    int64_t ret;
    int64_t mult;
    char buf[32];

    strcpy(buf, str);
    
    c = buf[strlen(buf) - 1];
    if (c > '9') {
        buf[strlen(buf) - 1] = '\0';
    }
    double f = atof(buf);
    num = atoll(buf);

    if(isdigit(c))
        return num;
    
    switch(c) {
    case 't':
    case 'T':
        mult = 0x1ULL << 40; //1024 * 1024 * 1024*1024;
	break;
    case 'g':
    case 'G':
        mult = 0x1ULL << 30; //1024 * 1024 * 1024;
	break;
    case 'm':
    case 'M':
        mult = 0x1ULL << 20;//1024 * 1024;
	break;
    case 'k':
    case 'K':
        mult = 0x1ULL << 10;//1024;
	break;
    case 'b':
    case 'B':
        mult = 1;
	break;
    default:
        return -1;
    }

    ret = mult * f;
    return ret;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rsi
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x4380
movq %rbx, %rdi
callq 0x4180
movsbl -0x1(%rax,%rbx), %ebx
cmpl $0x3a, %ebx
jl 0xdd34
movb $0x0, -0x1(%rsp,%rax)
movq %rsp, %rdi
callq 0x44d0
leal -0x30(%rbx), %eax
cmpl $0x9, %eax
ja 0xdd51
movq %rsp, %rdi
callq 0x42e0
jmp 0xddd9
movzbl %bl, %ecx
movsd 0x58b4(%rip), %xmm1     # 0x13610
movq $-0x1, %rax
cmpl $0x61, %ecx
jg 0xdd7e
cmpl $0x4a, %ecx
jle 0xdd94
cmpl $0x4b, %ecx
je 0xddbe
cmpl $0x4d, %ecx
je 0xddc8
cmpl $0x54, %ecx
je 0xddd0
jmp 0xddd9
cmpl $0x6a, %ecx
jle 0xdda0
cmpl $0x6b, %ecx
je 0xddbe
cmpl $0x6d, %ecx
je 0xddc8
cmpl $0x74, %ecx
je 0xddd0
jmp 0xddd9
cmpl $0x42, %ecx
je 0xddb4
cmpl $0x47, %ecx
je 0xddaa
jmp 0xddd9
cmpl $0x62, %ecx
je 0xddb4
cmpl $0x67, %ecx
jne 0xddd9
movsd 0x587e(%rip), %xmm1     # 0x13630
jmp 0xddd0
movsd 0x585c(%rip), %xmm1     # 0x13618
jmp 0xddd0
movsd 0x585a(%rip), %xmm1     # 0x13620
jmp 0xddd0
movsd 0x5858(%rip), %xmm1     # 0x13628
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftptest_utils.cc
// Function: normalize_dir_format(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 normalize_dir_format(string& localPath, string& ftpPath) 
{
    if (localPath.length() > 0 && localPath.at(localPath.size() - 1) != '/') {
        localPath.push_back('/');
    }

    if (ftpPath.length() > 0) {
        if (ftpPath.at(0) != '/') {
            ftpPath = "/" + ftpPath;
        }
        if (ftpPath.at(ftpPath.size() - 1) != '/') {
            ftpPath.push_back('/');
        }
    }
    return;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0xde06
movq (%rdi), %rcx
cmpb $0x2f, -0x1(%rcx,%rax)
je 0xde06
movl $0x2f, %esi
callq 0x4320
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0xde78
movq (%rbx), %rax
cmpb $0x2f, (%rax)
jne 0xde1c
decq %rsi
jmp 0xde62
leaq 0x5010(%rip), %rsi      # 0x12e33
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0xe117
movq %rbx, %rdi
movq %r14, %rsi
callq 0x44c0
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xde58
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4400
movq 0x8(%rbx), %rsi
subq $0x1, %rsi
jb 0xde80
movq (%rbx), %rax
cmpb $0x2f, (%rax,%rsi)
je 0xde78
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x4320
addq $0x28, %rsp
popq %rbx
popq %r14
retq
leaq 0x540f(%rip), %rdi      # 0x13296
xorl %edx, %edx
xorl %eax, %eax
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftptest_utils.cc
// Function: resolve_list_entry(char const*, 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 resolve_list_entry (const char * dataBuf, string& name, string& sizeStr) 
{
    if (dataBuf == NULL) return;
    int i = strlen(dataBuf) - 2;
    while (dataBuf[i] != ' ') {
        name = dataBuf[i] + name;
        --i;
    }
    int spaceNum = 0;
    while (spaceNum < 4) {
        if (dataBuf[i] == ' ')
            spaceNum++;
        --i;
    }
    while (dataBuf[i] != ' ') {
        sizeStr = dataBuf[i] + sizeStr;
        --i;
    }
}

// Assembly:
testq %rdi, %rdi
je 0xdfc9
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
movabsq $-0x100000000, %rbp     # imm = 0xFFFFFFFF00000000
callq 0x4180
movq %rax, %r15
addl $-0x2, %r15d
movslq %r15d, %r14
movb (%rbx,%r14), %al
cmpb $0x20, %al
je 0xdf3c
movq %r13, 0x10(%rsp)
movq %rbx, 0x8(%rsp)
addq %r14, %rbx
decq %rbx
shlq $0x20, %r14
leaq 0x18(%rsp), %r13
movsbl %al, %esi
movq %r13, %rdi
movq %r12, %rdx
callq 0xe19f
movq %r12, %rdi
movq %r13, %rsi
callq 0x44c0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xdf1f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4400
movb (%rbx), %al
addq %rbp, %r14
decl %r15d
decq %rbx
cmpb $0x20, %al
jne 0xdeea
sarq $0x20, %r14
movq 0x10(%rsp), %r13
movq 0x8(%rsp), %rbx
leaq (%rbx,%r14), %rax
shlq $0x20, %r14
xorl %ecx, %ecx
decl %r15d
xorl %edx, %edx
cmpb $0x20, (%rax)
sete %dl
addl %edx, %ecx
decq %rax
addq %rbp, %r14
cmpl $0x4, %ecx
jb 0xdf46
sarq $0x20, %r14
movb (%rbx,%r14), %al
cmpb $0x20, %al
je 0xdfbb
movq %rbx, %rdx
leaq 0x28(%rsp), %rbx
movslq %r15d, %rcx
leaq (%rdx,%rcx), %r15
decq %r15
leaq 0x18(%rsp), %r14
movsbl %al, %esi
movq %r14, %rdi
movq %r13, %rdx
callq 0xe19f
movq %r13, %rdi
movq %r14, %rsi
callq 0x44c0
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0xdfb1
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4400
movb (%r15), %al
decq %r15
cmpb $0x20, %al
jne 0xdf81
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftptest_utils.cc
// Function: resolve_base_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string resolve_base_name (const string& srcPath) 
{
    int lastSlashLoc = 0;
    int slashLoc = 0;
    string baseName("");
    while ((slashLoc = srcPath.find('/', lastSlashLoc)) != std::string::npos) {
        if (slashLoc == srcPath.size() - 1) {
            baseName = srcPath.substr(lastSlashLoc, srcPath.size() - lastSlashLoc);
            break;
        }
        lastSlashLoc = slashLoc + 1;
    }
    
    if (baseName.empty()) {
        baseName = srcPath.substr(lastSlashLoc, srcPath.size() - lastSlashLoc);
    }
    return baseName;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movabsq $-0x100000000, %r12     # imm = 0xFFFFFFFF00000000
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
leaq 0x490d(%rip), %rdx      # 0x12902
movq %rdx, %rsi
callq 0xd43e
xorl %r15d, %r15d
movq %r14, %rdi
movl $0x2f, %esi
xorl %edx, %edx
callq 0x44f0
movq %rax, %rdx
shlq $0x20, %rdx
cmpq %r12, %rdx
je 0xe0a1
sarq $0x20, %rdx
movq 0x8(%r14), %rcx
leaq -0x1(%rcx), %rsi
cmpq %rsi, %rdx
jne 0xe035
xorl %r15d, %r15d
jmp 0xe067
incl %eax
movslq %eax, %r15
movq %r14, %rdi
movl $0x2f, %esi
movq %r15, %rdx
callq 0x44f0
movq %rax, %rdx
shlq $0x20, %rdx
cmpq %r12, %rdx
je 0xe0a1
sarq $0x20, %rdx
movq 0x8(%r14), %rcx
leaq -0x1(%rcx), %rsi
cmpq %rsi, %rdx
jne 0xe035
subq %r15, %rcx
movq %rsp, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x4410
movq %rsp, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x44c0
movq (%r12), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xe0a1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4400
cmpq $0x0, 0x8(%rbx)
jne 0xe0e5
movq 0x8(%r14), %rcx
subq %r15, %rcx
movq %rsp, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x4410
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x44c0
movq (%r14), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xe0e5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4400
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xe0f8
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0xe10f
movq (%r13), %rsi
incq %rsi
callq 0x4400
movq %r14, %rdi
callq 0x46e0
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftplib.cc
// Function: ftplib::ftplib()
ftplib::ftplib()
{
    #if defined(_WIN32)
    WSADATA wsa;
    if (WSAStartup(MAKEWORD(1, 1), &wsa))
    {
         printf("WSAStartup() failed, %lu\n", (unsigned long)GetLastError());
    }
    #endif
                
	#ifndef NOSSL
	SSL_library_init();
	#endif	

	mp_ftphandle = static_cast<ftphandle *>(calloc(1,sizeof(ftphandle)));
	if (mp_ftphandle == NULL) perror("calloc");
	mp_ftphandle->buf = static_cast<char *>(malloc(FTPLIB_BUFSIZ));
	if (mp_ftphandle->buf == NULL)
	{
		perror("calloc");
		free(mp_ftphandle);
	}
	#ifndef NOSSL
	mp_ftphandle->ctx = SSL_CTX_new(_FTPLIB_SSL_CLIENT_METHOD_());
	SSL_CTX_set_verify(mp_ftphandle->ctx, SSL_VERIFY_NONE, NULL);
	mp_ftphandle->ssl = SSL_new(mp_ftphandle->ctx);
	#endif
	ClearHandle();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %edi
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x4240
movq %rax, %r14
movq %rax, (%rbx)
testq %rax, %rax
je 0xe2a6
movl $0x400, %edi            # imm = 0x400
callq 0x4500
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0xe2b7
xorl %eax, %eax
movl %eax, 0x28(%r14)
movq %rax, 0x30(%r14)
movl $0x1, 0x38(%r14)
movq %rax, 0x58(%r14)
movq $0x3c, 0x40(%r14)
movq %rax, 0x1b0(%r14)
movl %eax, 0x10(%r14)
movb $0x0, 0x1b8(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%r14)
movups %xmm0, 0x60(%r14)
movups %xmm0, 0x70(%r14)
movq %rax, 0x80(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x53d7(%rip), %rdi      # 0x13684
callq 0x4310
movq (%rbx), %r14
jmp 0xe241
leaq 0x53c6(%rip), %rdi      # 0x13684
callq 0x4310
movq (%rbx), %rdi
callq 0x44a0
movq (%rbx), %r14
jmp 0xe254
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftplib.cc
// Function: ftplib::socket_wait(ftphandle*)
int ftplib::socket_wait(ftphandle *ctl)
{
	fd_set fd,*rfd = NULL,*wfd = NULL;
	struct timeval tv;
	int rv = 0;

	if (ctl->idlecb == NULL) return 1;

	/*if ((ctl->dir == FTPLIB_CONTROL)
		|| (ctl->idlecb == NULL)
		|| ((ctl->idletime.tv_sec == 0)
		&& //(ctl->idletime.tv_usec 0))
	return 1;*/

	if (ctl->dir == FTPLIB_WRITE) wfd = &fd;
	else rfd = &fd;

	FD_ZERO(&fd);
	do
	{
		FD_SET(ctl->handle,&fd);
		tv = ctl->idletime;
		rv = select(ctl->handle+1, rfd, wfd, NULL, &tv);
		if (rv == -1)
		{
			rv = 0;
			strncpy(ctl->ctrl->response, strerror(errno), sizeof(ctl->ctrl->response));
			break;
		}
		else if (rv > 0)
		{
			rv = 1;
			break;
		}
	} while ((rv = ctl->idlecb(ctl->cbarg)));

	return rv;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl $0x1, %ebx
cmpq $0x0, 0x58(%rsi)
je 0xe42e
movq %rsi, %r14
xorl %eax, %eax
cmpl $0x2, 0x28(%rsi)
leaq 0x10(%rsp), %r15
movq %r15, %r12
cmoveq %rax, %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%r15)
movaps %xmm0, 0x60(%r15)
movaps %xmm0, 0x50(%r15)
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
cmovneq %rax, %r15
leaq 0x40(%rsi), %rbp
movq %rsp, %r13
movl 0x10(%r14), %edi
leal 0x3f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %edi, %ecx
subl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
sarl $0x6, %eax
cltq
orq %rdx, 0x10(%rsp,%rax,8)
movups (%rbp), %xmm0
movaps %xmm0, (%rsp)
incl %edi
movq %r12, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
movq %r13, %r8
callq 0x4390
cmpl $-0x1, %eax
je 0xe407
testl %eax, %eax
jg 0xe42e
movq 0x68(%r14), %rdi
callq *0x58(%r14)
testl %eax, %eax
jne 0xe3af
jmp 0xe42c
movl $0x88, %ebx
addq 0x30(%r14), %rbx
callq 0x4050
movl (%rax), %edi
callq 0x4130
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movq %rax, %rsi
callq 0x41e0
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftplib.cc
// Function: ftplib::readresp(char, ftphandle*)
int ftplib::readresp(char c, ftphandle *nControl)
{
	char match[5];
	
	if (readline(nControl->response,256,nControl) == -1)
	{
	    std::cerr << "Control socket "<< nControl->handle << " read failed: " << nControl->response << std::endl;
		return 0;
	}
	
	if (nControl->response[3] == '-')
	{
		strncpy(match,nControl->response,3);
		match[3] = ' ';
		match[4] = '\0';
		do
		{
			if (readline(nControl->response,256,nControl) == -1)
			{
                std::cerr << "Control socket "<< nControl->handle << " read failed: " 
                          << nControl->response << ", " << match << std::endl;
				return 0;
			}
		} while (strncmp(nControl->response,match,4));
	}

    if (nControl->response[0] == c) 
        return 1;

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
leaq 0x88(%rdx), %rbx
movq %rbx, %rsi
movl $0x100, %edx            # imm = 0x100
movq %r14, %rcx
callq 0xe442
cmpl $-0x1, %eax
je 0xe7cc
cmpb $0x2d, 0x8b(%r14)
jne 0xe7bf
leaq 0xb(%rsp), %r12
movl $0x3, %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x41e0
movw $0x20, 0x3(%r12)
movq %r15, %rdi
movq %rbx, %rsi
movl $0x100, %edx            # imm = 0x100
movq %r14, %rcx
callq 0xe442
cmpl $-0x1, %eax
je 0xe80c
movl $0x4, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x41b0
testl %eax, %eax
jne 0xe793
xorl %eax, %eax
cmpb %bpl, (%rbx)
sete %al
jmp 0xe8b8
movq 0x981d(%rip), %r15      # 0x17ff0
leaq 0x4f4a(%rip), %rsi      # 0x13724
movl $0xf, %edx
movq %r15, %rdi
callq 0x4460
movl 0x10(%r14), %esi
movq %r15, %rdi
callq 0x46b0
movq %rax, %r14
leaq 0x4f37(%rip), %rsi      # 0x13734
movl $0xe, %edx
movq %rax, %rdi
callq 0x4460
jmp 0xe879
movq 0x97dd(%rip), %r15      # 0x17ff0
leaq 0x4f0a(%rip), %rsi      # 0x13724
movl $0xf, %edx
movq %r15, %rdi
callq 0x4460
movl 0x10(%r14), %esi
movq %r15, %rdi
callq 0x46b0
movq %rax, %r14
leaq 0x4ef7(%rip), %rsi      # 0x13734
movl $0xe, %edx
movq %rax, %rdi
callq 0x4460
movq %rbx, %rdi
callq 0x4180
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4460
leaq 0x4edc(%rip), %rsi      # 0x13743
movl $0x2, %edx
movq %r14, %rdi
callq 0x4460
leaq 0xb(%rsp), %rbx
movq %rbx, %rdi
callq 0x4180
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4460
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x43b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4260
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftplib.cc
// Function: ftplib::FtpSendCmd(char const*, char, ftphandle*)
int ftplib::FtpSendCmd(const char *cmd, char expresp, ftphandle *nControl)
{
	char buf[4096];
	int x;

	if (!nControl->handle)  {
        assert(0);
        return 0;
    }

	if (nControl->dir != FTPLIB_CONTROL) {
        assert(0);
        return 0;
    }

    if(gFtpDebug)
        printf("Thread:%-8ld  sock:%-4d  %s\n", syscall(SYS_gettid), nControl->handle, cmd);

    sprintf(buf,"%s\r\n",cmd);

#ifndef NOSSL
	if (nControl->tlsctrl) 
        x = SSL_write(nControl->ssl,buf,strlen(buf));
	else 
        x = net_write(nControl->handle,buf,strlen(buf));
#else
	x = net_write(nControl->handle,buf,strlen(buf));
#endif
	if (x <= 0) {
		perror("write");
		return 0;
	}

	if (mp_ftphandle->logcb != NULL) 
        mp_ftphandle->logcb(buf, mp_ftphandle->cbarg, false);
	
	int ret = readresp(expresp, nControl);

    if(gFtpDebug)
        printf("Thread:%-8ld  sock:%-4d  %s\n", syscall(SYS_gettid), nControl->handle, nControl->response);
    
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
cmpl $0x0, 0x10(%rcx)
je 0xeca9
movq %rcx, %rbx
cmpl $0x0, 0x28(%rcx)
jne 0xecc8
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r14
leaq 0x9909(%rip), %rax      # 0x184d0
cmpb $0x1, (%rax)
jne 0xebef
movl $0xba, %edi
xorl %eax, %eax
callq 0x4070
movl 0x10(%rbx), %edx
leaq 0x4bd4(%rip), %rdi      # 0x137b6
movq %rax, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0x4060
leaq 0x4bdd(%rip), %rsi      # 0x137d3
xorl %r15d, %r15d
movq %rsp, %r13
movq %r13, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x40a0
movl 0x10(%rbx), %r12d
movq %r13, %rdi
callq 0x4180
movl %r12d, %edi
movq %r13, %rsi
movq %rax, %rdx
callq 0x4140
testl %eax, %eax
jle 0xec9b
movq (%r14), %rcx
movq 0x60(%rcx), %rax
testq %rax, %rax
je 0xec3e
movq 0x68(%rcx), %rsi
movq %rsp, %rdi
xorl %edx, %edx
callq *%rax
movsbl %bpl, %esi
movq %r14, %rdi
movq %rbx, %rdx
callq 0xe73c
movl %eax, %r15d
leaq 0x9879(%rip), %rax      # 0x184d0
cmpb $0x1, (%rax)
jne 0xec86
movl $0xba, %edi
xorl %eax, %eax
callq 0x4070
movl 0x10(%rbx), %edx
addq $0x88, %rbx
leaq 0x4b3d(%rip), %rdi      # 0x137b6
movq %rax, %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4060
movl %r15d, %eax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4cff(%rip), %rdi      # 0x139a1
callq 0x4310
jmp 0xec86
leaq 0x4ac2(%rip), %rdi      # 0x13772
leaq 0x4abd(%rip), %rsi      # 0x13774
leaq 0x4ac0(%rip), %rcx      # 0x1377e
movl $0x209, %edx            # imm = 0x209
callq 0x4230
leaq 0x4aa3(%rip), %rdi      # 0x13772
leaq 0x4a9e(%rip), %rsi      # 0x13774
leaq 0x4aa1(%rip), %rcx      # 0x1377e
movl $0x20e, %edx            # imm = 0x20E
callq 0x4230
nop
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftplib.cc
// Function: ftplib::Login(char const*, char const*)
int ftplib::Login(const char *user, const char *pass)
{
	char tempbuf[64];

	if (((strlen(user) + 7) > sizeof(tempbuf)) || ((strlen(pass) + 7) > sizeof(tempbuf))) 
        return 0;
    
	sprintf(tempbuf, "USER %s", user);

    if (!FtpSendCmd(tempbuf,'3',mp_ftphandle)) 	{
		if (mp_ftphandle->ctrl != NULL) 
            return 1;
		if (*LastResponse() == '2') 
            return 1;
		return 0;
	}
	sprintf(tempbuf,"PASS %s",pass);
	return FtpSendCmd(tempbuf,'2',mp_ftphandle);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x4180
addq $-0x3a, %rax
xorl %ebp, %ebp
cmpq $-0x41, %rax
jb 0xed9f
movq %r14, %rdi
callq 0x4180
addq $-0x3a, %rax
cmpq $-0x41, %rax
jb 0xed9f
leaq 0x4aaa(%rip), %rsi      # 0x137d8
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x40a0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movl $0x33, %edx
callq 0xeb90
testl %eax, %eax
je 0xed83
leaq 0x4a84(%rip), %rsi      # 0x137e0
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x40a0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x32, %edx
callq 0xeb90
movl %eax, %ebp
jmp 0xed9f
movq (%rbx), %rax
movl $0x1, %ebp
cmpq $0x0, 0x30(%rax)
jne 0xed9f
xorl %ebp, %ebp
cmpb $0x32, 0x88(%rax)
sete %bpl
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftplib.cc
// Function: ftplib::FtpClose(ftphandle*)
int ftplib::FtpClose(ftphandle *nData)
{
	ftphandle *ctrl;

	if (nData->dir == FTPLIB_WRITE)
	{
		if (nData->buf != NULL) 
            writeline(NULL, 0, nData);
	}
	else if (nData->dir != FTPLIB_READ) 
        return 0;
	if (nData->buf) 
        free(nData->buf);
	shutdown(nData->handle,2);
	net_close(nData->handle);

	ctrl = nData->ctrl;
#ifndef NOSSL
	SSL_free(nData->ssl);
#endif
	free(nData);
	if (ctrl) 
        return readresp('2', ctrl);

    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl 0x28(%rsi), %ecx
decl %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
ja 0xfa33
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %rdi
testq %rdi, %rdi
je 0xf9f1
callq 0x44a0
movl 0x10(%r14), %edi
movl $0x2, %esi
callq 0x4510
movl 0x10(%r14), %edi
callq 0x4760
movq 0x30(%r14), %r15
movq %r14, %rdi
callq 0x44a0
testq %r15, %r15
je 0xfa2e
movq %rbx, %rdi
movl $0x32, %esi
movq %r15, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xe73c
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftplib.cc
// Function: ftplib::CorrectPasvResponse(unsigned char*)
int ftplib::CorrectPasvResponse(unsigned char *v)
{
	struct sockaddr ipholder;
	socklen_t ipholder_size = sizeof(ipholder);

	if (getpeername(mp_ftphandle->handle, &ipholder, &ipholder_size) == -1)
	{
		perror("getpeername");
		net_close(mp_ftphandle->handle);
		return 0;
	}
	
	for (int i = 2; i < 6; i++) v[i] = ipholder.sa_data[i];
	
	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x4(%rsp), %rdx
movl $0x10, (%rdx)
movq (%rdi), %rax
movl 0x10(%rax), %edi
leaq 0x8(%rsp), %rsi
callq 0x4280
cmpl $-0x1, %eax
je 0xfa7b
movl 0xc(%rsp), %eax
movl %eax, 0x2(%rbx)
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x4c8e
xorl %eax, %eax
jmp 0xfa73
nop
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftplib.cc
// Function: ftplib::FtpRead(void*, int, ftphandle*)
int ftplib::FtpRead(void *buf, int max, ftphandle *nData)
{
	int i;

	if (nData->dir != FTPLIB_READ)
	    return 0;
	if (nData->buf) 
        i = readline(static_cast<char*>(buf), max, nData);
	else
	{
		i = socket_wait(nData);
		if (i != 1) 
            return 0;
#ifndef NOSSL
		if (nData->tlsdata) 
            i = SSL_read(nData->ssl, buf, max);
		else 
            i = net_read(nData->handle,buf,max);
#else
		i = net_read(nData->handle,buf,max);
#endif
	}
	if (i == -1) 
        return 0;
	nData->xfered += i;
	if (nData->xfercb && nData->cbbytes)
	{
		nData->xfered1 += i;
		if (nData->xfered1 > nData->cbbytes)
		{
			if (nData->xfercb(nData->xfered, nData->cbarg) == 0) 
                return 0;
			nData->xfered1 = 0;
		}
	}
	return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpl $0x1, 0x28(%rcx)
jne 0xfb2b
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
cmpq $0x0, 0x20(%rcx)
je 0xfabc
movq %r15, %rsi
movl %ebp, %edx
movq %r14, %rcx
callq 0xe442
movl %eax, %r15d
jmp 0xfada
movq %r14, %rsi
callq 0xe344
testl %eax, %eax
je 0xfb2b
movl 0x10(%r14), %edi
movslq %ebp, %rdx
movq %r15, %rsi
callq 0x4540
movq %rax, %r15
cmpl $-0x1, %r15d
je 0xfb2b
movslq %r15d, %rcx
movq 0x70(%r14), %rdi
addq %rcx, %rdi
movq %rdi, 0x70(%r14)
movq 0x50(%r14), %rax
testq %rax, %rax
je 0xfb28
movq 0x78(%r14), %rdx
testq %rdx, %rdx
je 0xfb28
addq 0x80(%r14), %rcx
movq %rcx, 0x80(%r14)
cmpq %rdx, %rcx
jle 0xfb28
movq 0x68(%r14), %rsi
callq *%rax
testl %eax, %eax
je 0xfb2b
movq $0x0, 0x80(%r14)
movl %r15d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftplib.cc
// Function: ftplib::FtpWrite(void*, int, ftphandle*)
int ftplib::FtpWrite(void *buf, int len, ftphandle *nData)
{
	int i;

	if (nData->dir != FTPLIB_WRITE) 
        return 0;
	if (nData->buf) 
        i = writeline(static_cast<char*>(buf), len, nData);
	else
	{
		socket_wait(nData);
#ifndef NOSSL
		if (nData->tlsdata) 
            i = SSL_write(nData->ssl, buf, len);
		else 
            i = net_write(nData->handle, buf, len);
#else
		i = net_write(nData->handle, buf, len);
#endif
	}
	if (i == -1) 
        return 0;
	nData->xfered += i;

	if (nData->xfercb && nData->cbbytes) {
		nData->xfered1 += i;
		if (nData->xfered1 > nData->cbbytes) {
			if (nData->xfercb(nData->xfered, nData->cbarg) == 0) 
                return 0;
			nData->xfered1 = 0;
		}
	}
	return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpl $0x2, 0x28(%rcx)
jne 0xfbd7
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
cmpq $0x0, 0x20(%rcx)
je 0xfb6c
movq %r15, %rsi
movl %ebp, %edx
movq %r14, %rcx
callq 0xe5ec
movl %eax, %r15d
jmp 0xfb86
movq %r14, %rsi
callq 0xe344
movl 0x10(%r14), %edi
movslq %ebp, %rdx
movq %r15, %rsi
callq 0x4140
movq %rax, %r15
cmpl $-0x1, %r15d
je 0xfbd7
movslq %r15d, %rcx
movq 0x70(%r14), %rdi
addq %rcx, %rdi
movq %rdi, 0x70(%r14)
movq 0x50(%r14), %rax
testq %rax, %rax
je 0xfbd4
movq 0x78(%r14), %rdx
testq %rdx, %rdx
je 0xfbd4
addq 0x80(%r14), %rcx
movq %rcx, 0x80(%r14)
cmpq %rdx, %rcx
jle 0xfbd4
movq 0x68(%r14), %rsi
callq *%rax
testl %eax, %eax
je 0xfbd7
movq $0x0, 0x80(%r14)
movl %r15d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftplib.cc
// Function: ftplib::SysType(char*, int)
int ftplib::SysType(char *buf, int max)
{
	int l = max;
	char *b = buf;
	char *s;
	if (!FtpSendCmd("SYST",'2',mp_ftphandle)) 
        return 0;
	s = &mp_ftphandle->response[4];
	while ((--l) && (*s != ' ')) 
        *b++ = *s++;
	*b++ = '\0';
	return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rcx
leaq 0x3cb3(%rip), %rsi      # 0x1394f
movl $0x32, %edx
callq 0xeb90
testl %eax, %eax
je 0xfcdb
decl %ebp
je 0xfcd1
movq (%r14), %rcx
movl %ebp, %edx
xorl %eax, %eax
movb 0x8c(%rcx,%rax), %sil
cmpb $0x20, %sil
je 0xfcce
movb %sil, (%rbx,%rax)
incq %rax
cmpl %eax, %edx
jne 0xfcb5
addq %rax, %rbx
movb $0x0, (%rbx)
movl $0x1, %eax
jmp 0xfcdd
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftplib.cc
// Function: ftplib::Pwd(char*, int)
int ftplib::Pwd(char *path, int max)
{
	int l = max;
	char *b = path;
	char *s;

 	if (!FtpSendCmd("PWD",'2',mp_ftphandle)) 
        return 0;
	s = strchr(mp_ftphandle->response, '"');
	if (s == NULL) 
        return 0;
   s++;
	while ((--l) && (*s) && (*s != '"'))
        *b++ = *s++;
	*b = '\0';
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %rcx
leaq 0x3b2d(%rip), %rsi      # 0x1396e
movl $0x32, %edx
callq 0xeb90
xorl %r14d, %r14d
testl %eax, %eax
je 0xfe96
movl $0x88, %edi
addq (%r15), %rdi
movl $0x22, %esi
callq 0x4160
testq %rax, %rax
je 0xfe96
decl %ebp
je 0xfe8d
movl %ebp, %edx
xorl %ecx, %ecx
movzbl 0x1(%rax,%rcx), %esi
testl %esi, %esi
je 0xfe8a
cmpl $0x22, %esi
je 0xfe8a
movb %sil, (%rbx,%rcx)
incq %rcx
cmpl %ecx, %edx
jne 0xfe71
addq %rcx, %rbx
movb $0x0, (%rbx)
movl $0x1, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq