// File: 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
movq %rsp, %rbp
subq $0x310, %rsp            # imm = 0x310
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x280(%rbp)
addq $0x8, %rax
addq $0x18, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xf940
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xf970
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xf9a0
testb $0x1, %al
jne 0x57de6
jmp 0x5820a
leaq -0x18(%rbp), %rdi
callq 0xf9e0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0xfa00
cmpl $0x1, %eax
jne 0x581fa
movq -0x28(%rbp), %rdi
callq 0xfa20
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0xb, 0xc(%rax)
jne 0x57fae
movq -0x280(%rbp), %rax
testb $0x1, 0x43c(%rax)
je 0x57eec
movb $0x1, -0x65(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x290(%rbp)
leaq -0x51(%rbp), %rdi
movq %rdi, -0x288(%rbp)
callq 0x7650
movq -0x288(%rbp), %rdx
leaq 0xe8bae(%rip), %rsi     # 0x140a15
leaq -0x50(%rbp), %rdi
callq 0x7520
jmp 0x57e72
movq -0x290(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x9c50
jmp 0x57e84
movq -0x290(%rbp), %rdi
movb $0x0, -0x65(%rbp)
leaq 0x155f42(%rip), %rsi    # 0x1addd8
leaq -0x4e20d(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0x589c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x57eca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x7708
leaq -0x51(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x65(%rbp)
jne 0x57edb
jmp 0x57ee7
movq -0x290(%rbp), %rdi
callq 0x72c0
jmp 0x589bc
movq -0x280(%rbp), %rax
testb $0x1, 0x43c(%rax)
jne 0x57fac
movq -0x280(%rbp), %rax
cmpl $0x190, 0x438(%rax)     # imm = 0x190
jae 0x57fac
leaq -0x89(%rbp), %rdi
movq %rdi, -0x298(%rbp)
callq 0x7650
movq -0x298(%rbp), %rdx
leaq 0xe8aff(%rip), %rsi     # 0x140a37
leaq -0x88(%rbp), %rdi
callq 0x7520
jmp 0x57f46
movq -0x280(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x589d0
jmp 0x57f5b
leaq -0x88(%rbp), %rdi
callq 0x7708
leaq -0x89(%rbp), %rdi
callq 0x73d0
jmp 0x57fac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x57f9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x7708
leaq -0x89(%rbp), %rdi
callq 0x73d0
jmp 0x589bc
jmp 0x57fae
movq -0x30(%rbp), %rax
cmpl $0x6, 0xc(%rax)
je 0x57fc6
movq -0x30(%rbp), %rax
cmpl $0x7, 0xc(%rax)
jne 0x58155
movq -0x280(%rbp), %rax
testb $0x1, 0x43c(%rax)
je 0x580aa
movb $0x1, -0xb2(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x2a8(%rbp)
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
callq 0x7650
movq -0x2a0(%rbp), %rdx
leaq 0xe8a3b(%rip), %rsi     # 0x140a4e
leaq -0xb0(%rbp), %rdi
callq 0x7520
jmp 0x58021
movq -0x2a8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x9c50
jmp 0x58036
movq -0x2a8(%rbp), %rdi
movb $0x0, -0xb2(%rbp)
leaq 0x155d8d(%rip), %rsi    # 0x1addd8
leaq -0x4e3c2(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0x589c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x58082
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x7708
leaq -0xb1(%rbp), %rdi
callq 0x73d0
testb $0x1, -0xb2(%rbp)
jne 0x58099
jmp 0x580a5
movq -0x2a8(%rbp), %rdi
callq 0x72c0
jmp 0x589bc
movq -0x280(%rbp), %rax
testb $0x1, 0x43c(%rax)
jne 0x58153
leaq -0xd9(%rbp), %rdi
movq %rdi, -0x2b0(%rbp)
callq 0x7650
movq -0x2b0(%rbp), %rdx
leaq 0xe899c(%rip), %rsi     # 0x140a7b
leaq -0xd8(%rbp), %rdi
callq 0x7520
jmp 0x580ed
movq -0x280(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x589d0
jmp 0x58102
leaq -0xd8(%rbp), %rdi
callq 0x7708
leaq -0xd9(%rbp), %rdi
callq 0x73d0
jmp 0x58153
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x58142
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x7708
leaq -0xd9(%rbp), %rdi
callq 0x73d0
jmp 0x589bc
jmp 0x58155
movq -0x30(%rbp), %rax
cmpl $0x9, 0xc(%rax)
jne 0x581f8
leaq -0x101(%rbp), %rdi
movq %rdi, -0x2b8(%rbp)
callq 0x7650
movq -0x2b8(%rbp), %rdx
leaq 0xe890f(%rip), %rsi     # 0x140a93
leaq -0x100(%rbp), %rdi
callq 0x7520
jmp 0x58192
movq -0x280(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x589d0
jmp 0x581a7
leaq -0x100(%rbp), %rdi
callq 0x7708
leaq -0x101(%rbp), %rdi
callq 0x73d0
jmp 0x581f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x581e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x7708
leaq -0x101(%rbp), %rdi
callq 0x73d0
jmp 0x589bc
jmp 0x581fa
jmp 0x581fc
leaq -0x18(%rbp), %rdi
callq 0xfbd0
jmp 0x57dd0
movq -0x280(%rbp), %rdi
callq 0x25150
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movl 0xb8(%rax), %eax
movl %eax, -0x2bc(%rbp)
decl %eax
subl $0x2, %eax
jb 0x58695
jmp 0x5823d
movl -0x2bc(%rbp), %eax
subl $0x3, %eax
je 0x5841f
jmp 0x5824e
movl -0x2bc(%rbp), %eax
subl $0x5, %eax
jne 0x58817
jmp 0x5825f
movq -0x280(%rbp), %rax
testb $0x1, 0x43c(%rax)
jne 0x5831f
movq -0x280(%rbp), %rax
cmpl $0x1ae, 0x438(%rax)     # imm = 0x1AE
jae 0x5831f
leaq -0x131(%rbp), %rdi
movq %rdi, -0x2c8(%rbp)
callq 0x7650
movq -0x2c8(%rbp), %rdx
leaq 0xe8805(%rip), %rsi     # 0x140ab0
leaq -0x130(%rbp), %rdi
callq 0x7520
jmp 0x582b9
movq -0x280(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x589d0
jmp 0x582ce
leaq -0x130(%rbp), %rdi
callq 0x7708
leaq -0x131(%rbp), %rdi
callq 0x73d0
jmp 0x5831f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5830e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x7708
leaq -0x131(%rbp), %rdi
callq 0x73d0
jmp 0x589bc
movq -0x280(%rbp), %rax
testb $0x1, 0x43c(%rax)
je 0x5841a
movq -0x280(%rbp), %rax
cmpl $0x136, 0x438(%rax)     # imm = 0x136
jae 0x5841a
movb $0x1, -0x15a(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x2d8(%rbp)
leaq -0x159(%rbp), %rdi
movq %rdi, -0x2d0(%rbp)
callq 0x7650
movq -0x2d0(%rbp), %rdx
leaq 0xe8743(%rip), %rsi     # 0x140ac6
leaq -0x158(%rbp), %rdi
callq 0x7520
jmp 0x58391
movq -0x2d8(%rbp), %rdi
leaq -0x158(%rbp), %rsi
callq 0x9c50
jmp 0x583a6
movq -0x2d8(%rbp), %rdi
movb $0x0, -0x15a(%rbp)
leaq 0x155a1d(%rip), %rsi    # 0x1addd8
leaq -0x4e732(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0x589c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x583f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x7708
leaq -0x159(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x15a(%rbp)
jne 0x58409
jmp 0x58415
movq -0x2d8(%rbp), %rdi
callq 0x72c0
jmp 0x589bc
jmp 0x58819
movq -0x280(%rbp), %rax
testb $0x1, 0x43c(%rax)
je 0x584df
movq -0x280(%rbp), %rax
cmpl $0x140, 0x438(%rax)     # imm = 0x140
jae 0x584df
leaq -0x181(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x7650
movq -0x2e0(%rbp), %rdx
leaq 0xe868c(%rip), %rsi     # 0x140af7
leaq -0x180(%rbp), %rdi
callq 0x7520
jmp 0x58479
movq -0x280(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x589d0
jmp 0x5848e
leaq -0x180(%rbp), %rdi
callq 0x7708
leaq -0x181(%rbp), %rdi
callq 0x73d0
jmp 0x584df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x584ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x7708
leaq -0x181(%rbp), %rdi
callq 0x73d0
jmp 0x589bc
movq -0x280(%rbp), %rax
testb $0x1, 0x43c(%rax)
jne 0x5859f
movq -0x280(%rbp), %rax
cmpl $0x96, 0x438(%rax)
jae 0x5859f
leaq -0x1a9(%rbp), %rdi
movq %rdi, -0x2e8(%rbp)
callq 0x7650
movq -0x2e8(%rbp), %rdx
leaq 0xe85e3(%rip), %rsi     # 0x140b0e
leaq -0x1a8(%rbp), %rdi
callq 0x7520
jmp 0x58539
movq -0x280(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x589d0
jmp 0x5854e
leaq -0x1a8(%rbp), %rdi
callq 0x7708
leaq -0x1a9(%rbp), %rdi
callq 0x73d0
jmp 0x5859f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5858e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x7708
leaq -0x1a9(%rbp), %rdi
callq 0x73d0
jmp 0x589bc
movq -0x110(%rbp), %rdi
addq $0x60, %rdi
xorl %esi, %esi
callq 0xef50
testb $0x1, %al
jne 0x585ba
jmp 0x58690
movq -0x110(%rbp), %rax
cmpl $0x1, 0xb0(%rax)
je 0x58690
movq -0x280(%rbp), %rax
testb $0x1, 0x43c(%rax)
jne 0x5868e
movq -0x280(%rbp), %rax
cmpl $0x190, 0x438(%rax)     # imm = 0x190
jae 0x5868e
leaq -0x1d1(%rbp), %rdi
movq %rdi, -0x2f0(%rbp)
callq 0x7650
movq -0x2f0(%rbp), %rdx
leaq 0xe850c(%rip), %rsi     # 0x140b26
leaq -0x1d0(%rbp), %rdi
callq 0x7520
jmp 0x58628
movq -0x280(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x589d0
jmp 0x5863d
leaq -0x1d0(%rbp), %rdi
callq 0x7708
leaq -0x1d1(%rbp), %rdi
callq 0x73d0
jmp 0x5868e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5867d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x7708
leaq -0x1d1(%rbp), %rdi
callq 0x73d0
jmp 0x589bc
jmp 0x58690
jmp 0x58819
movq -0x280(%rbp), %rax
testb $0x1, 0x43c(%rax)
je 0x58755
movq -0x280(%rbp), %rax
cmpl $0x140, 0x438(%rax)     # imm = 0x140
jae 0x58755
leaq -0x1f9(%rbp), %rdi
movq %rdi, -0x2f8(%rbp)
callq 0x7650
movq -0x2f8(%rbp), %rdx
leaq 0xe8458(%rip), %rsi     # 0x140b39
leaq -0x1f8(%rbp), %rdi
callq 0x7520
jmp 0x586ef
movq -0x280(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x589d0
jmp 0x58704
leaq -0x1f8(%rbp), %rdi
callq 0x7708
leaq -0x1f9(%rbp), %rdi
callq 0x73d0
jmp 0x58755
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x58744
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x7708
leaq -0x1f9(%rbp), %rdi
callq 0x73d0
jmp 0x589bc
movq -0x280(%rbp), %rax
testb $0x1, 0x43c(%rax)
jne 0x58815
movq -0x280(%rbp), %rax
cmpl $0x190, 0x438(%rax)     # imm = 0x190
jae 0x58815
leaq -0x221(%rbp), %rdi
movq %rdi, -0x300(%rbp)
callq 0x7650
movq -0x300(%rbp), %rdx
leaq 0xe83b3(%rip), %rsi     # 0x140b54
leaq -0x220(%rbp), %rdi
callq 0x7520
jmp 0x587af
movq -0x280(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x589d0
jmp 0x587c4
leaq -0x220(%rbp), %rdi
callq 0x7708
leaq -0x221(%rbp), %rdi
callq 0x73d0
jmp 0x58815
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x58804
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x7708
leaq -0x221(%rbp), %rdi
callq 0x73d0
jmp 0x589bc
jmp 0x58819
jmp 0x58819
movq -0x280(%rbp), %rdi
addq $0x758, %rdi            # imm = 0x758
callq 0x9e330
testb $0x1, %al
jne 0x58832
jmp 0x5884d
movq -0x280(%rbp), %rdi
addq $0x770, %rdi            # imm = 0x770
callq 0x9e330
testb $0x1, %al
jne 0x588e2
leaq -0x249(%rbp), %rdi
movq %rdi, -0x308(%rbp)
callq 0x7650
movq -0x308(%rbp), %rdx
leaq 0xe8301(%rip), %rsi     # 0x140b6f
leaq -0x248(%rbp), %rdi
callq 0x7520
jmp 0x5887c
movq -0x280(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x589d0
jmp 0x58891
leaq -0x248(%rbp), %rdi
callq 0x7708
leaq -0x249(%rbp), %rdi
callq 0x73d0
jmp 0x588e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x588d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x7708
leaq -0x249(%rbp), %rdi
callq 0x73d0
jmp 0x589bc
movq -0x280(%rbp), %rax
testb $0x1, 0x43f(%rax)
je 0x589b3
movq -0x280(%rbp), %rax
testb $0x1, 0x43c(%rax)
jne 0x589b3
movq -0x280(%rbp), %rax
cmpl $0x19a, 0x438(%rax)     # imm = 0x19A
jae 0x589b3
leaq -0x271(%rbp), %rdi
movq %rdi, -0x310(%rbp)
callq 0x7650
movq -0x310(%rbp), %rdx
leaq 0xe824f(%rip), %rsi     # 0x140b91
leaq -0x270(%rbp), %rdi
callq 0x7520
jmp 0x58950
movq -0x280(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0x589d0
jmp 0x58965
leaq -0x270(%rbp), %rdi
callq 0x7708
leaq -0x271(%rbp), %rdi
callq 0x73d0
jmp 0x589b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x589a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x270(%rbp), %rdi
callq 0x7708
leaq -0x271(%rbp), %rdi
callq 0x73d0
jmp 0x589bc
addq $0x310, %rsp            # imm = 0x310
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x7640
nopw %cs:(%rax,%rax)