LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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:
xorl %eax, %eax
testl %edx, %edx
movl $0x0, %ecx
cmovgl %edx, %ecx
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
cmpq %rax, %rcx
je 0x1db58
movsd (%rdi,%rax,8), %xmm0
movsd (%rsi,%rax,8), %xmm3
unpcklpd %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0]
addpd %xmm3, %xmm2
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm3, %xmm0
addpd %xmm0, %xmm1
incq %rax
jmp 0x1db30
cvtsi2sd %edx, %xmm0
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
mulpd %xmm2, %xmm3
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm1, %xmm0
subpd %xmm3, %xmm0
xorpd %xmm1, %xmm1
cmpeqpd %xmm0, %xmm1
movmskpd %xmm1, %eax
testl %eax, %eax
jne 0x1db92
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
divsd %xmm1, %xmm0
retq
pushq %rax
movq 0x17446(%rip), %rax     # 0x34fe0
movq (%rax), %rcx
leaq 0xa87e(%rip), %rdi      # 0x28422
pushq $0x2a
popq %rsi
pushq $0x1
popq %rdx
callq 0x2330
movsd 0x6451(%rip), %xmm0     # 0x24008
addq $0x8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
xorpd %xmm0, %xmm0
cmpq %rax, %rdx
je 0x1dbeb
movsd (%rdi,%rax,8), %xmm1
movsd (%rsi,%rax,8), %xmm2
unpcklpd %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm2, %xmm1
addpd %xmm1, %xmm0
incq %rax
jmp 0x1dbc7
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jne 0x1dbf7
jnp 0x1dc0c
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
ucomisd %xmm2, %xmm1
jne 0x1dc07
jnp 0x1dc0c
divsd %xmm1, %xmm0
retq
pushq %rax
movq 0x173cc(%rip), %rax     # 0x34fe0
movq (%rax), %rcx
leaq 0xa82f(%rip), %rdi      # 0x2844d
pushq $0x2a
popq %rsi
pushq $0x1
popq %rdx
callq 0x2330
movsd 0x63d7(%rip), %xmm0     # 0x24008
addq $0x8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_profile_normalization.cpp
// Function: pearson_correlation(double*, double*, int)
double pearson_correlation(double* prof1_total_sigs_per_win, double* prof2_total_sigs_per_win, int n_processed_wins)
{
	double num = 0.0f;
	//double den = 0.0f;

	double prof1_mean = 0.0f;
	double prof2_mean = 0.0f;
	for(int i_win = 0; i_win < n_processed_wins; i_win++)
	{
		//control_mean += control_frag_cnt->at(i_frag);
		prof1_mean += prof1_total_sigs_per_win[i_win];
		prof2_mean += prof2_total_sigs_per_win[i_win];
	} // i_win loop.
	prof1_mean /= n_processed_wins;
	prof2_mean /= n_processed_wins;

    //for(int i_frag = 0; i_frag < chip_seq_frag_cnt->size(); i_frag++)
	for(int i_win = 0; i_win < n_processed_wins; i_win++)
    {
		num += (prof1_total_sigs_per_win[i_win] - prof1_mean) * (prof2_total_sigs_per_win[i_win] - prof2_mean);
	} // i_win loop.
	
	double prof1_var = 0.0f;
    for(int i_win = 0; i_win < n_processed_wins; i_win++)
    {
		prof1_var += (prof1_total_sigs_per_win[i_win] - prof1_mean) * (prof1_total_sigs_per_win[i_win] - prof1_mean);
	}	
	prof1_var = pow(prof1_var, .5);

	double prof2_var = 0.0f;
    for(int i_win = 0; i_win < n_processed_wins; i_win++)
    {
		prof2_var += (prof2_total_sigs_per_win[i_win] - prof2_mean) * (prof2_total_sigs_per_win[i_win] - prof2_mean);
	}
	prof2_var = pow(prof2_var, .5);

	double r = num / (prof1_var * prof2_var);

	return(r);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
xorl %eax, %eax
testl %edx, %edx
movl $0x0, %r14d
cmovgl %edx, %r14d
xorpd %xmm1, %xmm1
xorpd %xmm3, %xmm3
cmpq %rax, %r14
je 0x1dc6a
addsd (%rdi,%rax,8), %xmm1
addsd (%rbx,%rax,8), %xmm3
incq %rax
jmp 0x1dc56
cvtsi2sd %edx, %xmm0
divsd %xmm0, %xmm1
divsd %xmm0, %xmm3
xorpd %xmm4, %xmm4
xorl %eax, %eax
cmpq %rax, %r14
je 0x1dca0
movsd (%rdi,%rax,8), %xmm0
subsd %xmm1, %xmm0
movsd (%rbx,%rax,8), %xmm2
subsd %xmm3, %xmm2
mulsd %xmm0, %xmm2
addsd %xmm2, %xmm4
incq %rax
jmp 0x1dc7c
xorpd %xmm0, %xmm0
xorl %eax, %eax
cmpq %rax, %r14
je 0x1dcc1
movsd (%rdi,%rax,8), %xmm2
subsd %xmm1, %xmm2
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm0
incq %rax
jmp 0x1dca6
movsd %xmm4, 0x8(%rsp)
movsd 0x6389(%rip), %xmm1     # 0x24058
movsd %xmm3, 0x10(%rsp)
callq 0x22c0
movsd 0x10(%rsp), %xmm2
movsd %xmm0, (%rsp)
xorpd %xmm0, %xmm0
xorl %eax, %eax
cmpq %rax, %r14
je 0x1dd06
movsd (%rbx,%rax,8), %xmm1
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
jmp 0x1dceb
movsd 0x634a(%rip), %xmm1     # 0x24058
callq 0x22c0
movsd (%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
divsd %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_combinatorics.cpp
// Function: factorial(int)
double factorial(int n)
{
	double cur_fact = 1.0;
	for(int i = 1; i <= n; i++)
	{
		cur_fact *= i;
	} 

	return(cur_fact);
}

// Assembly:
xorl %eax, %eax
testl %edi, %edi
cmovgl %edi, %eax
movsd 0x62c9(%rip), %xmm1     # 0x24008
movapd %xmm1, %xmm0
movapd %xmm1, %xmm2
subl $0x1, %eax
jb 0x1dd56
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm2
jmp 0x1dd47
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_combinatorics.cpp
// Function: is_gt(std::vector<int, std::allocator<int>>*, std::vector<int, std::allocator<int>>*)
bool is_gt(vector<int>* combinatorial_indices1, vector<int>* combinatorial_indices2)
{
	for(int i = 0; i < (int)combinatorial_indices1->size(); i++)
	{
		if(combinatorial_indices1->at(i) > combinatorial_indices2->at(i))
		{
			return(true);
		}
		else if(combinatorial_indices1->at(i) == combinatorial_indices2->at(i))
		{
			
		}
	} // i loop.

	return(false);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
xorl %r14d, %r14d
movq 0x8(%r15), %rax
subq (%r15), %rax
shrq $0x2, %rax
movslq %eax, %r12
cmpq %r12, %r14
jge 0x1ddb2
movq %r15, %rdi
movq %r14, %rsi
callq 0x7364
movl (%rax), %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7364
cmpl (%rax), %ebp
jg 0x1ddb2
movq %r15, %rdi
movq %r14, %rsi
callq 0x7364
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7364
incq %r14
jmp 0x1dd68
cmpq %r12, %r14
setl %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_combinatorics.cpp
// Function: is_equal(std::vector<int, std::allocator<int>>*, std::vector<int, std::allocator<int>>*)
bool is_equal(vector<int>* combinatorial_indices1, vector<int>* combinatorial_indices2)
{
	for(int i = 0; i < (int)combinatorial_indices1->size(); i++)
	{
		if(combinatorial_indices1->at(i) != combinatorial_indices2->at(i))
		{
			return(false);
		}
	} // i loop.

	return(true);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %ecx, %ecx
movq 0x8(%r14), %rax
subq (%r14), %rax
movq %rcx, %r15
shrq $0x2, %rax
movslq %eax, %r12
cmpq %r12, %rcx
jge 0x1de07
movq %r14, %rdi
movq %r15, %rsi
callq 0x7364
movl (%rax), %ebp
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7364
leaq 0x1(%r15), %rcx
cmpl (%rax), %ebp
je 0x1ddd1
cmpq %r12, %r15
setge %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_combinatorics.cpp
// Function: is_valid_indexing(std::vector<int, std::allocator<int>>*)
bool is_valid_indexing(vector<int>* sorted_combinatorial_indices)
{
	for(int i = 0; i < (int)sorted_combinatorial_indices->size()-1; i++)
	{
		if(sorted_combinatorial_indices->at(i) == sorted_combinatorial_indices->at(i+1))
		{
			return(false);
		}
	} // i loop.

	return(true);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
movabsq $-0x100000000, %r12     # imm = 0xFFFFFFFF00000000
movq %r15, %r14
movq 0x8(%rbx), %r13
subq (%rbx), %r13
shlq $0x1e, %r13
addq %r12, %r13
sarq $0x20, %r13
cmpq %r13, %r15
jge 0x1de6b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7364
movl (%rax), %ebp
leaq 0x1(%r14), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7364
cmpl (%rax), %ebp
jne 0x1de31
cmpq %r13, %r14
setge %al
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_combinatorics.cpp
// Function: get_next_counting_indices(std::vector<int, std::allocator<int>>*, std::vector<int, std::allocator<int>>*)
bool get_next_counting_indices(vector<int>* counting_indices, 
								vector<int>* n_all_elements_per_digit)
{
	bool updated_comb_indices = false;
	for(int i = (int)counting_indices->size()-1; i >= 0; i--)
	{
		if(counting_indices->at(i)+1 < n_all_elements_per_digit->at(i))
		{
			counting_indices->at(i) = counting_indices->at(i)+1;
			updated_comb_indices = true;
			break;
		}
		else
		{
			counting_indices->at(i) = 0;
		}
	} // i loop.

	// No more updates available.
	if(!updated_comb_indices)
	{
		return(false);
	}
	else
	{
		return(true);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rax
subq (%rdi), %rax
shrq $0x2, %rax
movl %eax, %r12d
testl %r12d, %r12d
jle 0x1df5c
leaq -0x1(%r12), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7364
movl (%rax), %ebp
incl %ebp
movq %r14, %rdi
movq %r15, %rsi
callq 0x7364
movl (%rax), %r13d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7364
cmpl %r13d, %ebp
jl 0x1df48
andl $0x0, (%rax)
movq %r15, %r12
jmp 0x1df09
movl (%rax), %ebp
incl %ebp
movq %r12, %rsi
decq %rsi
movq %rbx, %rdi
callq 0x7364
movl %ebp, (%rax)
testl %r12d, %r12d
setg %al
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_combinatorics.cpp
// Function: dump_binomial_p_vals(int, double*)
void dump_binomial_p_vals(int max_grand_total, double* log_factorials)
{
	for(int cur_grand_total = 0; cur_grand_total <= max_grand_total; cur_grand_total++)
	{
		char cur_p_vals_fp[1000];
		sprintf(cur_p_vals_fp, "p_vals_%d.txt", cur_grand_total);
		FILE* f_cur_p_vals = fopen(cur_p_vals_fp, "w");

		double log_flip = log(.5);
		double cur_p_val = xlog(0.0);
		for(int cur_sig = 0; cur_sig <= cur_grand_total; cur_sig++)
		{
			double log_cur_half_pow = log_flip * cur_grand_total;
			double log_cur_perm = 0.0; // = xlog(1.0).

			// Compute the current permutation.
			log_cur_perm = xlog_div(log_factorials[cur_grand_total], xlog_mul(log_factorials[cur_sig], log_factorials[cur_grand_total-cur_sig]));
			cur_p_val = xlog_sum(cur_p_val, xlog_mul(log_cur_perm, log_cur_half_pow));

			// Also get the normal approximation.


			fprintf(f_cur_p_vals, "%d\t%lf\n", cur_sig, cur_p_val);
		} // i loop.

		fclose(f_cur_p_vals);
	} // grand_total
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rsi, %rbx
movslq %edi, %rax
movq %rax, 0x10(%rsp)
pushq $0x1
popq %r15
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpq 0x10(%rsp), %rbp
jg 0x1e07b
leaq 0x30(%rsp), %r14
movq %r14, %rdi
leaq 0xa4c8(%rip), %rsi      # 0x28478
movl %ebp, %edx
xorl %eax, %eax
callq 0x2080
movq %r14, %rdi
leaq 0x6ae5(%rip), %rsi      # 0x24aa8
callq 0x21b0
movq %rax, %r14
xorps %xmm0, %xmm0
callq 0x1f860
cvtsi2sd %ebp, %xmm1
movsd %xmm0, 0x8(%rsp)
mulsd 0xa0fb(%rip), %xmm1     # 0x280e0
movsd %xmm1, 0x20(%rsp)
movq %r13, 0x18(%rsp)
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x1e05f
movsd (%rbx,%rbp,8), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd (%rbx,%r12,8), %xmm0
movsd (%rbx,%r13), %xmm1
callq 0x1f994
movaps %xmm0, %xmm1
movsd 0x28(%rsp), %xmm0
callq 0x1f9cf
movsd 0x20(%rsp), %xmm1
callq 0x1f994
movapd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
callq 0x1f8b2
movq %r14, %rdi
leaq 0x923f(%rip), %rsi      # 0x27285
movl %r12d, %edx
movsd %xmm0, 0x8(%rsp)
movb $0x1, %al
callq 0x2240
incq %r12
addq $-0x8, %r13
jmp 0x1dff3
movq %r14, %rdi
callq 0x2160
incq %rbp
incq %r15
movq 0x18(%rsp), %r13
addq $0x8, %r13
jmp 0x1df96
addq $0x418, %rsp            # imm = 0x418
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_combinatorics.cpp
// Function: buffer_binomial_pvalues(int, double*, int)
double** buffer_binomial_pvalues(int max_grand_total, double* log_factorials, int BINOMIAL_P_VAL_BIN_SIZE)
{
	double** binomial_vals = new double*[max_grand_total + 2];

	for(int cur_grand_total = 0; cur_grand_total <= max_grand_total; cur_grand_total++)
	{
		binomial_vals[cur_grand_total] = new double[cur_grand_total / BINOMIAL_P_VAL_BIN_SIZE + 10];

		double log_flip = log(.5);
		double cur_p_val = xlog(0.0);
		for(int cur_sig = 0; cur_sig <= cur_grand_total; cur_sig++)
		{
			double log_cur_half_pow = log_flip * cur_grand_total;
			double log_cur_perm = 0.0; // = xlog(1.0).

			// Compute the current permutation.
			log_cur_perm = xlog_div(log_factorials[cur_grand_total], xlog_mul(log_factorials[cur_sig], log_factorials[cur_grand_total-cur_sig]));
			cur_p_val = xlog_sum(cur_p_val, xlog_mul(log_cur_perm, log_cur_half_pow));

			// Add this value in case.
			if(cur_sig % BINOMIAL_P_VAL_BIN_SIZE == 0)
			{
				binomial_vals[cur_grand_total][cur_sig / BINOMIAL_P_VAL_BIN_SIZE] = cur_p_val;
			}
		} // i loop.
	} // grand_total

	return(binomial_vals);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %r12d
leal 0x2(%r12), %edi
shlq $0x3, %rdi
cmpl $-0x2, %r12d
pushq $-0x1
popq %rax
cmovlq %rax, %rdi
callq 0x2040
movq %rax, (%rsp)
movslq %r12d, %rax
movq %rax, 0x8(%rsp)
pushq $0x1
popq %r15
xorl %r13d, %r13d
xorl %r12d, %r12d
cmpq 0x8(%rsp), %r12
jg 0x1e1b0
movl %r12d, %eax
cltd
idivl %ebx
cltq
leaq 0x50(,%rax,8), %rdi
cmpl $-0xa, %eax
pushq $-0x1
popq %rax
cmovlq %rax, %rdi
callq 0x2040
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rsp)
movq %rcx, (%rax,%r12,8)
xorps %xmm0, %xmm0
callq 0x1f860
cvtsi2sd %r12d, %xmm1
mulsd 0x9fbf(%rip), %xmm1     # 0x280e0
movsd %xmm1, 0x20(%rsp)
movq %r13, 0x10(%rsp)
xorl %ebp, %ebp
cmpq %rbp, %r15
je 0x1e19c
movsd (%r14,%r12,8), %xmm1
movsd %xmm1, 0x28(%rsp)
movsd %xmm0, 0x30(%rsp)
movsd (%r14,%rbp,8), %xmm0
movsd (%r14,%r13), %xmm1
callq 0x1f994
movaps %xmm0, %xmm1
movsd 0x28(%rsp), %xmm0
callq 0x1f9cf
movsd 0x20(%rsp), %xmm1
callq 0x1f994
movapd %xmm0, %xmm1
movsd 0x30(%rsp), %xmm0
callq 0x1f8b2
movl %ebp, %eax
cltd
idivl %ebx
testl %edx, %edx
jne 0x1e193
cltq
movq 0x18(%rsp), %rcx
movsd %xmm0, (%rcx,%rax,8)
incq %rbp
addq $-0x8, %r13
jmp 0x1e12e
incq %r12
incq %r15
movq 0x10(%rsp), %r13
addq $0x8, %r13
jmp 0x1e0d2
movq (%rsp), %rax
addq $0x38, %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_combinatorics.cpp
// Function: delete_buffered_binomial_pvalues(double**, int, int)
void delete_buffered_binomial_pvalues(double** binomial_p_vals, int max_grand_total, int BINOMIAL_P_VAL_BIN_SIZE)
{
	for(int cur_grand_total = 0; cur_grand_total <= max_grand_total; cur_grand_total++)
	{
		//binomial_p_vals[cur_grand_total] = new double[cur_grand_total / BINOMIAL_P_VAL_BIN_SIZE + 10];
		delete [] binomial_p_vals[cur_grand_total];
	} // cur_grand_total loop.

	delete [] binomial_p_vals;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq %esi, %r14
xorl %r15d, %r15d
cmpq %r14, %r15
jg 0x1e1e9
movq (%rbx,%r15,8), %rdi
testq %rdi, %rdi
je 0x1e1e4
callq 0x2210
incq %r15
jmp 0x1e1d1
testq %rbx, %rbx
je 0x1e1fb
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2210
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_combinatorics.cpp
// Function: buffer_log_factorials(int)
double* buffer_log_factorials(int n)
{
	double* factorials = new double[n+2];
	factorials[0] = xlog(1.0);
	for(int i = 1; i <= n; i++)
	{
		factorials[i] = xlog_mul(factorials[i-1], xlog(i));
	} // i loop.

	return(factorials);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %r14d
leal 0x2(%r14), %eax
shlq $0x3, %rax
cmpl $-0x2, %edi
pushq $-0x1
popq %rdi
cmovgeq %rax, %rdi
callq 0x2040
movq %rax, %rbx
movsd 0x5dd9(%rip), %xmm0     # 0x24008
callq 0x1f860
movsd %xmm0, (%rbx)
xorl %r15d, %r15d
testl %r14d, %r14d
cmovgl %r14d, %r15d
negq %r15
pushq $0x1
popq %r14
leaq (%r15,%r14), %rax
cmpq $0x1, %rax
je 0x1e284
movsd -0x8(%rbx,%r14,8), %xmm0
movsd %xmm0, 0x8(%rsp)
cvtsi2sd %r14d, %xmm0
callq 0x1f860
movapd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
callq 0x1f994
movsd %xmm0, (%rbx,%r14,8)
incq %r14
jmp 0x1e249
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_combinatorics.cpp
// Function: get_next_combination_indices(std::vector<int, std::allocator<int>>*, std::vector<int, std::allocator<int>>*, int)
bool get_next_combination_indices(vector<int>* combination_indices, 
								vector<int>* current_counting_indices,
								int n_all_elements)
{
	while(1)
	{
		// Update the last index in the sorted list.
		bool updated_comb_indices = false;
		for(int i = (int)current_counting_indices->size()-1; i >= 0; i--)
		{
			if(current_counting_indices->at(i)+1 < n_all_elements)
			{
				current_counting_indices->at(i) = current_counting_indices->at(i)+1;
				updated_comb_indices = true;
				break;
			}
			else
			{
				current_counting_indices->at(i) = 0;
			}
		} // i loop.

		// No more updates available.
		if(!updated_comb_indices)
		{
			return(false);
		}

		// Sort the current indices.
		if(is_increasing(current_counting_indices))
		{	
			break;
		}
	} // Get a new permutation.

	// Copy the indices.
	for(int i = 0; i < (int)current_counting_indices->size(); i++)
	{
		combination_indices->at(i) = current_counting_indices->at(i);
	} // i loop.

	return(true);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shrq $0x2, %rax
movl %eax, %r12d
testl %r12d, %r12d
jle 0x1e340
leaq -0x1(%r12), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7364
movl (%rax), %r13d
incl %r13d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7364
cmpl %ebp, %r13d
jl 0x1e2e9
andl $0x0, (%rax)
movq %r15, %r12
jmp 0x1e2b2
movl (%rax), %r15d
incl %r15d
movq %r12, %rsi
decq %rsi
movq %rbx, %rdi
callq 0x7364
movl %r15d, (%rax)
movq %rbx, %rdi
callq 0x1de80
testb %al, %al
je 0x1e2a4
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shrq $0x2, %rax
cltq
cmpq %rax, %r15
jge 0x1e340
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7364
movl (%rax), %ebp
movq %r14, %rdi
movq %r15, %rsi
callq 0x7364
movl %ebp, (%rax)
incq %r15
jmp 0x1e30f
testl %r12d, %r12d
setg %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_nucleotide.cpp
// Function: check_rna_pairing(char, char)
bool check_rna_pairing(char nuc1, char nuc2)
{
	if(toupper(nuc1) == 'A')
	{
		if(toupper(nuc2) == 'U' ||
			toupper(nuc2) == 'T')
		{
			return(true);
		}
	}

	if(toupper(nuc1) == 'C')
	{
		if(toupper(nuc2) == 'G')
		{
			return(true);
		}
	}

	if(toupper(nuc1) == 'G')
	{
		if(toupper(nuc2) == 'U' || 
			toupper(nuc2) == 'T' || 
			toupper(nuc2) == 'C')
		{
			return(true);
		}
	}

	if(toupper(nuc1) == 'T')
	{
		if(toupper(nuc2) == 'A' ||
			toupper(nuc2) == 'G')
		{
			return(true);
		}
	}

	if(toupper(nuc1) == 'U')
	{
		if(toupper(nuc2) == 'A' ||
			toupper(nuc2) == 'G')
		{
			return(true);
		}
	}

	return(false);
}

// Assembly:
pushq %rbx
movl %esi, %ebx
callq 0x2320
cmpl $0x55, %eax
je 0x1e3bd
cmpl $0x43, %eax
je 0x1e3d5
cmpl $0x47, %eax
je 0x1e3e8
cmpl $0x54, %eax
je 0x1e3bd
cmpl $0x41, %eax
jne 0x1e403
movsbl %bl, %edi
callq 0x2320
movl %eax, %ecx
andl $-0x2, %ecx
movb $0x1, %al
cmpl $0x54, %ecx
jne 0x1e403
jmp 0x1e405
movsbl %bl, %edi
callq 0x2320
cmpl $0x41, %eax
sete %cl
cmpl $0x47, %eax
sete %al
orb %cl, %al
jmp 0x1e405
movsbl %bl, %edi
callq 0x2320
movl %eax, %ecx
movb $0x1, %al
cmpl $0x47, %ecx
jne 0x1e403
jmp 0x1e405
movsbl %bl, %edi
callq 0x2320
movl %eax, %ecx
addl $-0x43, %ecx
cmpl $0x13, %ecx
jae 0x1e403
movl $0x60001, %eax          # imm = 0x60001
shrl %cl, %eax
jmp 0x1e405
xorl %eax, %eax
andb $0x1, %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_xlog_math.cpp
// Function: xlog_sum(double, double)
double xlog_sum(double log1, double log2)
{
	//n_sums++;
	//return(log1 + log2);

	if(log1 == xlog(0.0))
	{
		return(log2);
	}
	else if(log2 == xlog(0.0))
	{
		return(log1);
	}
	else
	{
		if(log1 > log2)
		{
			return( log1 + xlog(1 + xexp(log2-log1)) );
		}
		else
		{
			return( log2 + xlog(1 + xexp(log1-log2)) );
		}

		//return(xlog((log1) + (log2)));
	}
}

// Assembly:
ucomisd 0x8d6e(%rip), %xmm0     # 0x28628
jne 0x1f8be
jnp 0x1f922
ucomisd 0x8d62(%rip), %xmm1     # 0x28628
jne 0x1f8d0
jp 0x1f8d0
movapd %xmm0, %xmm1
jmp 0x1f922
pushq %rax
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
movapd %xmm1, %xmm3
subsd %xmm0, %xmm3
movapd %xmm0, %xmm4
movapd %xmm1, %xmm0
cmpltsd %xmm4, %xmm0
andpd %xmm0, %xmm3
andnpd %xmm2, %xmm0
orpd %xmm3, %xmm0
maxsd %xmm1, %xmm4
movsd %xmm4, (%rsp)
callq 0x1f894
addsd 0x46f8(%rip), %xmm0     # 0x24008
callq 0x1f860
movapd %xmm0, %xmm1
addsd (%rsp), %xmm1
addq $0x8, %rsp
movapd %xmm1, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_xlog_math.cpp
// Function: get_xlog_comp_prec()
double get_xlog_comp_prec()
{
	double log_prec = xlog(1.0f);
	double log_one = xlog(1.0f);
	while(1)
	{
		if(xlog_comp(log_one, xlog_sum(log_one, log_prec)))
		{
			printf("%lf = %lf + %G\n", log_one, log_one, log_prec);
			break;
		}

		log_prec = xlog_div(log_prec, xlog(2.0f));
	}

	return(log_prec);
}

// Assembly:
subq $0x18, %rsp
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
movapd %xmm1, (%rsp)
callq 0x1f8b2
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jne 0x1fb50
jnp 0x1fba0
movapd %xmm0, %xmm1
addsd 0x8ad4(%rip), %xmm1     # 0x28630
ucomisd %xmm2, %xmm1
addsd 0x8ad0(%rip), %xmm0     # 0x28638
jb 0x1fb70
ucomisd %xmm0, %xmm2
jae 0x1fba0
movapd (%rsp), %xmm1
movapd %xmm1, %xmm0
addsd 0x855f(%rip), %xmm0     # 0x280e0
movsd 0x8a9f(%rip), %xmm3     # 0x28628
cmpeqsd %xmm3, %xmm1
movapd %xmm1, %xmm2
andpd %xmm3, %xmm2
andnpd %xmm0, %xmm1
orpd %xmm2, %xmm1
jmp 0x1fb36
leaq 0x8b31(%rip), %rdi      # 0x286d8
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
movaps (%rsp), %xmm2
movb $0x3, %al
callq 0x2050
movaps (%rsp), %xmm0
addq $0x18, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: get_file_extension(char*)
char* get_file_extension(char* fp)
{
	t_string_tokens* tokens = t_string::tokenize_by_chars(fp, "/\\.");
	if(tokens->size() > 0)
	{
		char* fn = t_string::copy_me_str(tokens->back()->str());
		t_string::clean_tokens(tokens);
		return(fn);
	}
	else
	{
		return(NULL);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x8b19(%rip), %rsi      # 0x286e8
callq 0x21fea
movq %rax, %rbx
movq 0x8(%rax), %rax
cmpq (%rbx), %rax
je 0x1fc01
movq -0x8(%rax), %rdi
callq 0x211ec
movq %rax, %rdi
callq 0x21062
movq %rax, %r14
movq %rbx, %rdi
callq 0x22256
movq %r14, %rax
jmp 0x1fc03
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: get_file_name(char*)
char* get_file_name(char* fp)
{
	t_string_tokens* tokens = t_string::tokenize_by_chars(fp, "/\\");
	if(tokens->size() > 0)
	{
		char* fn = t_string::copy_me_str(tokens->back()->str());
		t_string::clean_tokens(tokens);
		return(fn);
	}
	else
	{
		return(NULL);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x8ad6(%rip), %rsi      # 0x286ec
callq 0x21fea
movq %rax, %rbx
movq 0x8(%rax), %rax
cmpq (%rbx), %rax
je 0x1fc48
movq -0x8(%rax), %rdi
callq 0x211ec
movq %rax, %rdi
callq 0x21062
movq %rax, %r14
movq %rbx, %rdi
callq 0x22256
movq %r14, %rax
jmp 0x1fc4a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: get_directory_per_fp(char*)
char* get_directory_per_fp(char* fp)
{
	t_string_tokens* fp_tokens = t_string::tokenize_by_chars(fp, "\\/");

	if(fp_tokens->size() == 1)
	{
		t_string::clean_tokens(fp_tokens);
		return(NULL);
	}
	else
	{
		char* directory = new char[t_string::string_length(fp) + 2];
		directory[0] = 0;

		for(int i = 0; i < (int)fp_tokens->size() - 1; i++)
		{
			strcat(directory, fp_tokens->at(i)->str());
		} // i loop.

		t_string::clean_tokens(fp_tokens);

		return(directory);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x8a8b(%rip), %rsi      # 0x286ef
callq 0x21fea
movq %rax, %rbx
movq 0x8(%rax), %rax
subq (%rbx), %rax
cmpq $0x8, %rax
jne 0x1fc93
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x22256
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x20d90
addl $0x2, %eax
movslq %eax, %rdi
callq 0x2040
movq %rax, %r14
movb $0x0, (%rax)
xorl %r15d, %r15d
movabsq $-0x100000000, %r12     # imm = 0xFFFFFFFF00000000
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shlq $0x1d, %rax
addq %r12, %rax
sarq $0x20, %rax
cmpq %rax, %r15
jge 0x1fc7c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x205dc
movq (%rax), %rdi
callq 0x211ec
movq %r14, %rdi
movq %rax, %rsi
callq 0x22e0
incq %r15
jmp 0x1fcb9
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: load_directory_files(char*, char*)
vector<char*>* load_directory_files(char* root_dir, char* extension)
{
        char ls_cmd[1000];

		if(extension != NULL)
		{
			sprintf(ls_cmd, "ls -d %s/*.%s | xargs -Ifiles basename files > cmd_op.txt", root_dir, extension);
			system(ls_cmd);
		}
		else
		{
			sprintf(ls_cmd, "ls -d %s/* | xargs -Ifiles basename files > cmd_op.txt", root_dir);
			system(ls_cmd);
		}

        vector<char*>* dir_files = new vector<char*>();

        FILE* f_cmd_op = fopen("cmd_op.txt", "r");
        char current_fn[1000];
        while(fscanf(f_cmd_op, "%s", current_fn) == 1)
        {
                char* new_fn = new char[t_string::string_length(current_fn) + 3];
                strcpy(new_fn, current_fn);
                dir_files->push_back(new_fn);
        }
        fclose(f_cmd_op);

		// Erase the file.
        sprintf(ls_cmd, "rm -f cmd_op.txt");
        system(ls_cmd);

        return(dir_files);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7f0, %rsp            # imm = 0x7F0
movq %rdi, %rdx
testq %rsi, %rsi
je 0x1fd23
movq %rsi, %rcx
leaq 0x89dd(%rip), %rsi      # 0x286f2
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x2080
jmp 0x1fd36
leaq 0x8a02(%rip), %rsi      # 0x2872c
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x2080
leaq 0x10(%rsp), %rdi
callq 0x2130
pushq $0x18
popq %rdi
callq 0x2170
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0x89fb(%rip), %rdi      # 0x28758
leaq 0x6fa4(%rip), %rsi      # 0x26d08
callq 0x21b0
movq %rax, %r14
leaq 0x77cb(%rip), %r15      # 0x2753e
leaq 0x400(%rsp), %r12
leaq 0x8(%rsp), %r13
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2310
cmpl $0x1, %eax
jne 0x1fdc5
movq %r12, %rdi
callq 0x20d90
addl $0x3, %eax
movslq %eax, %rdi
callq 0x2040
movq %rax, 0x8(%rsp)
movq %rax, %rdi
movq %r12, %rsi
callq 0x2140
movq %rbx, %rdi
movq %r13, %rsi
callq 0xecb8
jmp 0x1fd80
movq %r14, %rdi
callq 0x2160
movups 0x898f(%rip), %xmm0     # 0x28763
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movb $0x0, 0x10(%rdi)
callq 0x2130
movq %rbx, %rax
addq $0x7f0, %rsp            # imm = 0x7F0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: get_file_size(char*)
long int get_file_size(char* fp)
{
	FILE* f = NULL;

	// If the file is "stdin", load the standard input.
	if(strcmp(fp, "stdin") == 0)
	{
		fprintf(stderr, "Cannot buffer stdin.\n");
		return(-1);
	}
	else
	{
		// Open the file if it is not the stdin.
		f = fopen(fp, "rb");
		if (f == NULL) 
		{ 
			fprintf(stderr, "Could not open %s\n", fp);
			return(-1);
		} 
	}

	fseek(f, 0, SEEK_END);
	long int file_size = ftell(f);
	fprintf(stderr, "Loading %s of %ld bytes.\n", fp, file_size);

	return(file_size);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x74f6(%rip), %rsi      # 0x272fd
callq 0x2230
testl %eax, %eax
jne 0x1fe2e
movq 0x151c9(%rip), %rax     # 0x34fe0
movq (%rax), %rcx
leaq 0x8953(%rip), %rdi      # 0x28774
pushq $0x15
popq %rsi
pushq $0x1
popq %rdx
callq 0x2330
jmp 0x1fe5d
leaq 0x80fb(%rip), %rsi      # 0x27f30
movq %rbx, %rdi
callq 0x21b0
testq %rax, %rax
jne 0x1fe63
movq 0x15197(%rip), %rax     # 0x34fe0
movq (%rax), %rdi
leaq 0x752e(%rip), %rsi      # 0x27381
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2240
pushq $-0x1
popq %r14
jmp 0x1fe9c
movq %rax, %r14
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2190
movq %r14, %rdi
callq 0x2030
movq %rax, %r14
movq 0x1515b(%rip), %rax     # 0x34fe0
movq (%rax), %rdi
leaq 0x88fb(%rip), %rsi      # 0x2878a
movq %rbx, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x2240
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: load_file(char*)
t_file_buffer* load_file(char* fp)
{
	FILE* f = NULL;

	// If the file is "stdin", load the standard input.
	if(strcmp(fp, "stdin") == 0)
	{
		fprintf(stderr, "Cannot buffer stdin.\n");
		return(NULL);
	}
	else
	{
		// Open the file if it is not the stdin.
		f = fopen(fp, "rb");
		if (f == NULL) 
		{ 
			fprintf(stderr, "Could not open %s\n", fp);
			return(NULL);
		} 
	}

	fseek(f, 0, SEEK_END);
	long int file_size = ftell(f);
if(__DUMP_UTIL_MESSAGES__)
{
	fprintf(stderr, "Loading %s of %ld bytes.\n", fp, file_size);
}

	fseek(f, 0, SEEK_SET);
	char* file_buff = new char[file_size + 1];

if(__DUMP_UTIL_MESSAGES__)
{
	fprintf(stderr, "Allocated buffer memory.\n");
}

	if (file_size != (long int)fread(file_buff, sizeof(char), file_size, f)) 
	{ 
		delete [] file_buff;
		return NULL;
	}

if(__DUMP_UTIL_MESSAGES__)
{
	fprintf(stderr, "Read successfully.\n");
}

	fclose(f);
	file_buff[file_size] = 0;

	t_file_buffer* file_buffer = new t_file_buffer();
	file_buffer->file_buffer = file_buff;
	file_buffer->f_ptr = 0;
	file_buffer->l_file = file_size;

	return file_buffer;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
leaq 0x7447(%rip), %rsi      # 0x272fd
callq 0x2230
testl %eax, %eax
je 0x1ff84
leaq 0x8066(%rip), %rsi      # 0x27f30
movq %r15, %rdi
callq 0x21b0
testq %rax, %rax
je 0x1ffa2
movq %rax, %rbx
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2190
movq %rbx, %rdi
callq 0x2030
movq %rax, %r14
cmpb $0x1, 0x152cf(%rip)     # 0x351cc
je 0x1ffc1
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2190
leaq 0x1(%r14), %rdi
callq 0x2040
movq %rax, %r15
cmpb $0x1, 0x152aa(%rip)     # 0x351cc
je 0x1ffe4
pushq $0x1
popq %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x2250
cmpq %rax, %r14
jne 0x1ff71
cmpb $0x1, 0x15287(%rip)     # 0x351cc
je 0x20005
movq %rbx, %rdi
callq 0x2160
movb $0x0, (%r15,%r14)
pushq $0x18
popq %rdi
callq 0x2170
movq %rax, %rbx
movq %r15, (%rax)
andq $0x0, 0x8(%rax)
movq %r14, 0x10(%rax)
jmp 0x1ff7b
movq %r15, %rdi
callq 0x2210
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0x15055(%rip), %rax     # 0x34fe0
movq (%rax), %rcx
leaq 0x87df(%rip), %rdi      # 0x28774
pushq $0x15
popq %rsi
pushq $0x1
popq %rdx
callq 0x2330
jmp 0x1ff79
movq 0x15037(%rip), %rax     # 0x34fe0
movq (%rax), %rdi
leaq 0x73ce(%rip), %rsi      # 0x27381
xorl %ebx, %ebx
movq %r15, %rdx
xorl %eax, %eax
callq 0x2240
jmp 0x1ff7b
movq 0x15018(%rip), %rax     # 0x34fe0
movq (%rax), %rdi
leaq 0x87b8(%rip), %rsi      # 0x2878a
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x2240
jmp 0x1ff03
movq 0x14ff5(%rip), %rax     # 0x34fe0
movq (%rax), %rcx
leaq 0x87af(%rip), %rdi      # 0x287a4
pushq $0x19
popq %rsi
pushq $0x1
popq %rdx
callq 0x2330
jmp 0x1ff28
movq 0x14fd4(%rip), %rax     # 0x34fe0
movq (%rax), %rcx
leaq 0x87a8(%rip), %rdi      # 0x287be
pushq $0x13
popq %rsi
pushq $0x1
popq %rdx
callq 0x2330
jmp 0x1ff4b
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: get_next_string(_IO_FILE*, char*, int)
int get_next_string(FILE* file, char* buff, int buff_size)
{
	memset(buff, 0, buff_size);

	int i_s = 0;
	int ret = 0;
	ret = getc(file);
	while(ret != ' ' && ret != EOF && ret != '\n' && ret != '\t')
	{		
		buff[i_s] = ret;
		i_s++;
		ret = getc(file);
	} // file reading loop.

	return(ret);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movslq %edx, %rdx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x20f0
movabsq $0x200000c01, %r15      # imm = 0x200000C01
movq %r14, %rdi
callq 0x20a0
movl %eax, %ecx
incl %ecx
cmpl $0x21, %ecx
ja 0x2007c
btq %rcx, %r15
jb 0x20083
movb %al, (%rbx)
incq %rbx
jmp 0x20065
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: buffer_file(char*)
vector<char*>* buffer_file(char* fp)
{
	vector<char*>* file_lines = new vector<char*>();
	//printf("Buffering %s.\n", fp);

	int n_lines = 0;
	FILE* f = NULL;

	if(strcmp(fp, "stdin") == 0)
	{
		f = stdin;	
	}
	else
	{
		f = fopen(fp, "r");
	}

	if(f == NULL)
	{
		//fprintf(stderr, "Could not open %s\n", fp);
		return(NULL);
	}
	while(1)
	{
		char* new_line = getline(f);
		if(new_line == NULL)
		{
			break;
		}
		file_lines->push_back(new_line);

		n_lines++;

if(__DUMP_UTIL_MESSAGES__)
{
		if((n_lines % 10000) == 0)
		{
			printf("Loaded %d lines.               \r", n_lines);
		}
}
	} // file buffering loop.

if(__DUMP_UTIL_MESSAGES__)
{
	fprintf(stderr, "\n");
}

	fclose(f);

	return(file_lines);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x18
popq %rdi
callq 0x2170
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0x7249(%rip), %rsi      # 0x272fd
movq %r14, %rdi
callq 0x2230
testl %eax, %eax
je 0x200d4
leaq 0x6c41(%rip), %rsi      # 0x26d08
movq %r14, %rdi
callq 0x21b0
movq %rax, %r14
jmp 0x200de
movq 0x14efd(%rip), %rax     # 0x34fd8
movq (%rax), %r14
testq %r14, %r14
je 0x2016b
pushq $-0x1
popq %r12
pushq $0x1
popq %rbp
movl $0x2710, %r15d          # imm = 0x2710
movl %ebp, %eax
xorl %edx, %edx
divl %r15d
movl %eax, %r13d
movq %r14, %rdi
callq 0x2017f
movq %rax, (%rsp)
testq %rax, %rax
je 0x20146
movq %rbx, %rdi
movq %rsp, %rsi
callq 0xecb8
cmpb $0x1, 0x150ab(%rip)     # 0x351cc
jne 0x2013f
imull $0x2710, %r13d, %eax    # imm = 0x2710
addl %r12d, %eax
jne 0x2013f
leaq 0x869c(%rip), %rdi      # 0x287d2
movl %ebp, %esi
xorl %eax, %eax
callq 0x2050
decl %r12d
incl %ebp
jmp 0x200f4
cmpb $0x1, 0x1507f(%rip)     # 0x351cc
jne 0x20161
movq 0x14e8a(%rip), %rax     # 0x34fe0
movq (%rax), %rsi
pushq $0xa
popq %rdi
callq 0x2200
movq %r14, %rdi
callq 0x2160
jmp 0x2016d
xorl %ebx, %ebx
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_utils.cpp
// Function: getline(_IO_FILE*)
char* getline(FILE* file)
{
	vector<char>* line_vec = new vector<char>();

	char ret = 0;
	while(1)
	{
		ret = getc(file);

		if(ret == EOF)
		{
			break;
		}
		else if(ret == '\n')
		{
			break;
		}

		// Add this character to the vector of characters.
		line_vec->push_back(ret);
	} // file reading loop.

	// If the end-of-file is encountered and there was nothing read, return NULL to indicate the there is nothing left to read and EOF is reached.
	if(ret == EOF && 
		line_vec->size() == 0)
	{
		delete(line_vec);
		return(NULL);
	}

	char* buff = new char[line_vec->size() + 2];
	memset(buff, 0, sizeof(char) * (line_vec->size() + 2));

	// Copy the vector to buffer.
	for(int i = 0; i < (int)line_vec->size(); i++)
	{
		buff[i] = line_vec->at(i);
	} // i loop.

	delete(line_vec);

	return(buff);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
pushq $0x18
popq %rdi
callq 0x2170
movq %rax, %rbx
andq $0x0, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0xf(%rsp), %r15
movb $0x0, (%r15)
movq %r14, %rdi
callq 0x20a0
movb %al, 0xf(%rsp)
cmpb $0xa, %al
je 0x20208
movzbl %al, %eax
cmpl $0xff, %eax
je 0x201d5
movq %rbx, %rdi
movq %r15, %rsi
callq 0x205fe
jmp 0x201ae
movq (%rbx), %r13
movq 0x8(%rbx), %r12
cmpq %r13, %r12
jne 0x2020f
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x2078a
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0x2180
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq (%rbx), %r13
movq 0x8(%rbx), %r12
subq %r13, %r12
addq $0x2, %r12
movq %r12, %rdi
callq 0x2040
movq %rax, %r14
xorl %r15d, %r15d
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x20f0
movl 0x8(%rbx), %eax
subl %r13d, %eax
cltq
cmpq %rax, %r15
jge 0x201e4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20618
movb (%rax), %al
movb %al, (%r14,%r15)
incq %r15
movq (%rbx), %r13
jmp 0x20231
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: check_file(char*)
bool check_file(char* fp)
{
	FILE* f_temp = fopen(fp, "r");
	if(f_temp == NULL)
	{		
		return(false);
	}

	fclose(f_temp);
	return(true);
}

// Assembly:
pushq %rbx
leaq 0x6aa9(%rip), %rsi      # 0x26d08
callq 0x21b0
movq %rax, %rbx
testq %rax, %rax
je 0x20274
movq %rbx, %rdi
callq 0x2160
testq %rbx, %rbx
setne %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: open_f(char const*, char const*)
FILE* open_f(const char* fp, const char* mode)
{
	if(fp == NULL || mode == NULL)
	{
		printf("Invalid arguments to open_f for %s.\n", fp);
		exit(0);
	}

	FILE* f = fopen(fp, mode);

	if(f == NULL)
	{
		if(mode[0] == 'r')
		{
			printf("Could not open %s for reading.\n", fp);
			exit(0);
		}
		else if(mode[0] == 'w')
		{
			printf("Could not open %s for writing.\n", fp);
			exit(0);
		}
		else
		{
			printf("Could not open %s for requested operation.\n", fp);
			exit(0);
		}
	}

	return(f);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x202a8
movq %rsi, %r14
testq %rsi, %rsi
je 0x202a8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21b0
testq %rax, %rax
je 0x202b1
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x8544(%rip), %rdi      # 0x287f3
jmp 0x202d8
movzbl (%r14), %eax
cmpl $0x77, %eax
je 0x202c8
cmpl $0x72, %eax
jne 0x202d1
leaq 0x8552(%rip), %rdi      # 0x28818
jmp 0x202d8
leaq 0x8569(%rip), %rdi      # 0x28838
jmp 0x202d8
leaq 0x8580(%rip), %rdi      # 0x28858
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2050
xorl %edi, %edi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: get_n_non_empty_lines(char*)
int get_n_non_empty_lines(char* fp)
{
	int n_lines = 0;
	FILE* f = open_f(fp, "r");
	while(1)
	{
		char* cur_line = getline(f);
		if(cur_line == NULL)
		{
			break;
		}

		if(!line_empty(cur_line))
		{
			n_lines++;
		}

		delete [] cur_line;
	}
	fclose(f);

	return(n_lines);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x6a13(%rip), %rsi      # 0x26d08
callq 0x2027c
movq %rax, %r14
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x2017f
testq %rax, %rax
je 0x20328
movq %rax, %r15
movq %rax, %rdi
callq 0x20338
xorb $0x1, %al
movzbl %al, %eax
addl %eax, %ebx
movq %r15, %rdi
callq 0x2210
jmp 0x202ff
movq %r14, %rdi
callq 0x2160
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: line_empty(char*)
bool line_empty(char* line)
{
	int l = t_string::string_length(line);
	for(int i = 0; i < l; i++)
	{
		if(line[i] != ' ' &&
			line[i] != '\t' &&
			line[i] != '\n')
		{
			return(false);
		}
	}

	return(true);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x20d90
xorl %ecx, %ecx
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
movabsq $0x100000600, %rsi      # imm = 0x100000600
cmpq %rcx, %rdx
je 0x20371
movzbl (%rbx,%rcx), %edi
cmpq $0x20, %rdi
ja 0x20371
btq %rdi, %rsi
jae 0x20371
incq %rcx
jmp 0x20357
cltq
cmpq %rax, %rcx
setge %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: subsample_file_lines_no_buffer(char*, int)
void subsample_file_lines_no_buffer(char* fp, int n_lines_to_subsample)
{
	fprintf(stderr, "Counting the number of lines.\n");
	int n_lines = get_n_non_empty_lines(fp);
	fprintf(stderr, "%d lines in the file, subsampling %d lines.\n", n_lines, n_lines_to_subsample);

	//double p_select = (double)n_lines_to_subsample/n_lines;

	int n_sampled_lines = 0;
	//t_rng* rng = new t_rng(t_seed_manager::seed_me());

	// Open the file.
	FILE* f_sub = open_f("subsampled.txt", "w");
	FILE* f = open_f(fp, "r");

	// Loop to sample required number of lines.
	while(n_sampled_lines != n_lines_to_subsample)
	{
		fseek(f, 0, SEEK_SET);

		while(1)
		{
			char* cur_line = getline(f);
			if(cur_line == NULL)
			{
				break;
			}
			
			// Make sure that the line is not empty.
			if(!line_empty(cur_line))
			{
				fprintf(f_sub, "%s\n", cur_line);

				n_sampled_lines++;

				if(n_sampled_lines % 10000 == 0)
				{
					fprintf(stderr, "Sampled %d. line.         \r", n_sampled_lines);
				}
			}

			delete [] cur_line;
		} // file reading loop.
	} // sampling loop.

	fclose(f);
	fclose(f_sub);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r15
movq 0x14c4e(%rip), %r14     # 0x34fe0
movq (%r14), %rcx
leaq 0x84e8(%rip), %rdi      # 0x28884
pushq $0x1e
popq %rsi
pushq $0x1
popq %rdx
callq 0x2330
movq %r15, %rdi
callq 0x202e9
movq (%r14), %rdi
leaq 0x84ea(%rip), %rsi      # 0x288a3
movl %eax, %edx
movl %ebx, 0x4(%rsp)
movl %ebx, %ecx
xorl %eax, %eax
callq 0x2240
leaq 0x8501(%rip), %rdi      # 0x288d0
leaq 0x46d2(%rip), %rsi      # 0x24aa8
callq 0x2027c
movq %rax, %r14
leaq 0x6923(%rip), %rsi      # 0x26d08
movq %r15, %rdi
callq 0x2027c
movq %rax, %r15
leaq 0x75c6(%rip), %r12      # 0x279bd
movl $0x2710, %ebx           # imm = 0x2710
xorl %ebp, %ebp
cmpl 0x4(%rsp), %ebp
je 0x2046d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2190
movq %r15, %rdi
callq 0x2017f
testq %rax, %rax
je 0x203fe
movq %rax, %r13
movq %rax, %rdi
callq 0x20338
testb %al, %al
jne 0x20447
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x2240
incl %ebp
movl %ebp, %eax
cltd
idivl %ebx
testl %edx, %edx
je 0x20451
movq %r13, %rdi
callq 0x2210
jmp 0x20410
movq 0x14b88(%rip), %rax     # 0x34fe0
movq (%rax), %rdi
leaq 0x847d(%rip), %rsi      # 0x288df
movl %ebp, %edx
xorl %eax, %eax
callq 0x2240
jmp 0x20447
movq %r15, %rdi
callq 0x2160
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2160
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: get_next_char_per_file_buffer(t_file_buffer*, char&)
bool get_next_char_per_file_buffer(t_file_buffer* file_buffer, char& char_val)
{
	if(file_buffer->f_ptr < file_buffer->l_file)
	{
		char_val = file_buffer->file_buffer[file_buffer->f_ptr];
		file_buffer->f_ptr++;
		return(true);
	}
	else
	{
		char_val = 0;
		return(false);
	}
}

// Assembly:
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
cmpq %rcx, %rax
jge 0x204a6
movq (%rdi), %rdx
movb (%rdx,%rax), %dl
movb %dl, (%rsi)
incq 0x8(%rdi)
jmp 0x204a9
movb $0x0, (%rsi)
cmpq %rcx, %rax
setl %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: get_n_lines(_IO_FILE*)
int get_n_lines(FILE* file)
{
	int n_lines = 0;

	char ret = 0;
	int n_chars_in_cur_line = 0;
	while(1)
	{
		ret = getc(file);

		if(ret == EOF)
		{
			break;
		}
		else if(ret == '\n')
		{
			if(n_chars_in_cur_line)
				n_lines++;

			n_chars_in_cur_line = 0;
		}
		else
		{
			n_chars_in_cur_line = 1;
		}
	} // file reading loop.

	return(n_lines);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %ebx, %ebx
pushq $0x1
popq %rbp
xorl %eax, %eax
movl %eax, %r15d
movq %r14, %rdi
callq 0x20a0
cmpb $-0x1, %al
je 0x204df
movzbl %al, %ecx
movl %ebp, %eax
cmpl $0xa, %ecx
jne 0x204c1
addl %r15d, %ebx
jmp 0x204bf
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_utils.cpp
// Function: get_next_token_per_file_till_newline(_IO_FILE*, char*, int, char*, bool&, bool&)
bool get_next_token_per_file_till_newline(FILE* file, char* buffer, int l_buffer, char* delim_char, bool& new_line_check, bool& eof_check)
{
	int i_buff = 0;
	char ret = 0;
	new_line_check = false;
	eof_check = false;
	while(1)
	{
		ret = getc(file);

		if(ret == EOF)
		{
			eof_check = true;
			return(false);
		}

		// If we found a new line, break. The file pointer points to the new line's beginning.
		if(ret == '\n')
		{
			new_line_check = true;
			break;
		}

		// The current character is not a new line, is it the delimiter?
		if(ret == delim_char[0])
		{
			break;
		}
		else if(i_buff < l_buffer)
		{
			// Copy the read character to the buffer, if the buffer did not overflow, otherwise does not copy but keeps reading the file till the next token is found.
			buffer[i_buff] = ret;
			i_buff++;
		}
	} // file reading loop.

	if(i_buff < l_buffer)
	{
		buffer[i_buff] = 0;
	}
	else
	{
		buffer[l_buffer-1] = 0;
	}
	
	if(i_buff == 0)
	{
		return(false);
	}
	else
	{
		return(true);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r13
xorl %r14d, %r14d
movb %r14b, (%r8)
movq %r9, (%rsp)
movb %r14b, (%r9)
movq %r13, %rdi
callq 0x20a0
movl %eax, %edx
shll $0x18, %edx
movl %r14d, %ecx
cmpl $0xa000000, %edx        # imm = 0xA000000
je 0x20556
cmpl $0xff000000, %edx       # imm = 0xFF000000
je 0x2054b
sarl $0x18, %edx
movsbl (%r12), %esi
cmpl %esi, %edx
je 0x2055a
cmpl %ebp, %r14d
jge 0x20512
movb %al, (%rbx,%rcx)
incl %r14d
jmp 0x20512
movq (%rsp), %rax
movb $0x1, (%rax)
xorl %eax, %eax
jmp 0x20575
movb $0x1, (%r15)
addq %rbx, %rcx
cmpl %ebp, %r14d
movslq %ebp, %rax
leaq -0x1(%rbx,%rax), %rax
cmovlq %rcx, %rax
movb $0x0, (%rax)
testl %r14d, %r14d
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq