// File: /workspace/github_cpp_makefile_star2_O3/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 0x34594
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 0x9aaee
leaq 0x1cc64(%rip), %rcx     # 0xb7736
leaq 0xc8(%rsp), %rdi
movl $0x9, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x63f0
jmp 0x9ae88
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x28156(%rip), %rsi     # 0xc2c55
leaq 0x28165(%rip), %rdx     # 0xc2c6b
leaq 0x68(%rsp), %rdi
callq 0x7be0
movl 0x18(%r15), %ebp
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x9ab62
movl $0x4, %eax
movl $0xd1b71759, %ecx       # imm = 0xD1B71759
movl %ebp, %edx
cmpl $0x63, %edx
jbe 0x9ab5b
cmpl $0x3e7, %edx            # imm = 0x3E7
jbe 0x9ab60
cmpl $0x2710, %edx           # imm = 0x2710
jb 0x9ab62
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x2d, %rsi
addl $0x4, %eax
cmpl $0x1869f, %edx          # imm = 0x1869F
movl %esi, %edx
ja 0x9ab2a
addl $-0x3, %eax
jmp 0x9ab62
addl $-0x2, %eax
jmp 0x9ab62
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 0x20b57
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %r8
movq 0x10(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r12, %rcx
je 0x9abab
movq 0x78(%rsp), %rdi
movq 0x8(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x9abc9
movl $0xf, %edi
cmpq %r13, %rsi
je 0x9abc4
movq 0x18(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x9abd5
leaq 0x68(%rsp), %rdi
callq 0x60b0
jmp 0x9abe3
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x62c0
leaq 0x38(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x9ac07
movq %rsi, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x9ac0d
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x1f14c(%rip), %rsi     # 0xb9d7d
leaq 0x28(%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 0x9ac6b
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
jmp 0x9ac73
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 0x9ace0
movl $0x4, %eax
movl $0xd1b71759, %ecx       # imm = 0xD1B71759
movl %ebp, %edx
cmpl $0x63, %edx
jbe 0x9acd9
cmpl $0x3e7, %edx            # imm = 0x3E7
jbe 0x9acde
cmpl $0x2710, %edx           # imm = 0x2710
jb 0x9ace0
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x2d, %rsi
addl $0x4, %eax
cmpl $0x1869f, %edx          # imm = 0x1869F
movl %esi, %edx
ja 0x9aca8
addl $-0x3, %eax
jmp 0x9ace0
addl $-0x2, %eax
jmp 0x9ace0
decl %eax
movl %eax, %esi
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x48(%rsp), %rdi
xorl %edx, %edx
callq 0x62f0
movq 0x48(%rsp), %rdi
movl 0x50(%rsp), %esi
movl %ebp, %edx
callq 0x20b57
movq 0x88(%rsp), %rcx
movq 0x90(%rsp), %r8
movq 0x50(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r13, %rcx
je 0x9ad33
movq 0x98(%rsp), %rdi
movq 0x48(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x9ad51
movl $0xf, %edi
cmpq %r12, %rsi
je 0x9ad4c
movq 0x58(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x9ad60
leaq 0x88(%rsp), %rdi
callq 0x60b0
jmp 0x9ad6e
leaq 0x48(%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 0x9ad9b
movq %rsi, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0x9ada1
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 0x9adf9
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x9ae10
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
leaq 0xd8(%rsp), %r12
je 0x9ae35
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
leaq 0x18(%rsp), %r15
je 0x9ae55
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x9ae6c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x9ae88
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x27de2(%rip), %rdx     # 0xc2c71
leaq 0x1fb7f(%rip), %r8      # 0xbaa15
leaq 0xc8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rcx
callq 0x7aeb4
movq 0xc8(%rsp), %rdi
cmpq %r12, %rdi
je 0x9aec6
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 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x9aefa
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x9aefa
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x9af1c
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x9af1c
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9af3c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x9af3c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x9af5d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x9af5d
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x9af80
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x9af80
jmp 0x9af7d
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x9afa5
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
nop