// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::to_sampler_expression[abi:cxx11](unsigned int)
string CompilerMSL::to_sampler_expression(uint32_t id)
{
	auto *combined = maybe_get<SPIRCombinedImageSampler>(id);
	auto expr = to_expression(combined ? combined->image : id);
	auto index = expr.find_first_of('[');

	uint32_t samp_id = 0;
	if (combined)
		samp_id = combined->sampler;

	if (index == string::npos)
		return samp_id ? to_expression(samp_id) : expr + sampler_name_suffix;
	else
	{
		auto image_expr = expr.substr(0, index);
		auto array_expr = expr.substr(index);
		return samp_id ? to_expression(samp_id) : (image_expr + sampler_name_suffix + array_expr);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x7a260
movq %rax, %r13
testq %rax, %rax
je 0x893d9
movl 0x10(%r13), %ebp
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x33f8a
xorl %r15d, %r15d
movq %r12, %rdi
movl $0x5b, %esi
xorl %edx, %edx
callq 0x6340
movq %rax, %r12
testq %r13, %r13
je 0x8942b
movl 0x14(%r13), %r15d
cmpq $-0x1, %r12
jne 0x89435
testl %r15d, %r15d
je 0x894c9
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x33f8a
jmp 0x89550
cmpq $-0x1, %r12
je 0x894c9
leaq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x6290
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %r12, %rdx
movq $-0x1, %rcx
callq 0x6290
testl %r15d, %r15d
je 0x8947a
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x33f8a
jmp 0x8951a
addq $0x9a0, %r14            # imm = 0x9A0
leaq 0x48(%rsp), %rdi
leaq 0x68(%rsp), %rsi
movq %r14, %rdx
callq 0xc940
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0x60b0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x894e2
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x894e8
addq $0x9a0, %r14            # imm = 0x9A0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0xc940
jmp 0x89550
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8951a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x89535
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x89550
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8956b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x895a7
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x895a7
jmp 0x895a4
jmp 0x895e4
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x895c7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x895c7
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x895e7
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x895e7
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x89602
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0