// File: /workspace/github_cpp_makefile_star2_O1/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::flags_to_precision_qualifiers_glsl(spirv_cross::SPIRType const&, spirv_cross::Bitset const&)
const char *CompilerGLSL::flags_to_precision_qualifiers_glsl(const SPIRType &type, const Bitset &flags)
{
	// Structs do not have precision qualifiers, neither do doubles (desktop only anyways, so no mediump/highp).
	if (type.basetype != SPIRType::Float && type.basetype != SPIRType::Int && type.basetype != SPIRType::UInt &&
	    type.basetype != SPIRType::Image && type.basetype != SPIRType::SampledImage &&
	    type.basetype != SPIRType::Sampler)
		return "";

	if (options.es)
	{
		auto &execution = get_entry_point();

		if (flags.get(DecorationRelaxedPrecision))
		{
			bool implied_fmediump = type.basetype == SPIRType::Float &&
			                        options.fragment.default_float_precision == Options::Mediump &&
			                        execution.model == ExecutionModelFragment;

			bool implied_imediump = (type.basetype == SPIRType::Int || type.basetype == SPIRType::UInt) &&
			                        options.fragment.default_int_precision == Options::Mediump &&
			                        execution.model == ExecutionModelFragment;

			return implied_fmediump || implied_imediump ? "" : "mediump ";
		}
		else
		{
			bool implied_fhighp =
			    type.basetype == SPIRType::Float && ((options.fragment.default_float_precision == Options::Highp &&
			                                          execution.model == ExecutionModelFragment) ||
			                                         (execution.model != ExecutionModelFragment));

			bool implied_ihighp = (type.basetype == SPIRType::Int || type.basetype == SPIRType::UInt) &&
			                      ((options.fragment.default_int_precision == Options::Highp &&
			                        execution.model == ExecutionModelFragment) ||
			                       (execution.model != ExecutionModelFragment));

			return implied_fhighp || implied_ihighp ? "" : "highp ";
		}
	}
	else if (backend.allow_precision_qualifiers)
	{
		// Vulkan GLSL supports precision qualifiers, even in desktop profiles, which is convenient.
		// The default is highp however, so only emit mediump in the rare case that a shader has these.
		if (flags.get(DecorationRelaxedPrecision))
			return "mediump ";
		else
			return "";
	}
	else
		return "";
}

// Assembly:
movl 0xc(%rsi), %ecx
leaq 0x899bb(%rip), %rax     # 0xb58af
cmpl $0xf, %ecx
ja 0x2c00a
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movl $0xe430, %edx           # imm = 0xE430
btl %ecx, %edx
jae 0x2c005
movq %rdi, %rbx
cmpb $0x1, 0x43c(%rdi)
jne 0x2bf57
movq %rsi, %r15
movq %rbx, %rdi
callq 0x16254
testb $0x1, (%r14)
movl 0xc(%r15), %ecx
jne 0x2bf7f
cmpl $0xa, %ecx
jne 0x2bfca
cmpl $0x3, 0x448(%rbx)
sete %sil
cmpl $0x4, 0xb8(%rax)
setne %dl
orb %sil, %dl
jmp 0x2bfcc
cmpb $0x1, 0x62b(%rbx)
jne 0x2c005
testb $0x1, (%r14)
leaq 0x89940(%rip), %rcx     # 0xb58af
leaq 0x8f643(%rip), %rax     # 0xbb5b9
cmoveq %rcx, %rax
jmp 0x2c005
xorl %edx, %edx
cmpl $0xa, %ecx
jne 0x2bf99
cmpl $0x2, 0x448(%rbx)
jne 0x2bf99
cmpl $0x4, 0xb8(%rax)
sete %dl
andl $-0x2, %ecx
xorl %esi, %esi
cmpl $0x4, %ecx
jne 0x2bfb7
cmpl $0x2, 0x44c(%rbx)
jne 0x2bfb7
cmpl $0x4, 0xb8(%rax)
sete %sil
orb %sil, %dl
leaq 0x898ee(%rip), %rcx     # 0xb58af
leaq 0x8f5f1(%rip), %rax     # 0xbb5b9
jmp 0x2bffe
xorl %edx, %edx
andl $-0x2, %ecx
cmpl $0x4, %ecx
jne 0x2bfec
cmpl $0x3, 0x44c(%rbx)
sete %cl
cmpl $0x4, 0xb8(%rax)
setne %al
orb %cl, %al
jmp 0x2bfee
xorl %eax, %eax
orb %al, %dl
leaq 0x898b8(%rip), %rcx     # 0xb58af
leaq 0x8f5c4(%rip), %rax     # 0xbb5c2
testb $0x1, %dl
cmovneq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop