LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/j84guo[P]cake/cake.cpp
// Function: processTargets(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Target, 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, Target>>>&, 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>>>>&)
bool processTargets(TargetMap& nodes, vector<string>& order)
{
    for (const string& name : order) {
        if (!processTarget(nodes.at(name))) {
            targetError(name);
            return false;
        }
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rsi), %r14
movq 0x8(%rsi), %r12
cmpq %r12, %r14
sete %bl
je 0x2f6d
movq %rdi, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3e76
testq %rax, %rax
je 0x2f7b
addq $0x28, %rax
movq %rax, %rdi
callq 0x2e6c
testb %al, %al
je 0x2f65
addq $0x20, %r14
cmpq %r12, %r14
sete %bl
jne 0x2f37
jmp 0x2f6d
movq %r14, %rdi
callq 0x27ea
andb $0x1, %bl
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x21bb(%rip), %rdi      # 0x513d
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O1/j84guo[P]cake/cake.cpp
// Function: main
int main()
{
    vector<string> lines;
    if (!readFile("Cakefile", lines)) {
        perror("readFile");
        return 1;
    }

    TargetMap nodes;
    if (!parseTargets(nodes, lines))
        return 1;

    vector<string> order;
    sortTargets(nodes, order);

    cout << "[...Target Order...]\n";
    for (auto& name : order)
        cout << name << "\n";

    cout << "[...Processing...]\n";
    return processTargets(nodes, order) ? 0 : 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
movq $0x0, -0x50(%rbp)
leaq -0x88(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x20bf(%rip), %rsi      # 0x5079
leaq 0x20c0(%rip), %rdx      # 0x5081
leaq -0x98(%rbp), %rdi
callq 0x34a2
leaq -0x98(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x25a1
movl %eax, %ebx
movq -0x98(%rbp), %rdi
cmpq %r14, %rdi
je 0x2ffa
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x2180
testb %bl, %bl
je 0x3117
leaq -0x68(%rbp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq -0x98(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x2a39
movl $0x1, %ebx
testb %al, %al
je 0x30f0
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
leaq -0x98(%rbp), %rdi
callq 0x2d0b
movq 0x4f6a(%rip), %rdi      # 0x7fd0
leaq 0x201e(%rip), %rsi      # 0x508b
movl $0x15, %edx
callq 0x21b0
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %r12
cmpq %r12, %r15
je 0x30ba
movq 0x4f45(%rip), %rbx      # 0x7fd0
leaq 0x2021(%rip), %r14      # 0x50b3
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x21b0
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x21b0
addq $0x20, %r15
cmpq %r12, %r15
jne 0x3092
movq 0x4f0f(%rip), %rdi      # 0x7fd0
leaq 0x1fd9(%rip), %rsi      # 0x50a1
movl $0x13, %edx
callq 0x21b0
leaq -0x98(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x2f1a
xorb $0x1, %al
movzbl %al, %ebx
leaq -0x40(%rbp), %rdi
callq 0x31cc
leaq -0x98(%rbp), %rdi
callq 0x32fa
leaq -0x60(%rbp), %rdi
callq 0x31cc
movl %ebx, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1f64(%rip), %rdi      # 0x5082
callq 0x2130
movl $0x1, %ebx
jmp 0x30fc
movq %rax, %rbx
jmp 0x3162
movq %rax, %rbx
movq -0x98(%rbp), %rdi
cmpq %r14, %rdi
je 0x316e
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x2180
jmp 0x316e
movq %rax, %rbx
jmp 0x316e
jmp 0x3156
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x31cc
leaq -0x98(%rbp), %rdi
callq 0x32fa
leaq -0x60(%rbp), %rdi
callq 0x31cc
movq %rbx, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O1/swxlion[P]swxJson/tests/swxJsonAdvancedTest_fetch.cpp
// Function: void test_array<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 3ul>(std::shared_ptr<swxJson::Json>, char const*, char const*, bool)
void test_array(JsonPtr json, const char* key, const char* desc, bool compatibleMode)
{
	cout<<endl<<desc<<endl;

	std::array<K, N> elemArray = (*json)[key].wantArray<K, N>(compatibleMode);
	for (auto& element: elemArray)
		cout<<"Element: "<<element<<endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %ecx, %ebx
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r15
movq 0x1e11b(%rip), %r12     # 0x33fd8
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r12, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq %rax, %r12
testq %r13, %r13
je 0x15f05
movq %r13, %rdi
callq 0x120e0
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x122f0
jmp 0x15f20
movq (%r12), %rax
movq -0x18(%rax), %rax
movq %r12, %rdi
addq %rax, %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x12400
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r12, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq (%r15), %rdi
movq %r14, %rsi
callq 0x2224a
movzbl %bl, %edx
movq %rsp, %rdi
movq %rax, %rsi
callq 0x18fe8
movl $0x8, %r13d
leaq 0x60(%rsp), %rbx
movq 0x1e065(%rip), %r14     # 0x33fd8
leaq 0x13693(%rip), %r15     # 0x2960d
movl $0x9, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x122f0
movq -0x8(%rsp,%r13), %rsi
movq (%rsp,%r13), %rdx
movq %r14, %rdi
callq 0x122f0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r12, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
addq $0x20, %r13
cmpq $0x68, %r13
jne 0x15f7a
movq $-0x60, %rbx
leaq 0x50(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x15fef
movq (%r14), %rsi
incq %rsi
callq 0x122a0
addq $-0x20, %r14
addq $0x20, %rbx
jne 0x15fdb
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x12470
movq %r14, %rdi
callq 0x12430
// File: /workspace/github_cpp_makefile_star2_O1/swxlion[P]swxJson/tests/swxJsonAdvancedTest_fetch.cpp
// Function: void test_queue<int>(std::shared_ptr<swxJson::Json>, char const*, char const*)
void test_queue(JsonPtr json, const char* key, const char* desc)
{
	cout<<endl<<desc<<endl;

	std::queue<K> elemQueue = (*json)[key].wantQueue<K>();
	while (elemQueue.size())
	{
		cout<<"Element: "<<elemQueue.front()<<endl;
		elemQueue.pop();
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1d762(%rip), %r15     # 0x33fd8
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq %rax, %r15
testq %r12, %r12
je 0x168bd
movq %r12, %rdi
callq 0x120e0
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x122f0
jmp 0x168d7
movq (%r15), %rax
movq -0x18(%rax), %rax
movq %r15, %rdi
addq %rax, %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x12400
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x2224a
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x1a370
movq 0x1d6bb(%rip), %rbx     # 0x33fd8
leaq 0x12ce9(%rip), %r14     # 0x2960d
movq 0x50(%rsp), %rax
movq %rax, %rcx
subq 0x30(%rsp), %rcx
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
shlq $0x7, %rcx
movq 0x28(%rsp), %rax
movq 0x38(%rsp), %rdx
subq 0x40(%rsp), %rdx
sarq $0x2, %rdx
addq %rcx, %rdx
subq 0x18(%rsp), %rax
sarq $0x2, %rax
addq %rdx, %rax
je 0x16a07
movl $0x9, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x122f0
movq 0x18(%rsp), %rax
movl (%rax), %esi
movq %rbx, %rdi
callq 0x12420
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq 0x18(%rsp), %rax
movq 0x28(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x169cb
addq $0x4, %rax
jmp 0x169fd
movq 0x20(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x122a0
movq 0x30(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x28(%rsp)
movq %rax, 0x18(%rsp)
jmp 0x16924
leaq 0x8(%rsp), %rdi
callq 0x1a886
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1a886
movq %rbx, %rdi
callq 0x12430
// File: /workspace/github_cpp_makefile_star2_O1/swxlion[P]swxJson/tests/swxJsonAdvancedTest_fetch.cpp
// Function: void test_deque<int>(std::shared_ptr<swxJson::Json>, char const*, char const*)
void test_deque(JsonPtr json, const char* key, const char* desc)
{
	cout<<endl<<desc<<endl;

	std::deque<K> elemQueue = (*json)[key].wantDeque<K>();
	while (elemQueue.size())
	{
		cout<<"Element: "<<elemQueue.front()<<endl;
		elemQueue.pop_front();
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1d3f8(%rip), %r15     # 0x33fd8
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq %rax, %r15
testq %r12, %r12
je 0x16c27
movq %r12, %rdi
callq 0x120e0
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x122f0
jmp 0x16c41
movq (%r15), %rax
movq -0x18(%rax), %rax
movq %r15, %rdi
addq %rax, %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x12400
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x2224a
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x1aa40
movq 0x1d351(%rip), %rbx     # 0x33fd8
leaq 0x1297f(%rip), %r14     # 0x2960d
movq 0x50(%rsp), %rax
movq %rax, %rcx
subq 0x30(%rsp), %rcx
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
shlq $0x7, %rcx
movq 0x28(%rsp), %rax
movq 0x38(%rsp), %rdx
subq 0x40(%rsp), %rdx
sarq $0x2, %rdx
addq %rcx, %rdx
subq 0x18(%rsp), %rax
sarq $0x2, %rax
addq %rdx, %rax
je 0x16d71
movl $0x9, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x122f0
movq 0x18(%rsp), %rax
movl (%rax), %esi
movq %rbx, %rdi
callq 0x12420
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq 0x18(%rsp), %rax
movq 0x28(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x16d35
addq $0x4, %rax
jmp 0x16d67
movq 0x20(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x122a0
movq 0x30(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x28(%rsp)
movq %rax, 0x18(%rsp)
jmp 0x16c8e
leaq 0x8(%rsp), %rdi
callq 0x1a886
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1a886
movq %rbx, %rdi
callq 0x12430
// File: /workspace/github_cpp_makefile_star2_O1/swxlion[P]swxJson/tests/swxJsonAdvancedTest_fetch.cpp
// Function: void test_list<int>(std::shared_ptr<swxJson::Json>, char const*, char const*)
void test_list(JsonPtr json, const char* key, const char* desc)
{
	cout<<endl<<desc<<endl;

	std::list<K> elemList = (*json)[key].wantList<K>();
	for (auto& element: elemList)
		cout<<"Element: "<<element<<endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1d0cc(%rip), %r15     # 0x33fd8
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq %rax, %r15
testq %r12, %r12
je 0x16f53
movq %r12, %rdi
callq 0x120e0
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x122f0
jmp 0x16f6d
movq (%r15), %rax
movq -0x18(%rax), %rax
movq %r15, %rdi
addq %rax, %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x12400
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x2224a
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1ad6c
movq 0x1d022(%rip), %r14     # 0x33fd8
leaq 0x12650(%rip), %r15     # 0x2960d
movq %rbx, %r13
movq (%r13), %r13
cmpq %rbx, %r13
je 0x17011
movl $0x9, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x122f0
movl 0x10(%r13), %esi
movq %r14, %rdi
callq 0x12420
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r12, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
jmp 0x16fc0
leaq 0x8(%rsp), %rbx
movq (%rbx), %rdi
cmpq %rbx, %rdi
je 0x17033
movq (%rdi), %r14
movl $0x18, %esi
callq 0x122a0
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x1701e
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %r14
movq (%r14), %rdi
cmpq %r14, %rdi
je 0x17066
movq (%rdi), %r15
movl $0x18, %esi
callq 0x122a0
movq %r15, %rdi
cmpq %r14, %r15
jne 0x17051
movq %rbx, %rdi
callq 0x12430
// File: /workspace/github_cpp_makefile_star2_O1/swxlion[P]swxJson/tests/swxJsonAdvancedTest_fetch.cpp
// Function: void test_vector<int>(std::shared_ptr<swxJson::Json>, char const*, char const*)
void test_vector(JsonPtr json, const char* key, const char* desc)
{
	cout<<endl<<desc<<endl;

	std::vector<K> elemVector = (*json)[key].wantVector<K>();
	for (auto& element: elemVector)
		cout<<"Element: "<<element<<endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1cdf2(%rip), %r15     # 0x33fd8
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq %rax, %r15
testq %r12, %r12
je 0x1722d
movq %r12, %rdi
callq 0x120e0
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x122f0
jmp 0x17247
movq (%r15), %rax
movq -0x18(%rax), %rax
movq %r15, %rdi
addq %rax, %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x12400
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x2224a
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1b39c
movq (%rbx), %r12
movq 0x8(%rbx), %r13
cmpq %r13, %r12
je 0x172f2
movq 0x1cd3c(%rip), %rbx     # 0x33fd8
leaq 0x1236a(%rip), %r14     # 0x2960d
movl $0x9, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x122f0
movl (%r12), %esi
movq %rbx, %rdi
callq 0x12420
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
addq $0x4, %r12
cmpq %r13, %r12
jne 0x172a3
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17309
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x122a0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17331
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x122a0
movq %rbx, %rdi
callq 0x12430
// File: /workspace/github_cpp_makefile_star2_O1/swxlion[P]swxJson/tests/swxJsonAdvancedTest_fetch.cpp
// Function: void test_set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::shared_ptr<swxJson::Json>, char const*, char const*)
void test_set(JsonPtr json, const char* key, const char* desc)
{
	cout<<endl<<desc<<endl;

	std::set<K> elemSet = (*json)[key].wantSet<K>();
	for (auto& element: elemSet)
		cout<<"Element: "<<element<<endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1cc82(%rip), %r15     # 0x33fd8
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq %rax, %r15
testq %r12, %r12
je 0x1739d
movq %r12, %rdi
callq 0x120e0
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x122f0
jmp 0x173b7
movq (%r15), %rax
movq -0x18(%rax), %rax
movq %r15, %rdi
addq %rax, %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x12400
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x2224a
movq %rsp, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1b698
movq 0x18(%rbx), %rbx
leaq 0x8(%rsp), %r13
cmpq %r13, %rbx
je 0x1746d
movq 0x1cbcc(%rip), %r14     # 0x33fd8
leaq 0x121fa(%rip), %r15     # 0x2960d
movl $0x9, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x122f0
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq %r14, %rdi
callq 0x122f0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r12, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq %rbx, %rdi
callq 0x12300
movq %rax, %rbx
cmpq %r13, %rax
jne 0x17413
movq %rsp, %rdi
callq 0x1b994
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1b994
movq %rbx, %rdi
callq 0x12430
// File: /workspace/github_cpp_makefile_star2_O1/swxlion[P]swxJson/tests/swxJsonAdvancedTest_fetch.cpp
// Function: void test_unordered_set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::shared_ptr<swxJson::Json>, char const*, char const*)
void test_unordered_set(JsonPtr json, const char* key, const char* desc)
{
	cout<<endl<<desc<<endl;

	std::unordered_set<K> elemSet = (*json)[key].wantUnorderedSet<K>();
	for (auto& element: elemSet)
		cout<<"Element: "<<element<<endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1c9cf(%rip), %r15     # 0x33fd8
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq %rax, %r15
testq %r12, %r12
je 0x17650
movq %r12, %rdi
callq 0x120e0
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x122f0
jmp 0x1766a
movq (%r15), %rax
movq -0x18(%rax), %rax
movq %r15, %rdi
addq %rax, %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x12400
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x2224a
movq %rsp, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1bc94
movq 0x10(%rbx), %r12
testq %r12, %r12
je 0x17716
movq 0x1c91e(%rip), %rbx     # 0x33fd8
leaq 0x11f4c(%rip), %r14     # 0x2960d
movl $0x9, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x122f0
movq 0x8(%r12), %rsi
movq 0x10(%r12), %rdx
movq %rbx, %rdi
callq 0x122f0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq (%r12), %r12
testq %r12, %r12
jne 0x176c1
movq %rsp, %rdi
callq 0x1c236
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1c236
movq %rbx, %rdi
callq 0x12430
// File: /workspace/github_cpp_makefile_star2_O1/swxlion[P]swxJson/tests/swxJsonAdvancedTest_fetch.cpp
// Function: void test_dict<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::shared_ptr<swxJson::Json>, char const*, char const*)
void test_dict(JsonPtr json, const char* key, const char* desc)
{
	cout<<endl<<desc<<endl;

	std::map<std::string, K> elemMap = (*json)[key].wantDict<K>();
	for (auto& pp: elemMap)
		cout<<"Element: "<<pp.first<<":"<<pp.second<<endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1c733(%rip), %r15     # 0x33fd8
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq %rax, %r15
testq %r12, %r12
je 0x178ec
movq %r12, %rdi
callq 0x120e0
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x122f0
jmp 0x17906
movq (%r15), %rax
movq -0x18(%rax), %rax
movq %r15, %rdi
addq %rax, %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x12400
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x2224a
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1c722
movq 0x18(%rbx), %rbx
leaq 0x10(%rsp), %rbp
cmpq %rbp, %rbx
je 0x179ec
movq 0x1c677(%rip), %r14     # 0x33fd8
leaq 0x11ca5(%rip), %r15     # 0x2960d
leaq 0x11e27(%rip), %r12     # 0x29796
movl $0x9, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x122f0
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq %r14, %rdi
callq 0x122f0
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x122f0
movq 0x40(%rbx), %rsi
movq 0x48(%rbx), %rdx
movq %r13, %rdi
callq 0x122f0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r13, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq %rbx, %rdi
callq 0x121a0
movq %rax, %rbx
cmpq %rbp, %rax
jne 0x1796f
leaq 0x8(%rsp), %rdi
callq 0x1ccd8
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1ccd8
movq %rbx, %rdi
callq 0x12430
// File: /workspace/github_cpp_makefile_star2_O1/swxlion[P]swxJson/tests/swxJsonAdvancedTest_fetch.cpp
// Function: void test_unordered_dict<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::shared_ptr<swxJson::Json>, char const*, char const*)
void test_unordered_dict(JsonPtr json, const char* key, const char* desc)
{
	cout<<endl<<desc<<endl;

	std::unordered_map<std::string, K> elemMap = (*json)[key].wantUnorderedDict<K>();
	for (auto& pp: elemMap)
		cout<<"Element: "<<pp.first<<":"<<pp.second<<endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1c413(%rip), %r15     # 0x33fd8
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq %rax, %r15
testq %r12, %r12
je 0x17c0c
movq %r12, %rdi
callq 0x120e0
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x122f0
jmp 0x17c26
movq (%r15), %rax
movq -0x18(%rax), %rax
movq %r15, %rdi
addq %rax, %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x12400
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r15, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x2224a
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1d2b2
movq 0x10(%rbx), %r13
testq %r13, %r13
je 0x17d00
movq 0x1c35c(%rip), %rbx     # 0x33fd8
leaq 0x1198a(%rip), %r14     # 0x2960d
leaq 0x11b0c(%rip), %r15     # 0x29796
movl $0x9, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x122f0
movq 0x8(%r13), %rsi
movq 0x10(%r13), %rdx
movq %rbx, %rdi
callq 0x122f0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x122f0
movq 0x28(%r13), %rsi
movq 0x30(%r13), %rdx
movq %r12, %rdi
callq 0x122f0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x12260
movsbl %al, %esi
movq %r12, %rdi
callq 0x12030
movq %rax, %rdi
callq 0x12190
movq (%r13), %r13
testq %r13, %r13
jne 0x17c8a
leaq 0x8(%rsp), %rdi
callq 0x1d88e
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1d88e
movq %rbx, %rdi
callq 0x12430
// File: /workspace/github_cpp_makefile_star2_O1/fieryzig[P]GameServer/TestClient/TestClient.cpp
// Function: init()
void init()
{
    fd = socket(AF_INET, SOCK_STREAM, 0);
    memset(&addr, 0, sizeof(addr));
    addr.sin_family = AF_INET;
    inet_aton("127.0.0.1", &(addr.sin_addr));
    addr.sin_port = htons(7788);
    int ret = connect(fd, (struct sockaddr*)&addr, sizeof(sockaddr));
    client = new Client(fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
xorl %r14d, %r14d
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2060
movl %eax, 0x3d2f(%rip)      # 0x615c
xorps %xmm0, %xmm0
movups %xmm0, 0x3d29(%rip)     # 0x6160
leaq 0x3d22(%rip), %rbx      # 0x6160
movw $0x2, 0x3d19(%rip)      # 0x6160
leaq 0x1bd2(%rip), %rdi      # 0x4020
leaq 0x3d0f(%rip), %rsi      # 0x6164
callq 0x20e0
movw $0x6c1e, 0x3cff(%rip)   # imm = 0x6C1E
movl 0x3cf3(%rip), %edi      # 0x615c
movq %rbx, %rsi
movl $0x10, %edx
callq 0x2100
movl $0x2024, %edi           # imm = 0x2024
callq 0x2160
movl 0x3cd6(%rip), %ecx      # 0x615c
movq %r14, 0x1004(%rax)
movl %r14d, 0x100c(%rax)
movq %r14, 0x2014(%rax)
movl %r14d, 0x201c(%rax)
movl %ecx, 0x2020(%rax)
movq %rax, 0x3cc1(%rip)      # 0x6170
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/fieryzig[P]GameServer/TestClient/TestClient.cpp
// Function: recv_thread()
void recv_thread()
{
    PacketInfo pi;
    string content;
    for (;;) {
        int ret = client->Recv();
        bool flag = client->hasMsg(&pi, content);
        if (flag) {
            cout << "Recv: ";
            cout << content << endl;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x60(%rbp), %rbx
leaq -0x48(%rbp), %r14
movq 0x3ae9(%rip), %r15      # 0x5fd0
leaq 0x1b3c(%rip), %r12      # 0x402a
movq 0x3c7b(%rip), %rdi      # 0x6170
callq 0x29bc
movq 0x3c6f(%rip), %rdi      # 0x6170
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2a52
testb %al, %al
je 0x24ee
movl $0x6, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2180
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r15, %rdi
callq 0x2180
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
jmp 0x24ee
jmp 0x255e
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x2573
callq 0x2130
movq %rbx, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/superblocks[P]superblocks/set-lky.cpp
// Function: Superblocks::init()
void Superblocks::init() {

	coin = "LKY"; 
	coin_name = "Luckycoin";

	hash_length = 64;

	// normal (step 0)
	reward[0] = 88;

	// superblock (step 1)
	seed_type[1] = SEED_WITH_PREVIOUS_BLOCK_HASH;
	cutout_start[1] = 8;
	cutout_length[1] = 7;
	rnd_range_low[1] = 1;
	rnd_range_high[1] = 100000;
	luck_type[1] = LUCK_WITH_MORE_THAN_X_AND_LESS_THAN_Y;
	luck_x[1] = 30000;
	luck_y[1] = 35001;
	reward[1] = 176;

	// superblock (step 2)
	luck_type[2] = LUCK_WITH_MORE_THAN_X_AND_LESS_THAN_Y;
	luck_x[2] = 70000;
	luck_y[2] = 71001;
	reward[2] = 440;

	// superblock (step 3)
	luck_type[3] = LUCK_WITH_MORE_THAN_X_AND_LESS_THAN_Y;
	luck_x[3] = 50000;
	luck_y[3] = 50011;
	reward[3] = 5104;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x18, %rdi
movq 0x20(%rbx), %rdx
leaq 0x134c(%rip), %rcx      # 0x3e80
movl $0x3, %r8d
xorl %esi, %esi
callq 0x1120
leaq 0x38(%rbx), %rdi
movq 0x40(%rbx), %rdx
leaq 0x1334(%rip), %rcx      # 0x3e84
movl $0x9, %r8d
xorl %esi, %esi
callq 0x1120
movl $0x40, 0x58(%rbx)
movabsq $0xb000000058, %rax     # imm = 0xB000000058
movq %rax, 0x14c(%rbx)
movl $0x2, 0x60(%rbx)
movl $0x8, 0x70(%rbx)
movl $0x7, 0x80(%rbx)
movl $0x1, 0x90(%rbx)
movl $0x186a0, 0xa0(%rbx)    # imm = 0x186A0
movl $0x3, 0x120(%rbx)
movl $0x7530, 0x130(%rbx)    # imm = 0x7530
movl $0x88b9, 0x140(%rbx)    # imm = 0x88B9
movabsq $0x300000003, %rax      # imm = 0x300000003
movq %rax, 0x124(%rbx)
movabsq $0xc35000011170, %rax   # imm = 0xC35000011170
movq %rax, 0x134(%rbx)
movabsq $0xc35b00011559, %rax   # imm = 0xC35B00011559
movq %rax, 0x144(%rbx)
movabsq $0x13f0000001b8, %rax   # imm = 0x13F0000001B8
movq %rax, 0x154(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/irakr[P]Minimal-File-Compression-Tool/src/huffman-encoder.cpp
// Function: HuffmanEncoder::buildFrequencyTable(unsigned char*)
void HuffmanEncoder :: buildFrequencyTable(byte *buffer) {
	//@std::cout << "In HuffmanEncoder::buildFrequencyTable()" << std::endl;
	Log(this, "Started...");

	// Compute the frequencies of each byte in buffer and generate the
	// symbol-frequency map
	int i, j;	//, freq_len = 0;
	double frequency[UCHAR_MAX + 1] = {0}; // 2^8-1 = 255 = UCHAR_MAX different symbols
	memset(frequency, 0, UCHAR_MAX);
	for(i = 0; buffer[i] != '\0'; i++) {
		j = buffer[i]; // Just to typecast 'byte' to 'int'
		++(frequency[j]);
	}

	/****** Test *******
	for(i = 0; i <= UCHAR_MAX; i++) {
		std::cout << "frequency[" << i << "] = " << frequency[i] << std::endl;
	}
	****/

	// Fill the original symbol-frequency map by filtering out symbols
	// that does not exist(or frequency[symbol(i)] = 0)
	for(i = 0; i <= UCHAR_MAX; i++) {
		if(frequency[i] > 0) {
			byte b = i;
			(*m_frequencyTable)[b] = frequency[i];
		}
	}


	for(auto& x : *m_frequencyTable)
		x.second = (x.second / m_inBuffSize) * 100;

	/****** Test *******
	for(auto& x : *m_frequencyTable)
		std::cout << x.first << ":" << x.second << std::endl;
	//std::cout << (*m_frequencyTable)[(byte)'0'] << std::endl;
	****/

	//asm("nop");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x810, %rsp            # imm = 0x810
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
movl $0x800, %edx            # imm = 0x800
xorl %esi, %esi
callq 0x2140
movb (%r14), %al
testb %al, %al
je 0x278a
incq %r14
movsd 0x389b(%rip), %xmm0     # 0x6008
movzbl %al, %eax
movsd 0x10(%rsp,%rax,8), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp,%rax,8)
movb (%r14), %al
incq %r14
testb %al, %al
jne 0x276d
xorl %r15d, %r15d
xorpd %xmm0, %xmm0
leaq 0x7(%rsp), %r14
movsd 0x10(%rsp,%r15,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x27c8
movb %r15b, 0x7(%rsp)
movq 0x30(%rbx), %rdi
movq %r14, %rsi
movsd %xmm1, 0x8(%rsp)
callq 0x2cf0
xorpd %xmm0, %xmm0
movsd 0x8(%rsp), %xmm1
movsd %xmm1, (%rax)
incq %r15
cmpq $0x100, %r15            # imm = 0x100
jne 0x2796
movq 0x30(%rbx), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x280c
xorps %xmm0, %xmm0
cvtsi2sdq 0x28(%rbx), %xmm0
movsd 0x381e(%rip), %xmm1     # 0x6010
movsd 0x10(%rax), %xmm2
divsd %xmm0, %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, 0x10(%rax)
movq (%rax), %rax
testq %rax, %rax
jne 0x27f2
addq $0x810, %rsp            # imm = 0x810
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/irakr[P]Minimal-File-Compression-Tool/src/huffman-encoder.cpp
// Function: HuffmanEncoder::buildHuffmanTree()
void HuffmanEncoder :: buildHuffmanTree() {
	Log(this, "Started...");

	MinHeapNode<byte, double> *left, *right, *top;

	// Create a min heap & inserts all characters of data[]
	//@@@ MinHeap<byte, double> minHeap;
	for(auto& x : *m_frequencyTable)
		m_huffmanTree->push(new MinHeapNode<byte, double>(x.first, x.second));
	//printMinheap(*m_huffmanTree);

	// Iterate while size of heap doesn't become 1
	while (m_huffmanTree->size() != 1)
	{
		// Extract the two minimum freq items from min heap
		left = m_huffmanTree->top();
		m_huffmanTree->pop();

		right = m_huffmanTree->top();
		m_huffmanTree->pop();

		// Create a new internal node with frequency equal to the
		// sum of the two nodes frequencies. Make the two extracted
		// node as left and right children of this new node. Add
		// this node to the min heap.
		// 0x00 is a special value for internal nodes.
		top = new MinHeapNode<byte, double>(0x00, left->freq + right->freq, true);
		top->left = left;
		top->right = right;
		m_huffmanTree->push(top);
	}
	//printMinheap(*m_huffmanTree);
	//traversePreorder(m_huffmanTree->top(), "");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movq 0x10(%rax), %r12
testq %r12, %r12
je 0x2879
movq %rsp, %r14
movq 0x38(%rbx), %r15
movl $0x28, %edi
callq 0x21e0
movb 0x8(%r12), %cl
movsd 0x10(%r12), %xmm0
xorps %xmm1, %xmm1
movups %xmm1, 0x10(%rax)
movb %cl, (%rax)
movsd %xmm0, 0x8(%rax)
movb $0x0, 0x20(%rax)
movq %rax, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x2bd2
movq (%r12), %r12
testq %r12, %r12
jne 0x2835
movq 0x38(%rbx), %rdi
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
cmpq $0x8, %rcx
je 0x28fd
movq %rsp, %r14
movq (%rax), %r15
callq 0x2c34
movq 0x38(%rbx), %rdi
movq (%rdi), %rax
movq (%rax), %r12
callq 0x2c34
movl $0x28, %edi
callq 0x21e0
movsd 0x8(%r15), %xmm0
addsd 0x8(%r12), %xmm0
xorps %xmm1, %xmm1
movups %xmm1, 0x10(%rax)
movb $0x0, (%rax)
movsd %xmm0, 0x8(%rax)
movb $0x1, 0x20(%rax)
movq %rax, (%rsp)
movq %r15, 0x10(%rax)
movq %r12, 0x18(%rax)
movq 0x38(%rbx), %rdi
movq %r14, %rsi
callq 0x2c70
movq 0x38(%rbx), %rdi
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
cmpq $0x8, %rcx
jne 0x2890
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/irakr[P]Minimal-File-Compression-Tool/src/huffman-encoder.cpp
// Function: HuffmanEncoder::buildCodewordTable()
void HuffmanEncoder :: buildCodewordTable()
{
	Log(this, "Started...");

	/* --- This code is unlikely to happen unless someone really forgets ---
	 * -- Avoided! Since it will unnecessarily occupy each recursion stack --
	 *
	 * If prerequisites doesn't exist
	if(!m_codewordTable || !m_frequencyTable || !m_huffmanTree)
		throw 10;
	*/

	// Huffman tree parser lambda
	std::function<void(MinHeapNode<byte, double>*, const std::string&)>
		huffmanTreeParser;
	huffmanTreeParser =
			[&](MinHeapNode<byte, double>* root, const std::string &codeword) {
				if(root) {
					if(!root->isInternalNode()) {
						(*m_codewordTable)[root->data] = codeword;
						//@@@ std::cout << root->data << ": " << codeword << std::endl;
					}
					huffmanTreeParser(root->left, codeword + "0");
					huffmanTreeParser(root->right, codeword + "1");
				}
			};

	huffmanTreeParser(m_huffmanTree->top(), "");

	/* Just testing
	for(auto &x : *m_codewordTable)
		std::cout << x.first << " : " << x.second << std::endl;
	*/
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rcx
movaps %xmm0, 0x10(%rcx)
movaps %xmm0, (%rcx)
movaps %xmm0, 0x10(%rsp)
leaq 0x107(%rip), %rdx       # 0x2a36
leaq 0x268(%rip), %rsi       # 0x2b9e
movaps %xmm0, (%rsp)
movq %rdi, (%rcx)
movq %rcx, 0x8(%rcx)
movq 0x10(%rcx), %rax
movq 0x18(%rcx), %rdi
movq %rax, 0x10(%rsp)
movq %rsi, 0x10(%rcx)
movq %rdi, 0x18(%rsp)
movq %rdx, 0x18(%rcx)
testq %rax, %rax
je 0x296d
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x38(%rbx), %rax
movq (%rax), %rax
movq (%rax), %rbx
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x37ea(%rip), %rdx      # 0x6171
movq %rsp, %rdi
movq %rdx, %rsi
callq 0x36a2
movq %rbx, 0x28(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0x29e6
leaq 0x30(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq %rsp, %rdx
callq *0x18(%rdi)
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x29c5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x29de
leaq 0x30(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
callq 0x20d0
jmp 0x2a2e
jmp 0x2a2e
movq %rax, %rbx
jmp 0x2a0d
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x2a0d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x2a26
leaq 0x30(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x2320
movq %rax, %rdi
callq 0x2bc6
// File: /workspace/github_cpp_makefile_star2_O1/irakr[P]Minimal-File-Compression-Tool/src/compression-driver.cpp
// Function: CompressionDriver::setCompressor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void CompressionDriver :: setCompressor(const std::string& algo) {
	// TODO... Find valid compressor and register it
	Log(this, "Started...");

	// --- This code is just for initial testing purpose ---
	// --- Yea it is currently hard-coded kinda ---
	// --- Later we will add separate module for maintaining registered algorithms ---
	if(algo.compare("Huffman-Coding") == 0)
		m_Compressor = new HuffmanCompressor();
	else
		std::cerr << "[Fatal Error] Invalid compression algorithm \"" << algo << "\"" << std::endl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x28c7(%rip), %rsi      # 0x6128
movq %r14, %rdi
callq 0x20b0
testl %eax, %eax
je 0x38dc
movq 0x577c(%rip), %rbx      # 0x8ff0
leaq 0x28bc(%rip), %rsi      # 0x6137
movl $0x2d, %edx
movq %rbx, %rdi
callq 0x2200
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2200
movq %rax, %rbx
leaq 0x292d(%rip), %rsi      # 0x61ce
movl $0x1, %edx
movq %rax, %rdi
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2150
movl $0x50, %edi
callq 0x21e0
movq %rax, %r14
movq %rax, %rdi
callq 0x414e
movq %r14, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movl $0x50, %esi
movq %r14, %rdi
callq 0x21f0
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O1/irakr[P]Minimal-File-Compression-Tool/src/compression-driver.cpp
// Function: CompressionDriver::getCompressorName[abi:cxx11]() const
std::string CompressionDriver :: getCompressorName() const {
	Log(this, "Started...");
	if(!m_Compressor) {
		Log(this, "[Fatal Error] Unable to get compression name.");
		return "";
	}

	return m_Compressor->name();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rsi), %rax
testq %rax, %rax
je 0x393f
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x3612
jmp 0x3958
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x2824(%rip), %rdx      # 0x6171
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x36a2
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/irakr[P]Minimal-File-Compression-Tool/src/header.cpp
// Function: build_header(HeaderStruct*, std::unordered_map<unsigned char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::hash<unsigned char>, std::equal_to<unsigned char>, std::allocator<std::pair<unsigned char const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)
void build_header(HeaderStruct *hdr, CodewordTable &cw_table) {
    Log_static("Started...");
    if(!hdr)
        return;

    memset(hdr, 0, sizeof(*hdr));

    hdr->nSyms = cw_table.size();
    hdr->cw_table = new HeaderStruct::codeword_table[hdr->nSyms];

    // Migrate the CodewordTable contents to codeword_table contents
    int i = 0;
    for(auto &x : cw_table) {
        hdr->cw_table[i].symbol = x.first;
        hdr->cw_table[i].codeword = str2bits(x.second);
        hdr->cw_table[i].nBits = x.second.length();
        ++i;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x461c
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x20(%rdi)
movq 0x18(%rsi), %rax
movzbl %al, %eax
movb %al, 0x18(%rdi)
leaq (%rax,%rax,2), %rdi
callq 0x2030
movq %rax, 0x20(%r14)
movq 0x10(%rbx), %rdx
testq %rdx, %rdx
je 0x4615
xorl %esi, %esi
movb 0x8(%rdx), %cl
leaq (%rsi,%rsi,2), %rdi
movb %cl, (%rax,%rdi)
movq 0x18(%rdx), %r8
testq %r8, %r8
je 0x45fd
movq 0x10(%rdx), %r9
leal -0x1(%r8), %ecx
movl $0x1, %r11d
xorl %r10d, %r10d
movzbl -0x1(%r9,%r11), %ebx
cmpl $0x30, %ebx
je 0x45e1
cmpl $0x31, %ebx
jne 0x45ed
movl $0x1, %ebx
shll %cl, %ebx
orb %bl, %r10b
jmp 0x45ed
movl $0x1, %ebx
shll %cl, %ebx
notb %bl
andb %bl, %r10b
movzbl %r11b, %ebx
incq %r11
decb %cl
cmpq %rbx, %r8
ja 0x45c5
jmp 0x4600
xorl %r10d, %r10d
movb %r10b, 0x1(%rax,%rdi)
movb %r8b, 0x2(%rax,%rdi)
incq %rsi
movq (%rdx), %rdx
testq %rdx, %rdx
jne 0x45a1
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/irakr[P]Minimal-File-Compression-Tool/src/header.cpp
// Function: get_compressed_size(HeaderStruct*, std::unordered_map<unsigned char, double, std::hash<unsigned char>, std::equal_to<unsigned char>, std::allocator<std::pair<unsigned char const, double>>> const&)
size_t get_compressed_size(HeaderStruct * const hdr, const FrequencyTable &freqsym_map) {
    Log_static("Started...");
    if(!hdr)
        return -1;

    size_t ret;
    double temp1 = 0, temp2 = 0;

    // XXX... Note that this calculates the size in terms of bits.
    // Convert it to bytes before returning.
    for(uint8_t i = 0; i < hdr->nSyms; i++) {
        temp1 = ( (double)freqsym_map.at(hdr->cw_table[i].symbol) * hdr->original_size ) / 100.0; // % to number
        temp2 += (double)hdr->cw_table[i].nBits * temp1;
    }

    temp2 /= 8;
    ret = ceil(temp2);
    return ret;
}

// Assembly:
testq %rdi, %rdi
je 0x46cc
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpb $0x0, 0x18(%rdi)
je 0x46d4
movq %rsi, %rbx
xorpd %xmm0, %xmm0
xorl %r15d, %r15d
xorl %r12d, %r12d
movsd %xmm0, (%rsp)
movq 0x20(%r14), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x4888
movsd 0x8(%r14), %xmm0
unpcklps 0x1b97(%rip), %xmm0     # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1b9f(%rip), %xmm0     # 0x6210
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd (%rax), %xmm1
divsd 0x1987(%rip), %xmm1     # 0x6010
movq 0x20(%r14), %rax
movzbl 0x2(%rax,%r15), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd %xmm1, %xmm0
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd (%rsp), %xmm0
incq %r12
movzbl 0x18(%r14), %eax
addq $0x3, %r15
cmpq %rax, %r12
jb 0x4648
mulsd 0x1b56(%rip), %xmm0     # 0x6220
jmp 0x46d8
movq $-0x1, %rax
retq
xorpd %xmm0, %xmm0
callq 0x2060
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
subsd 0x1b37(%rip), %xmm0     # 0x6228
cvttsd2si %xmm0, %rax
andq %rdx, %rax
orq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/irakr[P]Minimal-File-Compression-Tool/src/header.cpp
// Function: dump_content(HeaderStruct*, unsigned char*, unsigned long, unsigned char*)
void dump_content(HeaderStruct* header, byte *ibuff, size_t ibuff_size, byte* obuff) {
    Log_static("Started...");
    if(!header || !ibuff || !obuff)
        return; // TODO... Create a NullArgumentException class

    // Push the bits into buff according to
    // the codeword_table in the header.
    HeaderStruct::codeword_table *cw_entry;
    //@ BitStream bit_stream(header->compressed_size); // FIXME... Incorrect argument
    BitVector bit_vector;
    uint32_t i;
    for(i = 0; i < ibuff_size; i++) {
        cw_entry = get_cw_entry(header, ibuff+i);

        try {
            bit_vector.appendByte(cw_entry->codeword, cw_entry->nBits);
        } catch(std::overflow_error *e) {
        	Log_static(e->what());
        	exit(1);
            break;
        }

    }

    ::memcpy(obuff, bit_vector.toCharArray(), bit_vector.getNumberOfBytes());

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testq %rbx, %rbx
sete %al
orb %cl, %al
jne 0x4842
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x8(%rsp), %rdi
callq 0x4b10
testq %r14, %r14
je 0x480c
xorl %ebp, %ebp
leaq 0x8(%rsp), %r13
movb (%r15,%rbp), %al
cmpb %al, 0x4a2c(%rip)       # 0x91d0
jne 0x47af
movq 0x4a4b(%rip), %rax      # 0x91f8
jmp 0x47f5
movzbl 0x18(%r12), %ecx
testq %rcx, %rcx
je 0x47e3
movq 0x20(%r12), %rdi
xorl %edx, %edx
movb (%rdi), %sil
cmpb %al, %sil
je 0x47d7
incq %rdx
addq $0x3, %rdi
cmpq %rdx, %rcx
jne 0x47c1
movl %ecx, %edx
movb %sil, 0x49f2(%rip)      # 0x91d0
movzbl %dl, %eax
jmp 0x47e5
xorl %eax, %eax
leaq (%rax,%rax,2), %rax
addq 0x20(%r12), %rax
movq %rax, 0x4a03(%rip)      # 0x91f8
movzbl 0x1(%rax), %esi
movzbl 0x2(%rax), %edx
movq %r13, %rdi
callq 0x4fe6
incl %ebp
cmpq %r14, %rbp
jb 0x479a
leaq 0x8(%rsp), %rdi
callq 0x50b4
movl 0x10(%rsp), %edx
movq 0x8(%rsp), %r14
subl %r14d, %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2190
testq %r14, %r14
je 0x4842
movq 0x18(%rsp), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x21f0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x4868
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x4868
movq %rbx, %rdi
movl %edx, %esi
callq 0x23a3
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x487f
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O1/irakr[P]Minimal-File-Compression-Tool/src/main.cpp
// Function: main
int main(int argc, char **argv) {

	cout << " --- Still under construction ---" << endl;
	Log_static("Started...");
	
	try {
		CompressionDriver driver(argc, (const char**)(argv+1));
		driver.setCompressor("Huffman-Coding");
		cout << "Selected algorithm: " << driver.getCompressorName() << endl;
		driver.compressAll();
	}
	catch(exception &e) {
		Log_static(e.what());
		return FATAR_ERROR;
	}

	return SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movq 0x46de(%rip), %r14      # 0x8fc0
leaq 0x1969(%rip), %rsi      # 0x6252
movl $0x21, %edx
movq %r14, %rdi
callq 0x2200
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2150
addq $0x8, %rbx
leaq 0x28(%rsp), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x3740
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x17e8(%rip), %rsi      # 0x6128
leaq 0x17ef(%rip), %rdx      # 0x6136
leaq 0x8(%rsp), %rdi
callq 0x36a2
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x3850
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4977
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x4642(%rip), %rdi      # 0x8fc0
leaq 0x18ef(%rip), %rsi      # 0x6274
movl $0x14, %edx
callq 0x2200
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x3916
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x4611(%rip), %rdi      # 0x8fc0
callq 0x2200
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2150
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x49f5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x28(%rsp), %rdi
callq 0x3c9e
leaq 0x28(%rsp), %rdi
callq 0x4a72
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4a24
jmp 0x4a2c
jmp 0x4a24
movq %rdx, %r14
movq %rax, %rbx
jmp 0x4a53
movq %rdx, %r14
movq %rax, %rbx
jmp 0x4a49
movq %rdx, %r14
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4a49
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x28(%rsp), %rdi
callq 0x4a72
movq %rbx, %rdi
cmpl $0x1, %r14d
jne 0x4a6d
callq 0x20e0
callq 0x22e0
movl $0x2, %eax
jmp 0x4a0b
callq 0x2320