// File: /workspace/github_cpp_makefile_star2_O1/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::convert_separate_image_to_expression[abi:cxx11](unsigned int)
std::string CompilerGLSL::convert_separate_image_to_expression(uint32_t id)
{
	auto *var = maybe_get_backing_variable(id);

	// If we are fetching from a plain OpTypeImage, we must combine with a dummy sampler in GLSL.
	// In Vulkan GLSL, we can make use of the newer GL_EXT_samplerless_texture_functions.
	if (var)
	{
		auto &type = get<SPIRType>(var->basetype);
		if (type.basetype == SPIRType::Image && type.image.sampled == 1 && type.image.dim != DimBuffer)
		{
			if (options.vulkan_semantics)
			{
				// Newer glslang supports this extension to deal with texture2D as argument to texture functions.
				if (dummy_sampler_id)
					SPIRV_CROSS_THROW("Vulkan GLSL should not have a dummy sampler for combining.");
				require_extension_internal("GL_EXT_samplerless_texture_functions");
			}
			else
			{
				if (!dummy_sampler_id)
					SPIRV_CROSS_THROW(
					    "Cannot find dummy sampler ID. Was build_dummy_sampler_for_combined_images() called?");

				return to_combined_image_sampler(id, dummy_sampler_id);
			}
		}
	}

	return to_expression(id);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x12cda
testq %rax, %rax
je 0x3d286
movl 0xc(%rax), %esi
movq %r14, %rdi
callq 0xa426
cmpl $0xd, 0xc(%rax)
jne 0x3d286
cmpl $0x1, 0x8c(%rax)
jne 0x3d286
cmpl $0x5, 0x84(%rax)
je 0x3d286
movl 0x39c(%r14), %ecx
cmpb $0x1, 0x43e(%r14)
jne 0x3d2a1
testl %ecx, %ecx
jne 0x3d2b4
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7c383(%rip), %rsi     # 0xb95d4
leaq 0x7c3a0(%rip), %rdx     # 0xb95f8
leaq 0x8(%rsp), %rdi
callq 0x7c64
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x26a0a
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3d286
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x345e6
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testl %ecx, %ecx
je 0x3d31a
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x3be3c
jmp 0x3d293
movl $0x10, %edi
callq 0x6140
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7c2c8(%rip), %rsi     # 0xb9599
leaq 0x7c2fb(%rip), %rdx     # 0xb95d3
leaq 0x8(%rsp), %rdi
callq 0x7c64
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x6320
leaq 0xbfa9f(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0xbfa77(%rip), %rsi     # 0xfcd80
movq 0xc0cc8(%rip), %rdx     # 0xfdfd8
movq %r14, %rdi
callq 0x6470
jmp 0x3d37e
movl $0x10, %edi
callq 0x6140
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7c2c2(%rip), %rsi     # 0xb95f9
leaq 0x7c30e(%rip), %rdx     # 0xb964c
leaq 0x8(%rsp), %rdi
callq 0x7c64
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x6320
leaq 0xbfa39(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0xbfa11(%rip), %rsi     # 0xfcd80
movq 0xc0c62(%rip), %rdx     # 0xfdfd8
movq %r14, %rdi
callq 0x6470
jmp 0x3d382
jmp 0x3d39e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3d3a4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3d3a4
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x3d3d2
movq %r14, %rdi
callq 0x6200
jmp 0x3d3d2
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3d3d2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3d3d2
movq %rax, %rbx
movq %rbx, %rdi
callq 0x64a0