// File: /workspace/github_cpp_makefile_star2_O1/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 0x43b88
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
movb 0x160(%rsp), %bpl
leaq 0x40(%rsp), %rdi
movq %r9, %rsi
callq 0x1f216
testb %bpl, %bpl
je 0x439dd
rolq $0x20, 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 0x35152
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 0x43a34
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x80266(%rip), %rsi     # 0xc3ca1
movq %rbx, %rdi
callq 0x64e0
cmpl $0x0, 0x58(%rsp)
je 0x43ad3
movl 0x150(%rsp), %ebp
xorl %r14d, %r14d
testl %r14d, %r14d
je 0x43a6c
movq %rbx, %rdi
leaq 0x77654(%rip), %rsi     # 0xbb0bb
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 0x43c0c
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 0x43ac6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
incl %r14d
addl %r13d, %ebp
cmpl 0x58(%rsp), %r14d
jb 0x43a58
leaq 0x77f4b(%rip), %rsi     # 0xbba25
movq %rbx, %rdi
callq 0x64e0
leaq 0xb98c7(%rip), %rax     # 0xfd3b0
addq $0x10, %rax
leaq 0xe0(%rsp), %r14
movq %rax, -0xa0(%r14)
movq %r14, %rdi
callq 0xdeb6
movq -0x38(%r14), %rdi
testq %rdi, %rdi
je 0x43b1d
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x43b5c
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 0x43b73
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 0x76ade(%rip), %rdi     # 0xba66d
leaq 0x741c2(%rip), %rsi     # 0xb7d58
leaq 0x76ade(%rip), %rcx     # 0xba67b
movl $0x15e8, %edx           # imm = 0x15E8
callq 0x61b0
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x43bcd
jmp 0x43bbb
jmp 0x43bbb
jmp 0x43bbb
movq %rax, %r14
jmp 0x43bdf
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x43bdf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movq (%rbx), %rdi
cmpq 0x30(%rsp), %rdi
je 0x43bf9
movq 0x30(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x6260
leaq 0x40(%rsp), %rdi
callq 0x1c438
movq %r14, %rdi
callq 0x64a0
nop