// File: /workspace/github_cpp_makefile_star2_O1/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::flattened_access_chain_struct[abi:cxx11](unsigned int, unsigned int const*, unsigned int, spirv_cross::SPIRType const&, unsigned int)
std::string CompilerGLSL::flattened_access_chain_struct(uint32_t base, const uint32_t *indices, uint32_t count,
                                                        const SPIRType &target_type, uint32_t offset)
{
	std::string expr;

	expr += type_to_glsl_constructor(target_type);
	expr += "(";

	for (uint32_t i = 0; i < uint32_t(target_type.member_types.size()); ++i)
	{
		if (i != 0)
			expr += ", ";

		const SPIRType &member_type = get<SPIRType>(target_type.member_types[i]);
		uint32_t member_offset = type_struct_member_offset(target_type, i);

		// The access chain terminates at the struct, so we need to find matrix strides and row-major information
		// ahead of time.
		bool need_transpose = false;
		uint32_t matrix_stride = 0;
		if (member_type.columns > 1)
		{
			need_transpose = combined_decoration_for_member(target_type, i).get(DecorationRowMajor);
			matrix_stride = type_struct_member_matrix_stride(target_type, i);
		}

		auto tmp = flattened_access_chain(base, indices, count, member_type, offset + member_offset, matrix_stride,
		                                  need_transpose);

		// Cannot forward transpositions, so resolve them here.
		if (need_transpose)
			expr += convert_row_major_matrix(tmp, member_type, false);
		else
			expr += tmp;
	}

	expr += ")";

	return expr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r9, %r14
movl %r8d, 0x1c(%rsp)
movq %rcx, 0xa0(%rsp)
movl %edx, 0x18(%rsp)
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x20(%rsp), %rdi
movq %r9, %rdx
movq %rbx, 0x10(%rsp)
callq 0x35152
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x436da
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x805c0(%rip), %rsi     # 0xc3ca1
movq %rbx, %rdi
callq 0x64e0
movq 0x70(%r14), %rax
subq 0x68(%r14), %rax
shrq $0x2, %rax
testl %eax, %eax
je 0x438a7
xorl %ebp, %ebp
testq %rbp, %rbp
je 0x43713
movq %rbx, %rdi
leaq 0x779ad(%rip), %rsi     # 0xbb0bb
callq 0x64e0
movq 0x68(%r14), %rax
movl (%rax,%rbp,4), %esi
movq %r13, %rdi
callq 0xa426
movq %rax, %r15
movq %r13, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x155fe
movl %eax, %r12d
xorl %ebx, %ebx
cmpl $0x2, 0x18(%r15)
movl $0x0, %eax
jb 0x43776
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x1b67c
movl 0x20(%rsp), %ebx
leaq 0x28(%rsp), %rdi
callq 0xd5b0
movq %r13, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x157e2
andl $0x10, %ebx
shrl $0x4, %ebx
addl 0xe0(%rsp), %r12d
subq $0x8, %rsp
movzbl %bl, %r10d
leaq 0x28(%rsp), %rdi
movq %r13, %rsi
movl 0x20(%rsp), %edx
movq 0xa8(%rsp), %rcx
movl 0x24(%rsp), %r8d
movq %r15, %r9
pushq %r10
pushq %rax
pushq %r12
callq 0x430a6
addq $0x20, %rsp
testb %bl, %bl
je 0x4385a
leaq 0x70(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
callq 0xe480
movq (%r13), %rax
leaq 0x80(%rsp), %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq *0x118(%rax)
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x60b0
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x4383c
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x43871
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x43871
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x60b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x4388d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x70(%r14), %rax
subq 0x68(%r14), %rax
incq %rbp
shrq $0x2, %rax
movl %eax, %eax
cmpq %rax, %rbp
jb 0x436ff
leaq 0x78177(%rip), %rsi     # 0xbba25
movq %rbx, %rdi
callq 0x64e0
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x4393e
jmp 0x43960
jmp 0x43952
jmp 0x43960
jmp 0x438eb
movq %rax, %r14
jmp 0x43918
jmp 0x43960
movq %rax, %r14
jmp 0x43934
movq %rax, %r14
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x43918
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x43934
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x43963
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x43963
movq %rax, %r14
movq 0x8(%rsp), %rax
jmp 0x4396d
jmp 0x43960
jmp 0x43960
movq %rax, %r14
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rbx
movq (%rbx), %rdi
cmpq %rax, %rdi
je 0x43980
movq (%rax), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0