LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::split_int_list(std::vector<int, std::allocator<int>>*, int)
vector<vector<int>*>* t_string::split_int_list(vector<int>* int_list, int n_batches)
{
	vector<vector<int>*>* batches = new vector<vector<int>*>();

	int n_ints_per_batch = (int)int_list->size() / n_batches;
	vector<int>* current_batch = new vector<int>();
	batches->push_back(current_batch);
	for(int i_str = 0; i_str < (int)int_list->size(); i_str++)
	{
		if((int)current_batch->size() == n_ints_per_batch)
		{
			current_batch = new vector<int>();
			batches->push_back(current_batch);
		}

		current_batch->push_back(int_list->at(i_str));
	} // i_str loop.

	return(batches);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x18, %edi
callq 0x2180
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
xorl %r15d, %r15d
movq %r15, 0x10(%rax)
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shrq $0x2, %rax
cltd
idivl %ebp
movl %eax, %ebp
movl $0x18, %edi
callq 0x2180
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %r15, 0x10(%rax)
movq %rax, (%rsp)
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x28228
movq %rax, (%rsi)
addq $0x8, 0x8(%r14)
jmp 0x28233
movq %rsp, %rdx
movq %r14, %rdi
callq 0x2a394
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shrq $0x2, %rax
testl %eax, %eax
jle 0x282f1
xorl %r13d, %r13d
movq %rsp, %r12
xorl %r15d, %r15d
movq (%rsp), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
shrq $0x2, %rcx
cmpl %ecx, %ebp
jne 0x2829d
movl $0x18, %edi
callq 0x2180
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, (%rsp)
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x28292
movq %rax, (%rsi)
addq $0x8, 0x8(%r14)
jmp 0x2829d
movq %r14, %rdi
movq %r12, %rdx
callq 0x2a394
movq (%rbx), %rdx
movq 0x8(%rbx), %rax
subq %rdx, %rax
sarq $0x2, %rax
cmpq %r15, %rax
jbe 0x28303
movq (%rsp), %rdi
addq %r13, %rdx
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x282cf
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x282d4
callq 0xadd0
incq %r15
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shrq $0x2, %rax
cltq
addq $0x4, %r13
cmpq %rax, %r15
jl 0x2824f
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x55cc(%rip), %rdi      # 0x2d8d6
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::get_unique_entries(std::vector<char*, std::allocator<char*>>*)
vector<char*>* t_string::get_unique_entries(vector<char*>* str_list)
{
	if(str_list == NULL)
	{
		return(NULL);
	}

	vector<char*>* unique_entries = new vector<char*>();
	for(int i_str = 0; i_str < (int)str_list->size(); i_str++)
	{
		int i_ent = t_string::get_i_str(unique_entries, str_list->at(i_str));
		if(i_ent == (int)unique_entries->size())
		{
			unique_entries->push_back(t_string::copy_me_str(str_list->at(i_str)));
		}
	} // i_str loop.

	return(unique_entries);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x283cc
movq %rdi, %r14
movl $0x18, %edi
callq 0x2180
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq (%r14), %rax
movq 0x8(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
testl %edx, %edx
jle 0x283ce
xorl %r15d, %r15d
movq %rsp, %r12
cmpq %r15, %rdx
jbe 0x283dd
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x274fc
movq 0x8(%rbx), %rcx
subq (%rbx), %rcx
shrq $0x3, %rcx
cmpl %ecx, %eax
jne 0x283aa
movq (%r14), %rax
movq 0x8(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r15, %rdx
jbe 0x283dd
movq (%rax,%r15,8), %rdi
callq 0x273e0
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xb476
incq %r15
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
movq %rcx, %rdx
sarq $0x3, %rdx
shrq $0x3, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r15
jl 0x2835f
jmp 0x283ce
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x54f2(%rip), %rdi      # 0x2d8d6
movq %r15, %rsi
xorl %eax, %eax
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::clean_string_list(std::vector<char*, std::allocator<char*>>*)
void t_string::clean_string_list(vector<char*>* string_list)
{
	for(int i = 0; i < (int)string_list->size(); i++)
	{
		delete [] string_list->at(i);
	}

	string_list->clear();

	delete string_list;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x8(%rbx), %rax
movq %rax, %rdx
subq %rdi, %rdx
sarq $0x3, %rdx
testl %edx, %edx
jle 0x28d09
xorl %r14d, %r14d
cmpq %r14, %rdx
jbe 0x28d37
movq (%rdi,%r14,8), %rdi
testq %rdi, %rdi
je 0x28ce6
callq 0x2220
incq %r14
movq (%rbx), %rdi
movq 0x8(%rbx), %rax
movq %rax, %rcx
subq %rdi, %rcx
movq %rcx, %rdx
sarq $0x3, %rdx
shrq $0x3, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r14
jl 0x28cd3
cmpq %rdi, %rax
je 0x28d12
movq %rdi, 0x8(%rbx)
testq %rdi, %rdi
je 0x28d23
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2190
movl $0x18, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2190
leaq 0x4b98(%rip), %rdi      # 0x2d8d6
movq %r14, %rsi
xorl %eax, %eax
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::clean_tokens(std::vector<t_string*, std::allocator<t_string*>>*)
void t_string::clean_tokens(t_string_tokens* tokens)
{
	for(int i = 0; i < (int)tokens->size(); i++)
	{
		delete(tokens->at(i));
	}

	tokens->clear();
	delete(tokens);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x8(%rbx), %rax
movq %rax, %rdx
subq %rdi, %rdx
sarq $0x3, %rdx
testl %edx, %edx
jle 0x28dae
xorl %r14d, %r14d
cmpq %r14, %rdx
jbe 0x28dda
movq (%rdi,%r14,8), %r15
testq %r15, %r15
je 0x28d8b
movq %r15, %rdi
callq 0x27708
movl $0x8, %esi
movq %r15, %rdi
callq 0x2190
incq %r14
movq (%rbx), %rdi
movq 0x8(%rbx), %rax
movq %rax, %rcx
subq %rdi, %rcx
movq %rcx, %rdx
sarq $0x3, %rdx
shrq $0x3, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r14
jl 0x28d68
cmpq %rdi, %rax
je 0x28db7
movq %rdi, 0x8(%rbx)
testq %rdi, %rdi
je 0x28dc8
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2190
movl $0x18, %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2190
leaq 0x4af5(%rip), %rdi      # 0x2d8d6
movq %r14, %rsi
xorl %eax, %eax
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::remove_beginning_spaces(char*)
char* t_string::remove_beginning_spaces(char* string)
{
	int i_last_space = 0;

	int l_str = t_string::string_length(string);

	for(int i = 0; i < l_str; i++)
	{
		if(string[i] != ' ')
		{
			i_last_space = i;
			break;
		}
	}

	char* reloc_copy = new char[l_str + 2];

	// Relocate.
	copy(reloc_copy, &string[i_last_space]);
	
	return(reloc_copy);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %eax
cmpb $0x0, (%rbx,%rax)
jne 0x28dfc
xorl %r14d, %r14d
testl %eax, %eax
jle 0x28e1f
movl %eax, %ecx
xorl %r12d, %r12d
cmpb $0x20, (%rbx,%r12)
jne 0x28e22
incq %r12
cmpq %r12, %rcx
jne 0x28e10
xorl %r12d, %r12d
addl $0x2, %eax
movslq %eax, %rdi
callq 0x2040
movq %rax, %r15
addq %r12, %rbx
movl %r14d, %r12d
incl %r14d
cmpb $0x0, (%rbx,%r12)
jne 0x28e33
cmpl $0x1, %r14d
adcl $0x0, %r14d
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2130
movb $0x0, (%r15,%r12)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::remove_beginning_spaces()
void t_string::remove_beginning_spaces()
{
	int i_last_space = 0;

	for(int i = 0; i < this->length(); i++)
	{
		if(this->x(i) != ' ')
		{
			i_last_space = i;
			break;
		}
	}

	char* reloc_copy = (char*)malloc(sizeof(char*) * (this->length() + 2));

	copy(reloc_copy, this->str());

	// Relocate.
	copy(this->str(), &reloc_copy[i_last_space]);
	free(reloc_copy);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rdi), %r15
movslq 0xc(%r15), %rax
xorl %ebx, %ebx
testq %rax, %rax
jle 0x28e96
movq (%r15), %rcx
xorl %r12d, %r12d
cmpb $0x20, (%rcx,%r12)
jne 0x28e99
incq %r12
cmpq %r12, %rax
jne 0x28e87
xorl %r12d, %r12d
leaq 0x10(,%rax,8), %rdi
callq 0x2230
movq %rax, %r14
movq (%r15), %r15
movl %ebx, %r13d
incl %ebx
cmpb $0x0, (%r15,%r13)
jne 0x28eac
cmpl $0x1, %ebx
adcl $0x0, %ebx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2130
movb $0x0, (%r14,%r13)
movq %r14, %rsi
addq %r12, %rsi
xorl %edx, %edx
movl %edx, %ebx
incl %edx
cmpb $0x0, (%rsi,%rbx)
jne 0x28ed9
cmpl $0x1, %edx
adcl $0x0, %edx
movq %r15, %rdi
callq 0x2130
movb $0x0, (%r15,%rbx)
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x21d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::sprintf(char*, ...)
void t_string::sprintf(char* fmt_string, ...)
{
	va_list pars;
	va_start(pars, fmt_string);

	// Initialize string as having nothing.
	this->copy("");

	// Go over the string: Every time a formatting string is found by %.., it is processed.
	for(int i_str = 0; i_str < string_length(fmt_string); i_str++)
	{
		if(fmt_string[i_str] == '%')
		{
			// Check the formatter character.
			i_str++;

			if(fmt_string[i_str] == 'd')
			{
				int _num = va_arg(pars,int);
				this->concat_int(_num);
			}
			else if(fmt_string[i_str] == 'c')
			{
				int _char = va_arg(pars,int);
				this->concat_char(_char);
			}
			else if(fmt_string[i_str] == 's')
			{
				char* _str = (char*)va_arg(pars, void*);
				this->concat_string(_str);
			}
			else if(fmt_string[i_str] == '%')
			{
				this->concat_char(fmt_string[i_str]);
			}

			// The for loop jumps over formatter character.
			//i_str++;
		}
		else // This is a regular character, just copy it.
		{
			this->concat_char(fmt_string[i_str]);
		}
	}

	va_end(pars);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x29193
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsi, 0x10(%rsp)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
xorl %ebp, %ebp
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %eax
cmpb $0x0, (%rbx,%rax)
jne 0x291ba
cmpl %eax, %ebp
jge 0x292ba
movslq %ebp, %rax
movb (%rbx,%rax), %cl
cmpb $0x25, %cl
jne 0x29209
movb 0x1(%rbx,%rax), %cl
incq %rax
movl %eax, %ebp
movzbl %cl, %eax
cmpl $0x63, %eax
jg 0x29218
cmpl $0x25, %eax
je 0x29209
cmpl $0x63, %eax
jne 0x29214
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x29254
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x29262
movsbl %cl, %esi
movq %r14, %rdi
callq 0x278c0
incl %ebp
jmp 0x291b5
cmpl $0x73, %eax
je 0x2923b
cmpl $0x64, %eax
jne 0x29214
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x29267
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x29275
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x29281
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x2928f
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movsbl (%rax), %esi
jmp 0x2920c
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movl (%rax), %esi
movq %r14, %rdi
callq 0x292c8
jmp 0x29214
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %r15
movb (%r15), %al
testb %al, %al
je 0x29214
incq %r15
movsbl %al, %esi
movq %r14, %rdi
callq 0x278c0
movb (%r15), %al
incq %r15
testb %al, %al
jne 0x292a0
jmp 0x29214
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::concat_string(char*)
void t_string::concat_string(char* string)
{
	//// Add all the chars in the string.
	//int str_len = string_length(string);
	
	//fprintf(stderr, "Concatting: %s\n", string);
	int i = 0;
	while(string[i] != 0)
	{
		this->concat_char(string[i]);
		i++;
	}
}

// Assembly:
movb (%rsi), %al
testb %al, %al
je 0x2934c
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
incq %rbx
movsbl %al, %esi
movq %r14, %rdi
callq 0x278c0
movb (%rbx), %al
incq %rbx
testb %al, %al
jne 0x29331
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::num2str(int, int)
t_string* t_string::num2str(int num, int base)
{
	t_string* num_str = new t_string();
	int divident = num;
	int residual = divident % base;

	do
	{
		num_str->concat_char((char)(residual + 48)); // Convert to ascii value.		
		divident = divident / base; // Shift right.
		residual = divident % base; // Compute the last digit.

		if(residual > 9)
		{
			printf("The residual greater than 9!\n");
		}
	}
	while(divident != 0);

	// Reverse the num string.
	num_str->revert();

	return(num_str);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movl %edi, %r14d
movl $0x8, %edi
callq 0x2180
movq %rax, %rbx
movl $0x10, %edi
callq 0x2180
movq %rax, %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq %rax, (%rbx)
movq $0x1f4, 0x8(%rax)       # imm = 0x1F4
movl $0x1f7, %edi            # imm = 0x1F7
callq 0x2040
movq %rax, (%r15)
movl $0x0, 0xc(%r15)
movb $0x0, (%rax)
movl %r14d, %eax
cltd
idivl %ebp
movl %edx, %r12d
leaq 0x6674(%rip), %r15      # 0x2fa56
addb $0x30, %r12b
movsbl %r12b, %esi
movq %rbx, %rdi
callq 0x278c0
movl %r14d, %eax
cltd
idivl %ebp
movl %eax, %r14d
cltd
idivl %ebp
movl %edx, %r12d
cmpl $0xa, %edx
jl 0x2940e
movq %r15, %rdi
callq 0x2280
testl %r14d, %r14d
jne 0x293e2
movq %rbx, %rdi
callq 0x29442
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x8, %esi
movq %rbx, %rdi
callq 0x2190
movq %r14, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::revert()
void t_string::revert()
{
	t_string* temp_buf = new t_string(this->str());
	int str_len = temp_buf->length();
	for(int i = 0; i < str_len; i++)
	{
		this->x(i) = temp_buf->x(str_len - i - 1);
	}

	delete(temp_buf);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x8, %edi
callq 0x2180
movq %rax, %rbx
movq (%r14), %rax
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x26c88
movq (%rbx), %rax
movslq 0xc(%rax), %rax
testq %rax, %rax
jle 0x2948d
xorl %ecx, %ecx
movq (%rbx), %rdx
movq (%rdx), %rdx
movb -0x1(%rdx,%rax), %dl
movq (%r14), %rsi
movq (%rsi), %rsi
movb %dl, (%rsi,%rcx)
incq %rcx
decq %rax
jne 0x29472
movq %rbx, %rdi
callq 0x27708
movl $0x8, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2190
movq %rax, %r14
movl $0x8, %esi
movq %rbx, %rdi
callq 0x2190
movq %r14, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::revert(char*)
char* t_string::revert(char* string)
{
	char* reverted_string = t_string::copy_me_str(string);

	//t_string* temp_buf = new t_string(this->str());
	int str_len = t_string::string_length(string);
	for(int i = 0; i < str_len; i++)
	{
		reverted_string[i] = string[str_len - i - 1];
	}

	return(reverted_string);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x273e0
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
incl %ecx
cmpb $0x0, (%rbx,%rcx)
jne 0x294d0
testl %ecx, %ecx
jle 0x294f9
movl %ecx, %ecx
leaq (%rbx,%rcx), %rdx
decq %rdx
xorl %esi, %esi
movb (%rdx), %dil
movb %dil, (%rax,%rsi)
incq %rsi
decq %rdx
cmpq %rsi, %rcx
jne 0x294e7
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::compare_substrings_ci(char const*, char const*, int&)
bool t_string::compare_substrings_ci(const char* str, const char* sub_str, int& i_match)
{
	// Go over all the substring of str and search for sub_str.
	int i_max = (t_string::string_length(str) - t_string::string_length(sub_str) + 1);

	int l_sub = t_string::string_length(sub_str);
	for(int i = 0; i < i_max; i++)
	{
		char* cur_substr = t_string::substring(str, i, i+l_sub-1);

		if(cur_substr == NULL)
		{
			return(false);
		}

		if(t_string::compare_strings_ci(cur_substr, sub_str))
		{
			i_match = i;
			return(true);
		}

		delete [] cur_substr;

	} // i loop.

	return(false);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %eax
cmpb $0x0, (%r15,%rax)
jne 0x2955c
xorl %ecx, %ecx
movl %ecx, %edx
incl %ecx
cmpb $0x0, (%r14,%rdx)
jne 0x29567
movl %eax, %ebx
subl %ecx, %ebx
addl $0x2, %ebx
decl %ecx
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
leal 0x2(%rbp), %edx
incl %ebp
cmpb $0x0, (%r14,%rdx)
jne 0x29580
xorl %r12d, %r12d
cmpl %ecx, %eax
movl $0x0, %eax
jl 0x295fe
movl %eax, 0xc(%rsp)
leal (%r12,%rbp), %edx
movq %r15, %rdi
movl %r12d, %esi
callq 0x279fe
testq %rax, %rax
je 0x295d4
movq %rax, %r13
movq %rax, %rdi
movq %r14, %rsi
callq 0x27672
testb %al, %al
je 0x295e0
movq 0x10(%rsp), %rax
movl %r12d, (%rax)
movb $0x1, %al
movl %eax, 0xc(%rsp)
xorl %eax, %eax
jmp 0x295ea
xorl %eax, %eax
movl $0x0, 0xc(%rsp)
jmp 0x295ea
movq %r13, %rdi
callq 0x2220
movb $0x1, %al
testb %al, %al
je 0x295fa
incl %r12d
cmpl %r12d, %ebx
jne 0x2959c
xorl %eax, %eax
jmp 0x295fe
movl 0xc(%rsp), %eax
andb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::prefix_matches(char const*, char const*, bool)
bool t_string::prefix_matches(const char* str1, const char* str2, bool case_sensitive)
{
	int l_match = 0;
	int l1 = string_length(str1);
	int l2 = string_length(str2);
	if(l1 < l2)
	{
		l_match = l1;
	}
	else
	{
		l_match = l2;
	}

	for(int i_str = 0; i_str < l_match; i_str++)
	{
		if(case_sensitive)
		{
			if(str1[i_str] != str2[i_str])
			{
				return(false);
			}
		}
		else
		{
			if(toupper(str1[i_str]) != toupper(str2[i_str]))
			{
				return(false);
			}
		}
	}	

	return(true);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %eax
cmpb $0x0, (%r15,%rax)
jne 0x296de
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
incl %r13d
cmpb $0x0, (%r14,%r13)
jne 0x296ed
cmpl %r13d, %eax
movl %r13d, %ecx
cmovll %eax, %ecx
testl %ecx, %ecx
setle %bpl
jle 0x29764
movl %ecx, %r12d
cmpl %r13d, %eax
cmovll %eax, %r13d
negq %r13
movl $0x1, %ebx
movl %edx, (%rsp)
movsbl -0x1(%r15,%rbx), %edi
testb %dl, %dl
je 0x29730
cmpb -0x1(%r14,%rbx), %dil
je 0x2974d
jmp 0x29764
callq 0x2330
movl %eax, 0x4(%rsp)
movsbl -0x1(%r14,%rbx), %edi
callq 0x2330
movl (%rsp), %edx
cmpl %eax, 0x4(%rsp)
jne 0x29764
cmpq %r12, %rbx
setae %bpl
leaq (%rbx,%r13), %rax
incq %rax
incq %rbx
cmpq $0x1, %rax
jne 0x2971d
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::ends_with(char const*, char const*)
bool t_string::ends_with(const char* full_string, const char* sub_str)
{
	if(string_length(full_string) < string_length(sub_str))
	{
		return(false);
	}

	// Go over all the characters of the sub-string and check if they match to the end of the string.
	int i_str = string_length(full_string) - 1;
	unsigned int i_sub = string_length(sub_str) - 1;
	while(1)
	{
		if(sub_str[i_sub] != full_string[i_str])
		{
			return(false);
		}

		if(i_sub == 0)
		{
			return(true);
		}
		else
		{
			i_sub--;
		}

		i_str--;		
	} // i loop.

	return(true);
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %eax
cmpb $0x0, (%rdi,%rax)
jne 0x2977f
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
incl %ecx
cmpb $0x0, (%rsi,%rcx)
jne 0x2978c
cmpl %ecx, %eax
jge 0x2979b
xorl %eax, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %eax
cmpb $0x0, (%rdi,%rax)
jne 0x297a0
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
leal 0x2(%rcx), %edx
incl %ecx
cmpb $0x0, (%rsi,%rdx)
jne 0x297ad
cltq
leaq (%rdi,%rax), %rdx
decq %rdx
movl %ecx, %eax
movb (%rsi,%rax), %dil
movb (%rdx), %r8b
cmpb %r8b, %dil
sete %al
addl $-0x1, %ecx
jae 0x297dd
decq %rdx
cmpb %r8b, %dil
je 0x297c1
retq
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::starts_with(char const*, char const*)
bool t_string::starts_with(const char* full_string, const char* sub_str)
{
	if(string_length(full_string) < string_length(sub_str))
	{
		return(false);
	}

	for(int i_str = 0; i_str < string_length(sub_str); i_str++)
	{
		if(full_string[i_str] != sub_str[i_str])
		{
			return(false);
		}
	}	

	return(true);
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %eax
cmpb $0x0, (%rdi,%rax)
jne 0x297e3
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
incl %ecx
cmpb $0x0, (%rsi,%rcx)
jne 0x297f0
cmpl %ecx, %eax
jge 0x297ff
xorl %eax, %eax
retq
xorl %ecx, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %eax
cmpb $0x0, (%rsi,%rax)
jne 0x29806
cltq
cmpq %rax, %rcx
setge %al
jge 0x29827
movb (%rdi,%rcx), %dl
leaq 0x1(%rcx), %r8
cmpb (%rsi,%rcx), %dl
movq %r8, %rcx
je 0x29801
retq
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::str2num(char const*, int)
int t_string::str2num(const char* num_str, int base)
{
    int num = 0;
    int extended_base = 1;
	//for(int i = (int)string_length(num_str)-1; i >= 0; i--)
	unsigned int i = string_length(num_str)-1;
	while(1)
    {
        int cur_digit = (int)num_str[i];
		if(cur_digit >= '0' && cur_digit <= '9')
					num += extended_base * (cur_digit - (int)'0');
		else if(cur_digit >= 'A' && cur_digit <= 'F')
				num += extended_base * (cur_digit - (int)'A' + 10);
		else if(cur_digit >= 'a' && cur_digit <= 'f')
			num += extended_base * (cur_digit - (int)'a' + 10);
		else
		{
			printf("Could not resolve character as number in %s for base %d\n", num_str, base);
			exit(0);
		}

		if(i == 0)
		{
			break;
		}
		else
		{
			i--;
		}

        //printf("%d = %d * (%d - %d)\n", num, extended_base, cur_digit, 48);
        extended_base *= base;
    }

    return(num);
}

// Assembly:
pushq %rbx
movl %esi, %edx
movq %rdi, %rsi
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
leal 0x2(%rcx), %eax
incl %ecx
cmpb $0x0, (%rsi,%rax)
jne 0x2983f
xorl %edi, %edi
movl $0x1, %r8d
movl $0x1, %r9d
xorl %eax, %eax
movl %ecx, %r10d
movsbl (%rsi,%r10), %r10d
leal -0x30(%r10), %ebx
movl $0xffffffd0, %r11d      # imm = 0xFFFFFFD0
cmpb $0xa, %bl
jb 0x2988f
leal -0x41(%r10), %ebx
movl $0xffffffc9, %r11d      # imm = 0xFFFFFFC9
cmpb $0x6, %bl
jb 0x2988f
leal -0x61(%r10), %ebx
movl $0xffffffa9, %r11d      # imm = 0xFFFFFFA9
cmpb $0x6, %bl
jae 0x298ba
addl %r10d, %r11d
imull %r9d, %r11d
addl %r11d, %eax
testl %ecx, %ecx
movl %edx, %r10d
cmovel %r8d, %r10d
imull %r10d, %r9d
movl %ecx, %r10d
subl $0x1, %r10d
cmovbl %edi, %r10d
testl %ecx, %ecx
movl %r10d, %ecx
jne 0x2985a
popq %rbx
retq
leaq 0x615c(%rip), %rdi      # 0x2fa1d
xorl %eax, %eax
callq 0x2050
xorl %edi, %edi
callq 0x21e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::to_upper(char*)
void t_string::to_upper(char* string)
{
	//printf("%s->", string);
	//int upper_diff = (int)'A' - (int)'a';

	int str_len = string_length(string); 
	for(int i = 0; i < str_len; i++)
	{
		if(!(string[i] <= 'Z' &&  string[i] >= 'A') && !(string[i] <= 'z' && string[i] >= 'a'))
	 	{
		}
		else if(string[i] <= 'z' && string[i] >= 'a')
		{
			string[i] = string[i] + ((int)'A' - (int)'a');
		}
		else
		{
		}
	}
	//printf("%s\n", string);

}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %eax
cmpb $0x0, (%rdi,%rax)
jne 0x298e1
testl %eax, %eax
jle 0x2991b
movl %eax, %eax
xorl %ecx, %ecx
movb (%rdi,%rcx), %dl
leal -0x61(%rdx), %esi
cmpb $0x19, %sil
ja 0x29913
movl %edx, %esi
andb $-0x21, %sil
addb $-0x41, %sil
cmpb $0x19, %sil
ja 0x29913
addb $-0x20, %dl
movb %dl, (%rdi,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x298f1
retq
// File: /workspace/github_cpp_makefile_star2_O1/gersteinlab[P]MUSIC/src/wavfile.c
// Function: wavfile_close(_IO_FILE*)
void wavfile_close( FILE *file )
{
	int file_length = ftell(file);

	int data_length = file_length - sizeof(struct wavfile_header);
	fseek(file,sizeof(struct wavfile_header) - sizeof(int),SEEK_SET);
	fwrite(&data_length,sizeof(data_length),1,file);

	int riff_length = file_length - 8;
	fseek(file,4,SEEK_SET);
	fwrite(&riff_length,sizeof(riff_length),1,file);

	fclose(file);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x2030
movq %rax, %r14
addl $-0x2c, %eax
leaq 0xc(%rsp), %r15
movl %eax, (%r15)
movl $0x28, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x21a0
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x2340
addl $-0x8, %r14d
leaq 0x8(%rsp), %r15
movl %r14d, (%r15)
movl $0x4, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x21a0
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x2340
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x2170
// File: /workspace/github_cpp_makefile_star2_O1/drofp[P]RoadRun/src/game.cc
// Function: roadrun::Game::Game(int, int, char, roadrun::SettingsItem, std::map<roadrun::SettingsItem, int, std::less<roadrun::SettingsItem>, std::allocator<std::pair<roadrun::SettingsItem const, int>>>&, int&)
Game::Game(int width, int height, char player_icon, SettingsItem difficulty,
            std::map<SettingsItem, int> &difficulty_to_high_score,
            int &prev)
{
  int starty = 0;
  int startx = 0;

  playing = true;
  this->player_icon = player_icon;
  player_locy = (starty + height) - 2;
  player_locx = (startx + width) / 2;
  player_deltax = 0;

  score_timer = 0;
  curr_high_score = difficulty_to_high_score[difficulty];
  difficulty_map = &difficulty_to_high_score;
  curr_score = 0;

  prev_score = &prev;

  curr_difficulty = difficulty;

  initscr();
  clear();
  noecho();
  cbreak(); // Line buffering disabled. pass on everything
  curs_set(0); // hide cursor

  game_win = newwin(kMenuHeight, kMenuWidth, starty, startx);
  info_win = newwin(kInfoHeight, kInfoWidth, starty, kMenuWidth);
  art_win = newwin(300, 300, starty, startx);

  nodelay(game_win, true);
  keypad(game_win, true);
  refresh();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movl %ecx, %r12d
movl %edx, %r13d
movl %esi, %r15d
movq %rdi, %rbx
leaq -0x2c(%rbp), %rax
movl %r8d, (%rax)
addq $0x18, %rdi
movl $0x745, %edx            # imm = 0x745
xorl %esi, %esi
callq 0x20c0
movb $0x1, 0x770(%rbx)
movb %r12b, 0x771(%rbx)
addl $-0x2, %r13d
movl %r13d, 0x774(%rbx)
movl %r15d, %eax
shrl $0x1f, %eax
addl %r15d, %eax
sarl %eax
movl %eax, 0x778(%rbx)
xorl %eax, %eax
movl %eax, 0x77c(%rbx)
movl %eax, 0x784(%rbx)
xorl %r12d, %r12d
movq %r14, %rdi
leaq -0x2c(%rbp), %r15
movq %r15, %rsi
callq 0x2ac4
movl (%rax), %eax
movl %eax, 0x788(%rbx)
movq %r14, 0x790(%rbx)
movl %r12d, 0x78c(%rbx)
movq 0x10(%rbp), %rax
movq %rax, 0x798(%rbx)
movl (%r15), %eax
movl %eax, 0x760(%rbx)
callq 0x2210
callq 0x2250
callq 0x21a0
callq 0x2070
xorl %edi, %edi
callq 0x2100
movl $0x1e, %edi
movl $0x3d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2150
movq %rax, (%rbx)
movl $0x1e, %edi
movl $0x1e, %esi
xorl %edx, %edx
movl $0x3d, %ecx
callq 0x2150
movq %rax, 0x8(%rbx)
movl $0x12c, %edi            # imm = 0x12C
movl $0x12c, %esi            # imm = 0x12C
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2150
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
movl $0x1, %esi
callq 0x20d0
movq (%rbx), %rdi
movl $0x1, %esi
callq 0x2090
callq 0x2240
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/drofp[P]RoadRun/src/game.cc
// Function: roadrun::Game::PlayGame()
void Game::PlayGame()
{
  this->map_generator = MapGeneratorFactory::create(curr_difficulty);
  PrintPrepScreen();
  while (playing)
  {
    key = wgetch(game_win);
    playing = key == 'q' ? false : true;

    UpdatePlayerLoc();
    PrintGameFrame();
    PrintInfoFrame();
    napms(1);
  }

  UpdateHighScore();

  wrefresh(game_win);
  wrefresh(info_win);
  wclear(game_win);
  wclear(info_win);
  wrefresh(game_win);
  wrefresh(info_win);
  PrintEndScreen();
  endwin();
  delete map_generator;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x760(%rdi), %edi
callq 0x3670
movq %rax, 0x768(%rbx)
movq %rbx, %rdi
callq 0x26b8
cmpb $0x1, 0x770(%rbx)
jne 0x264c
movq (%rbx), %rdi
callq 0x2080
movl %eax, 0x780(%rbx)
cmpl $0x71, %eax
setne 0x770(%rbx)
movq %rbx, %rdi
callq 0x2a5a
movl 0x778(%rbx), %eax
movl 0x77c(%rbx), %ecx
addl %eax, %ecx
cmpl $0x3d, %ecx
jb 0x261d
movl $0x0, 0x77c(%rbx)
addl 0x77c(%rbx), %eax
movl %eax, 0x778(%rbx)
movq %rbx, %rdi
callq 0x2790
movq %rbx, %rdi
callq 0x282a
movl $0x1, %edi
callq 0x20e0
cmpb $0x0, 0x770(%rbx)
jne 0x25e0
movq %rbx, %rdi
callq 0x28e4
movq (%rbx), %rdi
callq 0x2190
movq 0x8(%rbx), %rdi
callq 0x2190
movq (%rbx), %rdi
callq 0x2130
movq 0x8(%rbx), %rdi
callq 0x2130
movq (%rbx), %rdi
callq 0x2190
movq 0x8(%rbx), %rdi
callq 0x2190
movq %rbx, %rdi
callq 0x298c
callq 0x21b0
movq 0x768(%rbx), %rdi
testq %rdi, %rdi
je 0x26b0
movl $0x8, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2140
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/drofp[P]RoadRun/src/game.cc
// Function: roadrun::Game::PrintPrepScreen()
void Game::PrintPrepScreen()
{
  char* mode;
  const char* kStartArt = R"ronmak(
   / __ \___  ____ _____/ __  __   / /_____     / __ \____  ____ _____/ _______  ______  / /
  / /_/ / _ \/ __ `/ __  / / / /  / __/ __ \   / /_/ / __ \/ __ `/ __  / ___/ / / / __ \/ /
 / _, _/  __/ /_/ / /_/ / /_/ /  / /_/ /_/ /  / _, _/ /_/ / /_/ / /_/ / /  / /_/ / / / /_/
/_/ |_|\___/\__,_/\__,_/\__, /   \__/\____/  /_/ |_|\____/\__,_/\__,_/_/   \__,_/_/ /_(_)
                       /____/
              )ronmak";
if(curr_difficulty == SettingsItem::kRegular)
{

  mode = R"ronmak(
    ______                    __  ___          __
   / ________ ________  __   /  |/  ____  ____/ ___
  / __/ / __ `/ ___/ / / /  / /|_/ / __ \/ __  / _ \
 / /___/ /_/ (__  / /_/ /  / /  / / /_/ / /_/ /  __/
/_____/\__,_/____/\__, /  /_/  /_/\____/\__,_/\___/
                 /____/
              )ronmak";
}
else
{
  mode = R"ronmak(
    __  __               __   __  ___          __
   / / / ____ __________/ /  /  |/  ____  ____/ ___
  / /_/ / __ `/ ___/ __  /  / /|_/ / __ \/ __  / _ \
 / __  / /_/ / /  / /_/ /  / /  / / /_/ / /_/ /  __/
/_/ /_/\__,_/_/   \__,_/  /_/  /_/\____/\__,_/\___/
              )ronmak";
}

  mvwprintw(art_win, 0, 0, "%s", kStartArt);
  mvwprintw(art_win, 10, 0, "%s", mode);
  wrefresh(art_win);
  napms(2000);
  wmove(art_win, 0, 0);
  wclrtobot(art_win);
  wrefresh(art_win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x760(%rdi)
leaq 0x1b13(%rip), %rax      # 0x41e6
leaq 0x1c38(%rip), %r14      # 0x4312
cmoveq %rax, %r14
movq 0x10(%rdi), %rdi
leaq 0x191b(%rip), %r15      # 0x4004
leaq 0x195a(%rip), %r8       # 0x404a
xorl %esi, %esi
xorl %edx, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x2040
movq 0x10(%rbx), %rdi
movl $0xa, %esi
xorl %edx, %edx
movq %r15, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x2040
movq 0x10(%rbx), %rdi
callq 0x2190
movl $0x7d0, %edi            # imm = 0x7D0
callq 0x20e0
movq 0x10(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2160
movq 0x10(%rbx), %rdi
callq 0x21c0
movq 0x10(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2190
// File: /workspace/github_cpp_makefile_star2_O1/drofp[P]RoadRun/src/game.cc
// Function: roadrun::Game::UpdatePlayerLoc()
void Game::UpdatePlayerLoc()
{
  UpdatePlayerDeltas();

  if (player_locx + player_deltax >= kMenuWidth
      || player_locx + player_deltax < 0)
    player_deltax = 0;

  player_locx += player_deltax;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2a5a
movl 0x778(%rbx), %eax
movl 0x77c(%rbx), %ecx
addl %eax, %ecx
cmpl $0x3d, %ecx
jb 0x277d
movl $0x0, 0x77c(%rbx)
addl 0x77c(%rbx), %eax
movl %eax, 0x778(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/drofp[P]RoadRun/src/game.cc
// Function: roadrun::Game::PrintGameFrame()
void Game::PrintGameFrame()
{
  wclear(game_win);

  mvwprintw(game_win, 0, 0, "%s", map_generator->GenerateMap(game_map));
  mvwprintw(game_win, player_locy, player_locx, "%c", player_icon);

  CheckCollision();

  wrefresh(game_win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2130
movq (%rbx), %r14
movq 0x768(%rbx), %rdi
leaq 0x18(%rbx), %rsi
movq (%rdi), %rax
callq *(%rax)
leaq 0x1848(%rip), %rcx      # 0x4004
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rax, %r8
xorl %eax, %eax
callq 0x2040
movq (%rbx), %rdi
movl 0x774(%rbx), %esi
movl 0x778(%rbx), %edx
movsbl 0x771(%rbx), %r8d
leaq 0x181c(%rip), %rcx      # 0x4007
xorl %eax, %eax
callq 0x2040
movslq 0x774(%rbx), %rax
imulq $0x3d, %rax, %rax
movslq 0x778(%rbx), %rcx
addq %rax, %rcx
movzbl 0x18(%rbx,%rcx), %eax
cmpl $0x2a, %eax
je 0x2816
cmpl $0x23, %eax
jne 0x281d
movb $0x0, 0x770(%rbx)
movq (%rbx), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2190
nop
// File: /workspace/github_cpp_makefile_star2_O1/drofp[P]RoadRun/src/game.cc
// Function: roadrun::Game::PrintInfoFrame()
void Game::PrintInfoFrame()
{
  wclear(info_win);

  UpdateScore();
  mvwprintw(info_win, 0, 0, "player loc x is %d", player_locx);
  mvwprintw(info_win, 1, 0, "High score: %d", curr_high_score);
  mvwprintw(info_win, 2, 0, "Score: %d", curr_score);
  mvwprintw(info_win, 3, 0, "Press 'q' at any time to quit");

  wrefresh(info_win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x2130
movl 0x784(%rbx), %eax
incl %eax
movl %eax, 0x784(%rbx)
cmpl $0x64, %eax
jne 0x285f
incl 0x78c(%rbx)
movl $0x0, 0x784(%rbx)
movq 0x8(%rbx), %rdi
movl 0x778(%rbx), %r8d
leaq 0x1799(%rip), %rcx      # 0x400a
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2040
movq 0x8(%rbx), %rdi
movl 0x788(%rbx), %r8d
leaq 0x178f(%rip), %rcx      # 0x401d
movl $0x1, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2040
movq 0x8(%rbx), %rdi
movl 0x78c(%rbx), %r8d
leaq 0x1f2c(%rip), %rcx      # 0x47da
movl $0x2, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2040
movq 0x8(%rbx), %rdi
leaq 0x1765(%rip), %rcx      # 0x402c
movl $0x3, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2040
movq 0x8(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2190
// File: /workspace/github_cpp_makefile_star2_O1/drofp[P]RoadRun/src/game.cc
// Function: roadrun::Game::UpdateHighScore()
void Game::UpdateHighScore()
{
  if (curr_score > curr_high_score)
    difficulty_map->operator[](curr_difficulty) = curr_score;


  *prev_score = curr_score;

  wclear(info_win);
  mvwprintw(info_win, 7, 0, "high score: %d", curr_high_score);
  mvwprintw(info_win, 8, 0, "difficulty_map difficulty: %d", difficulty_map->at(curr_difficulty));

  wrefresh(info_win);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x78c(%rdi), %r14d
cmpl 0x788(%rdi), %r14d
jle 0x2914
movq 0x790(%rbx), %rdi
leaq 0x760(%rbx), %rsi
callq 0x2ac4
movl %r14d, (%rax)
movl 0x78c(%rbx), %eax
movq 0x798(%rbx), %rcx
movl %eax, (%rcx)
movq 0x8(%rbx), %rdi
callq 0x2130
movq 0x8(%rbx), %rdi
movl 0x788(%rbx), %r8d
leaq 0x1c26(%rip), %rcx      # 0x4564
movl $0x7, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2040
movq 0x8(%rbx), %r14
movq 0x790(%rbx), %rdi
leaq 0x760(%rbx), %rsi
callq 0x2b2c
movl (%rax), %r8d
leaq 0x1c06(%rip), %rcx      # 0x4573
movq %r14, %rdi
movl $0x8, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2040
movq 0x8(%rbx), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2190
nop
// File: /workspace/github_cpp_makefile_star2_O1/drofp[P]RoadRun/src/game.cc
// Function: roadrun::Game::PrintEndScreen()
void Game::PrintEndScreen()
{

  const char* kEndArt = R"ronmak(
   ______                        ____                  __
  / ________ _____ ___  ___     / __ \_   _____  _____/ /
 / / __/ __ `/ __ `__ \/ _ \   / / / | | / / _ \/ ___/ /
/ /_/ / /_/ / / / / / /  __/  / /_/ /| |/ /  __/ /  /_/
\____/\__,_/_/ /_/ /_/\___/   \____/ |___/\___/_/  (_)
              )ronmak";
  mvwprintw(art_win, 0, 0, "%s", kEndArt);
  mvwprintw(art_win, 10, 0, "Your score was %d", curr_score);
  wrefresh(art_win);
  napms(2000);
  wclrtobot(art_win);
  wrefresh(art_win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
leaq 0x1664(%rip), %rcx      # 0x4004
leaq 0x1a7f(%rip), %r8       # 0x4426
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2040
movq 0x10(%rbx), %rdi
movl 0x78c(%rbx), %r8d
leaq 0x1b8e(%rip), %rcx      # 0x4552
movl $0xa, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2040
movq 0x10(%rbx), %rdi
callq 0x2190
movl $0x7d0, %edi            # imm = 0x7D0
callq 0x20e0
movq 0x10(%rbx), %rdi
callq 0x21c0
movq 0x10(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2190
nop
// File: /workspace/github_cpp_makefile_star2_O1/drofp[P]RoadRun/src/game.cc
// Function: roadrun::Game::UpdateScore()
void Game::UpdateScore()
{
  score_timer++;

  if (score_timer == kScoreTickCnt)
  {
    curr_score++;
    score_timer = 0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x784(%rdi), %eax
incl %eax
movl %eax, 0x784(%rdi)
cmpl $0x64, %eax
jne 0x2a57
incl 0x78c(%rdi)
movl $0x0, 0x784(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/drofp[P]RoadRun/src/game.cc
// Function: roadrun::Game::UpdatePlayerDeltas()
void Game::UpdatePlayerDeltas()
{
  if (curr_difficulty == SettingsItem::kRegular)
  {
    if (key == KEY_LEFT)
      player_deltax -= kDeltaEasy;
    else if (key == KEY_RIGHT)
      player_deltax += kDeltaEasy;
    else
      player_deltax = 0;
  }
  else if (curr_difficulty == SettingsItem::kLudicrous)
  {
    if (key == KEY_LEFT)
      player_deltax -= kDeltaHard;
    else if (key == KEY_RIGHT)
      player_deltax += kDeltaHard;
    else
      player_deltax = 0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x760(%rdi), %eax
cmpl $0x1, %eax
je 0x2a89
testl %eax, %eax
jne 0x2ac1
movl 0x780(%rdi), %eax
cmpl $0x105, %eax            # imm = 0x105
je 0x2ab2
cmpl $0x104, %eax            # imm = 0x104
jne 0x2aa6
decl 0x77c(%rdi)
jmp 0x2ac1
movl 0x780(%rdi), %eax
cmpl $0x105, %eax            # imm = 0x105
je 0x2aba
cmpl $0x104, %eax            # imm = 0x104
jne 0x2aa6
addl $-0x3, 0x77c(%rdi)
jmp 0x2ac1
movl $0x0, 0x77c(%rdi)
jmp 0x2ac1
incl 0x77c(%rdi)
jmp 0x2ac1
addl $0x3, 0x77c(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/drofp[P]RoadRun/src/game_environment.cc
// Function: roadrun::GameEnvironment::GameEnvironment()
GameEnvironment::GameEnvironment()
  {
    difficulty_to_high_score[SettingsItem::kRegular] = 0;
    difficulty_to_high_score[SettingsItem::kLudicrous] = 0;

    difficulty = SettingsItem::kRegular;
    main_menu = new MainMenu(difficulty_to_high_score, prev_score);
    settings_menu = new SettingsMenu(kMenuWidth, kMenuHeight);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x20(%rdi), %rbx
leaq 0x28(%rdi), %rax
xorl %ecx, %ecx
movl %ecx, 0x28(%rdi)
movq %rcx, 0x30(%rdi)
movq %rax, 0x38(%rdi)
movq %rax, 0x40(%rdi)
movq %rcx, 0x48(%rdi)
leaq -0x20(%rbp), %rsi
movl %ecx, (%rsi)
movq %rbx, %rdi
callq 0x2f94
movl $0x0, (%rax)
leaq -0x1c(%rbp), %rsi
movl $0x1, (%rsi)
movq %rbx, %rdi
callq 0x2f94
xorl %ecx, %ecx
movl %ecx, (%rax)
movl %ecx, (%r14)
movl $0x28, %edi
callq 0x2120
leaq 0x50(%r14), %rcx
movabsq $0x140000000a, %r15     # imm = 0x140000000A
movq %r15, 0x8(%rax)
leaq 0x3e6e(%rip), %rdx      # 0x6c88
addq $0x10, %rdx
movq %rdx, (%rax)
movl $0x0, 0x10(%rax)
movq %rbx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq %rax, 0x8(%r14)
movl $0x20, %edi
callq 0x2120
movq %r15, 0x8(%rax)
leaq 0x3f0f(%rip), %rcx      # 0x6d58
addq $0x10, %rcx
movq %rcx, (%rax)
movabsq $0x3d00000000, %rcx     # imm = 0x3D00000000
movq %rcx, 0x10(%rax)
movl $0x1e, 0x18(%rax)
movq %rax, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2e78
jmp 0x2e78
movq %rax, %r14
movq %rbx, %rdi
callq 0x2ffc
movq %r14, %rdi
callq 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O1/drofp[P]RoadRun/src/game_environment.cc
// Function: roadrun::GameEnvironment::PlayGame()
int GameEnvironment::PlayGame()
  {
    while(1)
    {
      main_menu->PrintMenu();
      roadrun::MenuItem menu_choice = main_menu->GetUserChoice();

      if(menu_choice == roadrun::MenuItem::kChooseDifficulty)
      {
        settings_menu->PrintMenu();
        difficulty = settings_menu->GetUserChoice();
      }
      else if (menu_choice == roadrun::MenuItem::kStartGame)
      {
        game = new Game(kMenuWidth, kMenuHeight, '^', difficulty,
                        difficulty_to_high_score, prev_score);
        game->PlayGame();

        delete game;

      }
      else
      {
        break;
      }
    }
    return 0;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
leaq 0x50(%rdi), %r12
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
testl %eax, %eax
je 0x2f1b
cmpl $0x1, %eax
jne 0x2f6d
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movl %eax, (%rbx)
jmp 0x2ee8
movl $0x7a0, %edi            # imm = 0x7A0
callq 0x2120
movq %rax, %r15
movl (%rbx), %r8d
movq %r12, (%rsp)
movq %rax, %rdi
movl $0x3d, %esi
movl $0x1e, %edx
movl $0x5e, %ecx
movq %r14, %r9
callq 0x247c
movq %r15, 0x18(%rbx)
movq %r15, %rdi
callq 0x25b4
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x2ee8
movl $0x7a0, %esi            # imm = 0x7A0
callq 0x2140
jmp 0x2ee8
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x7a0, %esi            # imm = 0x7A0
movq %r15, %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O1/drofp[P]RoadRun/src/main.cc
// Function: main
int main()
{
  roadrun::GameEnvironment *game_environment = new roadrun::GameEnvironment();
  game_environment->PlayGame();

  delete game_environment;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl $0x58, %edi
callq 0x2120
movq %rax, %rbx
movq %rax, %rdi
callq 0x2da0
movq %rbx, %rdi
callq 0x2ece
movq %rbx, %rdi
callq 0x2e8c
movl $0x58, %esi
movq %rbx, %rdi
callq 0x2140
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movl $0x58, %esi
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O1/drofp[P]RoadRun/src/main_menu.cc
// Function: roadrun::MainMenu::RenderOptions(_win_st*, int)
void MainMenu::RenderOptions(WINDOW *menu_win, int highlight)
  {
    mvwprintw(menu_win, 2, 4, "Main Menu");
    char *choices[] = {
        "Play Game",
        "Options",
        "Exit",
    };
    int x, y, i;
    x = y = 4;
    box(menu_win, 0,0);
    for(i = 0; i < num_menu_items; i++) {
      if(highlight == i + 1)
      {
        wattron(menu_win, A_REVERSE);
        mvwprintw(menu_win, y, x, "%s", MenuItemToString(choices, menu_item_list[i]));
        wattroff(menu_win, A_REVERSE);
      }
      else
      {
        mvwprintw(menu_win, y, x, "%s", MenuItemToString(choices, menu_item_list[i]));
      }
      ++y;
    }
    wrefresh(menu_win);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %rbx
leaq 0x146a(%rip), %rcx      # 0x45dd
movl $0x4, %r14d
movq %rsi, %rdi
movl $0x2, %esi
movl $0x4, %edx
xorl %eax, %eax
callq 0x2040
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2270
movl %r15d, %eax
leaq -0x4(,%rax,4), %r12
leaq 0xe59(%rip), %r15       # 0x4004
xorl %r13d, %r13d
cmpq %r13, %r12
jne 0x31ff
movq %rbx, %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x20b0
leaq 0x162f(%rip), %rax      # 0x47f8
movslq (%r13,%rax), %rax
leaq 0x3a9b(%rip), %rcx      # 0x6c70
movq (%rcx,%rax,8), %r8
movq %rbx, %rdi
movl %r14d, %esi
movl $0x4, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x2040
movq %rbx, %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x21d0
jmp 0x322b
leaq 0x15f2(%rip), %rax      # 0x47f8
movslq (%r13,%rax), %rax
leaq 0x3a5e(%rip), %rcx      # 0x6c70
movq (%rcx,%rax,8), %r8
movq %rbx, %rdi
movl %r14d, %esi
movl $0x4, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x2040
incl %r14d
addq $0x4, %r13
cmpq $0xc, %r13
jne 0x31ae
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2190
// File: /workspace/github_cpp_makefile_star2_O1/drofp[P]RoadRun/src/map_generator_easy.cc
// Function: roadrun::MapGeneratorEasy::GenerateMap(char*)
const char* MapGeneratorEasy::GenerateMap(char* game_map)
{
  // Create new line to be inserted at top of game_map
  char new_line[kMenuWidth];
  if (ticks % kMillisPerFrameEasy == 0)
  {
    GenerateNewLine(new_line);
    MapUpdater::MoveLinesDown(ticks, game_map, new_line);
  }

  ticks = ticks > kMaxTickCnt ? 0 : ++ticks;

  return game_map;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
imull $0x962fc963, 0x8(%rdi), %eax # imm = 0x962FC963
addl $0x1b4e81b, %eax        # imm = 0x1B4E81B
cmpl $0x369d036, %eax        # imm = 0x369D036
ja 0x34dc
leaq -0x60(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3504
movl 0x8(%r14), %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3878
movl 0x8(%r14), %eax
xorl %ecx, %ecx
cmpl $0x4e20, %eax           # imm = 0x4E20
jg 0x34f1
incl %eax
movl %eax, 0x8(%r14)
movl %eax, %ecx
movl %ecx, 0x8(%r14)
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop