// File: rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::emit_buffer_block(spirv_cross::SPIRVariable const&)
void CompilerHLSL::emit_buffer_block(const SPIRVariable &var)
{
	auto &type = get<SPIRType>(var.basetype);

	bool is_uav = var.storage == StorageClassStorageBuffer || has_decoration(type.self, DecorationBufferBlock);

	if (is_uav)
	{
		Bitset flags = ir.get_buffer_block_flags(var);
		bool is_readonly = flags.get(DecorationNonWritable);
		bool is_coherent = flags.get(DecorationCoherent);
		add_resource_name(var.self);
		statement(is_coherent ? "globallycoherent " : "", is_readonly ? "ByteAddressBuffer " : "RWByteAddressBuffer ",
		          to_name(var.self), type_to_array_glsl(type), to_resource_binding(var), ";");
	}
	else
	{
		if (type.array.empty())
		{
			if (buffer_is_packing_standard(type, BufferPackingHLSLCbufferPackOffset))
				set_decoration(type.self, DecorationCPacked);
			else
				SPIRV_CROSS_THROW("cbuffer cannot be expressed with either HLSL packing layout or packoffset.");

			// Flatten the top-level struct so we can use packoffset,
			// this restriction is similar to GLSL where layout(offset) is not possible on sub-structs.
			flattened_structs.insert(var.self);

			// Prefer the block name if possible.
			auto buffer_name = to_name(type.self, false);
			if (ir.meta[type.self].decoration.alias.empty() || resource_names.find(buffer_name) != end(resource_names))
				buffer_name = get_block_fallback_name(var.self);
			add_variable(resource_names, buffer_name);

			// If for some reason buffer_name is an illegal name, make a final fallback to a workaround name.
			// This cannot conflict with anything else, so we're safe now.
			if (buffer_name.empty())
				buffer_name = join("_", get<SPIRType>(var.basetype).self, "_", var.self);

			resource_names.insert(buffer_name);

			// Save for post-reflection later.
			declared_block_names[var.self] = buffer_name;

			type.member_name_cache.clear();
			add_resource_name(var.self);
			statement("cbuffer ", buffer_name, to_resource_binding(var));
			begin_scope();

			uint32_t i = 0;
			for (auto &member : type.member_types)
			{
				add_member_name(type, i);
				auto backup_name = get_member_name(type.self, i);
				auto member_name = to_member_name(type, i);
				set_member_name(type.self, i, sanitize_underscores(join(to_name(var.self), "_", member_name)));
				emit_struct_member(type, member, i, "");
				set_member_name(type.self, i, backup_name);
				i++;
			}

			end_scope_decl();
			statement("");
		}
		else
		{
			if (hlsl_options.shader_model < 51)
				SPIRV_CROSS_THROW(
				    "Need ConstantBuffer<T> to use arrays of UBOs, but this is only supported in SM 5.1.");

			// ConstantBuffer<T> does not support packoffset, so it is unuseable unless everything aligns as we expect.
			if (!buffer_is_packing_standard(type, BufferPackingHLSLCbuffer))
				SPIRV_CROSS_THROW("HLSL ConstantBuffer<T> cannot be expressed with normal HLSL packing rules.");

			add_resource_name(type.self);
			add_resource_name(var.self);

			emit_struct(get<SPIRType>(type.self));
			statement("ConstantBuffer<", to_name(type.self), "> ", to_name(var.self), type_to_array_glsl(type),
			          to_resource_binding(var), ";");
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x390(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
callq 0xea90
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movb $0x1, %al
cmpl $0xc, 0x10(%rcx)
movb %al, -0x381(%rbp)
je 0xc260e
movq -0x390(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
movl $0x3, %edx
callq 0x1f560
movb %al, -0x381(%rbp)
movb -0x381(%rbp), %al
andb $0x1, %al
movb %al, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
je 0xc2803
movq -0x390(%rbp), %rsi
addq $0x8, %rsi
movq -0x10(%rbp), %rdx
leaq -0x60(%rbp), %rdi
movq %rdi, -0x3a0(%rbp)
callq 0x54c20
movq -0x3a0(%rbp), %rdi
movl $0x18, %esi
callq 0xef50
movb %al, -0x391(%rbp)
jmp 0xc265b
movb -0x391(%rbp), %al
andb $0x1, %al
movb %al, -0x61(%rbp)
leaq -0x60(%rbp), %rdi
movl $0x17, %esi
callq 0xef50
movb %al, -0x3a1(%rbp)
jmp 0xc267c
movq -0x390(%rbp), %rdi
movb -0x3a1(%rbp), %al
andb $0x1, %al
movb %al, -0x75(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x5c1d0
jmp 0xc269c
movq -0x390(%rbp), %rsi
movb -0x75(%rbp), %dl
leaq 0x8581f(%rip), %rcx     # 0x147ecc
leaq 0x7c1ea(%rip), %rax     # 0x13e89e
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, -0x80(%rbp)
movb -0x61(%rbp), %dl
leaq 0x85817(%rip), %rcx     # 0x147ee0
leaq 0x8580e(%rip), %rax     # 0x147ede
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
movq (%rsi), %rax
movq 0x38(%rax), %rax
leaq -0xa8(%rbp), %rdi
movl $0x1, %ecx
callq *%rax
jmp 0xc26fc
movq -0x390(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
callq 0x61340
jmp 0xc2715
movq -0x390(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0xe8(%rbp), %rdi
callq 0xc3370
jmp 0xc272e
movq -0x390(%rbp), %rdi
leaq 0x8696a(%rip), %rcx     # 0x1490a6
movq %rsp, %rax
movq %rcx, (%rax)
leaq -0x80(%rbp), %rsi
leaq -0x88(%rbp), %rdx
leaq -0xa8(%rbp), %rcx
leaq -0xc8(%rbp), %r8
leaq -0xe8(%rbp), %r9
callq 0xdaf80
jmp 0xc2769
leaq -0xe8(%rbp), %rdi
callq 0x7708
leaq -0xc8(%rbp), %rdi
callq 0x7708
leaq -0xa8(%rbp), %rdi
callq 0x7708
leaq -0x60(%rbp), %rdi
callq 0xf250
jmp 0xc3358
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc27f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc27e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc27dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x7708
leaq -0xc8(%rbp), %rdi
callq 0x7708
leaq -0xa8(%rbp), %rdi
callq 0x7708
leaq -0x60(%rbp), %rdi
callq 0xf250
jmp 0xc3361
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x8690
testb $0x1, %al
jne 0xc2819
jmp 0xc2fd1
movq -0x390(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x5, %edx
xorl %ecx, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x5e040
testb $0x1, %al
jne 0xc283c
jmp 0xc285b
movq -0x390(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
movl $0xa, %edx
xorl %ecx, %ecx
callq 0x232d0
jmp 0xc292b
movb $0x1, -0x10a(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x3b8(%rbp)
leaq -0x109(%rbp), %rdi
movq %rdi, -0x3b0(%rbp)
callq 0x7650
movq -0x3b0(%rbp), %rdx
leaq 0x85725(%rip), %rsi     # 0x147fb9
leaq -0x108(%rbp), %rdi
callq 0x7520
jmp 0xc28a2
movq -0x3b8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x9c50
jmp 0xc28b7
movq -0x3b8(%rbp), %rdi
movb $0x0, -0x10a(%rbp)
leaq 0xeb50c(%rip), %rsi     # 0x1addd8
leaq -0xb8c43(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0xc336a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc2903
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x7708
leaq -0x109(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x10a(%rbp)
jne 0xc291a
jmp 0xc2926
movq -0x3b8(%rbp), %rdi
callq 0x72c0
jmp 0xc3361
movq -0x390(%rbp), %rdi
addq $0x6b0, %rdi            # imm = 0x6B0
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x2e890
movq -0x390(%rbp), %rsi
movq %rax, -0x120(%rbp)
movb %dl, -0x118(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %edx
movq (%rsi), %rax
leaq -0x140(%rbp), %rdi
xorl %ecx, %ecx
callq *0x38(%rax)
movq -0x390(%rbp), %rdi
addq $0x8, %rdi
addq $0x30, %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0xead0
movq %rax, %rdi
callq 0x75f0
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x3b9(%rbp)
jne 0xc2a18
movq -0x390(%rbp), %rdi
addq $0x488, %rdi            # imm = 0x488
leaq -0x140(%rbp), %rsi
callq 0x2f720
movq %rax, -0x3c8(%rbp)
jmp 0xc29c7
movq -0x390(%rbp), %rdi
movq -0x3c8(%rbp), %rax
movq %rax, -0x148(%rbp)
addq $0x488, %rdi            # imm = 0x488
callq 0x2f750
movq %rax, -0x3d0(%rbp)
jmp 0xc29f1
movq -0x3d0(%rbp), %rax
movq %rax, -0x150(%rbp)
leaq -0x148(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x2f970
movb %al, -0x3b9(%rbp)
movb -0x3b9(%rbp), %al
testb $0x1, %al
jne 0xc2a24
jmp 0xc2a95
movq -0x390(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
movq (%rsi), %rax
movq 0x20(%rax), %rax
leaq -0x170(%rbp), %rdi
callq *%rax
jmp 0xc2a44
leaq -0x140(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x7050
jmp 0xc2a59
leaq -0x170(%rbp), %rdi
callq 0x7708
jmp 0xc2a95
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc2fc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x7708
jmp 0xc2fc0
movq -0x390(%rbp), %rdi
movq %rdi, %rsi
addq $0x488, %rsi            # imm = 0x488
leaq -0x140(%rbp), %rdx
callq 0x61180
jmp 0xc2ab4
leaq -0x140(%rbp), %rdi
callq 0x75f0
testb $0x1, %al
jne 0xc2ac6
jmp 0xc2b2c
movq -0x390(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
callq 0xea90
movq %rax, -0x3d8(%rbp)
jmp 0xc2ae2
movq -0x3d8(%rbp), %rdx
addq $0x8, %rdx
movq -0x10(%rbp), %r8
addq $0x8, %r8
leaq 0x85a22(%rip), %rcx     # 0x14851e
leaq -0x190(%rbp), %rdi
movq %rcx, %rsi
callq 0x9fb20
jmp 0xc2b0d
leaq -0x140(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x7430
leaq -0x190(%rbp), %rdi
callq 0x7708
movq -0x390(%rbp), %rdi
addq $0x488, %rdi            # imm = 0x488
leaq -0x140(%rbp), %rsi
callq 0x2f780
movb %dl, -0x3e1(%rbp)
movq %rax, -0x3e0(%rbp)
jmp 0xc2b55
movq -0x390(%rbp), %rdi
movb -0x3e1(%rbp), %al
movq -0x3e0(%rbp), %rcx
movq %rcx, -0x1a0(%rbp)
movb %al, -0x198(%rbp)
addq $0x3d8, %rdi            # imm = 0x3D8
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x9fbe0
movq %rax, -0x3f0(%rbp)
jmp 0xc2b93
movq -0x3f0(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x7050
jmp 0xc2ba8
movq -0x18(%rbp), %rdi
addq $0xa0, %rdi
callq 0x9e1e0
movq -0x390(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x5c1d0
jmp 0xc2bcd
movq -0x390(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0x1c0(%rbp), %rdi
callq 0xc3370
jmp 0xc2be6
movq -0x390(%rbp), %rdi
leaq 0x852ff(%rip), %rsi     # 0x147ef3
leaq -0x140(%rbp), %rdx
leaq -0x1c0(%rbp), %rcx
callq 0xdb0f0
jmp 0xc2c09
leaq -0x1c0(%rbp), %rdi
callq 0x7708
movq -0x390(%rbp), %rdi
callq 0x5c200
jmp 0xc2c23
movl $0x0, -0x1c4(%rbp)
movq -0x18(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x1d0(%rbp)
movq -0x1d0(%rbp), %rdi
callq 0x86d0
movq %rax, -0x1d8(%rbp)
movq -0x1d0(%rbp), %rdi
callq 0x8700
movq %rax, -0x1e0(%rbp)
leaq -0x1d8(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x8730
testb $0x1, %al
jne 0xc2c7e
jmp 0xc2f8c
leaq -0x1d8(%rbp), %rdi
callq 0x8770
movq -0x390(%rbp), %rdi
movq %rax, -0x1e8(%rbp)
movq -0x18(%rbp), %rsi
movl -0x1c4(%rbp), %edx
callq 0x5c240
jmp 0xc2ca9
movq -0x390(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
movl -0x1c4(%rbp), %edx
callq 0x22fd0
movq %rax, -0x3f8(%rbp)
jmp 0xc2ccb
movq -0x3f8(%rbp), %rsi
leaq -0x208(%rbp), %rdi
callq 0x7170
jmp 0xc2ce0
movq -0x390(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c4(%rbp), %ecx
leaq -0x228(%rbp), %rdi
callq 0x62230
jmp 0xc2cff
movq -0x390(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x400(%rbp)
movl -0x1c4(%rbp), %eax
movl %eax, -0x3fc(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
movq (%rsi), %rax
movq 0x38(%rax), %rax
leaq -0x288(%rbp), %rdi
movl $0x1, %ecx
callq *%rax
jmp 0xc2d3d
leaq 0x857da(%rip), %rdx     # 0x14851e
leaq -0x268(%rbp), %rdi
leaq -0x288(%rbp), %rsi
leaq -0x228(%rbp), %rcx
callq 0x9ff30
jmp 0xc2d60
leaq -0x248(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x577c0
jmp 0xc2d75
movl -0x3fc(%rbp), %edx
movl -0x400(%rbp), %esi
movq -0x390(%rbp), %rdi
leaq -0x248(%rbp), %rcx
callq 0x22f90
jmp 0xc2d96
leaq -0x248(%rbp), %rdi
callq 0x7708
leaq -0x268(%rbp), %rdi
callq 0x7708
leaq -0x288(%rbp), %rdi
callq 0x7708
movq -0x18(%rbp), %rax
movq %rax, -0x418(%rbp)
movq -0x1e8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x410(%rbp)
movl -0x1c4(%rbp), %eax
movl %eax, -0x40c(%rbp)
leaq -0x2a9(%rbp), %rdi
movq %rdi, -0x408(%rbp)
callq 0x7650
movq -0x408(%rbp), %rdx
leaq 0x7ba9d(%rip), %rsi     # 0x13e89e
leaq -0x2a8(%rbp), %rdi
callq 0x7520
jmp 0xc2e0f
movl -0x40c(%rbp), %ecx
movl -0x410(%rbp), %edx
movq -0x418(%rbp), %rsi
movq -0x390(%rbp), %rdi
movq (%rdi), %rax
movq 0xa8(%rax), %rax
leaq -0x2a8(%rbp), %r8
xorl %r9d, %r9d
callq *%rax
jmp 0xc2e41
leaq -0x2a8(%rbp), %rdi
callq 0x7708
leaq -0x2a9(%rbp), %rdi
callq 0x73d0
movq -0x390(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
movl -0x1c4(%rbp), %edx
leaq -0x208(%rbp), %rcx
callq 0x22f90
jmp 0xc2e7b
movl -0x1c4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c4(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x7708
leaq -0x208(%rbp), %rdi
callq 0x7708
leaq -0x1d8(%rbp), %rdi
callq 0x8790
jmp 0xc2c62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x7708
jmp 0xc2fc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc2f7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc2f72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc2f32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc2f26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x7708
leaq -0x268(%rbp), %rdi
callq 0x7708
leaq -0x288(%rbp), %rdi
callq 0x7708
jmp 0xc2f72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc2f66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x7708
leaq -0x2a9(%rbp), %rdi
callq 0x73d0
leaq -0x228(%rbp), %rdi
callq 0x7708
leaq -0x208(%rbp), %rdi
callq 0x7708
jmp 0xc2fc0
movq -0x390(%rbp), %rdi
callq 0x5c350
jmp 0xc2f9a
movq -0x390(%rbp), %rdi
leaq 0x7b8f6(%rip), %rsi     # 0x13e89e
callq 0xedf0
jmp 0xc2faf
leaq -0x140(%rbp), %rdi
callq 0x7708
jmp 0xc3356
leaq -0x140(%rbp), %rdi
callq 0x7708
jmp 0xc3361
movq -0x390(%rbp), %rax
cmpl $0x33, 0x788(%rax)
jae 0xc30b5
movb $0x1, -0x2d2(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x428(%rbp)
leaq -0x2d1(%rbp), %rdi
movq %rdi, -0x420(%rbp)
callq 0x7650
movq -0x420(%rbp), %rdx
leaq 0x84ede(%rip), %rsi     # 0x147efc
leaq -0x2d0(%rbp), %rdi
callq 0x7520
jmp 0xc302c
movq -0x428(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
callq 0x9c50
jmp 0xc3041
movq -0x428(%rbp), %rdi
movb $0x0, -0x2d2(%rbp)
leaq 0xead82(%rip), %rsi     # 0x1addd8
leaq -0xb93cd(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0xc336a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc308d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x7708
leaq -0x2d1(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x2d2(%rbp)
jne 0xc30a4
jmp 0xc30b0
movq -0x428(%rbp), %rdi
callq 0x72c0
jmp 0xc3361
movq -0x390(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x4, %edx
xorl %ecx, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x5e040
testb $0x1, %al
jne 0xc31aa
movb $0x1, -0x2fa(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x438(%rbp)
leaq -0x2f9(%rbp), %rdi
movq %rdi, -0x430(%rbp)
callq 0x7650
movq -0x430(%rbp), %rdx
leaq 0x84e3d(%rip), %rsi     # 0x147f50
leaq -0x2f8(%rbp), %rdi
callq 0x7520
jmp 0xc3121
movq -0x438(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
callq 0x9c50
jmp 0xc3136
movq -0x438(%rbp), %rdi
movb $0x0, -0x2fa(%rbp)
leaq 0xeac8d(%rip), %rsi     # 0x1addd8
leaq -0xb94c2(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0xc336a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc3182
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x7708
leaq -0x2f9(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x2fa(%rbp)
jne 0xc3199
jmp 0xc31a5
movq -0x438(%rbp), %rdi
callq 0x72c0
jmp 0xc3361
movq -0x390(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x5c1d0
movq -0x390(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x5c1d0
movq -0x390(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
callq 0xea90
movq -0x390(%rbp), %rdi
movq %rax, %rsi
callq 0x5bf00
movq -0x390(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %edx
movq (%rsi), %rax
movq 0x38(%rax), %rax
leaq -0x320(%rbp), %rdi
movl $0x1, %ecx
movl %ecx, -0x43c(%rbp)
callq *%rax
movq -0x390(%rbp), %rsi
movl -0x43c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
movq (%rsi), %rax
movq 0x38(%rax), %rax
leaq -0x340(%rbp), %rdi
callq *%rax
jmp 0xc3241
movq -0x390(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x360(%rbp), %rdi
callq 0x61340
jmp 0xc325a
movq -0x390(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0x380(%rbp), %rdi
callq 0xc3370
jmp 0xc3273
movq -0x390(%rbp), %rdi
leaq 0x85e25(%rip), %rcx     # 0x1490a6
movq %rsp, %rax
movq %rcx, 0x8(%rax)
leaq -0x380(%rbp), %rcx
movq %rcx, (%rax)
leaq 0x84d02(%rip), %rsi     # 0x147f9b
leaq 0x7af34(%rip), %rcx     # 0x13e1d4
leaq -0x320(%rbp), %rdx
leaq -0x340(%rbp), %r8
leaq -0x360(%rbp), %r9
callq 0xdb220
jmp 0xc32bc
leaq -0x380(%rbp), %rdi
callq 0x7708
leaq -0x360(%rbp), %rdi
callq 0x7708
leaq -0x340(%rbp), %rdi
callq 0x7708
leaq -0x320(%rbp), %rdi
callq 0x7708
jmp 0xc3356
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc3348
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc333c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc3330
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x380(%rbp), %rdi
callq 0x7708
leaq -0x360(%rbp), %rdi
callq 0x7708
leaq -0x340(%rbp), %rdi
callq 0x7708
leaq -0x320(%rbp), %rdi
callq 0x7708
jmp 0xc3361
jmp 0xc3358
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x7640
nopw (%rax,%rax)