// File: rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::write_access_chain(spirv_cross::SPIRAccessChain const&, unsigned int)
void CompilerHLSL::write_access_chain(const SPIRAccessChain &chain, uint32_t value)
{
	auto &type = get<SPIRType>(chain.basetype);

	SPIRType target_type;
	target_type.basetype = SPIRType::UInt;
	target_type.vecsize = type.vecsize;
	target_type.columns = type.columns;

	if (type.basetype == SPIRType::Struct)
		SPIRV_CROSS_THROW("Writing structs to RWByteAddressBuffer not yet supported.");
	if (type.width != 32)
		SPIRV_CROSS_THROW("Writing types other than 32-bit to RWByteAddressBuffer not yet supported.");
	if (!type.array.empty())
		SPIRV_CROSS_THROW("Reading arrays from ByteAddressBuffer not yet supported.");

	if (type.columns == 1 && !chain.row_major_matrix)
	{
		const char *store_op = nullptr;
		switch (type.vecsize)
		{
		case 1:
			store_op = "Store";
			break;
		case 2:
			store_op = "Store2";
			break;
		case 3:
			store_op = "Store3";
			break;
		case 4:
			store_op = "Store4";
			break;
		default:
			SPIRV_CROSS_THROW("Unknown vector size.");
		}

		auto store_expr = to_expression(value);
		auto bitcast_op = bitcast_glsl_op(target_type, type);
		if (!bitcast_op.empty())
			store_expr = join(bitcast_op, "(", store_expr, ")");
		statement(chain.base, ".", store_op, "(", chain.dynamic_index, chain.static_index, ", ", store_expr, ");");
	}
	else if (type.columns == 1)
	{
		// Strided store.
		for (uint32_t r = 0; r < type.vecsize; r++)
		{
			auto store_expr = to_enclosed_expression(value);
			if (type.vecsize > 1)
			{
				store_expr += ".";
				store_expr += index_to_swizzle(r);
			}
			remove_duplicate_swizzle(store_expr);

			auto bitcast_op = bitcast_glsl_op(target_type, type);
			if (!bitcast_op.empty())
				store_expr = join(bitcast_op, "(", store_expr, ")");
			statement(chain.base, ".Store(", chain.dynamic_index, chain.static_index + chain.matrix_stride * r, ", ",
			          store_expr, ");");
		}
	}
	else if (!chain.row_major_matrix)
	{
		const char *store_op = nullptr;
		switch (type.vecsize)
		{
		case 1:
			store_op = "Store";
			break;
		case 2:
			store_op = "Store2";
			break;
		case 3:
			store_op = "Store3";
			break;
		case 4:
			store_op = "Store4";
			break;
		default:
			SPIRV_CROSS_THROW("Unknown vector size.");
		}

		for (uint32_t c = 0; c < type.columns; c++)
		{
			auto store_expr = join(to_enclosed_expression(value), "[", c, "]");
			auto bitcast_op = bitcast_glsl_op(target_type, type);
			if (!bitcast_op.empty())
				store_expr = join(bitcast_op, "(", store_expr, ")");
			statement(chain.base, ".", store_op, "(", chain.dynamic_index, chain.static_index + c * chain.matrix_stride,
			          ", ", store_expr, ");");
		}
	}
	else
	{
		for (uint32_t r = 0; r < type.vecsize; r++)
		{
			for (uint32_t c = 0; c < type.columns; c++)
			{
				auto store_expr = join(to_enclosed_expression(value), "[", c, "].", index_to_swizzle(r));
				remove_duplicate_swizzle(store_expr);
				auto bitcast_op = bitcast_glsl_op(target_type, type);
				if (!bitcast_op.empty())
					store_expr = join(bitcast_op, "(", store_expr, ")");
				statement(chain.base, ".Store(", chain.dynamic_index,
				          chain.static_index + c * (type.width / 8) + r * chain.matrix_stride, ", ", store_expr, ");");
			}
		}
	}

	register_write(chain.self);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x470, %rsp            # imm = 0x470
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x3d8(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
callq 0xea90
movq %rax, -0x20(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x31440
movl $0x5, -0xec(%rbp)
movq -0x20(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0xe4(%rbp)
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0xe0(%rbp)
movq -0x20(%rbp), %rax
cmpl $0xc, 0xc(%rax)
jne 0xcadab
movb $0x1, -0x12d(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x3e8(%rbp)
leaq -0x119(%rbp), %rdi
movq %rdi, -0x3e0(%rbp)
callq 0x7650
movq -0x3e0(%rbp), %rdx
leaq 0x7dc29(%rip), %rsi     # 0x148931
leaq -0x118(%rbp), %rdi
callq 0x7520
jmp 0xcad16
movq -0x3e8(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x9c50
jmp 0xcad2b
movq -0x3e8(%rbp), %rdi
movb $0x0, -0x12d(%rbp)
leaq 0xe3098(%rip), %rsi     # 0x1addd8
leaq -0xc10b7(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0xcbac7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0xcad83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x7708
leaq -0x119(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x12d(%rbp)
jne 0xcad9a
jmp 0xcada6
movq -0x3e8(%rbp), %rdi
callq 0x72c0
jmp 0xcbaaf
movq -0x20(%rbp), %rax
cmpl $0x20, 0x10(%rax)
je 0xcae95
movb $0x1, -0x152(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x3f8(%rbp)
leaq -0x151(%rbp), %rdi
movq %rdi, -0x3f0(%rbp)
callq 0x7650
movq -0x3f0(%rbp), %rdx
leaq 0x7db79(%rip), %rsi     # 0x14896b
leaq -0x150(%rbp), %rdi
callq 0x7520
jmp 0xcae00
movq -0x3f8(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x9c50
jmp 0xcae15
movq -0x3f8(%rbp), %rdi
movb $0x0, -0x152(%rbp)
leaq 0xe2fae(%rip), %rsi     # 0x1addd8
leaq -0xc11a1(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0xcbac7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0xcae6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x7708
leaq -0x151(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x152(%rbp)
jne 0xcae84
jmp 0xcae90
movq -0x3f8(%rbp), %rdi
callq 0x72c0
jmp 0xcbaaf
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
callq 0x8690
testb $0x1, %al
jne 0xcaf86
movb $0x1, -0x17a(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x408(%rbp)
leaq -0x179(%rbp), %rdi
movq %rdi, -0x400(%rbp)
callq 0x7650
movq -0x400(%rbp), %rdx
leaq 0x7d9e7(%rip), %rsi     # 0x1488ca
leaq -0x178(%rbp), %rdi
callq 0x7520
jmp 0xcaef1
movq -0x408(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x9c50
jmp 0xcaf06
movq -0x408(%rbp), %rdi
movb $0x0, -0x17a(%rbp)
leaq 0xe2ebd(%rip), %rsi     # 0x1addd8
leaq -0xc1292(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0xcbac7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0xcaf5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x7708
leaq -0x179(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x17a(%rbp)
jne 0xcaf75
jmp 0xcaf81
movq -0x408(%rbp), %rdi
callq 0x72c0
jmp 0xcbaaf
movq -0x20(%rbp), %rax
cmpl $0x1, 0x18(%rax)
jne 0xcb27d
movq -0x10(%rbp), %rax
testb $0x1, 0x64(%rax)
jne 0xcb27d
movq $0x0, -0x188(%rbp)
movq -0x20(%rbp), %rax
movl 0x14(%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x410(%rbp)
subl $0x3, %eax
ja 0xcb027
movq -0x410(%rbp), %rax
leaq 0x7a87a(%rip), %rcx     # 0x14584c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x7695b(%rip), %rax     # 0x14193d
movq %rax, -0x188(%rbp)
jmp 0xcb103
leaq 0x7d9c0(%rip), %rax     # 0x1489b5
movq %rax, -0x188(%rbp)
jmp 0xcb103
leaq 0x7d9b4(%rip), %rax     # 0x1489bc
movq %rax, -0x188(%rbp)
jmp 0xcb103
leaq 0x7d9a8(%rip), %rax     # 0x1489c3
movq %rax, -0x188(%rbp)
jmp 0xcb103
movb $0x1, -0x1aa(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x420(%rbp)
leaq -0x1a9(%rbp), %rdi
movq %rdi, -0x418(%rbp)
callq 0x7650
movq -0x418(%rbp), %rdx
leaq 0x7d8b5(%rip), %rsi     # 0x148915
leaq -0x1a8(%rbp), %rdi
callq 0x7520
jmp 0xcb06e
movq -0x420(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x9c50
jmp 0xcb083
movq -0x420(%rbp), %rdi
movb $0x0, -0x1aa(%rbp)
leaq 0xe2d40(%rip), %rsi     # 0x1addd8
leaq -0xc140f(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0xcbac7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0xcb0db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x7708
leaq -0x1a9(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x1aa(%rbp)
jne 0xcb0f2
jmp 0xcb0fe
movq -0x420(%rbp), %rdi
callq 0x72c0
jmp 0xcbaaf
movq -0x3d8(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x1d0(%rbp), %rdi
callq 0x71b50
jmp 0xcb11b
movq -0x3d8(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq (%rsi), %rax
movq 0x168(%rax), %rax
leaq -0x1f0(%rbp), %rdi
leaq -0xf8(%rbp), %rdx
callq *%rax
jmp 0xcb142
leaq -0x1f0(%rbp), %rdi
callq 0x75f0
testb $0x1, %al
jne 0xcb1ef
leaq 0x821d0(%rip), %rdx     # 0x14d32d
leaq 0x79d95(%rip), %r8      # 0x144ef9
leaq -0x210(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
leaq -0x1d0(%rbp), %rcx
callq 0xdd3c0
jmp 0xcb180
leaq -0x1d0(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x7430
leaq -0x210(%rbp), %rdi
callq 0x7708
jmp 0xcb1ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0xcbaaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0xcb26c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x7708
jmp 0xcb26c
movq -0x3d8(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq %rcx, %rsi
addq $0x18, %rsi
movq %rcx, %r9
addq $0x38, %r9
addq $0x58, %rcx
leaq 0x7de92(%rip), %rdx     # 0x1490a5
movq %rsp, %rax
movq %rdx, 0x18(%rax)
leaq -0x1d0(%rbp), %rdx
movq %rdx, 0x10(%rax)
leaq 0x79363(%rip), %rdx     # 0x14458f
movq %rdx, 0x8(%rax)
movq %rcx, (%rax)
leaq 0x79af3(%rip), %rdx     # 0x144d2d
leaq 0x820ec(%rip), %r8      # 0x14d32d
leaq -0x188(%rbp), %rcx
callq 0xdd480
jmp 0xcb24f
leaq -0x1f0(%rbp), %rdi
callq 0x7708
leaq -0x1d0(%rbp), %rdi
callq 0x7708
jmp 0xcba85
leaq -0x1d0(%rbp), %rdi
callq 0x7708
jmp 0xcbaaf
movq -0x20(%rbp), %rax
cmpl $0x1, 0x18(%rax)
jne 0xcb48a
movl $0x0, -0x214(%rbp)
movl -0x214(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jae 0xcb485
movq -0x3d8(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x238(%rbp), %rdi
callq 0x72630
jmp 0xcb2c0
movq -0x20(%rbp), %rax
cmpl $0x1, 0x14(%rax)
jbe 0xcb328
leaq 0x79a5c(%rip), %rsi     # 0x144d2d
leaq -0x238(%rbp), %rdi
callq 0x7340
jmp 0xcb2df
movq -0x3d8(%rbp), %rdi
movl -0x214(%rbp), %esi
callq 0x70100
movq %rax, -0x428(%rbp)
jmp 0xcb2fa
movq -0x428(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0x7340
jmp 0xcb30f
jmp 0xcb328
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0xcb474
movq -0x3d8(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x70230
jmp 0xcb33d
movq -0x3d8(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq (%rsi), %rax
movq 0x168(%rax), %rax
leaq -0x258(%rbp), %rdi
leaq -0xf8(%rbp), %rdx
callq *%rax
jmp 0xcb364
leaq -0x258(%rbp), %rdi
callq 0x75f0
testb $0x1, %al
jne 0xcb3e2
leaq 0x81fb2(%rip), %rdx     # 0x14d32d
leaq 0x79b77(%rip), %r8      # 0x144ef9
leaq -0x278(%rbp), %rdi
leaq -0x258(%rbp), %rsi
leaq -0x238(%rbp), %rcx
callq 0xdd3c0
jmp 0xcb39e
leaq -0x238(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0x7430
leaq -0x278(%rbp), %rdi
callq 0x7708
jmp 0xcb3e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x258(%rbp), %rdi
callq 0x7708
jmp 0xcb474
movq -0x3d8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq %rdx, %rsi
addq $0x18, %rsi
movq %rdx, %rcx
addq $0x38, %rcx
movl 0x58(%rdx), %eax
movl 0x60(%rdx), %edx
movl -0x214(%rbp), %r8d
imull %r8d, %edx
addl %edx, %eax
movl %eax, -0x27c(%rbp)
leaq 0x7dc8a(%rip), %rdx     # 0x1490a5
movq %rsp, %rax
movq %rdx, 0x8(%rax)
leaq -0x238(%rbp), %rdx
movq %rdx, (%rax)
leaq 0x7d597(%rip), %rdx     # 0x1489ca
leaq 0x79155(%rip), %r9      # 0x14458f
leaq -0x27c(%rbp), %r8
callq 0xdd630
jmp 0xcb448
leaq -0x258(%rbp), %rdi
callq 0x7708
leaq -0x238(%rbp), %rdi
callq 0x7708
movl -0x214(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x214(%rbp)
jmp 0xcb295
leaq -0x238(%rbp), %rdi
callq 0x7708
jmp 0xcbaaf
jmp 0xcba83
movq -0x10(%rbp), %rax
testb $0x1, 0x64(%rax)
jne 0xcb803
movq $0x0, -0x288(%rbp)
movq -0x20(%rbp), %rax
movl 0x14(%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x430(%rbp)
subl $0x3, %eax
ja 0xcb51d
movq -0x430(%rbp), %rax
leaq 0x7a394(%rip), %rcx     # 0x14585c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x76465(%rip), %rax     # 0x14193d
movq %rax, -0x288(%rbp)
jmp 0xcb5f9
leaq 0x7d4ca(%rip), %rax     # 0x1489b5
movq %rax, -0x288(%rbp)
jmp 0xcb5f9
leaq 0x7d4be(%rip), %rax     # 0x1489bc
movq %rax, -0x288(%rbp)
jmp 0xcb5f9
leaq 0x7d4b2(%rip), %rax     # 0x1489c3
movq %rax, -0x288(%rbp)
jmp 0xcb5f9
movb $0x1, -0x2aa(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x440(%rbp)
leaq -0x2a9(%rbp), %rdi
movq %rdi, -0x438(%rbp)
callq 0x7650
movq -0x438(%rbp), %rdx
leaq 0x7d3bf(%rip), %rsi     # 0x148915
leaq -0x2a8(%rbp), %rdi
callq 0x7520
jmp 0xcb564
movq -0x440(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
callq 0x9c50
jmp 0xcb579
movq -0x440(%rbp), %rdi
movb $0x0, -0x2aa(%rbp)
leaq 0xe284a(%rip), %rsi     # 0x1addd8
leaq -0xc1905(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0xcbac7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0xcb5d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x7708
leaq -0x2a9(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x2aa(%rbp)
jne 0xcb5e8
jmp 0xcb5f4
movq -0x440(%rbp), %rdi
callq 0x72c0
jmp 0xcbaaf
movl $0x0, -0x2b0(%rbp)
movl -0x2b0(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0xcb7fe
movq -0x3d8(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x2f0(%rbp), %rdi
callq 0x72630
jmp 0xcb62e
leaq 0x81d73(%rip), %rdx     # 0x14d3a8
leaq 0x7ca69(%rip), %r8      # 0x1480a5
leaq -0x2d0(%rbp), %rdi
leaq -0x2f0(%rbp), %rsi
leaq -0x2b0(%rbp), %rcx
callq 0xa0c40
jmp 0xcb658
leaq -0x2f0(%rbp), %rdi
callq 0x7708
movq -0x3d8(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq (%rsi), %rax
movq 0x168(%rax), %rax
leaq -0x310(%rbp), %rdi
leaq -0xf8(%rbp), %rdx
callq *%rax
jmp 0xcb68b
leaq -0x310(%rbp), %rdi
callq 0x75f0
testb $0x1, %al
jne 0xcb747
leaq 0x81c87(%rip), %rdx     # 0x14d32d
leaq 0x7984c(%rip), %r8      # 0x144ef9
leaq -0x330(%rbp), %rdi
leaq -0x310(%rbp), %rsi
leaq -0x2d0(%rbp), %rcx
callq 0xdd3c0
jmp 0xcb6c9
leaq -0x2d0(%rbp), %rdi
leaq -0x330(%rbp), %rsi
callq 0x7430
leaq -0x330(%rbp), %rdi
callq 0x7708
jmp 0xcb747
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x2f0(%rbp), %rdi
callq 0x7708
jmp 0xcbaaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0xcb7ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x310(%rbp), %rdi
callq 0x7708
jmp 0xcb7ed
movq -0x3d8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq %rdx, %rsi
addq $0x18, %rsi
movq %rdx, %r9
addq $0x38, %r9
movl -0x2b0(%rbp), %ecx
movl 0x58(%rdx), %eax
movl 0x60(%rdx), %edx
imull %edx, %ecx
addl %ecx, %eax
movl %eax, -0x334(%rbp)
leaq 0x7d927(%rip), %rcx     # 0x1490a5
movq %rsp, %rax
movq %rcx, 0x18(%rax)
leaq -0x2d0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x78df8(%rip), %rcx     # 0x14458f
movq %rcx, 0x8(%rax)
leaq -0x334(%rbp), %rcx
movq %rcx, (%rax)
leaq 0x79581(%rip), %rdx     # 0x144d2d
leaq 0x81b7a(%rip), %r8      # 0x14d32d
leaq -0x288(%rbp), %rcx
callq 0xdd7b0
jmp 0xcb7c1
leaq -0x310(%rbp), %rdi
callq 0x7708
leaq -0x2d0(%rbp), %rdi
callq 0x7708
movl -0x2b0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2b0(%rbp)
jmp 0xcb603
leaq -0x2d0(%rbp), %rdi
callq 0x7708
jmp 0xcbaaf
jmp 0xcba81
movl $0x0, -0x338(%rbp)
movl -0x338(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jae 0xcba7f
movl $0x0, -0x33c(%rbp)
movl -0x33c(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0xcba69
movq -0x3d8(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x380(%rbp), %rdi
callq 0x72630
jmp 0xcb855
movq -0x3d8(%rbp), %rdi
movl -0x338(%rbp), %esi
callq 0x70100
movq %rax, -0x448(%rbp)
jmp 0xcb870
movq -0x448(%rbp), %rax
movq %rax, -0x388(%rbp)
leaq 0x81b23(%rip), %rdx     # 0x14d3a8
leaq 0x78191(%rip), %r8      # 0x143a1d
leaq -0x360(%rbp), %rdi
leaq -0x380(%rbp), %rsi
leaq -0x33c(%rbp), %rcx
leaq -0x388(%rbp), %r9
callq 0xdd960
jmp 0xcb8af
leaq -0x380(%rbp), %rdi
callq 0x7708
movq -0x3d8(%rbp), %rdi
leaq -0x360(%rbp), %rsi
callq 0x70230
jmp 0xcb8d0
movq -0x3d8(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq (%rsi), %rax
movq 0x168(%rax), %rax
leaq -0x3a8(%rbp), %rdi
leaq -0xf8(%rbp), %rdx
callq *%rax
jmp 0xcb8f7
leaq -0x3a8(%rbp), %rdi
callq 0x75f0
testb $0x1, %al
jne 0xcb9b3
leaq 0x81a1b(%rip), %rdx     # 0x14d32d
leaq 0x795e0(%rip), %r8      # 0x144ef9
leaq -0x3c8(%rbp), %rdi
leaq -0x3a8(%rbp), %rsi
leaq -0x360(%rbp), %rcx
callq 0xdd3c0
jmp 0xcb935
leaq -0x360(%rbp), %rdi
leaq -0x3c8(%rbp), %rsi
callq 0x7430
leaq -0x3c8(%rbp), %rdi
callq 0x7708
jmp 0xcb9b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x380(%rbp), %rdi
callq 0x7708
jmp 0xcbaaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0xcba5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x3a8(%rbp), %rdi
callq 0x7708
jmp 0xcba5b
movq -0x3d8(%rbp), %rdi
movq -0x10(%rbp), %r8
movq %r8, %rsi
addq $0x18, %rsi
movq %r8, %rcx
addq $0x38, %rcx
movl -0x33c(%rbp), %edx
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
shrl $0x3, %eax
imull %eax, %edx
movl 0x58(%r8), %eax
movl 0x60(%r8), %r8d
addl %edx, %eax
movl -0x338(%rbp), %edx
imull %r8d, %edx
addl %edx, %eax
movl %eax, -0x3cc(%rbp)
leaq 0x7d6a3(%rip), %rdx     # 0x1490a5
movq %rsp, %rax
movq %rdx, 0x8(%rax)
leaq -0x360(%rbp), %rdx
movq %rdx, (%rax)
leaq 0x7cfb0(%rip), %rdx     # 0x1489ca
leaq 0x78b6e(%rip), %r9      # 0x14458f
leaq -0x3cc(%rbp), %r8
callq 0xdd630
jmp 0xcba2f
leaq -0x3a8(%rbp), %rdi
callq 0x7708
leaq -0x360(%rbp), %rdi
callq 0x7708
movl -0x33c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x33c(%rbp)
jmp 0xcb82a
leaq -0x360(%rbp), %rdi
callq 0x7708
jmp 0xcbaaf
jmp 0xcba6b
movl -0x338(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x338(%rbp)
jmp 0xcb80d
jmp 0xcba81
jmp 0xcba83
jmp 0xcba85
movq -0x3d8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x1fd60
jmp 0xcba9a
leaq -0xf8(%rbp), %rdi
callq 0x314e0
addq $0x470, %rsp            # imm = 0x470
popq %rbp
retq
leaq -0xf8(%rbp), %rdi
callq 0x314e0
movq -0x128(%rbp), %rdi
callq 0x7640
nopw (%rax,%rax)