// File: /workspace/github_cpp_makefile_star2_O3/gersteinlab[P]MUSIC/src/ms_peak_calling_utils.cpp
// Function: write_decomposition_WAV(char*, int, char*, int, double, double, double, int, double)
void write_decomposition_WAV(char* chip_reads_dir,
		int l_fragment,
		char* mapability_signal_dir,
		int l_read_mapability_signal,
		double base_scale_l_win,
		double end_scale_l_win,
		double log_step,
		int l_mapability_filtering_win,
		double max_normalized_mapability_signal)
{
	char chr_ids_fp[1000];
	sprintf(chr_ids_fp, "%s/chr_ids.txt", chip_reads_dir);
	vector<char*>* chr_ids = buffer_file(chr_ids_fp);
	if(chr_ids == NULL)
	{
		fprintf(stderr, "Could not load the chromosome id's for the chip data.\n");
		exit(0);
	}

	// Process each chromosome.
	for(int i_chr = 0; i_chr < (int)chr_ids->size(); i_chr++)
	{
		fprintf(stderr, "Writing %s..", chr_ids->at(i_chr));

		// Skip chromosome M for now.
		if(strcmp(chr_ids->at(i_chr), "M") == 0)
		{
			continue;
		}

		// Generate the current signal profile.
		int l_buffer = 300*1000*1000;
		int l_profile = 0;
		//int l_read = l_read_mapability_signal;
		double* buffered_signal_profile = new double[l_buffer + 2];	
		char cur_chr_chip_reads_fp[1000];
		sprintf(cur_chr_chip_reads_fp, "%s/%s_mapped_reads.txt", chip_reads_dir, chr_ids->at(i_chr));
		buffer_per_nucleotide_profile_no_buffer(cur_chr_chip_reads_fp, l_fragment, 
			buffered_signal_profile, NULL, NULL,
			l_buffer, l_profile);

		double* signal_profile = new double[l_profile + 2];	
		for(int i = 1; i <= l_profile; i++)
		{
			signal_profile[i] = buffered_signal_profile[i];
		} // i loop.
		delete [] buffered_signal_profile;

		//// Generate the current control profile.
		//l_buffer = 300*1000*1000;
		//int l_control = 0;
		//double* buffered_control_profile = new double[l_buffer + 2];
		//char cur_chr_control_reads_fp[1000];
		//sprintf(cur_chr_control_reads_fp, "%s/%s_mapped_reads.txt", control_reads_dir, chr_ids->at(i_chr));
		//buffer_per_nucleotide_profile_no_buffer(cur_chr_control_reads_fp, l_fragment, 
		//	buffered_control_profile, NULL, NULL, 
		//	l_buffer, l_control);


		//double* control_profile = new double[l_control + 2];
		//for(int i = 1; i <= l_control; i++)
		//{
		//	control_profile[i] = buffered_control_profile[i];
		//} // i loop.
		//delete [] buffered_control_profile;
		
		// Load and process the mapability profile.
		char mapability_signal_profile_fp[1000];
		sprintf(mapability_signal_profile_fp, "%s/%s.bin", mapability_signal_dir, chr_ids->at(i_chr));

		double* mapability_aware_smoothed_signal_profile = NULL;
		int l_mapability_profile = 0;
		if(check_file(mapability_signal_profile_fp))
		{
			double* mapability_signal_profile = NULL;

#define __UCHAR_MAPPABILITY__
#ifdef __DOUBLE_MAPPABILITY__
			// Load the mapability map signal profile, do filtering.
			mapability_signal_profile = load_per_nucleotide_binary_profile(mapability_signal_profile_fp, l_mapability_profile);

			// Do mapability aware median filtering on the current signal profile.
if(__DUMP_PEAK_CALLING_UTILS_MSGS__)
			fprintf(stderr, "Scaling the mapability map with %d.\n", l_read_mapability_signal * 2);

			int mapability_scaling = l_read * 2;
			for(int i = 1; i <= l_mapability_profile; i++)
			{
				mapability_signal_profile[i] /= mapability_scaling;
			} // i loop.
#elif defined(__UCHAR_MAPPABILITY__)
			// Following loads the mappability signal profile from the char version of the multi-mappability profile.
			// Load the mapability map signal profile, do filtering.
			unsigned char* mapability_signal_char_profile = load_per_nucleotide_binary_uchar_profile(mapability_signal_profile_fp, l_mapability_profile);
			mapability_signal_profile = new double[l_mapability_profile + 2];
			for(int i = 1; i <= l_mapability_profile; i++)
			{
				unsigned char unsigned_char_val = (unsigned char)(mapability_signal_char_profile[i]);
				mapability_signal_profile[i] = (double)(unsigned_char_val);
				mapability_signal_profile[i] /= 100;

				if(mapability_signal_profile[i] < 0)
				{
					fprintf(stderr, "Sanity check failed.\n");
					exit(0);
				}
			} // i loop.
			delete [] mapability_signal_char_profile;
#else
			#error "Must define the type of mappability."
#endif

if(__DUMP_PEAK_CALLING_UTILS_MSGS__)
			fprintf(stderr, "Smoothing the signal profile.\n");
			mapability_aware_smoothed_signal_profile = mapability_aware_median_filter(signal_profile, l_profile,
																					mapability_signal_profile, l_mapability_profile,
																					max_normalized_mapability_signal,
																					l_mapability_filtering_win);

			delete [] mapability_signal_profile;
		} // mapability based filtering check.
		else
		{
			fprintf(stderr, "Could not find the mapability map profile, skipping it.");
			mapability_aware_smoothed_signal_profile = new double[l_profile + 2];
			for(int i = 1; i <= l_profile; i++)
			{
				mapability_aware_smoothed_signal_profile[i] = signal_profile[i];
			} // i loop.
		}

//		// Scale the control with respect to signal.
//		double per_win_2DOF_lls_scaling_factor = 0;
//		double per_win_1DOF_lls_scaling_factor = 0;
//		double total_sig_scaling_factor = 0;
//		get_per_window_scaling_factors_for_profile1_per_profile2(control_profile, l_control, signal_profile, l_profile, 10000,
//																	per_win_2DOF_lls_scaling_factor,
//																	per_win_1DOF_lls_scaling_factor,
//																	total_sig_scaling_factor);
//
//		double scaling_factor = per_win_1DOF_lls_scaling_factor;
//
//if(__DUMP_PEAK_CALLING_UTILS_MSGS__)
//		fprintf(stderr, "Scaling control with factor of %lf\n", scaling_factor);
//
//		// Go over the whole control signal.
//		for(int i = 0; i < l_control; i++)
//		{
//			control_profile[i] *= scaling_factor;
//		} // i loop.

		// Now, do the multiscale decomposition, 
		vector<double>* scales_per_i_scale = new vector<double>();
		vector<double*>* filtered_tracks = multiscale_median_filter_data(mapability_aware_smoothed_signal_profile, l_profile, 
			base_scale_l_win, end_scale_l_win, log_step, 
			scales_per_i_scale,
			true,
			false, 
			false, 
			false, 
			NULL, 
			NULL,
			"temp");

		// Dump the tracks.
		short int* merged_waveform_buffer = new short int[l_profile + 2];
		memset(merged_waveform_buffer, 0, sizeof(short int) * l_profile);
		for(int i_scale = 0; i_scale < (int)scales_per_i_scale->size(); i_scale++)
		{
			char cur_decomp_fp[1000];
			sprintf(cur_decomp_fp, "%s_scale_%d.bin", "temp", i_scale);

			if(check_file(cur_decomp_fp))
			{
				int l_cur_decomp;
				double* cur_filtered_track = load_per_nucleotide_binary_profile(cur_decomp_fp, l_cur_decomp);

				int l_cur_last_index = MIN(l_cur_decomp, l_profile);
				for(int i = 1; i < l_cur_last_index; i++)
				{
					merged_waveform_buffer[i] += (short int)(cur_filtered_track[i]);
				} // i loop.

				// Delete the temp file.
				remove(cur_decomp_fp);

				//char cur_bgr_fp[1000];
				//sprintf(cur_bgr_fp, "chr%s_scale_%d.bgr", chr_ids->at(i_chr), (int)(floor(scales_per_i_scale->at(i_scale))));
				//dump_bedGraph_per_per_nucleotide_binary_profile(cur_filtered_track, l_cur_decomp, chr_ids->at(i_chr), cur_bgr_fp);
				delete [] cur_filtered_track;
			}
		} // i_scale loop.
		delete filtered_tracks;

		fprintf(stderr, "Dumping WAV file.\n");

		// Amplify to get 
		short max_val = 0;
		short min_val = 60*1000;
		for(int i = 0; i < l_profile; i++)
		{
			if(max_val < merged_waveform_buffer[i])
			{
				max_val = merged_waveform_buffer[i];
			}

			if(min_val > merged_waveform_buffer[i])
			{
				min_val = merged_waveform_buffer[i];
			}
		} // i_loop.

		double norm_val = ((double)64000 / (double)(max_val - min_val));
		double half_val = (max_val + min_val) / 2;
		for(int i = 0; i < l_profile; i++)
		{
			double fraction_posn_per_cur_val = fabs((merged_waveform_buffer[i] - half_val)/half_val);
			double a = (1 - fraction_posn_per_cur_val);
			double warping_factor = pow((1 - a*a),.5) / (a+.05);
			//if(warping_factor > 1 || warping_factor < 0)
			//{
			//	fprintf(stderr, "Sanity check failed: %lf\n", warping_factor);
			//	exit(0);
			//}
			merged_waveform_buffer[i] *= (short)(warping_factor * norm_val * (merged_waveform_buffer[i] - half_val));
		} // i loop.

		char cur_chr_wav_fp[1000];
		sprintf(cur_chr_wav_fp, "%s.wav", chr_ids->at(i_chr));
		FILE * f_wave = wavfile_open(cur_chr_wav_fp);
		fprintf(stderr, "Opened WAV file.\n");
		if(f_wave == NULL) 
		{
			fprintf(stderr, "couldn't open %s for writing.", cur_chr_wav_fp);
			exit(0);
		}

		fprintf(stderr, "Writing WAV file.\n");
		wavfile_write(f_wave,merged_waveform_buffer,l_profile);
		fprintf(stderr, "Closing WAV file.\n");
		wavfile_close(f_wave);
		fprintf(stderr, "Done!\n");

		delete [] merged_waveform_buffer;
		delete scales_per_i_scale;
		delete [] signal_profile;
		//delete [] control_profile;
		delete [] mapability_aware_smoothed_signal_profile;
	} // i_chr loop.
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1058, %rsp           # imm = 0x1058
movsd %xmm3, 0x68(%rsp)
movl %r8d, %ebp
movsd %xmm2, 0x80(%rsp)
movsd %xmm1, 0x78(%rsp)
movsd %xmm0, 0x70(%rsp)
movq %rdx, %r12
movl %esi, 0x48(%rsp)
movq %rdi, %rdx
leaq 0x1e9c1(%rip), %rsi     # 0x2a9de
leaq 0xc70(%rsp), %rbx
movq %rbx, %rdi
movq %rdx, 0x88(%rsp)
xorl %eax, %eax
callq 0x2080
movq %rbx, %rdi
callq 0x25af8
testq %rax, %rax
je 0xc759
movq %rax, %rbx
movq (%rax), %r15
movq 0x8(%rax), %rdx
subq %r15, %rdx
sarq $0x3, %rdx
testl %edx, %edx
jle 0xc719
movq 0x2cf78(%rip), %rax     # 0x38fe0
leaq 0x20b88(%rip), %r14     # 0x2cbf7
leaq 0xa0(%rsp), %r13
xorl %esi, %esi
cmpq %rsi, %rdx
jbe 0xc72b
movq (%rax), %rdi
movq (%r15,%rsi,8), %rdx
movq %rsi, 0x30(%rsp)
leaq 0x20afe(%rip), %rsi     # 0x2cb93
xorl %eax, %eax
callq 0x2250
movq 0x30(%rsp), %rsi
movq (%rbx), %r15
movq 0x8(%rbx), %rdx
subq %r15, %rdx
sarq $0x3, %rdx
cmpq %rsi, %rdx
jbe 0xc72b
movq (%r15,%rsi,8), %rax
cmpb $0x4d, (%rax)
jne 0xc0de
cmpb $0x0, 0x1(%rax)
jne 0xc0de
incq %rsi
movslq %edx, %rax
cmpq %rax, %rsi
movq 0x2cf09(%rip), %rax     # 0x38fe0
jl 0xc079
jmp 0xc719
movl %ebp, 0x28(%rsp)
movq %rbx, 0x40(%rsp)
movl $0x0, 0x24(%rsp)
movl $0x8f0d1810, %edi       # imm = 0x8F0D1810
movq %rsi, %rbp
callq 0x2040
movq %rax, %rbx
movq (%r15,%rbp,8), %rcx
leaq 0x880(%rsp), %r15
movq %r15, %rdi
leaq 0x1e923(%rip), %rsi     # 0x2aa38
movq 0x88(%rsp), %rdx
xorl %eax, %eax
callq 0x2080
leaq 0x24(%rsp), %rax
movq %rax, (%rsp)
movq %r15, %rdi
movl 0x48(%rsp), %esi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x11e1a300, %r9d       # imm = 0x11E1A300
callq 0x11f57
movslq 0x24(%rsp), %r15
cmpq $-0x2, %r15
leaq 0x10(,%r15,8), %rdi
movq $-0x1, %rax
cmovlq %rax, %rdi
callq 0x2040
movq %rax, %rbp
testq %r15, %r15
jle 0xc184
leaq 0x8(%rbp), %rdi
leaq 0x8(%rbx), %rsi
shlq $0x3, %r15
movq %r15, %rdx
callq 0x2130
movq %rbx, %rdi
callq 0x2220
movq 0x40(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movq 0x30(%rsp), %rsi
cmpq %rsi, %rdx
jbe 0xc72b
movq (%rax,%rsi,8), %rcx
leaq 0x490(%rsp), %rbx
movq %rbx, %rdi
leaq 0x1edd0(%rip), %rsi     # 0x2af93
movq %r12, %rdx
xorl %eax, %eax
callq 0x2080
movl $0x0, 0x2c(%rsp)
movq %rbx, %rdi
callq 0x25d35
testb %al, %al
movq %r12, 0x60(%rsp)
movq %rbp, 0x50(%rsp)
je 0xc236
movq %rbx, %rdi
leaq 0x2c(%rsp), %rsi
callq 0x1ccbd
movq %rax, %r15
movslq 0x2c(%rsp), %r12
cmpq $-0x2, %r12
leaq 0x10(,%r12,8), %rdi
movq $-0x1, %rax
cmovlq %rax, %rdi
callq 0x2040
movq %rax, %rbx
testq %r12, %r12
jg 0xc29f
testq %r15, %r15
movl 0x28(%rsp), %ebp
jne 0xc2d3
jmp 0xc2db
movq 0x2cda3(%rip), %rax     # 0x38fe0
movq (%rax), %rcx
movl $0x37, %esi
movl $0x1, %edx
leaq 0x2096e(%rip), %rdi     # 0x2cbbf
callq 0x2340
movslq 0x24(%rsp), %rbx
cmpq $-0x2, %rbx
leaq 0x10(,%rbx,8), %rdi
movq $-0x1, %rax
cmovlq %rax, %rdi
callq 0x2040
movq %rax, %r15
testq %rbx, %rbx
jle 0xc316
movq %r15, %rdi
addq $0x8, %rdi
addq $0x8, %rbp
movq %rbx, %rdx
shlq $0x3, %rdx
movq %rbp, %rsi
callq 0x2130
jmp 0xc316
movl %r12d, %eax
incq %rax
movl $0x1, %ecx
movl 0x28(%rsp), %ebp
movsd 0x1dd6a(%rip), %xmm1    # 0x2a020
movzbl (%r15,%rcx), %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rbx,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0xc2b6
movq %r15, %rdi
callq 0x2220
cmpb $0x1, 0x2cee8(%rip)     # 0x391ca
jne 0xc2e9
callq 0x3405
movl 0x24(%rsp), %esi
movl 0x2c(%rsp), %ecx
movq 0x50(%rsp), %rdi
movq %rbx, %rdx
movsd 0x68(%rsp), %xmm0
movl %ebp, %r8d
callq 0x14fd4
movq %rax, %r15
movq %rbx, %rdi
callq 0x2220
movl 0x24(%rsp), %ebx
movl $0x18, %edi
callq 0x2180
movq %rax, %r12
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %r14, 0x18(%rsp)
movupd %xmm0, 0x8(%rsp)
movl $0x0, (%rsp)
movq %r15, 0x58(%rsp)
movq %r15, %rdi
movl %ebx, %esi
movsd 0x70(%rsp), %xmm0
movsd 0x78(%rsp), %xmm1
movsd 0x80(%rsp), %xmm2
movq %rax, %rdx
movl $0x1, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1401e
movq %rax, 0x38(%rsp)
movslq 0x24(%rsp), %rbx
cmpq $-0x2, %rbx
leaq 0x4(%rbx,%rbx), %rdi
movq $-0x1, %rax
cmovlq %rax, %rdi
callq 0x2040
movq %rax, %r15
addq %rbx, %rbx
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x20f0
movq 0x8(%r12), %rax
subq (%r12), %rax
shrq $0x3, %rax
testl %eax, %eax
jle 0xc458
xorl %ebx, %ebx
movq %r13, %rdi
leaq 0x2082e(%rip), %rsi     # 0x2cbfc
movq %r14, %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x2080
movq %r13, %rdi
callq 0x25d35
testb %al, %al
je 0xc441
movq %r13, %rdi
leaq 0x4c(%rsp), %rsi
callq 0x1d28c
movq %rax, %rbp
movl 0x4c(%rsp), %ecx
movl 0x24(%rsp), %eax
cmpl %eax, %ecx
cmovll %ecx, %eax
cmpl $0x2, %eax
jl 0xc42c
movl %eax, %eax
movl $0x1, %ecx
cvttsd2si (%rbp,%rcx,8), %edx
addw %dx, (%r15,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0xc40f
movq %r13, %rdi
callq 0x2310
jmp 0xc439
movq %r13, %rdi
callq 0x2310
testq %rbp, %rbp
je 0xc441
movq %rbp, %rdi
callq 0x2220
incl %ebx
movq 0x8(%r12), %rax
subq (%r12), %rax
shrq $0x3, %rax
cmpl %eax, %ebx
jl 0xc3c4
movq 0x38(%rsp), %rbx
testq %rbx, %rbx
je 0xc476
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xc476
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2190
movl $0x18, %esi
movq %rbx, %rdi
callq 0x2190
movq 0x2cb56(%rip), %rax     # 0x38fe0
movq (%rax), %rcx
movl $0x12, %esi
movl $0x1, %edx
leaq 0x2076e(%rip), %rdi     # 0x2cc0c
callq 0x2340
movslq 0x24(%rsp), %rax
testq %rax, %rax
jle 0xc5df
movw $0xea60, %cx            # imm = 0xEA60
xorl %esi, %esi
xorl %edx, %edx
movzwl (%r15,%rsi,2), %edi
cmpw %di, %dx
cmovlel %edi, %edx
cmpw %di, %cx
cmovgel %edi, %ecx
incq %rsi
cmpq %rsi, %rax
jne 0xc4b9
testl %eax, %eax
movapd 0x20504(%rip), %xmm2    # 0x2c9e0
movsd 0x1db24(%rip), %xmm3    # 0x2a008
movsd 0x1db6c(%rip), %xmm4    # 0x2a058
jle 0xc5df
movzwl %dx, %eax
movswl %cx, %ecx
movl %eax, %edx
subl %ecx, %edx
addl %eax, %ecx
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
cvtsi2sd %edx, %xmm0
movsd 0x2049d(%rip), %xmm1    # 0x2c9b0
divsd %xmm0, %xmm1
movsd %xmm1, 0x90(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x38(%rsp)
xorl %ebx, %ebx
movswl (%r15,%rbx,2), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x38(%rsp), %xmm1
subsd %xmm1, %xmm0
divsd %xmm1, %xmm0
andpd %xmm2, %xmm0
movapd %xmm3, %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x98(%rsp)
mulsd %xmm1, %xmm1
movapd %xmm3, %xmm0
subsd %xmm1, %xmm0
movaps %xmm4, %xmm1
callq 0x22d0
movsd 0x1dad6(%rip), %xmm1    # 0x2a050
movsd 0x1dad6(%rip), %xmm4    # 0x2a058
movsd 0x1da7e(%rip), %xmm3    # 0x2a008
movapd 0x2044e(%rip), %xmm2    # 0x2c9e0
movsd 0x98(%rsp), %xmm5
addsd %xmm1, %xmm5
divsd %xmm5, %xmm0
mulsd 0x90(%rsp), %xmm0
movswl (%r15,%rbx,2), %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
subsd 0x38(%rsp), %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %ecx
imull %eax, %ecx
movw %cx, (%r15,%rbx,2)
incq %rbx
movslq 0x24(%rsp), %rax
cmpq %rax, %rbx
jl 0xc52f
movq 0x40(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movq 0x30(%rsp), %rsi
cmpq %rsi, %rdx
jbe 0xc72b
movq (%rax,%rsi,8), %rdx
movq %r13, %rdi
leaq 0x20611(%rip), %rsi     # 0x2cc1f
xorl %eax, %eax
callq 0x2080
movq %r13, %rdi
callq 0x29ea0
movq %rax, %rbx
movq 0x2c9b9(%rip), %rbp     # 0x38fe0
movq (%rbp), %rcx
movl $0x11, %esi
movl $0x1, %edx
leaq 0x205ea(%rip), %rdi     # 0x2cc26
callq 0x2340
movq (%rbp), %rcx
testq %rbx, %rbx
je 0xc739
movl $0x12, %esi
movl $0x1, %edx
leaq 0x205f7(%rip), %rdi     # 0x2cc56
callq 0x2340
movl 0x24(%rsp), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x29f19
movq (%rbp), %rcx
movl $0x12, %esi
movl $0x1, %edx
leaq 0x205e1(%rip), %rdi     # 0x2cc69
callq 0x2340
movq %rbx, %rdi
callq 0x29f2f
movq (%rbp), %rcx
movl $0x6, %esi
movl $0x1, %edx
leaq 0x205d2(%rip), %rdi     # 0x2cc7c
callq 0x2340
movq %r15, %rdi
callq 0x2220
movq (%r12), %rdi
testq %rdi, %rdi
je 0xc6cd
movq 0x10(%r12), %rsi
subq %rdi, %rsi
callq 0x2190
movl $0x18, %esi
movq %r12, %rdi
callq 0x2190
movq 0x50(%rsp), %rdi
callq 0x2220
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
movq 0x40(%rsp), %rbx
je 0xc6f8
callq 0x2220
movq (%rbx), %r15
movq 0x8(%rbx), %rdx
subq %r15, %rdx
sarq $0x3, %rdx
movl 0x28(%rsp), %ebp
movq 0x60(%rsp), %r12
movq 0x30(%rsp), %rsi
jmp 0xc0c7
addq $0x1058, %rsp           # imm = 0x1058
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2019e(%rip), %rdi     # 0x2c8d0
xorl %eax, %eax
callq 0x2270
leaq 0x204f8(%rip), %rsi     # 0x2cc38
leaq 0xa0(%rsp), %rdx
movq %rcx, %rdi
xorl %eax, %eax
callq 0x2250
xorl %edi, %edi
callq 0x21e0
callq 0x3427