// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::store_flattened_struct(spirv_cross::SPIRVariable&, unsigned int)
void CompilerGLSL::store_flattened_struct(SPIRVariable &var, uint32_t value)
{
	// We're trying to store a structure which has been flattened.
	// Need to copy members one by one.
	auto rhs = to_expression(value);

	// Store result locally.
	// Since we're declaring a variable potentially multiple times here,
	// store the variable in an isolated scope.
	begin_scope();
	statement(variable_decl_function_local(var), " = ", rhs, ";");

	auto &type = get<SPIRType>(var.basetype);
	for (uint32_t i = 0; i < uint32_t(type.member_types.size()); i++)
	{
		// Flatten the varyings.
		// Apply name transformation for flattened I/O blocks.

		auto lhs = sanitize_underscores(join(to_name(var.self), "_", to_member_name(type, i)));
		rhs = join(to_name(var.self), ".", to_member_name(type, i));
		statement(lhs, " = ", rhs, ";");
	}
	end_scope();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x88(%rsp), %rdi
movq %rbx, %rsi
callq 0x33f8a
leaq 0x78213(%rip), %rsi     # 0xbabd7
movq %rbx, %rdi
callq 0x59e02
incl 0x638(%rbx)
movl 0x10(%r14), %ebp
movl $0x7, 0x10(%r14)
movq %rsp, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2c7ac
movl %ebp, 0x10(%r14)
leaq 0x7c063(%rip), %rdx     # 0xbea5a
leaq 0x7c0f3(%rip), %r8      # 0xbeaf1
movq %rsp, %rsi
leaq 0x88(%rsp), %rcx
movq %rbx, %rdi
callq 0x5585e
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x42a2c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r14, 0x60(%rsp)
movl 0xc(%r14), %esi
movq %rbx, %rdi
callq 0xa3ea
movq %rax, %r15
movq 0x70(%rax), %rax
subq 0x68(%r15), %rax
shrq $0x2, %rax
testl %eax, %eax
je 0x42bf6
xorl %ebp, %ebp
leaq 0x40(%rsp), %r12
leaq 0x20(%rsp), %r13
leaq 0x68(%rsp), %r14
movq 0x60(%rsp), %rax
movl 0x8(%rax), %edx
movq (%rbx), %rax
movq %r12, %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x2c088
movq %r14, %rdi
movq %r12, %rsi
leaq 0x7b51c(%rip), %rdx     # 0xbdfb7
movq %r13, %rcx
callq 0x557b1
movq %rsp, %rdi
movq %r14, %rsi
callq 0x25974
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x42aca
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x42ae6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x42b02
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x60(%rsp), %rax
movl 0x8(%rax), %edx
movq (%rbx), %rax
movq %r12, %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x2c088
movq %r14, %rdi
movq %r12, %rsi
leaq 0x77d11(%rip), %rdx     # 0xba849
movq %r13, %rcx
callq 0x557b1
leaq 0x88(%rsp), %rdi
movq %r14, %rsi
callq 0x6310
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x42b6c
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x42b88
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x42ba4
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
movq %rsp, %rsi
leaq 0x7bea9(%rip), %rdx     # 0xbea5a
leaq 0x88(%rsp), %rcx
leaq 0x7bf31(%rip), %r8      # 0xbeaf1
callq 0x559e4
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x42be0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
incl %ebp
movq 0x70(%r15), %rax
subq 0x68(%r15), %rax
shrq $0x2, %rax
cmpl %eax, %ebp
jb 0x42a65
movq %rbx, %rdi
callq 0x42d5a
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x42c1f
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x42cfb
jmp 0x42c48
jmp 0x42c48
jmp 0x42c48
movq %rax, %rbx
jmp 0x42d0d
movq %rax, %rbx
jmp 0x42c95
movq %rax, %rbx
jmp 0x42c79
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x42c79
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x42c95
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x42d0d
movq 0x50(%rsp), %rsi
jmp 0x42d05
jmp 0x42cef
movq %rax, %rbx
jmp 0x42cd1
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x42cd1
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x42cf2
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x42cf2
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x42d0d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x42d2e
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0