// File: /workspace/github_cpp_makefile_star2_O1/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 0x345e6
leaq 0x789f3(%rip), %rsi     # 0xbbbe7
movq %rbx, %rdi
callq 0x5a5fc
incl 0x638(%rbx)
movl 0x10(%r14), %ebp
movl $0x7, 0x10(%r14)
movq %rsp, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2ce16
movl %ebp, 0x10(%r14)
leaq 0x7c82b(%rip), %rdx     # 0xbfa52
leaq 0x7c8bb(%rip), %r8      # 0xbfae9
movq %rsp, %rsi
leaq 0x88(%rsp), %rcx
movq %rbx, %rdi
callq 0x56058
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4325c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r14, 0x60(%rsp)
movl 0xc(%r14), %esi
movq %rbx, %rdi
callq 0xa426
movq %rax, %r15
movq 0x70(%rax), %rax
subq 0x68(%r15), %rax
shrq $0x2, %rax
testl %eax, %eax
je 0x43426
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 0x2c69c
movq %r14, %rdi
movq %r12, %rsi
leaq 0x7bce4(%rip), %rdx     # 0xbefaf
movq %r13, %rcx
callq 0x55fab
movq %rsp, %rdi
movq %r14, %rsi
callq 0x26038
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x432fa
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x43316
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x43332
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 0x2c69c
movq %r14, %rdi
movq %r12, %rsi
leaq 0x784f1(%rip), %rdx     # 0xbb859
movq %r13, %rcx
callq 0x55fab
leaq 0x88(%rsp), %rdi
movq %r14, %rsi
callq 0x6310
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x4339c
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x433b8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x433d4
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
movq %rsp, %rsi
leaq 0x7c671(%rip), %rdx     # 0xbfa52
leaq 0x88(%rsp), %rcx
leaq 0x7c6f9(%rip), %r8      # 0xbfae9
callq 0x561de
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x43410
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 0x43295
movq %rbx, %rdi
callq 0x4358a
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4344f
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 0x4352b
jmp 0x43478
jmp 0x43478
jmp 0x43478
movq %rax, %rbx
jmp 0x4353d
movq %rax, %rbx
jmp 0x434c5
movq %rax, %rbx
jmp 0x434a9
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x434a9
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x434c5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x4353d
movq 0x50(%rsp), %rsi
jmp 0x43535
jmp 0x4351f
movq %rax, %rbx
jmp 0x43501
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x43501
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x43522
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x43522
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4353d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4355e
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0