// File: /workspace/github_c_makefile_star2_O3/0x3f00[P]PhotonCpp/PhotonCpp.cpp
// Function: main
int main(int argc, char * argv[])
{
	if (argc != 3)
	{
		std::cerr << "\nUsage: PngToPhoton <input-1440x2560.png> <output.photon>\n"
		"To read data from STDIN use '-' as filename.\n"
		"To write data to STDOUT use '-' as filename.\n\n"
		"White and transparent areas of the image are treated as voids.\n"
		"Check with Photon File Validator after conversion. Use output at your own risk.\n";
		return -1;
	}

#ifdef WIN32
	_setmode(_fileno(stdout), _O_BINARY);
	_setmode(_fileno(stdin), _O_BINARY);
#endif // WIN32

	std::string bufferModel = getModel();

	PhotonFileHeader photonFileHeader(bufferModel);
	PhotonFilePreview previewOne(photonFileHeader.getPreviewOneOffsetAddress(), bufferModel);
	PhotonFilePreview previewTwo(photonFileHeader.getPreviewTwoOffsetAddress(), bufferModel);
	
	PhotonFilePrintParameters photonFilePrintParameters;
	if (photonFileHeader.getVersion() > 1) 
	{
		PhotonFilePrintParameters dummy(photonFileHeader.getPrintParametersOffsetAddress(), bufferModel);
		photonFilePrintParameters = std::move(dummy);
	}

	int margin = 0;
	
	std::vector<PhotonFileLayer> layers = PhotonFileLayer::readLayers(photonFileHeader, bufferModel, margin);

//	PhotonFileLayer::calculateLayers(photonFileHeader,layers, 0);

	// load png
	std::string bufferPng;
	
	if (std::string("-") == argv[1])
	{
		std::string tmp(std::istreambuf_iterator<char>(std::cin), {});
		bufferPng = std::move(tmp);
	}
	else
	{
		std::ifstream ifPng(argv[1], std::ios_base::binary);

		if (ifPng.fail())
		{
			std::cerr << "Error opening input file.\n";
			return -1;
		}

		ifPng.seekg(0, std::ios::end);
		std::streamoff size = 0;
		size = ifPng.tellg();
		bufferPng.resize((unsigned int)size);
		ifPng.seekg(0);
		ifPng.read(&bufferPng[0], size);
		ifPng.close();
	}

	std::pair<std::string, PhotonLayer> rle = png2layer(bufferPng);
	if (!rle.first.empty())
	{
		std::cerr << rle.first << "\n";
		return -1;
	}

	PhotonLayer & layerPng = rle.second;
	int antiAliasLevel = 1;
	if (photonFileHeader.getVersion() > 1) {
		antiAliasLevel = photonFileHeader.getAntiAliasingLevel();
	}

	for (int i = 0; i < photonFileHeader.getNumberOfLayers(); i++) {
		PhotonFileLayer & layer = layers.at(i);
		layer.saveLayer(layerPng);
		if (antiAliasLevel > 1) {
			for (int a = 0; a < (antiAliasLevel - 1); a++) {
				layer.getAntiAlias(a).saveLayer(layerPng);
			}
		}
	}




	// writing is here:
	int headerPos = 0;
	int previewOnePos = headerPos + photonFileHeader.getByteSize();
	int previewTwoPos = previewOnePos + previewOne.getByteSize();
	int layerDefinitionPos = previewTwoPos + previewTwo.getByteSize();

	int parametersPos = 0;
	if (photonFileHeader.getVersion() > 1) {
		parametersPos = layerDefinitionPos;
		layerDefinitionPos = parametersPos + photonFilePrintParameters.getByteSize();
	}

	int dataPosition = layerDefinitionPos + (PhotonFileLayer::getByteSize() * photonFileHeader.getNumberOfLayers() * antiAliasLevel);


	std::ofstream ofs;
	if (std::string("-") != argv[2])
	{
		ofs.open(argv[2], std::ios_base::binary);
		if (ofs.fail())
		{
			std::cerr << "Error opening output file.\n";
			return -1;
		}
	}

	PhotonOutputStream os( std::string("-") != argv[2] ? ofs : std::cout);
	photonFileHeader.save(os, previewOnePos, previewTwoPos, layerDefinitionPos, parametersPos);
	previewOne.save(os, previewOnePos);
	previewTwo.save(os, previewTwoPos);

	if (photonFileHeader.getVersion() > 1) {
		photonFilePrintParameters.save(os);
	}

	// Optimize order for speed read on photon
	for (int i = 0; i < photonFileHeader.getNumberOfLayers(); i++) {
		PhotonFileLayer & layer = layers.at(i);
		dataPosition = layer.savePos(dataPosition);
		if (antiAliasLevel > 1) {
			for (int a = 0; a < (antiAliasLevel - 1); a++) {
				dataPosition = layer.getAntiAlias(a).savePos(dataPosition);
			}
		}
	}

	// Order for backward compatibility with photon/cbddlp version 1
	for (int i = 0; i < photonFileHeader.getNumberOfLayers(); i++) {
		layers.at(i).save(os);
	}

	if (antiAliasLevel > 1) {
		for (int a = 0; a < (antiAliasLevel - 1); a++) {
			for (int i = 0; i < photonFileHeader.getNumberOfLayers(); i++) {
				layers.at(i).getAntiAlias(a).save(os);
			}
		}
	}

	// Optimize order for speed read on photon
	for (int i = 0; i < photonFileHeader.getNumberOfLayers(); i++) {
		PhotonFileLayer & layer = layers.at(i);
		layer.saveData(os);
		if (antiAliasLevel > 1) {
			for (int a = 0; a < (antiAliasLevel - 1); a++) {
				layer.getAntiAlias(a).saveData(os);
			}
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4a8, %rsp            # imm = 0x4A8
cmpl $0x3, %edi
jne 0x4988
movq %rsi, %r15
leaq -0xb0(%rbp), %r14
movq %r14, %rdi
callq 0x46e2
leaq -0x140(%rbp), %rdi
movq %r14, %rsi
callq 0x84fe
movl -0x104(%rbp), %esi
leaq -0x220(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
callq 0x86e6
movl -0xf8(%rbp), %esi
leaq -0x1d0(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
callq 0x86e6
movaps 0x87fc(%rip), %xmm0     # 0xd020
movups %xmm0, -0x180(%rbp)
movl $0x43960000, -0x170(%rbp) # imm = 0x43960000
xorps %xmm0, %xmm0
movups %xmm0, -0x16c(%rbp)
movl $0x0, -0x15c(%rbp)
cmpl $0x2, -0x13c(%rbp)
jl 0x48a3
movl -0xec(%rbp), %esi
leaq -0x4d0(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
callq 0x8872
movups -0x4d0(%rbp), %xmm0
movups -0x4c0(%rbp), %xmm1
movups -0x4b0(%rbp), %xmm2
movups -0x4a4(%rbp), %xmm3
movups %xmm3, -0x154(%rbp)
movaps %xmm2, -0x160(%rbp)
movaps %xmm1, -0x170(%rbp)
movaps %xmm0, -0x180(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x140(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
xorl %ecx, %ecx
callq 0x8a14
leaq -0x50(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq -0x4c0(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x92f9(%rip), %rsi      # 0xdbde
leaq 0x92f3(%rip), %rdx      # 0xdbdf
leaq -0x4d0(%rbp), %rdi
callq 0x9dea
movq %r15, -0x40(%rbp)
movq 0x8(%r15), %rsi
leaq -0x4d0(%rbp), %r15
movq %r15, %rdi
callq 0x20a0
movl %eax, %r14d
movq (%r15), %rdi
cmpq %rbx, %rdi
je 0x491f
callq 0x21d0
testl %r14d, %r14d
je 0x49aa
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x4d0(%rbp), %rdi
movl $0x4, %edx
callq 0x23d0
movq -0x4d0(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x4b0(%rbp,%rax)
je 0x49fe
movq 0xd68f(%rip), %rdi      # 0x11ff0
leaq 0x9278(%rip), %rsi      # 0xdbe0
movl $0x1a, %edx
callq 0x2230
leaq -0x4d0(%rbp), %rdi
callq 0x2080
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x5099
movq 0xd661(%rip), %rdi      # 0x11ff0
leaq 0x9123(%rip), %rsi      # 0xdab9
movl $0x124, %edx            # imm = 0x124
callq 0x2230
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x5109
movq 0xd627(%rip), %rax      # 0x11fd8
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq 0xe8(%rax,%rcx), %rsi
leaq -0x4d0(%rbp), %rdi
movq %rbx, (%rdi)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0xc03c
leaq -0x60(%rbp), %rdi
leaq -0x4d0(%rbp), %r14
movq %r14, %rsi
callq 0x2270
movq (%r14), %rdi
cmpq %rbx, %rdi
je 0x4a69
callq 0x21d0
jmp 0x4a69
leaq -0x4d0(%rbp), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x22c0
leaq -0x4d0(%rbp), %rdi
callq 0x23a0
movq %rax, %r14
movl %r14d, %esi
leaq -0x60(%rbp), %rdi
xorl %edx, %edx
callq 0x20b0
leaq -0x4d0(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2290
movq -0x60(%rbp), %rsi
leaq -0x4d0(%rbp), %rdi
movq %r14, %rdx
callq 0x2280
leaq -0x4d0(%rbp), %rdi
callq 0x2070
leaq -0x4d0(%rbp), %rdi
callq 0x2080
leaq -0x2c8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x40f9
movq -0x2c0(%rbp), %rdx
testq %rdx, %rdx
je 0x4ab6
movq -0x2c8(%rbp), %rsi
movq 0xd55d(%rip), %rdi      # 0x11ff0
callq 0x2230
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq 0x9155(%rip), %rsi      # 0xdbf9
movl $0x1, %edx
movq %rax, %rdi
callq 0x2230
jmp 0x5031
movl -0x13c(%rbp), %eax
movl -0xfc(%rbp), %r12d
movl $0x1, %ecx
movq %rcx, -0x30(%rbp)
cmpl $0x2, %eax
jl 0x4adb
movl -0xe4(%rbp), %ecx
movq %rcx, -0x30(%rbp)
movabsq $-0x2c8590b21642c859, %rcx # imm = 0xD37A6F4DE9BD37A7
testl %r12d, %r12d
jle 0x4ba4
leaq -0x2a8(%rbp), %r15
movq -0x30(%rbp), %rax
leal -0x1(%rax), %ebx
xorl %r14d, %r14d
movq -0x78(%rbp), %r12
movq -0x70(%rbp), %rdx
subq %r12, %rdx
sarq $0x3, %rdx
imulq %rcx, %rdx
cmpq %r14, %rdx
jbe 0x5164
imulq $0xb8, %r14, %rax
addq %rax, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x8e54
cmpl $0x2, -0x30(%rbp)
movabsq $-0x2c8590b21642c859, %rcx # imm = 0xD37A6F4DE9BD37A7
jl 0x4b8b
xorl %r13d, %r13d
movq 0x90(%r12), %rdi
movq 0x98(%r12), %rdx
subq %rdi, %rdx
sarq $0x3, %rdx
imulq %rcx, %rdx
cmpq %r13, %rdx
jbe 0x511d
imulq $0xb8, %r13, %rax
addq %rax, %rdi
movq %r15, %rsi
callq 0x8e54
incq %r13
cmpq %rbx, %r13
movabsq $-0x2c8590b21642c859, %rcx # imm = 0xD37A6F4DE9BD37A7
jne 0x4b43
incq %r14
movslq -0xfc(%rbp), %r12
cmpq %r12, %r14
jl 0x4aff
movl -0x13c(%rbp), %eax
xorl %esi, %esi
xorl %r15d, %r15d
cmpl $0x2, %eax
setge %r15b
movl -0x214(%rbp), %r14d
leal 0x6c(%r14,%r15,4), %eax
movl -0x1c4(%rbp), %ecx
leal 0x40(%rcx,%rax), %edx
leal 0x7c(%rcx,%rax), %eax
cmovll %edx, %eax
movq %rax, -0x90(%rbp)
cmovgel %edx, %esi
movl %esi, -0x7c(%rbp)
leaq -0x4d0(%rbp), %rdi
callq 0x2390
movq %r14, -0x88(%rbp)
leaq -0xc0(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x8fdf(%rip), %rsi      # 0xdbde
leaq 0x8fd9(%rip), %rdx      # 0xdbdf
leaq -0xd0(%rbp), %rdi
callq 0x9dea
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0xd0(%rbp), %r14
movq %r14, %rdi
callq 0x20a0
movl %eax, %r13d
movq (%r14), %rdi
cmpq %rbx, %rdi
movq %rbx, %r14
je 0x4c3c
callq 0x21d0
testl %r13d, %r13d
je 0x4c91
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x4d0(%rbp), %rdi
movl $0x4, %edx
callq 0x2050
movq -0x4d0(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x4b0(%rbp,%rax)
je 0x4c91
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq 0xd375(%rip), %rdi      # 0x11ff0
leaq 0x8f79(%rip), %rsi      # 0xdbfb
movl $0x1b, %edx
callq 0x2230
jmp 0x4ff7
leaq -0xd0(%rbp), %rdi
movq %r14, (%rdi)
leaq 0x8f3c(%rip), %rsi      # 0xdbde
leaq 0x8f36(%rip), %rdx      # 0xdbdf
callq 0x9dea
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0xd0(%rbp), %rdi
callq 0x20a0
testl %eax, %eax
leaq -0x4d0(%rbp), %rsi
jne 0x4cd4
movq 0xd2f4(%rip), %rsi      # 0x11fc8
leal 0x6c(,%r15,4), %r13d
movq -0x88(%rbp), %rax
leal (%rax,%r15,4), %ebx
addl $0x8c, %ebx
movq %rsi, -0x38(%rbp)
movq -0xd0(%rbp), %rdi
cmpq %r14, %rdi
je 0x4d06
callq 0x21d0
movq -0x38(%rbp), %rsi
leaq -0x140(%rbp), %rdi
movl %r13d, %edx
movl %ebx, %ecx
movq -0x90(%rbp), %r14
movl %r14d, %r8d
movl -0x7c(%rbp), %r9d
callq 0x8eea
movq -0x38(%rbp), %rsi
leaq -0x220(%rbp), %rdi
movl %r13d, %edx
callq 0x9088
movq -0x38(%rbp), %rsi
leaq -0x1d0(%rbp), %rdi
movl %ebx, %edx
callq 0x9088
cmpl $0x2, -0x13c(%rbp)
jl 0x4d63
leaq -0x180(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x9158
movslq -0xfc(%rbp), %rax
testq %rax, %rax
jle 0x4e85
movq -0x30(%rbp), %rdx
imull %edx, %r12d
leal (%r12,%r12,8), %ecx
movq %rdx, %r12
leal (%r14,%rcx,4), %esi
movq -0x78(%rbp), %rcx
movq -0x70(%rbp), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x2c8590b21642c859, %rdi # imm = 0xD37A6F4DE9BD37A7
imulq %rdi, %rdx
leal -0x1(%r12), %edi
xorl %r8d, %r8d
cmpq %rdx, %r8
je 0x5175
imulq $0xb8, %r8, %r11
movl 0x10(%rcx,%r11), %r9d
addl %esi, %r9d
movl %esi, 0xc(%rcx,%r11)
cmpl $0x2, %r12d
jl 0x4e1a
addq %rcx, %r11
movq 0x90(%r11), %r10
movq 0x98(%r11), %rsi
subq %r10, %rsi
sarq $0x3, %rsi
movabsq $-0x2c8590b21642c859, %r11 # imm = 0xD37A6F4DE9BD37A7
imulq %r11, %rsi
addq $0x10, %r10
xorl %r11d, %r11d
cmpq %r11, %rsi
je 0x512e
movl %r9d, -0x4(%r10)
addl (%r10), %r9d
incq %r11
addq $0xb8, %r10
cmpq %r11, %rdi
jne 0x4dfb
incq %r8
movl %r9d, %esi
cmpq %rax, %r8
jne 0x4dab
testl %eax, %eax
jle 0x4e89
xorl %r15d, %r15d
leaq -0x38(%rbp), %r14
xorl %ebx, %ebx
movabsq $-0x2c8590b21642c859, %rcx # imm = 0xD37A6F4DE9BD37A7
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rdx
subq %rdi, %rdx
sarq $0x3, %rdx
imulq %rcx, %rdx
cmpq %rbx, %rdx
jbe 0x5197
addq %r15, %rdi
movq %r14, %rsi
callq 0x921c
incq %rbx
movslq -0xfc(%rbp), %rax
addq $0xb8, %r15
cmpq %rax, %rbx
movabsq $-0x2c8590b21642c859, %rcx # imm = 0xD37A6F4DE9BD37A7
jl 0x4e3c
jmp 0x4e89
movq -0x30(%rbp), %r12
cmpl $0x2, %r12d
jge 0x4e9e
movabsq $-0x2c8590b21642c859, %rcx # imm = 0xD37A6F4DE9BD37A7
jmp 0x4f3d
leal -0x1(%r12), %ecx
movq %rcx, -0x40(%rbp)
xorl %r12d, %r12d
leaq -0x38(%rbp), %rbx
movabsq $-0x2c8590b21642c859, %rcx # imm = 0xD37A6F4DE9BD37A7
testl %eax, %eax
jle 0x4f30
movl $0x98, %r13d
imulq $0xb8, %r12, %r15
xorl %r14d, %r14d
movq -0x78(%rbp), %rax
movq -0x70(%rbp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %rcx, %rdx
cmpq %r14, %rdx
jbe 0x5142
movq -0x8(%rax,%r13), %rdi
movq (%rax,%r13), %rdx
subq %rdi, %rdx
sarq $0x3, %rdx
imulq %rcx, %rdx
cmpq %r12, %rdx
jbe 0x513f
addq %r15, %rdi
movq %rbx, %rsi
callq 0x921c
incq %r14
movslq -0xfc(%rbp), %rax
addq $0xb8, %r13
cmpq %rax, %r14
movabsq $-0x2c8590b21642c859, %rcx # imm = 0xD37A6F4DE9BD37A7
jl 0x4ecc
incq %r12
cmpq -0x40(%rbp), %r12
jne 0x4eb8
testl %eax, %eax
movq -0x30(%rbp), %r12
jle 0x4ff5
leal -0x1(%r12), %r13d
xorl %ebx, %ebx
leaq -0x38(%rbp), %r14
movq -0x78(%rbp), %r15
movq -0x70(%rbp), %rdx
subq %r15, %rdx
sarq $0x3, %rdx
imulq %rcx, %rdx
cmpq %rbx, %rdx
jbe 0x5186
imulq $0xb8, %rbx, %rax
addq %rax, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x9298
cmpl $0x2, %r12d
movabsq $-0x2c8590b21642c859, %rcx # imm = 0xD37A6F4DE9BD37A7
jl 0x4fde
xorl %r12d, %r12d
movq 0x90(%r15), %rdi
movq 0x98(%r15), %rdx
subq %rdi, %rdx
sarq $0x3, %rdx
imulq %rcx, %rdx
cmpq %r12, %rdx
jbe 0x5153
imulq $0xb8, %r12, %rax
addq %rax, %rdi
movq %r14, %rsi
callq 0x9298
incq %r12
cmpq %r13, %r12
movabsq $-0x2c8590b21642c859, %rcx # imm = 0xD37A6F4DE9BD37A7
jne 0x4f98
incq %rbx
movslq -0xfc(%rbp), %rax
cmpq %rax, %rbx
movq -0x30(%rbp), %r12
jl 0x4f54
xorl %ebx, %ebx
movq 0xcfc2(%rip), %rax      # 0x11fc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x4c8(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x4d0(%rbp,%rcx)
callq 0x21b0
leaq -0x3d8(%rbp), %rdi
callq 0x20d0
leaq -0x50(%rbp), %r12
movq -0x238(%rbp), %rdi
testq %rdi, %rdi
je 0x5042
callq 0x21d0
movq -0x250(%rbp), %rdi
testq %rdi, %rdi
je 0x5053
callq 0x21d0
movq -0x268(%rbp), %rdi
testq %rdi, %rdi
je 0x5064
callq 0x21d0
movq -0x280(%rbp), %rdi
testq %rdi, %rdi
je 0x5075
callq 0x21d0
leaq -0x298(%rbp), %r14
movq %r14, %rdi
callq 0x949c
movq -0x30(%r14), %rdi
leaq -0x2b8(%rbp), %rax
cmpq %rax, %rdi
je 0x5099
callq 0x21d0
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x50a7
callq 0x21d0
leaq -0x78(%rbp), %rdi
callq 0x9380
movq -0x1a8(%rbp), %rdi
testq %rdi, %rdi
je 0x50c1
callq 0x21d0
movq -0x1c0(%rbp), %rdi
testq %rdi, %rdi
je 0x50d2
callq 0x21d0
movq -0x1f8(%rbp), %rdi
testq %rdi, %rdi
je 0x50e3
callq 0x21d0
movq -0x210(%rbp), %rdi
testq %rdi, %rdi
je 0x50f4
callq 0x21d0
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5109
callq 0x21d0
movl %ebx, %eax
addq $0x4a8, %rsp            # imm = 0x4A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9187(%rip), %rdi      # 0xe2ab
movq %r13, %rsi
xorl %eax, %eax
callq 0x2300
leaq 0x9176(%rip), %rdi      # 0xe2ab
movq %rsi, %rdx
xorl %eax, %eax
callq 0x2300
movq %r12, %r14
leaq 0x9162(%rip), %rdi      # 0xe2ab
movq %r14, %rsi
xorl %eax, %eax
callq 0x2300
leaq 0x9151(%rip), %rdi      # 0xe2ab
movq %r12, %rsi
xorl %eax, %eax
callq 0x2300
leaq 0x9140(%rip), %rdi      # 0xe2ab
movq %r14, %rsi
xorl %eax, %eax
callq 0x2300
leaq 0x912f(%rip), %rdi      # 0xe2ab
movq %rdx, %rsi
xorl %eax, %eax
callq 0x2300
leaq 0x911e(%rip), %rdi      # 0xe2ab
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2300
leaq 0x910d(%rip), %rdi      # 0xe2ab
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2300
jmp 0x520b
jmp 0x520b
jmp 0x5202
jmp 0x520b
jmp 0x51c3
jmp 0x51d4
jmp 0x520b
jmp 0x51d9
jmp 0x51d4
jmp 0x51c3
jmp 0x51d4
movq %rax, %rbx
jmp 0x521e
movq %rax, %rbx
leaq -0x4d0(%rbp), %rdi
callq 0x2080
jmp 0x522a
movq %rax, %rbx
jmp 0x522a
movq %rax, %rbx
jmp 0x5241
movq %rax, %rbx
jmp 0x524d
jmp 0x51e5
movq %rax, %rbx
jmp 0x5259
jmp 0x520b
jmp 0x520b
jmp 0x520b
jmp 0x520b
jmp 0x520b
jmp 0x5202
jmp 0x5202
jmp 0x520b
jmp 0x520b
jmp 0x520b
jmp 0x520b
jmp 0x5202
movq %rax, %rbx
leaq -0x50(%rbp), %r12
jmp 0x521e
movq %rax, %rbx
leaq -0x50(%rbp), %r12
leaq -0x4d0(%rbp), %rdi
callq 0x22e0
leaq -0x2c8(%rbp), %rdi
callq 0x9318
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x5238
callq 0x21d0
leaq -0x78(%rbp), %rdi
callq 0x9380
leaq -0x1d0(%rbp), %rdi
callq 0x9404
leaq -0x220(%rbp), %rdi
callq 0x9404
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x526e
callq 0x21d0
movq %rbx, %rdi
callq 0x23b0