// File: /workspace/github_cpp_makefile_star2_O1/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::convert_row_major_matrix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, spirv_cross::SPIRType const&, bool)
string CompilerMSL::convert_row_major_matrix(string exp_str, const SPIRType &exp_type, bool is_packed)
{
	strip_enclosed_expression(exp_str);

	string func_name;

	// Square and packed matrices can just use transpose
	if (exp_type.columns == exp_type.vecsize || is_packed)
		func_name = "transpose";
	else
		func_name = string("spvConvertFromRowMajor") + to_string(exp_type.columns) + "x" + to_string(exp_type.vecsize);

	return join(func_name, "(", exp_str, ")");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %r8d, %ebp
movq %rcx, %r15
movq %rdx, %r14
movq %rdi, %rbx
xorb $0x1, %bpl
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x34c94
leaq 0xd8(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movl 0x18(%r15), %eax
cmpl 0x14(%r15), %eax
setne %al
testb %bpl, %al
jne 0x9b7ca
leaq 0x1cf98(%rip), %rcx     # 0xb8746
leaq 0xc8(%rsp), %rdi
movl $0x9, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x63f0
jmp 0x9bb68
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x284aa(%rip), %rsi     # 0xc3c85
leaq 0x284b9(%rip), %rdx     # 0xc3c9b
leaq 0x68(%rsp), %rdi
callq 0x7c64
movl 0x18(%r15), %ebp
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x9b83e
movl $0x4, %eax
movl $0xd1b71759, %ecx       # imm = 0xD1B71759
movl %ebp, %edx
cmpl $0x63, %edx
jbe 0x9b837
cmpl $0x3e7, %edx            # imm = 0x3E7
jbe 0x9b83c
cmpl $0x2710, %edx           # imm = 0x2710
jb 0x9b83e
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x2d, %rsi
addl $0x4, %eax
cmpl $0x1869f, %edx          # imm = 0x1869F
movl %esi, %edx
ja 0x9b806
addl $-0x3, %eax
jmp 0x9b83e
addl $-0x2, %eax
jmp 0x9b83e
decl %eax
movl %eax, %esi
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x8(%rsp), %rdi
xorl %edx, %edx
callq 0x62f0
movq 0x8(%rsp), %rdi
movl 0x10(%rsp), %esi
movl %ebp, %edx
callq 0x21251
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %r8
movq 0x10(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r12, %rcx
je 0x9b887
movq 0x78(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x9b8a2
movl $0xf, %esi
cmpq %r13, 0x8(%rsp)
je 0x9b89d
movq 0x18(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x9b8b3
movq 0x8(%rsp), %rsi
leaq 0x68(%rsp), %rdi
callq 0x60b0
jmp 0x9b8c1
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x62c0
leaq 0x58(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x9b8e5
movq %rsi, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x9b8eb
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x1f47e(%rip), %rsi     # 0xbad8d
leaq 0x48(%rsp), %rdi
callq 0x64e0
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9b949
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
jmp 0x9b951
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x90(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x14(%r15), %ebp
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x9b9be
movl $0x4, %eax
movl $0xd1b71759, %ecx       # imm = 0xD1B71759
movl %ebp, %edx
cmpl $0x63, %edx
jbe 0x9b9b7
cmpl $0x3e7, %edx            # imm = 0x3E7
jbe 0x9b9bc
cmpl $0x2710, %edx           # imm = 0x2710
jb 0x9b9be
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x2d, %rsi
addl $0x4, %eax
cmpl $0x1869f, %edx          # imm = 0x1869F
movl %esi, %edx
ja 0x9b986
addl $-0x3, %eax
jmp 0x9b9be
addl $-0x2, %eax
jmp 0x9b9be
decl %eax
movl %eax, %esi
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x28(%rsp), %rdi
xorl %edx, %edx
callq 0x62f0
movq 0x28(%rsp), %rdi
movl 0x30(%rsp), %esi
movl %ebp, %edx
callq 0x21251
movq 0x88(%rsp), %rcx
movq 0x90(%rsp), %r8
movq 0x30(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r13, %rcx
je 0x9ba11
movq 0x98(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x9ba2c
movl $0xf, %esi
cmpq %r12, 0x28(%rsp)
je 0x9ba27
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x9ba40
movq 0x28(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0x60b0
jmp 0x9ba4e
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x62c0
leaq 0xb8(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x9ba7b
movq %rsi, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0x9ba81
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0xb0(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %r15
movq %r15, %rsi
callq 0x6310
movq (%r15), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x9bad9
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x9baf0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
leaq 0xd8(%rsp), %r12
je 0x9bb15
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
leaq 0x18(%rsp), %r15
je 0x9bb35
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x9bb4c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x9bb68
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x28132(%rip), %rdx     # 0xc3ca1
leaq 0x1feaf(%rip), %r8      # 0xbba25
leaq 0xc8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rcx
callq 0x7b9c0
movq 0xc8(%rsp), %rdi
cmpq %r12, %rdi
je 0x9bba6
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x9bbda
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x9bbda
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x9bbfc
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x9bbfc
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9bc1c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x9bc1c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x9bc3d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x9bc3d
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x9bc60
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x9bc60
jmp 0x9bc5d
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x9bc85
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
nop