LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_annot_region_tools.cpp
// Function: get_left_flanking_regions(std::vector<t_annot_region*, std::allocator<t_annot_region*>>*, int)
vector<t_annot_region*>* get_left_flanking_regions(vector<t_annot_region*>* regions, int l_flank)
{
	vector<t_annot_region*>* left_flanking_regions = new vector<t_annot_region*>();

	for(int i_reg = 0; i_reg < (int)regions->size(); i_reg++)
	{
		t_annot_region* new_region = new t_annot_region();
		new_region->chrom = new char[strlen(regions->at(i_reg)->chrom) + 2];
		strcpy(new_region->chrom, regions->at(i_reg)->chrom);
		new_region->start = (regions->at(i_reg)->start > l_flank)?(regions->at(i_reg)->start - l_flank):1;
		new_region->end = regions->at(i_reg)->start;
		new_region->strand = regions->at(i_reg)->strand;

		left_flanking_regions->push_back(new_region);
	} // i_reg loop.

	return(left_flanking_regions);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
pushq $0x18
popq %rdi
callq 0x2170
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
xorl %r12d, %r12d
movq %rsp, %rbp
movq 0x8(%r14), %rax
subq (%r14), %rax
shrq $0x3, %rax
cltq
cmpq %rax, %r12
jge 0x16a9b
pushq $0x50
popq %rdi
callq 0x2170
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x40(%rax)
movq %rax, (%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x7404
movq (%rax), %rax
movq (%rax), %rdi
callq 0x20d0
leaq 0x2(%rax), %rdi
callq 0x2040
movq (%rsp), %rcx
movq %rax, (%rcx)
movq (%rsp), %rax
movq (%rax), %r13
movq %r14, %rdi
movq %r12, %rsi
callq 0x7404
movq (%rax), %rax
movq (%rax), %rsi
movq %r13, %rdi
callq 0x2140
movq %r14, %rdi
movq %r12, %rsi
callq 0x7404
movq (%rax), %rcx
pushq $0x1
popq %rax
cmpl %ebx, 0xc(%rcx)
jle 0x16a51
movq %r14, %rdi
movq %r12, %rsi
callq 0x7404
movq (%rax), %rax
movl 0xc(%rax), %eax
subl %ebx, %eax
movq (%rsp), %rcx
movl %eax, 0xc(%rcx)
movq %r14, %rdi
movq %r12, %rsi
callq 0x7404
movq (%rax), %rax
movl 0xc(%rax), %eax
movq (%rsp), %rcx
movl %eax, 0x20(%rcx)
movq %r14, %rdi
movq %r12, %rsi
callq 0x7404
movq (%rax), %rax
movb 0x8(%rax), %al
movq (%rsp), %rcx
movb %al, 0x8(%rcx)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x7448
incq %r12
jmp 0x169aa
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_annot_region_tools.cpp
// Function: load_chromosome_lengths_per_tabbed_file(char*, std::vector<char*, std::allocator<char*>>*, std::vector<int, std::allocator<int>>*)
void load_chromosome_lengths_per_tabbed_file(char* chr_lengths_fp, vector<char*>* chr_ids, vector<int>* chr_lengths)
{
	FILE* f_l_chrs = open_f(chr_lengths_fp, "r");

	while(1)
	{
		char* cur_line = getline(f_l_chrs);
		if(cur_line == NULL)
		{
			break;
		}

		char cur_chr_id[1000];
		int cur_l_chr = 0;
		if(sscanf(cur_line, "%s %d", cur_chr_id, &cur_l_chr) != 2)
		{
			fprintf(stderr, "Could not read chromosome lengths from: %s\n", cur_line);
			exit(0);
		} // check if reading is succesful.

		chr_ids->push_back(t_string::copy_me_str(cur_chr_id));
		chr_lengths->push_back(cur_l_chr);
	} // file reading loop.

	fclose(f_l_chrs);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3f8, %rsp            # imm = 0x3F8
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x1023d(%rip), %rsi     # 0x26d08
callq 0x2027c
movq %rax, %r15
leaq 0x10(%rsp), %r13
leaq 0x4(%rsp), %rbp
movq %r15, %rdi
callq 0x2017f
testq %rax, %rax
je 0x16b35
movq %rax, %r12
andl $0x0, 0x4(%rsp)
movq %rax, %rdi
leaq 0x11319(%rip), %rsi     # 0x27e15
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x2150
cmpl $0x2, %eax
jne 0x16b4f
movq %r13, %rdi
callq 0x21062
movq %rax, 0x8(%rsp)
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
callq 0x7d0a
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x73a8
jmp 0x16add
movq %r15, %rdi
callq 0x2160
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1e48a(%rip), %rax     # 0x34fe0
movq (%rax), %rdi
leaq 0x112bb(%rip), %rsi     # 0x27e1b
movq %r12, %rdx
xorl %eax, %eax
callq 0x2240
xorl %edi, %edi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_annot_region_tools.cpp
// Function: get_right_flanking_regions(std::vector<t_annot_region*, std::allocator<t_annot_region*>>*, int)
vector<t_annot_region*>* get_right_flanking_regions(vector<t_annot_region*>* regions, int l_flank)
{
	vector<t_annot_region*>* right_flanking_regions = new vector<t_annot_region*>();

	for(int i_reg = 0; i_reg < (int)regions->size(); i_reg++)
	{
		t_annot_region* new_region = new t_annot_region();
		new_region->chrom = new char[strlen(regions->at(i_reg)->chrom) + 2];
		strcpy(new_region->chrom, regions->at(i_reg)->chrom);
		new_region->start = regions->at(i_reg)->end;
		new_region->end = regions->at(i_reg)->end + l_flank;
		new_region->strand = regions->at(i_reg)->strand;

		right_flanking_regions->push_back(new_region);
	} // i_reg loop.

	return(right_flanking_regions);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
pushq $0x18
popq %rdi
callq 0x2170
movq %rax, %r15
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rax)
movups %xmm0, (%rax)
xorl %r12d, %r12d
movq %rsp, %rbp
movq 0x8(%r14), %rax
subq (%r14), %rax
shrq $0x3, %rax
cltq
cmpq %rax, %r12
jge 0x16c78
pushq $0x50
popq %rdi
callq 0x2170
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x40(%rax)
movq %rax, (%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x7404
movq (%rax), %rax
movq (%rax), %rdi
callq 0x20d0
leaq 0x2(%rax), %rdi
callq 0x2040
movq (%rsp), %rcx
movq %rax, (%rcx)
movq (%rsp), %rax
movq (%rax), %r13
movq %r14, %rdi
movq %r12, %rsi
callq 0x7404
movq (%rax), %rax
movq (%rax), %rsi
movq %r13, %rdi
callq 0x2140
movq %r14, %rdi
movq %r12, %rsi
callq 0x7404
movq (%rax), %rax
movl 0x20(%rax), %eax
movq (%rsp), %rcx
movl %eax, 0xc(%rcx)
movq %r14, %rdi
movq %r12, %rsi
callq 0x7404
movq (%rax), %rax
movl 0x20(%rax), %eax
addl %ebx, %eax
movq (%rsp), %rcx
movl %eax, 0x20(%rcx)
movq %r14, %rdi
movq %r12, %rsi
callq 0x7404
movq (%rax), %rax
movb 0x8(%rax), %al
movq (%rsp), %rcx
movb %al, 0x8(%rcx)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x7448
incq %r12
jmp 0x16b9d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_annot_region_tools.cpp
// Function: delete_annot_regions(t_annot_region*)
void delete_annot_regions(t_annot_region* region)
{
	if(region != NULL)
	{
		delete [] region->chrom;

		if(region->name != NULL)
		{
			delete [] region->name;
		}

		delete(region);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x173a5
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x1738b
callq 0x2210
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x17399
callq 0x2210
pushq $0x50
popq %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x2180
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_annot_region_tools.cpp
// Function: merge_annot_regions(std::vector<t_annot_region*, std::allocator<t_annot_region*>>*, std::vector<t_annot_region*, std::allocator<t_annot_region*>>*, int, bool)
vector<t_annot_region*>* merge_annot_regions(vector<t_annot_region*>* annot_regions1,
											vector<t_annot_region*>* annot_regions2,
											int max_gap, 
											bool match_strands) // Maximum distance between two annotated regions that are in the merged region.
{
	fprintf(stderr, "Merging %ld versus %ld regions.\n", annot_regions1->size(), annot_regions2->size());

	vector<t_annot_region*>* total_annot_regions = new vector<t_annot_region*>();
	for(int i = 0; i < (int)annot_regions1->size(); i++)
	{
		total_annot_regions->push_back(annot_regions1->at(i));
	} // i loop.

	for(int i = 0; i < (int)annot_regions2->size(); i++)
	{
		total_annot_regions->push_back(annot_regions2->at(i));
	} // i loop.

	vector<t_annot_region*>* merged_annot_regions = merge_annot_regions(total_annot_regions,
																			max_gap, 
																			match_strands);

	delete(total_annot_regions);

	return(merged_annot_regions);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r12
movq 0x1dc1e(%rip), %rax     # 0x34fe0
movq (%rax), %rdi
movq 0x8(%r12), %rdx
subq (%r12), %rdx
sarq $0x3, %rdx
movq 0x8(%rsi), %rcx
subq (%rsi), %rcx
sarq $0x3, %rcx
leaq 0x10a63(%rip), %rsi     # 0x27e47
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x2240
pushq $0x18
popq %rdi
callq 0x2170
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movq 0x8(%r12), %rax
subq (%r12), %rax
shrq $0x3, %rax
cltq
cmpq %rax, %r13
jge 0x17433
movq %r12, %rdi
movq %r13, %rsi
callq 0x7404
movq %r15, %rdi
movq %rax, %rsi
callq 0x7448
incq %r13
jmp 0x17404
xorl %r12d, %r12d
movq 0x8(%r14), %rax
subq (%r14), %rax
shrq $0x3, %rax
cltq
cmpq %rax, %r12
jge 0x17463
movq %r14, %rdi
movq %r12, %rsi
callq 0x7404
movq %r15, %rdi
movq %rax, %rsi
callq 0x7448
incq %r12
jmp 0x17436
movzbl %bpl, %edx
movq %r15, %rdi
movl %ebx, %esi
callq 0x16489
movq %rax, %rbx
movq %r15, %rdi
callq 0x832c
pushq $0x18
popq %rsi
movq %r15, %rdi
callq 0x2180
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_annot_region_tools.cpp
// Function: merge_annot_regions(std::vector<std::vector<t_annot_region*, std::allocator<t_annot_region*>>*, std::allocator<std::vector<t_annot_region*, std::allocator<t_annot_region*>>*>>*, int, bool)
vector<t_annot_region*>* merge_annot_regions(vector<vector<t_annot_region*>*>* annot_regions_list,
												int max_gap, 
												bool match_strands)
{
	vector<t_annot_region*>* total_annot_regions = new vector<t_annot_region*>();
	for(int i_reg_list = 0; i_reg_list < (int)annot_regions_list->size(); i_reg_list++)
	{
		vector<t_annot_region*>* cur_annot_regions = annot_regions_list->at(i_reg_list);
		for(int i = 0; i < (int)cur_annot_regions->size(); i++)
		{
			total_annot_regions->push_back(cur_annot_regions->at(i));
		} // i loop.
	} // i_reg_list loop.

	vector<t_annot_region*>* merged_annot_regions = merge_annot_regions(total_annot_regions,
																			max_gap, 
																			match_strands);

	delete(total_annot_regions);

	return(merged_annot_regions);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, 0x4(%rsp)
movq %rdi, %r15
pushq $0x18
popq %rdi
callq 0x2170
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
xorl %r12d, %r12d
movq 0x8(%r15), %rax
subq (%r15), %rax
shrq $0x3, %rax
cltq
cmpq %rax, %r12
jge 0x1751c
movq %r15, %rdi
movq %r12, %rsi
callq 0xcf88
movq (%rax), %r13
xorl %ebp, %ebp
movq 0x8(%r13), %rax
subq (%r13), %rax
shrq $0x3, %rax
cltq
cmpq %rax, %rbp
jge 0x17517
movq %r13, %rdi
movq %rbp, %rsi
callq 0x7404
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7448
incq %rbp
jmp 0x174e9
incq %r12
jmp 0x174c7
movzbl %r14b, %edx
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x16489
movq %rax, %r14
movq %rbx, %rdi
callq 0x832c
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0x2180
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_annot_region_tools.cpp
// Function: delete_annot_regions_with_line_information(std::vector<t_annot_region*, std::allocator<t_annot_region*>>*)
void delete_annot_regions_with_line_information(vector<t_annot_region*>* region_list)
{
	for(int i_reg = 0; i_reg < (int)region_list->size(); i_reg++)
	{
		if(region_list->at(i_reg) != NULL)
		{
			delete [] region_list->at(i_reg)->chrom;
			char* cur_line_info = (char*)region_list->at(i_reg)->data;
			if(cur_line_info != NULL)
			{
				delete [] cur_line_info;
			}
			delete(region_list->at(i_reg));
		}
	} // i_reg loop.

	region_list->clear();
	delete(region_list);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
pushq $0x50
popq %r15
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
shrq $0x3, %rdx
movslq %edx, %rdx
cmpq %rdx, %r14
jge 0x177cd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7404
cmpq $0x0, (%rax)
je 0x177c8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7404
movq (%rax), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x17796
callq 0x2210
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7404
movq (%rax), %rax
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x177b2
callq 0x2210
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7404
movq (%rax), %rdi
movq %r15, %rsi
callq 0x2180
incq %r14
jmp 0x17751
cmpq %rax, %rcx
je 0x177d6
movq %rax, 0x8(%rbx)
movq %rbx, %rdi
callq 0x832c
pushq $0x18
popq %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2180
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_annot_region_tools.cpp
// Function: locate_posn_per_sorted_posn_list(int, std::vector<int, std::allocator<int>>*, int, int)
int locate_posn_per_sorted_posn_list(int posn, vector<int>* sorted_posn_list, int i, int j)
{
	int i_mid = (i + j) / 2;

	if(i_mid == i ||
		i_mid == j)
	{
		return(i);
	}

	if(sorted_posn_list->at(i_mid) == posn)
	{
		// Move back while the entry is larger than or equal to the requestd position.
		while(i_mid > 0 &&
			sorted_posn_list->at(i_mid) >= posn)
		{
			i_mid--;
		}

		//// If the above loop hit the end, move back once.
		//if(i_mid == sorted_posn_list->size())
		//{
		//	i_mid--;
		//}

		//// If the above loop moved beyond the query move back once, which is the exact element just before query.
		//if(i_mid > 0 &&
		//	sorted_posn_list->at(i_mid) > posn)
		//{
		//	i_mid--;

		return(i_mid);
	}
	else if(sorted_posn_list->at(i_mid) > posn)
	{
		return(locate_posn_per_sorted_posn_list(posn, sorted_posn_list, i, i_mid));
	}
	else if(sorted_posn_list->at(i_mid) < posn)
	{
		return(locate_posn_per_sorted_posn_list(posn, sorted_posn_list, i_mid, j));
	}
	else
	{
		fprintf(stderr, "Current indices are (%d, %d), searching for %d @ %s(%d)\n", sorted_posn_list->at(i), sorted_posn_list->at(j),
			posn, __FILE__, __LINE__);
		exit(0);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r12d
movl %edx, %r13d
movq %rsi, %r14
movl %edi, %ebx
movl %r13d, %r15d
movl %r12d, %r13d
movl %r13d, %r12d
leal (%r12,%r15), %eax
cltd
pushq $0x2
popq %rcx
idivl %ecx
cmpl %r15d, %eax
je 0x178e3
movl %eax, %ebp
cmpl %r12d, %eax
je 0x178e3
movslq %ebp, %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x7364
cmpl %ebx, (%rax)
je 0x178b2
movq %r14, %rdi
movq %r13, %rsi
callq 0x7364
cmpl %ebx, (%rax)
jg 0x17812
movq %r14, %rdi
movq %r13, %rsi
callq 0x7364
cmpl %ebx, (%rax)
jl 0x1780c
movq 0x1d776(%rip), %rax     # 0x34fe0
movq (%rax), %r13
movslq %r15d, %rsi
movq %r14, %rdi
callq 0x7364
movl (%rax), %ebp
movslq %r12d, %rsi
movq %r14, %rdi
callq 0x7364
movl (%rax), %ecx
movl $0xbfb, (%rsp)          # imm = 0xBFB
leaq 0x105d3(%rip), %rsi     # 0x27e68
leaq 0x10147(%rip), %r9      # 0x279e3
movq %r13, %rdi
movl %ebp, %edx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x2240
xorl %edi, %edi
callq 0x21d0
movl %ebp, %r12d
movl %ebp, %r13d
sarl $0x1f, %r13d
andl %ebp, %r13d
incl %ebp
movl %ebp, %r15d
testl %r12d, %r12d
jle 0x178e0
movq %r14, %rdi
movq %r12, %rsi
callq 0x7364
decq %r12
decl %r15d
cmpl %ebx, (%rax)
jge 0x178c4
jmp 0x178e3
movl %r13d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_annot_region_tools.cpp
// Function: locate_posn_per_sorted_obj_list(int, std::vector<void*, std::allocator<void*>>*, int, int, int (*)(void*))
int locate_posn_per_sorted_obj_list(int posn, vector<void*>* obj_list, int i, int j, int (*prop_accession)(void*))
{
	int i_mid = (i + j) / 2;

	if(i_mid == i ||
		i_mid == j)
	{
		return(i);
	}

	if(prop_accession(obj_list->at(i_mid)) == posn)
	{
		// Move back while the entry is larger than or equal to the requestd position.
		while(i_mid > 0 &&
			prop_accession(obj_list->at(i_mid)) >= posn)
		{
			i_mid--;
		}

		return(i_mid);
	}
	else if(prop_accession(obj_list->at(i_mid)) > posn)
	{
		return(locate_posn_per_sorted_obj_list(posn, obj_list, i, i_mid, prop_accession));
	}
	else if(prop_accession(obj_list->at(i_mid)) < posn)
	{
		return(locate_posn_per_sorted_obj_list(posn, obj_list, i_mid, j, prop_accession));
	}
	else
	{
		fprintf(stderr, "Current indices are (%d, %d), searching for %d @ %s(%d)\n", prop_accession(obj_list->at(i)), prop_accession(obj_list->at(j)),
			posn, __FILE__, __LINE__);
		exit(0);
	}	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x20(%rsp)
movl %ecx, %r13d
movl %edx, %ebp
movq %rsi, 0x18(%rsp)
movl %edi, %r12d
movq 0x20(%rsp), %r15
movq %rbp, 0x10(%rsp)
movl %r13d, %ebp
movl %ebp, %r13d
movq 0x10(%rsp), %rcx
leal (%rcx,%r13), %eax
cltd
pushq $0x2
popq %rsi
idivl %esi
cmpl %ecx, %eax
je 0x17b65
movl %eax, %ebx
cmpl %r13d, %eax
je 0x17b65
movl %r12d, %r14d
movslq %ebx, %rbp
movq 0x18(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x17bae
movq (%rax), %rdi
callq *%r15
cmpl %r14d, %eax
je 0x17b6c
movq %r12, %rdi
movq %rbp, %rsi
callq 0x17bae
movq (%rax), %rdi
callq *%r15
cmpl %r14d, %eax
movl %r14d, %r12d
jg 0x17a7e
movq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x17bae
movq (%rax), %rdi
callq *0x20(%rsp)
cmpl %r12d, %eax
jl 0x17a76
movq 0x1d4db(%rip), %rax     # 0x34fe0
movq (%rax), %rbp
movslq 0x10(%rsp), %rsi
movq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x17bae
movq (%rax), %rdi
movq 0x20(%rsp), %r14
callq *%r14
movl %eax, %ebx
movslq %r13d, %rsi
movq %r15, %rdi
callq 0x17bae
movq (%rax), %rdi
callq *%r14
movl $0xc4d, (%rsp)          # imm = 0xC4D
leaq 0x10322(%rip), %rsi     # 0x27e68
leaq 0xfe96(%rip), %r9       # 0x279e3
movq %rbp, %rdi
movl %ebx, %edx
movl %eax, %ecx
movl %r12d, %r8d
xorl %eax, %eax
callq 0x2240
xorl %edi, %edi
callq 0x21d0
movq 0x10(%rsp), %rbx
jmp 0x17b9c
movl %ebx, %r13d
movl %ebx, %ebp
sarl $0x1f, %ebp
andl %ebx, %ebp
incl %ebx
testl %r13d, %r13d
jle 0x17b9a
movq %r12, %rdi
movq %r13, %rsi
callq 0x17bae
movq (%rax), %rdi
callq *%r15
decq %r13
decl %ebx
cmpl %r14d, %eax
jge 0x17b78
jmp 0x17b9c
movl %ebp, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_signal_track_tools.cpp
// Function: dump_per_nucleotide_uchar_binary_profile(unsigned char*, int, char*)
void dump_per_nucleotide_uchar_binary_profile(unsigned char* signal_profile, int l_profile, char* op_fp)
{
	// Dump the per nucleotide signal profile.
	FILE* f_op = open_f(op_fp, "wb");

	// Write data length to first couple bytes.
	fwrite(&(l_profile), sizeof(int), 1, f_op);

	// Dump the data: Dump 0 based data.
	fwrite(&(signal_profile[1]), sizeof(unsigned char), l_profile+1, f_op);

	fclose(f_op);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4(%rsp), %r14
movl %esi, (%r14)
leaq 0xdfc0(%rip), %rsi      # 0x2659a
movq %rdx, %rdi
callq 0x2027c
movq %rax, %r15
pushq $0x4
popq %rsi
pushq $0x1
popq %r12
movq %r14, %rdi
movq %r12, %rdx
movq %rax, %rcx
callq 0x2330
incq %rbx
movslq (%r14), %rdx
incq %rdx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x2330
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2160
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_signal_track_tools.cpp
// Function: load_per_nucleotide_binary_uchar_profile(char*, int&)
unsigned char* load_per_nucleotide_binary_uchar_profile(char* binary_per_nucleotide_profile_fp, int& l_profile)
{
	FILE* f_prof = open_f(binary_per_nucleotide_profile_fp, "rb");

	// Read the profile length.
	int l_data = 0;
	fread(&l_data, sizeof(int), 1, f_prof);
	l_profile = l_data;

	// Read the data.
	unsigned char* signal_profile_buffer = new unsigned char[l_profile+2];

if(__DUMP_SIGNAL_TRACK_MSGS__)
	fprintf(stderr, "Loading %d data values.\n", l_profile);

	// Following is to use the codebase indexing: 1 based indexing.
	fread(&(signal_profile_buffer[1]), sizeof(char), l_profile+1, f_prof);
	
	fclose(f_prof);

	return(signal_profile_buffer);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
leaq 0xf8fa(%rip), %rsi      # 0x27f30
callq 0x2027c
movq %rax, %rbx
leaq 0x4(%rsp), %r15
andl $0x0, (%r15)
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %rax, %rcx
callq 0x2250
movslq (%r15), %r12
movl %r12d, (%r14)
movq %r12, %rdi
addq $0x2, %rdi
callq 0x2040
movq %rax, %r15
cmpb $0x1, 0x1cb53(%rip)     # 0x351c7
je 0x186a4
movq %r15, %rdi
incq %rdi
incl %r12d
movslq %r12d, %rdx
pushq $0x1
popq %rsi
movq %rbx, %rcx
callq 0x2250
movq %rbx, %rdi
callq 0x2160
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x1c935(%rip), %rax     # 0x34fe0
movq (%rax), %rdi
leaq 0xf87e(%rip), %rsi      # 0x27f33
movl %r12d, %edx
xorl %eax, %eax
callq 0x2240
movl (%r14), %r12d
jmp 0x18676
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_signal_track_tools.cpp
// Function: get_profile_extrema(double*, int, double&, double&)
void get_profile_extrema(double* profile, int l_profile, double& prof_min, double& prof_max)
{
	prof_min = 1000*1000;
	prof_max = -1000*1000;
	for(int i = 1; i <= l_profile; i++)
	{
		if(profile[i] > prof_max)
		{
			prof_max = profile[i];
		}

		if(profile[i] < prof_min)
		{
			prof_min = profile[i];
		}
	} // i loop.
}

// Assembly:
movabsq $0x412e848000000000, %rax # imm = 0x412E848000000000
movq %rax, (%rdx)
movabsq $-0x3ed17b8000000000, %rax # imm = 0xC12E848000000000
movq %rax, (%rcx)
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
cmpq %rax, %rsi
je 0x18713
movsd 0x8(%rdi,%rax,8), %xmm0
ucomisd (%rcx), %xmm0
jbe 0x18700
movsd %xmm0, (%rcx)
movsd 0x8(%rdi,%rax,8), %xmm0
movsd (%rdx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x1870e
movsd %xmm0, (%rdx)
incq %rax
jmp 0x186e5
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_signal_track_tools.cpp
// Function: get_zero_indexed_per_one_indexed_data(double*, int)
double* get_zero_indexed_per_one_indexed_data(double* one_indexed_data, int l_profile)
{
	double* zero_indexed_data = new double[l_profile];
	for(int i = 1; i <= l_profile; i++)
	{
		zero_indexed_data[i-1] = one_indexed_data[i];
	} // i loop.

	return(zero_indexed_data);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %eax
shlq $0x3, %rax
xorl %r15d, %r15d
testl %esi, %esi
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
cmovlel %r15d, %ebx
callq 0x2040
cmpq %r15, %rbx
je 0x18750
movsd 0x8(%r14,%r15,8), %xmm0
movsd %xmm0, (%rax,%r15,8)
incq %r15
jmp 0x18739
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_signal_track_tools.cpp
// Function: get_one_indexed_per_zero_indexed_data(double*, int)
double* get_one_indexed_per_zero_indexed_data(double* zero_indexed_data, int l_profile)
{
	double* one_indexed_data = new double[l_profile+2];
	for(int i = 0; i < l_profile; i++)
	{
		one_indexed_data[i+1] = zero_indexed_data[i];
	} // i loop.

	return(one_indexed_data);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leal 0x2(%rbx), %eax
shlq $0x3, %rax
cmpl $-0x2, %esi
pushq $-0x1
popq %rdi
cmovgeq %rax, %rdi
callq 0x2040
xorl %ecx, %ecx
testl %ebx, %ebx
cmovlel %ecx, %ebx
cmpq %rcx, %rbx
je 0x18792
movsd (%r14,%rcx,8), %xmm0
movsd %xmm0, 0x8(%rax,%rcx,8)
incq %rcx
jmp 0x1877c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_signal_track_tools.cpp
// Function: joint_prune_multiple_profiles_per_thresholds(double**, int, int, double*, int&)
double** joint_prune_multiple_profiles_per_thresholds(double** profiles, int n_profiles, int l_profile, double* threshold_per_profile, int& l_pruned_profile)
{
	// Go over all the profiles, find the regions.	
	double** pruned_profiles = new double*[n_profiles];
	for(int i_p = 0; i_p < n_profiles; i_p++)
	{
		pruned_profiles[i_p] = new double[l_profile+2];
	} // i_p loop.

	// Prune the columns.
	l_pruned_profile = 1;
	for(int i_sig = 1; i_sig <= l_profile; i_sig++)
	{
		bool include_cur_val = false;
		for(int i_p = 0; i_p < n_profiles; i_p++)
		{
			if(threshold_per_profile[i_p] <= -1000)
			{
				//fprintf(stderr, "Not using %d. profile for joint pruning.\n");
			}
			else if(profiles[i_p][i_sig] > threshold_per_profile[i_p])
			{
				include_cur_val = true;
			}
		} // i_p loop.

		if(include_cur_val)
		{
			// Add this columns to all the pruned profiles.
			for(int i_p = 0; i_p < n_profiles; i_p++)
			{
				// Copy the value.
				pruned_profiles[i_p][l_pruned_profile] = profiles[i_p][i_sig];
			} // i_p loop.	

			l_pruned_profile++;
		}
	} // i_sig loop.

	// Pruned profiles are indexed 1 based.
	l_pruned_profile--;

	return(pruned_profiles);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
movq %rcx, %r14
movl %edx, %ebx
movl %esi, %r12d
movq %rdi, %r13
movl %esi, %edi
shlq $0x3, %rdi
xorl %r15d, %r15d
testl %esi, %esi
pushq $-0x1
popq %rax
cmovsq %rax, %rdi
cmovlel %r15d, %r12d
callq 0x2040
movq %rax, %rbp
movq %rbx, %rax
addl $0x2, %ebx
shlq $0x3, %rbx
movq %rax, 0x8(%rsp)
cmpl $-0x2, %eax
pushq $-0x1
popq %rax
cmovlq %rax, %rbx
cmpq %r15, %r12
je 0x1893c
movq %rbx, %rdi
callq 0x2040
movq %rax, (%rbp,%r15,8)
incq %r15
jmp 0x18925
movq 0x10(%rsp), %r8
movl $0x1, (%r8)
xorl %eax, %eax
movq 0x8(%rsp), %r9
testl %r9d, %r9d
cmovlel %eax, %r9d
incl %r9d
pushq $0x1
popq %rcx
pushq $0x1
popq %rax
movsd 0xf5c1(%rip), %xmm0     # 0x27f28
cmpq %r9, %rcx
je 0x189cc
xorl %edx, %edx
xorl %esi, %esi
cmpq %rdx, %r12
je 0x18999
movsd (%r14,%rdx,8), %xmm1
ucomisd %xmm1, %xmm0
jae 0x18994
movq (%r13,%rdx,8), %rdi
movsd (%rdi,%rcx,8), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x18994
movb $0x1, %sil
incq %rdx
jmp 0x18970
testb $0x1, %sil
je 0x189c7
movslq %eax, %rdx
xorl %esi, %esi
cmpq %rsi, %r12
je 0x189c2
movq (%r13,%rsi,8), %rdi
movsd (%rdi,%rcx,8), %xmm1
movq (%rbp,%rsi,8), %rdi
movsd %xmm1, (%rdi,%rdx,8)
incq %rsi
jmp 0x189a4
incl %eax
movl %eax, (%r8)
incq %rcx
jmp 0x18967
decl %eax
movl %eax, (%r8)
movq %rbp, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_signal_track_tools.cpp
// Function: copy_profile(double*, int)
double* copy_profile(double* signal_profile, int l_profile)
{
	double* copy_prof = new double[l_profile+2];

	for(int i_sig = 1; i_sig <= l_profile; i_sig++)
	{
		copy_prof[i_sig] = signal_profile[i_sig];
	} // i_sig loop.

	return(copy_prof);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leal 0x2(%rbx), %eax
shlq $0x3, %rax
cmpl $-0x2, %esi
pushq $-0x1
popq %rdi
cmovgeq %rax, %rdi
callq 0x2040
xorl %ecx, %ecx
testl %ebx, %ebx
cmovlel %ecx, %ebx
cmpq %rcx, %rbx
je 0x18a20
movsd 0x8(%r14,%rcx,8), %xmm0
movsd %xmm0, 0x8(%rax,%rcx,8)
incq %rcx
jmp 0x18a09
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_signal_track_tools.cpp
// Function: extract_one_indexed_profile_per_profile(double*, int, int, int, int&)
double* extract_one_indexed_profile_per_profile(double* signal_profile_buffer, int l_profile, int start, int end, int& l_extracted_profile)
{
	double* extracted_prof = new double[end - start + 3];	
	for(int i_sig = start; i_sig <= end; i_sig++)
	{
		extracted_prof[i_sig - start] = 0;
	} // i_sig loop.
	
	// Count the extracted profile.
	l_extracted_profile = 1;
	for(int i_sig = start; i_sig <= MIN(l_profile, end); i_sig++)
	{
		extracted_prof[l_extracted_profile] = signal_profile_buffer[i_sig];
		l_extracted_profile++;
	} // i_sig loop.

	// Profiles are one based.
	l_extracted_profile--;

	return(extracted_prof);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movl %ecx, %ebp
movl %edx, %r12d
movl %esi, %r15d
movq %rdi, %r14
movl %ecx, %eax
subl %edx, %eax
leal 0x3(%rax), %ecx
shlq $0x3, %rcx
cmpl $-0x3, %eax
pushq $-0x1
popq %rdi
cmovgeq %rcx, %rdi
callq 0x2040
movslq %r12d, %rcx
movslq %ebp, %rdx
xorl %esi, %esi
leaq (%rcx,%rsi), %rdi
cmpq %rdx, %rdi
jg 0x18a73
andq $0x0, (%rax,%rsi,8)
incq %rsi
jmp 0x18a60
cmpl %ebp, %r15d
cmovll %r15d, %ebp
movslq %ebp, %rsi
leaq (%r14,%rcx,8), %rdi
xorl %edx, %edx
leaq (%rcx,%rdx), %r8
cmpq %rsi, %r8
jg 0x18aa3
movsd (%rdi,%rdx,8), %xmm0
movsd %xmm0, 0x8(%rax,%rdx,8)
leal 0x2(%rdx), %r8d
movl %r8d, (%rbx)
incq %rdx
jmp 0x18a83
movl %edx, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_signal_track_tools.cpp
// Function: dump_per_nucleotide_binary_profile(double*, int, char*)
void dump_per_nucleotide_binary_profile(double* signal_profile, int l_profile, char* op_fp)
{
	// Dump the per nucleotide signal profile.
	FILE* f_op = open_f(op_fp, "wb");

	// Write data length to first couple bytes.
	fwrite(&(l_profile), sizeof(int), 1, f_op);

	// Dump the data: Dump 0 based data.
	fwrite(&(signal_profile[1]), sizeof(double), l_profile+1, f_op);

	fclose(f_op);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
movl %esi, (%r14)
leaq 0xd782(%rip), %rsi      # 0x2659a
movq %rdx, %rdi
callq 0x2027c
movq %rax, %r15
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rax, %rcx
callq 0x2330
addq $0x8, %rbx
movslq (%r14), %rdx
incq %rdx
pushq $0x8
popq %rsi
movq %rbx, %rdi
movq %r15, %rcx
callq 0x2330
movq %r15, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x2160
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_signal_track_tools.cpp
// Function: load_per_nucleotide_binary_profile(char*, int&)
double* load_per_nucleotide_binary_profile(char* binary_per_nucleotide_profile_fp, int& l_profile)
{
	FILE* f_prof = open_f(binary_per_nucleotide_profile_fp, "rb");

	// Read the profile length.
	int l_data = 0;
	fread(&l_data, sizeof(int), 1, f_prof);
	l_profile = l_data;

	// Read the data.
	double* signal_profile_buffer = new double[l_profile+2];

if(__DUMP_SIGNAL_TRACK_MSGS__)
	fprintf(stderr, "Loading %d data values.\n", l_profile);

	// Following is to use the codebase indexing: 1 based indexing.
	fread(&(signal_profile_buffer[1]), sizeof(double), l_profile+1, f_prof);
	
	fclose(f_prof);

	return(signal_profile_buffer);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
leaq 0xf0c1(%rip), %rsi      # 0x27f30
callq 0x2027c
movq %rax, %rbx
leaq 0x4(%rsp), %r15
andl $0x0, (%r15)
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %rax, %rcx
callq 0x2250
movslq (%r15), %r12
cmpq $-0x2, %r12
movl %r12d, (%r14)
leaq 0x10(,%r12,8), %rax
pushq $-0x1
popq %rdi
cmovgeq %rax, %rdi
callq 0x2040
movq %rax, %r15
cmpb $0x1, 0x1c30e(%rip)     # 0x351c7
je 0x18eea
movq %r15, %rdi
addq $0x8, %rdi
incl %r12d
movslq %r12d, %rdx
pushq $0x8
popq %rsi
movq %rbx, %rcx
callq 0x2250
movq %rbx, %rdi
callq 0x2160
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x1c0ef(%rip), %rax     # 0x34fe0
movq (%rax), %rdi
leaq 0xf038(%rip), %rsi      # 0x27f33
movl %r12d, %edx
xorl %eax, %eax
callq 0x2240
movl (%r14), %r12d
jmp 0x18ebb
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_signal_track_tools.cpp
// Function: exclude_regions_from_signal_profiles(double*, int, std::vector<t_annot_region*, std::allocator<t_annot_region*>>*, double*, int&)
void exclude_regions_from_signal_profiles(double* signal_profile, int l_profile, vector<t_annot_region*>* regions_2_exclude, double* pruned_signal_profile, int& l_pruned_profile)
{
	sort(regions_2_exclude->begin(), regions_2_exclude->end(), sort_regions);

	bool* exclusion_profile = new bool[l_profile+2];
	for(int i = 1; i <= l_profile; i++)
	{
		exclusion_profile[i] = false;
	} // i loop.

	for(int i_reg = 0; i_reg < (int)regions_2_exclude->size(); i_reg++)
	{
		for(int i = regions_2_exclude->at(i_reg)->start; i <= regions_2_exclude->at(i_reg)->end; i++)
		{
			if(i <= l_profile)
			{
				exclusion_profile[i] = true;
			}
		} // i loop.
	} // i_reg loop.

	l_pruned_profile = 1;

	for(int i = 1; i <= l_profile; i++)
	{
		if(exclusion_profile[i])
		{
		}
		else
		{
			pruned_signal_profile[l_pruned_profile] = signal_profile[i];
			l_pruned_profile++;
		}
	} // i loop.

	// Must move the pruned profile index back by one.
	l_pruned_profile--;

	fprintf(stderr, "Pruned the signal of %d values to %d values.\n", l_profile, l_pruned_profile);
	delete [] exclusion_profile;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq %rdx, %rbp
movl %esi, %ebx
movq %rdi, 0x8(%rsp)
movq (%rdx), %rdi
movq 0x8(%rdx), %rsi
leaq -0x5aa3(%rip), %rdx     # 0x13497
callq 0x17bcf
leal 0x2(%rbx), %eax
movslq %eax, %rdi
callq 0x2040
movq %rax, %r12
xorl %eax, %eax
testl %ebx, %ebx
movl $0x0, %r14d
cmovgl %ebx, %r14d
cmpq %rax, %r14
je 0x18f6b
movb $0x0, 0x1(%r12,%rax)
incq %rax
jmp 0x18f5b
movq %rbx, 0x20(%rsp)
movslq %ebx, %r15
xorl %ebx, %ebx
movq 0x8(%rbp), %rax
subq (%rbp), %rax
shrq $0x3, %rax
cltq
cmpq %rax, %rbx
jge 0x18fc5
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x7404
movq (%rax), %rax
movslq 0xc(%rax), %r13
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x7404
movq (%rax), %rax
movslq 0x20(%rax), %rax
cmpq %rax, %r13
jg 0x18fc0
cmpq %r15, %r13
jg 0x18fbb
movb $0x1, (%r12,%r13)
incq %r13
jmp 0x18f9a
incq %rbx
jmp 0x18f75
pushq $0x1
popq %rcx
xorl %eax, %eax
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %r8
cmpq %rax, %r14
je 0x19003
cmpb $0x0, 0x1(%r12,%rax)
jne 0x18ffe
movsd 0x8(%r8,%rax,8), %xmm0
movslq %ecx, %rcx
movsd %xmm0, (%rdi,%rcx,8)
incl %ecx
movl %ecx, (%rsi)
incq %rax
jmp 0x18fde
decl %ecx
movl %ecx, (%rsi)
movq 0x1bfd2(%rip), %rax     # 0x34fe0
movq (%rax), %rdi
leaq 0xf096(%rip), %rsi      # 0x280ae
xorl %eax, %eax
callq 0x2240
movq %r12, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2210
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_signal_track_tools.cpp
// Function: get_log_plus_one_profile(double*, double, int)
void get_log_plus_one_profile(double* signal_profile, double base, int l_profile)
{
	for(int i = 1; i <= l_profile; i++)
	{
		double cur_log_value = xlog(signal_profile[i]+1.0)/xlog(base);
		signal_profile[i] = cur_log_value;
	} // i loop.
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movsd %xmm0, (%rsp)
movq %rdi, %r14
xorl %r15d, %r15d
testl %esi, %esi
cmovlel %r15d, %ebx
cmpq %r15, %rbx
je 0x19090
movsd 0x8(%r14,%r15,8), %xmm0
addsd 0xafa3(%rip), %xmm0     # 0x24008
callq 0x1f860
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x1f860
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%r14,%r15,8)
incq %r15
jmp 0x19051
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_signal_track_tools.cpp
// Function: floorize_profile(double*, int)
void floorize_profile(double* signal_profile, int l_profile)
{
	for(int i = 1; i <= l_profile; i++)
	{
		double cur_floor_val = floor(signal_profile[i]);
		signal_profile[i] = cur_floor_val;
	} // i loop.
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
testl %esi, %esi
cmovlel %r15d, %ebx
cmpq %r15, %rbx
je 0x190ca
movsd 0x8(%r14,%r15,8), %xmm0
callq 0x22b0
movsd %xmm0, 0x8(%r14,%r15,8)
incq %r15
jmp 0x190ad
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_signal_track_tools.cpp
// Function: get_zero_profile(int)
double* get_zero_profile(int l_profile)
{
	double* cur_profile = new double[l_profile+2];
	for(int i = 0; i <= l_profile; i++)
	{
		cur_profile[i] = 0.0;
	} // i loop.

	return(cur_profile);
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leal 0x2(%rbx), %eax
shlq $0x3, %rax
cmpl $-0x2, %edi
pushq $-0x1
popq %rdi
cmovgeq %rax, %rdi
callq 0x2040
movslq %ebx, %rcx
xorl %edx, %edx
cmpq %rcx, %rdx
jg 0x190fd
andq $0x0, (%rax,%rdx,8)
incq %rdx
jmp 0x190ee
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_signal_enrichment_utils.cpp
// Function: get_binomial_p_val_per_enriched_background_values(int, int, double*)
double get_binomial_p_val_per_enriched_background_values(int enriched_value, int background_value, double* _log_factorials)
{
	int grand_total_int = (int)(enriched_value + background_value);

	// Setup the log factorials.
	double* log_factorials = NULL;
	if(_log_factorials == NULL)
	{
		log_factorials = buffer_log_factorials(grand_total_int+3);
	}
	else
	{
		log_factorials = _log_factorials;
	}

	// Compute the p-values.
	double log_flip = log(.5);
	double cur_region_log_p_val = xlog(0.0);
	for(int i = 0; i <= background_value; i++)
	{
		double log_cur_half_pow = log_flip * grand_total_int;
		double log_cur_perm = 0.0; // = xlog(1.0).

		// Compute the current permutation, using shortcuts, bypassing the function calls from xlog_math library.
		log_cur_perm = xlog_div(log_factorials[grand_total_int], xlog_mul(log_factorials[i], log_factorials[grand_total_int-i]));
		cur_region_log_p_val = xlog_sum(cur_region_log_p_val, xlog_mul(log_cur_perm, log_cur_half_pow));
	} // i loop.

	// Free memory if it is allocated in the function.
	if(_log_factorials == NULL)
	{
		delete [] log_factorials;
	}
	else
	{
	}

	return(cur_region_log_p_val);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r15d
addl %esi, %r15d
movq %rdx, %r14
testq %rdx, %rdx
jne 0x1979a
leal 0x3(%r15), %edi
callq 0x1e201
movq %rax, %r14
xorps %xmm0, %xmm0
callq 0x1f860
movsd %xmm0, (%rsp)
cvtsi2sd %r15d, %xmm0
mulsd 0xe92c(%rip), %xmm0     # 0x280e0
movsd %xmm0, 0x8(%rsp)
movslq %r15d, %r15
movslq %ebp, %r12
xorl %r13d, %r13d
movq %r15, %rbp
cmpq %r12, %r13
jg 0x1981b
movsd (%r14,%r15,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd (%r14,%r13,8), %xmm0
movsd (%r14,%rbp,8), %xmm1
callq 0x1f994
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
callq 0x1f9cf
movsd 0x8(%rsp), %xmm1
callq 0x1f994
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
callq 0x1f8b2
movsd %xmm0, (%rsp)
incq %r13
decq %rbp
jmp 0x197c6
testq %rbx, %rbx
setne %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x19833
movq %r14, %rdi
callq 0x2210
movsd (%rsp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_genome_sequence_tools.cpp
// Function: load_binary_sequence_file(char*, int&)
char* load_binary_sequence_file(char* bin_seq_fp, int& l_seq)
{
	FILE* f_bin_seq = open_f(bin_seq_fp, "rb");
	int l_bin_seq = 0;

	// Read the length.
	fread(&l_bin_seq, sizeof(int), 1, f_bin_seq);

	l_seq = l_bin_seq;

	// Read the sequence.
	char* bin_seq = new char[l_bin_seq+2];
	fread(bin_seq, sizeof(char), l_bin_seq, f_bin_seq);
	fclose(f_bin_seq);

	return(bin_seq);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0xb342(%rip), %rsi      # 0x27f30
callq 0x2027c
movq %rax, %r14
leaq 0x4(%rsp), %r15
andl $0x0, (%r15)
pushq $0x4
popq %rsi
pushq $0x1
popq %r12
movq %r15, %rdi
movq %r12, %rdx
movq %rax, %rcx
callq 0x2250
movslq (%r15), %r15
movl %r15d, (%rbx)
leaq 0x2(%r15), %rdi
callq 0x2040
movq %rax, %rbx
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2250
movq %r14, %rdi
callq 0x2160
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_genome_sequence_tools.cpp
// Function: load_BED_with_sequences(char*)
vector<t_annot_region*>* load_BED_with_sequences(char* bed_w_seq_fp)
{
	vector<t_annot_region*>* regs_w_seqs = new vector<t_annot_region*>();

	FILE* f_bed_w_seq = open_f(bed_w_seq_fp, "r");

	while(1)
	{
		char* cur_line = getline(f_bed_w_seq);
		if(cur_line == NULL)
		{
			break;
		}

		char chrom[100];
		int start;
		int end;
		char strand;
		char name[100];
		char* cur_seq = new char[t_string::string_length(cur_line) + 2];		

		if(sscanf(cur_line, "%s %d %d %s %*s %c %s", chrom, 
			&start, &end, name, &strand, cur_seq) != 6)
		{
			fprintf(stderr, "Could not parse the sequence bed file line:\n%s\n", cur_line);
			exit(0);
		}

		t_annot_region* cur_region = get_empty_region();
		cur_region->chrom = t_string::copy_me_str(chrom);
		cur_region->start = translate_coord(start, BED_COORDS::start_base, CODEBASE_COORDS::start_base);
		cur_region->end = translate_coord(end, BED_COORDS::end_base, CODEBASE_COORDS::end_base);
		cur_region->strand = strand;

		// The sequence is stored in the data entry.
		cur_region->data = (void*)cur_seq;

		regs_w_seqs->push_back(cur_region);
	} // file reading loop.

	fclose(f_bed_w_seq);

	return(regs_w_seqs);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %r14
pushq $0x18
popq %rdi
callq 0x2170
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0x9efa(%rip), %rsi      # 0x26d08
movq %r14, %rdi
callq 0x2027c
movq %rax, %r14
leaq 0x90(%rsp), %r12
leaq 0x10(%rsp), %r13
movq %r14, %rdi
callq 0x2017f
testq %rax, %rax
je 0x1cecd
movq %rax, %rbp
movq %rax, %rdi
callq 0x20d90
addl $0x2, %eax
movslq %eax, %rdi
callq 0x2040
movq %rax, %r15
movq %rbp, %rdi
leaq 0xb492(%rip), %rsi      # 0x282ec
movq %r12, %rdx
leaq 0x1c(%rsp), %rcx
leaq 0x18(%rsp), %r8
leaq 0x20(%rsp), %r9
xorl %eax, %eax
pushq %r15
leaq 0x17(%rsp), %r10
pushq %r10
callq 0x2150
popq %rcx
popq %rdx
cmpl $0x6, %eax
jne 0x1ceea
callq 0x11e71
movq %rax, 0x10(%rsp)
movq %r12, %rdi
callq 0x21062
movq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movl 0x1c(%rsp), %eax
incl %eax
movq 0x10(%rsp), %rcx
movl %eax, 0xc(%rcx)
movl 0x18(%rsp), %eax
movl %eax, 0x20(%rcx)
movb 0xf(%rsp), %al
movb %al, 0x8(%rcx)
movq %r15, 0x48(%rcx)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x7448
jmp 0x1ce26
movq %r14, %rdi
callq 0x2160
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x180ef(%rip), %rax     # 0x34fe0
movq (%rax), %rdi
leaq 0xb3c1(%rip), %rsi      # 0x282bc
movq %rbp, %rdx
xorl %eax, %eax
callq 0x2240
xorl %edi, %edi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_genome_sequence_tools.cpp
// Function: load_whole_chromosome_sequence_per_bin_file(char*, int&)
char* load_whole_chromosome_sequence_per_bin_file(char* chr_fp, int& n_nucs)
{
	FILE* f_chr = open_f(chr_fp, "rb");
	
	// Get the file size.
	fseek (f_chr, 0 , SEEK_END);
	n_nucs = (int)(ftell(f_chr));
	rewind(f_chr);

	char* nucs = new char[n_nucs+2]; 

	fread(nucs, sizeof(char), n_nucs, f_chr);

	fclose(f_chr);

	return(nucs);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
leaq 0xa890(%rip), %rsi      # 0x27f30
callq 0x2027c
movq %rax, %rbx
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2190
movq %rbx, %rdi
callq 0x2030
movl %eax, (%r14)
movq %rbx, %rdi
callq 0x2060
movslq (%r14), %r14
leaq 0x2(%r14), %rdi
callq 0x2040
movq %rax, %r15
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x2250
movq %rbx, %rdi
callq 0x2160
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_genome_sequence_tools.cpp
// Function: get_reverse_strand_RNA(char*, int, int)
char* get_reverse_strand_RNA(char* cur_aln_line, int i_nuc_min, int i_nuc_max)
{
	char* reverse_RNA = new char[i_nuc_max - i_nuc_min + 2];
	memset(reverse_RNA, 0, sizeof(char) * (i_nuc_max - i_nuc_min + 2));

	int i_rna_nuc = 0;
	for(int i_nuc = i_nuc_min; i_nuc <= i_nuc_max; i_nuc++)
	{
		if(cur_aln_line[i_nuc] == 'T')
		{
			reverse_RNA[i_rna_nuc] = 'U';
			i_rna_nuc++;
		}
		else if(cur_aln_line[i_nuc] == 't')
		{
			reverse_RNA[i_rna_nuc] = 'u';
			i_rna_nuc++;
		}
		else if(cur_aln_line[i_nuc] == 'A' || cur_aln_line[i_nuc] == 'a' ||
			cur_aln_line[i_nuc] == 'C' || cur_aln_line[i_nuc] == 'c' ||
			cur_aln_line[i_nuc] == 'G' || cur_aln_line[i_nuc] == 'g' ||
			cur_aln_line[i_nuc] == '-')
		{
			reverse_RNA[i_rna_nuc] = cur_aln_line[i_nuc];
			i_rna_nuc++;
		}
		else
		{
			printf("Found %c in the alignment line @ %s(%d):\n%s\n",  cur_aln_line[i_nuc], __FILE__, __LINE__, cur_aln_line);
			//exit(0);
			reverse_RNA[i_rna_nuc] = cur_aln_line[i_nuc];
			i_rna_nuc++;
		}
	} // i_nuc loop.

	return(reverse_RNA);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
movl %edx, %eax
subl %esi, %eax
addl $0x2, %eax
movslq %eax, %r12
movq %r12, %rdi
callq 0x2040
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x20f0
movslq %r15d, %r13
movslq %ebp, %rbp
leaq 0xac76(%rip), %r12      # 0x283b1
movabsq $0x4500000045, %r15     # imm = 0x4500000045
movq %r14, (%rsp)
cmpq %rbp, %r13
jg 0x1d7a9
movb (%rbx,%r13), %al
movzbl %al, %ecx
leal -0x41(%rcx), %esi
cmpl $0x33, %esi
ja 0x1d782
btq %rsi, %r15
jae 0x1d770
movl %eax, %edx
movb %dl, (%r14)
incq %r13
incq %r14
jmp 0x1d749
movb $0x55, %dl
cmpq $0x13, %rsi
je 0x1d765
cmpq $0x33, %rsi
jne 0x1d782
movb $0x75, %dl
jmp 0x1d765
cmpl $0x2d, %ecx
je 0x1d763
movsbl %al, %esi
leaq 0xabf3(%rip), %rdi      # 0x28384
movq %r12, %rdx
movl $0x239, %ecx            # imm = 0x239
movq %rbx, %r8
xorl %eax, %eax
callq 0x2050
movb (%rbx,%r13), %dl
jmp 0x1d765
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq