LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: estwings57[P]CasHMC/sources/RunSim.cpp
// Function: MakeRandomTransaction()
void MakeRandomTransaction(void)
{
	int rand_tran = rand()%10000+1;
	if(rand_tran <= (int)(memUtil*10000)) {
		Transaction *newTran;
		uint64_t physicalAddress = rand();
		physicalAddress = (physicalAddress<<32)|rand();
		
		if(physicalAddress%101 <= (int)rwRatio) {
			newTran = new Transaction(DATA_READ, physicalAddress, TRANSACTION_SIZE, casHMCWrapper);		// Read transaction
		}
		else {
			newTran = new Transaction(DATA_WRITE, physicalAddress, TRANSACTION_SIZE, casHMCWrapper);	// Write transaction
		}
		transactionBuffers.push_back(newTran);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
callq 0x4120
movl $0x2710, %ecx           # imm = 0x2710
cltd
idivl %ecx
addl $0x1, %edx
movl %edx, -0x4(%rbp)
movl -0x4(%rbp), %eax
movsd 0xbf32(%rip), %xmm0     # 0x54308
leaq 0x1e0db(%rip), %rcx     # 0x664b8
mulsd (%rcx), %xmm0
cvttsd2si %xmm0, %ecx
cmpl %ecx, %eax
jg 0x484fa
callq 0x4120
cltq
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x20, %rax
movq %rax, -0x30(%rbp)
callq 0x4120
movl %eax, %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
orq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x65, %ecx
xorl %edx, %edx
divq %rcx
leaq 0x1e092(%rip), %rax     # 0x664c0
cvttsd2si (%rax), %eax
cltq
cmpq %rax, %rdx
ja 0x48490
movl $0x30, %edi
callq 0x4390
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdx
leaq 0x1e0e8(%rip), %rax     # 0x66540
movl (%rax), %ecx
movq 0x1f00f(%rip), %r8      # 0x67470
xorl %esi, %esi
callq 0x4a2a0
jmp 0x4846a
movq -0x38(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x484ea
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x30, %esi
callq 0x43a0
jmp 0x48500
movl $0x30, %edi
callq 0x4390
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdx
leaq 0x1e091(%rip), %rax     # 0x66540
movl (%rax), %ecx
movq 0x1efb8(%rip), %r8      # 0x67470
movl $0x1, %esi
callq 0x4a2a0
jmp 0x484c4
movq -0x40(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x484ea
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x30, %esi
callq 0x43a0
jmp 0x48500
leaq 0x1ef67(%rip), %rdi     # 0x67458
leaq -0x10(%rbp), %rsi
callq 0x1b510
addq $0x40, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x4630
nopl (%rax)
// File: estwings57[P]CasHMC/sources/TranTrace.h
// Function: CasHMC::TranTrace::TranTrace(CasHMC::TranStatistic*)
TranTrace(TranStatistic *sta):statis(sta) {
		tranTransmitTime = 0;
		tranFullLat = 0;
		linkTransmitTime = 0;
		linkFullLat = 0;
		vaultIssueTime = 0;
		vaultFullLat = 0;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, (%rax)
movl $0x0, 0x8(%rax)
movl $0x0, 0xc(%rax)
movl $0x0, 0x10(%rax)
movl $0x0, 0x14(%rax)
movl $0x0, 0x18(%rax)
movl $0x0, 0x1c(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: estwings57[P]CasHMC/sources/VaultController.cpp
// Function: CasHMC::VaultController::~VaultController()
VaultController::~VaultController()
{
	pendingReadData.clear(); 
	writeDataToSend.clear(); 
	writeDataCountdown.clear(); 

	delete commandQueue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
leaq 0x19cbd(%rip), %rax     # 0x65d48
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x238, %rdi            # imm = 0x238
callq 0x17f80
movq -0x18(%rbp), %rdi
addq $0x278, %rdi            # imm = 0x278
callq 0x22770
movq -0x18(%rbp), %rdi
addq $0x290, %rdi            # imm = 0x290
callq 0x17f80
movq -0x18(%rbp), %rax
movq 0x218(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x4c0dd
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x18(%rbp), %rdi
addq $0x290, %rdi            # imm = 0x290
callq 0x18160
movq -0x18(%rbp), %rdi
addq $0x278, %rdi            # imm = 0x278
callq 0x225f0
movq -0x18(%rbp), %rdi
addq $0x238, %rdi            # imm = 0x238
callq 0x18160
movq -0x18(%rbp), %rdi
callq 0x2a2f0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: estwings57[P]CasHMC/sources/VaultController.cpp
// Function: CasHMC::VaultController::ReverseAddressMapping(unsigned long&, unsigned int, unsigned int, unsigned int)
void VaultController::ReverseAddressMapping(uint64_t &physicalAddress, unsigned bankAdd, unsigned colAdd, unsigned rowAdd)
{
	unsigned maxBlockBit = _log2(ADDRESS_MAPPING);
	
	physicalAddress = rowAdd;
	physicalAddress <<= (_log2(NUM_COLS)-maxBlockBit);
	physicalAddress += (colAdd>>maxBlockBit);
	
	physicalAddress <<= _log2(NUM_BANKS);
	physicalAddress += bankAdd;
	
	physicalAddress <<= _log2(NUM_VAULTS);
	physicalAddress += vaultContID;
	
	physicalAddress <<= maxBlockBit;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x19853(%rip), %rax     # 0x6662c
movl (%rax), %edi
callq 0x29ce0
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
leaq 0x19832(%rip), %rax     # 0x66628
movl (%rax), %edi
callq 0x29ce0
movl %eax, %ecx
subl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movl %ecx, %ecx
shlq %cl, %rdx
movq %rdx, %rcx
movq %rcx, (%rax)
movl -0x18(%rbp), %eax
movl -0x20(%rbp), %ecx
shrl %cl, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
leaq 0x197ef(%rip), %rax     # 0x66620
movl (%rax), %edi
callq 0x29ce0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movl %ecx, %ecx
shlq %cl, %rdx
movq %rdx, %rcx
movq %rcx, (%rax)
movl -0x14(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
leaq 0x197ba(%rip), %rax     # 0x6661c
movl (%rax), %edi
callq 0x29ce0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rdx
movq %rdx, -0x28(%rbp)
movq (%rdx), %rdx
movl %ecx, %ecx
shlq %cl, %rdx
movq -0x28(%rbp), %rcx
movq %rdx, (%rcx)
movl 0x204(%rax), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movl %ecx, %ecx
shlq %cl, %rdx
movq %rdx, %rcx
movq %rcx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: estwings57[P]CasHMC/sources/VaultController.cpp
// Function: CasHMC::VaultController::EnablePowerdown()
void VaultController::EnablePowerdown()
{
	if(USE_LOW_POWER) {
		if(commandQueue->isEmpty() && !commandQueue->refreshWaiting) {
			if(dramP->powerDown()) {
				powerDown = true;
			}
		}
		else if(powerDown && dramP->bankStates[0]->nextPowerUp <= currentClockCycle) {
			dramP->powerUp();
			powerDown = false;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x16fbd(%rip), %rax     # 0x66638
testb $0x1, (%rax)
je 0x4f729
movq -0x10(%rbp), %rax
movq 0x218(%rax), %rdi
callq 0x217c0
testb $0x1, %al
jne 0x4f69a
jmp 0x4f6d1
movq -0x10(%rbp), %rax
movq 0x218(%rax), %rax
testb $0x1, 0x1d0(%rax)
jne 0x4f6d1
movq -0x10(%rbp), %rax
movq 0x210(%rax), %rdi
callq 0x2ee10
testb $0x1, %al
jne 0x4f6c4
jmp 0x4f6cf
movq -0x10(%rbp), %rax
movb $0x1, 0x20c(%rax)
jmp 0x4f727
movq -0x10(%rbp), %rax
testb $0x1, 0x20c(%rax)
je 0x4f725
movq -0x10(%rbp), %rax
movq 0x210(%rax), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
xorl %eax, %eax
movl %eax, %esi
callq 0x22c30
movq -0x10(%rbp), %rcx
movq (%rax), %rax
movq 0x30(%rax), %rax
cmpq 0x8(%rcx), %rax
ja 0x4f725
movq -0x10(%rbp), %rax
movq 0x210(%rax), %rdi
callq 0x2ef00
movq -0x10(%rbp), %rax
movb $0x0, 0x20c(%rax)
jmp 0x4f727
jmp 0x4f729
addq $0x10, %rsp
popq %rbp
retq
nop
// File: estwings57[P]CasHMC/sources/VaultController.cpp
// Function: CasHMC::VaultController::AddressMapping(unsigned long, unsigned int&, unsigned int&, unsigned int&)
void VaultController::AddressMapping(uint64_t physicalAddress, unsigned &bankAdd, unsigned &colAdd, unsigned &rowAdd)
{
	unsigned maxBlockBit = _log2(ADDRESS_MAPPING);
	physicalAddress >>= maxBlockBit/*max block bits*/ + _log2(NUM_VAULTS)/*vault address bits*/;
	
	//Extract bank address
	bankAdd = physicalAddress & (NUM_BANKS-1);
	physicalAddress >>= _log2(NUM_BANKS);
	
	//Extract column address
	colAdd = physicalAddress & ((NUM_COLS-1)>>maxBlockBit);
	colAdd <<= maxBlockBit;
	physicalAddress >>= (_log2(NUM_COLS)-maxBlockBit);
	
	//Extract row address
	rowAdd = physicalAddress & (NUM_ROWS-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
leaq 0x16ed9(%rip), %rax     # 0x6662c
movl (%rax), %edi
callq 0x29ce0
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
leaq 0x16eb2(%rip), %rax     # 0x6661c
movl (%rax), %edi
callq 0x29ce0
movl -0x30(%rbp), %ecx
addl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x16e92(%rip), %rcx     # 0x66620
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
andq %rcx, %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
leaq 0x16e78(%rip), %rax     # 0x66620
movl (%rax), %edi
callq 0x29ce0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x16e5f(%rip), %rcx     # 0x66628
movl (%rcx), %edx
subl $0x1, %edx
movl -0x2c(%rbp), %ecx
sarl %cl, %edx
movl %edx, %ecx
movslq %ecx, %rcx
andq %rcx, %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl -0x2c(%rbp), %ecx
movq -0x20(%rbp), %rax
movl (%rax), %edx
shll %cl, %edx
movl %edx, %ecx
movl %ecx, (%rax)
leaq 0x16e2f(%rip), %rax     # 0x66628
movl (%rax), %edi
callq 0x29ce0
movl %eax, %ecx
subl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x16e07(%rip), %rcx     # 0x66624
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
andq %rcx, %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_peak_calling_utils.cpp
// Function: replace_profiles_for_debug(double*, int, int, int)
double* replace_profiles_for_debug(double* signal_profile, int l_profile, int base_posn, int l_new_profile)
{
	fprintf(stderr, "Replacing signal profile with %d long profile.\n", l_new_profile);
	double* _signal_profile = new double[l_new_profile + 2];
	for(int i = base_posn; i <= base_posn + l_new_profile; i++)
	{
		_signal_profile[i-base_posn+1] = signal_profile[i];
	}

	return(_signal_profile);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
movq 0x52c34(%rip), %rax     # 0x64fe0
movq (%rax), %rdi
movl 0x14(%rsp), %edx
leaq 0x429e6(%rip), %rsi     # 0x54da0
movb $0x0, %al
callq 0x2250
movl 0x14(%rsp), %eax
addl $0x2, %eax
cltq
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2040
movq %rax, 0x8(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl 0x18(%rsp), %ecx
addl 0x14(%rsp), %ecx
cmpl %ecx, %eax
jg 0x1243c
movq 0x20(%rsp), %rax
movslq 0x4(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x8(%rsp), %rax
movl 0x4(%rsp), %ecx
subl 0x18(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x123f8
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_peak_calling_utils.cpp
// Function: dump_broadPeak_formatted_op(std::vector<t_annot_region*, std::allocator<t_annot_region*>>*, char*)
void dump_broadPeak_formatted_op(vector<t_annot_region*>* regions, char* op_fp)
{
	FILE* f_op = open_f(op_fp, "w");

	for(int i_reg = 0; i_reg < (int)regions->size(); i_reg++)
	{
		t_ER_info* cur_reg_info = (t_ER_info*)(regions->at(i_reg)->data);

		double FC = cur_reg_info->total_chip_mass / (cur_reg_info->total_control_mass+1);

		t_significance_info* sig_info = (t_significance_info*)(regions->at(i_reg)->significance_info);
		fprintf(f_op, "%s\t%d\t%d\t.\t.\t+\t%d\t%.6f\t%.6f\n", regions->at(i_reg)->chrom, regions->at(i_reg)->start, regions->at(i_reg)->end, 
			(int)(FC),
			sig_info->log_p_val / xlog(10), 
			sig_info->log_q_val / xlog(10));
	} // i_reg loop.

	fclose(f_op);
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq 0x68(%rsp), %rdi
leaq 0x387ea(%rip), %rsi     # 0x52aa4
callq 0x455f0
movq %rax, 0x60(%rsp)
movl $0x0, 0x5c(%rsp)
movl 0x5c(%rsp), %eax
movl %eax, 0x3c(%rsp)
movq 0x70(%rsp), %rdi
callq 0xc680
movq %rax, %rcx
movl 0x3c(%rsp), %eax
cmpl %ecx, %eax
jge 0x1a43c
movq 0x70(%rsp), %rdi
movslq 0x5c(%rsp), %rsi
callq 0xc800
movq (%rax), %rax
movq 0x48(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movsd 0x38(%rax), %xmm0
movq 0x50(%rsp), %rax
movsd 0x37cf9(%rip), %xmm1    # 0x52018
addsd 0x40(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x48(%rsp)
movq 0x70(%rsp), %rdi
movslq 0x5c(%rsp), %rsi
callq 0xc800
movq (%rax), %rax
movq 0x40(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x70(%rsp), %rdi
movslq 0x5c(%rsp), %rsi
callq 0xc800
movq (%rax), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x70(%rsp), %rdi
movslq 0x5c(%rsp), %rsi
callq 0xc800
movq (%rax), %rax
movl 0xc(%rax), %eax
movl %eax, 0x24(%rsp)
movq 0x70(%rsp), %rdi
movslq 0x5c(%rsp), %rsi
callq 0xc800
movq (%rax), %rax
movl 0x20(%rax), %eax
movl %eax, 0x28(%rsp)
cvttsd2si 0x48(%rsp), %eax
movl %eax, 0x2c(%rsp)
movq 0x40(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movsd 0x3a9c1(%rip), %xmm0    # 0x54d80
callq 0x441e0
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x40(%rsp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x3a992(%rip), %xmm0    # 0x54d80
callq 0x441e0
movsd 0x8(%rsp), %xmm1
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
movl 0x24(%rsp), %ecx
movl 0x28(%rsp), %r8d
movl 0x2c(%rsp), %r9d
movaps %xmm0, %xmm2
movsd 0x30(%rsp), %xmm0
divsd %xmm2, %xmm1
leaq 0x3b1f4(%rip), %rsi     # 0x55619
movb $0x2, %al
callq 0x2250
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x1a2cc
movq 0x60(%rsp), %rdi
callq 0x2180
addq $0x78, %rsp
retq
nopl (%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_mapped_read_tools.cpp
// Function: count_preprocessed_reads(char*, int&, int&)
void count_preprocessed_reads(char* mapped_reads_fp, int& n_F, int& n_R)
{
	n_F = 0;
	n_R = 0;

	FILE* f_mapped_reads = open_f(mapped_reads_fp, "r");
	char cur_line[1000];
	while(1)
	{
		if(fgets(cur_line, 1000, f_mapped_reads) == NULL)
		{
			break;
		}

		char cur_strand_char;
		if(sscanf(cur_line, "%*s %c", &cur_strand_char) != 1)
		{
			break;
		}

		if(cur_strand_char == 'F')
		{
			n_F++;
		}

		if(cur_strand_char == 'R')
		{
			n_R++;
		}
	} // file reading loop.
	fclose(f_mapped_reads);
}

// Assembly:
subq $0x418, %rsp            # imm = 0x418
movq %rdi, 0x410(%rsp)
movq %rsi, 0x408(%rsp)
movq %rdx, 0x400(%rsp)
movq 0x408(%rsp), %rax
movl $0x0, (%rax)
movq 0x400(%rsp), %rax
movl $0x0, (%rax)
movq 0x410(%rsp), %rdi
leaq 0x37624(%rip), %rsi     # 0x550ce
callq 0x455f0
movq %rax, 0x3f8(%rsp)
leaq 0x10(%rsp), %rdi
movq 0x3f8(%rsp), %rdx
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x22a0
cmpq $0x0, %rax
jne 0x1dad6
jmp 0x1db29
leaq 0x10(%rsp), %rdi
leaq 0x37da0(%rip), %rsi     # 0x55882
leaq 0xf(%rsp), %rdx
movb $0x0, %al
callq 0x2170
cmpl $0x1, %eax
je 0x1daf5
jmp 0x1db29
movsbl 0xf(%rsp), %eax
cmpl $0x46, %eax
jne 0x1db0e
movq 0x408(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movsbl 0xf(%rsp), %eax
cmpl $0x52, %eax
jne 0x1db27
movq 0x400(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x1dab7
movq 0x3f8(%rsp), %rdi
callq 0x2180
addq $0x418, %rsp            # imm = 0x418
retq
nop
// File: gersteinlab[P]MUSIC/src/ms_mapped_read_tools.cpp
// Function: preprocess_tagAlign_read_line(char*, char*, char*, int&, int&, char&, char*)
void preprocess_tagAlign_read_line(char* cur_line, 
	char* read_id,
	char* chrom, 
	int& chr_index, int& sequenced_length, 
	char& strand_char, 
	char* cigar_str)
{
	int chr_start_index;
	int chr_end_index;
	char strand_sign;

	if(sscanf(cur_line, "%s %d %d %*s %*d %c", chrom, &chr_start_index, &chr_end_index, &strand_sign) == 4)
	{
		// Note that the indices in tagAlign file are 0 based, these must be translated to 1 based indices.
		//chr_start_index += (CODEBASE_START_BASE - tagAlign_START_BASE);
		//chr_end_index += (CODEBASE_START_BASE - tagAlign_START_BASE);
		chr_start_index = translate_coord(chr_start_index, TAGALIGN_COORDS::start_base, CODEBASE_COORDS::start_base);
		chr_end_index = translate_coord(chr_end_index, TAGALIGN_COORDS::end_base, CODEBASE_COORDS::end_base);

		// Set quality to all matches.
		sprintf(cigar_str, "%dM", chr_end_index-chr_start_index+1);

		// Check the flag and determine the strand.
		strand_char = 'F';
		if(strand_sign == '-')
		{
			strand_char = 'R';
		}

		chr_index = chr_start_index;
		sequenced_length = chr_end_index-chr_start_index+1;
	}
	else
	{
		chrom[0] = 0;
	}
}

// Assembly:
subq $0x48, %rsp
movq 0x50(%rsp), %rax
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq %r9, 0x18(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0x3736b(%rip), %rsi     # 0x557d3
leaq 0x14(%rsp), %rcx
leaq 0x10(%rsp), %r8
leaq 0xf(%rsp), %r9
movb $0x0, %al
callq 0x2170
cmpl $0x4, %eax
jne 0x1e502
movl 0x14(%rsp), %edi
movl $0x1, %edx
movl %edx, %esi
callq 0x1fd20
movl %eax, 0x14(%rsp)
movl 0x10(%rsp), %edi
movl $0x1, %edx
movl %edx, %esi
callq 0x1fd20
movl %eax, 0x10(%rsp)
movq 0x50(%rsp), %rdi
movl 0x10(%rsp), %edx
subl 0x14(%rsp), %edx
addl $0x1, %edx
leaq 0x37325(%rip), %rsi     # 0x557e7
movb $0x0, %al
callq 0x2090
movq 0x18(%rsp), %rax
movb $0x46, (%rax)
movsbl 0xf(%rsp), %eax
cmpl $0x2d, %eax
jne 0x1e4e3
movq 0x18(%rsp), %rax
movb $0x52, (%rax)
movl 0x14(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, (%rax)
movl 0x10(%rsp), %ecx
subl 0x14(%rsp), %ecx
addl $0x1, %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
jmp 0x1e50a
movq 0x30(%rsp), %rax
movb $0x0, (%rax)
addq $0x48, %rsp
retq
nop
// File: gersteinlab[P]MUSIC/src/ms_mapped_read_tools.cpp
// Function: preprocess_preprocessed_LH_GFF3_read_line(char*, char*, char*, int&, int&, char&, char*)
void preprocess_preprocessed_LH_GFF3_read_line(char* cur_line, 
	char* read_id,
	char* chrom, 
	int& chr_index, int& sequenced_length, 
	char& strand_char, 
	char* mapping_quality_str)
{
	// Skip the comment and headers.
	if(cur_line[0] == '@')
	{
		chrom[0] = 0;
		chr_index = 0;
		return;
	}

	int _chr_index;
	char strand;

	//if(sscanf(cur_line, "%*s %d %s %d %*d %s %*s %*d %*d %s %s", &flag, chrom, &_chr_index, mapping_quality_str, fragment, phred_quality_str) == 6)
	// X       14705460        35M     +
	if(sscanf(cur_line, "%s %d %s %c", chrom, &_chr_index, mapping_quality_str, &strand) == 4)
	{
		// Translate the 0 based index in SAM file to ELAND's 1 based indexing.
		//chr_index += (CODEBASE_START_BASE - SAM_START_BASE);
		chr_index = _chr_index;

		// Check the flag and determine the strand.
		strand_char = 'F';
		if(strand == '-')
		{
			strand_char = 'R';
		}

			chr_index = _chr_index;
			sequenced_length = 0;
	}
	else
	{
		chrom[0] = 0;
	}
}

// Assembly:
subq $0x38, %rsp
movq 0x40(%rsp), %rax
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %r9, 0x8(%rsp)
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x40, %eax
jne 0x1e559
movq 0x20(%rsp), %rax
movb $0x0, (%rax)
movq 0x18(%rsp), %rax
movl $0x0, (%rax)
jmp 0x1e5ca
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rdx
movq 0x40(%rsp), %r8
leaq 0x3727c(%rip), %rsi     # 0x557eb
leaq 0x4(%rsp), %rcx
leaq 0x3(%rsp), %r9
movb $0x0, %al
callq 0x2170
cmpl $0x4, %eax
jne 0x1e5c2
movl 0x4(%rsp), %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movq 0x8(%rsp), %rax
movb $0x46, (%rax)
movsbl 0x3(%rsp), %eax
cmpl $0x2d, %eax
jne 0x1e5aa
movq 0x8(%rsp), %rax
movb $0x52, (%rax)
movl 0x4(%rsp), %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movq 0x10(%rsp), %rax
movl $0x0, (%rax)
jmp 0x1e5ca
movq 0x20(%rsp), %rax
movb $0x0, (%rax)
addq $0x38, %rsp
retq
nop
// File: gersteinlab[P]MUSIC/src/ms_mapped_read_tools.cpp
// Function: preprocess_ELAND_read_line(char*, char*, char*, int&, int&, char&, char*)
void preprocess_ELAND_read_line(char* cur_line, 
	char* read_id,
	char* chrom, 
	int& chr_index, int& sequenced_length, 
	char& strand_char, 
	char* mapping_quality_str)
{
	char cur_fragment[100];
	char quality_str[100];
	int _chr_index;
	char _strand_char;

	if(sscanf(cur_line, "%s %s %s %*d %*d %*d %s %d %c", read_id, cur_fragment, quality_str, chrom, &_chr_index, &_strand_char) == 6)
	{
		chr_index = _chr_index;
		sequenced_length = strlen(cur_fragment);
		sprintf(mapping_quality_str, "%dM", sequenced_length);

		strand_char = 'F';
		if(_strand_char == '-')
		{
			strand_char = 'R';
		}
	}
	else
	{
		chrom[0] = 0;
	}
}

// Assembly:
subq $0x128, %rsp            # imm = 0x128
movq 0x130(%rsp), %rax
movq %rdi, 0x120(%rsp)
movq %rsi, 0x118(%rsp)
movq %rdx, 0x110(%rsp)
movq %rcx, 0x108(%rsp)
movq %r8, 0x100(%rsp)
movq %r9, 0xf8(%rsp)
movq 0x120(%rsp), %rdi
movq 0x118(%rsp), %rdx
leaq 0x90(%rsp), %rcx
leaq 0x20(%rsp), %r8
movq 0x110(%rsp), %r9
leaq 0x37062(%rip), %rsi     # 0x5583d
leaq 0x1c(%rsp), %r10
leaq 0x1b(%rsp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x2170
cmpl $0x6, %eax
jne 0x1e863
movl 0x1c(%rsp), %ecx
movq 0x108(%rsp), %rax
movl %ecx, (%rax)
leaq 0x90(%rsp), %rdi
callq 0x20e0
movl %eax, %ecx
movq 0x100(%rsp), %rax
movl %ecx, (%rax)
movq 0x130(%rsp), %rdi
movq 0x100(%rsp), %rax
movl (%rax), %edx
leaq 0x36fad(%rip), %rsi     # 0x557e7
movb $0x0, %al
callq 0x2090
movq 0xf8(%rsp), %rax
movb $0x46, (%rax)
movsbl 0x1b(%rsp), %eax
cmpl $0x2d, %eax
jne 0x1e861
movq 0xf8(%rsp), %rax
movb $0x52, (%rax)
jmp 0x1e86e
movq 0x110(%rsp), %rax
movb $0x0, (%rax)
addq $0x128, %rsp            # imm = 0x128
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_mapped_read_tools.cpp
// Function: preprocess_bowtie_read_line(char*, char*, char*, int&, int&, char&, char*)
void preprocess_bowtie_read_line(char* cur_line, 
	char* read_id,
	char* chrom, 
	int& chr_index, int& sequenced_length, 
	char& strand_char, 
	char* mapping_quality_str)
{
	char strand_sign;
	int chr_start_index;
	char nucs[1000];
	char strand_sign_str[100];
	char chr_start_index_str[100];
	//if(sscanf(cur_line, "%s %c %s %d %s", read_id, &strand_sign, chrom, &chr_start_index, nucs) == 4)
	if(sscanf(cur_line, "%[^\t] %[^\t] %[^\t] %[^\t] %[^\t]", read_id, strand_sign_str, chrom, chr_start_index_str, nucs) == 5)
    {
		strand_sign = strand_sign_str[0];
		chr_start_index = atoi(chr_start_index_str);

		// Note that the indices in tagAlign file are 0 based, these must be translated to 1 based indices.
		chr_start_index = translate_coord(chr_start_index, BOWTIE_COORDS::start_base, CODEBASE_COORDS::start_base);

		sprintf(mapping_quality_str, "%dM", (int)strlen(nucs));

		// Check the flag and determine the strand.
		strand_char = 'F';
		if(strand_sign == '-')
		{
			strand_char = 'R';
		}

		chr_index = chr_start_index;
		sequenced_length = strlen(nucs);
	}
	else
	{
		chrom[0] = 0;
	}
}

// Assembly:
subq $0x518, %rsp            # imm = 0x518
movq 0x520(%rsp), %rax
movq %rdi, 0x510(%rsp)
movq %rsi, 0x508(%rsp)
movq %rdx, 0x500(%rsp)
movq %rcx, 0x4f8(%rsp)
movq %r8, 0x4f0(%rsp)
movq %r9, 0x4e8(%rsp)
movq 0x510(%rsp), %rdi
movq 0x508(%rsp), %rdx
leaq 0x80(%rsp), %rcx
movq 0x500(%rsp), %r8
leaq 0x10(%rsp), %r9
leaq 0xf0(%rsp), %rax
leaq 0x36f68(%rip), %rsi     # 0x5585b
movq %rax, (%rsp)
movb $0x0, %al
callq 0x2170
cmpl $0x5, %eax
jne 0x1e9be
movb 0x80(%rsp), %al
movb %al, 0x4e7(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x2290
movl %eax, 0x4e0(%rsp)
movl 0x4e0(%rsp), %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0x1fd20
movl %eax, 0x4e0(%rsp)
movq 0x520(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x20e0
movq 0x8(%rsp), %rdi
movl %eax, %edx
leaq 0x36e7f(%rip), %rsi     # 0x557e7
movb $0x0, %al
callq 0x2090
movq 0x4e8(%rsp), %rax
movb $0x46, (%rax)
movsbl 0x4e7(%rsp), %eax
cmpl $0x2d, %eax
jne 0x1e992
movq 0x4e8(%rsp), %rax
movb $0x52, (%rax)
movl 0x4e0(%rsp), %ecx
movq 0x4f8(%rsp), %rax
movl %ecx, (%rax)
leaq 0xf0(%rsp), %rdi
callq 0x20e0
movl %eax, %ecx
movq 0x4f0(%rsp), %rax
movl %ecx, (%rax)
jmp 0x1e9c9
movq 0x500(%rsp), %rax
movb $0x0, (%rax)
addq $0x518, %rsp            # imm = 0x518
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_mapped_read_tools.cpp
// Function: preprocess_BED4_read_line(char*, char*, char*, int&, int&, char&, char*)
void preprocess_BED4_read_line(char* cur_line, 
	char* read_id,
	char* chrom, 
	int& chr_index, int& sequenced_length, 
	char& strand_char, 
	char* mapping_quality_str)
{
	char strand_sign;
	int chr_start_index;
	int chr_end_index;
	//if(sscanf(cur_line, "%s %d %d %*s %*s %c", chrom, &chr_start_index, &chr_end_index, &strand_sign) == 4)
	if(sscanf(cur_line, "%s %d %d %*s %c", chrom, &chr_start_index, &chr_end_index, &strand_sign) == 4)
    {
		// Note that the indices in tagAlign file are 0 based, these must be translated to 1 based indices.
		sprintf(mapping_quality_str, "%dM", chr_end_index-chr_start_index);
		sequenced_length = chr_end_index-chr_start_index;

		chr_start_index = translate_coord(chr_start_index, BED_COORDS::start_base, CODEBASE_COORDS::start_base);

		// Check the flag and determine the strand.
		strand_char = 'F';
		if(strand_sign == '-')
		{
			strand_char = 'R';
		}

		chr_index = chr_start_index;
	}
	else
	{
		chrom[0] = 0;
	}
}

// Assembly:
subq $0x48, %rsp
movq 0x50(%rsp), %rax
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq %r9, 0x18(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0x36e61(%rip), %rsi     # 0x55879
leaq 0x10(%rsp), %rcx
leaq 0xc(%rsp), %r8
leaq 0x17(%rsp), %r9
movb $0x0, %al
callq 0x2170
cmpl $0x4, %eax
jne 0x1ea98
movq 0x50(%rsp), %rdi
movl 0xc(%rsp), %edx
subl 0x10(%rsp), %edx
leaq 0x36da0(%rip), %rsi     # 0x557e7
movb $0x0, %al
callq 0x2090
movl 0xc(%rsp), %ecx
subl 0x10(%rsp), %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
movl 0x10(%rsp), %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0x1fd20
movl %eax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movb $0x46, (%rax)
movsbl 0x17(%rsp), %eax
cmpl $0x2d, %eax
jne 0x1ea8b
movq 0x18(%rsp), %rax
movb $0x52, (%rax)
movl 0x10(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, (%rax)
jmp 0x1eaa0
movq 0x30(%rsp), %rax
movb $0x0, (%rax)
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_mapped_read_tools.cpp
// Function: get_n_mapped_nucs(std::vector<t_mapped_fragment*, std::allocator<t_mapped_fragment*>>*)
double get_n_mapped_nucs(vector<t_mapped_fragment*>* fragments)
{
	double n_mapped_nucs = 0.0;

	for(int i_frag = 0; i_frag < (int)fragments->size(); i_frag++)
	{
		n_mapped_nucs += fragments->at(i_frag)->sequenced_fragment_length;
	} // i_frag loop.

	return(n_mapped_nucs);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, (%rsp)
movq 0x10(%rsp), %rdi
callq 0x1fd40
movq %rax, %rcx
movl (%rsp), %eax
cmpl %ecx, %eax
jge 0x1ecb5
movq 0x10(%rsp), %rdi
movslq 0x4(%rsp), %rsi
callq 0x1fd60
movq (%rax), %rax
cvtsi2sdl 0x4(%rax), %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x1ec6a
movsd 0x8(%rsp), %xmm0
addq $0x18, %rsp
retq
// File: gersteinlab[P]MUSIC/src/ms_mapped_read_tools.cpp
// Function: get_l_signal_per_reads(char*, int)
int get_l_signal_per_reads(char* reads_fp, int l_ext_tag)
{
	char strand_char = 0;
	//char cur_fragment[10000];
	char mapping_map_str[10000];
	int chr_index;
	int n_processed_reads = 0;
	int l_profile = 0;
	FILE* f_sorted_reads = open_f(reads_fp, "r");
	while(1)
	{
		char* cur_read = getline(f_sorted_reads);

		if(cur_read == NULL)
		{
			break;
		}
		else if((n_processed_reads % (1000*1000)) == 0)
		{
			fprintf(stderr, "Processing %d. read.                        \r", n_processed_reads);
		}	

		n_processed_reads++;

		if(sscanf(cur_read, "%s %c %d", mapping_map_str, &strand_char, &chr_index) != 3)
		{
			fprintf(stderr, "Could not parse %s\n", cur_read);
			exit(0);
		}

		int cur_l_profile = chr_index + 1000 + l_ext_tag;
		if(cur_l_profile > l_profile)
		{
			l_profile = cur_l_profile;
		}
	} // file loading loop.

	fclose(f_sorted_reads);

	return(l_profile);
}

// Assembly:
subq $0x2758, %rsp           # imm = 0x2758
movq %rdi, 0x2750(%rsp)
movl %esi, 0x274c(%rsp)
movb $0x0, 0x274b(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x2750(%rsp), %rdi
leaq 0x363d1(%rip), %rsi     # 0x550ce
callq 0x455f0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x45400
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x1ed23
jmp 0x1edd6
movl 0x28(%rsp), %eax
movl $0xf4240, %ecx          # imm = 0xF4240
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x1ed50
movq 0x462a5(%rip), %rax     # 0x64fe0
movq (%rax), %rdi
movl 0x28(%rsp), %edx
leaq 0x36b54(%rip), %rsi     # 0x5589d
movb $0x0, %al
callq 0x2250
jmp 0x1ed52
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
leaq 0x33cf2(%rip), %rsi     # 0x52a60
leaq 0x274b(%rsp), %rcx
leaq 0x2c(%rsp), %r8
movb $0x0, %al
callq 0x2170
cmpl $0x3, %eax
je 0x1edab
movq 0x46252(%rip), %rax     # 0x64fe0
movq (%rax), %rdi
movq 0x10(%rsp), %rdx
leaq 0x36b2e(%rip), %rsi     # 0x558cb
movb $0x0, %al
callq 0x2250
xorl %edi, %edi
callq 0x21f0
movl 0x2c(%rsp), %eax
addl $0x3e8, %eax            # imm = 0x3E8
addl 0x274c(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x24(%rsp), %eax
jle 0x1edd1
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x1ed07
movq 0x18(%rsp), %rdi
callq 0x2180
movl 0x24(%rsp), %eax
addq $0x2758, %rsp           # imm = 0x2758
retq
nopl (%rax)
// File: gersteinlab[P]MUSIC/src/ms_mapped_read_tools.cpp
// Function: get_next_entry_per_mapp_map_string(char*, int&, bool&, int&, char&)
void get_next_entry_per_mapp_map_string(char* mapping_map_str,
										int& i_mapp_map, 
										bool& is_matching,
										//t_string* cur_entry_length_str,
										int& l_cur_entry,
										char& entry_type_char)
{	
	// Clean the length string.
	//cur_entry_length_str->empty();
	l_cur_entry = 0;

	// Get the next entry in the cigar string.
	while(mapping_map_str[i_mapp_map] != 0)
	{
		if(mapping_map_str[i_mapp_map] < '0' || mapping_map_str[i_mapp_map] > '9')
		{
			break;
		}
		//cur_entry_length_str->concat_char(mapping_map_str[i_mapp_map]);
		l_cur_entry = l_cur_entry*10 + (int)(mapping_map_str[i_mapp_map]-'0');
		i_mapp_map++;
	}

	is_matching = false;
	if(mapping_map_str[i_mapp_map] == 'M')
	{
		//fprintf(stderr, "Adding matching length of %d\n", l_cur_entry);
		is_matching = true;
	}
	else
	{
		//fprintf(stderr, "Adding some other length of %d\n", l_cur_entry);
	}	

	entry_type_char = mapping_map_str[i_mapp_map];

	// Move over the current entry identifier.
	i_mapp_map++;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq %rcx, -0x20(%rsp)
movq %r8, -0x28(%rsp)
movq -0x20(%rsp), %rax
movl $0x0, (%rax)
movq -0x8(%rsp), %rax
movq -0x10(%rsp), %rcx
movslq (%rcx), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x1f78b
movq -0x8(%rsp), %rax
movq -0x10(%rsp), %rcx
movslq (%rcx), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jl 0x1f756
movq -0x8(%rsp), %rax
movq -0x10(%rsp), %rcx
movslq (%rcx), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x39, %eax
jle 0x1f758
jmp 0x1f78b
movq -0x20(%rsp), %rax
imull $0xa, (%rax), %ecx
movq -0x8(%rsp), %rax
movq -0x10(%rsp), %rdx
movslq (%rdx), %rdx
movsbl (%rax,%rdx), %eax
subl $0x30, %eax
addl %eax, %ecx
movq -0x20(%rsp), %rax
movl %ecx, (%rax)
movq -0x10(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x1f714
movq -0x18(%rsp), %rax
movb $0x0, (%rax)
movq -0x8(%rsp), %rax
movq -0x10(%rsp), %rcx
movslq (%rcx), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x4d, %eax
jne 0x1f7b3
movq -0x18(%rsp), %rax
movb $0x1, (%rax)
jmp 0x1f7b5
jmp 0x1f7b5
movq -0x8(%rsp), %rax
movq -0x10(%rsp), %rcx
movslq (%rcx), %rcx
movb (%rax,%rcx), %cl
movq -0x28(%rsp), %rax
movb %cl, (%rax)
movq -0x10(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
retq
nopl (%rax)
// File: gersteinlab[P]MUSIC/src/ms_mapped_read_tools.cpp
// Function: check_genome_index_update_per_CIGAR_entry(char)
bool check_genome_index_update_per_CIGAR_entry(char entry_char)
{
	//if(entry_char == 'D' || 
	//	entry_char == 'M' ||
	//	entry_char == 'N' ||
	//	entry_char == 'H')
	if(entry_char == 'D' || 
		entry_char == 'M' ||
		entry_char == 'N')
	{
		return(true);
	}

	return(false);
}

// Assembly:
movb %dil, %al
movb %al, -0x2(%rsp)
movsbl -0x2(%rsp), %eax
cmpl $0x44, %eax
je 0x1f805
movsbl -0x2(%rsp), %eax
cmpl $0x4d, %eax
je 0x1f805
movsbl -0x2(%rsp), %eax
cmpl $0x4e, %eax
jne 0x1f80c
movb $0x1, -0x1(%rsp)
jmp 0x1f811
movb $0x0, -0x1(%rsp)
movb -0x1(%rsp), %al
andb $0x1, %al
retq
nopl (%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_mapped_read_tools.cpp
// Function: fragment_5p_accessor(void*)
int fragment_5p_accessor(void* obj_ptr)
{
	t_mapped_fragment* frag_obj_ptr = (t_mapped_fragment*)obj_ptr;

	if(frag_obj_ptr->strand_char == 'F')
	{
		return(frag_obj_ptr->base_index);		
	}
	else if(frag_obj_ptr->strand_char == 'R')
	{
		return(frag_obj_ptr->base_index);
	}
	else
	{
		fprintf(stderr, "The strand char for fragment object is %c @ %s(%d)\n", frag_obj_ptr->strand_char, __FILE__, __LINE__);
		exit(0);
		return(-1);
	}
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movsbl 0x8(%rax), %eax
cmpl $0x46, %eax
jne 0x1f84b
movq (%rsp), %rax
movl (%rax), %eax
movl %eax, 0x14(%rsp)
jmp 0x1f898
movq (%rsp), %rax
movsbl 0x8(%rax), %eax
cmpl $0x52, %eax
jne 0x1f864
movq (%rsp), %rax
movl (%rax), %eax
movl %eax, 0x14(%rsp)
jmp 0x1f898
movq 0x45775(%rip), %rax     # 0x64fe0
movq (%rax), %rdi
movq (%rsp), %rax
movsbl 0x8(%rax), %edx
leaq 0x360cf(%rip), %rsi     # 0x5594c
leaq 0x360fc(%rip), %rcx     # 0x55980
movl $0x405, %r8d            # imm = 0x405
movb $0x0, %al
callq 0x2250
xorl %edi, %edi
callq 0x21f0
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_mapped_read_tools.cpp
// Function: get_n_reads_per_window(int, std::vector<t_mapped_fragment*, std::allocator<t_mapped_fragment*>>*)
int* get_n_reads_per_window(int n_wins, vector<t_mapped_fragment*>* frag_list)
{
	int* n_reads_per_window = new int[n_wins + 2];
	for(int i_win = 0; i_win < n_wins; i_win++)
	{
		n_reads_per_window[i_win] = 0;
	} // i_win loop

	for(int i_frag = 0; i_frag < (int)frag_list->size(); i_frag++)
	{
		int cur_i_win = frag_list->at(i_frag)->base_index / MEG_BASE;

		n_reads_per_window[cur_i_win]++;
	} // i_nuc loop.

	return(n_reads_per_window);
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movq %rsi, 0x18(%rsp)
movl 0x24(%rsp), %eax
addl $0x2, %eax
cltq
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2040
movq %rax, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0x1f9bc
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movl $0x0, (%rax,%rcx,4)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x1f994
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
movl %eax, (%rsp)
movq 0x18(%rsp), %rdi
callq 0x1fd40
movq %rax, %rcx
movl (%rsp), %eax
cmpl %ecx, %eax
jge 0x1fa1f
movq 0x18(%rsp), %rdi
movslq 0x8(%rsp), %rsi
callq 0x1fd60
movq (%rax), %rax
movl (%rax), %eax
movl $0xf4240, %ecx          # imm = 0xF4240
cltd
idivl %ecx
movl %eax, 0x4(%rsp)
movq 0x10(%rsp), %rax
movslq 0x4(%rsp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x1f9c4
movq 0x10(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)
// File: gersteinlab[P]MUSIC/src/ms_mapped_read_tools.cpp
// Function: check_read_nuc_index_update_per_CIGAR_entry(char)
bool check_read_nuc_index_update_per_CIGAR_entry(char entry_char)
{
	//if(entry_char == 'H' ||
	//if(entry_char == 'P' ||
	//if(entry_char == 'X' ||
	if(entry_char == 'S' ||
		entry_char == 'M' ||
		entry_char == 'I')
	{
		return(true);
	}

	return(false);
}

// Assembly:
movb %dil, %al
movb %al, -0x2(%rsp)
movsbl -0x2(%rsp), %eax
cmpl $0x53, %eax
je 0x1fa55
movsbl -0x2(%rsp), %eax
cmpl $0x4d, %eax
je 0x1fa55
movsbl -0x2(%rsp), %eax
cmpl $0x49, %eax
jne 0x1fa5c
movb $0x1, -0x1(%rsp)
jmp 0x1fa61
movb $0x0, -0x1(%rsp)
movb -0x1(%rsp), %al
andb $0x1, %al
retq
nopl (%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_nomenclature.cpp
// Function: normalize_chr_id(char*)
void normalize_chr_id(char* raw_chr_id)
{
	t_string::replace_avoid_list(raw_chr_id, "+-./\*^$#@!&()~+=?\"`][}{", '_');

	if(t_string::starts_with(raw_chr_id, "chr") || 
		t_string::starts_with(raw_chr_id, "Chr") ||
		t_string::starts_with(raw_chr_id, "CHR"))
	{
		// Get rid of the first 3 characters.
		char temp[1000];
		strcpy(temp, &raw_chr_id[3]);
		strcpy(raw_chr_id, temp);
	}
	else
	{
		// No need to change.
		return;
	}
}

// Assembly:
subq $0x3f8, %rsp            # imm = 0x3F8
movq %rdi, 0x3f0(%rsp)
movq 0x3f0(%rsp), %rdi
leaq 0x3362f(%rip), %rsi     # 0x5599d
movl $0x5f, %edx
callq 0x488b0
movq 0x3f0(%rsp), %rdi
leaq 0x3362e(%rip), %rsi     # 0x559b5
callq 0x4af50
testb $0x1, %al
jne 0x223c2
movq 0x3f0(%rsp), %rdi
leaq 0x3361a(%rip), %rsi     # 0x559b9
callq 0x4af50
testb $0x1, %al
jne 0x223c2
movq 0x3f0(%rsp), %rdi
leaq 0x33606(%rip), %rsi     # 0x559bd
callq 0x4af50
testb $0x1, %al
jne 0x223c2
jmp 0x223e8
movq %rsp, %rdi
movq 0x3f0(%rsp), %rsi
addq $0x3, %rsi
callq 0x2160
movq 0x3f0(%rsp), %rdi
movq %rsp, %rsi
callq 0x2160
jmp 0x223ea
jmp 0x223ea
addq $0x3f8, %rsp            # imm = 0x3F8
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: gersteinlab[P]MUSIC/src/ms_filter_utils.cpp
// Function: alloc_ext_array()
t_ext_double_array* alloc_ext_array()
{
	t_ext_double_array* ext_array = new t_ext_double_array();
	ext_array->buffer = new double[1000];
	ext_array->buffer_length = 1000;
	ext_array->n_vals = 0;

	return(ext_array);
}

// Assembly:
subq $0x18, %rsp
movl $0x10, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x8(%rsp)
xorl %esi, %esi
movl $0x10, %edx
callq 0x2110
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x1f40, %edi           # imm = 0x1F40
callq 0x2040
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movl $0x3e8, 0xc(%rax)       # imm = 0x3E8
movq 0x10(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_filter_utils.cpp
// Function: add_val(t_ext_double_array*, double)
void add_val(t_ext_double_array* ext_array, double val)
{
	// Check if the buffer memory will be overwhelmed by adding the new value.
	if(ext_array->n_vals+1 >= ext_array->buffer_length)
	{
if(__DUMP_FILTER_MSGS__)
		fprintf(stderr, "Extending the array: %d -> %d\n", ext_array->buffer_length, ext_array->buffer_length * 2);
		int l_ext_ext_buffer = ext_array->buffer_length * 2;
		double* new_ext_buffer = new double [l_ext_ext_buffer];

		// Copy the values.
		for(int i = 0; i < ext_array->n_vals; i++)
		{
			new_ext_buffer[i] = ext_array->buffer[i];
		} // i loop.

		// Copy the new buffer the extended array.		
		delete [] ext_array->buffer;
		ext_array->buffer_length = l_ext_ext_buffer;
		ext_array->buffer = new_ext_buffer;
	}

	// Add the value and return.
	ext_array->buffer[ext_array->n_vals] = val;
	ext_array->n_vals++;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movsd %xmm0, 0x28(%rsp)
movq 0x30(%rsp), %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movq 0x30(%rsp), %rcx
cmpl 0xc(%rcx), %eax
jl 0x2257e
testb $0x1, 0x42d3e(%rip)     # 0x651dd
je 0x224cb
movq 0x42b38(%rip), %rax     # 0x64fe0
movq (%rax), %rdi
movq 0x30(%rsp), %rax
movl 0xc(%rax), %edx
movq 0x30(%rsp), %rax
movl 0xc(%rax), %ecx
shll %ecx
leaq 0x33514(%rip), %rsi     # 0x559d8
movb $0x0, %al
callq 0x2250
movq 0x30(%rsp), %rax
movl 0xc(%rax), %eax
shll %eax
movl %eax, 0x24(%rsp)
movslq 0x24(%rsp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2040
movq %rax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x22548
movq 0x30(%rsp), %rax
movq (%rax), %rax
movslq 0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x18(%rsp), %rax
movslq 0x14(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x2250c
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x22565
movq 0x8(%rsp), %rdi
callq 0x2220
movl 0x24(%rsp), %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0xc(%rax)
movq 0x18(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movsd 0x28(%rsp), %xmm0
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq 0x30(%rsp), %rcx
movslq 0x8(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x30(%rsp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
addq $0x38, %rsp
retq
nopl (%rax)
// File: gersteinlab[P]MUSIC/src/ms_filter_utils.cpp
// Function: get_next_2_exp(int, int&, int&)
void get_next_2_exp(int val, int& larger_exp_val, int& expon)
{
	int cur_val = 1;
	int cur_exp = 0;
	while(cur_val < val)
	{
		cur_exp++;
		cur_val *= 2;
	}

	expon = cur_exp;
	larger_exp_val = cur_val;
}

// Assembly:
movl %edi, -0x4(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movl $0x1, -0x1c(%rsp)
movl $0x0, -0x20(%rsp)
movl -0x1c(%rsp), %eax
cmpl -0x4(%rsp), %eax
jge 0x225ef
movl -0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %eax
shll %eax
movl %eax, -0x1c(%rsp)
jmp 0x225ce
movl -0x20(%rsp), %ecx
movq -0x18(%rsp), %rax
movl %ecx, (%rax)
movl -0x1c(%rsp), %ecx
movq -0x10(%rsp), %rax
movl %ecx, (%rax)
retq
nopw %cs:(%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_filter_utils.cpp
// Function: sort_doubles_descending(void const*, void const*)
int sort_doubles_descending(const void* p1, const void* p2)
{
	double val1 = *((double*)p1);
	double val2 = *((double*)p2);

	if(val1 < val2)
	{
		return(-1);
	}
	else if(val1 == val2)
	{
		return(0);
	}
	else
	{
		return(1);
	}
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq -0x10(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x20(%rsp)
movq -0x18(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x28(%rsp)
movsd -0x20(%rsp), %xmm1
movsd -0x28(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x22654
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
jmp 0x22676
movsd -0x20(%rsp), %xmm0
ucomisd -0x28(%rsp), %xmm0
jne 0x2266e
jp 0x2266e
movl $0x0, -0x4(%rsp)
jmp 0x22676
movl $0x1, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopl (%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_filter_utils.cpp
// Function: get_origin_of_symmetry(double*, int, int, int&, int)
bool get_origin_of_symmetry(double* filtered_data, int l_signal, int search_start_i, int& origin, int l_mirror_check)
{
	if(search_start_i < l_mirror_check)
	{
		search_start_i = l_mirror_check;
	}

	for(int i_c = l_mirror_check; i_c < l_signal-l_mirror_check; i_c++)
	{
		bool current_origin_check = true;
		for(int i = 0; 
			current_origin_check && i < l_mirror_check; 
			i++)
		{
			if(fabs(filtered_data[i_c+i] - filtered_data[i_c-i]) > 0.00001)
			{
				current_origin_check = false;
			}
		} // i loop.

		if(current_origin_check)
		{
			fprintf(stderr, "Found origin of symmetry @ %d\n", i_c);
			origin = i_c;
			return(true);
		}
	} // i_c loop.

	return(false);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl %edx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movl %r8d, 0x14(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x14(%rsp), %eax
jge 0x267fd
movl 0x14(%rsp), %eax
movl %eax, 0x20(%rsp)
movl 0x14(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl 0x24(%rsp), %ecx
subl 0x14(%rsp), %ecx
cmpl %ecx, %eax
jge 0x268ea
movb $0x1, 0xf(%rsp)
movl $0x0, 0x8(%rsp)
xorl %eax, %eax
testb $0x1, 0xf(%rsp)
movb %al, 0x7(%rsp)
je 0x26842
movl 0x8(%rsp), %eax
cmpl 0x14(%rsp), %eax
setl %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x2684c
jmp 0x268a3
movq 0x28(%rsp), %rax
movl 0x10(%rsp), %ecx
addl 0x8(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x28(%rsp), %rax
movl 0x10(%rsp), %ecx
subl 0x8(%rsp), %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm0
movaps 0x2e513(%rip), %xmm1    # 0x54d90
pand %xmm1, %xmm0
movsd 0x2f147(%rip), %xmm1    # 0x559d0
ucomisd %xmm1, %xmm0
jbe 0x26894
movb $0x0, 0xf(%rsp)
jmp 0x26896
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x26826
testb $0x1, 0xf(%rsp)
je 0x268d8
movq 0x3e72f(%rip), %rax     # 0x64fe0
movq (%rax), %rdi
movl 0x10(%rsp), %edx
leaq 0x2f388(%rip), %rsi     # 0x55c47
movb $0x0, %al
callq 0x2250
movl 0x10(%rsp), %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movb $0x1, 0x37(%rsp)
jmp 0x268ef
jmp 0x268da
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x26805
movb $0x0, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: gersteinlab[P]MUSIC/src/ms_filter_utils.cpp
// Function: sum_tracks(std::vector<double*, std::allocator<double*>>*, int)
double* sum_tracks(vector<double*>* multitrack_data, int l_signal)
{
	int n_tracks = (int)multitrack_data->size();
	fprintf(stderr, "Summing %d tracks of %d data points.\n", n_tracks, l_signal);
	double* aggregate_track = new double[l_signal];

	for(int i = 0; i < l_signal; i++)
	{
		double cur_aggregated_val = 0.0;

		// Go over all the tracks and sum their values at this position.
		for(int i_t = 0; i_t < n_tracks; i_t++)
		{
			cur_aggregated_val += (multitrack_data->at(i_t))[i];
		} // i_t loop.

		aggregate_track[i] = cur_aggregated_val;
	} // i loop.

	return(aggregate_track);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movq 0x30(%rsp), %rdi
callq 0x26ae0
movl %eax, 0x28(%rsp)
movq 0x3e6be(%rip), %rax     # 0x64fe0
movq (%rax), %rdi
movl 0x28(%rsp), %edx
movl 0x2c(%rsp), %ecx
leaq 0x2f332(%rip), %rsi     # 0x55c66
movb $0x0, %al
callq 0x2250
movslq 0x2c(%rsp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2040
movq %rax, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jge 0x269ea
xorps %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x28(%rsp), %eax
jge 0x269c8
movq 0x30(%rsp), %rdi
movslq 0xc(%rsp), %rsi
callq 0x26b00
movq (%rax), %rax
movslq 0x1c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x26989
movsd 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x2696e
movq 0x20(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nop