// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::MemberSorter::sort()
void CompilerMSL::MemberSorter::sort()
{
	// Create a temporary array of consecutive member indices and sort it based on how
	// the members should be reordered, based on builtin and sorting aspect meta info.
	size_t mbr_cnt = type.member_types.size();
	vector<uint32_t> mbr_idxs(mbr_cnt);
	iota(mbr_idxs.begin(), mbr_idxs.end(), 0); // Fill with consecutive indices
	std::sort(mbr_idxs.begin(), mbr_idxs.end(), *this); // Sort member indices based on sorting aspect

	// Move type and meta member info to the order defined by the sorted member indices.
	// This is done by creating temporary copies of both member types and meta, and then
	// copying back to the original content at the sorted indices.
	auto mbr_types_cpy = type.member_types;
	auto mbr_meta_cpy = meta.members;
	for (uint32_t mbr_idx = 0; mbr_idx < mbr_cnt; mbr_idx++)
	{
		type.member_types[mbr_idx] = mbr_types_cpy[mbr_idxs[mbr_idx]];
		meta.members[mbr_idx] = mbr_meta_cpy[mbr_idxs[mbr_idx]];
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x68(%rax), %r13
movq 0x70(%rax), %rbp
movq %rbp, %r14
subq %r13, %r14
sarq $0x2, %r14
leaq 0x38(%rsp), %r12
leaq 0x20(%rsp), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x1c17e
movq (%r12), %r15
movq 0x8(%r12), %r12
cmpq %r12, %r15
je 0x8f1f8
movq %r12, %rax
subq %r15, %rax
leaq -0x4(%rax), %rcx
movq %rcx, %xmm0
shrq $0x2, %rcx
addq $0x4, %rcx
andq $-0x4, %rcx
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
psrlq $0x2, %xmm0
xorl %edx, %edx
movdqa 0x30756(%rip), %xmm1    # 0xbf820
movdqa 0x3075e(%rip), %xmm2    # 0xbf830
movdqa 0x30766(%rip), %xmm3    # 0xbf840
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rdx, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %esi
notl %esi
testb $0x1, %sil
je 0x8f129
movl %edx, (%r15,%rdx,4)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x8f140
leal 0x1(%rdx), %esi
movl %esi, 0x4(%r15,%rdx,4)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %esi
testb $0x1, %sil
je 0x8f17d
leal 0x2(%rdx), %esi
movl %esi, 0x8(%r15,%rdx,4)
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x8f190
leal 0x3(%rdx), %esi
movl %esi, 0xc(%r15,%rdx,4)
addq $0x4, %rdx
cmpq %rdx, %rcx
jne 0x8f0e2
movq 0x10(%rbx), %rcx
movq %rcx, 0x30(%rsp)
movups (%rbx), %xmm0
movaps %xmm0, 0x20(%rsp)
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq 0x10(%rbx), %rax
movq %rax, 0x10(%rsp)
movups (%rbx), %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0xad07f
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0xad1ad
movq (%rbx), %rsi
addq $0x68, %rsi
leaq 0x20(%rsp), %rdi
callq 0x1e87c
movl $0xd0, %esi
addq 0x8(%rbx), %rsi
leaq 0x50(%rsp), %rdi
callq 0x1d0c4
cmpq %r13, %rbp
je 0x8f2ee
movl $0x1, %ebp
xorl %eax, %eax
movq 0x38(%rsp), %rcx
movl (%rcx,%rax,4), %edx
movq 0x20(%rsp), %rsi
movl (%rsi,%rdx,4), %edx
movq (%rbx), %rsi
movq 0x68(%rsi), %rsi
movl %edx, (%rsi,%rax,4)
movl (%rcx,%rax,4), %ecx
imulq $0xd0, %rcx, %r15
addq 0x50(%rsp), %r15
movq 0x8(%rbx), %rcx
imulq $0xd0, %rax, %r12
addq 0xd0(%rcx), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x6170
leaq 0x20(%r12), %rdi
leaq 0x20(%r15), %rsi
callq 0x6170
leaq 0x40(%r12), %rdi
leaq 0x40(%r15), %rsi
callq 0x6170
movq 0x60(%r15), %rax
movq %rax, 0x60(%r12)
cmpq %r12, %r15
je 0x8f2aa
leaq 0x68(%r12), %rdi
leaq 0x68(%r15), %rsi
callq 0x1d5b4
movups 0xa0(%r15), %xmm0
movdqu 0xb0(%r15), %xmm1
movdqu 0xbd(%r15), %xmm2
movdqu %xmm2, 0xbd(%r12)
movdqu %xmm1, 0xb0(%r12)
movups %xmm0, 0xa0(%r12)
movl %ebp, %eax
incl %ebp
cmpq %rax, %r14
ja 0x8f22c
leaq 0x50(%rsp), %rdi
callq 0xe2ec
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x8f30f
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x8f326
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x8f34e
jmp 0x8f33c
movq %rax, %rbx
jmp 0x8f365
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xe2ec
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x8f365
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x8f37c
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0