// File: /workspace/github_cpp_makefile_star2_O2/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), %rax
movq 0x28(%rdx), %rcx
cmpq %rcx, %rax
je 0x781d6
movq %rsi, %r14
cmpl $0x4e1f, 0x7d0(%rsi)    # imm = 0x4E1F
jbe 0x781f8
subq %rax, %rcx
cmpq $0x5, %rcx
jae 0x78244
movq %rdx, %r15
leaq 0x38(%rdx), %rdi
callq 0x1760e
movl %eax, %ecx
movq 0x28(%r15), %rax
addq $-0x4, %rax
testb %cl, %cl
jne 0x7816e
movl (%rax), %esi
movq %r14, %rdi
callq 0x17bce
addq $0x10, %rax
movl (%rax), %eax
movl %eax, (%rsp)
testl %eax, %eax
je 0x7828d
movq %r14, %rdi
movq %r15, %rsi
callq 0x11e4a
movl 0x9c(%rax), %esi
movq %r14, %rdi
callq 0x90a4
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x78108
leaq 0x173ee(%rip), %rsi     # 0x8f59c
leaq 0x1ced6(%rip), %rcx     # 0x9508b
leaq 0x17018(%rip), %r9      # 0x8f1d4
movq %rsp, %r8
movq %rbx, %rdi
movq %r15, %rdx
callq 0x82175
leaq 0x8(%rsp), %rdi
callq 0x6548
jmp 0x781ea
leaq 0x20873(%rip), %rsi     # 0x98a50
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x6100
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %r14
leaq 0x25ccc(%rip), %rsi     # 0x9ded6
leaq 0x8(%rsp), %rdi
movq %rsp, %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x6eb90(%rip), %rsi     # 0xe6dc0
movq 0x6fda9(%rip), %rdx     # 0xe7fe0
movq %r14, %rdi
callq 0x6490
jmp 0x782d6
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %r14
leaq 0x25cb7(%rip), %rsi     # 0x9df0d
leaq 0x8(%rsp), %rdi
movq %rsp, %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x6eb44(%rip), %rsi     # 0xe6dc0
movq 0x6fd5d(%rip), %rdx     # 0xe7fe0
movq %r14, %rdi
callq 0x6490
jmp 0x782d6
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %r14
leaq 0x25ca5(%rip), %rsi     # 0x9df44
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x6eaf9(%rip), %rsi     # 0xe6dc0
movq 0x6fd12(%rip), %rdx     # 0xe7fe0
movq %r14, %rdi
callq 0x6490
jmp 0x782de
jmp 0x782f2
jmp 0x782de
jmp 0x782f2
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x782f5
jmp 0x7830c
movq %rax, %rbx
movq %r14, %rdi
callq 0x6200
jmp 0x7830c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0