// File: /workspace/github_cpp_makefile_star2_O3/rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::apply_artistic_effect(char const*, char const*, int, int, float, float, float, int, int, int, int)
void ImageProc::apply_artistic_effect(const char *infile, const char *outfile, int width, int height, float tau, float epsilon, float phi, int window_size, int sigma_dist, int sigma_simi, int iter)
{
	Image img_orig("color", width, height);
	Image img_orig_rgb("color", width, height);
	Image img_orig_bw("bw", width, height);
	Image img_orig_bw_bf("bw", width, height);
	Image img_modified("bw", width, height);
	Image img_bilateral_color("color", width, height);
	Image img_modified_color("color", width, height);
	img_orig.read_image(infile, img_orig.cols, img_orig.rows);

	for(int i = 0; i < img_orig.rows; i++)
		for(int j = 0; j < img_orig.cols; j++)
			img_orig_bw.setvalue(i,j,0,((img_orig.getvalue(i,j,0)*0.21)\
								  	   +(img_orig.getvalue(i,j,1)*0.72)\
								  	   +(img_orig.getvalue(i,j,2)*0.07)));

	//rgb2cielab(img_orig, img_modified);

	//	//Bilateral Filter
	for(int i = 0; i < iter; i++)
	{
		bilateral_filter(img_orig, img_bilateral_color, window_size, sigma_dist, sigma_simi);
		for(int i = 0; i < img_orig.rows; i++)
		 	for(int j = 0; j < img_orig.cols; j++)
		 		for(int k = 0; k < img_orig.channels; k++)
			 	{
			 		img_orig.setvalue(i,j,k,img_bilateral_color.getvalue(i,j,k));
			 	}
	}

	img_bilateral_color.write_image("../output_images/bilateral_art_effect.raw", img_bilateral_color.cols, img_bilateral_color.rows);
	//cielab2rgb(img_modified_color2, img_orig_rgb);

	//img_modified_color.write_image(outfile, img_modified.cols, img_modified.rows);

	for(int i = 0; i < img_orig_bw.rows; i++)
		for(int j = 0; j < img_orig_bw.cols; j++)
			for(int k = 0; k < img_orig_bw.channels; k++)
				img_orig_bw.setvalue(i,j,k,((img_orig.getvalue(i,j,0)*0.21)\
									  +(img_orig.getvalue(i,j,1)*0.72)\
									  +(img_orig.getvalue(i,j,2)*0.07)));

	Image img_sigma_small("bw", width, height);
	Image img_sigma_large("bw", width, height);
	Image img_xDoG("bw", width, height);

	int sigma = 1;

	gaussian_filter(img_orig_bw, img_sigma_small, 9, sigma);
	gaussian_filter(img_orig_bw, img_sigma_large, 9, sigma*sqrt(1.6));

	for(int i = 0; i < img_orig.rows; i++)
		for(int j = 0; j < img_orig.cols; j++)
			for(int k = 0; k < img_orig.channels; k++)
				img_xDoG.setvalue(i,j,k,(int)((float)img_sigma_small.getvalue(i,j,k) - (float)(1.0*tau*img_sigma_large.getvalue(i,j,k))));
				//img_xDoG.setvalue(i,j,k,(int)((float)img_sigma_small.getvalue(i,j,k) - (float)(1.0*img_sigma_large.getvalue(i,j,k))));
	img_xDoG.write_image("../output_images/xDoG_art_effect.raw", img_xDoG.cols, img_xDoG.rows);

	float xDoG_val, value;
	for(int i = 0; i < img_orig.rows; i++)
		for(int j = 0; j < img_orig.cols; j++)
			for(int k = 0; k < img_orig.channels; k++)
			{
				value = (float)img_xDoG.getvalue(i,j,k)/255.0;
				if(value > epsilon)
					img_modified.setvalue(i,j,k,0);
				else
				{
					value = 1.0 + tanh(phi*(((float)img_sigma_small.getvalue(i,j,k) - (float)(1.0*tau*img_sigma_large.getvalue(i,j,k))) - epsilon));
					img_modified.setvalue(i,j,k,(int)(value*255.0));
				}

			}

	img_modified.write_image("../output_images/contours_art_effect.raw", img_modified.cols, img_modified.rows);

	for(int i = 0; i < img_orig.rows; i++)
		for(int j = 0; j < img_orig.cols; j++)
			for(int k = 0; k < img_orig.channels; k++)
				if(img_modified.getvalue(i,j,k) == 0)
					img_modified.setvalue(i,j,k,0);
				else
					img_modified.setvalue(i,j,k,1);

//	for(int i = 0; i < img_orig.rows; i++)
//		for(int j = 0; j < img_orig.cols; j++)
//			for(int k = 0; k < img_orig.channels; k++)
//				if(img_xDoG.getvalue(i,j,k) == 255)
//					img_modified.setvalue(i,j,k,0);
//				else
//					img_modified.setvalue(i,j,k,1);


	for(int i = 0; i < img_orig.rows; i++)
		for(int j = 0; j < img_orig.cols; j++)
			for(int k = 0; k < img_orig.channels; k++)
				img_modified_color.setvalue(i,j,k,(int)((img_bilateral_color.getvalue(i,j,k) * (img_modified.getvalue(i,j,0)))));
	img_modified_color.write_image(outfile, img_modified.cols, img_modified.rows);


}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movl %r9d, 0x4(%rsp)
movl %r8d, 0x8(%rsp)
movss %xmm2, 0x58(%rsp)
movss %xmm1, 0x68(%rsp)
movss %xmm0, 0x34(%rsp)
movl %ecx, %r14d
movl %edx, %r15d
movq %rsi, 0xf0(%rsp)
movq %rdi, %r12
leaq 0x436d(%rip), %rbp      # 0x116c8
leaq 0x90(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rsi
callq 0x4c56
leaq 0x1d8(%rsp), %rdi
movq %rbp, %rsi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x4c56
leaq 0x4ec8(%rip), %rbx      # 0x12253
leaq 0xd0(%rsp), %rdi
movq %rbx, %rsi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x4c56
leaq 0x1b8(%rsp), %rdi
movq %rbx, %rsi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x4c56
leaq 0xb0(%rsp), %rdi
movq %rbx, %rsi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x4c56
leaq 0x178(%rsp), %rdi
movq %rbp, %rsi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x4c56
leaq 0x198(%rsp), %rdi
movq %rbp, %rsi
movl %r15d, 0x50(%rsp)
movl %r15d, %edx
movl %r14d, 0xc(%rsp)
movl %r14d, %ecx
callq 0x4c56
movl 0x8(%r13), %eax
movq %rax, 0x10(%rsp)
movslq 0xc(%r13), %rbx
movq %r13, %rdi
movq %r12, %rsi
callq 0x4cb2
movq %rbx, 0x20(%rsp)
testq %rbx, %rbx
jle 0xd4f2
movq 0xa8(%rsp), %rax
movl 0xa0(%rsp), %ecx
movq 0xe8(%rsp), %rdx
movl 0xe0(%rsp), %esi
movq 0x10(%rsp), %rdi
imull %ecx, %edi
movl 0xd8(%rsp), %r8d
imull %esi, %r8d
xorl %r9d, %r9d
movsd 0x4032(%rip), %xmm0     # 0x11498
movsd 0x4032(%rip), %xmm1     # 0x114a0
movsd 0x4032(%rip), %xmm2     # 0x114a8
xorl %r10d, %r10d
xorl %r11d, %r11d
movq 0x10(%rsp), %r12
movq %r12, %rbx
movl %r9d, %r14d
movl %r10d, %r15d
testl %r12d, %r12d
jle 0xd4e2
movslq %r15d, %r15
movzbl (%rax,%r15), %ebp
xorps %xmm3, %xmm3
cvtsi2sd %ebp, %xmm3
movzbl 0x1(%rax,%r15), %ebp
xorps %xmm4, %xmm4
cvtsi2sd %ebp, %xmm4
mulsd %xmm0, %xmm4
mulsd %xmm1, %xmm3
addsd %xmm4, %xmm3
movzbl 0x2(%rax,%r15), %ebp
xorps %xmm4, %xmm4
cvtsi2sd %ebp, %xmm4
mulsd %xmm2, %xmm4
addsd %xmm3, %xmm4
cvttsd2si %xmm4, %ebp
movslq %r14d, %r14
movb %bpl, (%rdx,%r14)
addl %ecx, %r15d
addl %esi, %r14d
decq %rbx
jne 0xd48f
incq %r11
addl %edi, %r10d
addl %r8d, %r9d
cmpq 0x20(%rsp), %r11
jne 0xd481
cmpl $0x0, 0x238(%rsp)
jle 0xd5d9
leaq 0x90(%rsp), %rax
movl 0x10(%rax), %r15d
leaq 0x178(%rsp), %rcx
movq 0x18(%rcx), %r12
movl 0x8(%rcx), %ebp
movl 0x10(%rcx), %r13d
movq 0x18(%rax), %rbx
movq 0x10(%rsp), %rax
imull %r15d, %eax
movl %eax, 0x28(%rsp)
movl %ebp, 0x38(%rsp)
imull %r13d, %ebp
xorl %eax, %eax
movq %rax, 0x18(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x178(%rsp), %rsi
movl 0x8(%rsp), %edx
movl 0x4(%rsp), %ecx
movl 0x230(%rsp), %r8d
callq 0x9cbc
cmpl $0x0, 0x20(%rsp)
jle 0xd5c3
xorl %eax, %eax
xorl %ecx, %ecx
xorl %edx, %edx
cmpl $0x0, 0x10(%rsp)
jle 0xd5b3
movl %eax, %esi
movl %ecx, %edi
xorl %r8d, %r8d
testl %r15d, %r15d
jle 0xd5a3
movslq %edi, %r9
addq %rbx, %r9
movslq %esi, %r10
addq %r12, %r10
xorl %r11d, %r11d
movb (%r10,%r11), %r14b
movb %r14b, (%r9,%r11)
incq %r11
cmpq %r11, %r15
jne 0xd593
incq %r8
addl %r15d, %edi
addl %r13d, %esi
cmpq 0x10(%rsp), %r8
jne 0xd57f
incq %rdx
addl 0x28(%rsp), %ecx
addl %ebp, %eax
cmpq 0x20(%rsp), %rdx
jne 0xd571
movq 0x18(%rsp), %rax
incl %eax
cmpl 0x238(%rsp), %eax
jne 0xd53a
jmp 0xd5e4
movl 0x180(%rsp), %eax
movl %eax, 0x38(%rsp)
leaq 0x4337(%rip), %rsi      # 0x11922
leaq 0x178(%rsp), %rdi
callq 0x4dee
movslq 0xdc(%rsp), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
jle 0xd6e7
movl 0xd8(%rsp), %ecx
movl 0xe0(%rsp), %edx
movq 0xa8(%rsp), %rsi
movl 0xa0(%rsp), %edi
movq 0xe8(%rsp), %r8
movl %ecx, %r9d
imull %edx, %r9d
xorl %r10d, %r10d
movsd 0x3e53(%rip), %xmm0     # 0x11498
movsd 0x3e53(%rip), %xmm1     # 0x114a0
movsd 0x3e53(%rip), %xmm2     # 0x114a8
xorl %r11d, %r11d
testl %ecx, %ecx
jle 0xd6d6
movl %r11d, %ebx
imull 0x10(%rsp), %ebx
movl %r10d, %ebp
xorl %r14d, %r14d
testl %edx, %edx
jle 0xd6cc
movslq %ebp, %r15
addq %r8, %r15
leal (%rbx,%r14), %r12d
imull %edi, %r12d
movslq %r12d, %r12
xorl %r13d, %r13d
movzbl (%rsi,%r12), %eax
xorps %xmm3, %xmm3
cvtsi2sd %eax, %xmm3
movzbl 0x1(%rsi,%r12), %eax
xorps %xmm4, %xmm4
cvtsi2sd %eax, %xmm4
mulsd %xmm0, %xmm4
mulsd %xmm1, %xmm3
addsd %xmm4, %xmm3
movzbl 0x2(%rsi,%r12), %eax
xorps %xmm4, %xmm4
cvtsi2sd %eax, %xmm4
mulsd %xmm2, %xmm4
addsd %xmm3, %xmm4
cvttsd2si %xmm4, %eax
movb %al, (%r15,%r13)
incq %r13
cmpq %r13, %rdx
jne 0xd682
incq %r14
addl %edx, %ebp
cmpq %rcx, %r14
jne 0xd66a
incq %r11
addl %r9d, %r10d
cmpq 0x28(%rsp), %r11
jne 0xd658
leaq 0x4b65(%rip), %rbx      # 0x12253
leaq 0x158(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movl 0x50(%rsp), %r14d
movl %r14d, %edx
movl 0xc(%rsp), %ebp
movl %ebp, %ecx
callq 0x4c56
leaq 0x138(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x4c56
leaq 0x118(%rsp), %rdi
movq %rbx, %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x4c56
leaq 0xd0(%rsp), %rbx
movss 0x3f50(%rip), %xmm0     # 0x1169c
movq %rbx, %rdi
movq %r13, %rsi
movl $0x9, %edx
callq 0x8de0
movss 0x3f54(%rip), %xmm0     # 0x116b8
movq %rbx, %rdi
movq %r12, %rsi
movl $0x9, %edx
callq 0x8de0
cmpl $0x0, 0x20(%rsp)
jle 0xdcf7
movl 0xa0(%rsp), %eax
movq 0x170(%rsp), %rcx
movq %rcx, 0x28(%rsp)
movl 0x168(%rsp), %edx
xorps %xmm2, %xmm2
cvtss2sd 0x34(%rsp), %xmm2
movq 0x150(%rsp), %rsi
movl 0x148(%rsp), %edi
movq 0x130(%rsp), %r8
movl 0x120(%rsp), %ecx
movl 0x128(%rsp), %r9d
movl %ecx, 0x3c(%rsp)
imull %r9d, %ecx
movl %ecx, 0x50(%rsp)
movl 0x140(%rsp), %ecx
imull %edi, %ecx
movl %ecx, 0x34(%rsp)
movl 0x160(%rsp), %ecx
imull %edx, %ecx
movl %ecx, 0x4c(%rsp)
movq $0x0, 0x18(%rsp)
movl $0x0, 0x4(%rsp)
movl $0x0, 0x8(%rsp)
xorl %r10d, %r10d
movl %r10d, 0xc(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0xd88d
movq 0x18(%rsp), %rcx
movl %ecx, %r13d
movl 0x4(%rsp), %ebp
movl 0x8(%rsp), %r15d
xorl %ebx, %ebx
testl %eax, %eax
jle 0xd87b
movslq %r15d, %r14
addq %r8, %r14
movslq %ebp, %r10
addq %rsi, %r10
movslq %r13d, %r11
addq 0x28(%rsp), %r11
xorl %r12d, %r12d
movzbl (%r11,%r12), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movzbl (%r10,%r12), %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
mulsd %xmm2, %xmm1
cvtsd2ss %xmm1, %xmm1
subss %xmm1, %xmm0
cvttss2si %xmm0, %ecx
movb %cl, (%r14,%r12)
incq %r12
cmpq %r12, %rax
jne 0xd847
incq %rbx
addl %r9d, %r15d
addl %edi, %ebp
addl %edx, %r13d
cmpq 0x10(%rsp), %rbx
jne 0xd82c
movl 0xc(%rsp), %r10d
incl %r10d
movl 0x8(%rsp), %ecx
addl 0x50(%rsp), %ecx
movl %ecx, 0x8(%rsp)
movl 0x4(%rsp), %ecx
addl 0x34(%rsp), %ecx
movl %ecx, 0x4(%rsp)
movq 0x18(%rsp), %rcx
addl 0x4c(%rsp), %ecx
movq %rcx, 0x18(%rsp)
cmpl 0x20(%rsp), %r10d
jne 0xd80d
movsd %xmm2, 0x28(%rsp)
leaq 0x4079(%rip), %rsi      # 0x1194c
leaq 0x118(%rsp), %rdi
callq 0x4dee
cmpl $0x0, 0x20(%rsp)
jle 0xdd0b
movl 0xa0(%rsp), %r12d
movq 0x130(%rsp), %rax
movq %rax, 0x110(%rsp)
movl 0x128(%rsp), %ecx
movq 0x170(%rsp), %rax
movq %rax, 0x108(%rsp)
movl 0x168(%rsp), %edx
movq 0x150(%rsp), %rax
movq %rax, 0x100(%rsp)
movl 0x148(%rsp), %esi
movq 0xc8(%rsp), %rax
movq %rax, 0xf8(%rsp)
movl 0xb8(%rsp), %eax
movl 0xc0(%rsp), %edi
movl %eax, 0x64(%rsp)
movl %edi, 0x88(%rsp)
imull %edi, %eax
movl %eax, 0x80(%rsp)
movl 0x140(%rsp), %eax
movl %esi, 0x8c(%rsp)
imull %esi, %eax
movl %eax, 0x7c(%rsp)
movl 0x160(%rsp), %eax
movl %edx, 0x4c(%rsp)
imull %edx, %eax
movl %eax, 0x78(%rsp)
movl 0x3c(%rsp), %eax
movl %ecx, 0x34(%rsp)
imull %ecx, %eax
movl %eax, 0x3c(%rsp)
movq $0x0, 0x70(%rsp)
movsd 0x3afe(%rip), %xmm1     # 0x114b0
movl $0x0, 0x48(%rsp)
movl $0x0, 0x44(%rsp)
movl $0x0, 0x40(%rsp)
xorl %ecx, %ecx
movss 0x68(%rsp), %xmm2
movl %ecx, 0x84(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0xdb1b
movq 0x70(%rsp), %rax
movl %eax, 0x18(%rsp)
movl 0x48(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x44(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x40(%rsp), %eax
movl %eax, 0xc(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x50(%rsp)
testl %r12d, %r12d
jle 0xdad2
movslq 0xc(%rsp), %rbx
addq 0xf8(%rsp), %rbx
movslq 0x8(%rsp), %r15
addq 0x100(%rsp), %r15
movslq 0x4(%rsp), %rbp
addq 0x108(%rsp), %rbp
movslq 0x18(%rsp), %r13
addq 0x110(%rsp), %r13
xorl %r14d, %r14d
movzbl (%r13,%r14), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
ucomiss %xmm2, %xmm0
jbe 0xda6a
xorl %eax, %eax
jmp 0xdac2
movzbl (%rbp,%r14), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movzbl (%r15,%r14), %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
mulsd 0x28(%rsp), %xmm1
cvtsd2ss %xmm1, %xmm1
subss %xmm1, %xmm0
subss %xmm2, %xmm0
mulss 0x58(%rsp), %xmm0
callq 0x2240
movsd 0x3a08(%rip), %xmm1     # 0x114b0
movss 0x68(%rsp), %xmm2
addss 0x3be6(%rip), %xmm0     # 0x1169c
cvtss2sd %xmm0, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, (%rbx,%r14)
incq %r14
cmpq %r14, %r12
jne 0xda4c
movq 0x50(%rsp), %rcx
incq %rcx
movl 0xc(%rsp), %eax
addl 0x88(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x8(%rsp), %eax
addl 0x8c(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x4(%rsp), %eax
addl 0x4c(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x18(%rsp), %eax
addl 0x34(%rsp), %eax
movl %eax, 0x18(%rsp)
cmpq 0x10(%rsp), %rcx
jne 0xda07
movl 0x84(%rsp), %ecx
incl %ecx
movl 0x40(%rsp), %eax
addl 0x80(%rsp), %eax
movl %eax, 0x40(%rsp)
movl 0x44(%rsp), %eax
addl 0x7c(%rsp), %eax
movl %eax, 0x44(%rsp)
movl 0x48(%rsp), %eax
addl 0x78(%rsp), %eax
movl %eax, 0x48(%rsp)
movq 0x70(%rsp), %rax
addl 0x3c(%rsp), %eax
movq %rax, 0x70(%rsp)
cmpl 0x20(%rsp), %ecx
jne 0xd9d2
leaq 0x3e07(%rip), %rsi      # 0x11971
leaq 0xb0(%rsp), %rdi
callq 0x4dee
cmpl $0x0, 0x20(%rsp)
jle 0xdd1f
movl 0xa0(%rsp), %eax
movq 0xc8(%rsp), %rcx
movl 0xc0(%rsp), %edx
movl 0x64(%rsp), %esi
imull %edx, %esi
xorl %edi, %edi
xorl %r8d, %r8d
cmpl $0x0, 0x10(%rsp)
jle 0xdbdc
movl %edi, %r9d
xorl %r10d, %r10d
testl %eax, %eax
jle 0xdbcf
movslq %r9d, %r11
addq %rcx, %r11
xorl %ebx, %ebx
cmpb $0x0, (%r11,%rbx)
setne (%r11,%rbx)
incq %rbx
cmpq %rbx, %rax
jne 0xdbbd
incq %r10
addl %edx, %r9d
cmpq 0x10(%rsp), %r10
jne 0xdbb1
incl %r8d
addl %esi, %edi
cmpl 0x20(%rsp), %r8d
jne 0xdba4
cmpl $0x0, 0x20(%rsp)
jle 0xdd1f
movl 0xa0(%rsp), %ecx
movq 0x190(%rsp), %rax
movq %rax, 0x68(%rsp)
movl 0x188(%rsp), %esi
movq 0xc8(%rsp), %rdi
movl 0xc0(%rsp), %r8d
movq 0x1b0(%rsp), %r9
movl 0x1a8(%rsp), %r10d
movl 0x1a0(%rsp), %eax
imull %r10d, %eax
movl %eax, 0x4(%rsp)
movl 0x38(%rsp), %eax
imull %esi, %eax
movl %eax, 0x38(%rsp)
movq $0x0, 0x58(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x18(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0xdcc7
movl 0x18(%rsp), %eax
movl %eax, %r15d
imull 0x64(%rsp), %r15d
movq 0x58(%rsp), %rax
movl %eax, %r12d
movl 0x28(%rsp), %r13d
xorl %r11d, %r11d
testl %ecx, %ecx
jle 0xdcb7
movslq %r13d, %rbx
addq %r9, %rbx
movslq %r12d, %rbp
addq 0x68(%rsp), %rbp
leal (%r15,%r11), %eax
imull %r8d, %eax
movslq %eax, %r14
xorl %edx, %edx
movb (%rdi,%r14), %al
mulb (%rbp,%rdx)
movb %al, (%rbx,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0xdca4
incq %r11
addl %r10d, %r13d
addl %esi, %r12d
cmpq 0x10(%rsp), %r11
jne 0xdc85
movl 0x18(%rsp), %edx
incl %edx
movl 0x28(%rsp), %eax
addl 0x4(%rsp), %eax
movl %eax, 0x28(%rsp)
movq 0x58(%rsp), %rax
addl 0x38(%rsp), %eax
movq %rax, 0x58(%rsp)
movl %edx, 0x18(%rsp)
cmpl 0x20(%rsp), %edx
jne 0xdc61
jmp 0xdd1f
leaq 0x3c4e(%rip), %rsi      # 0x1194c
leaq 0x118(%rsp), %rdi
callq 0x4dee
leaq 0x3c5f(%rip), %rsi      # 0x11971
leaq 0xb0(%rsp), %rdi
callq 0x4dee
leaq 0x198(%rsp), %rdi
movq 0xf0(%rsp), %rsi
callq 0x4dee
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq