LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::replace_avoid_list(char*, char*, char)
void t_string::replace_avoid_list(char* str, char* avoided_char_list, char char_to_replace)
{
	char* temp_str = new char[string_length(str) + 3];
	//memset(temp_str, 0, string_length(str) + 3);
	t_string::set_byte_buffer(temp_str, string_length(str) + 3, 0);
	int i_tmp_str = 0;
	for(int i_str = 0; i_str < string_length(str); i_str++)
	{
		// Look for avoided chars. if found, replace.
		bool found_avoided_char = false;
		for(int i_avoided = 0; i_avoided < string_length(avoided_char_list); i_avoided++)
		{
			if(str[i_str] == avoided_char_list[i_avoided])
			{
				found_avoided_char = true;
			}
		} // i_avoided loop

		if(found_avoided_char)
		{
			if(char_to_replace == 0)
			{
				// Do not put anything in the temporary string.
			}
			else
			{
				temp_str[i_tmp_str] = char_to_replace;
				i_tmp_str++;
			}
		}
		else
		{
			temp_str[i_tmp_str] = str[i_str];
			i_tmp_str++;
		}
	} // i_str loop

	copy(str, temp_str);
	delete [] temp_str;
}

// Assembly:
subq $0x48, %rsp
movb %dl, %al
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movb %al, 0x37(%rsp)
movq 0x40(%rsp), %rdi
callq 0x47640
addl $0x3, %eax
movslq %eax, %rdi
callq 0x2040
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rdi
callq 0x47640
movq 0x10(%rsp), %rdi
addl $0x3, %eax
movslq %eax, %rsi
xorl %edx, %edx
callq 0x473c0
movl $0x0, 0x24(%rsp)
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x40(%rsp), %rdi
callq 0x47640
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x489f9
movb $0x0, 0x1f(%rsp)
movl $0x0, 0x18(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
callq 0x47640
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x48991
movq 0x40(%rsp), %rax
movslq 0x20(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movq 0x38(%rsp), %rcx
movslq 0x18(%rsp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0x48982
movb $0x1, 0x1f(%rsp)
jmp 0x48984
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x48941
testb $0x1, 0x1f(%rsp)
je 0x489c2
movsbl 0x37(%rsp), %eax
cmpl $0x0, %eax
jne 0x489a4
jmp 0x489c0
movb 0x37(%rsp), %dl
movq 0x28(%rsp), %rax
movslq 0x24(%rsp), %rcx
movb %dl, (%rax,%rcx)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x489e7
movq 0x40(%rsp), %rax
movslq 0x20(%rsp), %rcx
movb (%rax,%rcx), %dl
movq 0x28(%rsp), %rax
movslq 0x24(%rsp), %rcx
movb %dl, (%rax,%rcx)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x489e9
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x48914
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x47bc0
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x48a20
movq (%rsp), %rdi
callq 0x2220
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::pool_obj_list(std::vector<std::vector<void*, std::allocator<void*>>*, std::allocator<std::vector<void*, std::allocator<void*>>*>>*)
vector<void*>* t_string::pool_obj_list(vector<vector<void*>*>* obj_lists_list)
{
	vector<void*>* pooled_list = new vector<void*>();

	for(int i_l = 0; i_l < (int)obj_lists_list->size(); i_l++)
	{
		pooled_list->insert(pooled_list->end(), obj_lists_list->at(i_l)->begin(), obj_lists_list->at(i_l)->end());
	} // i_l loop.

	return(pooled_list);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movl $0x18, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x10(%rsp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq 0x10(%rsp), %rdi
callq 0x4b440
movq 0x10(%rsp), %rax
movq %rax, 0x48(%rsp)
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x50(%rsp), %rdi
callq 0x4b450
movq %rax, %rcx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x48b20
movq 0x48(%rsp), %rax
movq %rax, (%rsp)
movq 0x48(%rsp), %rdi
callq 0x4b530
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4b560
movq 0x50(%rsp), %rdi
movslq 0x44(%rsp), %rsi
callq 0x4b5a0
movq (%rax), %rdi
callq 0x4b5e0
movq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rdi
movslq 0x44(%rsp), %rsi
callq 0x4b5a0
movq (%rax), %rdi
callq 0x4b530
movq (%rsp), %rdi
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0x4b470
movq %rax, 0x18(%rsp)
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x48a73
movq 0x48(%rsp), %rax
addq $0x58, %rsp
retq
nopw (%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::interleave_obj_list(std::vector<std::vector<void*, std::allocator<void*>>*, std::allocator<std::vector<void*, std::allocator<void*>>*>>*)
vector<void*>* t_string::interleave_obj_list(vector<vector<void*>*>* obj_lists_list)
{
	vector<void*>* interleaved_list = new vector<void*>();

	int* indices_per_list = new int[(int)obj_lists_list->size()];

	// At the begining all the indices are 0.
	for(int i_i = 0; i_i < (int)obj_lists_list->size(); i_i++)
	{

		indices_per_list[i_i] = 0;
	} // i_i loop.

	while(1)
	{
		bool added = false;

		for(int i_l = 0; i_l < (int)obj_lists_list->size(); i_l++)
		{
			// If the index for this list did not pass the end of the list, add the object to the list.
			if(indices_per_list[i_l] < (int)obj_lists_list->at(i_l)->size())
			{
				interleaved_list->push_back(obj_lists_list->at(i_l)->at(indices_per_list[i_l]));
				indices_per_list[i_l]++;
				added = true;
			}
		} // i_l loop.

		if(!added)
		{
			return(interleaved_list);
		}
	} // infinite loop exits when there are no more obj's to add.
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl $0x18, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x18(%rsp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq 0x18(%rsp), %rdi
callq 0x4b440
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rdi
callq 0x4b450
cltq
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2040
movq %rax, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x40(%rsp), %rdi
callq 0x4b450
movq %rax, %rcx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x48be0
movq 0x30(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movl $0x0, (%rax,%rcx,4)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x48ba5
jmp 0x48be2
movb $0x0, 0x2b(%rsp)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x10(%rsp)
movq 0x40(%rsp), %rdi
callq 0x4b450
movq %rax, %rcx
movl 0x10(%rsp), %eax
cmpl %ecx, %eax
jge 0x48ca7
movq 0x30(%rsp), %rax
movslq 0x24(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0xc(%rsp)
movq 0x40(%rsp), %rdi
movslq 0x24(%rsp), %rsi
callq 0x4b5a0
movq (%rax), %rdi
callq 0x34360
movq %rax, %rcx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x48c95
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq 0x40(%rsp), %rdi
movslq 0x24(%rsp), %rsi
callq 0x4b5a0
movq (%rax), %rdi
movq 0x30(%rsp), %rax
movslq 0x24(%rsp), %rcx
movslq (%rax,%rcx,4), %rsi
callq 0x31db0
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x4b610
movq 0x30(%rsp), %rax
movslq 0x24(%rsp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movb $0x1, 0x2b(%rsp)
jmp 0x48c97
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x48bef
testb $0x1, 0x2b(%rsp)
jne 0x48cb8
movq 0x38(%rsp), %rax
addq $0x48, %rsp
retq
jmp 0x48be2
nopl (%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::split_object_list(std::vector<void*, std::allocator<void*>>*, int)
vector<vector<void*>*>* t_string::split_object_list(vector<void*>* obj_list, int n_batches)
{
	vector<vector<void*>*>* batches = new vector<vector<void*>*>();

	int n_objs_per_batch = (int)obj_list->size() / n_batches;
	vector<void*>* current_batch = new vector<void*>();
	batches->push_back(current_batch);
	for(int i_str = 0; i_str < (int)obj_list->size(); i_str++)
	{
		if((int)current_batch->size() == n_objs_per_batch)
		{
			current_batch = new vector<void*>();
			batches->push_back(current_batch);
		}

		current_batch->push_back(obj_list->at(i_str));
	} // i_str loop.

	return(batches);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movl $0x18, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x18(%rsp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq 0x18(%rsp), %rdi
callq 0x4b680
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x50(%rsp), %rdi
callq 0x34360
cltd
idivl 0x4c(%rsp)
movl %eax, 0x3c(%rsp)
movl $0x18, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x20(%rsp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq 0x20(%rsp), %rdi
callq 0x4b440
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4b690
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x50(%rsp), %rdi
callq 0x34360
movq %rax, %rcx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x48e01
movq 0x30(%rsp), %rdi
callq 0x34360
cmpl 0x3c(%rsp), %eax
jne 0x48dcd
movl $0x18, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x8(%rsp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq 0x8(%rsp), %rdi
callq 0x4b440
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4b690
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x31db0
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x4b610
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x48d5b
movq 0x40(%rsp), %rax
addq $0x58, %rsp
retq
nopl (%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::split_string_list(std::vector<char*, std::allocator<char*>>*, int)
vector<vector<char*>*>* t_string::split_string_list(vector<char*>* string_list, int n_batches)
{
	vector<vector<char*>*>* batches = new vector<vector<char*>*>();

	int n_string_per_batch = (int)string_list->size() / n_batches;
	vector<char*>* current_batch = new vector<char*>();
	batches->push_back(current_batch);
	for(int i_str = 0; i_str < (int)string_list->size(); i_str++)
	{
		if((int)current_batch->size() == n_string_per_batch)
		{
			current_batch = new vector<char*>();
			batches->push_back(current_batch);
		}

		current_batch->push_back(string_list->at(i_str));
	} // i_str loop.

	return(batches);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movl $0x18, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x18(%rsp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq 0x18(%rsp), %rdi
callq 0x4b700
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x50(%rsp), %rdi
callq 0xc220
cltd
idivl 0x4c(%rsp)
movl %eax, 0x3c(%rsp)
movl $0x18, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x20(%rsp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq 0x20(%rsp), %rdi
callq 0xc630
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4b710
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x50(%rsp), %rdi
callq 0xc220
movq %rax, %rcx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x48f51
movq 0x30(%rsp), %rdi
callq 0xc220
cmpl 0x3c(%rsp), %eax
jne 0x48f1d
movl $0x18, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x8(%rsp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq 0x8(%rsp), %rdi
callq 0xc630
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4b710
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0xc240
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x1fbe0
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x48eab
movq 0x40(%rsp), %rax
addq $0x58, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movl $0x18, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x18(%rsp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq 0x18(%rsp), %rdi
callq 0x4b780
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x50(%rsp), %rdi
callq 0xc2a0
cltd
idivl 0x4c(%rsp)
movl %eax, 0x3c(%rsp)
movl $0x18, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x20(%rsp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq 0x20(%rsp), %rdi
callq 0xc290
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4b790
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x50(%rsp), %rdi
callq 0xc2a0
movq %rax, %rcx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x490a1
movq 0x30(%rsp), %rdi
callq 0xc2a0
cmpl 0x3c(%rsp), %eax
jne 0x4906d
movl $0x18, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x8(%rsp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq 0x8(%rsp), %rdi
callq 0xc290
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4b790
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0xc2c0
movq (%rsp), %rdi
movq %rax, %rsi
callq 0xc340
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x48ffb
movq 0x40(%rsp), %rax
addq $0x58, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x490cf
movq $0x0, 0x40(%rsp)
jmp 0x491c0
movl $0x18, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x18(%rsp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq 0x18(%rsp), %rdi
callq 0xc630
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x38(%rsp), %rdi
callq 0xc220
movq %rax, %rcx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x491b6
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0xc240
movq 0x8(%rsp), %rdi
movq (%rax), %rsi
callq 0x47cf0
movl %eax, 0x28(%rsp)
movl 0x28(%rsp), %eax
movl %eax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
callq 0xc220
movq %rax, %rcx
movl 0x10(%rsp), %eax
cmpl %ecx, %eax
jne 0x491a4
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0xc240
movq (%rax), %rdi
callq 0x47b60
movq (%rsp), %rdi
movq %rax, 0x20(%rsp)
leaq 0x20(%rsp), %rsi
callq 0xc640
jmp 0x491a6
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x49109
movq 0x30(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::get_next_token(char*, char*, int, char const*, int&)
bool t_string::get_next_token(char* string, char* buffer, int l_buffer, const char* delimiter_list, int& i_cur_char)
{
	int i_buff_char = 0;

	// Initialize the string.
	buffer[i_buff_char] = 0;
	while(string[i_cur_char] != 0)
	{
		// Search for delimiters.
		int i_delim = 0;
		while(delimiter_list[i_delim] != 0)
		{
			if(string[i_cur_char] == delimiter_list[i_delim])
			{
				// Move to the next character right after the delimiter.
				i_cur_char++;

				buffer[i_buff_char] = 0;

				if(i_buff_char > 0)
				{	
					return true;
				}
				else
				{
					return false;
				}
			}

			i_delim++;
		} // delimiter list search.

		// Copy the current character to the buffer and update the indices.
		if(i_buff_char < l_buffer)
		{
			buffer[i_buff_char] = string[i_cur_char];
		}

		i_cur_char++;
		i_buff_char++;
	} // string parsing loop.

	buffer[i_buff_char] = 0;

	if(i_buff_char > 0)
	{
		return true;
	}
	else
	{
		return false;
	}
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movl %edx, -0x1c(%rsp)
movq %rcx, -0x28(%rsp)
movq %r8, -0x30(%rsp)
movl $0x0, -0x34(%rsp)
movq -0x18(%rsp), %rax
movslq -0x34(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x10(%rsp), %rax
movq -0x30(%rsp), %rcx
movslq (%rcx), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x492d5
movl $0x0, -0x38(%rsp)
movq -0x28(%rsp), %rax
movslq -0x38(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x49292
movq -0x10(%rsp), %rax
movq -0x30(%rsp), %rcx
movslq (%rcx), %rcx
movsbl (%rax,%rcx), %eax
movq -0x28(%rsp), %rcx
movslq -0x38(%rsp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0x49285
movq -0x30(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x18(%rsp), %rax
movslq -0x34(%rsp), %rcx
movb $0x0, (%rax,%rcx)
cmpl $0x0, -0x34(%rsp)
jle 0x4927e
movb $0x1, -0x1(%rsp)
jmp 0x492f6
movb $0x0, -0x1(%rsp)
jmp 0x492f6
movl -0x38(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rsp)
jmp 0x49220
movl -0x34(%rsp), %eax
cmpl -0x1c(%rsp), %eax
jge 0x492b9
movq -0x10(%rsp), %rax
movq -0x30(%rsp), %rcx
movslq (%rcx), %rcx
movb (%rax,%rcx), %dl
movq -0x18(%rsp), %rax
movslq -0x34(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq -0x30(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl -0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rsp)
jmp 0x491fe
movq -0x18(%rsp), %rax
movslq -0x34(%rsp), %rcx
movb $0x0, (%rax,%rcx)
cmpl $0x0, -0x34(%rsp)
jle 0x492f1
movb $0x1, -0x1(%rsp)
jmp 0x492f6
movb $0x0, -0x1(%rsp)
movb -0x1(%rsp), %al
andb $0x1, %al
retq
nopl (%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0xc220
movq %rax, %rcx
movl 0x18(%rsp), %eax
cmpl %ecx, %eax
jge 0x49e14
movq 0x20(%rsp), %rdi
movslq 0x1c(%rsp), %rsi
callq 0xc240
movq (%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x49e05
movq 0x10(%rsp), %rdi
callq 0x2220
jmp 0x49e07
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x49dc1
movq 0x20(%rsp), %rdi
callq 0x4b880
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x49e47
movq 0x8(%rsp), %rdi
callq 0xc570
movq 0x8(%rsp), %rdi
movl $0x18, %esi
callq 0x21a0
addq $0x28, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x45c40
movq %rax, %rcx
movl 0x18(%rsp), %eax
cmpl %ecx, %eax
jge 0x49ec3
movq 0x20(%rsp), %rdi
movslq 0x1c(%rsp), %rsi
callq 0x45ca0
movq (%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x49eb4
movq 0x10(%rsp), %rdi
callq 0x47f70
movq 0x10(%rsp), %rdi
movl $0x8, %esi
callq 0x21a0
jmp 0x49eb6
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x49e61
movq 0x20(%rsp), %rdi
callq 0x4b8a0
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x49ef6
movq 0x8(%rsp), %rdi
callq 0x4b8c0
movq 0x8(%rsp), %rdi
movl $0x18, %esi
callq 0x21a0
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x20(%rsp), %rdi
callq 0x47640
movl %eax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x18(%rsp), %eax
jge 0x49f5d
movq 0x20(%rsp), %rax
movslq 0x14(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x20, %eax
je 0x49f4e
movl 0x14(%rsp), %eax
movl %eax, 0x1c(%rsp)
jmp 0x49f5d
jmp 0x49f50
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x49f27
movl 0x18(%rsp), %eax
addl $0x2, %eax
movslq %eax, %rdi
callq 0x2040
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
movslq 0x1c(%rsp), %rax
addq %rax, %rsi
callq 0x47bc0
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x2c(%rsp)
movl $0x0, 0x28(%rsp)
movq 0x18(%rsp), %rdi
movl 0x28(%rsp), %eax
movl %eax, 0x14(%rsp)
callq 0x481a0
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x4a00e
movq 0x18(%rsp), %rdi
movl 0x28(%rsp), %esi
callq 0x481b0
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0x49fff
movl 0x28(%rsp), %eax
movl %eax, 0x2c(%rsp)
jmp 0x4a00e
jmp 0x4a001
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x49fc3
movq 0x18(%rsp), %rdi
callq 0x481a0
addl $0x2, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x2230
movq 0x18(%rsp), %rdi
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x47e10
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x47bc0
movq 0x18(%rsp), %rdi
callq 0x47e10
movq %rax, %rdi
movq 0x20(%rsp), %rsi
movslq 0x2c(%rsp), %rax
addq %rax, %rsi
callq 0x47bc0
movq 0x20(%rsp), %rdi
callq 0x21e0
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x18(%rsp), %rax
movslq 0x14(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x4a738
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rax
movslq 0x14(%rsp), %rcx
movsbl (%rax,%rcx), %esi
callq 0x481d0
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x4a700
addq $0x28, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x38, %rsp
movl %edi, 0x34(%rsp)
movl %esi, 0x30(%rsp)
movl $0x8, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
callq 0x474d0
jmp 0x4a798
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
movl 0x34(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
cltd
idivl 0x30(%rsp)
movl %edx, 0x14(%rsp)
movq 0x28(%rsp), %rdi
movl 0x14(%rsp), %eax
addl $0x30, %eax
movsbl %al, %esi
callq 0x481d0
movl 0x18(%rsp), %eax
cltd
idivl 0x30(%rsp)
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
cltd
idivl 0x30(%rsp)
movl %edx, 0x14(%rsp)
cmpl $0x9, 0x14(%rsp)
jle 0x4a81b
leaq 0xc638(%rip), %rdi      # 0x56e2b
movb $0x0, %al
callq 0x2050
jmp 0x4a81b
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
movl $0x8, %esi
callq 0x21a0
jmp 0x4a838
jmp 0x4a81d
cmpl $0x0, 0x18(%rsp)
jne 0x4a7b7
movq 0x28(%rsp), %rdi
callq 0x4a860
movq 0x28(%rsp), %rax
addq $0x38, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x2300
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x8, %edi
callq 0x2190
movq 0x18(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq %rax, 0x20(%rsp)
callq 0x47e10
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x472e0
jmp 0x4a8a0
movq 0x20(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
callq 0x481a0
movl %eax, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
cmpl 0x38(%rsp), %eax
jge 0x4a925
movq 0x48(%rsp), %rdi
movl 0x38(%rsp), %esi
subl 0x34(%rsp), %esi
subl $0x1, %esi
callq 0x481b0
movq 0x18(%rsp), %rdi
movb (%rax), %al
movb %al, 0x17(%rsp)
movl 0x34(%rsp), %esi
callq 0x481b0
movb 0x17(%rsp), %cl
movb %cl, (%rax)
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x4a8c0
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
movl $0x8, %esi
callq 0x21a0
jmp 0x4a953
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x4a94e
movq 0x8(%rsp), %rdi
callq 0x47f70
movq 0x8(%rsp), %rdi
movl $0x8, %esi
callq 0x21a0
addq $0x58, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x2300
nopl (%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x47b60
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x47640
movl %eax, 0x4(%rsp)
movl $0x0, (%rsp)
movl (%rsp), %eax
cmpl 0x4(%rsp), %eax
jge 0x4a9c2
movq 0x10(%rsp), %rax
movl 0x4(%rsp), %ecx
subl (%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %dl
movq 0x8(%rsp), %rax
movslq (%rsp), %rcx
movb %dl, (%rax,%rcx)
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0x4a98d
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x38(%rsp), %rdi
callq 0x47640
movl %eax, 0xc(%rsp)
movq 0x30(%rsp), %rdi
callq 0x47640
movl %eax, %ecx
movl 0xc(%rsp), %eax
subl %ecx, %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
movq 0x30(%rsp), %rdi
callq 0x47640
movl %eax, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0x4ab98
movq 0x38(%rsp), %rdi
movl 0x1c(%rsp), %esi
movl 0x1c(%rsp), %edx
addl 0x20(%rsp), %edx
subl $0x1, %edx
callq 0x48450
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x4ab47
movb $0x0, 0x47(%rsp)
jmp 0x4ab9d
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x47ec0
testb $0x1, %al
jne 0x4ab5c
jmp 0x4ab6e
movl 0x1c(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, (%rax)
movb $0x1, 0x47(%rsp)
jmp 0x4ab9d
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x4ab86
movq (%rsp), %rdi
callq 0x2220
jmp 0x4ab88
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x4ab10
movb $0x0, 0x47(%rsp)
movb 0x47(%rsp), %al
andb $0x1, %al
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x481a0
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rdi
callq 0x47640
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x4ac5c
movb $0x0, 0x37(%rsp)
jmp 0x4acd8
movq 0x8(%rsp), %rdi
callq 0x481a0
subl $0x1, %eax
movl %eax, 0x1c(%rsp)
movq 0x20(%rsp), %rdi
callq 0x47640
subl $0x1, %eax
movl %eax, 0x18(%rsp)
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rax
movl 0x18(%rsp), %ecx
movsbl (%rax,%rcx), %eax
movl %eax, 0x4(%rsp)
movl 0x1c(%rsp), %esi
callq 0x481b0
movq %rax, %rcx
movl 0x4(%rsp), %eax
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x4acb2
movb $0x0, 0x37(%rsp)
jmp 0x4acd8
cmpl $0x0, 0x18(%rsp)
jne 0x4acc0
movb $0x1, 0x37(%rsp)
jmp 0x4acd8
movl 0x18(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x18(%rsp)
movl 0x1c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x4ac7e
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x481a0
movl %eax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x47640
movl %eax, %ecx
movl 0x18(%rsp), %eax
cmpl %ecx, %eax
jge 0x4ad2c
movb $0x0, 0x37(%rsp)
jmp 0x4ad8e
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x20(%rsp), %rdi
callq 0x47640
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x4ad89
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x481b0
movsbl (%rax), %eax
movq 0x20(%rsp), %rcx
movslq 0x1c(%rsp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x4ad7a
movb $0x0, 0x37(%rsp)
jmp 0x4ad8e
jmp 0x4ad7c
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x4ad34
movb $0x1, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x38, %rsp
movb %dl, %al
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
andb $0x1, %al
movb %al, 0x1f(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x28(%rsp), %rdi
callq 0x47640
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rdi
callq 0x47640
movl %eax, 0x10(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x10(%rsp), %eax
jge 0x4adee
movl 0x14(%rsp), %eax
movl %eax, 0x18(%rsp)
jmp 0x4adf6
movl 0x10(%rsp), %eax
movl %eax, 0x18(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x18(%rsp), %eax
jge 0x4ae87
testb $0x1, 0x1f(%rsp)
je 0x4ae38
movq 0x28(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movq 0x20(%rsp), %rcx
movslq 0xc(%rsp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x4ae36
movb $0x0, 0x37(%rsp)
jmp 0x4ae8c
jmp 0x4ae75
movq 0x28(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x2350
movl %eax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x2350
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
je 0x4ae73
movb $0x0, 0x37(%rsp)
jmp 0x4ae8c
jmp 0x4ae75
jmp 0x4ae77
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x4adfe
movb $0x1, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x47640
movl %eax, 0x4(%rsp)
movq 0x10(%rsp), %rdi
callq 0x47640
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x4aed7
movb $0x0, 0x27(%rsp)
jmp 0x4af45
movq 0x18(%rsp), %rdi
callq 0x47640
subl $0x1, %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rdi
callq 0x47640
subl $0x1, %eax
movl %eax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movl 0x8(%rsp), %ecx
movsbl (%rax,%rcx), %eax
movq 0x18(%rsp), %rcx
movslq 0xc(%rsp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x4af1f
movb $0x0, 0x27(%rsp)
jmp 0x4af45
cmpl $0x0, 0x8(%rsp)
jne 0x4af2d
movb $0x1, 0x27(%rsp)
jmp 0x4af45
movl 0x8(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x4aef9
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x47640
movl %eax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x47640
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x4af87
movb $0x0, 0x27(%rsp)
jmp 0x4afe6
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x10(%rsp), %rdi
callq 0x47640
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x4afe1
movq 0x18(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movq 0x10(%rsp), %rcx
movslq 0xc(%rsp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x4afd2
movb $0x0, 0x27(%rsp)
jmp 0x4afe6
jmp 0x4afd4
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x4af8f
movb $0x1, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movl $0x1, 0x14(%rsp)
movq 0x20(%rsp), %rdi
callq 0x47640
subl $0x1, %eax
movl %eax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movl 0x10(%rsp), %ecx
movsbl (%rax,%rcx), %eax
movl %eax, 0xc(%rsp)
cmpl $0x30, 0xc(%rsp)
jl 0x4b0a5
cmpl $0x39, 0xc(%rsp)
jg 0x4b0a5
movl 0x14(%rsp), %eax
movl 0xc(%rsp), %ecx
subl $0x30, %ecx
imull %ecx, %eax
addl 0x18(%rsp), %eax
movl %eax, 0x18(%rsp)
jmp 0x4b119
cmpl $0x41, 0xc(%rsp)
jl 0x4b0ce
cmpl $0x46, 0xc(%rsp)
jg 0x4b0ce
movl 0x14(%rsp), %eax
movl 0xc(%rsp), %ecx
subl $0x41, %ecx
addl $0xa, %ecx
imull %ecx, %eax
addl 0x18(%rsp), %eax
movl %eax, 0x18(%rsp)
jmp 0x4b117
cmpl $0x61, 0xc(%rsp)
jl 0x4b0f7
cmpl $0x66, 0xc(%rsp)
jg 0x4b0f7
movl 0x14(%rsp), %eax
movl 0xc(%rsp), %ecx
subl $0x61, %ecx
addl $0xa, %ecx
imull %ecx, %eax
addl 0x18(%rsp), %eax
movl %eax, 0x18(%rsp)
jmp 0x4b115
movq 0x20(%rsp), %rsi
movl 0x1c(%rsp), %edx
leaq 0xbd42(%rip), %rdi      # 0x56e49
movb $0x0, %al
callq 0x2050
xorl %edi, %edi
callq 0x21f0
jmp 0x4b117
jmp 0x4b119
cmpl $0x0, 0x10(%rsp)
jne 0x4b122
jmp 0x4b13f
movl 0x10(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rsp)
movl 0x1c(%rsp), %eax
imull 0x14(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0x4b06e
movl 0x18(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x47640
movl %eax, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
jge 0x4b249
movq 0x10(%rsp), %rax
movslq 0x8(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x5a, %eax
jg 0x4b1c3
movq 0x10(%rsp), %rax
movslq 0x8(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x41, %eax
jge 0x4b1eb
movq 0x10(%rsp), %rax
movslq 0x8(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x7a, %eax
jg 0x4b1e9
movq 0x10(%rsp), %rax
movslq 0x8(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x61, %eax
jge 0x4b1eb
jmp 0x4b237
movq 0x10(%rsp), %rax
movslq 0x8(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x7a, %eax
jg 0x4b233
movq 0x10(%rsp), %rax
movslq 0x8(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x61, %eax
jl 0x4b233
movq 0x10(%rsp), %rax
movslq 0x8(%rsp), %rcx
movsbl (%rax,%rcx), %eax
addl $-0x20, %eax
movb %al, %dl
movq 0x10(%rsp), %rax
movslq 0x8(%rsp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x4b235
jmp 0x4b235
jmp 0x4b237
jmp 0x4b239
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4b18f
addq $0x18, %rsp
retq
nop
// File: gersteinlab[P]MUSIC/src/wavfile.c
// Function: wavfile_open(char const*)
FILE * wavfile_open( const char *filename )
{
	struct wavfile_header header;

	int samples_per_second = WAVFILE_SAMPLES_PER_SECOND;
	int bits_per_sample = 16;

	strncpy(header.riff_tag,"RIFF",4);
	strncpy(header.wave_tag,"WAVE",4);
	strncpy(header.fmt_tag,"fmt ",4);
	strncpy(header.data_tag,"data",4);

	header.riff_length = 0;
	header.fmt_length = 16;
	header.audio_format = 1;
	header.num_channels = 1;
	header.sample_rate = samples_per_second;
	header.byte_rate = samples_per_second*(bits_per_sample/8);
	header.block_align = bits_per_sample/8;
	header.bits_per_sample = bits_per_sample;
	header.data_length = 0;

	FILE* file = fopen(filename,"w+");
	if(!file) return 0;

	fwrite(&header,sizeof(header),1,file);

	fflush(file);

	return file;

}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movl $0xac44, 0x18(%rsp)     # imm = 0xAC44
movl $0x10, 0x14(%rsp)
leaq 0x1c(%rsp), %rdi
leaq 0x582d(%rip), %rsi      # 0x56e82
movl $0x4, %edx
callq 0x20f0
leaq 0x1c(%rsp), %rdi
addq $0x8, %rdi
leaq 0x5818(%rip), %rsi      # 0x56e87
movl $0x4, %edx
callq 0x20f0
leaq 0x1c(%rsp), %rdi
addq $0xc, %rdi
leaq 0x5803(%rip), %rsi      # 0x56e8c
movl $0x4, %edx
callq 0x20f0
leaq 0x1c(%rsp), %rdi
addq $0x24, %rdi
leaq 0x55fc(%rip), %rsi      # 0x56c9f
movl $0x4, %edx
callq 0x20f0
movl $0x0, 0x20(%rsp)
movl $0x10, 0x2c(%rsp)
movw $0x1, 0x30(%rsp)
movw $0x1, 0x32(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x14(%rsp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x4(%rsp), %eax
imull %ecx, %eax
movl %eax, 0x38(%rsp)
movl 0x14(%rsp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movw %ax, 0x3c(%rsp)
movl 0x14(%rsp), %eax
movw %ax, 0x3e(%rsp)
movl $0x0, 0x44(%rsp)
movq 0x48(%rsp), %rdi
leaq 0x576f(%rip), %rsi      # 0x56e91
callq 0x21d0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x5173f
movq $0x0, 0x50(%rsp)
jmp 0x5176c
movq 0x8(%rsp), %rcx
leaq 0x1c(%rsp), %rdi
movl $0x2c, %esi
movl $0x1, %edx
callq 0x2360
movq 0x8(%rsp), %rdi
callq 0x21c0
movq 0x8(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x2030
movl %eax, 0xc(%rsp)
movslq 0xc(%rsp), %rax
subq $0x2c, %rax
movl %eax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movl $0x28, %esi
xorl %edx, %edx
callq 0x21b0
movq 0x10(%rsp), %rcx
leaq 0x8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x2360
movl 0xc(%rsp), %eax
subl $0x8, %eax
movl %eax, 0x4(%rsp)
movq 0x10(%rsp), %rdi
movl $0x4, %esi
xorl %edx, %edx
callq 0x21b0
movq 0x10(%rsp), %rcx
leaq 0x4(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x2360
movq 0x10(%rsp), %rdi
callq 0x2180
addq $0x18, %rsp
retq
// File: 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
subq $0x30, %rsp
movb %cl, %al
movq 0x10(%rbp), %rcx
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movb %al, -0x11(%rbp)
movl %r8d, -0x18(%rbp)
movq %r9, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x18, %rdi
leaq 0x3aee(%rip), %rsi      # 0x6004
movl $0x745, %edx            # imm = 0x745
callq 0x2120
movq -0x30(%rbp), %rax
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movb $0x1, 0x770(%rax)
movb -0x11(%rbp), %cl
movb %cl, 0x771(%rax)
movl -0x24(%rbp), %ecx
addl -0x10(%rbp), %ecx
subl $0x2, %ecx
movl %ecx, 0x774(%rax)
movl -0x28(%rbp), %eax
addl -0xc(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x778(%rax)
movl $0x0, 0x77c(%rax)
movl $0x0, 0x784(%rax)
movq -0x20(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x2d40
movq %rax, %rcx
movq -0x30(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0x788(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x790(%rax)
movl $0x0, 0x78c(%rax)
movq 0x10(%rbp), %rcx
movq %rcx, 0x798(%rax)
movl -0x18(%rbp), %ecx
movl %ecx, 0x760(%rax)
callq 0x2230
callq 0x2270
callq 0x21c0
callq 0x2070
xorl %edi, %edi
callq 0x2110
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
movl $0x1e, %edi
movl $0x3d, %esi
callq 0x2170
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0x24(%rbp), %edx
movl $0x1e, %esi
movl $0x3d, %ecx
movl %esi, %edi
callq 0x2170
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
movl $0x12c, %esi            # imm = 0x12C
movl %esi, %edi
callq 0x2170
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq (%rax), %rdi
movl $0x1, %esi
callq 0x20d0
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movl $0x1, %esi
callq 0x20a0
callq 0x2260
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)