// File: /workspace/github_cpp_makefile_star2_O2/gersteinlab[P]MUSIC/src/ms_filter_utils.cpp
// Function: multiscale_avg_filter_data(double*, int, double, double, double, std::vector<double, std::allocator<double>>*, bool, bool, bool, std::vector<std::vector<t_annot_region*, std::allocator<t_annot_region*>>*, std::allocator<std::vector<t_annot_region*, std::allocator<t_annot_region*>>*>>*, std::vector<std::vector<t_annot_region*, std::allocator<t_annot_region*>>*, std::allocator<std::vector<t_annot_region*, std::allocator<t_annot_region*>>*>>*, char*)
vector<double*>* multiscale_avg_filter_data(double* track_data, 
	int l_track_data, 
	double scale_start, double scale_end, double log_scale_step, 
	vector<double>* scales_per_i_scale,
	bool dump_decomposition,
	bool compute_extrema_regions,
	bool dump_extrema_regions,
	vector<vector<t_annot_region*>*>* per_scale_minima_regions, 
	vector<vector<t_annot_region*>*>* per_scale_maxima_regions,
	char* op_file_prefix)
{
	vector<double*>* decomps = new vector<double*>();

	// Start from the first scale, go over all the scales and filter the data.
	double scale = 1.0 / log_scale_step;
	int i_scale = 0;
	while(1)
	{
		scale *= log_scale_step;

		scales_per_i_scale->push_back(scale);

		// Are we going to process a scale within the requested limits? If not, we will skip this computation to save time.
		if(scale < scale_start)
		{
			decomps->push_back(NULL);

			if(compute_extrema_regions)
			{
				if(per_scale_minima_regions != NULL)
				{
					per_scale_minima_regions->push_back(new vector<t_annot_region*>());
				}

				if(per_scale_maxima_regions != NULL)
				{
					per_scale_maxima_regions->push_back(new vector<t_annot_region*>());
				}
			}

			i_scale++;
			continue;
		}
		else
		{
if(__DUMP_FILTER_MSGS__)
{
			fprintf(stderr, "Processing scale %lf (%lf)\n", scale, scale_end);
}

			// Get the filter for the current scale: The gaussian filter.
			int int_scale = (int)(scale);
			int l_averaging_win = ((int_scale % 2) == 1)?(int_scale-1):(int_scale);

			// Do copying from start to end.
			double* cur_filtered_track = new double[l_track_data + 2];

			int n_signal_wins = 0;
			int half_l_averaging = l_averaging_win / 2;

			// Initialize the current pdf.
			//int* cur_win_pdf = NULL;
			//int cur_win_max = 0;
			//int cur_win_min = 1000*1000;
			//double* cur_win_vals = new double[l_averaging_win + 2];
			int prev_avg_start = 0;
			int prev_avg_end = 0;

			// Go over all the positions as the middle of the filtering window.
			double cur_win_total = -123123;
			for(int cur_win_mid = 0; cur_win_mid < l_track_data; cur_win_mid++)
			{
				int cur_avg_start = (cur_win_mid > half_l_averaging)?(cur_win_mid - half_l_averaging):(1);
				int cur_avg_end = (cur_win_mid + half_l_averaging <= l_track_data)?(cur_win_mid + half_l_averaging):(l_track_data);
				if(cur_win_total == -123123)
				{
					// Get the total by a loop for the current window.
					cur_win_total = 0.0;
					for(int i = cur_avg_start; i <= cur_avg_end; i++)
					{
						cur_win_total += track_data[i];
					} // i loop.
				} // cur_win_pdf is NULL check.
				else
				{
					// Remove the old values from the pdf, add the new values.
					for(int i = prev_avg_start; i < cur_avg_start; i++)
					{
						cur_win_total -= track_data[i];
					} // i loop.

					// Update the min and max only for the values that are new in this window.
					for(int i = prev_avg_end+1; i <= cur_avg_end; i++)
					{
						cur_win_total += track_data[i];
					}
				} // cur_win_pdf is NULL check.

				// Set the median.
				cur_filtered_track[cur_win_mid] = cur_win_total / l_averaging_win;

				// Update the previous averaging window limits.
				prev_avg_start = cur_avg_start;
				prev_avg_end = cur_avg_end;

#undef _MANUAL_TOTAL_CHECK_
#ifdef _MANUAL_TOTAL_CHECK_
				// Get the median via qsort and compare as a sanity check.
				double manual_total = 0.0;
				for(int i = cur_avg_start; i <= cur_avg_end; i++)
				{
					manual_total += track_data[i];
				} // i loop.

				if(manual_total != cur_win_total)
				{
					fprintf(stderr, "Sanity check failed at manual total check, %s(%d)\n", __FILE__, __LINE__);
					exit(0);
				}
#endif // _MANUAL_TOTAL_CHECK_

				n_signal_wins++;
			} // main signal filtering loop.

			// Copy the data.
			if(dump_decomposition)
			{
				// Dump and free memory.
				char cur_decomp_fp[1000];
				//sprintf(cur_decomp_fp, "decomp_%d_%d_%d.bin", i_scale, cur_win_start, cur_win_start + cur_l_win);
				sprintf(cur_decomp_fp, "%s_scale_%d.bin", op_file_prefix, i_scale);
				fprintf(stderr, "Dumping %s\n", cur_decomp_fp);
				double* _cur_filtered_track = get_one_indexed_per_zero_indexed_data(cur_filtered_track, l_track_data);
				dump_per_nucleotide_binary_profile(_cur_filtered_track, l_track_data, cur_decomp_fp);
				fprintf(stderr, "Closing file\n");

				// Clean track memory.
				delete [] _cur_filtered_track;
				delete [] cur_filtered_track;
			}
			else if(compute_extrema_regions)
			{
if(__DUMP_FILTER_MSGS__)
				fprintf(stderr, "Getting the extrema regions.\n");

				// Get the extrema regions for the current filtered regions.
				vector<t_extrema_node*>* maxima = new vector<t_extrema_node*>();
				vector<t_extrema_node*>* minima = new vector<t_extrema_node*>();
				int* derivative_map = new int[l_track_data+2];
				memset(derivative_map, 0, sizeof(int) * (l_track_data+2));
				get_extrema_per_plateaus(cur_filtered_track, l_track_data, maxima, minima, derivative_map, 0);

				// Sort the extremas.
				sort(minima->begin(), minima->end(), sort_extremas_per_posn);
				sort(maxima->begin(), maxima->end(), sort_extremas_per_posn);

				if(dump_extrema_regions)
				{
					// Get the minima and maxima, then dump.
					char cur_minima_regs_fp[1000];
					char cur_maxima_regs_fp[1000];
					sprintf(cur_minima_regs_fp, "%s_scale_%d_mins.bed", op_file_prefix, i_scale);
					sprintf(cur_maxima_regs_fp, "%s_scale_%d_maxes.bed", op_file_prefix, i_scale);

					fprintf(stderr, "Dumping the extrema regions.\n");
					FILE* f_maxes = open_f(cur_maxima_regs_fp, "w");
					for(int i_m = 0; i_m < (int)maxima->size(); i_m++)
					{
						fprintf(f_maxes, "XX\t%d\t%d\n", translate_coord(maxima->at(i_m)->extrema_posn+1, CODEBASE_COORDS::start_base, BED_COORDS::start_base),
							translate_coord(maxima->at(i_m)->extrema_posn+1, CODEBASE_COORDS::end_base, BED_COORDS::end_base));
					} // i_m loop.
					fclose(f_maxes);

					FILE* f_mins = open_f(cur_minima_regs_fp, "w");
					for(int i_m = 0; i_m < (int)minima->size()-1; i_m++)
					{
						fprintf(f_mins, "XX\t%d\t%d\n", translate_coord(minima->at(i_m)->extrema_posn+1, CODEBASE_COORDS::start_base, BED_COORDS::start_base),
							translate_coord(minima->at(i_m+1)->extrema_posn+1, CODEBASE_COORDS::end_base, BED_COORDS::end_base));
					} // i_m loop.
					fclose(f_mins);
				}

				if(per_scale_minima_regions != NULL)
				{
					vector<t_annot_region*>* cur_scale_minima_regions = new vector<t_annot_region*>();
					for(int i_m = 0; i_m < (int)minima->size()-1; i_m++)
					{
						t_annot_region* new_minima = get_empty_region();
						new_minima->chrom = t_string::copy_me_str("XX");
						new_minima->start = translate_coord(minima->at(i_m)->extrema_posn+1, CODEBASE_COORDS::start_base, BED_COORDS::start_base);
						new_minima->end = translate_coord(minima->at(i_m+1)->extrema_posn+1, CODEBASE_COORDS::end_base, BED_COORDS::end_base);
						new_minima->strand = '+';

						cur_scale_minima_regions->push_back(new_minima);
					} // i_min loop.

					per_scale_minima_regions->push_back(cur_scale_minima_regions);
				}
			
				if(per_scale_maxima_regions != NULL)
				{
					vector<t_annot_region*>* cur_scale_maxima_regions = new vector<t_annot_region*>();
					for(int i_m = 0; i_m < (int)maxima->size(); i_m++)
					{
						t_annot_region* new_maxima = get_empty_region();
						new_maxima->chrom = t_string::copy_me_str("XX");
						new_maxima->start = translate_coord(maxima->at(i_m)->extrema_posn+1, CODEBASE_COORDS::start_base, BED_COORDS::start_base);
						new_maxima->end = translate_coord(maxima->at(i_m+1)->extrema_posn+1, CODEBASE_COORDS::end_base, BED_COORDS::end_base);
						new_maxima->strand = '+';

						cur_scale_maxima_regions->push_back(new_maxima);
					} // i_m loop.

					per_scale_maxima_regions->push_back(cur_scale_maxima_regions);
				}

				delete_extrema_nodes(minima);
				delete_extrema_nodes(maxima);
			
				// Free the current decomposition.
				delete [] derivative_map;
				delete [] cur_filtered_track;
			}
			else
			{
				// Store the decompositions.
				decomps->push_back(cur_filtered_track);
			}

			// Was the last processed value equal to or larger than what was requested?
			if(scale_end > 0 && 
				scale >= scale_end)
			{
				break;
			}

			i_scale++;
		} // scale computation check.
	} // scale loop.

	return(decomps);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x858, %rsp            # imm = 0x858
movl %r9d, 0x38(%rsp)
movl %r8d, %r15d
movl %ecx, 0x3c(%rsp)
movq %rdx, %rbx
movsd %xmm2, 0x48(%rsp)
movsd %xmm1, 0x40(%rsp)
movsd %xmm0, 0x78(%rsp)
movl %esi, %r12d
movq %rdi, %r13
pushq $0x18
popq %rdi
callq 0x2170
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rax, 0x28(%rsp)
andq $0x0, 0x10(%rax)
movsd 0x1438d(%rip), %xmm0    # 0x24008
divsd 0x48(%rsp), %xmm0
movslq %r12d, %rax
cmpl $-0x2, %eax
leaq 0x10(,%rax,8), %rcx
pushq $-0x1
popq %rdx
cmovlq %rdx, %rcx
movq %rcx, 0x70(%rsp)
leaq 0x8(,%rax,4), %rcx
movq %rcx, 0x50(%rsp)
cmovgeq %rcx, %rdx
movq %rdx, 0x58(%rsp)
testl %eax, %eax
movl $0x0, %eax
cmovgl %r12d, %eax
movq %rax, 0x68(%rsp)
pushq $0x2
popq %r14
xorl %ebp, %ebp
movq %rbx, 0x20(%rsp)
movl %r15d, 0x34(%rsp)
mulsd 0x48(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %rbx, %rdi
leaq 0x18(%rsp), %rsi
callq 0x7426
movsd 0x18(%rsp), %xmm0
movsd 0x78(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0xfdbd
andq $0x0, 0x80(%rsp)
movq 0x28(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x11a1a
testb %r15b, %r15b
je 0xfdb2
movl %r15d, %ebx
movl %r14d, %r15d
movl %ebp, %r14d
movq 0x890(%rsp), %rbp
testq %rbp, %rbp
je 0xfd67
pushq $0x18
popq %rdi
callq 0x2170
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movq %rax, 0x80(%rsp)
movq %rbp, %rdi
leaq 0x80(%rsp), %rsi
callq 0x11b96
cmpq $0x0, 0x898(%rsp)
movl %r14d, %ebp
movl %r15d, %r14d
movl %ebx, %r15d
movq 0x20(%rsp), %rbx
je 0xfdb2
pushq $0x18
popq %rdi
callq 0x2170
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movq %rax, 0x80(%rsp)
movq 0x898(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x11b96
movsd 0x18(%rsp), %xmm0
jmp 0x10186
cmpb $0x1, 0x25401(%rip)     # 0x351c5
movl %ebp, 0x4(%rsp)
je 0x1018d
cvttsd2si %xmm0, %ebp
movl %ebp, %eax
andl $0x80000001, %eax       # imm = 0x80000001
xorl %ecx, %ecx
cmpl $0x1, %eax
sete %cl
subl %ecx, %ebp
movq 0x70(%rsp), %rdi
callq 0x2040
movq %rax, %rbx
movq %rax, 0x10(%rsp)
movl %ebp, %eax
cltd
idivl %r14d
cvtsi2sd %ebp, %xmm0
cltq
xorl %ecx, %ecx
movsd 0x177fd(%rip), %xmm3    # 0x27608
movapd %xmm3, %xmm1
xorl %r8d, %r8d
xorl %r10d, %r10d
movq 0x68(%rsp), %r11
pushq $0x1
popq %rbp
cmpq %r11, %rcx
je 0xfe99
movl %ecx, %edx
subl %eax, %edx
cmpq %rax, %rcx
cmovlel %ebp, %edx
leal (%rax,%rcx), %esi
cmpl %r12d, %esi
cmovgel %r12d, %esi
ucomisd %xmm3, %xmm1
movslq %edx, %r9
movslq %esi, %rdi
jne 0xfe44
jnp 0xfe6c
movslq %r10d, %r10
cmpq %r9, %r10
jge 0xfe58
subsd (%r13,%r10,8), %xmm1
incq %r10
jmp 0xfe47
movslq %r8d, %r8
cmpq %rdi, %r8
jge 0xfe81
addsd 0x8(%r13,%r8,8), %xmm1
incq %r8
jmp 0xfe5b
xorpd %xmm1, %xmm1
cmpq %rdi, %r9
jg 0xfe81
addsd (%r13,%r9,8), %xmm1
incq %r9
jmp 0xfe70
movapd %xmm1, %xmm2
divsd %xmm0, %xmm2
movsd %xmm2, (%rbx,%rcx,8)
incq %rcx
movl %esi, %r8d
movl %edx, %r10d
jmp 0xfe1d
cmpb $0x0, 0x3c(%rsp)
jne 0x101b6
testb %r15b, %r15b
je 0x1002b
cmpb $0x1, 0x25311(%rip)     # 0x351c5
je 0x10253
pushq $0x18
popq %rbp
movq %rbp, %rdi
callq 0x2170
movq %rax, %r15
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movq %rbp, %rdi
callq 0x2170
movq %rax, %rbp
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movq 0x58(%rsp), %rdi
callq 0x2040
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq 0x50(%rsp), %rdx
callq 0x20f0
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
movq %rbp, %rcx
movq %r14, 0x60(%rsp)
movq %r14, %r8
xorl %r9d, %r9d
callq 0x1ea88
movq (%rbp), %rdi
movq 0x8(%rbp), %rsi
leaq 0xeb49(%rip), %rbx      # 0x1ea7d
movq %rbx, %rdx
callq 0xd2d0
movq (%r15), %rdi
movq 0x8(%r15), %rsi
movq %rbx, %rdx
callq 0xd2d0
cmpb $0x0, 0x38(%rsp)
pushq $0x2
popq %r14
jne 0x10279
cmpq $0x0, 0x890(%rsp)
je 0x1005d
pushq $0x18
popq %rdi
callq 0x2170
andq $0x0, 0x10(%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movq %rax, 0x80(%rsp)
xorl %ebx, %ebx
movq 0x8(%rbp), %rax
subq (%rbp), %rax
shlq $0x1d, %rax
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
addq %rcx, %rax
sarq $0x20, %rax
cmpq %rax, %rbx
jge 0x10048
callq 0x11e71
movq %rax, 0x470(%rsp)
leaq 0x17738(%rip), %rdi     # 0x276fa
callq 0x21062
movq 0x470(%rsp), %rcx
movq %rax, (%rcx)
movq %rbp, %rdi
movq %rbx, %rsi
callq 0xcfc8
movq (%rax), %rax
movl (%rax), %eax
movq 0x470(%rsp), %rcx
movl %eax, 0xc(%rcx)
incq %rbx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0xcfc8
movq (%rax), %rax
movl (%rax), %eax
incl %eax
movq 0x470(%rsp), %rcx
movl %eax, 0x20(%rcx)
movb $0x2b, 0x8(%rcx)
movq 0x80(%rsp), %rdi
leaq 0x470(%rsp), %rsi
callq 0x7448
jmp 0xff88
movq 0x28(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x119da
movq 0x20(%rsp), %rbx
movl 0x4(%rsp), %ebp
jmp 0x10166
movq 0x890(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0xcfaa
cmpq $0x0, 0x898(%rsp)
je 0x1012f
pushq $0x18
popq %rdi
callq 0x2170
andq $0x0, 0x10(%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movq %rax, 0x80(%rsp)
xorl %ebx, %ebx
movq 0x8(%r15), %rax
subq (%r15), %rax
shrq $0x3, %rax
cltq
cmpq %rax, %rbx
jge 0x1011a
callq 0x11e71
movq %rax, 0x470(%rsp)
leaq 0x17649(%rip), %rdi     # 0x276fa
callq 0x21062
movq 0x470(%rsp), %rcx
movq %rax, (%rcx)
movq %r15, %rdi
movq %rbx, %rsi
callq 0xcfc8
movq (%rax), %rax
movl (%rax), %eax
movq 0x470(%rsp), %rcx
movl %eax, 0xc(%rcx)
incq %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xcfc8
movq (%rax), %rax
movl (%rax), %eax
incl %eax
movq 0x470(%rsp), %rcx
movl %eax, 0x20(%rcx)
movb $0x2b, 0x8(%rcx)
movq 0x80(%rsp), %rdi
leaq 0x470(%rsp), %rsi
callq 0x7448
jmp 0x1008b
movq 0x898(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0xcfaa
movq %rbp, %rdi
callq 0x1f2b3
movq %r15, %rdi
callq 0x1f2b3
movq 0x60(%rsp), %rdi
callq 0x2210
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
movl 0x34(%rsp), %r15d
movq 0x20(%rsp), %rbx
movl 0x4(%rsp), %ebp
je 0x10166
callq 0x2210
movsd 0x40(%rsp), %xmm1
ucomisd 0x13f3c(%rip), %xmm1    # 0x240b0
movsd 0x18(%rsp), %xmm0
jbe 0x10186
ucomisd %xmm1, %xmm0
jae 0x103da
incl %ebp
jmp 0xfcd1
movq 0x24e4c(%rip), %rax     # 0x34fe0
movq (%rax), %rdi
leaq 0x174b5(%rip), %rsi     # 0x27653
movsd 0x40(%rsp), %xmm1
movb $0x2, %al
callq 0x2240
movsd 0x18(%rsp), %xmm0
jmp 0xfdce
leaq 0x80(%rsp), %rbp
movq %rbp, %rdi
leaq 0x16a34(%rip), %rsi     # 0x26bfc
movq 0x8a0(%rsp), %rdx
movl 0x4(%rsp), %ecx
xorl %eax, %eax
callq 0x2080
movq 0x24dfe(%rip), %r14     # 0x34fe0
movq (%r14), %rdi
leaq 0x17483(%rip), %rsi     # 0x2766f
movq %rbp, %rdx
xorl %eax, %eax
callq 0x2240
movq 0x10(%rsp), %rdi
movl %r12d, %esi
callq 0x18756
movq %rax, %rbx
movq %rax, %rdi
movl %r12d, %esi
movq %rbp, %rdx
callq 0x18dfd
movq (%r14), %rcx
leaq 0x1745d(%rip), %rdi     # 0x2767b
pushq $0xd
popq %rsi
pushq $0x1
popq %rdx
callq 0x2330
testq %rbx, %rbx
je 0x10236
movq %rbx, %rdi
callq 0x2210
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x10245
callq 0x2210
movq 0x20(%rsp), %rbx
pushq $0x2
popq %r14
jmp 0x1003f
movq 0x24d86(%rip), %rax     # 0x34fe0
movq (%rax), %rcx
leaq 0x17425(%rip), %rdi     # 0x27689
pushq $0x1d
popq %rsi
pushq $0x1
popq %rdx
callq 0x2330
movq 0x10(%rsp), %rbx
jmp 0xfeba
leaq 0x80(%rsp), %rdi
leaq 0x1741f(%rip), %rsi     # 0x276a7
movq 0x8a0(%rsp), %rdx
movl 0x4(%rsp), %ebx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x2080
leaq 0x470(%rsp), %r14
movq %r14, %rdi
leaq 0x1740d(%rip), %rsi     # 0x276bc
movq 0x8a0(%rsp), %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x2080
movq 0x24d19(%rip), %rax     # 0x34fe0
movq (%rax), %rcx
leaq 0x17401(%rip), %rdi     # 0x276d2
pushq $0x1d
popq %rsi
pushq $0x1
popq %rdx
callq 0x2330
movq %r14, %rdi
leaq 0x147c2(%rip), %rsi     # 0x24aa8
callq 0x2027c
movq %rax, 0x8(%rsp)
xorl %ebx, %ebx
movq 0x8(%r15), %rax
subq (%r15), %rax
shrq $0x3, %rax
cltq
cmpq %rax, %rbx
jge 0x10342
movq %r15, %rdi
movq %rbx, %rsi
callq 0xcfc8
movq (%rax), %rax
movl (%rax), %r14d
movq %r15, %rdi
movq %rbx, %rsi
callq 0xcfc8
movq (%rax), %rax
movl (%rax), %ecx
incl %ecx
movq 0x8(%rsp), %rdi
leaq 0x173bd(%rip), %rsi     # 0x276f0
movl %r14d, %edx
xorl %eax, %eax
callq 0x2240
incq %rbx
jmp 0x102f2
movq 0x8(%rsp), %rdi
callq 0x2160
leaq 0x80(%rsp), %rdi
leaq 0x1474d(%rip), %rsi     # 0x24aa8
callq 0x2027c
movq %rax, 0x8(%rsp)
xorl %ebx, %ebx
movq 0x8(%rbp), %rax
subq (%rbp), %rax
shlq $0x1d, %rax
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
addq %rcx, %rax
sarq $0x20, %rax
cmpq %rax, %rbx
jge 0x103c7
movq %rbp, %rdi
movq %rbx, %rsi
callq 0xcfc8
movq (%rax), %rax
movl (%rax), %r14d
incq %rbx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0xcfc8
movq (%rax), %rax
movl (%rax), %ecx
incl %ecx
movq 0x8(%rsp), %rdi
leaq 0x17335(%rip), %rsi     # 0x276f0
movl %r14d, %edx
xorl %eax, %eax
callq 0x2240
jmp 0x10367
movq 0x8(%rsp), %rdi
callq 0x2160
pushq $0x2
popq %r14
jmp 0xff5a
movq 0x28(%rsp), %rax
addq $0x858, %rsp            # imm = 0x858
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq