LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/IsseW[P]bytepusher/src/grid/rules.cpp
// Function: game_of_life_rule(Grid&, unsigned int, unsigned int)
void game_of_life_rule(Grid& grid, uint32_t x, uint32_t y) {
  Tile tile = grid.get(x, y);
  uint32_t count = grid.count_neighbors(x, y);
  if (tile == Tile::Alive) {
    if (count < 2 || count > 3) {
      tile = Tile::Dead;
    }
  } else if (tile == Tile::Dead && count == 3) {
    tile = Tile::Alive;
  }
  grid.set(x, y, tile);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
callq 0x2978
movl %eax, %r15d
movl $0xff, %r12d
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
movl $0xff, %ecx
movl $0x1, %r8d
callq 0x29a0
cmpb $-0x1, %r15b
je 0x2aae
cmpl $0x3, %eax
movzbl %r15b, %eax
cmovnel %eax, %r12d
testb %r15b, %r15b
cmovnel %eax, %r12d
jmp 0x2abb
andl $-0x2, %eax
cmpl $0x2, %eax
sete %r12b
negb %r12b
movzbl %r12b, %ecx
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2992
// File: /workspace/github_cpp_makefile_star2_O1/IsseW[P]bytepusher/src/grid/rules.cpp
// Function: water_sim_rule(Grid&, unsigned int, unsigned int)
void water_sim_rule(Grid& grid, uint32_t x, uint32_t y) {
  Tile tile = grid.get(x, y);
  if (tile == Tile::Alive) {
    if (grid.get(x, y + 1) == Tile::Dead) {
      tile = Tile::Dead;
      grid.set(x, y + 1, Tile::Alive);
    } else if (grid.get(x + 1, y) == Tile::Dead && grid.get(x + 1, y + 1) == Tile::Dead) {
      tile = Tile::Dead;
      grid.set(x + 1, y + 1, Tile::Alive);
    } else if (grid.get(x - 1, y) == Tile::Dead && grid.get(x - 1, y + 1) == Tile::Dead) {
      tile = Tile::Dead;
      grid.set(x - 1, y + 1, Tile::Alive);
    }
  }
  grid.set(x, y, tile);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
callq 0x2978
movl %eax, %r13d
cmpb $-0x1, %al
jne 0x2b6d
leal 0x1(%rbx), %ebp
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x2978
movl %r14d, %r12d
testb %al, %al
je 0x2b58
leal 0x1(%r14), %r12d
movq %r15, %rdi
movl %r12d, %esi
movl %ebx, %edx
callq 0x2978
testb %al, %al
jne 0x2b2f
movq %r15, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x2978
testb %al, %al
je 0x2b58
leal -0x1(%r14), %r12d
movq %r15, %rdi
movl %r12d, %esi
movl %ebx, %edx
callq 0x2978
movb $-0x1, %r13b
testb %al, %al
jne 0x2b6d
movq %r15, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x2978
testb %al, %al
jne 0x2b6d
movq %r15, %rdi
movl %r12d, %esi
movl %ebp, %edx
movl $0xff, %ecx
callq 0x2992
xorl %r13d, %r13d
movzbl %r13b, %ecx
movq %r15, %rdi
movl %r14d, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2992
// File: /workspace/github_cpp_makefile_star2_O1/IsseW[P]bytepusher/src/renderer/renderer.cpp
// Function: Renderer::Renderer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int, unsigned int, unsigned int, unsigned int)
Renderer::Renderer(
    const std::string& name, 
    uint32_t bw, uint32_t bh,
    uint32_t ww, uint32_t wh
):  bw{bw}, bh{bh},
    ww{ww}, wh{wh} 
{
    init_backend();
    SDL_CreateWindowAndRenderer(ww, wh, 0, &sdl_win, &sdl_rend);
    sdl_text = SDL_CreateTexture(sdl_rend, SDL_PIXELFORMAT_RGB332, SDL_TEXTUREACCESS_TARGET, bw, bh);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r12d
movl %r8d, %r13d
movl %ecx, %ebp
movl %edx, %r15d
movq %rdi, %r14
movl %edx, (%rdi)
movl %ecx, 0x4(%rdi)
movl %r8d, 0x8(%rdi)
movl %r9d, 0xc(%rdi)
leaq 0x38(%rdi), %rax
movq %rax, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
cmpb $0x0, 0x253c(%rip)      # 0x5132
jne 0x2c09
movl $0x20, %edi
callq 0x2140
movb $0x1, 0x2529(%rip)      # 0x5132
leaq 0x28(%r14), %rcx
leaq 0x30(%r14), %rbx
movl %r13d, %edi
movl %r12d, %esi
xorl %edx, %edx
movq %rbx, %r8
callq 0x2080
movq (%rbx), %rdi
movl $0x14110801, %esi       # imm = 0x14110801
movl $0x2, %edx
movl %r15d, %ecx
movl %ebp, %r8d
callq 0x2220
movq %rax, 0x20(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq 0x48(%r14), %rax
testq %rax, %rax
je 0x2c66
movq (%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %r15, %rdi
callq 0x2200
movq %rax, %rdi
callq 0x2706
// File: /workspace/github_cpp_makefile_star2_O1/IsseW[P]bytepusher/src/renderer/renderer.cpp
// Function: Renderer::finalize()
void Renderer::finalize(){
    SDL_UnlockTexture(sdl_text);
    SDL_SetRenderDrawColor(sdl_rend, 0, 0, 0, 0);
    SDL_RenderClear(sdl_rend);
    SDL_RenderCopy(sdl_rend, sdl_text, nullptr, nullptr);
    SDL_RenderPresent(sdl_rend);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x21d0
movq 0x30(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x21e0
movq 0x30(%rbx), %rdi
callq 0x2150
movq 0x20(%rbx), %rsi
movq 0x30(%rbx), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2180
movq 0x30(%rbx), %rdi
popq %rbx
jmp 0x2060
nop
// File: /workspace/github_cpp_makefile_star2_O1/IsseW[P]bytepusher/src/renderer/renderer.cpp
// Function: Renderer::poll_events()
bool Renderer::poll_events(){
    SDL_Event event;
    while(SDL_PollEvent(&event)){
        if(meh)
            meh(event);
        switch(event.type){
        case SDL_QUIT:
            destroy();
            return false;
        }
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x38(%rdi), %r14
movq %rsp, %r15
movq %r15, %rdi
callq 0x20c0
movl %eax, %ebp
testl %eax, %eax
je 0x2d81
cmpq $0x0, 0x48(%rbx)
je 0x2d70
movq %r14, %rdi
movq %r15, %rsi
callq *0x50(%rbx)
cmpl $0x100, (%rsp)          # imm = 0x100
jne 0x2d52
movq %rbx, %rdi
callq 0x2ca6
testl %ebp, %ebp
sete %al
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ridgelab[P]Kmer-SSR/src/TaskQueue.cpp
// Function: TaskQueue::setUp(unsigned int)
void TaskQueue::setUp(uint32_t max_capacity)
{
	this->tasks = new queue<Task*>();
	sem_init(&(this->lock),0,1);
	sem_init(&(this->unfinished_business),0,0);
	sem_init(&(this->space_available),0,max_capacity);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl $0x50, %edi
callq 0x2170
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x40(%rax)
movq %rax, %rdi
xorl %esi, %esi
callq 0x3f34
movq %r15, (%r14)
leaq 0x8(%r14), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x2140
leaq 0x28(%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2140
addq $0x48, %r14
movq %r14, %rdi
xorl %esi, %esi
movl %ebx, %edx
popq %rbx
popq %r14
popq %r15
jmp 0x2140
movq %rax, %rbx
movl $0x50, %esi
movq %r15, %rdi
callq 0x2180
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O1/ridgelab[P]Kmer-SSR/src/TaskQueue.cpp
// Function: TaskQueue::clear()
void TaskQueue::clear()
{
	sem_wait(&(this->lock));
	while (!this->tasks->empty())
	{
		delete this->tasks->front();
		this->tasks->pop();

		sem_wait(&(this->unfinished_business)); // this will never block (well, it shouldn't...if it does, that's a logic error)
		sem_post(&(this->space_available));
	}
	sem_post(&(this->lock));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0x20b0
movq (%r14), %rcx
movq 0x10(%rcx), %rax
cmpq %rax, 0x30(%rcx)
je 0x39c9
leaq 0x28(%r14), %r15
leaq 0x48(%r14), %r12
movq (%rax), %r13
testq %r13, %r13
je 0x39a4
movq %r13, %rdi
callq 0x43c0
movl $0x48, %esi
movq %r13, %rdi
callq 0x2180
movq (%r14), %rdi
callq 0x42be
movq %r15, %rdi
callq 0x20b0
movq %r12, %rdi
callq 0x2230
movq (%r14), %rcx
movq 0x10(%rcx), %rax
cmpq %rax, 0x30(%rcx)
jne 0x3987
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2230
// File: /workspace/github_cpp_makefile_star2_O1/ridgelab[P]Kmer-SSR/src/TaskQueue.cpp
// Function: TaskQueue::add(Task*)
void TaskQueue::add(Task* task)
{
	sem_wait(&(this->space_available));
	sem_wait(&(this->lock));
	this->tasks->push(task);
	sem_post(&(this->lock));
	sem_post(&(this->unfinished_business));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, (%rsp)
addq $0x48, %rdi
callq 0x20b0
leaq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x20b0
movq (%rbx), %rdi
movq 0x30(%rdi), %rax
movq 0x40(%rdi), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x3a64
movq (%rsp), %rcx
movq %rcx, (%rax)
addq $0x8, 0x30(%rdi)
jmp 0x3a6c
movq %rsp, %rsi
callq 0x40aa
movq %r14, %rdi
callq 0x2230
addq $0x28, %rbx
movq %rbx, %rdi
callq 0x2230
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/ridgelab[P]Kmer-SSR/src/TaskQueue.cpp
// Function: TaskQueue::get()
Task* TaskQueue::get()
{
	sem_wait(&(this->unfinished_business));
	sem_wait(&(this->lock));
	Task* temp_ptr = this->tasks->front();
	this->tasks->pop();
	sem_post(&(this->lock));
	sem_post(&(this->space_available));
	return temp_ptr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0x28, %rdi
callq 0x20b0
leaq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x20b0
movq (%rbx), %rdi
movq 0x10(%rdi), %rax
movq (%rax), %r15
callq 0x42be
movq %r14, %rdi
callq 0x2230
addq $0x48, %rbx
movq %rbx, %rdi
callq 0x2230
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ridgelab[P]Kmer-SSR/src/TaskQueue.cpp
// Function: TaskQueue::toString[abi:cxx11]()
string TaskQueue::toString()
{
	queue<Task*>* new_tasks = new queue<Task*>();

	string output = "TaskQueue: { ";

	sem_wait(&(this->lock));

	Task* front_task = this->tasks->front();
	
	while (!this->tasks->empty())
	{
		if (!front_task->equalTo(this->tasks->front()))
		{
			output += ", ";
		}
		
		output += this->tasks->front()->toString();
		
		new_tasks->push(this->tasks->front());
		this->tasks->pop();
	}

	output += " }";

	queue<Task*>* temp_ptr = this->tasks;
	this->tasks = new_tasks;
	delete temp_ptr;

	sem_post(&(this->lock));

	return output;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x50, %edi
callq 0x2170
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x40(%rax)
movq %rax, %rdi
xorl %esi, %esi
callq 0x3f34
leaq 0x10(%rbx), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rbx)
leaq 0x2396(%rip), %rsi      # 0x5ebc
leaq 0x239c(%rip), %rdx      # 0x5ec9
movq %rbx, %rdi
callq 0x3664
leaq 0x8(%r15), %rdi
movq %rdi, 0x10(%rsp)
callq 0x20b0
movq (%r15), %rcx
movq 0x10(%rcx), %rax
cmpq %rax, 0x30(%rcx)
je 0x3c00
movq (%rax), %r13
leaq 0x28(%rsp), %r12
leaq 0x18(%rsp), %rbp
movq (%rax), %rsi
movq %r13, %rdi
callq 0x46ca
testb %al, %al
jne 0x3b7f
movq %rbx, %rdi
leaq 0x2350(%rip), %rsi      # 0x5eca
callq 0x2270
movq (%r15), %rax
movq 0x10(%rax), %rax
movq (%rax), %rsi
movq %rbp, %rdi
callq 0x47c0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x2050
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x3bba
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2180
movq (%r15), %rax
movq 0x10(%rax), %rsi
movq 0x30(%r14), %rax
movq 0x40(%r14), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x3bdf
movq (%rsi), %rcx
movq %rcx, (%rax)
addq $0x8, 0x30(%r14)
jmp 0x3be7
movq %r14, %rdi
callq 0x40aa
movq (%r15), %rdi
callq 0x42be
movq (%r15), %rcx
movq 0x10(%rcx), %rax
cmpq %rax, 0x30(%rcx)
jne 0x3b61
leaq 0x22c6(%rip), %rsi      # 0x5ecd
movq %rbx, %rdi
callq 0x2270
movq (%r15), %r12
movq %r14, (%r15)
testq %r12, %r12
je 0x3c2f
movq %r12, %rdi
callq 0x3ee4
movl $0x50, %esi
movq %r12, %rdi
callq 0x2180
movq 0x10(%rsp), %rdi
callq 0x2230
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3c7a
jmp 0x3c7a
movq %rax, %r15
movl $0x50, %esi
movq %r14, %rdi
jmp 0x3c92
jmp 0x3c7a
movq %rax, %r15
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x3c7d
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x3c7d
movq %rax, %r15
movq (%rbx), %rdi
cmpq 0x8(%rsp), %rdi
je 0x3c97
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2180
movq %r15, %rdi
callq 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O1/ridgelab[P]Kmer-SSR/src/Task.cpp
// Function: Task::Task(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&, unsigned int, unsigned int)
Task::Task(const string &_identifier, const string &_sequence, uint32_t _global_pos, uint32_t _global_seq_length)
{
	this->identifier = _identifier;
	this->sequence = _sequence;
	this->global_pos = _global_pos;
	this->global_seq_length = _global_seq_length;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movl %ecx, %r15d
movq %rdx, %r12
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movb %al, 0x10(%rdi)
leaq 0x20(%rdi), %r13
leaq 0x30(%rdi), %r14
movq %r14, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movb %al, 0x30(%rdi)
callq 0x20a0
movq %r13, %rdi
movq %r12, %rsi
callq 0x20a0
movl %r15d, 0x40(%rbx)
movl %ebp, 0x44(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq (%r13), %rdi
cmpq %r14, %rdi
je 0x43ab
movq (%r14), %rsi
incq %rsi
callq 0x2180
movq %rbx, %rdi
movq (%rsp), %rsi
callq 0x22fd
movq %r15, %rdi
callq 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O1/ridgelab[P]Kmer-SSR/src/Task.cpp
// Function: Task::equalTo(Task*) const
bool Task::equalTo(Task* other) const
{
	if (this->identifier != other->getID())
	{
		return false;
	}
	if (this->sequence != other->getSequence())
	{
		return false;
	}
	if (this->global_pos != other->getGlobalPosition())
	{
		return false;
	}
	if (this->global_seq_length != other->getGlobalSequenceLength())
	{
		return false;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsi), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %rsp, %r15
movq %r15, %rdi
callq 0x3574
movq 0x8(%r14), %rdx
movb $0x1, %bpl
cmpq 0x8(%r15), %rdx
jne 0x4723
testq %rdx, %rdx
je 0x4721
movq (%rsp), %rsi
movq (%r14), %rdi
callq 0x2190
testl %eax, %eax
setne %bpl
jmp 0x4723
xorl %ebp, %ebp
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4739
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
testb %bpl, %bpl
jne 0x47b0
movq %rsp, %r15
movq %r12, (%r15)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x3574
movq 0x28(%r14), %rdx
movb $0x1, %bpl
cmpq 0x8(%r15), %rdx
jne 0x4780
testq %rdx, %rdx
je 0x477e
movq (%rsp), %rsi
movq 0x20(%r14), %rdi
callq 0x2190
testl %eax, %eax
setne %bpl
jmp 0x4780
xorl %ebp, %ebp
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4796
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
testb %bpl, %bpl
jne 0x47b0
movl 0x40(%r14), %eax
cmpl 0x40(%rbx), %eax
jne 0x47b0
movl 0x44(%r14), %eax
cmpl 0x44(%rbx), %eax
sete %al
jmp 0x47b2
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/dm4[P]huffman-homework/my_encode.cc
// Function: assignCLRecursive(int, char)
void assignCLRecursive(int index, char cl) {
    CLRecordEntry *entry = CLRecord[index];
    entry->cl = cl;
    if (entry->s1 < 0)
        assignCLRecursive(~entry->s1, cl + 1);
    if (entry->s2 < 0)
        assignCLRecursive(~entry->s2, cl + 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movslq %edi, %rax
movq 0x5c82(%rip), %rcx      # 0x7130
movq (%rcx,%rax,8), %r14
movb %bl, 0x8(%r14)
movl (%r14), %edi
testl %edi, %edi
jns 0x14ca
notl %edi
leal 0x1(%rbx), %eax
movsbl %al, %esi
callq 0x149b
movl 0x4(%r14), %edi
testl %edi, %edi
jns 0x14d8
notl %edi
incb %bl
jmp 0x14a4
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/dm4[P]huffman-homework/my_encode.cc
// Function: buildSymbolsCodeword()
void buildSymbolsCodeword() {
    unsigned int codeword = 0;
    symbols[0]->codeword = codeword;
    for (int i = 1; i < symbols.size(); i++) {
        int lengthDiff = symbols[i]->cl - symbols[i - 1]->cl;
        codeword += 1;
        codeword <<= lengthDiff;
        symbols[i]->codeword = codeword;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x5b47(%rip), %rax      # 0x7148
movq (%rax), %rcx
movl $0x0, (%rcx)
movq 0x5b3f(%rip), %rdx      # 0x7150
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x2, %rdx
jb 0x1645
xorl %esi, %esi
movl $0x1, %edi
movq -0x8(%rax,%rdi,8), %r8
movq (%rax,%rdi,8), %r9
movl 0x4(%r9), %ecx
subl 0x4(%r8), %ecx
incl %esi
shll %cl, %esi
movl %esi, (%r9)
incq %rdi
cmpq %rdi, %rdx
jne 0x1625
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Erkaman[P]spiky-anim/main.cpp
// Function: zeroPad[abi:cxx11](int, int)
std::string zeroPad(int n, int len) {
    string str = "";

    str = to_string(n);

    while(str.size() < len) {
        str = "0" + str;
    }

    return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, -0x2c(%rbp)
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x38(%rbp)
movq %rax, (%rdi)
leaq 0x1e12(%rip), %rdx      # 0x414a
movq %rdx, %rsi
callq 0x3830
movl %r15d, %r14d
negl %r14d
cmovsl %r15d, %r14d
movl $0x1, %r13d
cmpl $0xa, %r14d
jb 0x23a0
movl $0x4, %r13d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x2397
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x239d
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x23a0
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r13d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x2364
addl $-0x3, %r13d
jmp 0x23a0
addl $-0x2, %r13d
jmp 0x23a0
decl %r13d
shrl $0x1f, %r15d
leal (%r15,%r13), %esi
leaq -0x48(%rbp), %r12
movq %r12, -0x10(%r12)
leaq -0x58(%rbp), %rdi
movl $0x2d, %edx
callq 0x2150
movl %r15d, %edi
leaq -0x58(%rbp), %r15
addq (%r15), %rdi
movl %r13d, %esi
movl %r14d, %edx
callq 0x3672
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2170
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x23f3
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2120
movslq -0x2c(%rbp), %r13
cmpq %r13, 0x8(%rbx)
jae 0x2438
leaq 0x1c4c(%rip), %r14      # 0x4050
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x351d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2170
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x2432
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2120
cmpq %r13, 0x8(%rbx)
jb 0x2404
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x244c
movq %rax, %r14
movq (%rbx), %rdi
cmpq -0x38(%rbp), %rdi
je 0x2467
movq -0x38(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2120
movq %r14, %rdi
callq 0x21b0
// File: /workspace/github_cpp_makefile_star2_O1/eschwabe[P]interview-practice/src/libds_list.cpp
// Function: List::AppendHead(int const&)
void List::AppendHead(const int& value) {
  if(head_.get() == nullptr) {
    head_.reset(new List::Node());
    head_.get()->value = value;
    tail_ = head_.get();
  } else {
    List::Node* tmp = new List::Node();
    tmp->value = value;
    tmp->next = std::move(head_);
    head_.reset(tmp);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r12
movl $0x10, %edi
callq 0x1070
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
testq %r12, %r12
je 0x1252
movl (%r14), %eax
movl %eax, 0x8(%r15)
movq $0x0, (%rbx)
movq %r15, %rdi
movq %r12, %rsi
callq 0x1940
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1940
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1940
movl (%r14), %eax
movq (%rbx), %rcx
movl %eax, 0x8(%rcx)
movq %rcx, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/eschwabe[P]interview-practice/src/libds_list.cpp
// Function: List::AppendTail(int const&)
void List::AppendTail(const int& value) {
  if(head_.get() == nullptr) {
    head_.reset(new List::Node());
    head_.get()->value = value;
    tail_ = head_.get();
  } else {
    List::Node* tmp = new List::Node();
    tmp->value = value;
    tmp->next = nullptr;
    tail_->next.reset(tmp);
    tail_ = tail_->next.get();
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %r12
movl $0x10, %edi
callq 0x1070
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
testq %r12, %r12
je 0x12c9
movl (%r15), %eax
movl %eax, 0x8(%r14)
movq %r14, %rdi
xorl %esi, %esi
callq 0x1940
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x1940
movq 0x8(%rbx), %rax
movq (%rax), %rax
movq %rax, 0x8(%rbx)
jmp 0x12e1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1940
movl (%r15), %eax
movq (%rbx), %rcx
movl %eax, 0x8(%rcx)
movq %rcx, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/eschwabe[P]interview-practice/src/libds_list.cpp
// Function: List::RemoveTail()
int List::RemoveTail() {
  if(tail_ == nullptr) {
    return -1;
  } else if(head_.get() == tail_) {
    int tmp = tail_->value;
    tail_ = nullptr;
    head_.release();
    return tmp;
  } else {
    int tmp = tail_->value;
    Node* prev = nullptr;
    Node* current = head_.get();
    while(current != nullptr && current->next.get() != nullptr) {
      prev = current;
      current = current->next.get();
    }
    prev->next.release();
    tail_ = prev;
    return tmp;
  }
}

// Assembly:
movq 0x8(%rdi), %rdx
testq %rdx, %rdx
je 0x133f
movq (%rdi), %rcx
movl 0x8(%rdx), %eax
cmpq %rdx, %rcx
je 0x1345
testq %rcx, %rcx
je 0x134c
xorl %esi, %esi
movq %rsi, %rdx
movq %rcx, %rsi
movq (%rcx), %rcx
testq %rcx, %rcx
jne 0x132f
jmp 0x134e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
retq
xorl %edx, %edx
movq $0x0, (%rdx)
movq %rdx, 0x8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/thresholdSolver.cc
// Function: ThresholdSolver::init(int, int)
void ThresholdSolver::init(int readLength, int seedNum)
{
	this->seedNum = seedNum;
	vector< int > thresholdVec (seedNum);
	for(int i = 0; i < thresholdVec.size(); i++)
		thresholdVec[i] = readLength;
	this->thresholdVec = thresholdVec;
	this->frequencyVec.resize(thresholdVec.size(), -1);
	this->lengthVec.resize(thresholdVec.size(), 0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movl %edx, 0xc8(%rdi)
movslq %edx, %rsi
leaq 0x8(%rsp), %r14
leaq 0x4(%rsp), %rdx
movq %r14, %rdi
callq 0x6db4
movq (%r14), %rax
movq 0x8(%r14), %rdx
subq %rax, %rdx
je 0x50f8
sarq $0x2, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
leaq 0x3(%rdx), %rcx
andq $-0x4, %rcx
decq %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x6fe5(%rip), %xmm1     # 0xc010
movdqa 0x6fed(%rip), %xmm2     # 0xc020
xorl %edx, %edx
movdqa 0x6ff3(%rip), %xmm3     # 0xc030
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0x70c3(%rip), %xmm5     # 0xc110
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %esi
notl %esi
testb $0x1, %sil
je 0x5085
movl %ebp, (%rax,%rdx,4)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x5098
movl %ebp, 0x4(%rax,%rdx,4)
movdqa %xmm1, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
pxor %xmm4, %xmm6
pextrw $0x0, %xmm6, %esi
testb $0x1, %sil
je 0x50d4
movl %ebp, 0x8(%rax,%rdx,4)
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x50e3
movl %ebp, 0xc(%rax,%rdx,4)
addq $0x4, %rdx
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
cmpq %rdx, %rcx
jne 0x504d
leaq 0x450(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x6e3e
movq 0x10(%rsp), %rsi
subq 0x8(%rsp), %rsi
leaq 0x480(%rbx), %rdi
sarq $0x2, %rsi
leaq 0x4(%rsp), %rdx
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
callq 0x424c
movq 0x10(%rsp), %rsi
subq 0x8(%rsp), %rsi
addq $0x468, %rbx            # imm = 0x468
sarq $0x2, %rsi
leaq 0x4(%rsp), %rdx
movl $0x0, (%rdx)
movq %rbx, %rdi
callq 0x424c
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x516d
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x517a
jmp 0x517a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5194
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x3470
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/thresholdSolver.cc
// Function: ThresholdSolver::analyzeRead(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void ThresholdSolver::analyzeRead(string read) {
	int minLength = tree.getHashLength();
	int maxLength = tree.getFullLength();

	int pos = 0;

	for (int i = 0; i < thresholdVec.size(); i++) {
		string seed = read.substr(pos, maxLength);

		tree.query(seed, thresholdVec[i]);
		frequencyVec[i] = tree.frequency();
		lengthVec[i] = tree.effectiveLength();
		pos += tree.effectiveLength();

		if (pos > read.length() - minLength)
			break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xd0(%rdi), %r15
movq %r15, %rdi
callq 0x84aa
movl %eax, %ebp
movq %r15, %rdi
callq 0x84ae
movq 0x458(%r14), %rcx
cmpq 0x450(%r14), %rcx
je 0x534e
cltq
movq %rax, 0x50(%rsp)
movslq %ebp, %rax
movq %rax, 0x40(%rsp)
xorl %r12d, %r12d
xorl %ebp, %ebp
movq %r14, 0x48(%rsp)
movslq %ebp, %rdx
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
movq 0x50(%rsp), %rcx
callq 0x32a0
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x4494
movq 0x450(%r14), %rax
movl (%rax,%r12,4), %edx
movq %r15, %rdi
movq %rsp, %rsi
callq 0x84b2
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x52be
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
movq %r15, %rdi
callq 0x8650
movq 0x480(%r14), %rcx
movl %eax, (%rcx,%r12,4)
movq %r15, %rdi
callq 0x8648
movq 0x468(%r14), %rcx
movl %eax, (%rcx,%r12,4)
movq %r15, %rdi
callq 0x8648
movl %eax, %r13d
movq %r15, %r14
movq %rbx, %r15
movq 0x8(%rbx), %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x5315
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3290
addl %r13d, %ebp
movslq %ebp, %rax
subq 0x40(%rsp), %rbx
cmpq %rax, %rbx
movq %r15, %rbx
movq %r14, %r15
movq 0x48(%rsp), %r14
jb 0x534e
incq %r12
movq 0x458(%r14), %rax
subq 0x450(%r14), %rax
sarq $0x2, %rax
cmpq %r12, %rax
ja 0x525a
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x5380
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x5380
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x539c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x3470
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/thresholdSolver.cc
// Function: ThresholdSolver::printFreqTable()
void ThresholdSolver::printFreqTable() {
	cout << "Printing Frequency Table." << endl;
	for (int i = 0; i < freqTable.size(); i++)
	{
		for (int j = 0; j<freqTable[i].size(); j++)
			cout << freqTable[i][j] << " ";
		cout << "" << endl;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xa755(%rip), %r14      # 0x10fc8
leaq 0x5a79(%rip), %rsi      # 0xc2f3
movl $0x19, %edx
movq %r14, %rdi
callq 0x32e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31d0
movq 0x38(%rbx), %rax
cmpq 0x30(%rbx), %rax
je 0x6977
xorl %r13d, %r13d
leaq 0x58a2(%rip), %r12      # 0xc168
movq 0x30(%rbx), %rcx
leaq (,%r13,2), %r15
addq %r13, %r15
movq (%rcx,%r15,8), %rax
cmpq %rax, 0x8(%rcx,%r15,8)
je 0x6919
xorl %ebp, %ebp
movl (%rax,%rbp,4), %esi
movq %r14, %rdi
callq 0x3450
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x32e0
incq %rbp
movq 0x30(%rbx), %rcx
movq (%rcx,%r15,8), %rax
movq 0x8(%rcx,%r15,8), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbp, %rcx
ja 0x68e2
movq %r14, %rdi
leaq 0x5c08(%rip), %rsi      # 0xc52b
xorl %edx, %edx
callq 0x32e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31d0
movq 0x38(%rbx), %rax
subq 0x30(%rbx), %rax
incq %r13
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq %r13, %rax
ja 0x68c6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/thresholdSolver.cc
// Function: ThresholdSolver::printTotalFreqTable()
void ThresholdSolver::printTotalFreqTable() {
	cout << "seedNum: " << seedNum << endl;
	for(int i = 0; i < totalFrequency.size(); i++)
	{
		if(totalFrequency[i] != 0)
			cout << i-1 << ": " << totalFrequency[i] << endl;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0xa62f(%rip), %r14      # 0x10fc8
leaq 0x570f(%rip), %rsi      # 0xc0af
movl $0x9, %edx
movq %r14, %rdi
callq 0x32e0
movl 0xc8(%rbx), %esi
movq %r14, %rdi
callq 0x3450
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31d0
movq 0xa8(%rbx), %rax
cmpq %rax, 0xb0(%rbx)
je 0x6a8a
xorl %r13d, %r13d
movq 0xa5c5(%rip), %r14      # 0x10fc8
leaq 0x5be2(%rip), %r15      # 0xc5ec
cmpl $0x0, (%rax,%r13,4)
je 0x6a6d
leal -0x1(%r13), %esi
movq %r14, %rdi
callq 0x3450
movq %rax, %r12
movl $0x2, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x32e0
movq 0xa8(%rbx), %rax
movl (%rax,%r13,4), %esi
movq %r12, %rdi
callq 0x3450
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31d0
incq %r13
movq 0xa8(%rbx), %rax
movq 0xb0(%rbx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r13, %rcx
ja 0x6a0a
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/devvoid[P]vini/./vini.hpp
// Function: Vini::Vini(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Vini(std::string path) : ini_file() {
        std::ifstream file;

        file.open(path.c_str());

        std::stringstream stringbuffer;

        stringbuffer << file.rdbuf();

        file.close();
        
        parse_text(stringbuffer.str());
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x3b0, %rsp            # imm = 0x3B0
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, (%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq $0x0, 0x28(%rdi)
leaq -0x3c0(%rbp), %rdi
callq 0x2200
movq (%r14), %rsi
leaq -0x3c0(%rbp), %rdi
movl $0x8, %edx
callq 0x2110
leaq -0x1b8(%rbp), %rdi
callq 0x2140
leaq -0x1a8(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x2080
leaq -0x3c0(%rbp), %rdi
callq 0x2070
leaq -0x1a0(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x2250
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x32c8
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2eac
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x21d0
movq 0x4105(%rip), %rsi      # 0x6fb8
leaq -0x1b8(%rbp), %rdi
callq 0x2160
leaq -0x138(%rbp), %rdi
callq 0x20c0
leaq -0x3c0(%rbp), %rdi
callq 0x2090
addq $0x3b0, %rsp            # imm = 0x3B0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f10
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x21d0
jmp 0x2f10
jmp 0x2f03
movq %rax, %r14
jmp 0x2f2f
movq %rax, %r14
jmp 0x2f3b
movq %rax, %r14
movq 0x40a1(%rip), %rsi      # 0x6fb8
leaq -0x1b8(%rbp), %rdi
callq 0x2160
leaq -0x138(%rbp), %rdi
callq 0x20c0
leaq -0x3c0(%rbp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x46e6
movq %r14, %rdi
callq 0x2290
nop
// File: /workspace/github_cpp_makefile_star2_O1/devvoid[P]vini/./vini.hpp
// Function: Vini::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string get(std::string section, std::string key, std::string default_value) {
        if (ini_file[section][key] != "")
            return ini_file[section][key];
        
        //If it can't find anything, return default value.
        set(section, key, default_value);

        return default_value;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x37c2
movq %rax, %rdi
movq %r12, %rsi
callq 0x3842
leaq 0x216c(%rip), %rsi      # 0x50f5
movq %rax, %rdi
callq 0x20b0
testl %eax, %eax
je 0x2fc9
movq %r15, %rdi
movq %r13, %rsi
callq 0x37c2
movq %rax, %rdi
movq %r12, %rsi
callq 0x3842
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x41ce
jmp 0x30cb
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x41ce
leaq -0x78(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x41ce
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x41ce
leaq -0x48(%rbp), %rsi
movq %r15, %rdi
callq 0x37c2
leaq -0x88(%rbp), %rsi
movq %rax, %rdi
callq 0x3842
leaq -0x68(%rbp), %rsi
movq %rax, %rdi
callq 0x2100
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x305d
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x3075
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x308e
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21d0
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%r14), %rdx
leaq 0x10(%r14), %rax
cmpq %rax, %rdx
je 0x30ad
movq %rdx, (%rbx)
movq (%rax), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x30b3
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x30ff
movq %rax, %rbx
jmp 0x3117
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x30ff
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x3117
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x3130
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/devvoid[P]vini/./vini.hpp
// Function: Vini::save(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void save(std::string path) {
        std::ofstream file;

        file.open(path.c_str());

        for (vini_file::iterator it = ini_file.begin(); it != ini_file.end(); it++) {
            file << "[" << it->first << "]" << "\n";

            for (vini_content::iterator inner_it = it->second.begin(); inner_it != it->second.end(); inner_it++)
                file << inner_it->first << "=\"" << inner_it->second << "\"\n";
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %rbx
movq %rdi, %r13
leaq -0x238(%rbp), %r14
movq %r14, %rdi
callq 0x2280
movq (%rbx), %rsi
movq %r14, %rdi
movl $0x10, %edx
callq 0x2050
movq 0x18(%r13), %r14
addq $0x8, %r13
cmpq %r13, %r14
je 0x3264
leaq -0x238(%rbp), %r12
leaq 0x1f63(%rip), %r15      # 0x50f3
movq %r13, -0x30(%rbp)
movl $0x1, %edx
movq %r12, %rdi
leaq 0x1f49(%rip), %rsi      # 0x50ec
callq 0x2210
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq %r12, %rdi
callq 0x2210
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x1f24(%rip), %rsi      # 0x50ee
callq 0x2210
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x1f16(%rip), %rsi      # 0x50f4
callq 0x2210
movq 0x58(%r14), %rbx
movq %r14, -0x38(%rbp)
leaq 0x48(%r14), %r13
cmpq %r13, %rbx
je 0x324b
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq %r12, %rdi
callq 0x2210
movq %rax, %r14
movl $0x2, %edx
movq %rax, %rdi
leaq 0x1eda(%rip), %rsi      # 0x50f0
callq 0x2210
movq 0x40(%rbx), %rsi
movq 0x48(%rbx), %rdx
movq %r14, %rdi
callq 0x2210
movl $0x2, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2130
movq %rax, %rbx
cmpq %r13, %rax
jne 0x31f4
movq -0x38(%rbp), %rdi
callq 0x2130
movq %rax, %r14
movq -0x30(%rbp), %r13
cmpq %r13, %rax
jne 0x3194
movq 0x3d65(%rip), %rax      # 0x6fd0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x230(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x238(%rbp,%rcx)
callq 0x2190
leaq -0x140(%rbp), %rdi
callq 0x20c0
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x32b0
jmp 0x32b0
movq %rax, %rbx
leaq -0x238(%rbp), %rdi
callq 0x2230
movq %rbx, %rdi
callq 0x2290
nop
// File: /workspace/github_cpp_makefile_star2_O1/devvoid[P]vini/./vini.hpp
// Function: Vini::split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
std::vector<std::string> split(const std::string &s, char delim) {
        std::vector<std::string> elems;

        std::stringstream ss(s);
        std::string item;

        while(std::getline(ss, item, delim)) {
            elems.push_back(item);
        }

        return elems;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movl %ecx, %r14d
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq -0x1d0(%rbp), %rdi
movq %rdx, %rsi
movl $0x18, %edx
callq 0x2260
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movsbl %r14b, %r14d
leaq -0x1d0(%rbp), %r15
leaq -0x48(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x22b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x372d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x392c
jmp 0x3704
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x3742
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21d0
movq 0x386f(%rip), %rsi      # 0x6fb8
leaq -0x1d0(%rbp), %rdi
callq 0x2160
leaq -0x150(%rbp), %rdi
callq 0x20c0
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x37b2
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x3793
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21d0
movq 0x381e(%rip), %rsi      # 0x6fb8
leaq -0x1d0(%rbp), %rdi
callq 0x2160
leaq -0x150(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x38c2
movq %r14, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/bluesky466[P]ResourcesArscDemo/main.cpp
// Function: readResTableHeader(_IO_FILE*)
void readResTableHeader(FILE* pFile) {
	uint16_t type;
	fread((void*)&type, sizeof(type), 1, pFile);
	if(type == RES_TABLE_TYPE) {
		struct ResTable_header header = {RES_TABLE_TYPE};
		fread((void*)(((char*)&header)+2), sizeof(struct ResTable_header)-2, 1, pFile);
		printf("type:%u, headSize:%u, size:%u, packageCount:%u\n",
				header.header.type,
				header.header.headerSize,
				header.header.size,
				header.packageCount);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x12(%rbp), %r14
movl $0x2, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2160
cmpw $0x2, (%r14)
jne 0x27af
leaq -0x1e(%rbp), %r14
movl $0x0, 0x6(%r14)
movq $0x2, -0x2(%r14)
movl $0xa, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2160
movzwl -0x2(%r14), %esi
movzwl (%r14), %edx
movl 0x2(%r14), %ecx
movl 0x6(%r14), %r8d
leaq 0x28f8(%rip), %rdi      # 0x50a0
xorl %eax, %eax
callq 0x2030
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/bluesky466[P]ResourcesArscDemo/main.cpp
// Function: readResStringPoolHeader(_IO_FILE*)
struct ResStringPool_header readResStringPoolHeader(FILE* pFile) {
	struct ResStringPool_header header;
	uint16_t type;
	fread((void*)&header, sizeof(struct ResStringPool_header), 1, pFile);
	printf("type:%u, headSize:%u, size:%u, stringCount:%u, stringStart:%u, styleCount:%u, styleStart:%u\n",
				header.header.type,
				header.header.headerSize,
				header.header.size,
				header.stringCount,
				header.stringsStart,
				header.styleCount,
				header.stylesStart);
	return header;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rcx
movq %rdi, %rbx
movl $0x1c, %esi
movl $0x1, %edx
callq 0x2160
movzwl (%rbx), %esi
movzwl 0x2(%rbx), %edx
movl 0x4(%rbx), %ecx
movl 0x8(%rbx), %r8d
movl 0x14(%rbx), %r9d
movl 0xc(%rbx), %r10d
movl 0x18(%rbx), %r11d
leaq 0x28dc(%rip), %rdi      # 0x50d0
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x2030
addq $0x10, %rsp
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/bluesky466[P]ResourcesArscDemo/main.cpp
// Function: readStringsFromStringPool(_IO_FILE*, ResStringPool_header)
unsigned char* readStringsFromStringPool(FILE* pFile,  struct ResStringPool_header header) {
	uint32_t size = header.header.size - sizeof(struct ResStringPool_header);
	unsigned char* pData = (unsigned char*)malloc(size);
	fread((void*)pData, size, 1, pFile);
	uint32_t* pOffsets = (uint32_t*)pData;

	//stringsStart指的是header的起始地址到字符串起始地址的距离
	//pData已经是header末尾的地址了，所以要减去header的大小
	char* pStringsStart = (char*)(pData + header.stringsStart - sizeof(struct ResStringPool_header));

	for(int i = 0 ; i < header.stringCount ; i++) {
		//前面两个字节是长度,要跳过
		char* str = pStringsStart + *(pOffsets + i) + 2;
		if(header.flags & ResStringPool_header::UTF8_FLAG) {
			printf("%s\n", str);
		} else {
			printUtf16String((char16_t*)str);
		}
	}

	return pData;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x14(%rbp), %r15d
addl $-0x1c, %r15d
movq %r15, %rdi
callq 0x2140
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x2160
movl 0x18(%rbp), %r14d
testq %r14, %r14
je 0x2885
leaq 0x10(%rbp), %rax
movl 0x14(%rax), %ecx
leaq (%rbx,%rcx), %r15
addq $-0x1a, %r15
movl 0x10(%rax), %r12d
xorl %r13d, %r13d
movl (%rbx,%r13,4), %edi
addq %r15, %rdi
btl $0x8, %r12d
jb 0x2878
callq 0x2ad0
jmp 0x287d
callq 0x2170
incq %r13
cmpq %r13, %r14
jne 0x2863
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/bluesky466[P]ResourcesArscDemo/main.cpp
// Function: readResTablePackageHeader(_IO_FILE*, ResTable_package*)
int readResTablePackageHeader(FILE* pFile, struct ResTable_package* pHeader) {
	if(fread((void*)pHeader, sizeof(struct ResTable_package), 1, pFile) == 0) {
		return 0;
	}
	printf("type:%u, headSize:%u, size:%u, id:%x, packageName:",
				pHeader->header.type,
				pHeader->header.headerSize,
				pHeader->header.size,
				pHeader->id);
	printUtf16String((char16_t*)pHeader->name);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %rcx
movl $0x120, %esi            # imm = 0x120
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2160
testq %rax, %rax
je 0x28e9
movzwl (%rbx), %esi
movzwl 0x2(%rbx), %edx
movl 0x4(%rbx), %ecx
movl 0x8(%rbx), %r8d
leaq 0x285e(%rip), %rdi      # 0x512d
xorl %eax, %eax
callq 0x2030
addq $0xc, %rbx
movq %rbx, %rdi
callq 0x2ad0
movl $0x1, %eax
jmp 0x28eb
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/bluesky466[P]ResourcesArscDemo/main.cpp
// Function: printStringFromStringsPool(unsigned int*, char*, unsigned int, unsigned int)
void printStringFromStringsPool(uint32_t* pOffsets, char* pStringsStart, uint32_t stringIndex, uint32_t isUtf8) {
	//前面两个字节是长度,要跳过
	char* str = pStringsStart + *(pOffsets + stringIndex) + 2;
	if(isUtf8) {
		printf("%s\n", str);
	} else {
		printUtf16String((char16_t*)str);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edx, %eax
movl (%rdi,%rax,4), %eax
leaq (%rsi,%rax), %rdi
addq $0x2, %rdi
testl %ecx, %ecx
je 0x290d
popq %rbp
jmp 0x2170
popq %rbp
jmp 0x2ad0
// File: /workspace/github_cpp_makefile_star2_O1/bluesky466[P]ResourcesArscDemo/main.cpp
// Function: printStringOfComplex(unsigned int, bool)
void printStringOfComplex(uint32_t complex, bool isFraction) {
    const float MANTISSA_MULT =
        1.0f / (1<<Res_value::COMPLEX_MANTISSA_SHIFT);
    const float RADIX_MULTS[] = {
        1.0f*MANTISSA_MULT, 1.0f/(1<<7)*MANTISSA_MULT,
        1.0f/(1<<15)*MANTISSA_MULT, 1.0f/(1<<23)*MANTISSA_MULT
    };

    float value = (complex&(Res_value::COMPLEX_MANTISSA_MASK
                   <<Res_value::COMPLEX_MANTISSA_SHIFT))
            * RADIX_MULTS[(complex>>Res_value::COMPLEX_RADIX_SHIFT)
                            & Res_value::COMPLEX_RADIX_MASK];
	printf("%f",value);

    if (!isFraction) {
        switch ((complex>>Res_value::COMPLEX_UNIT_SHIFT)&Res_value::COMPLEX_UNIT_MASK) {
            case Res_value::COMPLEX_UNIT_PX: printf("px\n"); break;
            case Res_value::COMPLEX_UNIT_DIP: printf("dp\n"); break;
            case Res_value::COMPLEX_UNIT_SP: printf("sp\n"); break;
            case Res_value::COMPLEX_UNIT_PT: printf("pt\n"); break;
            case Res_value::COMPLEX_UNIT_IN: printf("in\n"); break;
            case Res_value::COMPLEX_UNIT_MM: printf("mm\n"); break;
            default: printf("(unknown unit)\n"); break;
        }
    } else {
        switch ((complex>>Res_value::COMPLEX_UNIT_SHIFT)&Res_value::COMPLEX_UNIT_MASK) {
            case Res_value::COMPLEX_UNIT_FRACTION: printf("%%\n"); break;
            case Res_value::COMPLEX_UNIT_FRACTION_PARENT: printf("%%p\n"); break;
            default: printf("(unknown unit)\n"); break;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
movl %edi, %eax
andl $0xffffff00, %eax       # imm = 0xFFFFFF00
cvtsi2ss %rax, %xmm0
movl %esi, %r14d
movl %edi, %eax
shrl $0x2, %eax
andl $0xc, %eax
leaq 0x27d7(%rip), %rcx      # 0x53b0
mulss (%rax,%rcx), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x2584(%rip), %rdi      # 0x516d
movb $0x1, %al
callq 0x2030
andl $0xf, %ebx
testl %r14d, %r14d
je 0x2c0a
cmpl $0x1, %ebx
je 0x2c33
testl %ebx, %ebx
jne 0x2c2a
leaq 0x2568(%rip), %rdi      # 0x5170
jmp 0x2c3a
cmpl $0x5, %ebx
ja 0x2c2a
movl %ebx, %eax
leaq 0x2408(%rip), %rcx      # 0x5020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2769(%rip), %rdi      # 0x5391
jmp 0x2c70
leaq 0x2763(%rip), %rdi      # 0x5394
jmp 0x2c70
leaq 0x253a(%rip), %rdi      # 0x5174
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x2030
leaq 0x2739(%rip), %rdi      # 0x5385
jmp 0x2c70
leaq 0x2736(%rip), %rdi      # 0x538b
jmp 0x2c70
leaq 0x272a(%rip), %rdi      # 0x5388
jmp 0x2c70
leaq 0x2727(%rip), %rdi      # 0x538e
jmp 0x2c70
leaq 0x2712(%rip), %rdi      # 0x5382
popq %rbx
popq %r14
popq %rbp
jmp 0x2170
nop