// File: /workspace/github_cpp_makefile_star2_O1/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::sampler_type[abi:cxx11](spirv_cross::SPIRType const&)
std::string CompilerMSL::sampler_type(const SPIRType &type)
{
	if (!type.array.empty())
	{
		if (!msl_options.supports_msl_version(2))
			SPIRV_CROSS_THROW("MSL 2.0 or greater is required for arrays of samplers.");

		if (type.array.size() > 1)
			SPIRV_CROSS_THROW("Arrays of arrays of samplers are not supported in MSL.");

		// Arrays of samplers in MSL must be declared with a special array<T, N> syntax ala C++11 std::array.
		uint32_t array_size =
		    type.array_size_literal.back() ? type.array.back() : get<SPIRConstant>(type.array.back()).scalar();
		if (array_size == 0)
			SPIRV_CROSS_THROW("Unsized array of samplers is not supported in MSL.");

		auto &parent = get<SPIRType>(get_non_pointer_type(type).parent_type);
		return join("array<", sampler_type(parent), ", ", array_size, ">");
	}
	else
		return "sampler";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x20(%rdx), %rcx
movq 0x28(%rdx), %rax
cmpq %rax, %rcx
je 0x970a9
movq %rsi, %r14
cmpl $0x4e1f, 0x7d0(%rsi)    # imm = 0x4E1F
jbe 0x970d4
movq %rdx, %r15
movq %rax, %rdx
subq %rcx, %rdx
cmpq $0x5, %rdx
jae 0x97139
movl 0x50(%r15), %ecx
leaq -0x1(%rcx), %rdx
addq $0x3e, %rcx
testq %rdx, %rdx
cmovnsq %rdx, %rcx
sarq $0x6, %rcx
shlq $0x3, %rcx
addq 0x48(%r15), %rcx
movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000
leaq 0x3f(%rsi), %rdi
andq %rdx, %rdi
xorl %r8d, %r8d
cmpq %rsi, %rdi
setbe %r8b
movq -0x8(%rcx,%r8,8), %rcx
addq $-0x4, %rax
btq %rdx, %rcx
jb 0x9702f
movl (%rax), %esi
movq %r14, %rdi
callq 0x1c66e
addq $0x10, %rax
movl (%rax), %eax
movl %eax, 0x24(%rsp)
testl %eax, %eax
je 0x9719b
movq %r14, %rdi
movq %r15, %rsi
callq 0x14c4e
movl 0x9c(%rax), %esi
movq %r14, %rdi
callq 0xa426
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x96f94
leaq 0x1e556(%rip), %rsi     # 0xb55c4
leaq 0x24046(%rip), %rcx     # 0xbb0bb
leaq 0x1e180(%rip), %r9      # 0xb51fc
leaq 0x24(%rsp), %r8
movq %rbx, %rdi
movq %r15, %rdx
callq 0xa785d
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x970c6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x970c6
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x27a01(%rip), %rsi     # 0xbeab8
leaq 0x27a01(%rip), %rdx     # 0xbeabf
movq %rbx, %rdi
callq 0x7c64
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x6140
movq %rax, %r14
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2ce5d(%rip), %rsi     # 0xc3f4e
leaq 0x2ce8c(%rip), %rdx     # 0xc3f84
movq %rsp, %rdi
callq 0x7c64
movb $0x1, %bpl
movq %rsp, %rsi
movq %r14, %rdi
callq 0x6320
leaq 0x65c83(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0x65c5b(%rip), %rsi     # 0xfcd80
movq 0x66eac(%rip), %rdx     # 0xfdfd8
movq %r14, %rdi
callq 0x6470
jmp 0x971fb
movl $0x10, %edi
callq 0x6140
movq %rax, %r14
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2ce2f(%rip), %rsi     # 0xc3f85
leaq 0x2ce5e(%rip), %rdx     # 0xc3fbb
movq %rsp, %rdi
callq 0x7c64
movb $0x1, %bpl
movq %rsp, %rsi
movq %r14, %rdi
callq 0x6320
leaq 0x65c1e(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0x65bf6(%rip), %rsi     # 0xfcd80
movq 0x66e47(%rip), %rdx     # 0xfdfd8
movq %r14, %rdi
callq 0x6470
jmp 0x971fb
movl $0x10, %edi
callq 0x6140
movq %rax, %r14
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2ce04(%rip), %rsi     # 0xc3fbc
leaq 0x2ce2f(%rip), %rdx     # 0xc3fee
movq %rsp, %rdi
callq 0x7c64
movb $0x1, %bpl
movq %rsp, %rsi
movq %r14, %rdi
callq 0x6320
leaq 0x65bbc(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0x65b94(%rip), %rsi     # 0xfcd80
movq 0x66de5(%rip), %rdx     # 0xfdfd8
movq %r14, %rdi
callq 0x6470
jmp 0x97203
jmp 0x9721e
jmp 0x97203
jmp 0x9721e
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x97224
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x97224
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x97251
movq %r14, %rdi
callq 0x6200
jmp 0x97251
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x97251
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
nop