// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/program.c
// Function: GetProgram
static int GetProgram(lua_State *L)
    {
#define BOOLEAN return GetBoolean(L, program, pname);
#define INTEGER return GetInteger(L, program, pname);
#define INTEGER3 return GetInteger3(L, program, pname);
#define ENUM(e) return GetEnum(L, program, pname, e);
    GLuint program = luaL_checkinteger(L, 1);
    GLenum pname = checkprogrampname(L, 2);
    switch(pname)
        {
        case GL_ACTIVE_ATOMIC_COUNTER_BUFFERS: INTEGER
        case GL_ACTIVE_ATTRIBUTES: INTEGER
        case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH: INTEGER
        case GL_ACTIVE_UNIFORMS: INTEGER
        case GL_ACTIVE_UNIFORM_BLOCKS: INTEGER
        case GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH: INTEGER
        case GL_ACTIVE_UNIFORM_MAX_LENGTH: INTEGER
        case GL_ATTACHED_SHADERS: INTEGER
        case GL_VALIDATE_STATUS: BOOLEAN
        case GL_COMPUTE_WORK_GROUP_SIZE: INTEGER3
        case GL_DELETE_STATUS: BOOLEAN
        case GL_GEOMETRY_INPUT_TYPE: ENUM(DOMAIN_GEOMETRY_INPUT_TYPE)
        case GL_GEOMETRY_OUTPUT_TYPE:  ENUM(DOMAIN_GEOMETRY_OUTPUT_TYPE)
        case GL_GEOMETRY_SHADER_INVOCATIONS: INTEGER
        case GL_GEOMETRY_VERTICES_OUT: INTEGER
        case GL_INFO_LOG_LENGTH: INTEGER
        case GL_LINK_STATUS: BOOLEAN
        case GL_PROGRAM_SEPARABLE: BOOLEAN
        case GL_PROGRAM_BINARY_RETRIEVABLE_HINT: BOOLEAN
        case GL_TESS_CONTROL_OUTPUT_VERTICES: INTEGER
        case GL_TESS_GEN_MODE: ENUM(DOMAIN_TESS_GEN_MODE)
        case GL_TESS_GEN_SPACING: ENUM(DOMAIN_TESS_GEN_SPACING)
        case GL_TESS_GEN_VERTEX_ORDER: ENUM(DOMAIN_TESS_GEN_VERTEX_ORDER)
        case GL_TESS_GEN_POINT_MODE: BOOLEAN
        case GL_PROGRAM_BINARY_LENGTH: INTEGER
        case GL_TRANSFORM_FEEDBACK_BUFFER_MODE: ENUM(DOMAIN_BUFFER_MODE)
        case GL_TRANSFORM_FEEDBACK_VARYINGS: INTEGER
        case GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH: INTEGER
        default: return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
#undef ENUM
#undef BOOLEAN
#undef INTEGER
#undef INTEGER3
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x11af0
movq %rax, %r15
pushq $0x8
popq %rsi
pushq $0x2
popq %rdx
movq %r14, %rdi
callq 0x11150
leal -0x8b80(%rax), %ecx
cmpl $0xa, %ecx
jbe 0x31008
leal -0x8e75(%rax), %ecx
cmpl $0x4, %ecx
jbe 0x31028
cmpl $0x8257, %eax           # imm = 0x8257
je 0x310ee
cmpl $0x8258, %eax           # imm = 0x8258
je 0x311fd
cmpl $0x8267, %eax           # imm = 0x8267
je 0x3112e
cmpl $0x8741, %eax           # imm = 0x8741
je 0x310fe
cmpl $0x887f, %eax           # imm = 0x887F
je 0x3121c
cmpl $0x8916, %eax           # imm = 0x8916
je 0x3117a
cmpl $0x8917, %eax           # imm = 0x8917
je 0x31238
cmpl $0x8918, %eax           # imm = 0x8918
je 0x311d0
cmpl $0x8a35, %eax           # imm = 0x8A35
je 0x3120f
cmpl $0x8a36, %eax           # imm = 0x8A36
je 0x311f0
cmpl $0x8c76, %eax           # imm = 0x8C76
je 0x3110e
cmpl $0x8c7f, %eax           # imm = 0x8C7F
je 0x311ad
cmpl $0x8c83, %eax           # imm = 0x8C83
je 0x3118a
cmpl $0x92d9, %eax           # imm = 0x92D9
jne 0x31048
movq %r14, %rdi
movl %r15d, %esi
movl $0x92d9, %edx           # imm = 0x92D9
jmp 0x31227
leaq 0x15d8d(%rip), %rax     # 0x46d9c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %r14, %rdi
movl %r15d, %esi
movl $0x8b80, %edx           # imm = 0x8B80
jmp 0x31208
leaq 0x15d99(%rip), %rax     # 0x46dc8
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %r14, %rdi
movl %r15d, %esi
movl $0x8e75, %edx           # imm = 0x8E75
jmp 0x31227
leaq 0xa236(%rip), %rsi      # 0x3b285
leaq 0x15e8d(%rip), %rdx     # 0x46ee3
movq %r14, %rdi
movl $0xe0, %ecx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x11ae0
movq %r14, %rdi
movl %r15d, %esi
movl $0x8b89, %edx           # imm = 0x8B89
jmp 0x31227
movq %r14, %rdi
movl %r15d, %esi
movl $0x8b84, %edx           # imm = 0x8B84
jmp 0x31227
movq %r14, %rdi
movl %r15d, %esi
movl $0x8b87, %edx           # imm = 0x8B87
jmp 0x31227
movq %r14, %rdi
movl %r15d, %esi
movl $0x8b85, %edx           # imm = 0x8B85
jmp 0x31227
movq %r14, %rdi
movl %r15d, %esi
movl $0x8b82, %edx           # imm = 0x8B82
jmp 0x31208
movq %r14, %rdi
movl %r15d, %esi
movl $0x8b8a, %edx           # imm = 0x8B8A
jmp 0x31227
movq %r14, %rdi
movl %r15d, %esi
movl $0x8b86, %edx           # imm = 0x8B86
jmp 0x31227
movq %r14, %rdi
movl %r15d, %esi
movl $0x8b83, %edx           # imm = 0x8B83
jmp 0x31208
movq %r14, %rdi
movl %r15d, %esi
movl $0x8257, %edx           # imm = 0x8257
jmp 0x31208
movq %r14, %rdi
movl %r15d, %esi
movl $0x8741, %edx           # imm = 0x8741
jmp 0x31227
movq %r14, %rdi
movl %r15d, %esi
movl $0x8c76, %edx           # imm = 0x8C76
jmp 0x31227
movq %r14, %rdi
movl %r15d, %esi
movl $0x8e79, %edx           # imm = 0x8E79
jmp 0x31208
movq 0x24c1b(%rip), %rax     # 0x55d50
leaq 0x4(%rsp), %rbx
movl %r15d, %edi
movl $0x8267, %esi           # imm = 0x8267
movq %rbx, %rdx
callq *(%rax)
movq %r14, %rdi
callq 0x11870
movslq (%rbx), %rsi
movq %r14, %rdi
callq 0x113b0
movslq 0x4(%rbx), %rsi
movq %r14, %rdi
callq 0x113b0
movslq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x113b0
pushq $0x3
popq %rbx
jmp 0x3122c
movq %r14, %rdi
movl %r15d, %esi
movl $0x8916, %edx           # imm = 0x8916
jmp 0x31227
movq %r14, %rdi
movl %r15d, %esi
movl $0x8c83, %edx           # imm = 0x8C83
jmp 0x31227
pushq $0x55
popq %rcx
movq %r14, %rdi
movl %r15d, %esi
movl $0x8e77, %edx           # imm = 0x8E77
jmp 0x31246
pushq $0x57
popq %rcx
movq %r14, %rdi
movl %r15d, %esi
movl $0x8c7f, %edx           # imm = 0x8C7F
jmp 0x31246
pushq $0x56
popq %rcx
movq %r14, %rdi
movl %r15d, %esi
movl $0x8e78, %edx           # imm = 0x8E78
jmp 0x31246
pushq $0x53
popq %rcx
movq %r14, %rdi
movl %r15d, %esi
movl $0x8918, %edx           # imm = 0x8918
jmp 0x31246
pushq $0x54
popq %rcx
movq %r14, %rdi
movl %r15d, %esi
movl $0x8e76, %edx           # imm = 0x8E76
jmp 0x31246
movq %r14, %rdi
movl %r15d, %esi
movl $0x8a36, %edx           # imm = 0x8A36
jmp 0x31227
movq %r14, %rdi
movl %r15d, %esi
movl $0x8258, %edx           # imm = 0x8258
callq 0x313e3
jmp 0x3122c
movq %r14, %rdi
movl %r15d, %esi
movl $0x8a35, %edx           # imm = 0x8A35
jmp 0x31227
movq %r14, %rdi
movl %r15d, %esi
movl $0x887f, %edx           # imm = 0x887F
callq 0x313ac
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
pushq $0x52
popq %rcx
movq %r14, %rdi
movl %r15d, %esi
movl $0x8917, %edx           # imm = 0x8917
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x31421