// File: /workspace/github_c_makefile_star2_O3/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 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
movl $0x4, %edx
callq 0x11150
cmpl $0x8e49, %eax           # imm = 0x8E49
jg 0x36144
cmpl $0x8a38, %eax           # imm = 0x8A38
je 0x3619c
cmpl $0x8a39, %eax           # imm = 0x8A39
jne 0x36171
movq 0x208c0(%rip), %rax     # 0x569f0
leaq 0x4(%rsp), %r12
movl %r14d, %edi
movl %ebp, %esi
movl %r15d, %edx
movl $0x8a39, %ecx           # imm = 0x8A39
jmp 0x361b5
cmpl $0x8e4b, %eax           # imm = 0x8E4B
je 0x361d8
cmpl $0x8e4a, %eax           # imm = 0x8E4A
jne 0x36171
movq 0x20893(%rip), %rax     # 0x569f0
leaq 0x4(%rsp), %r12
movl %r14d, %edi
movl %ebp, %esi
movl %r15d, %edx
movl $0x8e4a, %ecx           # imm = 0x8E4A
jmp 0x361b5
leaq 0x910d(%rip), %rsi      # 0x3f285
leaq 0x152b0(%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 0x2084d(%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 0x11870
movslq (%r12), %rsi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
jmp 0x36267
movq 0x20811(%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 0x11870
movslq (%r13), %rsi
shlq $0x2, %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r12
movl %r14d, %edi
movl %ebp, %esi
movl %r15d, %edx
movl $0x8e4b, %ecx           # imm = 0x8E4B
movq %rax, %r8
movq 0x207c8(%rip), %rax     # 0x569f0
callq *(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11540
cmpl $0x0, (%r13)
jle 0x36258
xorl %r14d, %r14d
movslq (%r12,%r14,4), %rsi
movq %rbx, %rdi
callq 0x113b0
incq %r14
movslq 0x4(%rsp), %rax
cmpq %rax, %r14
jl 0x3623f
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11360
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq