LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: subsample_file_lines_no_buffer(char*, int)
void subsample_file_lines_no_buffer(char* fp, int n_lines_to_subsample)
{
	fprintf(stderr, "Counting the number of lines.\n");
	int n_lines = get_n_non_empty_lines(fp);
	fprintf(stderr, "%d lines in the file, subsampling %d lines.\n", n_lines, n_lines_to_subsample);

	//double p_select = (double)n_lines_to_subsample/n_lines;

	int n_sampled_lines = 0;
	//t_rng* rng = new t_rng(t_seed_manager::seed_me());

	// Open the file.
	FILE* f_sub = open_f("subsampled.txt", "w");
	FILE* f = open_f(fp, "r");

	// Loop to sample required number of lines.
	while(n_sampled_lines != n_lines_to_subsample)
	{
		fseek(f, 0, SEEK_SET);

		while(1)
		{
			char* cur_line = getline(f);
			if(cur_line == NULL)
			{
				break;
			}
			
			// Make sure that the line is not empty.
			if(!line_empty(cur_line))
			{
				fprintf(f_sub, "%s\n", cur_line);

				n_sampled_lines++;

				if(n_sampled_lines % 10000 == 0)
				{
					fprintf(stderr, "Sampled %d. line.         \r", n_sampled_lines);
				}
			}

			delete [] cur_line;
		} // file reading loop.
	} // sampling loop.

	fclose(f);
	fclose(f_sub);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movq 0x1f7ec(%rip), %rax     # 0x64fe0
movq (%rax), %rdi
leaq 0x11421(%rip), %rsi     # 0x56c1f
movb $0x0, %al
callq 0x2250
movq 0x30(%rsp), %rdi
callq 0x456c0
movl %eax, 0x28(%rsp)
movq 0x1f7c6(%rip), %rax     # 0x64fe0
movq (%rax), %rdi
movl 0x28(%rsp), %edx
movl 0x2c(%rsp), %ecx
leaq 0x11412(%rip), %rsi     # 0x56c3e
movb $0x0, %al
callq 0x2250
movl $0x0, 0x24(%rsp)
leaq 0x11429(%rip), %rdi     # 0x56c6b
leaq 0xd25b(%rip), %rsi      # 0x52aa4
callq 0x455f0
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rdi
leaq 0xf86f(%rip), %rsi      # 0x550ce
callq 0x455f0
movq %rax, 0x10(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x2c(%rsp), %eax
je 0x45922
movq 0x10(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x21b0
movq 0x10(%rsp), %rdi
callq 0x45400
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x458a0
jmp 0x4591d
movq 0x8(%rsp), %rdi
callq 0x45750
testb $0x1, %al
jne 0x45900
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rdx
leaq 0x104be(%rip), %rsi     # 0x55d7d
movb $0x0, %al
callq 0x2250
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
movl $0x2710, %ecx           # imm = 0x2710
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x458fe
movq 0x1f6f7(%rip), %rax     # 0x64fe0
movq (%rax), %rdi
movl 0x24(%rsp), %edx
leaq 0x11383(%rip), %rsi     # 0x56c7a
movb $0x0, %al
callq 0x2250
jmp 0x45900
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x45918
movq (%rsp), %rdi
callq 0x2220
jmp 0x45887
jmp 0x45869
movq 0x10(%rsp), %rdi
callq 0x2180
movq 0x18(%rsp), %rdi
callq 0x2180
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: get_next_char_per_file_buffer(t_file_buffer*, char&)
bool get_next_char_per_file_buffer(t_file_buffer* file_buffer, char& char_val)
{
	if(file_buffer->f_ptr < file_buffer->l_file)
	{
		char_val = file_buffer->file_buffer[file_buffer->f_ptr];
		file_buffer->f_ptr++;
		return(true);
	}
	else
	{
		char_val = 0;
		return(false);
	}
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq -0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x45991
movq -0x10(%rsp), %rax
movq (%rax), %rax
movq -0x10(%rsp), %rcx
movq 0x8(%rcx), %rcx
movb (%rax,%rcx), %cl
movq -0x18(%rsp), %rax
movb %cl, (%rax)
movq -0x10(%rsp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movb $0x1, -0x1(%rsp)
jmp 0x4599e
movq -0x18(%rsp), %rax
movb $0x0, (%rax)
movb $0x0, -0x1(%rsp)
movb -0x1(%rsp), %al
andb $0x1, %al
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: get_n_lines(_IO_FILE*)
int get_n_lines(FILE* file)
{
	int n_lines = 0;

	char ret = 0;
	int n_chars_in_cur_line = 0;
	while(1)
	{
		ret = getc(file);

		if(ret == EOF)
		{
			break;
		}
		else if(ret == '\n')
		{
			if(n_chars_in_cur_line)
				n_lines++;

			n_chars_in_cur_line = 0;
		}
		else
		{
			n_chars_in_cur_line = 1;
		}
	} // file reading loop.

	return(n_lines);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movb $0x0, 0xb(%rsp)
movl $0x0, 0x4(%rsp)
movq 0x10(%rsp), %rdi
callq 0x20b0
movb %al, 0xb(%rsp)
movsbl 0xb(%rsp), %eax
cmpl $-0x1, %eax
jne 0x459e8
jmp 0x45a1a
movsbl 0xb(%rsp), %eax
cmpl $0xa, %eax
jne 0x45a0e
cmpl $0x0, 0x4(%rsp)
je 0x45a04
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
movl $0x0, 0x4(%rsp)
jmp 0x45a16
movl $0x1, 0x4(%rsp)
jmp 0x45a18
jmp 0x459ce
movl 0xc(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: get_next_token_per_file_till_newline(_IO_FILE*, char*, int, char*, bool&, bool&)
bool get_next_token_per_file_till_newline(FILE* file, char* buffer, int l_buffer, char* delim_char, bool& new_line_check, bool& eof_check)
{
	int i_buff = 0;
	char ret = 0;
	new_line_check = false;
	eof_check = false;
	while(1)
	{
		ret = getc(file);

		if(ret == EOF)
		{
			eof_check = true;
			return(false);
		}

		// If we found a new line, break. The file pointer points to the new line's beginning.
		if(ret == '\n')
		{
			new_line_check = true;
			break;
		}

		// The current character is not a new line, is it the delimiter?
		if(ret == delim_char[0])
		{
			break;
		}
		else if(i_buff < l_buffer)
		{
			// Copy the read character to the buffer, if the buffer did not overflow, otherwise does not copy but keeps reading the file till the next token is found.
			buffer[i_buff] = ret;
			i_buff++;
		}
	} // file reading loop.

	if(i_buff < l_buffer)
	{
		buffer[i_buff] = 0;
	}
	else
	{
		buffer[l_buffer-1] = 0;
	}
	
	if(i_buff == 0)
	{
		return(false);
	}
	else
	{
		return(true);
	}
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movl %edx, 0x2c(%rsp)
movq %rcx, 0x20(%rsp)
movq %r8, 0x18(%rsp)
movq %r9, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movb $0x0, 0xb(%rsp)
movq 0x18(%rsp), %rax
movb $0x0, (%rax)
movq 0x10(%rsp), %rax
movb $0x0, (%rax)
movq 0x38(%rsp), %rdi
callq 0x20b0
movb %al, 0xb(%rsp)
movsbl 0xb(%rsp), %eax
cmpl $-0x1, %eax
jne 0x45a98
movq 0x10(%rsp), %rax
movb $0x1, (%rax)
movb $0x0, 0x47(%rsp)
jmp 0x45b29
movsbl 0xb(%rsp), %eax
cmpl $0xa, %eax
jne 0x45aac
movq 0x18(%rsp), %rax
movb $0x1, (%rax)
jmp 0x45ae9
movsbl 0xb(%rsp), %eax
movq 0x20(%rsp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x45abf
jmp 0x45ae9
movl 0xc(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jge 0x45ae5
movb 0xb(%rsp), %dl
movq 0x30(%rsp), %rax
movslq 0xc(%rsp), %rcx
movb %dl, (%rax,%rcx)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x45ae7
jmp 0x45a6e
movl 0xc(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jge 0x45b03
movq 0x30(%rsp), %rax
movslq 0xc(%rsp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x45b16
movq 0x30(%rsp), %rax
movl 0x2c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
cmpl $0x0, 0xc(%rsp)
jne 0x45b24
movb $0x0, 0x47(%rsp)
jmp 0x45b29
movb $0x1, 0x47(%rsp)
movb 0x47(%rsp), %al
andb $0x1, %al
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: resolve_data_dir()
char* resolve_data_dir()
{
	// try to resolve the DATAPATH_ENV_VAR.
	char* data_dir_from_env = getenv(DATAPATH_ENV_VAR);

	if(data_dir_from_env != NULL)
	{
		char* data_dir = t_string::copy_me_str(data_dir_from_env);
		return(data_dir);
	}
	else
	{
		char* data_dir = t_string::copy_me_str(LOCAL_DATA_PATH);
		return(data_dir);
	}

	printf("Could not resolve thermodynamics data directory.\n");
	exit(0);
}

// Assembly:
subq $0x28, %rsp
leaq 0x1114b(%rip), %rdi     # 0x56c96
callq 0x2200
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x45b78
movq 0x18(%rsp), %rdi
callq 0x47b60
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x45b93
leaq 0x11120(%rip), %rdi     # 0x56c9f
callq 0x47b60
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)
// File: gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: x_fgets(char*, int, _IO_FILE*)
char* x_fgets(char* buff, int size, FILE* file)
{
	if(fgets(buff, size, file) == NULL)
	{
		return(NULL);
	}

	if(buff[t_string::string_length(buff) - 1] == '\n')
	{
		int i_new_line_char = (int)t_string::string_length(buff) - 1;
		buff[i_new_line_char] = 0;
	}

	return(buff);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
movq 0x18(%rsp), %rdx
callq 0x22a0
cmpq $0x0, %rax
jne 0x45bd6
movq $0x0, 0x30(%rsp)
jmp 0x45c29
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
callq 0x47640
movl %eax, %ecx
movq 0x8(%rsp), %rax
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x45c1f
movq 0x28(%rsp), %rdi
callq 0x47640
subl $0x1, %eax
movl %eax, 0x14(%rsp)
movq 0x28(%rsp), %rax
movslq 0x14(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x28(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_cli.cpp
// Function: t_ansi_cli::is_option(char const*)
bool t_ansi_cli::is_option(const char* arg)
{
	t_string* test_str = new t_string(arg);
	if(test_str->starts_with(this->option_prefix))
	{
		delete(test_str);
		return(true);
	}
	else
	{
		delete(test_str);
		return(false);
	}
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x8, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rsi
callq 0x472e0
jmp 0x46ef9
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq (%rax), %rsi
callq 0x4acf0
testb $0x1, %al
jne 0x46f1b
jmp 0x46f6a
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x46f44
movq 0x10(%rsp), %rdi
callq 0x47f70
movq 0x10(%rsp), %rdi
movl $0x8, %esi
callq 0x21a0
movb $0x1, 0x57(%rsp)
jmp 0x46f98
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
movl $0x8, %esi
callq 0x21a0
jmp 0x46fa3
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x46f93
movq 0x8(%rsp), %rdi
callq 0x47f70
movq 0x8(%rsp), %rdi
movl $0x8, %esi
callq 0x21a0
movb $0x0, 0x57(%rsp)
movb 0x57(%rsp), %al
andb $0x1, %al
addq $0x58, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x2300
nopl (%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_cli.cpp
// Function: t_ansi_cli::~t_ansi_cli()
t_ansi_cli::~t_ansi_cli()
{
	for(int i_opt = 0; i_opt < (int)this->options->size(); i_opt++)
	{
		free(this->options->at(i_opt));
	}
	delete(this->options);

	for(int i_val = 0; i_val < (int)this->values->size(); i_val++)
	{
		free(this->values->at(i_val));
	}
	delete(this->values);

	for(int i_ip = 0; i_ip < (int)this->inputs->size(); i_ip++)
	{
		free(this->inputs->at(i_ip));
	}
	delete(this->inputs);

	if(this->option_prefix != NULL)
	{
		free(this->option_prefix);
	}

	if(this->exe_cmd != NULL)
	{
		free(this->exe_cmd);
	}
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x48(%rsp)
movl $0x0, 0x5c(%rsp)
movq 0x48(%rsp), %rax
movl 0x5c(%rsp), %ecx
movl %ecx, 0x44(%rsp)
movq 0x10(%rax), %rdi
callq 0xc220
movq %rax, %rcx
movl 0x44(%rsp), %eax
cmpl %ecx, %eax
jge 0x47020
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rdi
movslq 0x5c(%rsp), %rsi
callq 0xc240
movq %rax, 0x38(%rsp)
jmp 0x47006
movq 0x38(%rsp), %rax
movq (%rax), %rdi
callq 0x21e0
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x46fcb
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, %rax
je 0x4704d
movq 0x30(%rsp), %rdi
callq 0xc570
movq 0x30(%rsp), %rdi
movl $0x18, %esi
callq 0x21a0
movl $0x0, 0x58(%rsp)
movq 0x48(%rsp), %rax
movl 0x58(%rsp), %ecx
movl %ecx, 0x2c(%rsp)
movq 0x18(%rax), %rdi
callq 0xc220
movq %rax, %rcx
movl 0x2c(%rsp), %eax
cmpl %ecx, %eax
jge 0x470aa
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rdi
movslq 0x58(%rsp), %rsi
callq 0xc240
movq %rax, 0x20(%rsp)
jmp 0x47090
movq 0x20(%rsp), %rax
movq (%rax), %rdi
callq 0x21e0
movl 0x58(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x58(%rsp)
jmp 0x47055
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x470d7
movq 0x18(%rsp), %rdi
callq 0xc570
movq 0x18(%rsp), %rdi
movl $0x18, %esi
callq 0x21a0
movl $0x0, 0x54(%rsp)
movq 0x48(%rsp), %rax
movl 0x54(%rsp), %ecx
movl %ecx, 0x14(%rsp)
movq 0x20(%rax), %rdi
callq 0xc220
movq %rax, %rcx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x47134
movq 0x48(%rsp), %rax
movq 0x20(%rax), %rdi
movslq 0x54(%rsp), %rsi
callq 0xc240
movq %rax, 0x8(%rsp)
jmp 0x4711a
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x21e0
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x470df
movq 0x48(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x4715e
movq (%rsp), %rdi
callq 0xc570
movq (%rsp), %rdi
movl $0x18, %esi
callq 0x21a0
movq 0x48(%rsp), %rax
cmpq $0x0, (%rax)
je 0x47176
movq 0x48(%rsp), %rax
movq (%rax), %rdi
callq 0x21e0
movq 0x48(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x47190
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x21e0
addq $0x68, %rsp
retq
movq %rax, %rdi
callq 0xd3a0
nopl (%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_cli.cpp
// Function: t_ansi_cli::get_value_by_option(char const*, bool&)
char* t_ansi_cli::get_value_by_option(const char* option2search, bool& success)
{
	success = false;
	for(int i_opt = 0; i_opt < (int)this->options->size(); i_opt++)
	{
		if(t_string::compare_strings(this->options->at(i_opt), option2search))
		{
			success = true;
			return(this->values->at(i_opt)); // Can be NULL!
		}
	}

	success = false;
	return(NULL);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movb $0x0, (%rax)
movl $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rax
movl 0x14(%rsp), %ecx
movl %ecx, 0x4(%rsp)
movq 0x10(%rax), %rdi
callq 0xc220
movq %rax, %rcx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x47248
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movslq 0x14(%rsp), %rsi
callq 0xc240
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x47ac0
testb $0x1, %al
jne 0x47214
jmp 0x47239
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movb $0x1, (%rcx)
movq 0x18(%rax), %rdi
movslq 0x14(%rsp), %rsi
callq 0xc240
movq (%rax), %rax
movq %rax, 0x30(%rsp)
jmp 0x47259
jmp 0x4723b
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x471cd
movq 0x18(%rsp), %rax
movb $0x0, (%rax)
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_cli.cpp
// Function: t_ansi_cli::is_flag_set(char const*)
bool t_ansi_cli::is_flag_set(const char* flag)
{
	bool success = false;

	char* ret = NULL;
	ret = this->get_value_by_option(flag, success);

	// If this option exists with no values, it is a flag.
	if(success && ret == NULL)
	{
		return(true);
	}
	else
	{
		return(false);
	}
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movb $0x0, 0xf(%rsp)
movq $0x0, (%rsp)
movq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rdx
callq 0x471a0
movq %rax, (%rsp)
testb $0x1, 0xf(%rsp)
je 0x472b8
cmpq $0x0, (%rsp)
jne 0x472b8
movb $0x1, 0x27(%rsp)
jmp 0x472bd
movb $0x0, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::t_string(char const*)
t_string::t_string(const char* string)
{
	// Allocate the memory.
	//this->obj_string = (char*)malloc(string_length(string) + 3);
	//this->obj_str_mem_size = string_length(string) + 1;

	this->string_buffer = new t_string_buffer();
	this->string_buffer->i_buff = 0;
	this->string_buffer->l_buffer_mem = IBS;
	this->string_buffer->string_buff = new char[IBS+3];

	this->copy(string);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x10, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x8(%rsp)
xorl %esi, %esi
movl $0x10, %edx
callq 0x2110
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq (%rax), %rcx
movl $0x0, 0xc(%rcx)
movq (%rax), %rax
movl $0x1f4, 0x8(%rax)       # imm = 0x1F4
movl $0x1f7, %edi            # imm = 0x1F7
callq 0x2040
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movq (%rdi), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rsi
callq 0x47360
addq $0x28, %rsp
retq
nop
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::t_string()
t_string::t_string()
{
	//this->obj_string = (char*)malloc(IBS + 3);
	//this->obj_str_mem_size = IBS;
	this->string_buffer = new t_string_buffer();
	this->string_buffer->i_buff = 0;
	this->string_buffer->l_buffer_mem = IBS;
	this->string_buffer->string_buff = new char[IBS+3];

	// Initialize the string.
	this->empty();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x10, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, (%rsp)
xorl %esi, %esi
movl $0x10, %edx
callq 0x2110
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq (%rax), %rcx
movl $0x0, 0xc(%rcx)
movq (%rax), %rax
movl $0x1f4, 0x8(%rax)       # imm = 0x1F4
movl $0x1f7, %edi            # imm = 0x1F7
callq 0x2040
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movq (%rdi), %rax
movq %rcx, (%rax)
callq 0x47550
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::sort_strings(char*, char*)
bool t_string::sort_strings(char* str1, char* str2)
{
	int l1 = t_string::string_length(str1);
	int l2 = t_string::string_length(str2);
	if(l1 < l2)
	{
		return(true);
	}
	else if(l1 > l2)
	{
		return(false);
	}
	else
	{
		for(int i = 0; i < l1; i++)
		{
			if(str1[i] < str2[i])
			{
				return(true);
			}
			else if(str1[i] > str2[i])
			{
				return(false);
			}
		} // i loop.

		// Strings are exactly the same, return false to obey strict weak ordering.
		return(false);
	}
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x47640
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rdi
callq 0x47640
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x8(%rsp), %eax
jge 0x475ae
movb $0x1, 0x27(%rsp)
jmp 0x47635
movl 0xc(%rsp), %eax
cmpl 0x8(%rsp), %eax
jle 0x475bf
movb $0x0, 0x27(%rsp)
jmp 0x47635
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl 0xc(%rsp), %eax
jge 0x47630
movq 0x18(%rsp), %rax
movslq 0x4(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movq 0x10(%rsp), %rcx
movslq 0x4(%rsp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jge 0x475f8
movb $0x1, 0x27(%rsp)
jmp 0x47635
movq 0x18(%rsp), %rax
movslq 0x4(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movq 0x10(%rsp), %rcx
movslq 0x4(%rsp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jle 0x4761f
movb $0x0, 0x27(%rsp)
jmp 0x47635
jmp 0x47621
jmp 0x47623
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x475c7
movb $0x0, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::string_length(char const*)
int t_string::string_length(const char* string)
{
	unsigned int str_length = 0;
	while(string[str_length] != 0)
	{
		str_length++;
	}

	return(str_length);
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl $0x0, -0xc(%rsp)
movq -0x8(%rsp), %rax
movl -0xc(%rsp), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x4766c
movl -0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rsp)
jmp 0x4764d
movl -0xc(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::get_string_sorting_idx(std::vector<char*, std::allocator<char*>>*)
vector<int>* t_string::get_string_sorting_idx(vector<char*>* string_list)
{
	vector<t_str_node*>* str_nodes = new vector<t_str_node*>();
	for(int i_s = 0; i_s < (int)string_list->size(); i_s++)
	{
		t_str_node* new_node = new t_str_node();
		new_node->i = i_s;
		new_node->str = string_list->at(i_s);
		str_nodes->push_back(new_node);
	} // i_s loop.

	// Sort the nodes.
	sort(str_nodes->begin(), str_nodes->end(), t_string::sort_str_nodes);	

	// Fill the sorting idx.
	vector<int>* string_sort_idx = new vector<int>();
	for(int i_s = 0; i_s < (int)str_nodes->size(); i_s++)
	{
		string_sort_idx->push_back(str_nodes->at(i_s)->i);
		delete(str_nodes->at(i_s));
	} // i_s loop.

	delete(str_nodes);

	return(string_sort_idx);
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movl $0x18, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x40(%rsp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq 0x40(%rsp), %rdi
callq 0x4b250
movq 0x40(%rsp), %rax
movq %rax, 0x78(%rsp)
movl $0x0, 0x74(%rsp)
movl 0x74(%rsp), %eax
movl %eax, 0x3c(%rsp)
movq 0x80(%rsp), %rdi
callq 0xc220
movq %rax, %rcx
movl 0x3c(%rsp), %eax
cmpl %ecx, %eax
jge 0x47759
movl $0x10, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x30(%rsp)
xorl %esi, %esi
movl $0x10, %edx
callq 0x2110
movq 0x30(%rsp), %rax
movq %rax, 0x68(%rsp)
movl 0x74(%rsp), %ecx
movq 0x68(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x80(%rsp), %rdi
movslq 0x74(%rsp), %rsi
callq 0xc240
movq (%rax), %rcx
movq 0x68(%rsp), %rax
movq %rcx, (%rax)
movq 0x78(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x4b260
movl 0x74(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x74(%rsp)
jmp 0x476c9
movq 0x78(%rsp), %rdi
callq 0x4b320
movq %rax, 0x60(%rsp)
movq 0x78(%rsp), %rdi
callq 0x4b350
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
leaq 0x108(%rip), %rdx       # 0x47890
callq 0x4b2d0
movl $0x18, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x28(%rsp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq 0x28(%rsp), %rdi
callq 0xc290
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
movl $0x0, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0x78(%rsp), %rdi
callq 0x4b380
movq %rax, %rcx
movl 0x24(%rsp), %eax
cmpl %ecx, %eax
jge 0x4784c
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x78(%rsp), %rdi
movslq 0x4c(%rsp), %rsi
callq 0x4b3a0
movq 0x10(%rsp), %rdi
movq (%rax), %rsi
addq $0x8, %rsi
callq 0xc340
movq 0x78(%rsp), %rdi
movslq 0x4c(%rsp), %rsi
callq 0x4b3a0
movq (%rax), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x4783a
movq 0x18(%rsp), %rdi
movl $0x10, %esi
callq 0x21a0
jmp 0x4783c
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x477c7
movq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x47875
movq 0x8(%rsp), %rdi
callq 0x4b3e0
movq 0x8(%rsp), %rdi
movl $0x18, %esi
callq 0x21a0
movq 0x50(%rsp), %rax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::compare_strings(char const*, char const*)
bool t_string::compare_strings(const char* str1, const char* str2)
{
	int str_len1 = string_length(str1);
	int str_len2 = string_length(str2);
	if(str_len1 != str_len2)
	{
		return(false);
	}

	for(int i = 0; i < str_len1; i++)
	{
		if(str1[i] != str2[i])
		{
			return(false);
		}
	}

	return(true);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x47640
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rdi
callq 0x47640
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x8(%rsp), %eax
je 0x47afb
movb $0x0, 0x27(%rsp)
jmp 0x47b48
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl 0xc(%rsp), %eax
jge 0x47b43
movq 0x18(%rsp), %rax
movslq 0x4(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movq 0x10(%rsp), %rcx
movslq 0x4(%rsp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x47b34
movb $0x0, 0x27(%rsp)
jmp 0x47b48
jmp 0x47b36
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x47b03
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::copy_me_str(char const*)
char* t_string::copy_me_str(const char* str)
{
	if(str == NULL)
	{
		return(NULL);
	}

	char* new_str = new char[t_string::string_length(str) + 2];
	t_string::copy(new_str, str);
	return(new_str);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x47b7c
movq $0x0, 0x10(%rsp)
jmp 0x47bac
movq 0x8(%rsp), %rdi
callq 0x47640
addl $0x2, %eax
movslq %eax, %rdi
callq 0x2040
movq %rax, (%rsp)
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x47bc0
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::copy(char*, char const*)
void t_string::copy(char* dest_string, const char* src_string)
{
	unsigned int l_src_string = string_length(src_string);
	
	// Do the actual the copying, this loop copies the null character!
	for(unsigned int i = 0; i <= l_src_string; i++)
	{
		dest_string[i] = src_string[i];
	}
	dest_string[l_src_string] = 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x47640
movl %eax, 0x4(%rsp)
movl $0x0, (%rsp)
movl (%rsp), %eax
cmpl 0x4(%rsp), %eax
ja 0x47c0d
movq 0x8(%rsp), %rax
movl (%rsp), %ecx
movb (%rax,%rcx), %dl
movq 0x10(%rsp), %rax
movl (%rsp), %ecx
movb %dl, (%rax,%rcx)
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0x47be3
movq 0x10(%rsp), %rax
movl 0x4(%rsp), %ecx
movb $0x0, (%rax,%rcx)
addq $0x18, %rsp
retq
nop
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::get_add_i_str(std::vector<char*, std::allocator<char*>>*, char*)
int t_string::get_add_i_str(vector<char*>* strs, char* str)
{
	int i_chr = t_string::get_i_str(strs, str);

	// Add to the list.
	if(i_chr == (int)strs->size())
	{
		char* new_chr_id = t_string::copy_me_str(str);
		strs->push_back(new_chr_id);

		i_chr = t_string::get_i_str(strs, str);

		if(i_chr == (int)strs->size())
		{
			fprintf(stderr, "Failed to insert %s to the list.\n", str);
			return((int)strs->size());
		}
	}

	return(i_chr);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x47cf0
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rdi
callq 0xc220
movq %rax, %rcx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jne 0x47cdb
movq 0x20(%rsp), %rdi
callq 0x47b60
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1fbe0
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x47cf0
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
callq 0xc220
movq %rax, %rcx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jne 0x47cd9
movq 0x1d32d(%rip), %rax     # 0x64fe0
movq (%rax), %rdi
movq 0x20(%rsp), %rdx
leaq 0xf0e8(%rip), %rsi      # 0x56daa
movb $0x0, %al
callq 0x2250
movq 0x28(%rsp), %rdi
callq 0xc220
movl %eax, 0x34(%rsp)
jmp 0x47ce3
jmp 0x47cdb
movl 0x1c(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::get_i_str(std::vector<char*, std::allocator<char*>>*, char*)
int t_string::get_i_str(vector<char*>* strs, char* str)
{
	for(int i_chr = 0; i_chr < (int)strs->size(); i_chr++)
	{
		if(t_string::compare_strings(strs->at(i_chr), str))
		{
			return(i_chr);
		}
	} // i_chr loop.

	//printf("Could not find chromosome id %s @ %s(%d), adding it to the list.\n", chrom_id, __FILE__, __LINE__);
	return((int)strs->size());
	////exit(0);
	//getc(stdin);

	//char* new_id = new char[strlen(chrom_id) + 2];
	//strcpy(new_id, chrom_id);
	//chr_ids->push_back(new_id);

	//return(t_string::get_i_str(chr_ids, chrom_id));
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0xc220
movq %rax, %rcx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x47d5e
movq 0x18(%rsp), %rdi
movslq 0xc(%rsp), %rsi
callq 0xc240
movq (%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x47ac0
testb $0x1, %al
jne 0x47d45
jmp 0x47d4f
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x47d6c
jmp 0x47d51
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x47d06
movq 0x18(%rsp), %rdi
callq 0xc220
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::get_i_str(std::vector<t_string*, std::allocator<t_string*>>*, char*)
int t_string::get_i_str(vector<t_string*>* strs, char* str)
{
	for(int i_chr = 0; i_chr < (int)strs->size(); i_chr++)
	{
		if(t_string::compare_strings(strs->at(i_chr)->str(), str))
		{
			return(i_chr);
		}
	} // i_chr loop.

	//printf("Could not find chromosome id %s @ %s(%d), adding it to the list.\n", chrom_id, __FILE__, __LINE__);
	return((int)strs->size());
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0x45c40
movq %rax, %rcx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x47df6
movq 0x18(%rsp), %rdi
movslq 0xc(%rsp), %rsi
callq 0x45ca0
movq (%rax), %rdi
callq 0x47e10
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x47ac0
testb $0x1, %al
jne 0x47ddd
jmp 0x47de7
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x47e04
jmp 0x47de9
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x47d96
movq 0x18(%rsp), %rdi
callq 0x45c40
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::get_i_str_ci(std::vector<char*, std::allocator<char*>>*, char*)
int t_string::get_i_str_ci(vector<char*>* strs, char* str)
{
	for(int i_chr = 0; i_chr < (int)strs->size(); i_chr++)
	{
		if(t_string::compare_strings_ci(strs->at(i_chr), str))
		{
			return(i_chr);
		}
	} // i_chr loop.

	//printf("Could not find chromosome id %s @ %s(%d), adding it to the list.\n", chrom_id, __FILE__, __LINE__);
	return((int)strs->size());
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0xc220
movq %rax, %rcx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x47e9e
movq 0x18(%rsp), %rdi
movslq 0xc(%rsp), %rsi
callq 0xc240
movq (%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x47ec0
testb $0x1, %al
jne 0x47e85
jmp 0x47e8f
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x47eac
jmp 0x47e91
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x47e46
movq 0x18(%rsp), %rdi
callq 0xc220
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::compare_strings_ci(char const*, char const*)
bool t_string::compare_strings_ci(const char* str1, const char* str2)
{
        int str_len1 = string_length(str1);
        int str_len2 = string_length(str2);

        if(str_len1 != str_len2)
        {
                return(false);
        }

        for(int i = 0; i < str_len1; i++)
        {
                if(toupper(str1[i]) != toupper(str2[i]))
                {
                        return(false);
                }
        }

        return(true);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x47640
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rdi
callq 0x47640
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x8(%rsp), %eax
je 0x47efb
movb $0x0, 0x27(%rsp)
jmp 0x47f5a
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl 0xc(%rsp), %eax
jge 0x47f55
movq 0x18(%rsp), %rax
movslq 0x4(%rsp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x2350
movl %eax, (%rsp)
movq 0x10(%rsp), %rax
movslq 0x4(%rsp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x2350
movl %eax, %ecx
movl (%rsp), %eax
cmpl %ecx, %eax
je 0x47f46
movb $0x0, 0x27(%rsp)
jmp 0x47f5a
jmp 0x47f48
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x47f03
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::~t_string()
t_string::~t_string()
{
	//printf("Freeing a string object.\n");
	//free(this->obj_string);
	delete [] this->string_buffer->string_buff;
	delete this->string_buffer;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq (%rax), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x47f9e
movq 0x18(%rsp), %rdi
callq 0x2220
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x47fc0
movq 0x8(%rsp), %rdi
movl $0x10, %esi
callq 0x21a0
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::get_integers_in_string()
vector<int>* t_string::get_integers_in_string()
{
	vector<int>* int_vector = new vector<int>();

	// The number string.
	t_string* cur_int_str = new t_string();

	int l_str = this->length();
	for(int char_i = 0; char_i < l_str; char_i++)
	{
		if(this->x(char_i) >= '0' && this->x(char_i) <= '9')
		{
			// Add this character.
			cur_int_str->concat_char(this->x(char_i));
		}
		else
		{
			if(cur_int_str->length() > 0)
			{
				int new_num = str2num(cur_int_str, 10);

				// Add the new number
				int_vector->push_back(new_num); 

				cur_int_str->empty();
			}
		}
	} // char index.

	// Process the last string if it is a number.
	if(cur_int_str->length() > 0)
	{
		int new_num = str2num(cur_int_str, 10);

		// Add the new number
		int_vector->push_back(new_num); 

		cur_int_str->empty();
	}

	// Free integer storing string.
	delete(cur_int_str);

	return(int_vector);
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x18, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
callq 0xc290
movq 0x20(%rsp), %rax
movq %rax, 0x58(%rsp)
movl $0x8, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x28(%rsp)
callq 0x474d0
jmp 0x4802e
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
callq 0x481a0
movl %eax, 0x40(%rsp)
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
cmpl 0x40(%rsp), %eax
jge 0x48120
movq 0x18(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0x481b0
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x480d1
movq 0x18(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0x481b0
movsbl (%rax), %eax
cmpl $0x39, %eax
jg 0x480d1
movq 0x18(%rsp), %rdi
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x3c(%rsp), %esi
callq 0x481b0
movq 0x10(%rsp), %rdi
movsbl (%rax), %esi
callq 0x481d0
jmp 0x4810e
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
movl $0x8, %esi
callq 0x21a0
jmp 0x4818e
movq 0x50(%rsp), %rdi
callq 0x481a0
cmpl $0x0, %eax
jle 0x4810c
movq 0x50(%rsp), %rdi
movl $0xa, %esi
callq 0x482f0
movl %eax, 0x38(%rsp)
movq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0xc340
movq 0x50(%rsp), %rdi
callq 0x47550
jmp 0x4810e
jmp 0x48110
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x4804e
movq 0x50(%rsp), %rdi
callq 0x481a0
cmpl $0x0, %eax
jle 0x4815b
movq 0x50(%rsp), %rdi
movl $0xa, %esi
callq 0x482f0
movl %eax, 0x34(%rsp)
movq 0x58(%rsp), %rdi
leaq 0x34(%rsp), %rsi
callq 0xc340
movq 0x50(%rsp), %rdi
callq 0x47550
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x48184
movq 0x8(%rsp), %rdi
callq 0x47f70
movq 0x8(%rsp), %rdi
movl $0x8, %esi
callq 0x21a0
movq 0x58(%rsp), %rax
addq $0x68, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0x2300
nopl (%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::concat_char(char)
void t_string::concat_char(char _char)
{
	//fprintf(stderr, "Concatting %c\n", _char);

	// A memory check.
	int str_len = this->length();
	while(this->string_buffer->l_buffer_mem <= (str_len + 10))
	{		
		char* temp_buf = this->string_buffer->string_buff;
		
		this->string_buffer->l_buffer_mem *= 2;
		this->string_buffer->i_buff = 0;
		this->string_buffer->string_buff = new char[this->string_buffer->l_buffer_mem];		

		// Following uses concat char, again, but at this point, it is for sure that the string has enough memory.
		for(int i = 0; i < str_len; i++)
		{
			this->concat_char(temp_buf[i]);
		}

		delete [] temp_buf;
	}

	int unconcat_length = str_len;
	this->string_buffer->string_buff[unconcat_length] = _char;
	this->string_buffer->i_buff = unconcat_length+1;

	// This is vert important. Finish the string!
	this->string_buffer->string_buff[unconcat_length + 1] = 0;
}

// Assembly:
subq $0x38, %rsp
movb %sil, %al
movq %rdi, 0x30(%rsp)
movb %al, 0x2f(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x481a0
movl %eax, 0x28(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movl 0x28(%rsp), %ecx
addl $0xa, %ecx
cmpl %ecx, %eax
jg 0x482a2
movq 0x10(%rsp), %rax
movq (%rax), %rcx
movq (%rcx), %rcx
movq %rcx, 0x20(%rsp)
movq (%rax), %rcx
movl 0x8(%rcx), %edx
shll %edx
movl %edx, 0x8(%rcx)
movq (%rax), %rcx
movl $0x0, 0xc(%rcx)
movq (%rax), %rax
movslq 0x8(%rax), %rdi
callq 0x2040
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x28(%rsp), %eax
jge 0x48283
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
movsbl (%rax,%rcx), %esi
callq 0x481d0
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x48254
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x4829d
movq 0x8(%rsp), %rdi
callq 0x2220
jmp 0x481f3
movq 0x10(%rsp), %rax
movl 0x28(%rsp), %ecx
movl %ecx, 0x18(%rsp)
movb 0x2f(%rsp), %sil
movq (%rax), %rcx
movq (%rcx), %rcx
movslq 0x18(%rsp), %rdx
movb %sil, (%rcx,%rdx)
movl 0x18(%rsp), %edx
addl $0x1, %edx
movq (%rax), %rcx
movl %edx, 0xc(%rcx)
movq (%rax), %rax
movq (%rax), %rax
movl 0x18(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
addq $0x38, %rsp
retq
nopl (%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::get_alphanumeric(char*)
char* t_string::get_alphanumeric(char* string)
{
	int l_str = t_string::string_length(string);
	char* alphanum_string = new char[l_str + 2];
	//memset(alphanum_string, 0, l_str);
	t_string::set_byte_buffer(alphanum_string, l_str, 0);
	int i_an = 0;
	for(int i = 0; i < l_str; i++)
	{
		// Update if this is an alphanumeric character.
		if((string[i] >= 'a' && string[i] <= 'z') ||
			(string[i] >= 'A' && string[i] <= 'Z') ||
			(string[i] >= '0' && string[i] <= '9'))
		{
			alphanum_string[i_an] = string[i];
			i_an++;
		}
	} // i loop.

	return(alphanum_string);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x47640
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
addl $0x2, %eax
movslq %eax, %rdi
callq 0x2040
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movslq 0x1c(%rsp), %rsi
xorl %edx, %edx
callq 0x473c0
movl $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0x1c(%rsp), %eax
jge 0x48423
movq 0x20(%rsp), %rax
movslq 0x8(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x61, %eax
jl 0x483a0
movq 0x20(%rsp), %rax
movslq 0x8(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x7a, %eax
jle 0x483ec
movq 0x20(%rsp), %rax
movslq 0x8(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x41, %eax
jl 0x483c6
movq 0x20(%rsp), %rax
movslq 0x8(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x5a, %eax
jle 0x483ec
movq 0x20(%rsp), %rax
movslq 0x8(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jl 0x48411
movq 0x20(%rsp), %rax
movslq 0x8(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x39, %eax
jg 0x48411
movq 0x20(%rsp), %rax
movslq 0x8(%rsp), %rcx
movb (%rax,%rcx), %dl
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movb %dl, (%rax,%rcx)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x48413
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4836c
movq 0x10(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::substring(char const*, int, int)
char* t_string::substring(const char* str, int i, int j)
{
	//t_string* sub_str = new t_string();
	char* sub_str = NULL;

	int l_str = t_string::string_length(str);

	// Validity checks on the arguments.
	if(i > j ||
		i > l_str)
	{
		return(NULL);
	}
	else if(j >= l_str)
	{
		j = l_str-1;
	}

	sub_str = new char[j-i+1+2];
	sub_str[0] = 0; // Make this an empty string.

	// Copy the substring.
	int ip = i;
	int i_sub_str = 0;
	while(ip <= j)
	{
		sub_str[i_sub_str] = str[ip];

		i_sub_str++;
		ip++;
	}

	// End the string.
	sub_str[i_sub_str] = 0;

	return(sub_str);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl %edx, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x28(%rsp), %rdi
callq 0x47640
movl %eax, 0x14(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x20(%rsp), %eax
jg 0x4848c
movl 0x24(%rsp), %eax
cmpl 0x14(%rsp), %eax
jle 0x4849a
movq $0x0, 0x30(%rsp)
jmp 0x48538
movl 0x20(%rsp), %eax
cmpl 0x14(%rsp), %eax
jl 0x484af
movl 0x14(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x484b1
movl 0x20(%rsp), %eax
subl 0x24(%rsp), %eax
addl $0x1, %eax
addl $0x2, %eax
movslq %eax, %rdi
callq 0x2040
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movb $0x0, (%rax)
movl 0x24(%rsp), %eax
movl %eax, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x20(%rsp), %eax
jg 0x48520
movq 0x28(%rsp), %rax
movslq 0x10(%rsp), %rcx
movb (%rax,%rcx), %dl
movq 0x18(%rsp), %rax
movslq 0xc(%rsp), %rcx
movb %dl, (%rax,%rcx)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x484e4
movq 0x18(%rsp), %rax
movslq 0xc(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::substring(int, int)
char* t_string::substring(int i, int j)
{
	//t_string* sub_str = new t_string();
	char* sub_str;

	// Validity checks on the arguments.
	if(i > j ||
		i > this->length() || 
		j > this->length())
	{
		return(NULL);
	}
	else
	{
		sub_str = (char*)malloc(sizeof(char) * (j-i+1+2));
		sub_str[0] = 0; // Make this an empty string.
	}

	// Copy the substring.
	int ip = i;
	int i_sub_str = 0;
	while(ip <= j)
	{
		sub_str[i_sub_str] = this->x(ip);

		i_sub_str++;
		ip++;
	}

	// End the string.
	sub_str[i_sub_str] = 0;

	return(sub_str);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl %edx, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x20(%rsp), %eax
jg 0x485ab
movq 0x8(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x481a0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jg 0x485ab
movq 0x8(%rsp), %rdi
movl 0x20(%rsp), %eax
movl %eax, (%rsp)
callq 0x481a0
movl %eax, %ecx
movl (%rsp), %eax
cmpl %ecx, %eax
jle 0x485b9
movq $0x0, 0x30(%rsp)
jmp 0x48647
movl 0x20(%rsp), %eax
subl 0x24(%rsp), %eax
addl $0x1, %eax
addl $0x2, %eax
movslq %eax, %rdi
shlq $0x0, %rdi
callq 0x2230
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movb $0x0, (%rax)
movl 0x24(%rsp), %eax
movl %eax, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x20(%rsp), %eax
jg 0x4862f
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x481b0
movb (%rax), %dl
movq 0x18(%rsp), %rax
movslq 0x10(%rsp), %rcx
movb %dl, (%rax,%rcx)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x485f0
movq 0x18(%rsp), %rax
movslq 0x10(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::is_empty(char*)
bool t_string::is_empty(char* string)
{
	int l_str = t_string::string_length(string);

	for(int i = 0; i < l_str; i++)
	{
		// 
		if(string[i] != ' ' && 
			string[i] != '\t' &&
			string[i] != '\n')
		{
			return(false);
		}
	}

	return(true);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x47640
movl %eax, 0x4(%rsp)
movl $0x0, (%rsp)
movl (%rsp), %eax
cmpl 0x4(%rsp), %eax
jge 0x486e1
movq 0x8(%rsp), %rax
movslq (%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x20, %eax
je 0x486d4
movq 0x8(%rsp), %rax
movslq (%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x9, %eax
je 0x486d4
movq 0x8(%rsp), %rax
movslq (%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
je 0x486d4
movb $0x0, 0x17(%rsp)
jmp 0x486e6
jmp 0x486d6
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0x4868e
movb $0x1, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_ansi_string.cpp
// Function: t_string::is_number(char*)
bool t_string::is_number(char* string)
{
	int l_str = t_string::string_length(string);

	bool found_whole_part = false;
	bool found_decimal_part = false;

	for(int i = 0; i < l_str; i++)
	{
		if(string[i] == '.')
		{
			// The decimal place was already found, return false.
			if(found_decimal_part)
			{
				return(false);
			}

			// Found the decimal place.
			found_decimal_part = true;
		}
		else if(string[i] == ',')
		{
		}
		else if(string[i] >= '0' && string[i] <= '9')
		{
			// Found the whole place.
			if(!found_whole_part)
			{
				found_whole_part = true;
			}
		}
		else
		{
			// Any other character is not acceptable as a number.
			return(false);
		}
	} // i loop.

	return(true);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x47640
movl %eax, 0x14(%rsp)
movb $0x0, 0x13(%rsp)
movb $0x0, 0x12(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x14(%rsp), %eax
jge 0x487c5
movq 0x18(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2e, %eax
jne 0x4875f
testb $0x1, 0x12(%rsp)
je 0x48758
movb $0x0, 0x27(%rsp)
jmp 0x487ca
movb $0x1, 0x12(%rsp)
jmp 0x487b3
movq 0x18(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2c, %eax
jne 0x48774
jmp 0x487b1
movq 0x18(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jl 0x487a8
movq 0x18(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x39, %eax
jg 0x487a8
testb $0x1, 0x13(%rsp)
jne 0x487a6
movb $0x1, 0x13(%rsp)
jmp 0x487af
movb $0x0, 0x27(%rsp)
jmp 0x487ca
jmp 0x487b1
jmp 0x487b3
jmp 0x487b5
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x48729
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::replace_avoid_list(char*, char, char, char)
void t_string::replace_avoid_list(char* str, char start_char, char end_char, char char_to_replace)
{
	t_string* avoided_char_list_str = new t_string();
	for(char cur_char = start_char; cur_char <= end_char; cur_char++)
	{
		avoided_char_list_str->concat_char(cur_char);
	} // cur_char loop.

	t_string::replace_avoid_list(str, avoided_char_list_str->str(), char_to_replace);
}

// Assembly:
subq $0x38, %rsp
movb %cl, %al
movb %dl, %cl
movb %sil, %dl
movq %rdi, 0x30(%rsp)
movb %dl, 0x2f(%rsp)
movb %cl, 0x2e(%rsp)
movb %al, 0x2d(%rsp)
movl $0x8, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
callq 0x474d0
jmp 0x48818
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movb 0x2f(%rsp), %al
movb %al, 0x13(%rsp)
movsbl 0x13(%rsp), %eax
movsbl 0x2e(%rsp), %ecx
cmpl %ecx, %eax
jg 0x48872
movq 0x20(%rsp), %rdi
movsbl 0x13(%rsp), %esi
callq 0x481d0
movb 0x13(%rsp), %al
addb $0x1, %al
movb %al, 0x13(%rsp)
jmp 0x4882a
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
movl $0x8, %esi
callq 0x21a0
jmp 0x4889b
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rdi
callq 0x47e10
movq (%rsp), %rdi
movq %rax, %rsi
movsbl 0x2d(%rsp), %edx
callq 0x488b0
addq $0x38, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x2300
nopw %cs:(%rax,%rax)