// File: /workspace/github_cpp_makefile_star2_O1/Windfisch[P]production-flow/read_factory.cpp
// Function: read_factory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Factory read_factory(string file)
{
	ifstream f(file);
	if (!f.good())
		throw runtime_error("could not open file '"+file+"'");
	
	Factory factory;
	string line;

	// parse facilities
	while (getline(f, line))
	{
		if (line == "#") break;

		size_t p1 = line.find(' ');
		if (p1 == string::npos)
			throw runtime_error("invalid format");
	
		if (p1 == line.length()-1)
		{
			vector<Factory::FacilityConfiguration> upgrade_plan;
			Factory::FacilityConfiguration conf;
			upgrade_plan.push_back(conf); // push an empty configuration. this is a splitter node

			factory.facilities.emplace_back(upgrade_plan);
		}
		else
		{
			size_t p2 = line.find(' ', p1+1);
			if (p2 == string::npos)
				throw runtime_error("invalid format");

			size_t p3 = line.find('/', p2+1);
			if (p3 == string::npos)
				throw runtime_error("invalid format");

			string recipe = line.substr(p1+1, p2-p1-1);
			double current = stod(line.substr(p2+1, p3-p2-1));
			double maximum = stod(line.substr(p3+1));

			cout << "recipe '" << recipe << "' with " << current << "/" << maximum << endl;

			vector<Factory::FacilityConfiguration> upgrade_plan;
			
			for (int i=0; i<5; i++)
			{
				Factory::FacilityConfiguration conf;
				
				for (auto iter : recipes.at(recipe))
					conf.production_or_consumption[iter.first] = int(SCALING_FACTOR * iter.second * (current + (maximum-current)*i/5.));
				upgrade_plan.push_back(conf);
			}

			factory.facilities.emplace_back(upgrade_plan);
		}
	}

	if (line != "#")
		throw runtime_error("invalid format: could not find edge list");

	while (getline(f, line))
	{
		size_t p1 = line.find(' ');
		if (p1 == string::npos)
			throw runtime_error("invalid format");
		size_t p2 = line.find(' ',p1+1);
		if (p2 == string::npos)
			throw runtime_error("invalid format");
		size_t p3 = line.find(' ',p2+1);
		if (p3 == string::npos)
			throw runtime_error("invalid format");

		int from = stoi(line.substr(0, p1));
		int to = stoi(line.substr(p1+1,p2-p1-1));
		string item = line.substr(p2+1,p3-p2-1);
		string dist_x = line.substr(p3+1);

		bool exists = (dist_x.substr(dist_x.length()-1) != "x");
		double dist = stod(dist_x);

		cout << "transport of " << item << " " << from << "->" << to << ", distance " << dist << " (line exists=" << exists << ")" << endl;

		vector<Factory::TransportLineConfiguration> upgrade_plan;

		upgrade_plan.emplace_back(Factory::TransportLineConfiguration{int(SCALING_FACTOR * 1*13.3), dist}); // one yellow
		upgrade_plan.emplace_back(Factory::TransportLineConfiguration{int(SCALING_FACTOR * 2*13.3), dist}); // two yellow
		upgrade_plan.emplace_back(Factory::TransportLineConfiguration{int(SCALING_FACTOR * 3*13.3), 4*dist}); // red+yellow
		upgrade_plan.emplace_back(Factory::TransportLineConfiguration{int(SCALING_FACTOR * 4*13.3), 4*dist}); // red+red
		upgrade_plan.emplace_back(Factory::TransportLineConfiguration{int(SCALING_FACTOR * 5*13.3), 15*dist}); // blue+red
		upgrade_plan.emplace_back(Factory::TransportLineConfiguration{int(SCALING_FACTOR * 6*13.3), 15*dist}); // blue+blue

		factory.transport_lines.emplace_back(item_lookup.at(item), from-1, to-1, upgrade_plan);
	}

	return factory;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2e8, %rsp            # imm = 0x2E8
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xe0(%rsp), %r15
movq %r15, %rdi
movl $0x8, %edx
callq 0x3390
movq (%r15), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x100(%rsp,%rax)
jne 0xbd93
xorl %r13d, %r13d
movl $0x90, %edx
movq %r14, 0xa0(%rsp)
movq %r14, %rdi
xorl %esi, %esi
callq 0x3150
leaq 0xc0(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x80(%rsp), %rbp
leaq 0x48(%rsp), %r12
leaq 0x10(%rsp), %r14
movq 0xe0(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %edx
movq %r15, %rdi
leaq 0xb0(%rsp), %rsi
callq 0x3420
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
leaq 0xb0(%rsp), %rbx
jne 0xb529
movq %rbx, %rdi
leaq 0x48a8(%rip), %rsi      # 0xf9b0
callq 0x30a0
testl %eax, %eax
je 0xb529
movq %rbx, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x32d0
cmpq $-0x1, %rax
je 0xbcbe
movq %rax, %rbx
movq 0xb8(%rsp), %rax
decq %rax
cmpq %rax, %rbx
jne 0xb1a7
xorpd %xmm0, %xmm0
movapd %xmm0, 0x80(%rsp)
movq %r13, 0x90(%rsp)
movl $0x0, 0x50(%rsp)
movq %r13, 0x58(%rsp)
leaq 0x50(%rsp), %rax
movq %rax, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movq %r13, 0x70(%rsp)
movq %rbp, %rdi
movq %r12, %rsi
callq 0xc68c
movq 0xa0(%rsp), %rdi
movq %rbp, %rsi
callq 0xc6d6
movq %r12, %rdi
callq 0x4f28
movq %rbp, %rdi
callq 0x4e96
jmp 0xb0b8
leaq 0x1(%rbx), %rbp
leaq 0xb0(%rsp), %rdi
movl $0x20, %esi
movq %rbp, %rdx
callq 0x32d0
cmpq $-0x1, %rax
je 0xbcf5
movq %rax, %r15
leaq 0x1(%rax), %r13
leaq 0xb0(%rsp), %rdi
movl $0x2f, %esi
movq %r13, %rdx
callq 0x32d0
movq %rax, 0x8(%rsp)
cmpq $-0x1, %rax
je 0xbd44
notq %rbx
addq %r15, %rbx
leaq 0x80(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3260
notq %r15
addq 0x8(%rsp), %r15
movq %r12, %rdi
leaq 0xb0(%rsp), %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x3260
movq 0x48(%rsp), %r15
callq 0x3050
movq %rax, %rbx
movl (%rax), %r13d
movl $0x0, (%rax)
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
callq 0x31e0
movsd %xmm0, 0xa8(%rsp)
cmpq %r15, 0x20(%rsp)
leaq 0x80(%rsp), %rbp
je 0xbd38
movl (%rbx), %eax
testl %eax, %eax
leaq 0xb0(%rsp), %r15
je 0xb28b
cmpl $0x22, %eax
jne 0xb28e
jmp 0xbd7b
movl %r13d, (%rbx)
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xb2aa
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3250
movq 0x8(%rsp), %rdx
incq %rdx
movq %r12, %rdi
movq %r15, %rsi
movq $-0x1, %rcx
callq 0x3260
movq 0x48(%rsp), %r15
movl (%rbx), %r13d
movl $0x0, (%rbx)
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
callq 0x31e0
movsd %xmm0, 0x40(%rsp)
cmpq %r15, 0x20(%rsp)
je 0xbd2c
movl (%rbx), %eax
testl %eax, %eax
movq 0x9cd5(%rip), %r15      # 0x14fd0
je 0xb307
cmpl $0x22, %eax
jne 0xb30a
jmp 0xbd87
movl %r13d, (%rbx)
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xb326
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3250
movl $0x8, %edx
movq %r15, %rdi
leaq 0x468c(%rip), %rsi      # 0xf9c1
callq 0x3290
xorl %r13d, %r13d
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq %r15, %rdi
callq 0x3290
movq %rax, %rbx
movl $0x7, %edx
movq %rax, %rdi
leaq 0x4663(%rip), %rsi      # 0xf9ca
callq 0x3290
movq %rbx, %rdi
movsd 0xa8(%rsp), %xmm0
callq 0x3380
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x4050(%rip), %rsi      # 0xf3df
callq 0x3290
movq %rbx, %rdi
movsd 0x40(%rsp), %xmm0
callq 0x3380
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movsd 0x40(%rsp), %xmm0
subsd 0xa8(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
xorl %r15d, %r15d
movl $0x0, 0x50(%rsp)
movq %r13, 0x58(%rsp)
leaq 0x50(%rsp), %rax
movq %rax, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movq %r13, 0x70(%rsp)
leaq 0x9e91(%rip), %rdi      # 0x152b0
movq %rbp, %rsi
callq 0xc708
movq %rax, %rbx
movq 0x18(%rax), %rbp
addq $0x8, %rbx
cmpq %rbx, %rbp
je 0xb4ac
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
mulsd 0x40(%rsp), %xmm0
divsd 0x44f3(%rip), %xmm0     # 0xf940
addsd 0xa8(%rsp), %xmm0
movsd %xmm0, 0xd0(%rsp)
movups 0x20(%rbp), %xmm0
movaps %xmm0, 0x10(%rsp)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0xc75c
movsd 0x8(%rsp), %xmm0
mulsd 0x44bb(%rip), %xmm0     # 0xf948
mulsd 0xd0(%rsp), %xmm0
cvttsd2si %xmm0, %ecx
movl %ecx, (%rax)
movq %rbp, %rdi
callq 0x31b0
movq %rax, %rbp
cmpq %rbx, %rax
jne 0xb45f
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0xc68c
movq %r12, %rdi
callq 0x4f28
incl %r15d
cmpl $0x5, %r15d
leaq 0x80(%rsp), %rbp
jne 0xb3f7
movq 0xa0(%rsp), %rdi
leaq 0x20(%rsp), %rbx
movq %rbx, %rsi
callq 0xc6d6
movq %rbx, %rdi
callq 0x4e96
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
leaq 0xe0(%rsp), %r15
je 0xb0b8
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0xb0b8
leaq 0x4480(%rip), %rsi      # 0xf9b0
leaq 0xb0(%rsp), %rdi
callq 0x30a0
testl %eax, %eax
jne 0xbdf0
movq 0xa0(%rsp), %rax
addq $0x18, %rax
movq %rax, 0xa8(%rsp)
leaq 0xb0(%rsp), %r12
movq 0xe0(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3420
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xbb85
movq %r12, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x32d0
cmpq $-0x1, %rax
je 0xbbd1
movq %rax, %r14
leaq 0x1(%rax), %r13
movq %r12, %rdi
movl $0x20, %esi
movq %r13, %rdx
callq 0x32d0
cmpq $-0x1, %rax
je 0xbc08
movq %rax, %rbp
leaq 0x1(%rax), %r15
movq %r12, %rdi
movl $0x20, %esi
movq %r15, %rdx
callq 0x32d0
cmpq $-0x1, %rax
je 0xbc3f
movq %rax, %rbx
movq %r13, 0x8(%rsp)
movq %r15, 0x40(%rsp)
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x3260
movq 0x48(%rsp), %r12
callq 0x3050
movq %rax, %r13
movl (%rax), %r15d
movl $0x0, (%rax)
movq %r12, %rdi
leaq 0x80(%rsp), %rsi
movl $0xa, %edx
callq 0x3300
cmpq %r12, 0x80(%rsp)
je 0xbc76
movq %rax, 0xd0(%rsp)
addq $-0x80000000, %rax      # imm = 0x80000000
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jb 0xbc82
movl (%r13), %eax
cmpl $0x22, %eax
je 0xbc82
testl %eax, %eax
leaq 0xb0(%rsp), %r12
jne 0xb68b
movl %r15d, (%r13)
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xb6a7
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3250
notq %r14
addq %rbp, %r14
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
movq 0x8(%rsp), %rdx
movq %r14, %rcx
callq 0x3260
movq 0x48(%rsp), %r15
movl (%r13), %r12d
movl $0x0, (%r13)
movq %r15, %rdi
leaq 0x80(%rsp), %rsi
movl $0xa, %edx
callq 0x3300
cmpq %r15, 0x80(%rsp)
je 0xbc8e
movq %rax, %r14
addq $-0x80000000, %rax      # imm = 0x80000000
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jb 0xbc9a
movl (%r13), %eax
cmpl $0x22, %eax
je 0xbc9a
testl %eax, %eax
leaq 0x80(%rsp), %r15
jne 0xb72f
movl %r12d, (%r13)
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xb74b
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3250
notq %rbp
addq %rbx, %rbp
leaq 0x48(%rsp), %rdi
leaq 0xb0(%rsp), %r12
movq %r12, %rsi
movq 0x40(%rsp), %rdx
movq %rbp, %rcx
callq 0x3260
incq %rbx
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq $-0x1, %rcx
callq 0x3260
movq 0x88(%rsp), %rdx
decq %rdx
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq $-0x1, %rcx
callq 0x3260
movq %rbx, %rdi
leaq 0x4249(%rip), %rsi      # 0xf9fb
callq 0x30a0
movl %eax, %ebp
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xb7d5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3250
movq 0x80(%rsp), %rbx
movl (%r13), %r15d
movl $0x0, (%r13)
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
callq 0x31e0
movsd %xmm0, 0x8(%rsp)
cmpq %rbx, 0x20(%rsp)
je 0xbca6
movl (%r13), %eax
testl %eax, %eax
je 0xb819
cmpl $0x22, %eax
jne 0xb81d
jmp 0xbcb2
movl %r15d, (%r13)
movl $0xd, %edx
movq 0x97a7(%rip), %rbx      # 0x14fd0
movq %rbx, %rdi
leaq 0x41ca(%rip), %rsi      # 0xf9fd
callq 0x3290
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %rbx, %rdi
callq 0x3290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3d7e(%rip), %rsi      # 0xf5da
callq 0x3290
movq %rbx, %rdi
movq 0xd0(%rsp), %rsi
callq 0x33f0
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
leaq 0x38e0(%rip), %rsi      # 0xf163
callq 0x3290
movq %rbx, %rdi
movl %r14d, %esi
callq 0x33f0
movq %rax, %rbx
movl $0xb, %edx
movq %rax, %rdi
leaq 0x4166(%rip), %rsi      # 0xfa0b
callq 0x3290
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x3380
movq %rax, %rbx
movl $0xe, %edx
movq %rax, %rdi
leaq 0x414d(%rip), %rsi      # 0xfa17
callq 0x3290
xorl %esi, %esi
testl %ebp, %ebp
setne %sil
movq %rbx, %rdi
callq 0x33d0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3e23(%rip), %rsi      # 0xf714
callq 0x3290
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movl $0x33f4, 0x10(%rsp)     # imm = 0x33F4
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0xb972
movupd 0x10(%rsp), %xmm0
movupd %xmm0, (%rsi)
addq $0x10, 0x28(%rsp)
leaq 0xe0(%rsp), %r15
leaq 0x20(%rsp), %rbx
leaq 0x10(%rsp), %r13
jmp 0xb98f
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
leaq 0x10(%rsp), %r13
movq %r13, %rdx
callq 0xdd80
leaq 0xe0(%rsp), %r15
movq 0x28(%rsp), %rsi
movl $0x67e8, 0x10(%rsp)     # imm = 0x67E8
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
cmpq 0x30(%rsp), %rsi
je 0xb9c1
movupd 0x10(%rsp), %xmm0
movupd %xmm0, (%rsi)
addq $0x10, 0x28(%rsp)
jmp 0xb9cc
movq %rbx, %rdi
movq %r13, %rdx
callq 0xdd80
movq 0x28(%rsp), %rsi
movl $0x9bdc, 0x10(%rsp)     # imm = 0x9BDC
movsd 0x8(%rsp), %xmm0
mulsd 0x3f69(%rip), %xmm0     # 0xf950
movsd %xmm0, 0x40(%rsp)
movsd %xmm0, 0x18(%rsp)
cmpq 0x30(%rsp), %rsi
je 0xba0c
movupd 0x10(%rsp), %xmm0
movupd %xmm0, (%rsi)
addq $0x10, 0x28(%rsp)
jmp 0xba17
movq %rbx, %rdi
movq %r13, %rdx
callq 0xdd80
movq 0x28(%rsp), %rsi
movl $0xcfd0, 0x10(%rsp)     # imm = 0xCFD0
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
cmpq 0x30(%rsp), %rsi
je 0xba49
movupd 0x10(%rsp), %xmm0
movupd %xmm0, (%rsi)
addq $0x10, 0x28(%rsp)
jmp 0xba54
movq %rbx, %rdi
movq %r13, %rdx
callq 0xdd80
movq 0x28(%rsp), %rsi
movl $0x103c4, 0x10(%rsp)    # imm = 0x103C4
movsd 0x8(%rsp), %xmm0
mulsd 0x3ee9(%rip), %xmm0     # 0xf958
movsd %xmm0, 0x8(%rsp)
movsd %xmm0, 0x18(%rsp)
cmpq 0x30(%rsp), %rsi
je 0xba94
movupd 0x10(%rsp), %xmm0
movupd %xmm0, (%rsi)
addq $0x10, 0x28(%rsp)
jmp 0xba9f
movq %rbx, %rdi
movq %r13, %rdx
callq 0xdd80
movq 0x28(%rsp), %rsi
movl $0x137b8, 0x10(%rsp)    # imm = 0x137B8
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
cmpq 0x30(%rsp), %rsi
je 0xbad1
movupd 0x10(%rsp), %xmm0
movupd %xmm0, (%rsi)
addq $0x10, 0x28(%rsp)
jmp 0xbadc
movq %rbx, %rdi
movq %r13, %rdx
callq 0xdd80
leaq 0x97fd(%rip), %rdi      # 0x152e0
leaq 0x48(%rsp), %rsi
callq 0xc848
movq 0xd0(%rsp), %rcx
decl %ecx
movl %ecx, 0x10(%rsp)
decl %r14d
movl %r14d, 0xdc(%rsp)
movq 0xa8(%rsp), %rdi
movq %rax, %rsi
movq %r13, %rdx
leaq 0xdc(%rsp), %rcx
movq %rbx, %r8
callq 0xc7c0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xbb3b
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x3250
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0xbb60
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x3250
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xb561
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0xb561
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0xbbaa
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x3250
leaq 0xe0(%rsp), %rdi
callq 0x3080
movq 0xa0(%rsp), %rax
addq $0x2e8, %rsp            # imm = 0x2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x3120
movq %rax, %rbx
leaq 0x3dcd(%rip), %rsi      # 0xf9b2
movq %rax, %rdi
callq 0x30e0
movq 0x93fc(%rip), %rsi      # 0x14ff0
movq 0x93c5(%rip), %rdx      # 0x14fc0
movq %rbx, %rdi
callq 0x33e0
jmp 0xbe6f
movl $0x10, %edi
callq 0x3120
movq %rax, %rbx
leaq 0x3d96(%rip), %rsi      # 0xf9b2
movq %rax, %rdi
callq 0x30e0
movq 0x93c5(%rip), %rsi      # 0x14ff0
movq 0x938e(%rip), %rdx      # 0x14fc0
movq %rbx, %rdi
callq 0x33e0
jmp 0xbe6f
movl $0x10, %edi
callq 0x3120
movq %rax, %rbx
leaq 0x3d5f(%rip), %rsi      # 0xf9b2
movq %rax, %rdi
callq 0x30e0
movq 0x938e(%rip), %rsi      # 0x14ff0
movq 0x9357(%rip), %rdx      # 0x14fc0
movq %rbx, %rdi
callq 0x33e0
jmp 0xbe6f
leaq 0x3dae(%rip), %rdi      # 0xfa2b
callq 0x3160
leaq 0x3da2(%rip), %rdi      # 0xfa2b
callq 0x3310
leaq 0x3d96(%rip), %rdi      # 0xfa2b
callq 0x3160
leaq 0x3d8a(%rip), %rdi      # 0xfa2b
callq 0x3310
leaq 0x3d79(%rip), %rdi      # 0xfa26
callq 0x3160
leaq 0x3d6d(%rip), %rdi      # 0xfa26
callq 0x3310
movl $0x10, %edi
callq 0x3120
movq %rax, %rbx
leaq 0x3ce0(%rip), %rsi      # 0xf9b2
movq %rax, %rdi
callq 0x30e0
movq 0x930f(%rip), %rsi      # 0x14ff0
movq 0x92d8(%rip), %rdx      # 0x14fc0
movq %rbx, %rdi
callq 0x33e0
jmp 0xbe6f
movl $0x10, %edi
callq 0x3120
movq %rax, %rbx
leaq 0x3ca9(%rip), %rsi      # 0xf9b2
movq %rax, %rdi
callq 0x30e0
movq 0x92d8(%rip), %rsi      # 0x14ff0
movq 0x92a1(%rip), %rdx      # 0x14fc0
movq %rbx, %rdi
callq 0x33e0
jmp 0xbe6f
leaq 0x3cf3(%rip), %rdi      # 0xfa26
callq 0x3160
leaq 0x3ce7(%rip), %rdi      # 0xfa26
callq 0x3160
movl $0x10, %edi
callq 0x3120
movq %rax, %rbx
leaq 0x3c5a(%rip), %rsi      # 0xf9b2
movq %rax, %rdi
callq 0x30e0
movq 0x9289(%rip), %rsi      # 0x14ff0
movq 0x9252(%rip), %rdx      # 0x14fc0
movq %rbx, %rdi
callq 0x33e0
jmp 0xbe6f
leaq 0x3ca4(%rip), %rdi      # 0xfa26
callq 0x3310
leaq 0x3c98(%rip), %rdi      # 0xfa26
callq 0x3310
movl $0x10, %edi
callq 0x3120
movq %rax, %r14
leaq 0x3bf3(%rip), %rsi      # 0xf99a
leaq 0xb0(%rsp), %rdi
movq %rbx, %rdx
callq 0xc603
leaq 0x3bf0(%rip), %rsi      # 0xf9ae
leaq 0xb0(%rsp), %rdi
callq 0x3430
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0xbe24
movupd (%rcx), %xmm0
movupd %xmm0, (%r12)
jmp 0xbe31
movl $0x10, %edi
callq 0x3120
movq %rax, %rbx
leaq 0x3bce(%rip), %rsi      # 0xf9d2
movq %rax, %rdi
callq 0x30e0
movq 0x91dd(%rip), %rsi      # 0x14ff0
movq 0x91a6(%rip), %rdx      # 0x14fc0
movq %rbx, %rdi
callq 0x33e0
jmp 0xbe6f
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bl
movq %r14, %rdi
callq 0x33a0
xorl %ebx, %ebx
movq 0x9190(%rip), %rsi      # 0x14ff0
movq 0x9159(%rip), %rdx      # 0x14fc0
movq %r14, %rdi
callq 0x33e0
movq %rax, %rbp
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0xbe90
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0xbe90
movq %rax, %rbp
movb $0x1, %bl
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbec2
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0xbec2
jmp 0xbfdd
jmp 0xbf70
movq %rax, %rbp
movb $0x1, %bl
testb %bl, %bl
je 0xc09a
movq %r14, %rdi
callq 0x31d0
jmp 0xc09a
jmp 0xbfdd
jmp 0xbf70
jmp 0xbfdd
jmp 0xbf70
movq %rax, %rbp
jmp 0xc039
jmp 0xbfe5
jmp 0xbfe5
jmp 0xbfdd
jmp 0xbfdd
jmp 0xbf70
jmp 0xbf0b
movq %rax, %rbp
cmpl $0x0, (%rbx)
jne 0xbf16
movl %r13d, (%rbx)
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xc043
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0xc043
jmp 0xbf82
jmp 0xbf82
jmp 0xbf82
jmp 0xbf82
jmp 0xbf82
jmp 0xbf82
movq %rax, %rbp
leaq 0x48(%rsp), %rdi
callq 0x4f28
leaq 0x80(%rsp), %rdi
callq 0x4e96
jmp 0xc068
jmp 0xbfdd
jmp 0xbf70
jmp 0xbfdd
jmp 0xbf70
jmp 0xbfdd
movq %rax, %rbp
movq %rbx, %rdi
callq 0x31d0
jmp 0xc068
jmp 0xbf82
movq %rax, %rbp
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xbff1
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x3250
jmp 0xbff1
jmp 0xbfee
jmp 0xbfdd
movq %rax, %rbp
jmp 0xc016
jmp 0xbfdd
jmp 0xbfdd
jmp 0xbfdd
movq %rax, %rbp
cmpl $0x0, (%r13)
jne 0xbff1
movl %r15d, (%r13)
jmp 0xbff1
movq %rax, %rbp
cmpl $0x0, (%r13)
jne 0xc016
movl %r12d, (%r13)
jmp 0xc016
movq %rax, %rbp
cmpl $0x0, (%r13)
jne 0xc016
movl %r15d, (%r13)
jmp 0xc016
movq %rax, %rbp
jmp 0xc068
movq %rax, %rbp
jmp 0xc043
jmp 0xc02c
jmp 0xc02c
movq %rax, %rbp
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0xc016
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x3250
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xc068
movq 0x58(%rsp), %rsi
jmp 0xc060
movq %rax, %rbp
leaq 0x48(%rsp), %rdi
callq 0x4f28
leaq 0x20(%rsp), %rdi
callq 0x4e96
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0xc068
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x3250
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0xc08d
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x3250
movq 0xa0(%rsp), %rdi
callq 0x4cb8
leaq 0xe0(%rsp), %rdi
callq 0x3080
movq %rbp, %rdi
callq 0x3400
nop