// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/glbuild.c
// Function: enumerate_configure
static void enumerate_configure(const char *ext) {
	if (!Bstrcmp(ext, "GL_EXT_texture_filter_anisotropic")) {
			// supports anisotropy. get the maximum anisotropy level
#ifdef GL_EXT_texture_filter_anisotropic
		glfunc.glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &glinfo.maxanisotropy);
#endif
	} else if (!Bstrcmp(ext, "GL_EXT_texture_edge_clamp") ||
			!Bstrcmp(ext, "GL_SGIS_texture_edge_clamp")) {
			// supports GL_CLAMP_TO_EDGE
		glinfo.clamptoedge = 1;
	} else if (!Bstrcmp(ext, "GL_EXT_bgra") ||
			!Bstrcmp(ext, "GL_EXT_texture_format_BGRA8888")) {
			// support bgra textures
		glinfo.bgra = 1;
	} else if (!Bstrcmp(ext, "GL_EXT_texture_compression_s3tc")) {
			// support DXT1 and DXT5 texture compression
		glinfo.texcomprdxt1 = 1;
		glinfo.texcomprdxt5 = 1;
	} else if (!Bstrcmp(ext, "GL_EXT_texture_compression_dxt1")) {
			// support DXT1 texture compression
		glinfo.texcomprdxt1 = 1;
	} else if (!Bstrcmp(ext, "GL_OES_compressed_ETC1_RGB8_texture")) {
			// support ETC1 texture compression
		glinfo.texcompretc1 = 1;
	} else if (!Bstrcmp(ext, "GL_ARB_texture_non_power_of_two") ||
			!Bstrcmp(ext, "GL_OES_texture_npot")) {
			// support non-power-of-two texture sizes
		glinfo.texnpot = 1;
	} else if (!Bstrcmp(ext, "GL_ARB_multisample")) {
			// supports multisampling
		glinfo.multisample = 1;
	} else if (!Bstrcmp(ext, "GL_NV_multisample_filter_hint")) {
			// supports nvidia's multisample hint extension
		glinfo.nvmultisamplehint = 1;
	} else if (!Bstrcmp(ext, "GL_ARB_sample_shading")) {
			// supports sample shading extension
		glinfo.sampleshading = 1;
	} else if (!strcmp(ext, "GL_ARB_shading_language_100")) {
		const char *ver;

		// Clear the error queue, then query the version string.
		while (glfunc.glGetError() != GL_NO_ERROR) { }
		ver = (const char *) glfunc.glGetString(GL_SHADING_LANGUAGE_VERSION);

		if (!ver && glfunc.glGetError() == GL_INVALID_ENUM) {
			// GLSL 1.00 (1.051).
			glinfo.glslmajver = 1;
			glinfo.glslminver = 0;
		} else if (ver) {
			// GLSL 1.10 or newer.
			sscanf(ver, "%d.%d", &glinfo.glslmajver, &glinfo.glslminver);
		}
#ifdef GL_KHR_debug
	} else if (!strcmp(ext, "GL_KHR_debug") && glinfo.debugext < 2) {
		glinfo.debugext = 2;
#endif
#ifdef GL_ARB_debug_output
	} else if (!strcmp(ext, "GL_ARB_debug_output") && glinfo.debugext < 1) {
		glinfo.debugext = 1;
#endif
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2ae55(%rip), %rsi     # 0x79d3f
callq 0x68d0
testl %eax, %eax
je 0x4f067
leaq 0x2ae63(%rip), %rsi     # 0x79d61
movq %rbx, %rdi
callq 0x68d0
testl %eax, %eax
je 0x4f05a
leaq 0x2ae66(%rip), %rsi     # 0x79d7b
movq %rbx, %rdi
callq 0x68d0
testl %eax, %eax
je 0x4f05a
leaq 0x2ae6a(%rip), %rsi     # 0x79d96
movq %rbx, %rdi
callq 0x68d0
testl %eax, %eax
je 0x4f084
leaq 0x2ae5f(%rip), %rsi     # 0x79da2
movq %rbx, %rdi
callq 0x68d0
testl %eax, %eax
je 0x4f084
leaq 0x2ae67(%rip), %rsi     # 0x79dc1
movq %rbx, %rdi
callq 0x68d0
testl %eax, %eax
je 0x4f094
leaq 0x2ae70(%rip), %rsi     # 0x79de1
movq %rbx, %rdi
callq 0x68d0
testl %eax, %eax
je 0x4f0e5
leaq 0x2ae79(%rip), %rsi     # 0x79e01
movq %rbx, %rdi
callq 0x68d0
testl %eax, %eax
je 0x4f0ff
leaq 0x2ae86(%rip), %rsi     # 0x79e25
movq %rbx, %rdi
callq 0x68d0
testl %eax, %eax
je 0x4f0f2
leaq 0x2ae8f(%rip), %rsi     # 0x79e45
movq %rbx, %rdi
callq 0x68d0
testl %eax, %eax
je 0x4f0f2
leaq 0x2ae8c(%rip), %rsi     # 0x79e59
movq %rbx, %rdi
callq 0x68d0
testl %eax, %eax
je 0x4f10c
leaq 0x2ae88(%rip), %rsi     # 0x79e6c
movq %rbx, %rdi
callq 0x68d0
testl %eax, %eax
je 0x4f11c
leaq 0x2ae8f(%rip), %rsi     # 0x79e8a
movq %rbx, %rdi
callq 0x68d0
testl %eax, %eax
je 0x4f12c
leaq 0x2ae8e(%rip), %rsi     # 0x79ea0
movq %rbx, %rdi
callq 0x68d0
testl %eax, %eax
je 0x4f0a3
leaq 0x2ae93(%rip), %rsi     # 0x79ebc
movq %rbx, %rdi
callq 0x68d0
testl %eax, %eax
sete %al
leaq 0x12f213(%rip), %r14    # 0x17e250
movb 0x30(%r14), %bpl
cmpb $0x2, %bpl
setl %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x4f13c
movb $0x2, 0x30(%r14)
jmp 0x4f08f
leaq 0x12f1ef(%rip), %rax    # 0x17e250
movb $0x1, 0x19(%rax)
jmp 0x4f08f
movq 0x5ab722(%rip), %rax    # 0x5fa790
leaq 0x12f1db(%rip), %rsi    # 0x17e250
addq $0x14, %rsi
movl $0x84ff, %edi           # imm = 0x84FF
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
leaq 0x12f1c5(%rip), %rax    # 0x17e250
movb $0x1, 0x18(%rax)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x12f1b5(%rip), %rax    # 0x17e250
movw $0x101, 0x1a(%rax)      # imm = 0x101
jmp 0x4f08f
callq *0x5ab6ff(%rip)         # 0x5fa7a8
testl %eax, %eax
jne 0x4f0a3
movl $0x8b8c, %edi           # imm = 0x8B8C
callq *0x5ab6e8(%rip)         # 0x5fa7a0
testq %rax, %rax
je 0x4f16b
leaq 0x12f188(%rip), %rcx    # 0x17e250
leaq 0xc(%rcx), %rdx
addq $0x10, %rcx
leaq 0x28047(%rip), %rsi     # 0x7711e
movq %rax, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x60f0
leaq 0x12f164(%rip), %rax    # 0x17e250
movb $0x1, 0x1a(%rax)
jmp 0x4f08f
leaq 0x12f157(%rip), %rax    # 0x17e250
movb $0x1, 0x1d(%rax)
jmp 0x4f08f
leaq 0x12f14a(%rip), %rax    # 0x17e250
movb $0x1, 0x1c(%rax)
jmp 0x4f08f
leaq 0x12f13d(%rip), %rax    # 0x17e250
movb $0x1, 0x1e(%rax)
jmp 0x4f08f
leaq 0x12f12d(%rip), %rax    # 0x17e250
movb $0x1, 0x1f(%rax)
jmp 0x4f08f
leaq 0x12f11d(%rip), %rax    # 0x17e250
movb $0x1, 0x20(%rax)
jmp 0x4f08f
leaq 0x2ad86(%rip), %rsi     # 0x79ec9
movq %rbx, %rdi
callq 0x68d0
testl %eax, %eax
sete %al
testb %bpl, %bpl
setle %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x4f08f
movb $0x1, 0x30(%r14)
jmp 0x4f08f
callq *0x5ab637(%rip)         # 0x5fa7a8
cmpl $0x500, %eax            # imm = 0x500
jne 0x4f08f
leaq 0x12f0cd(%rip), %rax    # 0x17e250
movq $0x1, 0xc(%rax)
jmp 0x4f08f