// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::skeletonize(Image&, Image&)
void ImageProc::skeletonize(Image &img_binary, Image &img_skeletonized)
{
	Image img_after_first("bw", img_binary.rows, img_binary.cols);

		int index  = 0, superflag = 1, flag = 0, black_pixel_count = 0, pixel_count = 0;
		std::string target;
		//char *target_char_arr = new char[9];

		for(int i = 0; i < img_binary.rows; i++)
			for(int j = 0; j < img_binary.cols; j++)
				for(int k = 0; k < img_binary.channels; k++)
					img_skeletonized.setvalue(i,j,k,img_binary.getvalue(i,j,k));

		for(int i = 0+1; i < img_skeletonized.rows-1; i++)
			for(int j = 0+1; j < img_skeletonized.cols-1; j++)
				for(int k = 0; k < img_skeletonized.channels; k++)
					if(img_skeletonized.getvalue(i,j,k) == 0) pixel_count++;
		black_pixel_count = pixel_count;

		//std::cout << " 1 " << black_pixel_count << std::endl;

		while(superflag == 1)
		{
			for(int i = 0; i < img_skeletonized.rows; i++)
				for(int j = 0; j < img_skeletonized.cols; j++)
					for(int k = 0; k < img_skeletonized.channels; k++)
						img_after_first.setvalue(i,j,k,255);

			for(int i = 0+1; i < img_skeletonized.rows-1; i++)
				for(int j = 0+1; j < img_skeletonized.cols-1; j++)
					for(int k = 0; k < img_skeletonized.channels; k++)
					{
						if(img_skeletonized.getvalue(i,j,k) == 0)
						{
							index = -1; flag = 0;
							target.clear();
							for(int p = i-1; p <= i+1; p++)
								for(int q = j-1; q <= j+1; q++)
								{
									//std::cout << img_shrinked.getvalue(p,q,k)/255 << std::endl;
									if(!(p==i && q==j))
										if(img_skeletonized.getvalue(p,q,0) == 0)
											target.append("1");
										else
											target.append("0");
									else
										continue;
								}
							//target_char_arr[8] = NULL;
							//target(target_char_arr);
							//std::cout << "target 1:" << target << std::endl;

							//std::string target_str(target);
							for(int t = 0; t < SKELETON_FIRST_PATTERNS; t++)
							{
								std::string testpattern(skeleton_first[t]);
								flag = 0;
								if(testpattern.find('D') == std::string::npos)
								{
									if(target.compare(testpattern) == 0)
									{
										//std::cout << "pattern match" << std::endl;
										flag = 1;
									}
									else
									{
										//std::cout << "pattern nomatch" << std::endl;
										flag = 0;
									}
								}
								else
								{
									for(int j = 0; j < 8; j++)
									{
										if(testpattern[j] == 'D')
											continue;
										else if(target[j] != testpattern[j])
										{
											//std::cout << target << " hey " << testpattern << std::endl;
											flag = 0;
											break;
										}
										else
											flag = 1;
									}
								}

								if(flag == 1)
									break;
								else
									continue;

							}

							if(flag == 1)
								img_after_first.setvalue(i,j,k,0*255);
							else
								img_after_first.setvalue(i,j,k,1*255);

						}
					}

				for(int i = 0+1; i < img_after_first.rows-1; i++)
					for(int j = 0+1; j < img_after_first.cols-1; j++)
						for(int k = 0; k < img_after_first.channels; k++)
						{
							if(img_after_first.getvalue(i,j,k) == 0)
							{
								target.clear();
								index = -1; flag = 0;
								for(int p = i-1; p <= i+1; p++)
									for(int q = j-1; q <= j+1; q++)
									{
										if(!(p==i && q==j))
											if(img_after_first.getvalue(p,q,0) == 0)
												target.append("M");
											else
												target.append("0");
									}

								//std::cout << "target1: " << target;

								for(int t = 0; t < SKELETON_SECOND_PATTERNS; t++)
								{
									std::string testpattern(skeleton_second[t]);
									flag = 1;
									//std::cout << " " << testpattern << std::endl;
									if(testpattern.find('D') == std::string::npos)
									{

										if(target.compare(testpattern) == 0)
										{
											//std::cout << "hi" << std::endl;
											flag = 1;
											break;
										}
										else
											flag = 0;
									}
									else
									{
										for(int j = 0; j < 8; j++)
										{
											if(testpattern[j] == 'D')
												continue;
											else if(target[j] == testpattern[j])
											{
												flag = 1;
												//std::cout << "match" << std::endl;
											}
											else
											{
												//std::cout << "breakpoint" << std::endl;
												flag = 0;
												break;
											}
										}
									}

									if(flag == 0)
										continue;
									else
										break;
								}
								//std::cout << flag << std::endl;
								if(flag == 0)
								{
									//std::cout << "reducing" << std::endl;
									img_skeletonized.setvalue(i,j,k,1*255);
								}
								else
									img_skeletonized.setvalue(i,j,k,img_skeletonized.getvalue(i,j,k));
							}


						}

			pixel_count = 0;
			for(int i = 0+1; i < img_skeletonized.rows-1; i++)
				for(int j = 0+1; j < img_skeletonized.cols-1; j++)
					for(int k = 0; k < img_skeletonized.channels; k++)
						if(img_skeletonized.getvalue(i,j,k) == 0) pixel_count++;



			if(pixel_count == black_pixel_count) superflag = 0;
			else								 black_pixel_count = pixel_count;
			//std::cout << black_pixel_count << std::endl;


		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
leaq -0x30(%rbp), %rdi
leaq 0x4388(%rip), %rsi      # 0x1d5d4
callq 0x7eb0
movl $0x0, -0x34(%rbp)
movl $0x1, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x2290
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x19342
movl $0x0, -0x70(%rbp)
movl -0x70(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x19332
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x19322
movq -0x10(%rbp), %rax
movq %rax, -0x138(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x12c(%rbp)
movl -0x70(%rbp), %eax
movl %eax, -0x128(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0x124(%rbp)
movq -0x8(%rbp), %rdi
movl -0x6c(%rbp), %esi
movl -0x70(%rbp), %edx
movl -0x74(%rbp), %ecx
callq 0x83b0
movq -0x138(%rbp), %rdi
movl -0x12c(%rbp), %esi
movl -0x128(%rbp), %edx
movl -0x124(%rbp), %ecx
movl %eax, %r8d
callq 0x83f0
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x192b2
jmp 0x19324
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x1929b
jmp 0x19334
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x19284
movl $0x1, -0x78(%rbp)
movl -0x78(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0xc(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x193cf
movl $0x1, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x193bf
movl $0x0, -0x80(%rbp)
movl -0x80(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x193b2
movq -0x10(%rbp), %rdi
movl -0x78(%rbp), %esi
movl -0x7c(%rbp), %edx
movl -0x80(%rbp), %ecx
callq 0x83b0
cmpl $0x0, %eax
jne 0x193a5
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x193a7
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x19379
jmp 0x193b4
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x19361
jmp 0x193c1
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x19349
movl -0x44(%rbp), %eax
movl %eax, -0x40(%rbp)
cmpl $0x1, -0x38(%rbp)
jne 0x19d5f
movl $0x0, -0x84(%rbp)
movl -0x84(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x19489
movl $0x0, -0x88(%rbp)
movl -0x88(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x19473
movl $0x0, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x19460
movl -0x84(%rbp), %esi
movl -0x88(%rbp), %edx
movl -0x8c(%rbp), %ecx
leaq -0x30(%rbp), %rdi
movl $0xff, %r8d
callq 0x83f0
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
jmp 0x1941f
jmp 0x19462
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0x19406
jmp 0x19475
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x193e9
movl $0x1, -0x90(%rbp)
movl -0x90(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0xc(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x1986a
movl $0x1, -0x94(%rbp)
movl -0x94(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x19854
movl $0x0, -0x98(%rbp)
movl -0x98(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x1983e
movq -0x10(%rbp), %rdi
movl -0x90(%rbp), %esi
movl -0x94(%rbp), %edx
movl -0x98(%rbp), %ecx
callq 0x83b0
cmpl $0x0, %eax
jne 0x19828
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x3c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x2280
movl -0x90(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
movl -0x90(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jg 0x19618
movl -0x94(%rbp), %eax
subl $0x1, %eax
movl %eax, -0xa0(%rbp)
movl -0xa0(%rbp), %eax
movl -0x94(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jg 0x19602
movl -0x9c(%rbp), %eax
cmpl -0x90(%rbp), %eax
jne 0x1958d
movl -0xa0(%rbp), %eax
cmpl -0x94(%rbp), %eax
je 0x195ea
movq -0x10(%rbp), %rdi
movl -0x9c(%rbp), %esi
movl -0xa0(%rbp), %edx
xorl %ecx, %ecx
callq 0x83b0
cmpl $0x0, %eax
jne 0x195d4
leaq 0x3280(%rip), %rsi      # 0x1c830
leaq -0x68(%rbp), %rdi
callq 0x23c0
jmp 0x195bb
jmp 0x195e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x19d7a
leaq 0x3243(%rip), %rsi      # 0x1c81e
leaq -0x68(%rbp), %rdi
callq 0x23c0
jmp 0x195e6
jmp 0x195e8
jmp 0x195ec
jmp 0x195ee
jmp 0x195ee
movl -0xa0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa0(%rbp)
jmp 0x1955a
jmp 0x19604
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x19534
movl $0x0, -0xb0(%rbp)
cmpl $0x28, -0xb0(%rbp)
jge 0x197df
movslq -0xb0(%rbp), %rax
shlq $0x5, %rax
leaq 0x897f(%rip), %rsi      # 0x21fc0
addq %rax, %rsi
leaq -0xd0(%rbp), %rdi
callq 0x20d0
jmp 0x19652
movl $0x0, -0x3c(%rbp)
leaq -0xd0(%rbp), %rdi
movl $0x44, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x2270
cmpq $-0x1, %rax
jne 0x196cf
leaq -0x68(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x2040
movl %eax, -0x13c(%rbp)
jmp 0x1968c
movl -0x13c(%rbp), %eax
cmpl $0x0, %eax
jne 0x196c3
movl $0x1, -0x3c(%rbp)
jmp 0x196ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x2110
jmp 0x19d7a
movl $0x0, -0x3c(%rbp)
jmp 0x19796
movl $0x0, -0xd4(%rbp)
cmpl $0x8, -0xd4(%rbp)
jge 0x19794
movslq -0xd4(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
callq 0x23f0
movq %rax, -0x148(%rbp)
jmp 0x19702
movq -0x148(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x44, %eax
jne 0x19713
jmp 0x19780
movslq -0xd4(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x23f0
movq %rax, -0x150(%rbp)
jmp 0x1972c
movq -0x150(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x15c(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
callq 0x23f0
movq %rax, -0x158(%rbp)
jmp 0x19758
movl -0x15c(%rbp), %eax
movq -0x158(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x19775
movl $0x0, -0x3c(%rbp)
jmp 0x19794
movl $0x1, -0x3c(%rbp)
jmp 0x1977e
jmp 0x19780
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0x196d9
jmp 0x19796
cmpl $0x1, -0x3c(%rbp)
jne 0x197a8
movl $0x2e, -0xd8(%rbp)
jmp 0x197b2
movl $0x30, -0xd8(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x2110
movl -0xd8(%rbp), %eax
subl $0x2e, %eax
je 0x197df
jmp 0x197cb
movl -0xb0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb0(%rbp)
jmp 0x19622
cmpl $0x1, -0x3c(%rbp)
jne 0x19805
movl -0x90(%rbp), %esi
movl -0x94(%rbp), %edx
movl -0x98(%rbp), %ecx
leaq -0x30(%rbp), %rdi
xorl %r8d, %r8d
callq 0x83f0
jmp 0x19826
movl -0x90(%rbp), %esi
movl -0x94(%rbp), %edx
movl -0x98(%rbp), %ecx
leaq -0x30(%rbp), %rdi
movl $0xff, %r8d
callq 0x83f0
jmp 0x19828
jmp 0x1982a
movl -0x98(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x98(%rbp)
jmp 0x194d7
jmp 0x19840
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x194b5
jmp 0x19856
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
jmp 0x19493
movl $0x1, -0xdc(%rbp)
movl -0xdc(%rbp), %eax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x19c7e
movl $0x1, -0xe0(%rbp)
movl -0xe0(%rbp), %eax
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x19c68
movl $0x0, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x19c52
movl -0xdc(%rbp), %esi
movl -0xe0(%rbp), %edx
movl -0xe4(%rbp), %ecx
leaq -0x30(%rbp), %rdi
callq 0x83b0
cmpl $0x0, %eax
jne 0x19c3c
leaq -0x68(%rbp), %rdi
callq 0x2280
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x3c(%rbp)
movl -0xdc(%rbp), %eax
subl $0x1, %eax
movl %eax, -0xe8(%rbp)
movl -0xe8(%rbp), %eax
movl -0xdc(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jg 0x199d0
movl -0xe0(%rbp), %eax
subl $0x1, %eax
movl %eax, -0xec(%rbp)
movl -0xec(%rbp), %eax
movl -0xe0(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jg 0x199ba
movl -0xe8(%rbp), %eax
cmpl -0xdc(%rbp), %eax
jne 0x1995e
movl -0xec(%rbp), %eax
cmpl -0xe0(%rbp), %eax
je 0x199a4
movl -0xe8(%rbp), %esi
movl -0xec(%rbp), %edx
leaq -0x30(%rbp), %rdi
xorl %ecx, %ecx
callq 0x83b0
cmpl $0x0, %eax
jne 0x1998e
leaq 0x30b8(%rip), %rsi      # 0x1ca39
leaq -0x68(%rbp), %rdi
callq 0x23c0
jmp 0x1998c
jmp 0x199a2
leaq 0x2e89(%rip), %rsi      # 0x1c81e
leaq -0x68(%rbp), %rdi
callq 0x23c0
jmp 0x199a0
jmp 0x199a2
jmp 0x199a4
jmp 0x199a6
movl -0xec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xec(%rbp)
jmp 0x1992f
jmp 0x199bc
movl -0xe8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe8(%rbp)
jmp 0x19909
movl $0x0, -0xf0(%rbp)
cmpl $0x24, -0xf0(%rbp)
jge 0x19ba6
movslq -0xf0(%rbp), %rax
shlq $0x5, %rax
leaq 0x90e7(%rip), %rsi      # 0x22ae0
addq %rax, %rsi
leaq -0x110(%rbp), %rdi
callq 0x20d0
jmp 0x19a0a
movl $0x1, -0x3c(%rbp)
leaq -0x110(%rbp), %rdi
movl $0x44, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x2270
cmpq $-0x1, %rax
jne 0x19a94
leaq -0x68(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x2040
movl %eax, -0x160(%rbp)
jmp 0x19a44
movl -0x160(%rbp), %eax
cmpl $0x0, %eax
jne 0x19a88
movl $0x1, -0x3c(%rbp)
movl $0x43, -0xd8(%rbp)
jmp 0x19b79
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x2110
jmp 0x19d7a
movl $0x0, -0x3c(%rbp)
jmp 0x19b5d
movl $0x0, -0x114(%rbp)
cmpl $0x8, -0x114(%rbp)
jge 0x19b5b
movslq -0x114(%rbp), %rsi
leaq -0x110(%rbp), %rdi
callq 0x23f0
movq %rax, -0x168(%rbp)
jmp 0x19ac7
movq -0x168(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x44, %eax
jne 0x19ad8
jmp 0x19b47
movslq -0x114(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x23f0
movq %rax, -0x170(%rbp)
jmp 0x19af1
movq -0x170(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x17c(%rbp)
movslq -0x114(%rbp), %rsi
leaq -0x110(%rbp), %rdi
callq 0x23f0
movq %rax, -0x178(%rbp)
jmp 0x19b1d
movl -0x17c(%rbp), %eax
movq -0x178(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x19b3a
movl $0x1, -0x3c(%rbp)
jmp 0x19b43
movl $0x0, -0x3c(%rbp)
jmp 0x19b5b
jmp 0x19b45
jmp 0x19b47
movl -0x114(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x114(%rbp)
jmp 0x19a9e
jmp 0x19b5d
cmpl $0x0, -0x3c(%rbp)
jne 0x19b6f
movl $0x45, -0xd8(%rbp)
jmp 0x19b79
movl $0x43, -0xd8(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x2110
movl -0xd8(%rbp), %eax
subl $0x43, %eax
je 0x19ba6
jmp 0x19b92
movl -0xf0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xf0(%rbp)
jmp 0x199da
cmpl $0x0, -0x3c(%rbp)
jne 0x19bcf
movq -0x10(%rbp), %rdi
movl -0xdc(%rbp), %esi
movl -0xe0(%rbp), %edx
movl -0xe4(%rbp), %ecx
movl $0xff, %r8d
callq 0x83f0
jmp 0x19c3a
movq -0x10(%rbp), %rax
movq %rax, -0x190(%rbp)
movl -0xdc(%rbp), %eax
movl %eax, -0x188(%rbp)
movl -0xe0(%rbp), %eax
movl %eax, -0x184(%rbp)
movl -0xe4(%rbp), %eax
movl %eax, -0x180(%rbp)
movq -0x10(%rbp), %rdi
movl -0xdc(%rbp), %esi
movl -0xe0(%rbp), %edx
movl -0xe4(%rbp), %ecx
callq 0x83b0
movq -0x190(%rbp), %rdi
movl -0x188(%rbp), %esi
movl -0x184(%rbp), %edx
movl -0x180(%rbp), %ecx
movl %eax, %r8d
callq 0x83f0
jmp 0x19c3c
jmp 0x19c3e
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x198b0
jmp 0x19c54
movl -0xe0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe0(%rbp)
jmp 0x19892
jmp 0x19c6a
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
jmp 0x19874
movl $0x0, -0x44(%rbp)
movl $0x1, -0x118(%rbp)
movl -0x118(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0xc(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x19d43
movl $0x1, -0x11c(%rbp)
movl -0x11c(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x19d2d
movl $0x0, -0x120(%rbp)
movl -0x120(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x19d1a
movq -0x10(%rbp), %rdi
movl -0x118(%rbp), %esi
movl -0x11c(%rbp), %edx
movl -0x120(%rbp), %ecx
callq 0x83b0
cmpl $0x0, %eax
jne 0x19d07
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x19d09
movl -0x120(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x120(%rbp)
jmp 0x19ccf
jmp 0x19d1c
movl -0x11c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x11c(%rbp)
jmp 0x19cb1
jmp 0x19d2f
movl -0x118(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x118(%rbp)
jmp 0x19c8f
movl -0x44(%rbp), %eax
cmpl -0x40(%rbp), %eax
jne 0x19d54
movl $0x0, -0x38(%rbp)
jmp 0x19d5a
movl -0x44(%rbp), %eax
movl %eax, -0x40(%rbp)
jmp 0x193d5
leaq -0x68(%rbp), %rdi
callq 0x2110
leaq -0x30(%rbp), %rdi
callq 0x1b2c0
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
leaq -0x68(%rbp), %rdi
callq 0x2110
leaq -0x30(%rbp), %rdi
callq 0x1b2c0
movq -0xa8(%rbp), %rdi
callq 0x2360
nopl (%rax,%rax)