// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/subroutine.c
// Function: GetActiveSubroutineUniform
static int GetActiveSubroutineUniform(lua_State *L)
    {
    GLuint program = luaL_checkinteger(L, 1);
    GLenum shadertype = checkshadertype(L, 2);
    GLuint index = luaL_checkinteger(L, 3);
    GLenum pname = checksubroutinepname(L, 4);
    
    switch(pname)
        {
        case GL_NUM_COMPATIBLE_SUBROUTINES:
            return GetInt(L, program, shadertype, index, pname);
        case GL_COMPATIBLE_SUBROUTINES:
            return GetCompatibleSubroutines(L, program, shadertype, index);
        case GL_UNIFORM_SIZE:
            return GetInt(L, program, shadertype, index, pname);
        case GL_UNIFORM_NAME_LENGTH:
            return GetInt(L, program, shadertype, index, pname);
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
movl $0x4, %edx
callq 0x11160
cmpl $0x8e49, %eax           # imm = 0x8E49
jg 0x360bb
cmpl $0x8a38, %eax           # imm = 0x8A38
je 0x36113
cmpl $0x8a39, %eax           # imm = 0x8A39
jne 0x360e8
movq 0x20949(%rip), %rax     # 0x569f0
leaq 0x4(%rsp), %r12
movl %r14d, %edi
movl %ebp, %esi
movl %r15d, %edx
movl $0x8a39, %ecx           # imm = 0x8A39
jmp 0x3612c
cmpl $0x8e4b, %eax           # imm = 0x8E4B
je 0x3614f
cmpl $0x8e4a, %eax           # imm = 0x8E4A
jne 0x360e8
movq 0x2091c(%rip), %rax     # 0x569f0
leaq 0x4(%rsp), %r12
movl %r14d, %edi
movl %ebp, %esi
movl %r15d, %edx
movl $0x8e4a, %ecx           # imm = 0x8E4A
jmp 0x3612c
leaq 0x9196(%rip), %rsi      # 0x3f285
leaq 0x15339(%rip), %rdx     # 0x4b42f
movq %rbx, %rdi
movl $0x79, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
movq 0x208d6(%rip), %rax     # 0x569f0
leaq 0x4(%rsp), %r12
movl %r14d, %edi
movl %ebp, %esi
movl %r15d, %edx
movl $0x8a38, %ecx           # imm = 0x8A38
movq %r12, %r8
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movslq (%r12), %rsi
movq %rbx, %rdi
callq 0x113c0
movl $0x1, %eax
jmp 0x361de
movq 0x2089a(%rip), %rax     # 0x569f0
leaq 0x4(%rsp), %r13
movl %r14d, %edi
movl %ebp, %esi
movl %r15d, %edx
movl $0x8e4a, %ecx           # imm = 0x8E4A
movq %r13, %r8
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movslq (%r13), %rsi
shlq $0x2, %rsi
movq %rbx, %rdi
callq 0x11200
movq %rax, %r12
movl %r14d, %edi
movl %ebp, %esi
movl %r15d, %edx
movl $0x8e4b, %ecx           # imm = 0x8E4B
movq %rax, %r8
movq 0x20851(%rip), %rax     # 0x569f0
callq *(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11550
cmpl $0x0, (%r13)
jle 0x361cf
xorl %r14d, %r14d
movslq (%r12,%r14,4), %rsi
movq %rbx, %rdi
callq 0x113c0
incq %r14
movslq 0x4(%rsp), %rax
cmpq %rax, %r14
jl 0x361b6
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11370
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq