// File: /workspace/github_c_makefile_star2_O1/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 0x11160
cmpl $0x8b7f, %eax           # imm = 0x8B7F
jle 0x33892
cmpl $0x8c7e, %eax           # imm = 0x8C7E
jg 0x338e2
leal -0x8b80(%rax), %ecx
cmpl $0xa, %ecx
ja 0x33afa
leaq 0x174fb(%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 0x33c66
cmpl $0x8915, %eax           # imm = 0x8915
jg 0x33921
cmpl $0x8266, %eax           # imm = 0x8266
jle 0x33995
cmpl $0x8267, %eax           # imm = 0x8267
je 0x33b9b
cmpl $0x8741, %eax           # imm = 0x8741
je 0x33b69
cmpl $0x887f, %eax           # imm = 0x887F
jne 0x33b1a
movq 0x23480(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x887f, %esi           # imm = 0x887F
jmp 0x33cc3
cmpl $0x8e74, %eax           # imm = 0x8E74
jle 0x33966
leal -0x8e75(%rax), %ecx
cmpl $0x4, %ecx
ja 0x33a02
leaq 0x174a1(%rip), %rax     # 0x4ada0
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x23441(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8e75, %esi           # imm = 0x8E75
jmp 0x33cc3
cmpl $0x8917, %eax           # imm = 0x8917
jle 0x339bb
cmpl $0x8918, %eax           # imm = 0x8918
je 0x33be9
cmpl $0x8a35, %eax           # imm = 0x8A35
je 0x33b82
cmpl $0x8a36, %eax           # imm = 0x8A36
jne 0x33b1a
movq 0x233fc(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8a36, %esi           # imm = 0x8A36
jmp 0x33cc3
cmpl $0x8c7f, %eax           # imm = 0x8C7F
je 0x33a36
cmpl $0x8c83, %eax           # imm = 0x8C83
jne 0x33b1a
movq 0x233cd(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8c83, %esi           # imm = 0x8C83
jmp 0x33cc3
cmpl $0x8257, %eax           # imm = 0x8257
je 0x33b40
cmpl $0x8258, %eax           # imm = 0x8258
jne 0x33b1a
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8258, %edx           # imm = 0x8258
jmp 0x33c66
cmpl $0x8916, %eax           # imm = 0x8916
je 0x33b50
cmpl $0x8917, %eax           # imm = 0x8917
jne 0x33b1a
movq 0x23378(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8917, %esi           # imm = 0x8917
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movl (%r15), %edx
movq %rbx, %rdi
movl $0x52, %esi
jmp 0x33c15
cmpl $0x92d9, %eax           # imm = 0x92D9
jne 0x33b1a
movq 0x2333c(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x92d9, %esi           # imm = 0x92D9
jmp 0x33cc3
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8e79, %edx           # imm = 0x8E79
jmp 0x33c66
movq 0x23313(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8c7f, %esi           # imm = 0x8C7F
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movl (%r15), %edx
movq %rbx, %rdi
movl $0x57, %esi
jmp 0x33c15
movq 0x232e2(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8e77, %esi           # imm = 0x8E77
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movl (%r15), %edx
movq %rbx, %rdi
movl $0x55, %esi
jmp 0x33c15
movq 0x232b1(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8e78, %esi           # imm = 0x8E78
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movl (%r15), %edx
movq %rbx, %rdi
movl $0x56, %esi
jmp 0x33c15
movq 0x23280(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8e76, %esi           # imm = 0x8E76
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movl (%r15), %edx
movq %rbx, %rdi
movl $0x54, %esi
jmp 0x33c15
cmpl $0x8c76, %eax           # imm = 0x8C76
jne 0x33b1a
movq 0x23248(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8c76, %esi           # imm = 0x8C76
jmp 0x33cc3
leaq 0xb764(%rip), %rsi      # 0x3f285
leaq 0x17393(%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 0x33c66
movq 0x231f9(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8916, %esi           # imm = 0x8916
jmp 0x33cc3
movq 0x231e0(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8741, %esi           # imm = 0x8741
jmp 0x33cc3
movq 0x231c7(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8a35, %esi           # imm = 0x8A35
jmp 0x33cc3
movq 0x231ae(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8267, %esi           # imm = 0x8267
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x113c0
movslq 0x4(%r15), %rsi
movq %rbx, %rdi
callq 0x113c0
movslq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0x113c0
movl $0x3, %eax
jmp 0x33ce0
movq 0x23160(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8918, %esi           # imm = 0x8918
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movl (%r15), %edx
movq %rbx, %rdi
movl $0x53, %esi
callq 0x11120
jmp 0x33ce0
movq 0x2312a(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8b84, %esi           # imm = 0x8B84
jmp 0x33cc3
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8b83, %edx           # imm = 0x8B83
jmp 0x33c66
movq 0x23104(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8b87, %esi           # imm = 0x8B87
jmp 0x33cc3
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8b82, %edx           # imm = 0x8B82
callq 0x33e6c
jmp 0x33cdb
movq 0x230dc(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8b86, %esi           # imm = 0x8B86
jmp 0x33cc3
movq 0x230c6(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8b89, %esi           # imm = 0x8B89
jmp 0x33cc3
movq 0x230b0(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8b85, %esi           # imm = 0x8B85
jmp 0x33cc3
movq 0x2309a(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8b8a, %esi           # imm = 0x8B8A
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x113c0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq