// File: /workspace/github_c_makefile_star2_O3/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, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x8, %esi
movl $0x2, %edx
callq 0x11150
cmpl $0x8b7f, %eax           # imm = 0x8B7F
jle 0x3392a
cmpl $0x8c7e, %eax           # imm = 0x8C7E
jg 0x3397a
leal -0x8b80(%rax), %ecx
cmpl $0xa, %ecx
ja 0x33b92
leaq 0x17463(%rip), %rax     # 0x4ad74
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8b80, %edx           # imm = 0x8B80
jmp 0x33cfe
cmpl $0x8915, %eax           # imm = 0x8915
jg 0x339b9
cmpl $0x8266, %eax           # imm = 0x8266
jle 0x33a2d
cmpl $0x8267, %eax           # imm = 0x8267
je 0x33c33
cmpl $0x8741, %eax           # imm = 0x8741
je 0x33c01
cmpl $0x887f, %eax           # imm = 0x887F
jne 0x33bb2
movq 0x233e8(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x887f, %esi           # imm = 0x887F
jmp 0x33d5b
cmpl $0x8e74, %eax           # imm = 0x8E74
jle 0x339fe
leal -0x8e75(%rax), %ecx
cmpl $0x4, %ecx
ja 0x33a9a
leaq 0x17409(%rip), %rax     # 0x4ada0
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x233a9(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8e75, %esi           # imm = 0x8E75
jmp 0x33d5b
cmpl $0x8917, %eax           # imm = 0x8917
jle 0x33a53
cmpl $0x8918, %eax           # imm = 0x8918
je 0x33c81
cmpl $0x8a35, %eax           # imm = 0x8A35
je 0x33c1a
cmpl $0x8a36, %eax           # imm = 0x8A36
jne 0x33bb2
movq 0x23364(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8a36, %esi           # imm = 0x8A36
jmp 0x33d5b
cmpl $0x8c7f, %eax           # imm = 0x8C7F
je 0x33ace
cmpl $0x8c83, %eax           # imm = 0x8C83
jne 0x33bb2
movq 0x23335(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8c83, %esi           # imm = 0x8C83
jmp 0x33d5b
cmpl $0x8257, %eax           # imm = 0x8257
je 0x33bd8
cmpl $0x8258, %eax           # imm = 0x8258
jne 0x33bb2
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8258, %edx           # imm = 0x8258
jmp 0x33cfe
cmpl $0x8916, %eax           # imm = 0x8916
je 0x33be8
cmpl $0x8917, %eax           # imm = 0x8917
jne 0x33bb2
movq 0x232e0(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8917, %esi           # imm = 0x8917
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl (%r15), %edx
movq %rbx, %rdi
movl $0x52, %esi
jmp 0x33cad
cmpl $0x92d9, %eax           # imm = 0x92D9
jne 0x33bb2
movq 0x232a4(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x92d9, %esi           # imm = 0x92D9
jmp 0x33d5b
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8e79, %edx           # imm = 0x8E79
jmp 0x33cfe
movq 0x2327b(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8c7f, %esi           # imm = 0x8C7F
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl (%r15), %edx
movq %rbx, %rdi
movl $0x57, %esi
jmp 0x33cad
movq 0x2324a(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8e77, %esi           # imm = 0x8E77
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl (%r15), %edx
movq %rbx, %rdi
movl $0x55, %esi
jmp 0x33cad
movq 0x23219(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8e78, %esi           # imm = 0x8E78
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl (%r15), %edx
movq %rbx, %rdi
movl $0x56, %esi
jmp 0x33cad
movq 0x231e8(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8e76, %esi           # imm = 0x8E76
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl (%r15), %edx
movq %rbx, %rdi
movl $0x54, %esi
jmp 0x33cad
cmpl $0x8c76, %eax           # imm = 0x8C76
jne 0x33bb2
movq 0x231b0(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8c76, %esi           # imm = 0x8C76
jmp 0x33d5b
leaq 0xb6cc(%rip), %rsi      # 0x3f285
leaq 0x172fb(%rip), %rdx     # 0x4aebb
movq %rbx, %rdi
movl $0xe0, %ecx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x11ae0
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8257, %edx           # imm = 0x8257
jmp 0x33cfe
movq 0x23161(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8916, %esi           # imm = 0x8916
jmp 0x33d5b
movq 0x23148(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8741, %esi           # imm = 0x8741
jmp 0x33d5b
movq 0x2312f(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8a35, %esi           # imm = 0x8A35
jmp 0x33d5b
movq 0x23116(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8267, %esi           # imm = 0x8267
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x113b0
movslq 0x4(%r15), %rsi
movq %rbx, %rdi
callq 0x113b0
movslq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0x113b0
movl $0x3, %eax
jmp 0x33d78
movq 0x230c8(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8918, %esi           # imm = 0x8918
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl (%r15), %edx
movq %rbx, %rdi
movl $0x53, %esi
callq 0x11110
jmp 0x33d78
movq 0x23092(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8b84, %esi           # imm = 0x8B84
jmp 0x33d5b
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8b83, %edx           # imm = 0x8B83
jmp 0x33cfe
movq 0x2306c(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8b87, %esi           # imm = 0x8B87
jmp 0x33d5b
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8b82, %edx           # imm = 0x8B82
callq 0x33f04
jmp 0x33d73
movq 0x23044(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8b86, %esi           # imm = 0x8B86
jmp 0x33d5b
movq 0x2302e(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8b89, %esi           # imm = 0x8B89
jmp 0x33d5b
movq 0x23018(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8b85, %esi           # imm = 0x8B85
jmp 0x33d5b
movq 0x23002(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8b8a, %esi           # imm = 0x8B8A
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq