// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/proginterface.c
// Function: GetProgramResource
static int GetProgramResource(lua_State *L)
    {
    GLuint prog = luaL_checkinteger(L, 1);
    GLenum itf = checkinterface(L, 2);
    GLuint index = luaL_checkinteger(L, 3);
    GLenum prop = checkresourceproperty(L, 4);
    switch(prop)
        {
        case GL_ACTIVE_VARIABLES: return GetActiveVariables(L, prog, itf, index, prop);
        case GL_ARRAY_SIZE: return GetPropInt(L, prog, itf, index, prop);
        case GL_ARRAY_STRIDE: return GetPropInt(L, prog, itf, index, prop);
        case GL_ATOMIC_COUNTER_BUFFER_INDEX: return GetPropInt(L, prog, itf, index, prop);
        case GL_BLOCK_INDEX: return GetPropInt(L, prog, itf, index, prop);
        case GL_BUFFER_BINDING: return GetPropInt(L, prog, itf, index, prop);
        case GL_BUFFER_DATA_SIZE: return GetPropInt(L, prog, itf, index, prop);
        case GL_IS_PER_PATCH: return GetPropBoolean(L, prog, itf, index, prop);
        case GL_IS_ROW_MAJOR: return GetPropBoolean(L, prog, itf, index, prop);
        case GL_LOCATION: return GetPropInt(L, prog, itf, index, prop);
        case GL_LOCATION_COMPONENT: return GetPropInt(L, prog, itf, index, prop);
        case GL_LOCATION_INDEX: return GetPropInt(L, prog, itf, index, prop);
        case GL_MATRIX_STRIDE: return GetPropInt(L, prog, itf, index, prop);
        case GL_NAME_LENGTH: return GetPropInt(L, prog, itf, index, prop);
        case GL_NUM_ACTIVE_VARIABLES: return GetPropInt(L, prog, itf, index, prop);
        case GL_OFFSET: return GetPropInt(L, prog, itf, index, prop);
        case GL_REFERENCED_BY_VERTEX_SHADER: return GetPropInt(L, prog, itf, index, prop);
        case GL_REFERENCED_BY_TESS_CONTROL_SHADER: return GetPropInt(L, prog, itf, index, prop);
        case GL_REFERENCED_BY_TESS_EVALUATION_SHADER: return GetPropInt(L, prog, itf, index, prop);
        case GL_REFERENCED_BY_GEOMETRY_SHADER: return GetPropInt(L, prog, itf, index, prop);
        case GL_REFERENCED_BY_FRAGMENT_SHADER:  return GetPropInt(L, prog, itf, index, prop);
        case GL_REFERENCED_BY_COMPUTE_SHADER:  return GetPropInt(L, prog, itf, index, prop);
        case GL_TOP_LEVEL_ARRAY_SIZE: return GetPropInt(L, prog, itf, index, prop);
        case GL_TOP_LEVEL_ARRAY_STRIDE: return GetPropInt(L, prog, itf, index, prop);
        case GL_TRANSFORM_FEEDBACK_BUFFER_INDEX: return GetPropInt(L, prog, itf, index, prop);
        case GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE: return GetPropInt(L, prog, itf, index, prop);
        case GL_TYPE: return GetPropType(L, prog, itf, index, prop);
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x40, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x42, %esi
movl $0x4, %edx
callq 0x11160
cmpl $0x9349, %eax           # imm = 0x9349
jg 0x32e60
addl $0xffff6d19, %eax       # imm = 0xFFFF6D19
cmpl $0x28, %eax
ja 0x331ab
leaq 0x17ddb(%rip), %rcx     # 0x4ac1c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x92e7, %r8d           # imm = 0x92E7
jmp 0x32ff2
cmpl $0x934a, %eax           # imm = 0x934A
je 0x3316a
cmpl $0x934b, %eax           # imm = 0x934B
je 0x3317d
cmpl $0x934c, %eax           # imm = 0x934C
jne 0x331ab
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x934c, %r8d           # imm = 0x934C
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9308, %r8d           # imm = 0x9308
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9306, %r8d           # imm = 0x9306
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9309, %r8d           # imm = 0x9309
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x930f, %r8d           # imm = 0x930F
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9304, %r8d           # imm = 0x9304
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x92ff, %r8d           # imm = 0x92FF
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x930c, %r8d           # imm = 0x930C
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x930b, %r8d           # imm = 0x930B
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x92fe, %r8d           # imm = 0x92FE
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9307, %r8d           # imm = 0x9307
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x930a, %r8d           # imm = 0x930A
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x930e, %r8d           # imm = 0x930E
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x92f9, %r8d           # imm = 0x92F9
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9301, %r8d           # imm = 0x9301
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x92fc, %r8d           # imm = 0x92FC
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9300, %r8d           # imm = 0x9300
callq 0x33338
jmp 0x33193
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9302, %r8d           # imm = 0x9302
jmp 0x3318e
leaq 0x10(%rsp), %r8
movl $0x92fa, (%r8)          # imm = 0x92FA
movq 0x236e3(%rip), %rax     # 0x56708
leaq 0x14(%rsp), %r13
leaq 0xc(%rsp), %r10
movl $0x1, %r12d
movl %r15d, %edi
movl %ebp, %esi
movl %r14d, %edx
movl $0x1, %ecx
movl $0x1, %r9d
pushq %r13
pushq %r10
callq *(%rax)
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x11880
movl (%r13), %edx
movq %rbx, %rdi
movl $0xe, %esi
callq 0x11120
jmp 0x33199
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9303, %r8d           # imm = 0x9303
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x92fd, %r8d           # imm = 0x92FD
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x92fb, %r8d           # imm = 0x92FB
jmp 0x3318e
leaq 0xc(%rsp), %rax
movl $0x9305, (%rax)         # imm = 0x9305
movq 0x23cd4(%rip), %rax     # 0x56d98
leaq 0x10(%rsp), %r12
movl %r15d, %edi
movl %ebp, %esi
movl $0x92f7, %edx           # imm = 0x92F7
movq %r12, %rcx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movslq (%r12), %r12
leaq (,%r12,4), %rsi
movq %rbx, %rdi
callq 0x11200
movq %rax, %r13
movq 0x2360a(%rip), %rax     # 0x56708
movl %r15d, %edi
movl %ebp, %esi
movl %r14d, %edx
movl $0x1, %ecx
leaq 0xc(%rsp), %r8
movl %r12d, %r9d
pushq %r13
leaq 0x18(%rsp), %r10
pushq %r10
callq *(%rax)
addq $0x10, %rsp
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11550
testq %r12, %r12
jle 0x3314a
xorl %r14d, %r14d
movslq (%r13,%r14,4), %rsi
movq %rbx, %rdi
callq 0x113c0
incq %r14
cmpq %r14, %r12
jne 0x33135
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11370
jmp 0x33199
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x930d, %r8d           # imm = 0x930D
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x934a, %r8d           # imm = 0x934A
jmp 0x3318e
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x934b, %r8d           # imm = 0x934B
callq 0x332db
movl $0x1, %r12d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc0d3(%rip), %rsi      # 0x3f285
leaq 0x17ba9(%rip), %rdx     # 0x4ad62
movq %rbx, %rdi
movl $0xce, %ecx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0