// File: kebwi[P]Trifid/src/main.cpp
// Function: testRGBtoLABtoRGB()
void testRGBtoLABtoRGB()
{
	//PPM
	for (int imageIdx = 0; imageIdx < sInputFilenames.size(); imageIdx++)
	{
		//Convert RGB to LAB
		Image3ChnlReal rgbImg;
		rgbImg.readFile(sInputFilenames[imageIdx]);
		int width = rgbImg.width(), height = rgbImg.height();
		int halfWidth = width / 2, halfHeight = height / 2;
		int totalPixels = rgbImg.totalPixels();
		
		Image3ChnlReal labImg;
		rgbImgToLabImg(1, rgbImg, labImg);
		
		Float_t minValL, maxValL, minValA, maxValA, minValB, maxValB;
		
		minValL = maxValL = (*labImg[0])[0];
		for (int i = 0; i < totalPixels; i++)
		{
			if ((*labImg[0])[i] > maxValL)
				maxValL = (*labImg[0])[i];
			if ((*labImg[0])[i] < minValL)
				minValL = (*labImg[0])[i];
		}
		labImg[0]->normalize(1, true);
		
		minValA = maxValA = (*labImg[1])[0];
		for (int i = 0; i < totalPixels; i++)
		{
			if ((*labImg[1])[i] > maxValA)
				maxValA = (*labImg[1])[i];
			if ((*labImg[1])[i] < minValA)
				minValA = (*labImg[1])[i];
		}
		if (minValA < 0)
			for (int i = 0; i < totalPixels; i++)
				(*labImg[1])[i] -= minValA;
		labImg[1]->normalize(1, true);
		
		minValB = maxValB = (*labImg[2])[0];
		for (int i = 0; i < totalPixels; i++)
		{
			if ((*labImg[2])[i] > maxValB)
				maxValB = (*labImg[2])[i];
			if ((*labImg[2])[i] < minValB)
				minValB = (*labImg[2])[i];
		}
		if (minValB < 0)
			for (int i = 0; i < totalPixels; i++)
				(*labImg[2])[i] -= minValB;
		labImg[2]->normalize(1, true);
		
		labImg.setFilename(rgbImg.filename());
		labImg.appendFilename("_lab");
		labImg.writeFile(1);
		
		//========================================
		/*
		//Denoise rgb and lab images
		Image3ChnlReal rgbImgDenoised, labImgDenoised;
		
		//���
		//Need to reuse optimal denoising routines here
		*/
		//========================================
		
		//Convert LAB to RGB
		
		labImg[0]->scale(maxValL);
		labImg[1]->scale(maxValA - minValA);
		if (minValA < 0)
			for (int i = 0; i < totalPixels; i++)
				(*labImg[1])[i] += minValA;
		labImg[2]->scale(maxValB - minValB);
		if (minValB < 0)
			for (int i = 0; i < totalPixels; i++)
				(*labImg[2])[i] += minValB;
		
		Image3ChnlReal rgbImgSynth;
		labImgToRgbImg(1, labImg, rgbImgSynth);
		
		rgbImgSynth.setFilename(rgbImg.filename());
		rgbImgSynth.appendFilename("_rgb");
		rgbImgSynth.writeFile(1);
		
		Float_t mse, psnr;
		calcRGB_MSE_PSNR(rgbImg, rgbImgSynth, mse, psnr);
		cout << "MSE/PSNR: " << mse << setw(14) << psnr << endl;
		calcRGB_MSE_PSNR(rgbImg, rgbImgSynth, mse, psnr);
		cout << "MSE/PSNR: " << mse << setw(14) << psnr << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x410, %rsp            # imm = 0x410
movl $0x0, -0x4(%rbp)
movslq -0x4(%rbp), %rax
movq %rax, -0x228(%rbp)
leaq 0x4de24(%rip), %rdi     # 0x5a5f8
callq 0xe730
movq %rax, %rcx
movq -0x228(%rbp), %rax
cmpq %rcx, %rax
jae 0xd4e8
leaq -0x58(%rbp), %rdi
callq 0x17000
movslq -0x4(%rbp), %rsi
leaq 0x4ddf8(%rip), %rdi     # 0x5a5f8
callq 0xe750
movq %rax, %rsi
leaq -0x78(%rbp), %rdi
callq 0x4180
jmp 0xc813
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x17cc0
jmp 0xc822
leaq -0x78(%rbp), %rdi
callq 0x46c8
leaq -0x58(%rbp), %rdi
callq 0xedd0
movl %eax, -0x22c(%rbp)
jmp 0xc83c
movl -0x22c(%rbp), %eax
movl %eax, -0x88(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xedf0
movl %eax, -0x230(%rbp)
jmp 0xc859
movl -0x230(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl -0x88(%rbp), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
sarl %eax
movl %eax, -0x90(%rbp)
movl -0x8c(%rbp), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
sarl %eax
movl %eax, -0x94(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xf200
movl %eax, -0x234(%rbp)
jmp 0xc8a0
movl -0x234(%rbp), %eax
movl %eax, -0x98(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x17000
jmp 0xc8ba
movsd 0x3c75e(%rip), %xmm0    # 0x49020
leaq -0x58(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x1f650
jmp 0xc8d4
leaq -0xe8(%rbp), %rdi
xorl %esi, %esi
callq 0xef40
movq %rax, -0x240(%rbp)
jmp 0xc8eb
movq -0x240(%rbp), %rdi
xorl %esi, %esi
callq 0xef70
movq %rax, -0x248(%rbp)
jmp 0xc902
movq -0x248(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0xf8(%rbp)
movsd %xmm0, -0xf0(%rbp)
movl $0x0, -0x11c(%rbp)
movl -0x11c(%rbp), %eax
cmpl -0x98(%rbp), %eax
jge 0xcab6
leaq -0xe8(%rbp), %rdi
xorl %esi, %esi
callq 0xef40
movq %rax, -0x250(%rbp)
jmp 0xc950
movq -0x250(%rbp), %rdi
movl -0x11c(%rbp), %esi
callq 0xef70
movq %rax, -0x258(%rbp)
jmp 0xc96b
movq -0x258(%rbp), %rax
movsd (%rax), %xmm0
ucomisd -0xf8(%rbp), %xmm0
jbe 0xca10
leaq -0xe8(%rbp), %rdi
xorl %esi, %esi
callq 0xef40
movq %rax, -0x260(%rbp)
jmp 0xc99b
movq -0x260(%rbp), %rdi
movl -0x11c(%rbp), %esi
callq 0xef70
movq %rax, -0x268(%rbp)
jmp 0xc9b6
movq -0x268(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0xf8(%rbp)
jmp 0xca10
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xd4dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x46c8
jmp 0xd4dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xd4d1
leaq -0xe8(%rbp), %rdi
xorl %esi, %esi
callq 0xef40
movq %rax, -0x270(%rbp)
jmp 0xca27
movq -0x270(%rbp), %rdi
movl -0x11c(%rbp), %esi
callq 0xef70
movq %rax, -0x278(%rbp)
jmp 0xca42
movq -0x278(%rbp), %rax
movsd (%rax), %xmm1
movsd -0xf0(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xcaa0
leaq -0xe8(%rbp), %rdi
xorl %esi, %esi
callq 0xef40
movq %rax, -0x280(%rbp)
jmp 0xca72
movq -0x280(%rbp), %rdi
movl -0x11c(%rbp), %esi
callq 0xef70
movq %rax, -0x288(%rbp)
jmp 0xca8d
movq -0x288(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0xf0(%rbp)
jmp 0xcaa2
movl -0x11c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x11c(%rbp)
jmp 0xc927
leaq -0xe8(%rbp), %rdi
xorl %esi, %esi
callq 0xef40
movq %rax, -0x290(%rbp)
jmp 0xcacd
movq -0x290(%rbp), %rdi
movsd 0x3c544(%rip), %xmm0    # 0x49020
movl $0x1, %esi
callq 0x15a10
jmp 0xcae8
leaq -0xe8(%rbp), %rdi
movl $0x1, %esi
callq 0xef40
movq %rax, -0x298(%rbp)
jmp 0xcb02
movq -0x298(%rbp), %rdi
xorl %esi, %esi
callq 0xef70
movq %rax, -0x2a0(%rbp)
jmp 0xcb19
movq -0x2a0(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x108(%rbp)
movsd %xmm0, -0x100(%rbp)
movl $0x0, -0x120(%rbp)
movl -0x120(%rbp), %eax
cmpl -0x98(%rbp), %eax
jge 0xcc8e
leaq -0xe8(%rbp), %rdi
movl $0x1, %esi
callq 0xef40
movq %rax, -0x2a8(%rbp)
jmp 0xcb6a
movq -0x2a8(%rbp), %rdi
movl -0x120(%rbp), %esi
callq 0xef70
movq %rax, -0x2b0(%rbp)
jmp 0xcb85
movq -0x2b0(%rbp), %rax
movsd (%rax), %xmm0
ucomisd -0x108(%rbp), %xmm0
jbe 0xcbe2
leaq -0xe8(%rbp), %rdi
movl $0x1, %esi
callq 0xef40
movq %rax, -0x2b8(%rbp)
jmp 0xcbb4
movq -0x2b8(%rbp), %rdi
movl -0x120(%rbp), %esi
callq 0xef70
movq %rax, -0x2c0(%rbp)
jmp 0xcbcf
movq -0x2c0(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x108(%rbp)
leaq -0xe8(%rbp), %rdi
movl $0x1, %esi
callq 0xef40
movq %rax, -0x2c8(%rbp)
jmp 0xcbfc
movq -0x2c8(%rbp), %rdi
movl -0x120(%rbp), %esi
callq 0xef70
movq %rax, -0x2d0(%rbp)
jmp 0xcc17
movq -0x2d0(%rbp), %rax
movsd (%rax), %xmm1
movsd -0x100(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xcc78
leaq -0xe8(%rbp), %rdi
movl $0x1, %esi
callq 0xef40
movq %rax, -0x2d8(%rbp)
jmp 0xcc4a
movq -0x2d8(%rbp), %rdi
movl -0x120(%rbp), %esi
callq 0xef70
movq %rax, -0x2e0(%rbp)
jmp 0xcc65
movq -0x2e0(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x100(%rbp)
jmp 0xcc7a
movl -0x120(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x120(%rbp)
jmp 0xcb3e
xorps %xmm0, %xmm0
ucomisd -0x100(%rbp), %xmm0
jbe 0xcd2a
movl $0x0, -0x124(%rbp)
movl -0x124(%rbp), %eax
cmpl -0x98(%rbp), %eax
jge 0xcd28
movsd -0x100(%rbp), %xmm0
movsd %xmm0, -0x2f0(%rbp)
leaq -0xe8(%rbp), %rdi
movl $0x1, %esi
callq 0xef40
movq %rax, -0x2e8(%rbp)
jmp 0xcce1
movq -0x2e8(%rbp), %rdi
movl -0x124(%rbp), %esi
callq 0xef70
movq %rax, -0x2f8(%rbp)
jmp 0xccfc
movq -0x2f8(%rbp), %rax
movsd -0x2f0(%rbp), %xmm1
movsd (%rax), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl -0x124(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x124(%rbp)
jmp 0xcca9
jmp 0xcd2a
leaq -0xe8(%rbp), %rdi
movl $0x1, %esi
callq 0xef40
movq %rax, -0x300(%rbp)
jmp 0xcd44
movq -0x300(%rbp), %rdi
movsd 0x3c2cd(%rip), %xmm0    # 0x49020
movl $0x1, %esi
callq 0x15a10
jmp 0xcd5f
leaq -0xe8(%rbp), %rdi
movl $0x2, %esi
callq 0xef40
movq %rax, -0x308(%rbp)
jmp 0xcd79
movq -0x308(%rbp), %rdi
xorl %esi, %esi
callq 0xef70
movq %rax, -0x310(%rbp)
jmp 0xcd90
movq -0x310(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x118(%rbp)
movsd %xmm0, -0x110(%rbp)
movl $0x0, -0x128(%rbp)
movl -0x128(%rbp), %eax
cmpl -0x98(%rbp), %eax
jge 0xcf05
leaq -0xe8(%rbp), %rdi
movl $0x2, %esi
callq 0xef40
movq %rax, -0x318(%rbp)
jmp 0xcde1
movq -0x318(%rbp), %rdi
movl -0x128(%rbp), %esi
callq 0xef70
movq %rax, -0x320(%rbp)
jmp 0xcdfc
movq -0x320(%rbp), %rax
movsd (%rax), %xmm0
ucomisd -0x118(%rbp), %xmm0
jbe 0xce59
leaq -0xe8(%rbp), %rdi
movl $0x2, %esi
callq 0xef40
movq %rax, -0x328(%rbp)
jmp 0xce2b
movq -0x328(%rbp), %rdi
movl -0x128(%rbp), %esi
callq 0xef70
movq %rax, -0x330(%rbp)
jmp 0xce46
movq -0x330(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x118(%rbp)
leaq -0xe8(%rbp), %rdi
movl $0x2, %esi
callq 0xef40
movq %rax, -0x338(%rbp)
jmp 0xce73
movq -0x338(%rbp), %rdi
movl -0x128(%rbp), %esi
callq 0xef70
movq %rax, -0x340(%rbp)
jmp 0xce8e
movq -0x340(%rbp), %rax
movsd (%rax), %xmm1
movsd -0x110(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xceef
leaq -0xe8(%rbp), %rdi
movl $0x2, %esi
callq 0xef40
movq %rax, -0x348(%rbp)
jmp 0xcec1
movq -0x348(%rbp), %rdi
movl -0x128(%rbp), %esi
callq 0xef70
movq %rax, -0x350(%rbp)
jmp 0xcedc
movq -0x350(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x110(%rbp)
jmp 0xcef1
movl -0x128(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x128(%rbp)
jmp 0xcdb5
xorps %xmm0, %xmm0
ucomisd -0x110(%rbp), %xmm0
jbe 0xcfa1
movl $0x0, -0x12c(%rbp)
movl -0x12c(%rbp), %eax
cmpl -0x98(%rbp), %eax
jge 0xcf9f
movsd -0x110(%rbp), %xmm0
movsd %xmm0, -0x360(%rbp)
leaq -0xe8(%rbp), %rdi
movl $0x2, %esi
callq 0xef40
movq %rax, -0x358(%rbp)
jmp 0xcf58
movq -0x358(%rbp), %rdi
movl -0x12c(%rbp), %esi
callq 0xef70
movq %rax, -0x368(%rbp)
jmp 0xcf73
movq -0x368(%rbp), %rax
movsd -0x360(%rbp), %xmm1
movsd (%rax), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl -0x12c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x12c(%rbp)
jmp 0xcf20
jmp 0xcfa1
leaq -0xe8(%rbp), %rdi
movl $0x2, %esi
callq 0xef40
movq %rax, -0x370(%rbp)
jmp 0xcfbb
movq -0x370(%rbp), %rdi
movsd 0x3c056(%rip), %xmm0    # 0x49020
movl $0x1, %esi
callq 0x15a10
jmp 0xcfd6
leaq -0x150(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xf090
jmp 0xcfe8
leaq -0xe8(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x154b0
jmp 0xcffd
leaq -0x150(%rbp), %rdi
callq 0x46c8
leaq 0x3cb5b(%rip), %rsi     # 0x49b6b
leaq -0xe8(%rbp), %rdi
callq 0xf220
jmp 0xd01e
leaq -0x170(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
movl $0x1, %edx
callq 0x18430
jmp 0xd038
leaq -0x170(%rbp), %rdi
callq 0x46c8
leaq -0xe8(%rbp), %rdi
xorl %esi, %esi
callq 0xef40
movq %rax, -0x378(%rbp)
jmp 0xd05b
movq -0x378(%rbp), %rdi
movsd -0xf8(%rbp), %xmm0
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0xd075
leaq -0xe8(%rbp), %rdi
movl $0x1, %esi
callq 0xef40
movq %rax, -0x380(%rbp)
jmp 0xd08f
movq -0x380(%rbp), %rdi
movsd -0x108(%rbp), %xmm0
movsd -0x100(%rbp), %xmm1
subsd %xmm1, %xmm0
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0xd0b5
xorps %xmm0, %xmm0
ucomisd -0x100(%rbp), %xmm0
jbe 0xd171
movl $0x0, -0x174(%rbp)
movl -0x174(%rbp), %eax
cmpl -0x98(%rbp), %eax
jge 0xd16f
movsd -0x100(%rbp), %xmm0
movsd %xmm0, -0x390(%rbp)
leaq -0xe8(%rbp), %rdi
movl $0x1, %esi
callq 0xef40
movq %rax, -0x388(%rbp)
jmp 0xd10c
movq -0x388(%rbp), %rdi
movl -0x174(%rbp), %esi
callq 0xef70
movq %rax, -0x398(%rbp)
jmp 0xd127
movq -0x398(%rbp), %rax
movsd -0x390(%rbp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movl -0x174(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x174(%rbp)
jmp 0xd0d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x46c8
jmp 0xd4d1
jmp 0xd171
leaq -0xe8(%rbp), %rdi
movl $0x2, %esi
callq 0xef40
movq %rax, -0x3a0(%rbp)
jmp 0xd18b
movq -0x3a0(%rbp), %rdi
movsd -0x118(%rbp), %xmm0
movsd -0x110(%rbp), %xmm1
subsd %xmm1, %xmm0
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0xd1b1
xorps %xmm0, %xmm0
ucomisd -0x110(%rbp), %xmm0
jbe 0xd249
movl $0x0, -0x178(%rbp)
movl -0x178(%rbp), %eax
cmpl -0x98(%rbp), %eax
jge 0xd247
movsd -0x110(%rbp), %xmm0
movsd %xmm0, -0x3b0(%rbp)
leaq -0xe8(%rbp), %rdi
movl $0x2, %esi
callq 0xef40
movq %rax, -0x3a8(%rbp)
jmp 0xd204
movq -0x3a8(%rbp), %rdi
movl -0x178(%rbp), %esi
callq 0xef70
movq %rax, -0x3b8(%rbp)
jmp 0xd21f
movq -0x3b8(%rbp), %rax
movsd -0x3b0(%rbp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movl -0x178(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x178(%rbp)
jmp 0xd1cc
jmp 0xd249
leaq -0x1c8(%rbp), %rdi
callq 0x17000
jmp 0xd257
movsd 0x3bdc1(%rip), %xmm0    # 0x49020
leaq -0xe8(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x1f8a0
jmp 0xd274
leaq -0x1e8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xf090
jmp 0xd286
leaq -0x1c8(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x154b0
jmp 0xd29b
leaq -0x1e8(%rbp), %rdi
callq 0x46c8
leaq 0x3c8c2(%rip), %rsi     # 0x49b70
leaq -0x1c8(%rbp), %rdi
callq 0xf220
jmp 0xd2bc
leaq -0x208(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
movl $0x1, %edx
callq 0x18430
jmp 0xd2d6
leaq -0x208(%rbp), %rdi
callq 0x46c8
leaq -0x58(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
leaq -0x210(%rbp), %rdx
leaq -0x218(%rbp), %rcx
callq 0x37ac0
jmp 0xd302
movq 0x4ccc7(%rip), %rdi     # 0x59fd0
leaq 0x3c865(%rip), %rsi     # 0x49b75
callq 0x4390
movq %rax, -0x3c0(%rbp)
jmp 0xd31e
movq -0x3c0(%rbp), %rdi
movsd -0x210(%rbp), %xmm0
callq 0x4670
movq %rax, -0x3c8(%rbp)
jmp 0xd33b
movl $0xe, %edi
callq 0xe410
movl %eax, -0x3cc(%rbp)
jmp 0xd34d
movq -0x3c8(%rbp), %rdi
movl -0x3cc(%rbp), %eax
movl %eax, -0x21c(%rbp)
movl -0x21c(%rbp), %esi
callq 0x4430
movq %rax, -0x3d8(%rbp)
jmp 0xd374
movq -0x3d8(%rbp), %rdi
movsd -0x218(%rbp), %xmm0
callq 0x4670
movq %rax, -0x3e0(%rbp)
jmp 0xd391
movq -0x3e0(%rbp), %rdi
movq 0x4cc19(%rip), %rsi     # 0x59fb8
callq 0x43d0
jmp 0xd3a6
leaq -0x58(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
leaq -0x210(%rbp), %rdx
leaq -0x218(%rbp), %rcx
callq 0x37ac0
jmp 0xd3c6
movq 0x4cc03(%rip), %rdi     # 0x59fd0
leaq 0x3c7a1(%rip), %rsi     # 0x49b75
callq 0x4390
movq %rax, -0x3e8(%rbp)
jmp 0xd3e2
movq -0x3e8(%rbp), %rdi
movsd -0x210(%rbp), %xmm0
callq 0x4670
movq %rax, -0x3f0(%rbp)
jmp 0xd3ff
movl $0xe, %edi
callq 0xe410
movl %eax, -0x3f4(%rbp)
jmp 0xd411
movq -0x3f0(%rbp), %rdi
movl -0x3f4(%rbp), %eax
movl %eax, -0x220(%rbp)
movl -0x220(%rbp), %esi
callq 0x4430
movq %rax, -0x400(%rbp)
jmp 0xd438
movq -0x400(%rbp), %rdi
movsd -0x218(%rbp), %xmm0
callq 0x4670
movq %rax, -0x408(%rbp)
jmp 0xd455
movq -0x408(%rbp), %rdi
movq 0x4cb55(%rip), %rsi     # 0x59fb8
callq 0x43d0
jmp 0xd46a
leaq -0x1c8(%rbp), %rdi
callq 0x175b0
leaq -0xe8(%rbp), %rdi
callq 0x175b0
leaq -0x58(%rbp), %rdi
callq 0x175b0
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xc7c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xd4c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x1e8(%rbp), %rdi
callq 0x46c8
leaq -0x1c8(%rbp), %rdi
callq 0x175b0
leaq -0xe8(%rbp), %rdi
callq 0x175b0
leaq -0x58(%rbp), %rdi
callq 0x175b0
jmp 0xd4f1
addq $0x410, %rsp            # imm = 0x410
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x4620
nopw (%rax,%rax)