// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::find_static_extensions()
void CompilerGLSL::find_static_extensions()
{
	for (auto &id : ir.ids)
	{
		if (id.get_type() == TypeType)
		{
			auto &type = id.get<SPIRType>();
			if (type.basetype == SPIRType::Double)
			{
				if (options.es)
					SPIRV_CROSS_THROW("FP64 not supported in ES profile.");
				if (!options.es && options.version < 400)
					require_extension_internal("GL_ARB_gpu_shader_fp64");
			}

			if (type.basetype == SPIRType::Int64 || type.basetype == SPIRType::UInt64)
			{
				if (options.es)
					SPIRV_CROSS_THROW("64-bit integers not supported in ES profile.");
				if (!options.es)
					require_extension_internal("GL_ARB_gpu_shader_int64");
			}

			if (type.basetype == SPIRType::Half)
				require_extension_internal("GL_AMD_gpu_shader_half_float");
		}
	}

	auto &execution = get_entry_point();
	switch (execution.model)
	{
	case ExecutionModelGLCompute:
		if (!options.es && options.version < 430)
			require_extension_internal("GL_ARB_compute_shader");
		if (options.es && options.version < 310)
			SPIRV_CROSS_THROW("At least ESSL 3.10 required for compute shaders.");
		break;

	case ExecutionModelGeometry:
		if (options.es && options.version < 320)
			require_extension_internal("GL_EXT_geometry_shader");
		if (!options.es && options.version < 150)
			require_extension_internal("GL_ARB_geometry_shader4");

		if (execution.flags.get(ExecutionModeInvocations) && execution.invocations != 1)
		{
			// Instanced GS is part of 400 core or this extension.
			if (!options.es && options.version < 400)
				require_extension_internal("GL_ARB_gpu_shader5");
		}
		break;

	case ExecutionModelTessellationEvaluation:
	case ExecutionModelTessellationControl:
		if (options.es && options.version < 320)
			require_extension_internal("GL_EXT_tessellation_shader");
		if (!options.es && options.version < 400)
			require_extension_internal("GL_ARB_tessellation_shader");
		break;

	default:
		break;
	}

	if (!pls_inputs.empty() || !pls_outputs.empty())
		require_extension_internal("GL_EXT_shader_pixel_local_storage");

	if (options.separate_shader_objects && !options.es && options.version < 410)
		require_extension_internal("GL_ARB_separate_shader_objects");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x20(%rdi), %r14
movq 0x28(%rdi), %r15
leaq 0x8(%rsp), %r12
leaq 0x7(%rsp), %r13
cmpq %r15, %r14
je 0x20f8f
cmpl $0x1, 0x8(%r14)
jne 0x20f86
movq %r14, %rdi
callq 0x998c
movq %rax, %rbp
movl 0xc(%rax), %eax
cmpl $0xb, %eax
jne 0x20f1d
cmpb $0x1, 0x43c(%rbx)
je 0x21290
cmpl $0x18f, 0x438(%rbx)     # imm = 0x18F
ja 0x20f86
movq %r12, %rdi
leaq 0x70634(%rip), %rsi     # 0x91533
movq %r13, %rdx
callq 0x6100
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21390
movq %r12, %rdi
callq 0x6548
movl 0xc(%rbp), %eax
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0x6, %ecx
jne 0x20f5c
cmpb $0x1, 0x43c(%rbx)
je 0x212db
movq %r12, %rdi
leaq 0x70639(%rip), %rsi     # 0x91577
movq %r13, %rdx
callq 0x6100
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21390
movq %r12, %rdi
callq 0x6548
movl 0xc(%rbp), %eax
cmpl $0x9, %eax
jne 0x20f86
movq %r12, %rdi
leaq 0x70624(%rip), %rsi     # 0x9158f
movq %r13, %rdx
callq 0x6100
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21390
movq %r12, %rdi
callq 0x6548
addq $0x10, %r14
jmp 0x20eb1
movq %rbx, %rdi
callq 0x12fa4
movq %rax, %r14
movl 0xb8(%rax), %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x21071
cmpl $0x3, %eax
je 0x211a5
cmpl $0x5, %eax
jne 0x210fe
movb 0x43c(%rbx), %cl
movl 0x438(%rbx), %eax
cmpl $0x1ae, %eax            # imm = 0x1AE
setae %dl
orb %cl, %dl
jne 0x2100f
leaq 0x705cf(%rip), %rsi     # 0x915ac
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6100
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x21390
leaq 0x8(%rsp), %rdi
callq 0x6548
movb 0x43c(%rbx), %cl
movl 0x438(%rbx), %eax
testb $0x1, %cl
je 0x210fe
cmpl $0x135, %eax            # imm = 0x135
ja 0x210fe
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %r14
leaq 0x7058d(%rip), %rsi     # 0x915c2
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 0xc5d63(%rip), %rsi     # 0xe6dc0
movq 0xc6f7c(%rip), %rdx     # 0xe7fe0
movq %r14, %rdi
callq 0x6490
jmp 0x21324
movb 0x43c(%rbx), %cl
movl 0x438(%rbx), %eax
cmpl $0x140, %eax            # imm = 0x140
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x210c5
leaq 0x705a2(%rip), %rsi     # 0x91635
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6100
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x21390
leaq 0x8(%rsp), %rdi
callq 0x6548
movb 0x43c(%rbx), %cl
movl 0x438(%rbx), %eax
testb $0x1, %cl
jne 0x210fe
cmpl $0x18f, %eax            # imm = 0x18F
ja 0x210fe
leaq 0x70578(%rip), %rsi     # 0x91650
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6100
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x21390
leaq 0x8(%rsp), %rdi
callq 0x6548
movq 0x758(%rbx), %rax
cmpq 0x760(%rbx), %rax
jne 0x2111e
movq 0x770(%rbx), %rax
cmpq 0x778(%rbx), %rax
je 0x2114b
leaq 0x70546(%rip), %rsi     # 0x9166b
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6100
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x21390
leaq 0x8(%rsp), %rdi
callq 0x6548
cmpb $0x1, 0x43f(%rbx)
jne 0x21196
cmpb $0x0, 0x43c(%rbx)
jne 0x21196
cmpl $0x199, 0x438(%rbx)     # imm = 0x199
ja 0x21196
leaq 0x7051d(%rip), %rsi     # 0x9168d
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6100
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x21390
leaq 0x8(%rsp), %rdi
callq 0x6548
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb 0x43c(%rbx), %cl
movl 0x438(%rbx), %eax
cmpl $0x140, %eax            # imm = 0x140
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x211f9
leaq 0x7042c(%rip), %rsi     # 0x915f3
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6100
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x21390
leaq 0x8(%rsp), %rdi
callq 0x6548
movb 0x43c(%rbx), %cl
movl 0x438(%rbx), %eax
testb $0x1, %cl
jne 0x21232
cmpl $0x95, %eax
ja 0x21232
leaq 0x703fe(%rip), %rsi     # 0x9160a
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6100
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x21390
leaq 0x8(%rsp), %rdi
callq 0x6548
testb $0x1, 0x60(%r14)
je 0x210fe
cmpl $0x1, 0xb0(%r14)
je 0x210fe
cmpb $0x0, 0x43c(%rbx)
jne 0x210fe
cmpl $0x18f, 0x438(%rbx)     # imm = 0x18F
ja 0x210fe
leaq 0x703b3(%rip), %rsi     # 0x91622
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6100
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x21390
jmp 0x210f4
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %r14
leaq 0x7026f(%rip), %rsi     # 0x91511
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 0xc5af6(%rip), %rsi     # 0xe6dc0
movq 0xc6d0f(%rip), %rdx     # 0xe7fe0
movq %r14, %rdi
callq 0x6490
jmp 0x21324
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %r14
leaq 0x7025d(%rip), %rsi     # 0x9154a
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 0xc5aab(%rip), %rsi     # 0xe6dc0
movq 0xc6cc4(%rip), %rdx     # 0xe7fe0
movq %r14, %rdi
callq 0x6490
jmp 0x21375
jmp 0x21384
jmp 0x21375
jmp 0x21384
jmp 0x21375
jmp 0x21375
jmp 0x21384
jmp 0x2134c
jmp 0x21360
jmp 0x21384
jmp 0x21375
jmp 0x21384
jmp 0x21375
jmp 0x21384
jmp 0x21375
jmp 0x21384
jmp 0x21375
jmp 0x21384
jmp 0x2134c
jmp 0x21360
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x21363
jmp 0x21387
movq %rax, %rbx
movq %r14, %rdi
callq 0x6200
jmp 0x21387
jmp 0x21375
jmp 0x21384
jmp 0x21375
jmp 0x21384
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6548
jmp 0x21387
movq %rax, %rbx
movq %rbx, %rdi
callq 0x64b0
nop