// File: /workspace/github_cpp_makefile_star2_O2/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 $0xb8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %rdi
movq %rbx, %rsi
callq 0x2b9f0
movq %rbx, %rdi
callq 0x22d28
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x364e6
leaq 0x6371f(%rip), %rdx     # 0x999ea
leaq 0x637af(%rip), %r8      # 0x99a81
leaq 0x18(%rsp), %rsi
leaq 0x38(%rsp), %rcx
movq %rbx, %rdi
callq 0x44b42
leaq 0x18(%rsp), %rdi
callq 0x6548
movq %r14, 0x10(%rsp)
movl 0xc(%r14), %esi
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
callq 0x90a4
movq %rax, %r15
xorl %ebx, %ebx
leaq 0x78(%rsp), %r12
leaq 0x58(%rsp), %r13
leaq 0x98(%rsp), %r14
movq 0x70(%r15), %rax
subq 0x68(%r15), %rax
shrq $0x2, %rax
cmpl %eax, %ebx
jae 0x36449
movq 0x10(%rsp), %rax
movl 0x8(%rax), %edx
movq 0x8(%rsp), %rbp
movq (%rbp), %rax
movq %r12, %rdi
movq %rbp, %rsi
pushq $0x1
popq %rcx
callq *0x38(%rax)
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movl %ebx, %ecx
callq 0x25cca
movq %r14, %rdi
movq %r12, %rsi
leaq 0x62bde(%rip), %rdx     # 0x98f47
movq %r13, %rcx
callq 0x44ac7
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x20bb0
movq %r14, %rdi
callq 0x6548
movq %r13, %rdi
callq 0x6548
movq %r12, %rdi
callq 0x6548
movq 0x10(%rsp), %rax
movl 0x8(%rax), %edx
movq 0x8(%rsp), %rbp
movq (%rbp), %rax
movq %r12, %rdi
movq %rbp, %rsi
pushq $0x1
popq %rcx
callq *0x38(%rax)
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movl %ebx, %ecx
callq 0x25cca
movq %r15, %rbp
movq %r14, %rdi
movq %r12, %rsi
leaq 0x5f456(%rip), %rdx     # 0x95829
movq %r13, %rcx
callq 0x44ac7
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x6320
movq %r14, %r15
movq %r14, %rdi
callq 0x6548
movq %r13, %r14
movq %r13, %rdi
callq 0x6548
movq %r12, %r13
movq %r12, %rdi
callq 0x6548
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %r12
movq %r12, %rsi
leaq 0x635cd(%rip), %rdx     # 0x999ea
leaq 0x38(%rsp), %rcx
leaq 0x63658(%rip), %r8      # 0x99a81
callq 0x44c2a
movq %r12, %rdi
callq 0x6548
incl %ebx
movq %r13, %r12
movq %r14, %r13
movq %r15, %r14
movq %rbp, %r15
jmp 0x3631b
movq 0x8(%rsp), %rdi
callq 0x3650a
leaq 0x38(%rsp), %rdi
callq 0x6548
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x36497
jmp 0x36492
jmp 0x36492
jmp 0x36492
movq %rax, %rbx
jmp 0x364ca
movq %rax, %rbx
jmp 0x364c0
jmp 0x36497
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x6548
jmp 0x3649f
movq %rax, %rbx
jmp 0x364d4
movq %rax, %rbx
jmp 0x364a9
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x6548
leaq 0x18(%rsp), %rdi
jmp 0x364cf
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x6548
leaq 0x58(%rsp), %rdi
callq 0x6548
leaq 0x78(%rsp), %rdi
callq 0x6548
leaq 0x38(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0