LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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
subq $0x18, %rsp
movl %esi, 0xc(%rsp)
movq %rdi, %r14
movl $0x18, %edi
callq 0x2180
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq (%r14), %rbx
movq 0x8(%r14), %rbp
subq %rbx, %rbp
sarq $0x3, %rbp
testl %ebp, %ebp
jle 0x1aeb3
xorl %r12d, %r12d
movl $0x50, %edi
callq 0x2180
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x40(%rax)
movq %rax, 0x10(%rsp)
cmpq %r12, %rbp
jbe 0x1aec5
movq %rax, %r13
movq (%rbx,%r12,8), %rax
movq (%rax), %rdi
callq 0x20d0
leaq 0x2(%rax), %rdi
callq 0x2040
movq %rax, (%r13)
movq (%rbx,%r12,8), %rcx
movq (%rcx), %rsi
movq %rax, %rdi
callq 0x2150
movq (%rbx,%r12,8), %rax
movl 0xc(%rax), %ecx
subl 0xc(%rsp), %ecx
movl $0x1, %edx
cmovlel %edx, %ecx
movl %ecx, 0xc(%r13)
movl 0xc(%rax), %ecx
movl %ecx, 0x20(%r13)
movb 0x8(%rax), %al
movb %al, 0x8(%r13)
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x1ae83
movq %r13, (%rsi)
addq $0x8, 0x8(%r15)
jmp 0x1ae90
movq %r15, %rdi
leaq 0x10(%rsp), %rdx
callq 0xb74c
incq %r12
movq (%r14), %rbx
movq 0x8(%r14), %rax
subq %rbx, %rax
movq %rax, %rbp
sarq $0x3, %rbp
shrq $0x3, %rax
cltq
cmpq %rax, %r12
jl 0x1adf1
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11a04(%rip), %rdi     # 0x2c8d0
movq %r12, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O3/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 0x11e11(%rip), %rsi     # 0x2cd08
callq 0x25d5a
movq %rax, %r15
movq %rax, %rdi
callq 0x25c1e
testq %rax, %rax
je 0x1af90
movq %rax, %r12
leaq 0x10(%rsp), %r13
leaq 0x4(%rsp), %rbp
movl $0x0, 0x4(%rsp)
movq %r12, %rdi
leaq 0x12ee6(%rip), %rsi     # 0x2de15
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x2160
cmpl $0x2, %eax
jne 0x1afaa
movq %r13, %rdi
callq 0x26db4
movq %rax, 0x8(%rsp)
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
callq 0xb27c
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x1af75
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x1af80
movq %rbx, %rdi
movq %rbp, %rdx
callq 0xabfa
movq %r15, %rdi
callq 0x25c1e
movq %rax, %r12
testq %rax, %rax
jne 0x1af1d
movq %r15, %rdi
callq 0x2170
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
callq 0x4cb4
// File: /workspace/github_cpp_makefile_star2_O3/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
subq $0x18, %rsp
movl %esi, 0xc(%rsp)
movq %rdi, %r14
movl $0x18, %edi
callq 0x2180
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq (%r14), %rbx
movq 0x8(%r14), %rbp
subq %rbx, %rbp
sarq $0x3, %rbp
testl %ebp, %ebp
jle 0x1b0b2
xorl %r12d, %r12d
movl $0x50, %edi
callq 0x2180
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x40(%rax)
movq %rax, 0x10(%rsp)
cmpq %r12, %rbp
jbe 0x1b0c4
movq %rax, %r13
movq (%rbx,%r12,8), %rax
movq (%rax), %rdi
callq 0x20d0
leaq 0x2(%rax), %rdi
callq 0x2040
movq %rax, (%r13)
movq (%rbx,%r12,8), %rcx
movq (%rcx), %rsi
movq %rax, %rdi
callq 0x2150
movq (%rbx,%r12,8), %rax
movl 0x20(%rax), %ecx
movl %ecx, 0xc(%r13)
addl 0xc(%rsp), %ecx
movl %ecx, 0x20(%r13)
movb 0x8(%rax), %al
movb %al, 0x8(%r13)
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x1b082
movq %r13, (%rsi)
addq $0x8, 0x8(%r15)
jmp 0x1b08f
movq %r15, %rdi
leaq 0x10(%rsp), %rdx
callq 0xb74c
incq %r12
movq (%r14), %rbx
movq 0x8(%r14), %rax
subq %rbx, %rax
movq %rax, %rbp
sarq $0x3, %rbp
shrq $0x3, %rax
cltq
cmpq %rax, %r12
jl 0x1affb
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11805(%rip), %rdi     # 0x2c8d0
movq %r12, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1ba07
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x1b9eb
callq 0x2220
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x1b9f9
callq 0x2220
movl $0x50, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x2190
retq
// File: /workspace/github_cpp_makefile_star2_O3/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, (%rsp)
movl %esi, 0x4(%rsp)
movq %rdi, %r15
movl $0x18, %edi
callq 0x2180
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq (%r15), %rcx
movq 0x8(%r15), %rsi
movq %rsi, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
testl %edx, %edx
jle 0x1baf0
xorl %r12d, %r12d
cmpq %r12, %rdx
jbe 0x1bb4a
movq (%rcx,%r12,8), %rbp
movq (%rbp), %rdx
movq 0x8(%rbp), %rax
subq %rdx, %rax
sarq $0x3, %rax
testl %eax, %eax
jle 0x1bad1
xorl %r14d, %r14d
xorl %r13d, %r13d
cmpq %r13, %rax
jbe 0x1bb36
addq %r14, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x1ba9d
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x1baa5
movq %rbx, %rdi
callq 0xb74c
incq %r13
movq (%rbp), %rdx
movq 0x8(%rbp), %rcx
subq %rdx, %rcx
movq %rcx, %rax
sarq $0x3, %rax
shrq $0x3, %rcx
movslq %ecx, %rcx
addq $0x8, %r14
cmpq %rcx, %r13
jl 0x1ba7a
movq (%r15), %rcx
movq 0x8(%r15), %rsi
incq %r12
movq %rsi, %rax
subq %rcx, %rax
movq %rax, %rdx
sarq $0x3, %rdx
shrq $0x3, %rax
cltq
cmpq %rax, %r12
jl 0x1ba54
movzbl (%rsp), %edx
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x1a6af
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1bb17
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2190
movl $0x18, %esi
movq %rbx, %rdi
callq 0x2190
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10d93(%rip), %rdi     # 0x2c8d0
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2270
leaq 0x10d7f(%rip), %rdi     # 0x2c8d0
movq %r12, %rsi
jmp 0x1bb43
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x8(%rbx), %rdx
movq %rdx, %rax
subq %rdi, %rax
sarq $0x3, %rax
testl %eax, %eax
jle 0x1bfc5
xorl %r14d, %r14d
cmpq %r14, %rax
jbe 0x1bfff
movq (%rdi,%r14,8), %rax
testq %rax, %rax
je 0x1bfa5
movq (%rax), %rax
testq %rax, %rax
je 0x1bf58
movq %rax, %rdi
callq 0x2220
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
subq %rdi, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
jbe 0x1bff3
movq (%rdi,%r14,8), %rax
movq 0x48(%rax), %rax
testq %rax, %rax
je 0x1bf8b
movq %rax, %rdi
callq 0x2220
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
subq %rdi, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
jbe 0x1bff3
movq (%rdi,%r14,8), %rdi
movl $0x50, %esi
callq 0x2190
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
incq %r14
movq %rdx, %rcx
subq %rdi, %rcx
movq %rcx, %rax
sarq $0x3, %rax
shrq $0x3, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r14
jl 0x1bf2f
cmpq %rdi, %rdx
je 0x1bfce
movq %rdi, 0x8(%rbx)
testq %rdi, %rdi
je 0x1bfdf
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2190
movl $0x18, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2190
leaq 0x108d6(%rip), %rdi     # 0x2c8d0
movq %r14, %rsi
jmp 0x1c00c
leaq 0x108ca(%rip), %rdi     # 0x2c8d0
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O3/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 %rax
movl %edi, %r8d
movl %edx, %eax
movl %ecx, %edx
movl %edx, %ecx
leal (%rcx,%rax), %r11d
movl %r11d, %edx
shrl $0x1f, %edx
addl %r11d, %edx
sarl %edx
cmpl %eax, %edx
je 0x1c08e
cmpl %ecx, %edx
je 0x1c08e
movslq %edx, %r10
movq (%rsi), %rdi
movq 0x8(%rsi), %r9
subq %rdi, %r9
sarq $0x2, %r9
cmpq %r10, %r9
jbe 0x1c090
movl (%rdi,%r10,4), %r10d
cmpl %r8d, %r10d
je 0x1c06b
jg 0x1c023
jl 0x1c01f
movl %eax, %edi
movl %ecx, %edx
movl %r8d, %ecx
callq 0x4cd7
cmpl $0x2, %r11d
jl 0x1c08c
movl %edx, %esi
cmpq %rsi, %r9
jbe 0x1c09c
cmpl %r8d, (%rdi,%rsi,4)
jl 0x1c08c
leal -0x1(%rdx), %eax
cmpl $0x1, %edx
movl %eax, %edx
jg 0x1c071
xorl %eax, %eax
jmp 0x1c08e
movl %edx, %eax
popq %rcx
retq
leaq 0x10839(%rip), %rdi     # 0x2c8d0
movq %r10, %rsi
jmp 0x1c0a3
leaq 0x1082d(%rip), %rdi     # 0x2c8d0
movq %r9, %rdx
xorl %eax, %eax
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x18, %rsp
movq %r8, 0x10(%rsp)
movl %ecx, %r13d
movl %edx, %r12d
movq %rsi, %r15
movl %edi, 0xc(%rsp)
movl %r12d, %ebp
movl %r13d, %r12d
movl %r12d, %r13d
leal (%r13,%rbp), %r14d
movl %r14d, %r12d
shrl $0x1f, %r12d
addl %r14d, %r12d
sarl %r12d
cmpl %ebp, %r12d
je 0x1c3bd
cmpl %r13d, %r12d
je 0x1c3bd
movslq %r12d, %rbx
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rbx, %rdx
jbe 0x1c3ce
movq (%rax,%rbx,8), %rdi
callq *0x10(%rsp)
cmpl 0xc(%rsp), %eax
je 0x1c37e
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rbx, %rdx
jbe 0x1c3ce
movq (%rax,%rbx,8), %rdi
callq *0x10(%rsp)
cmpl 0xc(%rsp), %eax
jg 0x1c27b
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rbx, %rdx
jbe 0x1c3ce
movq (%rax,%rbx,8), %rdi
callq *0x10(%rsp)
cmpl 0xc(%rsp), %eax
jl 0x1c275
movq 0x1ccbd(%rip), %rax     # 0x38fe0
movq (%rax), %rbx
movslq %ebp, %rsi
movq %r15, %rdi
callq 0x1c42e
movq (%rax), %rdi
movq 0x10(%rsp), %r14
callq *%r14
movl %eax, %ebp
movslq %r13d, %rsi
movq %r15, %rdi
callq 0x1c42e
movq (%rax), %rdi
callq *%r14
movl $0xc4d, (%rsp)          # imm = 0xC4D
leaq 0x11b0b(%rip), %rsi     # 0x2de68
leaq 0x1167f(%rip), %r9      # 0x2d9e3
movq %rbx, %rdi
movl %ebp, %edx
movl %eax, %ecx
movl 0xc(%rsp), %r8d
xorl %eax, %eax
callq 0x2250
xorl %edi, %edi
callq 0x21e0
cmpl $0x2, %r14d
jl 0x1c3ba
movl %r12d, %esi
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rsi, %rdx
jbe 0x1c3df
movq (%rax,%rsi,8), %rdi
callq *0x10(%rsp)
cmpl 0xc(%rsp), %eax
jl 0x1c3ba
leal -0x1(%r12), %eax
cmpl $0x1, %r12d
movl %eax, %r12d
jg 0x1c384
xorl %ebp, %ebp
jmp 0x1c3bd
movl %r12d, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x104fb(%rip), %rdi     # 0x2c8d0
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2270
leaq 0x104ea(%rip), %rdi     # 0x2c8d0
jmp 0x1c3d8
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
movl %esi, (%r14)
leaq 0xf927(%rip), %rsi      # 0x2c59a
movq %rdx, %rdi
callq 0x25d5a
movq %rax, %r15
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rax, %rcx
callq 0x2340
incq %rbx
movslq (%r14), %rdx
incq %rdx
movl $0x1, %esi
movq %rbx, %rdi
movq %r15, %rcx
callq 0x2340
movq %r15, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x2170
// File: /workspace/github_cpp_makefile_star2_O3/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 0x11261(%rip), %rsi     # 0x2df30
callq 0x25d5a
movq %rax, %rbx
leaq 0x4(%rsp), %r15
movl $0x0, (%r15)
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rax, %rcx
callq 0x2260
movslq (%r15), %r12
movl %r12d, (%r14)
movq %r12, %rdi
addq $0x2, %rdi
callq 0x2040
movq %rax, %r15
cmpb $0x1, 0x1c4bb(%rip)     # 0x391cf
je 0x1cd46
movq %r15, %rdi
incq %rdi
incl %r12d
movslq %r12d, %rdx
movl $0x1, %esi
movq %rbx, %rcx
callq 0x2260
movq %rbx, %rdi
callq 0x2170
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x1c293(%rip), %rax     # 0x38fe0
movq (%rax), %rdi
leaq 0x111dc(%rip), %rsi     # 0x2df33
movl %r12d, %edx
xorl %eax, %eax
callq 0x2250
movl (%r14), %r12d
jmp 0x1cd16
// File: /workspace/github_cpp_makefile_star2_O3/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)
testl %esi, %esi
jle 0x1cdb5
incl %esi
movl $0x1, %eax
movsd (%rdi,%rax,8), %xmm0
ucomisd (%rcx), %xmm0
jbe 0x1cd9f
movsd %xmm0, (%rcx)
movsd (%rdi,%rax,8), %xmm0
movsd (%rdx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x1cdad
movsd %xmm0, (%rdx)
incq %rax
cmpq %rax, %rsi
jne 0x1cd8b
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movl %esi, %ebx
shlq $0x3, %rbx
testl %esi, %esi
movq $-0x1, %rdi
cmovnsq %rbx, %rdi
callq 0x2040
testl %ebp, %ebp
jle 0x1cdf1
addq $0x8, %r14
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x2130
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leal 0x2(%r14), %eax
shlq $0x3, %rax
cmpl $-0x2, %esi
movq $-0x1, %rdi
cmovgeq %rax, %rdi
callq 0x2040
movq %rax, %r15
testl %r14d, %r14d
jle 0x1ce3a
movq %r15, %rdi
addq $0x8, %rdi
movl %r14d, %edx
shlq $0x3, %rdx
movq %rbx, %rsi
callq 0x2130
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movq %rdx, 0x8(%rsp)
movl %esi, %ebx
movq %rdi, %r12
movl %esi, %ebp
leaq (,%rbp,8), %rdi
testl %esi, %esi
movq $-0x1, %r15
cmovsq %r15, %rdi
callq 0x2040
movq %rax, %r13
movl %ebx, 0x4(%rsp)
testl %ebx, %ebx
jle 0x1cf77
movq 0x8(%rsp), %rax
leal 0x2(%rax), %ebx
shlq $0x3, %rbx
cmpl $-0x2, %eax
cmovlq %r15, %rbx
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x2040
movq %rax, (%r13,%r15,8)
incq %r15
cmpq %r15, %rbp
jne 0x1cf62
movq 0x8(%rsp), %r9
testl %r9d, %r9d
jle 0x1d024
incl %r9d
movq %rbp, %rcx
negq %rcx
movl $0x1, %eax
movl $0x1, %edx
movsd 0x10f88(%rip), %xmm0    # 0x2df28
movl 0x4(%rsp), %r10d
testl %r10d, %r10d
jle 0x1d018
xorl %esi, %esi
xorl %edi, %edi
incq %rsi
movsd -0x8(%r14,%rsi,8), %xmm1
ucomisd %xmm1, %xmm0
jae 0x1cfcf
movq -0x8(%r12,%rsi,8), %r8
movsd (%r8,%rdx,8), %xmm2
ucomisd %xmm1, %xmm2
ja 0x1cfe1
leaq (%rcx,%rsi), %r8
incq %r8
incq %rsi
cmpq $0x1, %r8
jne 0x1cfb1
jmp 0x1cfee
movb $0x1, %dil
movq %rcx, %r8
addq %rsi, %r8
jne 0x1cfae
jmp 0x1cff4
testb $0x1, %dil
je 0x1d018
movslq %eax, %rsi
xorl %edi, %edi
movq (%r12,%rdi,8), %r8
movsd (%r8,%rdx,8), %xmm1
movq (%r13,%rdi,8), %r8
movsd %xmm1, (%r8,%rsi,8)
incq %rdi
cmpq %rdi, %rbp
jne 0x1cff9
incl %eax
incq %rdx
cmpq %r9, %rdx
jne 0x1cfa5
decl %eax
jmp 0x1d026
xorl %eax, %eax
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %r14d
movl %edx, %ebp
movl %esi, %r13d
movq %rdi, %r15
movl %ecx, %eax
subl %edx, %eax
leal 0x3(%rax), %ecx
shlq $0x3, %rcx
cmpl $-0x3, %eax
movq $-0x1, %rdi
cmovgeq %rcx, %rdi
callq 0x2040
movq %rax, %r12
movl %r14d, %eax
subl %ebp, %eax
jl 0x1d0e5
movl %eax, %eax
leaq 0x8(,%rax,8), %rdx
movq %r12, %rdi
xorl %esi, %esi
callq 0x20f0
cmpl %r14d, %r13d
cmovll %r13d, %r14d
xorl %eax, %eax
subl %ebp, %r14d
jl 0x1d114
movq %r12, %rdi
addq $0x8, %rdi
movslq %ebp, %rax
leaq (%r15,%rax,8), %rsi
leaq 0x8(,%r14,8), %rdx
callq 0x2130
incl %r14d
movl %r14d, %eax
movl %eax, (%rbx)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xf359(%rip), %rsi      # 0x2c59a
movq %rdx, %rdi
callq 0x25d5a
movq %rax, %r15
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rax, %rcx
callq 0x2340
addq $0x8, %rbx
movslq (%r14), %rdx
incq %rdx
movl $0x8, %esi
movq %rbx, %rdi
movq %r15, %rcx
callq 0x2340
movq %r15, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x2170
// File: /workspace/github_cpp_makefile_star2_O3/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 0x10c92(%rip), %rsi     # 0x2df30
callq 0x25d5a
movq %rax, %rbx
leaq 0x4(%rsp), %r15
movl $0x0, (%r15)
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rax, %rcx
callq 0x2260
movslq (%r15), %r12
cmpq $-0x2, %r12
movl %r12d, (%r14)
leaq 0x10(,%r12,8), %rax
movq $-0x1, %rdi
cmovgeq %rax, %rdi
callq 0x2040
movq %rax, %r15
cmpb $0x1, 0x1bedc(%rip)     # 0x391cf
je 0x1d326
movq %r15, %rdi
addq $0x8, %rdi
incl %r12d
movslq %r12d, %rdx
movl $0x8, %esi
movq %rbx, %rcx
callq 0x2260
movq %rbx, %rdi
callq 0x2170
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x1bcb3(%rip), %rax     # 0x38fe0
movq (%rax), %rdi
leaq 0x10bfc(%rip), %rsi     # 0x2df33
movl %r12d, %edx
xorl %eax, %eax
callq 0x2250
movl (%r14), %r12d
jmp 0x1d2f5
// File: /workspace/github_cpp_makefile_star2_O3/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
movsd %xmm0, (%rsp)
testl %esi, %esi
jle 0x1d685
movl %esi, %ebx
movq %rdi, %r14
incl %ebx
movl $0x1, %r15d
movsd (%r14,%r15,8), %xmm0
addsd 0xc9b0(%rip), %xmm0     # 0x2a008
callq 0x2525c
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x2525c
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%r14,%r15,8)
incq %r15
cmpq %r15, %rbx
jne 0x1d64a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
testl %esi, %esi
jle 0x1d6c3
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
incl %ebx
movl $0x1, %r15d
movsd (%r14,%r15,8), %xmm0
callq 0x22c0
movsd %xmm0, (%r14,%r15,8)
incq %r15
cmpq %r15, %rbx
jne 0x1d6a5
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movq $-0x1, %rdi
cmovgeq %rax, %rdi
callq 0x2040
testl %ebx, %ebx
js 0x1d6fa
movl %ebx, %ecx
leaq 0x8(,%rcx,8), %rdx
movq %rax, %rdi
xorl %esi, %esi
popq %rbx
jmp 0x20f0
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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, %r15d
movl %edi, %r12d
addl %esi, %r12d
movq %rdx, %r14
testq %rdx, %rdx
jne 0x1dde1
leal 0x3(%r12), %edi
callq 0x236bc
movq %rax, %r14
xorps %xmm0, %xmm0
callq 0x2525c
testl %r15d, %r15d
js 0x1de62
cvtsi2sd %r12d, %xmm1
mulsd 0x102e5(%rip), %xmm1    # 0x2e0e0
movsd %xmm1, 0x8(%rsp)
movslq %r12d, %r12
incl %r15d
leaq (%r14,%r12,8), %r13
xorl %ebp, %ebp
movsd %xmm0, (%rsp)
movsd (%r14,%r12,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd (%r14,%rbp,8), %xmm0
movsd (%r13), %xmm1
callq 0x253c5
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
callq 0x25400
movsd 0x8(%rsp), %xmm1
callq 0x253c5
movapd %xmm0, %xmm1
movsd (%rsp), %xmm0
callq 0x252b0
incq %rbp
addq $-0x8, %r13
cmpq %rbp, %r15
jne 0x1de0d
testq %rbx, %rbx
setne %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x1de84
movq %r14, %rdi
movsd %xmm0, (%rsp)
callq 0x2220
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_O3/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 %rbx
subq $0x10, %rsp
movq %rsi, %rbx
leaq 0xc291(%rip), %rsi      # 0x2df30
callq 0x25d5a
movq %rax, %r14
leaq 0xc(%rsp), %r15
movl $0x0, (%r15)
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rax, %rcx
callq 0x2260
movslq (%r15), %r15
movl %r15d, (%rbx)
leaq 0x2(%r15), %rdi
callq 0x2040
movq %rax, %rbx
movl $0x1, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2260
movq %r14, %rdi
callq 0x2170
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movl $0x18, %edi
callq 0x2180
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
leaq 0xae31(%rip), %rsi      # 0x2cd08
movq %r14, %rdi
callq 0x25d5a
movq %rax, %r14
movq %rax, %rdi
callq 0x25c1e
testq %rax, %rax
je 0x21fbe
movq %rax, %r13
leaq 0x90(%rsp), %r12
leaq 0x20(%rsp), %r15
movq %r13, %rdi
callq 0x26856
addl $0x2, %eax
movslq %eax, %rdi
callq 0x2040
movq %rax, %rbp
movq %r13, %rdi
leaq 0xc3c9(%rip), %rsi      # 0x2e2ec
movq %r12, %rdx
leaq 0x1c(%rsp), %rcx
leaq 0x18(%rsp), %r8
movq %r15, %r9
xorl %eax, %eax
pushq %rbp
leaq 0x17(%rsp), %r10
pushq %r10
callq 0x2160
addq $0x10, %rsp
cmpl $0x6, %eax
jne 0x21fdb
callq 0x15644
movq %rax, 0x10(%rsp)
movq %r12, %rdi
callq 0x26db4
movq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movl 0x1c(%rsp), %ecx
incl %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0xc(%rax)
movl 0x18(%rsp), %ecx
movl %ecx, 0x20(%rax)
movb 0xf(%rsp), %cl
movb %cl, 0x8(%rax)
movq %rbp, 0x48(%rax)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x21f9d
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x21faa
movq %rbx, %rdi
leaq 0x10(%rsp), %rdx
callq 0xb74c
movq %r14, %rdi
callq 0x25c1e
movq %rax, %r13
testq %rax, %rax
jne 0x21f03
movq %r14, %rdi
callq 0x2170
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
callq 0x51f6
// File: /workspace/github_cpp_makefile_star2_O3/gersteinlab[P]MUSIC/src/ms_genome_sequence_tools.cpp
// Function: get_reverse_complement(char*, int, int)
char* get_reverse_complement(char* cur_aln_line, int i_nuc_min, int i_nuc_max)
{
	char* rev_comp_DNA = new char[i_nuc_max - i_nuc_min + 2];
	memset(rev_comp_DNA, 0, sizeof(char) * (i_nuc_max - i_nuc_min + 2));

	//printf("Forward strand RNA for strand:\n");
	//for(int i_nuc = i_nuc_min; i_nuc <= i_nuc_max; i_nuc++)
	//{
	//	printf("%c", cur_aln_line[i_nuc]);
	//}
	//printf("\n");

	int i_dna_nuc = 0;

	// The forward strand RNA is transcribed from 3' end.
	for(int i_nuc = i_nuc_max; i_nuc >= i_nuc_min; i_nuc--)
	{
		if(cur_aln_line[i_nuc] == 'A')
		{
			rev_comp_DNA[i_dna_nuc] = 'T';
			i_dna_nuc++;
		}
		else if(cur_aln_line[i_nuc] == 'T')
		{
			rev_comp_DNA[i_dna_nuc] = 'A';
			i_dna_nuc++;
		}
		else if(cur_aln_line[i_nuc] == 'G')
		{
			rev_comp_DNA[i_dna_nuc] = 'C';
			i_dna_nuc++;
		}
		else if(cur_aln_line[i_nuc] == 'C')
		{
			rev_comp_DNA[i_dna_nuc] = 'G';
			i_dna_nuc++;
		}
		else if(cur_aln_line[i_nuc] == 'a')
		{
			rev_comp_DNA[i_dna_nuc] = 't';
			i_dna_nuc++;
		}
		else if(cur_aln_line[i_nuc] == 't')
		{
			rev_comp_DNA[i_dna_nuc] = 'a';
			i_dna_nuc++;
		}
		else if(cur_aln_line[i_nuc] == 'g')
		{
			rev_comp_DNA[i_dna_nuc] = 'c';
			i_dna_nuc++;
		}
		else if(cur_aln_line[i_nuc] == 'c')
		{
			rev_comp_DNA[i_dna_nuc] = 'g';
			i_dna_nuc++;
		}
		//else if(cur_aln_line[i_nuc] == '-')
		//{
		//	rev_comp_DNA[i_dna_nuc] = '-';
		//	i_dna_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);
			rev_comp_DNA[i_dna_nuc] = cur_aln_line[i_nuc];
			i_dna_nuc++;
		}
	} // i_nuc loop.

	//printf("%s", rev_comp_DNA);
	//getc(stdin);
	
	return(rev_comp_DNA);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
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
movl %ebp, %eax
subl %r15d, %eax
jl 0x22717
movslq %ebp, %rcx
incl %eax
addq %rcx, %rbx
xorl %ecx, %ecx
movb (%rbx), %dl
movzbl %dl, %esi
cmpl $0x60, %esi
jg 0x226c5
cmpl $0x46, %esi
jg 0x226d9
movb $0x54, %dil
cmpl $0x41, %esi
je 0x22708
cmpl $0x43, %esi
jne 0x22706
movb $0x47, %dil
jmp 0x22708
cmpl $0x66, %esi
jg 0x226e8
cmpl $0x61, %esi
je 0x226f7
cmpl $0x63, %esi
jne 0x22706
movb $0x67, %dil
jmp 0x22708
cmpl $0x47, %esi
je 0x226fc
cmpl $0x54, %esi
jne 0x22706
movb $0x41, %dil
jmp 0x22708
cmpl $0x67, %esi
je 0x22701
cmpl $0x74, %esi
jne 0x22706
movb $0x61, %dil
jmp 0x22708
movb $0x74, %dil
jmp 0x22708
movb $0x43, %dil
jmp 0x22708
movb $0x63, %dil
jmp 0x22708
movl %edx, %edi
movb %dil, (%r14,%rcx)
incq %rcx
decq %rbx
cmpq %rcx, %rax
jne 0x226a4
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xb4a8(%rip), %rsi      # 0x2df30
callq 0x25d5a
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x21a0
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
movl $0x1, %esi
movq %rax, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x2260
movq %rbx, %rdi
callq 0x2170
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl %edx, %eax
subl %esi, %eax
addl $0x2, %eax
movslq %eax, %r12
movq %r12, %rdi
callq 0x2040
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x20f0
subl %ebp, %ebx
jge 0x22b2f
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq %ebp, %rbp
incl %ebx
addq %r14, %rbp
movabsq $0x4500000045, %r12     # imm = 0x4500000045
xorl %r13d, %r13d
movb (%rbp,%r13), %al
movzbl %al, %ecx
leal -0x41(%rcx), %esi
cmpl $0x33, %esi
ja 0x22b7c
btq %rsi, %r12
jae 0x22b6a
movl %eax, %edx
movb %dl, (%r15,%r13)
incq %r13
cmpq %r13, %rbx
jne 0x22b44
jmp 0x22b1d
movb $0x55, %dl
cmpq $0x13, %rsi
je 0x22b5c
cmpq $0x33, %rsi
jne 0x22b7c
movb $0x75, %dl
jmp 0x22b5c
cmpl $0x2d, %ecx
je 0x22b5a
movsbl %al, %esi
leaq 0xb7f9(%rip), %rdi      # 0x2e384
leaq 0xb81f(%rip), %rdx      # 0x2e3b1
movl $0x239, %ecx            # imm = 0x239
movq %r14, %r8
xorl %eax, %eax
callq 0x2050
movb (%rbp,%r13), %dl
jmp 0x22b5c
// File: /workspace/github_cpp_makefile_star2_O3/gersteinlab[P]MUSIC/src/ms_profile_normalization.cpp
// Function: PeakSeq_slope(double*, double*, int)
double PeakSeq_slope(double* prof1_total_sigs_per_win, double* prof2_total_sigs_per_win, int n_processed_wins)
{
    // Compute the slope from 2 DOF (slope) LLS regression.
    double num = 0.0f;
    double den = 0.0f;

    double sx = 0.0f;
    double sy = 0.0f;
    double sxx = 0.0f;
    double sxy = 0.0f;

    for(int i = 0; i < n_processed_wins; i++)
    {
		sx += prof1_total_sigs_per_win[i];
		sy += prof2_total_sigs_per_win[i];
		sxx += prof1_total_sigs_per_win[i] * prof1_total_sigs_per_win[i];
		sxy += prof1_total_sigs_per_win[i] * prof2_total_sigs_per_win[i];

		//sx += control_frag_cnt->at(i);
		//sy += chip_seq_frag_cnt->at(i);
		//sxx += control_frag_cnt->at(i) * control_frag_cnt->at(i);
		//sxy += control_frag_cnt->at(i) * chip_seq_frag_cnt->at(i);
    } // i loop

    num = n_processed_wins * sxy - sx * sy;
    den = n_processed_wins * sxx - sx * sx;
	
	if(num == 0 || den == 0)
	{
		fprintf(stderr, "Normalization(1): Very low signal mapped.\n");
		return(1.0);
	}

	return(num / den);
}

// Assembly:
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
testl %edx, %edx
jle 0x22fa1
movl %edx, %eax
xorl %ecx, %ecx
movsd (%rdi,%rcx,8), %xmm3
movapd %xmm3, %xmm4
movhpd (%rsi,%rcx,8), %xmm4    # xmm4 = xmm4[0],mem[0]
addpd %xmm4, %xmm2
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
mulpd %xmm4, %xmm3
addpd %xmm3, %xmm1
incq %rcx
cmpq %rcx, %rax
jne 0x22f7b
xorps %xmm3, %xmm3
cvtsi2sd %edx, %xmm3
movapd %xmm2, %xmm4
unpcklpd %xmm2, %xmm4            # xmm4 = xmm4[0],xmm2[0]
mulpd %xmm2, %xmm4
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
mulpd %xmm1, %xmm3
subpd %xmm4, %xmm3
cmpeqpd %xmm3, %xmm0
movmskpd %xmm0, %eax
testl %eax, %eax
jne 0x22fda
movapd %xmm3, %xmm0
unpckhpd %xmm3, %xmm0            # xmm0 = xmm0[1],xmm3[1]
divsd %xmm3, %xmm0
retq
pushq %rax
callq 0x53df
movsd 0x7020(%rip), %xmm0     # 0x2a008
addq $0x8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gersteinlab[P]MUSIC/src/ms_profile_normalization.cpp
// Function: slope(double*, double*, int)
double slope(double* prof1_total_sigs_per_win, double* prof2_total_sigs_per_win, int n_processed_wins)
{
	// Compute the slope from 1 DOF (slope) LLS regression.
	double num = 0.0f;
	double den = 0.0f;
	for(int i = 0; i < n_processed_wins; i++)
	{
		num += prof1_total_sigs_per_win[i] * prof2_total_sigs_per_win[i];
		den += prof1_total_sigs_per_win[i] * prof1_total_sigs_per_win[i];
		//num += control_frag_cnt->at(i) * chip_seq_frag_cnt->at(i);
		//den += control_frag_cnt->at(i) * control_frag_cnt->at(i);
	} // i loop

	if(num == 0 || den == 0)
	{
		fprintf(stderr, "Normalization(2): Very low signal mapped.\n");
		return(1.0);
	}

	return(num / den);
}

// Assembly:
testl %edx, %edx
jle 0x2303c
movl %edx, %eax
xorpd %xmm1, %xmm1
xorl %ecx, %ecx
movsd (%rdi,%rcx,8), %xmm0
movapd %xmm0, %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
movhpd (%rsi,%rcx,8), %xmm0    # xmm0 = xmm0[0],mem[0]
mulpd %xmm2, %xmm0
addpd %xmm0, %xmm1
incq %rcx
cmpq %rcx, %rax
jne 0x22ff9
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jne 0x2302f
jnp 0x2303c
ucomisd %xmm2, %xmm1
jne 0x23037
jnp 0x2303c
divsd %xmm1, %xmm0
retq
pushq %rax
callq 0x53fb
movsd 0x6fbe(%rip), %xmm0     # 0x2a008
addq $0x8, %rsp
retq