LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 0x22565
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)
leaq 0x5831(%rip), %rsi      # 0x27dbd
callq 0x20c48
xorl %r15d, %r15d
pushq $0x25
popq %rbp
movq %rbx, %rdi
callq 0x20d90
cmpl %eax, %r15d
jge 0x2267e
movslq %r15d, %rcx
movb (%rbx,%rcx), %al
cmpb $0x25, %al
jne 0x225ea
movzbl 0x1(%rbx,%rcx), %eax
incq %rcx
movl %ecx, %r15d
cmpl $0x25, %eax
je 0x2262c
cmpl $0x63, %eax
je 0x225fa
cmpl $0x73, %eax
je 0x22613
cmpl $0x64, %eax
jne 0x225f5
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x22646
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x22654
movsbl %al, %esi
movq %r14, %rdi
callq 0x213f4
incl %r15d
jmp 0x22597
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x22633
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x22641
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x22660
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x2266e
movq %r14, %rdi
movl %ebp, %esi
jmp 0x225f0
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movsbl (%rax), %esi
jmp 0x225ed
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movl (%rax), %esi
movq %r14, %rdi
callq 0x2268c
jmp 0x225f5
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rsi
movq %r14, %rdi
callq 0x226c8
jmp 0x225f5
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x8
popq %rdi
callq 0x2170
movq %rax, %rbx
movq %rax, %rdi
callq 0x20cd8
movl %r14d, %eax
cltd
idivl %ebp
movl %edx, %r12d
leaq 0x6361(%rip), %r15      # 0x28a8d
addb $0x30, %r12b
movsbl %r12b, %esi
movq %rbx, %rdi
callq 0x213f4
movl %r14d, %eax
cltd
idivl %ebp
movl %eax, %r14d
cltd
idivl %ebp
movl %edx, %r12d
cmpl $0xa, %edx
jl 0x22758
movq %r15, %rdi
callq 0x2270
testl %r14d, %r14d
jne 0x2272c
movq %rbx, %rdi
callq 0x2278a
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x2180
movq %r14, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x8
popq %rdi
callq 0x2170
movq %rax, %rbx
movq (%r14), %rax
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x20c04
movq (%rbx), %rax
movl 0xc(%rax), %eax
xorl %ecx, %ecx
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
decl %eax
cmpq %rcx, %rdx
je 0x227de
movq (%rbx), %rsi
movq (%rsi), %rsi
cltq
movb (%rsi,%rax), %sil
movq (%r14), %rdi
movq (%rdi), %rdi
movb %sil, (%rdi,%rcx)
incq %rcx
jmp 0x227bc
movq %rbx, %rdi
callq 0x212b2
pushq $0x8
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2180
movq %rax, %r14
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x2180
movq %r14, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x21062
movq %rax, %r14
movq %rbx, %rdi
callq 0x20d90
xorl %ecx, %ecx
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
decl %eax
cmpq %rcx, %rdx
je 0x22847
cltq
movb (%rbx,%rax), %sil
movb %sil, (%r14,%rcx)
incq %rcx
jmp 0x22831
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rax
movq %rdx, (%rsp)
movq %rsi, %r14
movq %rdi, %r15
callq 0x20d90
movl %eax, %ebp
movq %r14, %rdi
callq 0x20d90
movl %eax, %r12d
subl %eax, %ebp
decl %r12d
xorl %r13d, %r13d
cmpl %ebp, %r13d
jg 0x228f5
leal (%r12,%r13), %edx
movq %r15, %rdi
movl %r13d, %esi
callq 0x2151c
testq %rax, %rax
je 0x228f5
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2123e
testb %al, %al
jne 0x228f9
movq %rbx, %rdi
callq 0x2210
incl %r13d
jmp 0x228bd
xorl %eax, %eax
jmp 0x22902
movq (%rsp), %rax
movl %r13d, (%rax)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::ends_with(char const*)
bool t_string::ends_with(const char* string)
{
	if(this->length() < string_length(string))
	{
		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 = this->length() - 1;
	unsigned int i_sub = string_length(string) - 1;
	while(1)
	{
		if(string[i_sub] != this->x(i_str))
		{
			return(false);
		}

		if(i_sub == 0)
		{
			return(true);
		}
		else
		{
			i_sub--;
		}

		i_str--;		
	} // i loop.

	return(true);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq (%rdi), %r14
movslq 0xc(%r14), %r15
movq %rsi, %rdi
callq 0x20d90
cmpl %eax, %r15d
jge 0x22950
xorl %ecx, %ecx
jmp 0x22978
movq (%r14), %rcx
leaq (%r15,%rcx), %rdx
decq %rdx
decl %eax
movl %eax, %ecx
movb (%rbx,%rcx), %sil
movb (%rdx), %dil
cmpb %dil, %sil
sete %cl
addl $-0x1, %eax
jae 0x22978
decq %rdx
cmpb %dil, %sil
je 0x2295c
movl %ecx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::starts_with(char const*)
bool t_string::starts_with(const char* string)
{
	if(this->length() < string_length(string))
	{
		return(false);
	}

	for(int i_str = 0; i_str < string_length(string); i_str++)
	{
		if(this->x(i_str) != string[i_str])
		{
			return(false);
		}
	}	

	return(true);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq (%rdi), %r14
movl 0xc(%r14), %ebp
movq %rsi, %rdi
callq 0x20d90
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %ebp
jl 0x229c9
movslq %ecx, %rdx
testl %ecx, %ecx
cmovlel %eax, %ecx
cmpq %rax, %rcx
je 0x229c3
movq (%r14), %rsi
movb (%rsi,%rax), %sil
leaq 0x1(%rax), %rdi
cmpb (%rbx,%rax), %sil
movq %rdi, %rax
je 0x229a6
xorl %eax, %eax
jmp 0x229c9
cmpq %rdx, %rax
setge %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
callq 0x20d90
movl %eax, %r12d
movq %r14, %rdi
callq 0x20d90
cmpl %eax, %r12d
cmovll %r12d, %eax
xorl %r13d, %r13d
testl %eax, %eax
movl $0x0, %ebp
movl %eax, 0x4(%rsp)
cmovgl %eax, %ebp
cmpq %r13, %rbp
je 0x22a3b
movsbl (%r15,%r13), %edi
testb %bl, %bl
je 0x22a1f
cmpb (%r14,%r13), %dil
je 0x22a36
jmp 0x22a3b
callq 0x2320
movl %eax, %r12d
movsbl (%r14,%r13), %edi
callq 0x2320
cmpl %eax, %r12d
jne 0x22a3b
incq %r13
jmp 0x22a09
movslq 0x4(%rsp), %rax
cmpq %rax, %r13
setge %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x20d90
movl %eax, %ebp
movq %rbx, %rdi
callq 0x20d90
cmpl %eax, %ebp
jge 0x22a77
xorl %ecx, %ecx
jmp 0x22a9f
movslq %ebp, %rcx
leaq (%rcx,%r14), %rdx
decq %rdx
decl %eax
movl %eax, %ecx
movb (%rbx,%rcx), %sil
movb (%rdx), %dil
cmpb %dil, %sil
sete %cl
addl $-0x1, %eax
jae 0x22a9f
decq %rdx
cmpb %dil, %sil
je 0x22a83
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x20d90
movl %eax, %ebp
movq %rbx, %rdi
callq 0x20d90
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %ebp
jl 0x22aef
movslq %ecx, %rdx
testl %ecx, %ecx
cmovlel %eax, %ecx
cmpq %rax, %rcx
je 0x22ae9
movb (%r14,%rax), %sil
leaq 0x1(%rax), %rdi
cmpb (%rbx,%rax), %sil
movq %rdi, %rax
je 0x22acf
xorl %eax, %eax
jmp 0x22aef
cmpq %rdx, %rax
setge %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
callq 0x20d90
movl %eax, %edx
decl %edx
addq %r14, %rdx
xorl %ecx, %ecx
pushq $0x1
popq %rsi
pushq $-0x30
popq %rdi
pushq $-0x37
popq %r8
pushq $-0x57
popq %r9
movsbl (%rdx), %r10d
leal -0x30(%r10), %ebp
movl %edi, %r11d
cmpb $0xa, %bpl
jb 0x22b50
leal -0x41(%r10), %ebp
movl %r8d, %r11d
cmpb $0x6, %bpl
jb 0x22b50
leal -0x61(%r10), %ebp
movl %r9d, %r11d
cmpb $0x6, %bpl
jae 0x22b6d
decl %eax
addl %r10d, %r11d
imull %esi, %r11d
addl %r11d, %ecx
imull %ebx, %esi
decq %rdx
testl %eax, %eax
jne 0x22b25
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x5ee0(%rip), %rdi      # 0x28a54
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x2050
xorl %edi, %edi
callq 0x21d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x2030
movq %rax, %r14
addl $-0x2c, %eax
leaq 0xc(%rsp), %r15
movl %eax, (%r15)
pushq $0x28
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2190
pushq $0x4
popq %r12
pushq $0x1
popq %r13
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x2330
addl $-0x8, %r14d
leaq 0x8(%rsp), %r15
movl %r14d, (%r15)
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x2190
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x2330
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2160
// File: /workspace/github_cpp_makefile_star2_O2/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 0x20d0
movb $0x1, 0x770(%rbx)
movb %r12b, 0x771(%rbx)
addl $-0x2, %r13d
movl %r13d, 0x774(%rbx)
pushq $0x2
popq %rcx
movl %r15d, %eax
cltd
idivl %ecx
movl %eax, 0x778(%rbx)
andl $0x0, 0x77c(%rbx)
andl $0x0, 0x784(%rbx)
movq %r14, %rdi
leaq -0x2c(%rbp), %r15
movq %r15, %rsi
callq 0x2a4a
movl (%rax), %eax
movl %eax, 0x788(%rbx)
movq %r14, 0x790(%rbx)
andl $0x0, 0x78c(%rbx)
movq 0x10(%rbp), %rax
movq %rax, 0x798(%rbx)
movl (%r15), %eax
movl %eax, 0x760(%rbx)
callq 0x2230
callq 0x2270
callq 0x21c0
callq 0x2070
xorl %edi, %edi
callq 0x2120
pushq $0x1e
popq %r14
pushq $0x3d
popq %r15
movl %r14d, %edi
movl %r15d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2170
movq %rax, (%rbx)
movl %r14d, %edi
movl %r14d, %esi
xorl %edx, %edx
movl %r15d, %ecx
callq 0x2170
movq %rax, 0x8(%rbx)
movl $0x12c, %edi            # imm = 0x12C
movl $0x12c, %esi            # imm = 0x12C
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2170
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
pushq $0x1
popq %r14
movl %r14d, %esi
callq 0x20e0
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x20a0
callq 0x2260
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
movq %rdi, %rbx
movl 0x760(%rdi), %edi
callq 0x358c
movq %rax, 0x768(%rbx)
movq %rbx, %rdi
callq 0x2694
pushq $0x1
popq %r14
cmpb $0x1, 0x770(%rbx)
jne 0x2639
movq (%rbx), %rdi
callq 0x2090
movl %eax, 0x780(%rbx)
cmpl $0x71, %eax
setne 0x770(%rbx)
movq %rbx, %rdi
callq 0x272c
movq %rbx, %rdi
callq 0x2766
movq %rbx, %rdi
callq 0x27dc
movl %r14d, %edi
callq 0x20f0
jmp 0x25f6
movq %rbx, %rdi
callq 0x2876
movq (%rbx), %rdi
callq 0x21b0
movq 0x8(%rbx), %rdi
callq 0x21b0
movq (%rbx), %rdi
callq 0x2150
movq 0x8(%rbx), %rdi
callq 0x2150
movq (%rbx), %rdi
callq 0x21b0
movq 0x8(%rbx), %rdi
callq 0x21b0
movq %rbx, %rdi
callq 0x291c
callq 0x21d0
movq 0x768(%rbx), %rdi
pushq $0x8
popq %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2160
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1b37(%rip), %rax      # 0x41e6
leaq 0x1c5c(%rip), %r14      # 0x4312
cmoveq %rax, %r14
movq 0x10(%rdi), %rdi
leaq 0x193f(%rip), %r15      # 0x4004
leaq 0x197e(%rip), %r8       # 0x404a
xorl %esi, %esi
xorl %edx, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x2040
movq 0x10(%rbx), %rdi
pushq $0xa
popq %rsi
xorl %edx, %edx
movq %r15, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x2040
movq 0x10(%rbx), %rdi
callq 0x21b0
movl $0x7d0, %edi            # imm = 0x7D0
callq 0x20f0
movq 0x10(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2180
movq 0x10(%rbx), %rdi
callq 0x21e0
movq 0x10(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21b0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x29e4
movl 0x778(%rbx), %eax
movl 0x77c(%rbx), %ecx
leal (%rcx,%rax), %edx
cmpl $0x3d, %edx
jb 0x2757
andl $0x0, 0x77c(%rbx)
xorl %ecx, %ecx
addl %eax, %ecx
movl %ecx, 0x778(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2150
movq (%rbx), %r14
movq 0x768(%rbx), %rdi
leaq 0x18(%rbx), %rsi
movq (%rdi), %rax
callq *(%rax)
leaq 0x1872(%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 0x1846(%rip), %rcx      # 0x4007
xorl %eax, %eax
callq 0x2040
movq %rbx, %rdi
callq 0x298c
movq (%rbx), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x21b0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2150
movq %rbx, %rdi
callq 0x29be
movq 0x8(%rbx), %rdi
movl 0x778(%rbx), %r8d
leaq 0x1802(%rip), %rcx      # 0x400a
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2040
movq 0x8(%rbx), %rdi
movl 0x788(%rbx), %r8d
leaq 0x17f8(%rip), %rcx      # 0x401d
pushq $0x1
popq %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2040
movq 0x8(%rbx), %rdi
movl 0x78c(%rbx), %r8d
leaq 0x1f54(%rip), %rcx      # 0x4797
pushq $0x2
popq %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2040
movq 0x8(%rbx), %rdi
leaq 0x17d2(%rip), %rcx      # 0x402c
pushq $0x3
popq %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2040
movq 0x8(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x21b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x28ad
movq 0x790(%rbx), %rdi
leaq 0x760(%rbx), %rsi
callq 0x2a4a
movl %r14d, (%rax)
movl 0x78c(%rbx), %r14d
movq 0x798(%rbx), %rax
movl %r14d, (%rax)
movq 0x8(%rbx), %rdi
callq 0x2150
movq 0x8(%rbx), %rdi
movl 0x788(%rbx), %r8d
leaq 0x1c92(%rip), %rcx      # 0x4564
pushq $0x7
popq %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2040
movq 0x8(%rbx), %r14
movq 0x790(%rbx), %rdi
leaq 0x760(%rbx), %rsi
callq 0x2a9c
movl (%rax), %r8d
leaq 0x1c74(%rip), %rcx      # 0x4573
pushq $0x8
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2040
movq 0x8(%rbx), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x21b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x16d4(%rip), %rcx      # 0x4004
leaq 0x1aef(%rip), %r8       # 0x4426
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2040
movq 0x10(%rbx), %rdi
movl 0x78c(%rbx), %r8d
leaq 0x1bfe(%rip), %rcx      # 0x4552
pushq $0xa
popq %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2040
movq 0x10(%rbx), %rdi
callq 0x21b0
movl $0x7d0, %edi            # imm = 0x7D0
callq 0x20f0
movq 0x10(%rbx), %rdi
callq 0x21e0
movq 0x10(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x21b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x29e2
incl 0x78c(%rdi)
andl $0x0, 0x784(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2a13
testl %eax, %eax
jne 0x2a48
movl 0x780(%rdi), %eax
cmpl $0x105, %eax            # imm = 0x105
je 0x2a39
cmpl $0x104, %eax            # imm = 0x104
jne 0x2a30
decl 0x77c(%rdi)
jmp 0x2a48
movl 0x780(%rdi), %eax
cmpl $0x105, %eax            # imm = 0x105
je 0x2a41
cmpl $0x104, %eax            # imm = 0x104
jne 0x2a30
addl $-0x3, 0x77c(%rdi)
jmp 0x2a48
andl $0x0, 0x77c(%rdi)
jmp 0x2a48
incl 0x77c(%rdi)
jmp 0x2a48
addl $0x3, 0x77c(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
andl $0x0, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
movq %rax, 0x38(%rdi)
movq %rax, 0x40(%rdi)
andq $0x0, 0x48(%rdi)
leaq -0x20(%rbp), %rsi
andl $0x0, (%rsi)
movq %rbx, %rdi
callq 0x2f66
andl $0x0, (%rax)
leaq -0x1c(%rbp), %rsi
movl $0x1, (%rsi)
movq %rbx, %rdi
callq 0x2f66
andl $0x0, (%rax)
andl $0x0, (%r14)
pushq $0x28
popq %rdi
callq 0x2140
movabsq $0x140000000a, %r15     # imm = 0x140000000A
movq %r15, 0x8(%rax)
leaq 0x3e65(%rip), %rcx      # 0x6c68
addq $0x10, %rcx
movq %rcx, (%rax)
andl $0x0, 0x10(%rax)
leaq 0x50(%r14), %rcx
movq %rbx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq %rax, 0x8(%r14)
pushq $0x20
popq %rdi
callq 0x2140
movq %r15, 0x8(%rax)
leaq 0x3f17(%rip), %rcx      # 0x6d48
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 0x2e60
jmp 0x2e60
movq %rax, %r14
movq %rbx, %rdi
callq 0x2fb8
movq %r14, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
leaq 0x50(%rdi), %r12
pushq $0x5e
popq %r13
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
testl %eax, %eax
je 0x2ef8
cmpl $0x1, %eax
jne 0x2f3c
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movl %eax, (%rbx)
jmp 0x2ec5
movl $0x7a0, %edi            # imm = 0x7A0
callq 0x2140
movq %rax, %r15
movl (%rbx), %r8d
movq %r12, (%rsp)
movq %rax, %rdi
pushq $0x3d
popq %rsi
pushq $0x1e
popq %rdx
movl %r13d, %ecx
movq %r14, %r9
callq 0x249c
movq %r15, 0x18(%rbx)
movq %r15, %rdi
callq 0x25ce
movq 0x18(%rbx), %rdi
movl $0x7a0, %esi            # imm = 0x7A0
callq 0x2160
jmp 0x2ec5
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x7a0, %esi            # imm = 0x7A0
movq %r15, %rdi
callq 0x2160
movq %rbx, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x58
popq %rdi
callq 0x2140
movq %rax, %rbx
movq %rax, %rdi
callq 0x2d90
movq %rbx, %rdi
callq 0x2ea8
movq %rbx, %rdi
callq 0x2e74
pushq $0x58
popq %rsi
movq %rbx, %rdi
callq 0x2160
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
pushq $0x58
popq %rsi
movq %rbx, %rdi
callq 0x2160
movq %r14, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x145f(%rip), %rcx      # 0x459a
pushq $0x2
popq %rsi
pushq $0x4
popq %r12
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0x2040
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2290
movl %r15d, %eax
leaq -0x4(,%rax,4), %r13
xorl %r14d, %r14d
movl %r12d, %r15d
cmpq $0xc, %r14
je 0x3201
cmpq %r14, %r13
jne 0x31c8
movq %rbx, %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x20c0
leaq 0x1623(%rip), %rax      # 0x47b4
movslq (%r14,%rax), %rax
leaq 0x3ab4(%rip), %rcx      # 0x6c50
movq (%rcx,%rax,8), %r8
movq %rbx, %rdi
movl %r12d, %esi
movl %r15d, %edx
leaq 0xe54(%rip), %rcx       # 0x4004
xorl %eax, %eax
callq 0x2040
movq %rbx, %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x21f0
jmp 0x31f5
leaq 0x15e5(%rip), %rax      # 0x47b4
movslq (%r14,%rax), %rax
leaq 0x3a76(%rip), %rcx      # 0x6c50
movq (%rcx,%rax,8), %r8
movq %rbx, %rdi
movl %r12d, %esi
movl %r15d, %edx
leaq 0xe16(%rip), %rcx       # 0x4004
xorl %eax, %eax
callq 0x2040
incl %r12d
addq $0x4, %r14
jmp 0x316c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
movl 0x8(%rdi), %ecx
pushq $0x4b
popq %rsi
movl %ecx, %eax
cltd
idivl %esi
testl %edx, %edx
jne 0x3484
leaq -0x60(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x34a4
movl 0x8(%r14), %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x370c
movl 0x8(%r14), %ecx
leal 0x1(%rcx), %eax
xorl %edx, %edx
cmpl $0x4e21, %ecx           # imm = 0x4E21
cmovll %eax, %edx
movl %edx, 0x8(%r14)
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/drofp[P]RoadRun/src/map_generator_easy.cc
// Function: roadrun::MapGeneratorEasy::GenerateNewLine(char*)
void MapGeneratorEasy::GenerateNewLine(char* new_line)
{
  // Generate left wall
  GenerateWall(roadrun::WallSide::kLeft, new_line);

  // Generate rocks with delay
  if (ticks % kMillisPerRock == 0)
  {
    int i = (kMenuWidth - 1) / 3;
    int index = rand() % 20 + 18;
    while (i < 2 * (kMenuWidth - 1) / 3)
    {
      if (i == index)
      {
        /* 39 is max right, 20 is max left. we are
        getting a random place to put some rocks */
        new_line[i] = (char)'*';
        new_line[i + 1] = (char)'*';
        new_line[i + 2] = (char)'*';
        i += 3;
      }
      else
      {
        new_line[i] = (char)' ';
        i++;
      }
    }
  }
  else
  {
    for (int i = (kMenuWidth - 1) / 3; i < 2 * (kMenuWidth - 1) / 3; i++)
    {
      new_line[i] = (char)' ';
    }
  }

  // Generate right wall
  GenerateWall(roadrun::WallSide::kRight, new_line);

  new_line[kMenuWidth - 1] = '\n';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
movq %rbx, %rdx
callq 0x352a
movl 0x8(%r14), %eax
movl $0x96, %ecx
cltd
idivl %ecx
testl %edx, %edx
je 0x34dd
pushq $-0x14
popq %rax
testq %rax, %rax
je 0x3515
movb $0x20, 0x28(%rbx,%rax)
incq %rax
jmp 0x34ce
callq 0x2050
pushq $0x14
popq %rcx
cltd
idivl %ecx
movslq %edx, %rax
leaq 0x12(%rax), %rdx
addl $0x15, %eax
cmpl $0x27, %ecx
jg 0x3515
cmpl %edx, %ecx
jne 0x350a
movw $0x2a2a, (%rbx,%rdx)    # imm = 0x2A2A
movb $0x2a, 0x2(%rbx,%rdx)
movl %eax, %ecx
jmp 0x34f2
movslq %ecx, %rsi
movb $0x20, (%rbx,%rsi)
incl %ecx
jmp 0x34f2
pushq $0x1
popq %rsi
movq %rbx, %rdx
callq 0x352a
movb $0xa, 0x3c(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/drofp[P]RoadRun/src/map_generator_easy.cc
// Function: roadrun::MapGeneratorEasy::GenerateWall(roadrun::WallSide, char*)
void MapGeneratorEasy::GenerateWall(roadrun::WallSide wall_side,
                                    char* new_line)
{
  int lower_limit, upper_limit;
  if (wall_side == roadrun::WallSide::kLeft)
  {
    lower_limit = 0;
    upper_limit = (kMenuWidth - 1) / 3;
  }
  else
  {
    lower_limit = 2 * (kMenuWidth - 1) / 3;
    upper_limit = kMenuWidth - 1;
  }

  for (int i = lower_limit; i < upper_limit; i++)
  {
    if (rand() % 3 == 0)
      new_line[i] = (char)'D';
    else
      new_line[i] = (char)'#';
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %eax, %eax
testl %esi, %esi
pushq $0x28
popq %r14
cmoveq %rax, %r14
pushq $0x14
popq %rax
pushq $0x3c
popq %r15
cmoveq %rax, %r15
movq %rdx, %rbx
pushq $0x44
popq %r13
pushq $0x23
popq %r12
cmpq %r15, %r14
jae 0x357c
callq 0x2050
cltd
pushq $0x3
popq %rcx
idivl %ecx
testl %edx, %edx
movl %r12d, %eax
cmovel %r13d, %eax
movb %al, (%rbx,%r14)
incq %r14
jmp 0x355a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/drofp[P]RoadRun/src/map_generator_factory.cc
// Function: roadrun::MapGeneratorFactory::create(roadrun::SettingsItem)
MapGenerator* MapGeneratorFactory::create(SettingsItem difficulty)
{
  if (difficulty == SettingsItem::kRegular)
   return new MapGeneratorEasy();
  else if (difficulty == SettingsItem::kLudicrous)
    return new MapGeneratorHard();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %edi, %edi
je 0x35c1
pushq $0x18
popq %rdi
callq 0x2140
leaq 0x3755(%rip), %rcx      # 0x6cf8
addq $0x10, %rcx
movq %rcx, (%rax)
movabsq $0x1400000000, %rcx     # imm = 0x1400000000
movq %rcx, 0x8(%rax)
movl $0x28, 0x10(%rax)
jmp 0x35db
pushq $0x10
popq %rdi
callq 0x2140
leaq 0x36e8(%rip), %rcx      # 0x6cb8
addq $0x10, %rcx
movq %rcx, (%rax)
andl $0x0, 0x8(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/drofp[P]RoadRun/src/map_generator_hard.cc
// Function: roadrun::MapGeneratorHard::GenerateMap(char*)
const char* MapGeneratorHard::GenerateMap(char* game_map)
{
  // Create new line to be inserted at top of game_map
  char new_line[kMenuWidth];
  if (ticks % kMillisPerFrameHard == 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
movl 0x8(%rdi), %ecx
pushq $0xa
popq %rsi
movl %ecx, %eax
cltd
idivl %esi
testl %edx, %edx
jne 0x3624
leaq -0x60(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3644
movl 0x8(%r14), %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x370c
movl 0x8(%r14), %ecx
leal 0x1(%rcx), %eax
xorl %edx, %edx
cmpl $0x4e21, %ecx           # imm = 0x4E21
cmovll %eax, %edx
movl %edx, 0x8(%r14)
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/drofp[P]RoadRun/src/map_generator_hard.cc
// Function: roadrun::MapGeneratorHard::GenerateNewLine(char*)
void MapGeneratorHard::GenerateNewLine(char* new_line)
{
  int wall_shift = rand() % 2 == 0 ? -1 : 1;

  if (split_location_right + wall_shift < kMenuWidth
      && split_location_left + wall_shift > 0)
  {
    split_location_left += wall_shift;
    split_location_right += wall_shift;
  }

  GenerateWall(roadrun::WallSide::kLeft, new_line, split_location_left);

  for (int i = split_location_left; i < split_location_right; i++)
    new_line[i] = (char)' ';

  GenerateWall(roadrun::WallSide::kRight, new_line, split_location_right);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2050
andl $0x1, %eax
xorl %edx, %edx
cmpl $0x1, %eax
sbbl %edx, %edx
orl $0x1, %edx
movl 0x10(%r14), %eax
addl %edx, %eax
movl 0xc(%r14), %ecx
cmpl $0x3c, %eax
jg 0x3680
addl %ecx, %edx
jle 0x3680
movl %edx, 0xc(%r14)
movl %eax, 0x10(%r14)
movl %edx, %ecx
xorl %esi, %esi
movq %rbx, %rdx
callq 0x36b0
movslq 0xc(%r14), %rax
movslq 0x10(%r14), %rcx
cmpq %rcx, %rax
jge 0x36a0
movb $0x20, (%rbx,%rax)
incq %rax
jmp 0x368e
pushq $0x1
popq %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x36b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/drofp[P]RoadRun/src/map_generator_hard.cc
// Function: roadrun::MapGeneratorHard::GenerateWall(roadrun::WallSide, char*, int)
void MapGeneratorHard::GenerateWall(roadrun::WallSide wall_side,
                                    char* new_line,
                                    int wall_edge)
{
  int lower_limit, upper_limit;
  if (wall_side == roadrun::WallSide::kLeft)
  {
    lower_limit = 0;
    upper_limit = wall_edge;
  }
  else
  {
    lower_limit = wall_edge;
    upper_limit = kMenuWidth - 1;
  }

  for (int i = lower_limit; i < upper_limit; i++)
  {
    if (rand() % 3 == 0)
      new_line[i] = (char)'D';
    else
      new_line[i] = (char)'#';
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
testl %esi, %esi
cmovnel %ecx, %esi
pushq $0x3c
popq %rax
cmovel %ecx, %eax
movslq %esi, %r14
movslq %eax, %r15
pushq $0x44
popq %r13
pushq $0x23
popq %r12
cmpq %r15, %r14
jge 0x36fc
callq 0x2050
cltd
pushq $0x3
popq %rcx
idivl %ecx
testl %edx, %edx
movl %r12d, %eax
cmovel %r13d, %eax
movb %al, (%rbx,%r14)
incq %r14
jmp 0x36da
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/drofp[P]RoadRun/src/map_updater.cc
// Function: roadrun::MapUpdater::MoveLinesDown(int, char*, char*)
void MapUpdater::MoveLinesDown(int ticks, char* game_map, char* new_line)
{
  for (int j = kMenuHeight - 1; j > 0; j--) {
    for (int i = 0; i < kMenuWidth; i++) {
      game_map[(j * kMenuWidth) + i] = game_map[((j - 1) * (kMenuWidth)) + i];
    }
  }

  // Write the new line to the 0th line of game_map
  for (int i = 0; i < kMenuWidth; i++)
  {
    game_map[i] = new_line[i];
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x6e9(%rsi), %rax
movabsq $0x1d, %rcx
movabsq $-0x3d, %rdi
subq $0x1, %rcx
jb 0x374d
movq %rdi, %r8
testq %r8, %r8
je 0x3747
movb (%rax,%r8), %r9b
movb %r9b, 0x3d(%rax,%r8)
incq %r8
jmp 0x3734
addq $-0x3d, %rax
jmp 0x372b
xorl %eax, %eax
cmpq $0x3d, %rax
je 0x3760
movb (%rdx,%rax), %cl
movb %cl, (%rsi,%rax)
incq %rax
jmp 0x374f
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/drofp[P]RoadRun/src/settings_menu.cc
// Function: roadrun::SettingsMenu::RenderOptions(_win_st*, int)
void SettingsMenu::RenderOptions(WINDOW *menu_win, int highlight)
  {
    mvwprintw(menu_win, 2, 4, "Choose a Difficulty");
    char *choices[] = {
        "Regular Mode",
        "Ludicrous Mode",
        "Ron Mak",
    };
    int x, y, i;
    x = y = 4;
    box(menu_win, 0,0);
    for(i = 0; i < num_settings_items; i++) {
      if(highlight == i + 1)
      {
        wattron(menu_win, A_REVERSE);
        mvwprintw(menu_win, y, x, "%s",
                  SettingToString(choices, settings_item_list[i]));
        wattroff(menu_win, A_REVERSE);
      }
      else
      {
        mvwprintw(menu_win, y, x, "%s",
                  SettingToString(choices, settings_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 0x10c7(%rip), %rcx      # 0x4846
pushq $0x2
popq %rsi
pushq $0x4
popq %r12
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0x2040
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2290
movl %r15d, %eax
leaq -0x4(,%rax,4), %r13
xorl %r14d, %r14d
movl %r12d, %r15d
cmpq $0x8, %r14
je 0x3845
cmpq %r14, %r13
jne 0x380c
movq %rbx, %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x20c0
leaq 0x10ab(%rip), %rax      # 0x4880
movslq (%r14,%rax), %rax
leaq 0x3550(%rip), %rcx      # 0x6d30
movq (%rcx,%rax,8), %r8
movq %rbx, %rdi
movl %r12d, %esi
movl %r15d, %edx
leaq 0x810(%rip), %rcx       # 0x4004
xorl %eax, %eax
callq 0x2040
movq %rbx, %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x21f0
jmp 0x3839
leaq 0x106d(%rip), %rax      # 0x4880
movslq (%r14,%rax), %rax
leaq 0x3512(%rip), %rcx      # 0x6d30
movq (%rcx,%rax,8), %r8
movq %rbx, %rdi
movl %r12d, %esi
movl %r15d, %edx
leaq 0x7d2(%rip), %rcx       # 0x4004
xorl %eax, %eax
callq 0x2040
incl %r12d
addq $0x4, %r14
jmp 0x37b0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21b0
nop