// File: /workspace/github_c_makefile_star2_O3/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 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x42, %esi
movl $0x4, %edx
callq 0x11150
cmpl $0x9349, %eax           # imm = 0x9349
jg 0x32ef8
addl $0xffff6d19, %eax       # imm = 0xFFFF6D19
cmpl $0x28, %eax
ja 0x33243
leaq 0x17d43(%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 0x3308a
cmpl $0x934a, %eax           # imm = 0x934A
je 0x33202
cmpl $0x934b, %eax           # imm = 0x934B
je 0x33215
cmpl $0x934c, %eax           # imm = 0x934C
jne 0x33243
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x934c, %r8d           # imm = 0x934C
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9308, %r8d           # imm = 0x9308
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9306, %r8d           # imm = 0x9306
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9309, %r8d           # imm = 0x9309
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x930f, %r8d           # imm = 0x930F
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9304, %r8d           # imm = 0x9304
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x92ff, %r8d           # imm = 0x92FF
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x930c, %r8d           # imm = 0x930C
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x930b, %r8d           # imm = 0x930B
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x92fe, %r8d           # imm = 0x92FE
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9307, %r8d           # imm = 0x9307
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x930a, %r8d           # imm = 0x930A
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x930e, %r8d           # imm = 0x930E
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x92f9, %r8d           # imm = 0x92F9
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9301, %r8d           # imm = 0x9301
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x92fc, %r8d           # imm = 0x92FC
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9300, %r8d           # imm = 0x9300
callq 0x333d0
jmp 0x3322b
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9302, %r8d           # imm = 0x9302
jmp 0x33226
leaq 0x10(%rsp), %r8
movl $0x92fa, (%r8)          # imm = 0x92FA
movq 0x2364b(%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 0x11870
movl (%r13), %edx
movq %rbx, %rdi
movl $0xe, %esi
callq 0x11110
jmp 0x33231
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x9303, %r8d           # imm = 0x9303
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x92fd, %r8d           # imm = 0x92FD
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x92fb, %r8d           # imm = 0x92FB
jmp 0x33226
leaq 0xc(%rsp), %rax
movl $0x9305, (%rax)         # imm = 0x9305
movq 0x23c3c(%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 0x11870
movslq (%r12), %r12
leaq (,%r12,4), %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r13
movq 0x23572(%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 0x11540
testq %r12, %r12
jle 0x331e2
xorl %r14d, %r14d
movslq (%r13,%r14,4), %rsi
movq %rbx, %rdi
callq 0x113b0
incq %r14
cmpq %r14, %r12
jne 0x331cd
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11360
jmp 0x33231
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x930d, %r8d           # imm = 0x930D
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x934a, %r8d           # imm = 0x934A
jmp 0x33226
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x934b, %r8d           # imm = 0x934B
callq 0x33373
movl $0x1, %r12d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc03b(%rip), %rsi      # 0x3f285
leaq 0x17b11(%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