// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::flattened_access_chain_matrix[abi:cxx11](unsigned int, unsigned int const*, unsigned int, spirv_cross::SPIRType const&, unsigned int, unsigned int, bool)
std::string CompilerGLSL::flattened_access_chain_matrix(uint32_t base, const uint32_t *indices, uint32_t count,
                                                        const SPIRType &target_type, uint32_t offset,
                                                        uint32_t matrix_stride, bool need_transpose)
{
	assert(matrix_stride);
	SPIRType tmp_type = target_type;
	if (need_transpose)
		swap(tmp_type.vecsize, tmp_type.columns);

	std::string expr;

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

	for (uint32_t i = 0; i < tmp_type.columns; i++)
	{
		if (i != 0)
			expr += ", ";

		expr += flattened_access_chain_vector(base, indices, count, tmp_type, offset + i * matrix_stride, matrix_stride,
		                                      /* need_transpose= */ false);
	}

	expr += ")";

	return expr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movl %r8d, 0x2c(%rsp)
movq %rcx, 0x38(%rsp)
movl 0x158(%rsp), %r13d
testl %r13d, %r13d
je 0x43365
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
movb 0x160(%rsp), %bpl
leaq 0x40(%rsp), %rdi
movq %r9, %rsi
callq 0x1eafa
testb %bpl, %bpl
je 0x431ba
movq 0x54(%rsp), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x54(%rsp)
leaq 0x10(%rbx), %rax
movq %rax, 0x30(%rsp)
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
leaq 0x8(%rsp), %rdi
leaq 0x40(%rsp), %rdx
movq %r12, %rsi
callq 0x34a5c
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x43211
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x7fa59(%rip), %rsi     # 0xc2c71
movq %rbx, %rdi
callq 0x64e0
cmpl $0x0, 0x58(%rsp)
je 0x432b0
movl 0x150(%rsp), %ebp
xorl %r14d, %r14d
testl %r14d, %r14d
je 0x43249
movq %rbx, %rdi
leaq 0x76e67(%rip), %rsi     # 0xba0ab
callq 0x64e0
subq $0x8, %rsp
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
movl %r15d, %edx
movq 0x40(%rsp), %rcx
movl 0x34(%rsp), %r8d
leaq 0x48(%rsp), %r9
pushq $0x0
pushq %r13
pushq %rbp
callq 0x433e8
addq $0x20, %rsp
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x432a3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
incl %r14d
addl %r13d, %ebp
cmpl 0x58(%rsp), %r14d
jb 0x43235
leaq 0x7775e(%rip), %rsi     # 0xbaa15
movq %rbx, %rdi
callq 0x64e0
leaq 0xb911a(%rip), %rax     # 0xfc3e0
addq $0x10, %rax
leaq 0xe0(%rsp), %r14
movq %rax, -0xa0(%r14)
movq %r14, %rdi
callq 0xde80
movq -0x38(%r14), %rdi
testq %rdi, %rdi
je 0x432fa
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x43339
movq 0x98(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0x78(%rsp)
movl %eax, 0x80(%rsp)
movq %rax, 0x88(%rsp)
movl %eax, 0x90(%rsp)
movq %rax, 0x98(%rsp)
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x43350
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq %rbx, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x762f1(%rip), %rdi     # 0xb965d
leaq 0x739d5(%rip), %rsi     # 0xb6d48
leaq 0x762f1(%rip), %rcx     # 0xb966b
movl $0x15e8, %edx           # imm = 0x15E8
callq 0x61b0
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x433aa
jmp 0x43398
jmp 0x43398
jmp 0x43398
movq %rax, %r14
jmp 0x433bc
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x433bc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movq (%rbx), %rdi
cmpq 0x30(%rsp), %rdi
je 0x433d6
movq 0x30(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x6260
leaq 0x40(%rsp), %rdi
callq 0x1be02
movq %r14, %rdi
callq 0x64a0