LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/AndreyVV-100[P]GachiLang/TreeBase/Stack.cpp
// Function: StackResizeDown(Stack*)
void StackResizeDown (Stack* stk)
{
	ASSERT_OK

	stk_type* buf = stk->buffer - 1;

	if (!buf)
	{
		stk->status_error = DO_MEM_ERR;
		StackLog (stk);
		return;
	}

	*(buf + stk->capacity + 1) = STK_POISON;

	if (stk->capacity >= STK_RESIZE * stk->size && 
		stk->capacity >= STK_RESIZE * stk->min_capacity)
			buf = (stk_type*) realloc (buf, 
									  sizeof (stk_type) * (stk->capacity / STK_RESIZE + 2));

	stk->capacity /= STK_RESIZE;
	*((storm*) (buf + stk->capacity + 1)) = STORMY_PETREL;
	stk->buffer = buf + 1;

	RecountHash (stk);

	ASSERT_OK

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3f99
testl %eax, %eax
jne 0x42d9
movq 0x8(%rbx), %rcx
movq 0x18(%rbx), %rdx
leaq -0x30(%rcx), %rax
leaq (%rdx,%rdx,2), %rdx
shlq $0x4, %rdx
xorps %xmm0, %xmm0
movups %xmm0, 0x19(%rcx,%rdx)
movups %xmm0, 0x10(%rcx,%rdx)
movups %xmm0, (%rcx,%rdx)
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rcx
addq %rdx, %rdx
cmpq %rdx, %rcx
jb 0x429b
movq 0x20(%rbx), %rdx
addq %rdx, %rdx
cmpq %rdx, %rcx
jb 0x429b
shrq %rcx
leaq (%rcx,%rcx,2), %rsi
shlq $0x4, %rsi
addq $0x60, %rsi
movq %rax, %rdi
callq 0x1190
movq 0x18(%rbx), %rcx
shrq %rcx
movq %rcx, 0x18(%rbx)
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movabsq $-0x452212e21844f85f, %rdx # imm = 0xBADDED1DE7BB07A1
movq %rdx, 0x30(%rax,%rcx)
addq $0x30, %rax
movq %rax, 0x8(%rbx)
movq %rbx, %rdi
callq 0x3e68
movq %rbx, %rdi
callq 0x3f99
testl %eax, %eax
je 0x42e7
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3bdb
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/AndreyVV-100[P]GachiLang/TreeBase/Stack.cpp
// Function: StackResizeUp(Stack*)
void StackResizeUp (Stack* stk)
{
	ASSERT_OK

	stk_type* buf = stk->buffer - 1;

	buf = (stk_type*) realloc (buf, sizeof (stk_type) * (stk->capacity * STK_RESIZE + 2));

	if (!buf)
	{
		stk->status_error = DO_MEM_ERR;
		StackLog (stk);
		return;
	}

	(stk->capacity) *= STK_RESIZE;

	*((storm*)  buf)					  = STORMY_PETREL;
	*((storm*) (buf + stk->capacity + 1)) = STORMY_PETREL;

	StackPoison (buf + stk->size + 1, stk->capacity - stk->size);

	stk->buffer = buf + 1;

	RecountHash (stk);

	ASSERT_OK

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x3f99
testl %eax, %eax
je 0x4315
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3bdb
movq 0x8(%rbx), %rdi
movq 0x18(%rbx), %rax
addq $-0x30, %rdi
leaq (%rax,%rax,2), %rsi
shlq $0x5, %rsi
addq $0x60, %rsi
callq 0x1190
testq %rax, %rax
je 0x43d0
movq %rax, %r14
movq 0x18(%rbx), %rax
leaq (%rax,%rax), %rcx
movq %rcx, 0x18(%rbx)
movabsq $-0x452212e21844f85f, %rdx # imm = 0xBADDED1DE7BB07A1
movq %rdx, (%r14)
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
movq %rdx, 0x30(%r14,%rax)
movq 0x10(%rbx), %rax
movq %rax, %r15
subq %rcx, %r15
je 0x43a7
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
leaq (%rax,%r14), %r12
addq $0x48, %r12
movq (%r12), %rdi
callq 0x1120
xorps %xmm0, %xmm0
movups %xmm0, 0x1(%r12)
movups %xmm0, -0x8(%r12)
movups %xmm0, -0x18(%r12)
addq $0x30, %r12
incq %r15
jne 0x4380
addq $0x30, %r14
movq %r14, 0x8(%rbx)
movq %rbx, %rdi
callq 0x3e68
movq %rbx, %rdi
callq 0x3f99
testl %eax, %eax
jne 0x4305
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0xb, 0x28(%rbx)
jmp 0x4305
// File: /workspace/github_cpp_makefile_star2_O1/AndreyVV-100[P]GachiLang/TreeBase/Stack.cpp
// Function: CountHash(char*, unsigned long)
unsigned long long CountHash (char* buffer, size_t num)
{
	const int shift = 5;
	unsigned long long ans = 0;
	char buf = 0;
	
	for (size_t count = 0; count < num; count++)
	{
		ans += buffer[count];
		buf = ans >> (sizeof (unsigned long long) - shift);
		ans = (ans << shift) + buf;
	}

	return ans;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rsi, %rsi
je 0x440c
xorl %ecx, %ecx
xorl %eax, %eax
movsbq (%rdi,%rcx), %rdx
addq %rax, %rdx
movq %rdx, %r8
shlq $0x5, %r8
shrl $0x3, %edx
movsbq %dl, %rax
addq %r8, %rax
incq %rcx
cmpq %rcx, %rsi
jne 0x43e9
jmp 0x440e
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/MiWitt[P]HLAbaits/main.cpp
// Function: Tokenize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
vector<string> Tokenize(const string& str, const string& delimiters = "\t")
{
    vector<string> tokens;
    // Skip delimiters at beginning.
    string::size_type lastPos = str.find_first_not_of(delimiters, 0);
    // Find first "non-delimiter".
    string::size_type pos     = str.find_first_of(delimiters, lastPos);

    while (string::npos != pos || string::npos != lastPos)
    {
        // Found a token, add it to the vector.
        tokens.push_back(str.substr(lastPos, pos - lastPos));
        // Skip delimiters.  Note the "not_of"
        if(str.length() > pos && delimiters.find(str[pos]) != string::npos )
            lastPos=pos+1;
        else
            lastPos = str.find_first_not_of(delimiters, pos);
        // Find next "non-delimiter"
        pos = str.find_first_of(delimiters, lastPos);
    }
    return tokens;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rdx), %rsi
movq 0x8(%rdx), %rcx
movq %r15, %rdi
xorl %edx, %edx
callq 0x33e0
movq %rax, %rbp
movq (%r14), %rsi
movq 0x8(%r14), %rcx
movq %r15, %rdi
movq %rax, %rdx
callq 0x3360
movq %rax, %r13
andq %rbp, %rax
cmpq $-0x1, %rax
je 0x3704
leaq 0x8(%rsp), %r12
movq %r13, %rcx
subq %rbp, %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x3260
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5dba
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x36a7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3240
cmpq %r13, 0x8(%r15)
jbe 0x36cd
movq (%r15), %rax
movsbl (%rax,%r13), %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x32e0
cmpq $-0x1, %rax
je 0x36cd
incq %r13
movq %r13, %rbp
jmp 0x36e2
movq (%r14), %rsi
movq 0x8(%r14), %rcx
movq %r15, %rdi
movq %r13, %rdx
callq 0x33e0
movq %rax, %rbp
movq (%r14), %rsi
movq 0x8(%r14), %rcx
movq %r15, %rdi
movq %rbp, %rdx
callq 0x3360
movq %rax, %r13
andq %rbp, %rax
cmpq $-0x1, %rax
jne 0x366c
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x373a
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x373a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3240
movq %rbx, %rdi
callq 0x5a6c
movq %r14, %rdi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O1/MiWitt[P]HLAbaits/main.cpp
// Function: cmd_exec(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string cmd_exec(const string& cmd)
{
    FILE* pipe = popen(cmd.c_str(), "r");
    if (!pipe)
        throw("ERROR from popen()");

    char buffer[128];
    ostringstream result("");

    while(!feof(pipe))
    {
        if(fgets(buffer, 128, pipe) != NULL)
           result << buffer;
    }
    pclose(pipe);

    return result.str();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdi, %rbx
movq (%rsi), %rdi
leaq 0x489f(%rip), %rsi      # 0x8004
callq 0x30d0
testq %rax, %rax
je 0x3853
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x48a0(%rip), %rdx      # 0x8026
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x5d2a
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x10, %edx
callq 0x32f0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x37be
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3240
movq %r14, %rdi
callq 0x3390
testl %eax, %eax
jne 0x380e
leaq 0x1a0(%rsp), %r15
leaq 0x28(%rsp), %r12
movq %r15, %rdi
movl $0x80, %esi
movq %r14, %rdx
callq 0x33b0
testq %rax, %rax
je 0x3802
movq %r15, %rdi
callq 0x3120
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3290
movq %r14, %rdi
callq 0x3390
testl %eax, %eax
je 0x37d7
movq %r14, %rdi
callq 0x3300
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x33c0
movq 0x7796(%rip), %rsi      # 0xafc0
leaq 0x28(%rsp), %rdi
callq 0x3160
leaq 0x98(%rsp), %rdi
callq 0x30f0
movq %rbx, %rax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x8, %edi
callq 0x3140
leaq 0x47a2(%rip), %rcx      # 0x8006
movq %rcx, (%rax)
movq 0x773a(%rip), %rsi      # 0xafa8
movq %rax, %rdi
xorl %edx, %edx
callq 0x33f0
jmp 0x389b
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x38bc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3240
jmp 0x38bc
movq %rax, %rbx
jmp 0x38bc
movq %rax, %rbx
movq 0x771b(%rip), %rsi      # 0xafc0
leaq 0x28(%rsp), %rdi
callq 0x3160
leaq 0x98(%rsp), %rdi
callq 0x30f0
movq %rbx, %rdi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O1/MiWitt[P]HLAbaits/main.cpp
// Function: getUnmappedRegions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
vector<pair<int,int> >  getUnmappedRegions(const string& matches)
{
    vector<pair<int,int> >  vctRet;
    size_t starter = matches.find_first_of("0",0);

    while(starter != string::npos)
    {
        int i = starter;
        int counter =0;
        for(; i < matches.size() && matches[i] == '0';i++)
            counter++;
        if(counter >= MIN_NEW_BAIT_SIZE)
            vctRet.push_back(pair<int,int>((int)starter,(int)starter+counter-1));
        starter = matches.find_first_of("0",i);
    }
    return vctRet;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x446a(%rip), %rsi      # 0x8039
movl $0x1, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x3360
cmpq $-0x1, %rax
je 0x3c49
leaq 0x8(%rsp), %r15
leaq 0x4449(%rip), %r12      # 0x8039
movq 0x8(%r14), %rdx
movslq %eax, %r13
xorl %ecx, %ecx
cmpq %r13, %rdx
jbe 0x3c14
movq (%r14), %rsi
xorl %ecx, %ecx
cmpb $0x30, (%rsi,%r13)
jne 0x3c14
incl %ecx
incq %r13
cmpq %r13, %rdx
ja 0x3c03
cmpl $0x1e, %ecx
jb 0x3c30
addl %eax, %ecx
decl %ecx
movl %eax, 0x8(%rsp)
movl %ecx, 0xc(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6022
movl $0x1, %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3360
cmpq $-0x1, %rax
jne 0x3bf0
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3c71
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x3240
movq %r14, %rdi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O1/MiWitt[P]HLAbaits/CMultiFasta.cpp
// Function: CMultiFasta::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string CMultiFasta::operator[](const string& val)
{
    map<string,string>::iterator iter = m_mapSequences.find(val);
    if(m_mapSequences.end() == iter)
        return "";
    return iter->second;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsi), %rdi
movq %rdx, %rsi
callq 0x718c
addq $0x10, %r14
cmpq %rax, %r14
je 0x70e3
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x5c9a
jmp 0x70fc
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xf35(%rip), %rdx       # 0x8026
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x5d2a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/CastellanZhang[P]lambdaFM/src/Frame/pc_frame.cpp
// Function: pc_frame::init(pc_task&, int, int, int)
bool pc_frame::init(pc_task& task, int t_num, int buf_size, int log_num)
{
    pTask = &task;
    threadNum = t_num;
    bufSize = buf_size;
    logNum = log_num;
    sem_init(&semPro, 0, 1);
    sem_init(&semCon, 0, 0);
    threadVec.clear();
    threadVec.push_back(thread(&pc_frame::proThread, this));
    for(int i = 0; i < threadNum; ++i)
    {
        threadVec.push_back(thread(&pc_frame::conThread, this));
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq %rsi, 0x8(%rdi)
movl %edx, (%rdi)
movl %ecx, 0xe0(%rdi)
movl %r8d, 0xe4(%rdi)
addq $0x38, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x3230
leaq 0x58(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3230
movq 0xc8(%rbx), %rax
movq 0xd0(%rbx), %rcx
cmpq %rax, %rcx
je 0x62c9
movq %rax, %rdx
cmpq $0x0, (%rdx)
jne 0x6389
addq $0x8, %rdx
cmpq %rcx, %rdx
jne 0x62af
movq %rax, 0xd0(%rbx)
leaq 0xc8(%rbx), %r14
leaq 0xb7(%rip), %rax        # 0x638e
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq $0x0, 0x8(%rsi)
leaq 0x10(%rsp), %rdx
movq %rbx, (%rdx)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x685e
movq %r14, %rdi
movq %r15, %rsi
callq 0x727a
cmpq $0x0, 0x8(%rsp)
jne 0x6389
cmpl $0x0, (%rbx)
jle 0x6366
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
leaq 0x18(%rsp), %r12
leaq 0x10(%rsp), %r13
leaq 0x38c(%rip), %rax       # 0x66b8
movq %rax, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movq %rbx, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x685e
movq %r14, %rdi
movq %r15, %rsi
callq 0x727a
cmpq $0x0, 0x8(%rsp)
jne 0x6389
incl %ebp
cmpl (%rbx), %ebp
jl 0x6325
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6379
cmpq $0x0, 0x8(%rsp)
jne 0x6389
movq %rax, %rdi
callq 0x3440
callq 0x3090
// File: /workspace/github_cpp_makefile_star2_O1/CastellanZhang[P]lambdaFM/./src/FTRL/ftrl_model.h
// Function: ftrl_model::getOrInitModelUnit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
ftrl_model_unit* ftrl_model::getOrInitModelUnit(string index)
{
    unordered_map<string, ftrl_model_unit*>::iterator iter = muMap.find(index);
    if(iter == muMap.end())
    {
        mtx.lock();
        ftrl_model_unit* pMU = new ftrl_model_unit(factor_num, init_mean, init_stdev);
        muMap.insert(make_pair(index, pMU));
        mtx.unlock();
        return pMU;
    }
    else
    {
        return iter->second;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r12
movq %rdi, %r15
callq 0x5a6c
testq %rax, %rax
je 0x3841
movq 0x28(%rax), %r14
jmp 0x38bf
leaq 0x50(%r15), %rbx
movq %rbx, %rdi
callq 0x3370
testl %eax, %eax
jne 0x38d0
movl $0x88, %edi
callq 0x3290
movq %rax, %r14
movl 0x38(%r15), %esi
movsd 0x48(%r15), %xmm0
movsd 0x40(%r15), %xmm1
movq %rax, %rdi
callq 0x4c58
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x5432
movq %r14, 0x20(%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0x5b84
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x38b7
callq 0x3260
movq %rbx, %rdi
callq 0x31d0
movq %r14, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl %eax, %edi
callq 0x3190
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
jne 0x38ec
jmp 0x38f1
movq %rax, %rbx
movq %r14, %rdi
callq 0x3260
movq %rbx, %rdi
callq 0x3440
nop
// File: /workspace/github_cpp_makefile_star2_O1/CastellanZhang[P]lambdaFM/./src/FTRL/ftrl_model.h
// Function: ftrl_model::predict(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ftrl_model_unit*, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ftrl_model_unit*>>>&, std::vector<double, std::allocator<double>>&)
double ftrl_model::predict(unordered_map<string, double>& x, unordered_map<string, ftrl_model_unit*>& theta, vector<double>& sum)
{
    double result = 0;
    for(unordered_map<string, double>::iterator iter = x.begin(); iter != x.end(); ++iter)
    {
        const string& index = iter->first;
        result += theta[index]->wi * iter->second;
    }
    double sum_sqr, d;
    for(int f = 0; f < factor_num; ++f)
    {
        sum[f] = sum_sqr = 0.0;
        for(unordered_map<string, double>::iterator iter = x.begin(); iter != x.end(); ++iter)
        {
            const string& index = iter->first;
            d = theta[index]->vi[f] * iter->second;
            sum[f] += d;
            sum_sqr += d * d;
        }
        result += 0.5 * (sum[f] * sum[f] - sum_sqr);
    }
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x10(%rsi), %r13
xorpd %xmm0, %xmm0
testq %r13, %r13
je 0x395c
movsd %xmm0, 0x8(%rsp)
leaq 0x8(%r13), %rsi
movq %r14, %rdi
callq 0x5eb4
movq (%rax), %rax
movsd (%rax), %xmm0
mulsd 0x28(%r13), %xmm0
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
movq (%r13), %r13
jmp 0x391c
cmpl $0x0, 0x38(%r12)
jle 0x3a0f
xorl %r13d, %r13d
movq (%rbx), %rax
movq $0x0, (%rax,%r13,8)
movq 0x10(%r15), %rbp
testq %rbp, %rbp
movsd %xmm0, 0x8(%rsp)
xorpd %xmm1, %xmm1
je 0x39d7
movsd %xmm1, 0x10(%rsp)
leaq 0x8(%rbp), %rsi
movq %r14, %rdi
callq 0x5eb4
movq (%rax), %rax
movq 0x18(%rax), %rax
movsd (%rax,%r13,8), %xmm0
mulsd 0x28(%rbp), %xmm0
movq (%rbx), %rax
movsd (%rax,%r13,8), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rax,%r13,8)
movsd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm0
addsd %xmm0, %xmm1
movq (%rbp), %rbp
testq %rbp, %rbp
jne 0x3989
movq (%rbx), %rax
movsd (%rax,%r13,8), %xmm0
mulsd %xmm0, %xmm0
subsd %xmm1, %xmm0
mulsd 0x5618(%rip), %xmm0     # 0x9008
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
incq %r13
movslq 0x38(%r12), %rax
cmpq %rax, %r13
jl 0x396b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/CastellanZhang[P]lambdaFM/./src/FTRL/ftrl_model.h
// Function: ftrl_model::getScore(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ftrl_model_unit*, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ftrl_model_unit*>>>&)
double ftrl_model::getScore(unordered_map<string, double>& x, unordered_map<string, ftrl_model_unit*>& theta)
{
    double result = 0;
    for(unordered_map<string, double>::iterator iter = x.begin(); iter != x.end(); ++iter)
    {
        const string& index = iter->first;
        result += get_wi(theta, index) * iter->second;
    }
    double sum, sum_sqr, d;
    for(int f = 0; f < factor_num; ++f)
    {
        sum = sum_sqr = 0.0;
        for(unordered_map<string, double>::iterator iter = x.begin(); iter != x.end(); ++iter)
        {
            const string& index = iter->first;
            d = get_vif(theta, index, f) * iter->second;
            sum += d;
            sum_sqr += d * d;
        }
        result += 0.5 * (sum * sum - sum_sqr);
    }
    //return 1.0/(1.0 + exp(-result));
    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x10(%rsi), %r12
xorpd %xmm0, %xmm0
testq %r12, %r12
je 0x3a80
movsd %xmm0, 0x8(%rsp)
leaq 0x8(%r12), %rsi
movq %rbx, %rdi
callq 0x5a6c
xorpd %xmm0, %xmm0
testq %rax, %rax
je 0x3a65
movq 0x28(%rax), %rax
movsd (%rax), %xmm0
mulsd 0x28(%r12), %xmm0
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movq (%r12), %r12
jmp 0x3a3c
cmpl $0x0, 0x38(%r15)
jle 0x3b33
xorl %r12d, %r12d
movsd %xmm0, 0x8(%rsp)
movq 0x10(%r14), %r13
testq %r13, %r13
je 0x3b01
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x18(%rsp)
leaq 0x8(%r13), %rsi
movq %rbx, %rdi
callq 0x5a6c
xorpd %xmm0, %xmm0
testq %rax, %rax
je 0x3ad4
movq 0x28(%rax), %rax
movq 0x18(%rax), %rax
movsd (%rax,%r12,8), %xmm0
mulsd 0x28(%r13), %xmm0
movsd 0x18(%rsp), %xmm1
addsd %xmm0, %xmm1
mulsd %xmm0, %xmm0
movsd 0x10(%rsp), %xmm2
addsd %xmm0, %xmm2
movapd %xmm2, %xmm0
movq (%r13), %r13
testq %r13, %r13
jne 0x3aa5
jmp 0x3b09
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
mulsd %xmm1, %xmm1
subsd %xmm0, %xmm1
mulsd 0x54ef(%rip), %xmm1     # 0x9008
movsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
incq %r12
movslq 0x38(%r15), %rax
cmpq %rax, %r12
jl 0x3a8e
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/CastellanZhang[P]lambdaFM/./src/FTRL/ftrl_model.h
// Function: ftrl_model::get_wi(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ftrl_model_unit*, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ftrl_model_unit*>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
double ftrl_model::get_wi(unordered_map<string, ftrl_model_unit*>& theta, const string& index)
{
    unordered_map<string, ftrl_model_unit*>::iterator iter = theta.find(index);
    if(iter == theta.end())
    {
        return 0.0;
    }
    else
    {
        return iter->second->wi;
    }
}

// Assembly:
pushq %rax
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x5a6c
testq %rax, %rax
je 0x3b5d
movq 0x28(%rax), %rax
movsd (%rax), %xmm0
jmp 0x3b60
xorps %xmm0, %xmm0
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/CastellanZhang[P]lambdaFM/./src/FTRL/ftrl_model.h
// Function: ftrl_model::get_vif(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ftrl_model_unit*, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ftrl_model_unit*>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
double ftrl_model::get_vif(unordered_map<string, ftrl_model_unit*>& theta, const string& index, int f)
{
    unordered_map<string, ftrl_model_unit*>::iterator iter = theta.find(index);
    if(iter == theta.end())
    {
        return 0.0;
    }
    else
    {
        return iter->second->vi[f];
    }
}

// Assembly:
pushq %rbx
movl %ecx, %ebx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x5a6c
testq %rax, %rax
je 0x3b87
movq 0x28(%rax), %rax
movslq %ebx, %rcx
movq 0x18(%rax), %rax
movsd (%rax,%rcx,8), %xmm0
jmp 0x3b8a
xorps %xmm0, %xmm0
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/CastellanZhang[P]lambdaFM/./src/FTRL/ftrl_model.h
// Function: ftrl_model::loadModel(std::basic_ifstream<char, std::char_traits<char>>&)
bool ftrl_model::loadModel(ifstream& in)
{
    string line;
    vector<string> strVec;
    while(getline(in, line))
    {
        strVec.clear();
        utils::splitString(line, ' ', &strVec);
        if(strVec.size() != 3 * factor_num + 4)
        {
            return false;
        }
        string& index = strVec[0];
        ftrl_model_unit* pMU = new ftrl_model_unit(factor_num, strVec);
        muMap[index] = pMU;
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, 0x8(%rsp)
leaq 0x38(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb $0x0, (%rcx)
leaq 0x10(%rsp), %r14
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %edx
movq %rbx, %rdi
leaq 0x28(%rsp), %rsi
callq 0x3470
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x20(%rax,%rcx), %ebp
testb $0x5, %bpl
jne 0x3db3
movq 0x10(%rsp), %r12
movq 0x18(%rsp), %r13
cmpq %r12, %r13
je 0x3d4a
movq %r12, %r15
movq (%r15), %rdi
addq $0x10, %r15
cmpq %r15, %rdi
je 0x3d3c
callq 0x3260
addq $0x10, %r15
cmpq %r13, %r15
jne 0x3d2b
movq %r12, 0x18(%rsp)
leaq 0x28(%rsp), %rdi
movl $0x20, %esi
movq %r14, %rdx
callq 0x7fb4
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %rax
subq %r13, %rax
sarq $0x5, %rax
movq 0x8(%rsp), %rcx
movslq 0x38(%rcx), %r15
leaq (%r15,%r15,2), %rcx
addq $0x4, %rcx
cmpq %rcx, %rax
jne 0x3db3
movl $0x88, %edi
callq 0x3290
movq %rax, %rbp
movq %rax, %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x4e78
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x5eb4
movq %rbp, (%rax)
jmp 0x3ce0
leaq 0x10(%rsp), %rdi
callq 0x5224
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3dd1
callq 0x3260
testb $0x5, %bpl
setne %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rbp, %rdi
callq 0x3260
jmp 0x3df9
jmp 0x3df6
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5224
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3e17
callq 0x3260
movq %rbx, %rdi
callq 0x3440
nop
// File: /workspace/github_cpp_makefile_star2_O1/CastellanZhang[P]lambdaFM/./src/FTRL/ftrl_predictor.h
// Function: ftrl_predictor::ftrl_predictor(double, std::basic_ifstream<char, std::char_traits<char>>&, std::basic_ofstream<char, std::char_traits<char>>&)
ftrl_predictor::ftrl_predictor(double _factor_num, ifstream& _fModel, ofstream& _fPredict):fPredict(_fPredict)
{
    pModel = new ftrl_model(_factor_num);
    if(!pModel->loadModel(_fModel))
    {
        cout << "load model error!" << endl;
        exit(-1);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movsd %xmm0, 0x8(%rsp)
movq %rdi, %r14
leaq 0x8ed4(%rip), %rax      # 0xcd10
movq %rax, (%rdi)
movq %rdx, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
xorl %r15d, %r15d
movq %r15, 0x38(%rdi)
movl $0x78, %edi
callq 0x3290
leaq 0x30(%rax), %rcx
movq %rcx, (%rax)
movq $0x1, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movl $0x3f800000, 0x20(%rax) # imm = 0x3F800000
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x60(%rax)
cvttsd2si 0x8(%rsp), %ecx
movq %r15, 0x70(%rax)
movl %ecx, 0x38(%rax)
movups %xmm0, 0x40(%rax)
movq %rax, 0x8(%r14)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3ca8
testb %al, %al
je 0x3eb6
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x9103(%rip), %rdi      # 0xcfc0
leaq 0x515e(%rip), %rsi      # 0x9022
callq 0x3280
movq %rax, %rdi
callq 0x3120
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3300
nop
// File: /workspace/github_cpp_makefile_star2_O1/CastellanZhang[P]lambdaFM/lambdafm_predict.cpp
// Function: argv_to_args[abi:cxx11](int, char**)
vector<string> argv_to_args(int argc, char* argv[])
{
    vector<string> args;
    for(int i = 1; i < argc; ++i)
    {
        args.push_back(string(argv[i]));
    }
    return args;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
cmpl $0x2, %esi
jl 0x4507
movq %rdx, %r14
movl %esi, %ebp
movl $0x1, %r13d
leaq 0x8(%rsp), %r15
leaq 0x7(%rsp), %r12
movq (%r14,%r13,8), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x30e0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5ff6
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x44ff
callq 0x3260
incq %r13
cmpq %r13, %rbp
jne 0x44d1
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x4535
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4535
callq 0x3260
movq %rbx, %rdi
callq 0x5224
movq %r14, %rdi
callq 0x3440
// File: /workspace/github_cpp_makefile_star2_O1/CastellanZhang[P]lambdaFM/./src/FTRL/ftrl_model.h
// Function: ftrl_model_unit::ftrl_model_unit(int, double, double)
ftrl_model_unit(int factor_num, double v_mean, double v_stdev)
    {
        wi = 0.0;
        w_ni = 0.0;
        w_zi = 0.0;
        vi.resize(factor_num);
        v_ni.resize(factor_num);
        v_zi.resize(factor_num);
        for(int f = 0; f < factor_num; ++f)
        {
            vi[f] = utils::gaussian(v_mean, v_stdev);
            v_ni[f] = 0.0;
            v_zi[f] = 0.0;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movl %esi, %ebp
leaq 0x18(%rdi), %rbx
leaq 0x30(%rdi), %r14
leaq 0x48(%rdi), %r15
movslq %esi, %r12
movl $0x88, %edx
xorl %esi, %esi
callq 0x3160
movq %rbx, %rdi
movq %r12, %rsi
callq 0x529e
movq %r14, %rdi
movq %r12, %rsi
callq 0x529e
movq %r15, %rdi
movq %r12, %rsi
callq 0x529e
testl %ebp, %ebp
jle 0x4ceb
movl %ebp, %r12d
xorl %r13d, %r13d
xorl %ebp, %ebp
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
callq 0x81dc
movq (%rbx), %rax
movsd %xmm0, (%rax,%rbp,8)
movq (%r14), %rax
movq %r13, (%rax,%rbp,8)
movq (%r15), %rax
movq %r13, (%rax,%rbp,8)
incq %rbp
cmpq %rbp, %r12
jne 0x4cbc
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4cfc
movq %rax, %r12
movq (%r15), %rdi
testq %rdi, %rdi
je 0x4d0c
callq 0x3260
movq (%r14), %rdi
testq %rdi, %rdi
je 0x4d19
callq 0x3260
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4d26
callq 0x3260
movq %r12, %rdi
callq 0x3440
// File: /workspace/github_cpp_makefile_star2_O1/CastellanZhang[P]lambdaFM/./src/FTRL/ftrl_model.h
// Function: operator<<(std::ostream&, ftrl_model_unit const&)
inline ostream& operator <<(ostream& os, const ftrl_model_unit& mu)
    {
        os << mu.wi;
        for(int f = 0; f < mu.vi.size(); ++f)
        {
            os << " " << mu.vi[f];
        }
        os << " " << mu.w_ni << " " << mu.w_zi;
        for(int f = 0; f < mu.v_ni.size(); ++f)
        {
            os << " " << mu.v_ni[f];
        }
        for(int f = 0; f < mu.v_zi.size(); ++f)
        {
            os << " " << mu.v_zi[f];
        }
        return os;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movsd (%rsi), %xmm0
callq 0x33c0
movq 0x20(%r14), %rax
cmpq 0x18(%r14), %rax
je 0x4d8f
xorl %r12d, %r12d
leaq 0x42c7(%rip), %r15      # 0x9020
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x32e0
movq 0x18(%r14), %rax
movsd (%rax,%r12,8), %xmm0
movq %rbx, %rdi
callq 0x33c0
incq %r12
movq 0x20(%r14), %rax
subq 0x18(%r14), %rax
sarq $0x3, %rax
cmpq %r12, %rax
ja 0x4d59
leaq 0x428a(%rip), %r15      # 0x9020
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x32e0
movsd 0x8(%r14), %xmm0
movq %rbx, %rdi
callq 0x33c0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x32e0
movsd 0x10(%r14), %xmm0
movq %r12, %rdi
callq 0x33c0
movq 0x38(%r14), %rax
cmpq 0x30(%r14), %rax
je 0x4e1f
xorl %r12d, %r12d
leaq 0x4237(%rip), %r15      # 0x9020
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x32e0
movq 0x30(%r14), %rax
movsd (%rax,%r12,8), %xmm0
movq %rbx, %rdi
callq 0x33c0
incq %r12
movq 0x38(%r14), %rax
subq 0x30(%r14), %rax
sarq $0x3, %rax
cmpq %r12, %rax
ja 0x4de9
movq 0x50(%r14), %rax
cmpq 0x48(%r14), %rax
je 0x4e69
xorl %r12d, %r12d
leaq 0x41ed(%rip), %r15      # 0x9020
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x32e0
movq 0x48(%r14), %rax
movsd (%rax,%r12,8), %xmm0
movq %rbx, %rdi
callq 0x33c0
incq %r12
movq 0x50(%r14), %rax
subq 0x48(%r14), %rax
sarq $0x3, %rax
cmpq %r12, %rax
ja 0x4e33
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/CastellanZhang[P]lambdaFM/src/Frame/pc_frame.cpp
// Function: pc_frame::conThread()
void pc_frame::conThread()
{
    bool finished_flag = false;
    vector<vector<fm_sample> > input_vec;
    while(true)
    {
        input_vec.clear();
        sem_wait(&semCon);
        bufMtx.lock();
        for(int i = 0; i < bufSize;)
        {
            if(buffer.empty())
            {
                finished_flag = true;
                break;
            }
            input_vec.push_back(buffer.front());
            i += buffer.front().size();
            buffer.pop();
        }
        bufMtx.unlock();
        sem_post(&semPro);
        pTask->run_task(input_vec);
        if(finished_flag)
            break;
    }
    sem_post(&semCon);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x58(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x10(%rbx), %r12
leaq 0x78(%rbx), %r13
leaq 0x38(%rbx), %rax
movq %rax, 0x30(%rsp)
movl $0x0, 0x4(%rsp)
movq %r12, %r14
movq 0x10(%rsp), %rbp
movq 0x18(%rsp), %r12
cmpq %rbp, %r12
je 0x6729
movq %rbp, %r15
movq %r15, %rdi
callq 0x58e2
addq $0x18, %r15
cmpq %r12, %r15
jne 0x6713
movq %rbp, 0x18(%rsp)
movq 0x8(%rsp), %rdi
callq 0x3170
movq %r14, %r12
leaq 0x10(%rsp), %r14
movq %r12, %rdi
callq 0x3370
testl %eax, %eax
jne 0x67ef
cmpl $0x0, 0xe0(%rbx)
jle 0x67a3
xorl %r15d, %r15d
movq 0x88(%rbx), %rsi
cmpq %rsi, 0xa8(%rbx)
je 0x679d
movq %r14, %rdi
callq 0x6da8
movq 0x88(%rbx), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
shrq $0x5, %rcx
imull $0xaaaaaaab, %ecx, %eax # imm = 0xAAAAAAAB
addl %eax, %r15d
movq %r13, %rdi
callq 0x7f4c
cmpl 0xe0(%rbx), %r15d
jl 0x6757
jmp 0x67a3
movb $0x1, %al
movl %eax, 0x4(%rsp)
movq %r12, %rdi
callq 0x31d0
movq 0x30(%rsp), %rdi
callq 0x33f0
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *(%rax)
testb $0x1, 0x4(%rsp)
je 0x66fe
movq 0x8(%rsp), %rdi
callq 0x33f0
leaq 0x10(%rsp), %rdi
callq 0x6dd4
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x3190
jmp 0x67fa
jmp 0x67fa
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6dd4
movq %rbx, %rdi
callq 0x3440
nop
// File: /workspace/github_cpp_makefile_star2_O1/CastellanZhang[P]lambdaFM/src/Utils/utils.cpp
// Function: utils::splitString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char, 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 utils::splitString(string& line, char delimiter, vector<string>* r)
{
    int begin = 0;
    for(int i = 0; i < line.size(); ++i)
    {
        if(line[i] == delimiter)
        {
            (*r).push_back(line.substr(begin, i - begin));
            begin = i + 1;
        }
    }
    if(begin < line.size())
        (*r).push_back(line.substr(begin, line.size() - begin));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rcx
xorl %edx, %edx
testq %rcx, %rcx
je 0x802e
movl %esi, %ebp
leaq 0x18(%rsp), %r12
leaq 0x8(%rsp), %r15
xorl %r13d, %r13d
movq (%r14), %rax
cmpb %bpl, (%rax,%r13)
jne 0x801f
movslq %edx, %rdx
movl %r13d, %eax
subl %edx, %eax
movslq %eax, %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x32b0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5ff6
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x801b
callq 0x3260
leal 0x1(%r13), %edx
incq %r13
movq 0x8(%r14), %rcx
cmpq %r13, %rcx
ja 0x7fe2
movslq %edx, %rdx
subq %rdx, %rcx
jbe 0x8061
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x32b0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5ff6
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8061
callq 0x3260
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x8090
jmp 0x8095
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8095
callq 0x3260
movq %rbx, %rdi
callq 0x3440
nop
// File: /workspace/github_cpp_makefile_star2_O1/CastellanZhang[P]lambdaFM/src/Utils/utils.cpp
// Function: utils::gaussian()
double utils::gaussian() 
{
    double u,v, x, y, Q;
    do
    {
        do 
        {
            u = uniform();
        } while (u == 0.0); 

        v = 1.7156 * (uniform() - 0.5);
        x = u - 0.449871;
        y = fabs(v) + 0.386595;
        Q = x * x + y * (0.19600 * y - 0.25472 * x);
    } while (Q >= 0.27597 && (Q > 0.27846 || v * v > -4.0 * u * u * log(u)));
    return v / u;
}

// Assembly:
subq $0x38, %rsp
callq 0x3080
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x12c8(%rip), %xmm0     # 0x93a8
ucomisd 0x11c8(%rip), %xmm0     # 0x92b0
jne 0x80ec
jnp 0x80cc
movsd %xmm0, (%rsp)
callq 0x3080
movsd (%rsp), %xmm4
xorps %xmm5, %xmm5
cvtsi2sd %eax, %xmm5
mulsd 0x129e(%rip), %xmm5     # 0x93a8
addsd 0x129e(%rip), %xmm5     # 0x93b0
mulsd 0x129e(%rip), %xmm5     # 0x93b8
movapd %xmm4, %xmm0
addsd 0x129a(%rip), %xmm0     # 0x93c0
movapd %xmm5, %xmm1
andpd 0x12ce(%rip), %xmm1     # 0x9400
addsd 0x128e(%rip), %xmm1     # 0x93c8
movapd %xmm0, %xmm2
mulsd 0x128a(%rip), %xmm2     # 0x93d0
movapd %xmm1, %xmm3
mulsd 0x1286(%rip), %xmm3     # 0x93d8
addsd %xmm2, %xmm3
mulsd %xmm1, %xmm3
mulsd %xmm0, %xmm0
addsd %xmm3, %xmm0
ucomisd 0x1276(%rip), %xmm0     # 0x93e0
jb 0x81ce
ucomisd 0x1274(%rip), %xmm0     # 0x93e8
ja 0x80cc
movapd %xmm5, %xmm0
mulsd %xmm5, %xmm0
movapd %xmm0, 0x10(%rsp)
movapd %xmm4, %xmm0
mulsd 0x125c(%rip), %xmm0     # 0x93f0
mulsd %xmm4, %xmm0
movsd %xmm0, 0x8(%rsp)
movapd %xmm4, %xmm0
movapd %xmm5, 0x20(%rsp)
callq 0x3200
movapd 0x20(%rsp), %xmm5
movsd (%rsp), %xmm4
mulsd 0x8(%rsp), %xmm0
movapd 0x10(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x80cc
divsd %xmm4, %xmm5
movapd %xmm5, %xmm0
addq $0x38, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/rocket323[P]fishdb/examples/ex_iter.cpp
// Function: main
int main(int argc, char **argv)
{
    const char *fname = argv[1];

    auto bt = BTree::Open(fname);
    if (bt == NULL)
    {
        printf("open db[%s] failed", fname);
        return -1;
    }

    /*
    bt->Put("name1", "tom");
    bt->Put("name2", "jack");
    bt->Put("name3", "michael");
    bt->Put("greet", "hello world");
    */

    auto iter = bt->NewIterator();
    for (iter->SeekToFirst(); iter->Valid(); iter->Next())
    {
        // std::cout << iter->Key() << ": " << iter->Value() << std::endl;
        std::cout << iter->Key() << std::endl;
    }
    delete iter;
    bt->Close();
    delete bt;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq 0x8(%rsi), %r14
leaq -0x90(%rbp), %rdi
leaq -0x50(%rbp), %rdx
movq %r14, %rsi
callq 0x20c0
xorps %xmm0, %xmm0
leaq -0x70(%rbp), %rsi
movaps %xmm0, (%rsi)
leaq 0x305(%rip), %rax       # 0x28aa
movq %rax, 0x18(%rsi)
leaq 0x304(%rip), %rax       # 0x28b4
movq %rax, 0x10(%rsi)
leaq -0x90(%rbp), %rdi
movl $0x2, %edx
callq 0x33ac
movq %rax, %rbx
movq -0x60(%rbp), %rax
testq %rax, %rax
je 0x25df
leaq -0x70(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25f1
callq 0x21b0
testq %rbx, %rbx
je 0x26ef
movq %rbx, -0x30(%rbp)
movq %rbx, %rdi
callq 0x34dc
movq %rax, %r14
movq %rax, %rdi
callq 0x293c
movq %r14, %rdi
callq 0x3022
testb %al, %al
je 0x2693
leaq -0x40(%rbp), %rbx
leaq -0x50(%rbp), %r15
movq 0x99ac(%rip), %r12      # 0xbfd8
movq %r15, %rdi
movq %r14, %rsi
callq 0x302c
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %r12, %rdi
callq 0x2230
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r13, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2150
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x267f
callq 0x21b0
movq %r14, %rdi
callq 0x2d56
movq %r14, %rdi
callq 0x3022
testb %al, %al
jne 0x262c
movq %r14, %rdi
addq $0x8, %rdi
callq 0x27f8
movq %r14, %rdi
callq 0x21b0
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x34d2
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x26c1
callq 0x277e
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x26db
movq %rbx, %rdi
addq $0x50, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x2844
movq %rbx, %rdi
callq 0x21b0
xorl %eax, %eax
jmp 0x2705
leaq 0x590e(%rip), %rdi      # 0x8004
movq %r14, %rsi
xorl %eax, %eax
callq 0x2050
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2741
jmp 0x2741
movq %rax, %r14
movq -0x60(%rbp), %rax
testq %rax, %rax
je 0x2732
leaq -0x70(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x275a
jmp 0x275f
movq %rax, %rdi
callq 0x27ea
movq %rax, %r14
jmp 0x275f
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x275f
callq 0x21b0
movq %r14, %rdi
callq 0x2300
nop
// File: /workspace/github_cpp_makefile_star2_O1/rocket323[P]fishdb/./btree.h
// Function: fishdb::DefaultCmp::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool operator()(const std::string &a, const std::string &b)
    {
        int min_len = std::min(a.length(), b.length());
        if (min_len == 0) return false;
        int result = memcmp(a.data(), b.data(), min_len);
        if (result != 0) return result < 0;
        return a.length() < b.length();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x8(%rsi), %rbx
movq 0x8(%rdx), %r14
cmpq %rbx, %r14
movq %rbx, %rax
cmovbq %r14, %rax
testl %eax, %eax
je 0x2906
movq (%rsi), %rdi
movq (%rdx), %rsi
movslq %eax, %rdx
callq 0x20e0
testl %eax, %eax
je 0x290a
shrl $0x1f, %eax
jmp 0x2910
xorl %eax, %eax
jmp 0x2910
cmpq %r14, %rbx
setb %al
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/rocket323[P]fishdb/./iter.cpp
// Function: fishdb::Iterator::SeekToFirst()
void Iterator::SeekToFirst()
{
    auto now = m_btree->m_root;
    m_stack.push_back(now);

    while (!now->is_leaf)
    {
        now = m_btree->ReadPage(now->children[0]);
        m_stack.push_back(now);
    }
    if (now->kvs.size() > 0)
    {
        m_valid = true;
        m_kv_idx = 0;
    }
    else
    {
        m_valid = false;
        m_stack.clear();
    }
    printf("iter stack_size[%zu]\n", m_stack.size());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x70(%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x78(%rax), %rax
movq %rax, -0x28(%rbp)
testq %rax, %rax
je 0x297b
movq 0x9663(%rip), %rcx      # 0xbfd0
cmpb $0x0, (%rcx)
je 0x2977
incl 0x8(%rax)
jmp 0x297b
lock
incl 0x8(%rax)
leaq 0x8(%rbx), %r14
leaq -0x30(%rbp), %rsi
movq %r14, %rdi
callq 0x30f6
leaq -0x40(%rbp), %r15
leaq -0x30(%rbp), %r12
movq -0x30(%rbp), %rax
cmpb $0x0, 0x79(%rax)
jne 0x29e7
movq (%rbx), %rsi
movq 0x48(%rax), %rax
movq (%rax), %rdx
movq %r15, %rdi
callq 0x351a
movaps -0x40(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x40(%rbp)
movq -0x28(%rbp), %rdi
movups %xmm0, -0x30(%rbp)
testq %rdi, %rdi
je 0x29cc
callq 0x277e
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x29da
callq 0x277e
movq %r14, %rdi
movq %r12, %rsi
callq 0x30f6
jmp 0x2993
movq 0x68(%rax), %rcx
cmpq 0x60(%rax), %rcx
je 0x29fe
movb $0x1, 0x24(%rbx)
movl $0x0, 0x20(%rbx)
jmp 0x2a0a
movb $0x0, 0x24(%rbx)
movq %r14, %rdi
callq 0x313c
movq 0x10(%rbx), %rsi
subq 0x8(%rbx), %rsi
sarq $0x4, %rsi
leaq 0x5623(%rip), %rdi      # 0x8040
xorl %eax, %eax
callq 0x2050
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0x2a32
callq 0x277e
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2a43
jmp 0x2a43
movq %rax, %rbx
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0x2a54
callq 0x277e
movq %rbx, %rdi
callq 0x2300
// File: /workspace/github_cpp_makefile_star2_O1/rocket323[P]fishdb/./iter.cpp
// Function: fishdb::Iterator::SeekToLast()
void Iterator::SeekToLast()
{
    auto now = m_btree->m_root;
    m_stack.push_back(now);

    while (!now->is_leaf)
    {
        now = m_btree->ReadPage(now->children.back());
        m_stack.push_back(now);
    }
    if (now->kvs.size() > 0)
    {
        m_valid = true;
        m_kv_idx = now->kvs.size() - 1;
    }
    else
    {
        m_valid = false;
        m_stack.clear();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x70(%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x78(%rax), %rax
movq %rax, -0x28(%rbp)
testq %rax, %rax
je 0x2a9b
movq 0x9543(%rip), %rcx      # 0xbfd0
cmpb $0x0, (%rcx)
je 0x2a97
incl 0x8(%rax)
jmp 0x2a9b
lock
incl 0x8(%rax)
leaq 0x8(%rbx), %r14
leaq -0x30(%rbp), %rsi
movq %r14, %rdi
callq 0x30f6
leaq -0x40(%rbp), %r15
leaq -0x30(%rbp), %r12
movq -0x30(%rbp), %rcx
cmpb $0x0, 0x79(%rcx)
jne 0x2b08
movq (%rbx), %rsi
movq 0x50(%rcx), %rax
movq -0x8(%rax), %rdx
movq %r15, %rdi
callq 0x351a
movaps -0x40(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x40(%rbp)
movq -0x28(%rbp), %rdi
movups %xmm0, -0x30(%rbp)
testq %rdi, %rdi
je 0x2aed
callq 0x277e
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x2afb
callq 0x277e
movq %r14, %rdi
movq %r12, %rsi
callq 0x30f6
jmp 0x2ab3
movq 0x68(%rcx), %rax
subq 0x60(%rcx), %rax
je 0x2b21
shrq $0x6, %rax
movb $0x1, 0x24(%rbx)
decl %eax
movl %eax, 0x20(%rbx)
jmp 0x2b2d
movb $0x0, 0x24(%rbx)
movq %r14, %rdi
callq 0x313c
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0x2b3b
callq 0x277e
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2b4c
jmp 0x2b4c
movq %rax, %rbx
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0x2b5d
callq 0x277e
movq %rbx, %rdi
callq 0x2300
nop
// File: /workspace/github_cpp_makefile_star2_O1/rocket323[P]fishdb/./btree.cpp
// Function: fishdb::BTree::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::function<bool (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)>, int)
BTree * BTree::Open(std::string dbfile,
        CmpFunc cmp_func, int min_key_num)
{
    BTree *bt = new BTree();
    bt->m_cmp_func = cmp_func;
    bt->m_min_key_num = min_key_num;

    int ret = bt->m_pager.Init(dbfile);
    if (ret)
        return NULL;
    bt->m_root = bt->m_pager.GetRoot();
    printf("root_page_no[%" PRId64 "]\n", bt->m_root->header.page_no);
    return bt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r14
movl $0x80, %edi
callq 0x21f0
movq %rax, %rbx
addq $0x8, %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, (%rbx)
movaps %xmm0, 0x30(%rbx)
movaps %xmm0, 0x40(%rbx)
movaps %xmm0, 0x50(%rbx)
movaps %xmm0, 0x60(%rbx)
movaps %xmm0, 0x70(%rbx)
leaq 0x50(%rbx), %rdi
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq $0x0, 0x28(%rbx)
movq %r12, %rsi
callq 0x4ca4
movl %r15d, 0x48(%rbx)
leaq -0x40(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %r14
movq %r14, %rdi
callq 0x317e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x600c
movl %eax, %r14d
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0x3451
callq 0x21b0
testl %r14d, %r14d
je 0x345a
xorl %ebx, %ebx
jmp 0x34a9
leaq -0x30(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x633c
movaps (%r14), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r14)
movq 0x78(%rbx), %rdi
movups %xmm0, 0x70(%rbx)
testq %rdi, %rdi
je 0x3486
callq 0x277e
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0x3494
callq 0x277e
movq 0x70(%rbx), %rax
movq (%rax), %rsi
leaq 0x4c73(%rip), %rdi      # 0x8115
xorl %eax, %eax
callq 0x2050
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0x34ca
callq 0x21b0
movq %rbx, %rdi
callq 0x2300