// File: /workspace/github_cpp_makefile_star2_O1/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, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x7ad6c
movq %rax, %r13
testq %rax, %rax
je 0x8a027
movl 0x10(%r13), %ebp
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x345e6
xorl %r14d, %r14d
movq %r12, %rdi
movl $0x5b, %esi
xorl %edx, %edx
callq 0x6340
movq %rax, %r12
testq %r13, %r13
je 0x8a057
movl 0x14(%r13), %r14d
cmpq $-0x1, %r12
je 0x8a0a2
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 %r14d, %r14d
je 0x8a0ba
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x345e6
jmp 0x8a13f
testl %r14d, %r14d
je 0x8a109
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x345e6
jmp 0x8a195
addq $0x9a0, %r15            # imm = 0x9A0
leaq 0x48(%rsp), %rdi
leaq 0x68(%rsp), %rsi
movq %r15, %rdx
callq 0xc980
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 0x8a122
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x8a128
addq $0x9a0, %r15            # imm = 0x9A0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0xc980
jmp 0x8a195
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)
testl %r14d, %r14d
jne 0x8a15f
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a15f
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a17a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a195
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a1b0
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 0x8a1ec
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x8a1ec
jmp 0x8a1e9
jmp 0x8a229
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a20c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x8a20c
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a22c
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x8a22c
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a247
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
nop