// File: rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_shader_resources(std::unordered_set<unsigned int, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<unsigned int>> const*) const
ShaderResources Compiler::get_shader_resources(const unordered_set<uint32_t> *active_variables) const
{
	ShaderResources res;

	for (auto &id : ir.ids)
	{
		if (id.get_type() != TypeVariable)
			continue;

		auto &var = id.get<SPIRVariable>();
		auto &type = get<SPIRType>(var.basetype);

		// It is possible for uniform storage classes to be passed as function parameters, so detect
		// that. To detect function parameters, check of StorageClass of variable is function scope.
		if (var.storage == StorageClassFunction || !type.pointer || is_builtin_variable(var))
			continue;

		if (active_variables && active_variables->find(var.self) == end(*active_variables))
			continue;

		// Input
		if (var.storage == StorageClassInput && interface_variable_exists_in_entry_point(var.self))
		{
			if (ir.meta[type.self].decoration.decoration_flags.get(DecorationBlock))
				res.stage_inputs.push_back(
				    { var.self, var.basetype, type.self, get_remapped_declared_block_name(var.self) });
			else
				res.stage_inputs.push_back({ var.self, var.basetype, type.self, ir.meta[var.self].decoration.alias });
		}
		// Subpass inputs
		else if (var.storage == StorageClassUniformConstant && type.image.dim == DimSubpassData)
		{
			res.subpass_inputs.push_back({ var.self, var.basetype, type.self, ir.meta[var.self].decoration.alias });
		}
		// Outputs
		else if (var.storage == StorageClassOutput && interface_variable_exists_in_entry_point(var.self))
		{
			if (ir.meta[type.self].decoration.decoration_flags.get(DecorationBlock))
				res.stage_outputs.push_back(
				    { var.self, var.basetype, type.self, get_remapped_declared_block_name(var.self) });
			else
				res.stage_outputs.push_back({ var.self, var.basetype, type.self, ir.meta[var.self].decoration.alias });
		}
		// UBOs
		else if (type.storage == StorageClassUniform &&
		         (ir.meta[type.self].decoration.decoration_flags.get(DecorationBlock)))
		{
			res.uniform_buffers.push_back(
			    { var.self, var.basetype, type.self, get_remapped_declared_block_name(var.self) });
		}
		// Old way to declare SSBOs.
		else if (type.storage == StorageClassUniform &&
		         (ir.meta[type.self].decoration.decoration_flags.get(DecorationBufferBlock)))
		{
			res.storage_buffers.push_back(
			    { var.self, var.basetype, type.self, get_remapped_declared_block_name(var.self) });
		}
		// Modern way to declare SSBOs.
		else if (type.storage == StorageClassStorageBuffer)
		{
			res.storage_buffers.push_back(
			    { var.self, var.basetype, type.self, get_remapped_declared_block_name(var.self) });
		}
		// Push constant blocks
		else if (type.storage == StorageClassPushConstant)
		{
			// There can only be one push constant block, but keep the vector in case this restriction is lifted
			// in the future.
			res.push_constant_buffers.push_back(
			    { var.self, var.basetype, type.self, ir.meta[var.self].decoration.alias });
		}
		// Images
		else if (type.storage == StorageClassUniformConstant && type.basetype == SPIRType::Image &&
		         type.image.sampled == 2)
		{
			res.storage_images.push_back({ var.self, var.basetype, type.self, ir.meta[var.self].decoration.alias });
		}
		// Separate images
		else if (type.storage == StorageClassUniformConstant && type.basetype == SPIRType::Image &&
		         type.image.sampled == 1)
		{
			res.separate_images.push_back({ var.self, var.basetype, type.self, ir.meta[var.self].decoration.alias });
		}
		// Separate samplers
		else if (type.storage == StorageClassUniformConstant && type.basetype == SPIRType::Sampler)
		{
			res.separate_samplers.push_back({ var.self, var.basetype, type.self, ir.meta[var.self].decoration.alias });
		}
		// Textures
		else if (type.storage == StorageClassUniformConstant && type.basetype == SPIRType::SampledImage)
		{
			res.sampled_images.push_back({ var.self, var.basetype, type.self, ir.meta[var.self].decoration.alias });
		}
		// Atomic counters
		else if (type.storage == StorageClassAtomicCounter)
		{
			res.atomic_counters.push_back({ var.self, var.basetype, type.self, ir.meta[var.self].decoration.alias });
		}
	}

	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x430, %rsp            # imm = 0x430
movq %rdi, -0x328(%rbp)
movq %rdi, %rax
movq %rax, -0x320(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x318(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x2ee70
movq -0x318(%rbp), %rax
addq $0x8, %rax
addq $0x18, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2ef20
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2ef50
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2ef80
testb $0x1, %al
jne 0x2097f
jmp 0x21695
leaq -0x30(%rbp), %rdi
callq 0x2efc0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0xfa00
movl %eax, -0x32c(%rbp)
jmp 0x2099d
movl -0x32c(%rbp), %eax
cmpl $0x2, %eax
je 0x209be
jmp 0x21687
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x216bb
movq -0x40(%rbp), %rdi
callq 0x2efe0
movq %rax, -0x338(%rbp)
jmp 0x209d0
movq -0x318(%rbp), %rdi
movq -0x338(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x2e6b0
movq %rax, -0x340(%rbp)
jmp 0x209f7
movq -0x340(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
cmpl $0x7, 0x10(%rax)
je 0x20a3a
movq -0x60(%rbp), %rax
testb $0x1, 0x60(%rax)
je 0x20a3a
movq -0x318(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x205a0
movb %al, -0x341(%rbp)
jmp 0x20a2e
movb -0x341(%rbp), %al
testb $0x1, %al
jne 0x20a3a
jmp 0x20a3f
jmp 0x21687
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x342(%rbp)
je 0x20aa3
movq -0x18(%rbp), %rdi
movq -0x58(%rbp), %rsi
addq $0x8, %rsi
callq 0x2eb60
movq %rax, -0x350(%rbp)
jmp 0x20a68
movq -0x350(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2eb90
movq %rax, -0x358(%rbp)
jmp 0x20a85
movq -0x358(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x2eb30
movb %al, -0x342(%rbp)
movb -0x342(%rbp), %al
testb $0x1, %al
jne 0x20aaf
jmp 0x20ab4
jmp 0x21687
movq -0x58(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jne 0x20c7b
movq -0x318(%rbp), %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x21c10
movb %al, -0x359(%rbp)
jmp 0x20add
movb -0x359(%rbp), %al
testb $0x1, %al
jne 0x20aec
jmp 0x20c7b
movq -0x318(%rbp), %rdi
addq $0x38, %rdi
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x2e6f0
movq %rax, %rdi
addq $0x60, %rdi
movl $0x2, %esi
callq 0xef50
movb %al, -0x35a(%rbp)
jmp 0x20b1e
movb -0x35a(%rbp), %al
testb $0x1, %al
jne 0x20b2d
jmp 0x20bc5
movq -0x318(%rbp), %rsi
movq -0x328(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x368(%rbp)
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0xa0(%rbp)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x9c(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x98(%rbp)
leaq -0x90(%rbp), %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %edx
callq 0x21dc0
jmp 0x20b82
movq -0x368(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x2f190
jmp 0x20b97
leaq -0xa0(%rbp), %rdi
callq 0x2f1c0
jmp 0x20c76
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x2f1c0
jmp 0x216bb
movq -0x318(%rbp), %rdi
movq -0x328(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x378(%rbp)
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0xd0(%rbp)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0xcc(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0xc8(%rbp)
leaq -0xc0(%rbp), %rax
movq %rax, -0x370(%rbp)
addq $0x38, %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x2e6f0
movq -0x370(%rbp), %rdi
movq %rax, %rsi
callq 0x7170
jmp 0x20c36
movq -0x378(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x2f190
jmp 0x20c4b
leaq -0xd0(%rbp), %rdi
callq 0x2f1c0
jmp 0x20c76
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x2f1c0
jmp 0x216bb
jmp 0x21685
movq -0x58(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x20d4e
movq -0x60(%rbp), %rax
cmpl $0x6, 0x84(%rax)
jne 0x20d4e
movq -0x318(%rbp), %rdi
movq -0x328(%rbp), %rax
addq $0x60, %rax
movq %rax, -0x388(%rbp)
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x100(%rbp)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0xfc(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0xf8(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x380(%rbp)
addq $0x38, %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x2e6f0
movq -0x380(%rbp), %rdi
movq %rax, %rsi
callq 0x7170
jmp 0x20d0b
movq -0x388(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x2f190
jmp 0x20d20
leaq -0x100(%rbp), %rdi
callq 0x2f1c0
jmp 0x21683
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x2f1c0
jmp 0x216bb
movq -0x58(%rbp), %rax
cmpl $0x3, 0x10(%rax)
jne 0x20f15
movq -0x318(%rbp), %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x21c10
movb %al, -0x389(%rbp)
jmp 0x20d77
movb -0x389(%rbp), %al
testb $0x1, %al
jne 0x20d86
jmp 0x20f15
movq -0x318(%rbp), %rdi
addq $0x38, %rdi
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x2e6f0
movq %rax, %rdi
addq $0x60, %rdi
movl $0x2, %esi
callq 0xef50
movb %al, -0x38a(%rbp)
jmp 0x20db8
movb -0x38a(%rbp), %al
testb $0x1, %al
jne 0x20dc7
jmp 0x20e5f
movq -0x318(%rbp), %rsi
movq -0x328(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x398(%rbp)
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x130(%rbp)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x12c(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x128(%rbp)
leaq -0x120(%rbp), %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %edx
callq 0x21dc0
jmp 0x20e1c
movq -0x398(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x2f190
jmp 0x20e31
leaq -0x130(%rbp), %rdi
callq 0x2f1c0
jmp 0x20f10
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x2f1c0
jmp 0x216bb
movq -0x318(%rbp), %rdi
movq -0x328(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x3a8(%rbp)
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x160(%rbp)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x15c(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x158(%rbp)
leaq -0x150(%rbp), %rax
movq %rax, -0x3a0(%rbp)
addq $0x38, %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x2e6f0
movq -0x3a0(%rbp), %rdi
movq %rax, %rsi
callq 0x7170
jmp 0x20ed0
movq -0x3a8(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x2f190
jmp 0x20ee5
leaq -0x160(%rbp), %rdi
callq 0x2f1c0
jmp 0x20f10
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x2f1c0
jmp 0x216bb
jmp 0x21681
movq -0x60(%rbp), %rax
cmpl $0x2, 0x64(%rax)
jne 0x20ff8
movq -0x318(%rbp), %rdi
addq $0x38, %rdi
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x2e6f0
movq %rax, %rdi
addq $0x60, %rdi
movl $0x2, %esi
callq 0xef50
movb %al, -0x3a9(%rbp)
jmp 0x20f55
movb -0x3a9(%rbp), %al
testb $0x1, %al
jne 0x20f64
jmp 0x20ff8
movq -0x318(%rbp), %rsi
movq -0x328(%rbp), %rax
movq %rax, -0x3b8(%rbp)
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x190(%rbp)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x18c(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x188(%rbp)
leaq -0x180(%rbp), %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %edx
callq 0x21dc0
jmp 0x20fb5
movq -0x3b8(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x2f190
jmp 0x20fca
leaq -0x190(%rbp), %rdi
callq 0x2f1c0
jmp 0x2167f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x2f1c0
jmp 0x216bb
movq -0x60(%rbp), %rax
cmpl $0x2, 0x64(%rax)
jne 0x210df
movq -0x318(%rbp), %rdi
addq $0x38, %rdi
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x2e6f0
movq %rax, %rdi
addq $0x60, %rdi
movl $0x3, %esi
callq 0xef50
movb %al, -0x3b9(%rbp)
jmp 0x21038
movb -0x3b9(%rbp), %al
testb $0x1, %al
jne 0x21047
jmp 0x210df
movq -0x318(%rbp), %rsi
movq -0x328(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x3c8(%rbp)
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x1c0(%rbp)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x1bc(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x1b8(%rbp)
leaq -0x1b0(%rbp), %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %edx
callq 0x21dc0
jmp 0x2109c
movq -0x3c8(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x2f190
jmp 0x210b1
leaq -0x1c0(%rbp), %rdi
callq 0x2f1c0
jmp 0x2167d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x2f1c0
jmp 0x216bb
movq -0x60(%rbp), %rax
cmpl $0xc, 0x64(%rax)
jne 0x21185
movq -0x318(%rbp), %rsi
movq -0x328(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x3d0(%rbp)
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x1f0(%rbp)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x1ec(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x1e8(%rbp)
leaq -0x1e0(%rbp), %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %edx
callq 0x21dc0
jmp 0x21142
movq -0x3d0(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
callq 0x2f190
jmp 0x21157
leaq -0x1f0(%rbp), %rdi
callq 0x2f1c0
jmp 0x2167b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x2f1c0
jmp 0x216bb
movq -0x60(%rbp), %rax
cmpl $0x9, 0x64(%rax)
jne 0x21249
movq -0x318(%rbp), %rdi
movq -0x328(%rbp), %rax
addq $0xc0, %rax
movq %rax, -0x3e0(%rbp)
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x220(%rbp)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x21c(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x218(%rbp)
leaq -0x210(%rbp), %rax
movq %rax, -0x3d8(%rbp)
addq $0x38, %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x2e6f0
movq -0x3d8(%rbp), %rdi
movq %rax, %rsi
callq 0x7170
jmp 0x21206
movq -0x3e0(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x2f190
jmp 0x2121b
leaq -0x220(%rbp), %rdi
callq 0x2f1c0
jmp 0x21679
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x2f1c0
jmp 0x216bb
movq -0x60(%rbp), %rax
cmpl $0x0, 0x64(%rax)
jne 0x2132a
movq -0x60(%rbp), %rax
cmpl $0xd, 0xc(%rax)
jne 0x2132a
movq -0x60(%rbp), %rax
cmpl $0x2, 0x8c(%rax)
jne 0x2132a
movq -0x318(%rbp), %rdi
movq -0x328(%rbp), %rax
addq $0x78, %rax
movq %rax, -0x3f0(%rbp)
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x250(%rbp)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x24c(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x248(%rbp)
leaq -0x240(%rbp), %rax
movq %rax, -0x3e8(%rbp)
addq $0x38, %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x2e6f0
movq -0x3e8(%rbp), %rdi
movq %rax, %rsi
callq 0x7170
jmp 0x212e7
movq -0x3f0(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x2f190
jmp 0x212fc
leaq -0x250(%rbp), %rdi
callq 0x2f1c0
jmp 0x21677
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x2f1c0
jmp 0x216bb
movq -0x60(%rbp), %rax
cmpl $0x0, 0x64(%rax)
jne 0x2140d
movq -0x60(%rbp), %rax
cmpl $0xd, 0xc(%rax)
jne 0x2140d
movq -0x60(%rbp), %rax
cmpl $0x1, 0x8c(%rax)
jne 0x2140d
movq -0x318(%rbp), %rdi
movq -0x328(%rbp), %rax
addq $0xd8, %rax
movq %rax, -0x400(%rbp)
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x280(%rbp)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x27c(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x278(%rbp)
leaq -0x270(%rbp), %rax
movq %rax, -0x3f8(%rbp)
addq $0x38, %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x2e6f0
movq -0x3f8(%rbp), %rdi
movq %rax, %rsi
callq 0x7170
jmp 0x213ca
movq -0x400(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x2f190
jmp 0x213df
leaq -0x280(%rbp), %rdi
callq 0x2f1c0
jmp 0x21675
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x280(%rbp), %rdi
callq 0x2f1c0
jmp 0x216bb
movq -0x60(%rbp), %rax
cmpl $0x0, 0x64(%rax)
jne 0x214df
movq -0x60(%rbp), %rax
cmpl $0xf, 0xc(%rax)
jne 0x214df
movq -0x318(%rbp), %rdi
movq -0x328(%rbp), %rax
addq $0xf0, %rax
movq %rax, -0x410(%rbp)
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x2b0(%rbp)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x2ac(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x2a8(%rbp)
leaq -0x2a0(%rbp), %rax
movq %rax, -0x408(%rbp)
addq $0x38, %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x2e6f0
movq -0x408(%rbp), %rdi
movq %rax, %rsi
callq 0x7170
jmp 0x2149c
movq -0x410(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
callq 0x2f190
jmp 0x214b1
leaq -0x2b0(%rbp), %rdi
callq 0x2f1c0
jmp 0x21673
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x2b0(%rbp), %rdi
callq 0x2f1c0
jmp 0x216bb
movq -0x60(%rbp), %rax
cmpl $0x0, 0x64(%rax)
jne 0x215b1
movq -0x60(%rbp), %rax
cmpl $0xe, 0xc(%rax)
jne 0x215b1
movq -0x318(%rbp), %rdi
movq -0x328(%rbp), %rax
addq $0x90, %rax
movq %rax, -0x420(%rbp)
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x2e0(%rbp)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x2dc(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x2d8(%rbp)
leaq -0x2d0(%rbp), %rax
movq %rax, -0x418(%rbp)
addq $0x38, %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x2e6f0
movq -0x418(%rbp), %rdi
movq %rax, %rsi
callq 0x7170
jmp 0x2156e
movq -0x420(%rbp), %rdi
leaq -0x2e0(%rbp), %rsi
callq 0x2f190
jmp 0x21583
leaq -0x2e0(%rbp), %rdi
callq 0x2f1c0
jmp 0x21671
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x2e0(%rbp), %rdi
callq 0x2f1c0
jmp 0x216bb
movq -0x60(%rbp), %rax
cmpl $0xa, 0x64(%rax)
jne 0x2166f
movq -0x318(%rbp), %rdi
movq -0x328(%rbp), %rax
addq $0xa8, %rax
movq %rax, -0x430(%rbp)
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x310(%rbp)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x30c(%rbp)
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x308(%rbp)
leaq -0x300(%rbp), %rax
movq %rax, -0x428(%rbp)
addq $0x38, %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x2e6f0
movq -0x428(%rbp), %rdi
movq %rax, %rsi
callq 0x7170
jmp 0x21632
movq -0x430(%rbp), %rdi
leaq -0x310(%rbp), %rsi
callq 0x2f190
jmp 0x21647
leaq -0x310(%rbp), %rdi
callq 0x2f1c0
jmp 0x2166f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x310(%rbp), %rdi
callq 0x2f1c0
jmp 0x216bb
jmp 0x21671
jmp 0x21673
jmp 0x21675
jmp 0x21677
jmp 0x21679
jmp 0x2167b
jmp 0x2167d
jmp 0x2167f
jmp 0x21681
jmp 0x21683
jmp 0x21685
jmp 0x21687
leaq -0x30(%rbp), %rdi
callq 0x2f1e0
jmp 0x20969
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x216ab
movq -0x328(%rbp), %rdi
callq 0x2f200
movq -0x320(%rbp), %rax
addq $0x430, %rsp            # imm = 0x430
popq %rbp
retq
movq -0x328(%rbp), %rdi
callq 0x2f200
movq -0x48(%rbp), %rdi
callq 0x7640