// File: /workspace/github_c_makefile_star2_O0/stetre[P]moongl/src/getuniform.c
// Function: GetActiveUniforms
static int GetActiveUniforms(lua_State *L)
/* get_active_uniforms(program, pname, uniform1, uniform2, ...) */
    {
    int arg;
    GLsizei count, i;
    GLuint *indices;
    GLint *params;
    GLuint program = luaL_checkinteger(L, 1);
    GLenum pname = checkuniformpname(L, 2);
    arg = 3;
    while(!lua_isnoneornil(L, arg))
        luaL_checkinteger(L, arg++);
    if(arg==3)
        return luaL_argerror(L, 3, "integer expected");
    count = arg - 3;
    indices = (GLuint*)Malloc2(L, count*sizeof(GLuint), (void**)&params, count*sizeof(GLint));
    for(i=0; i<count; i++)
        indices[i] = lua_tointeger(L, i+3);
    switch(pname)
        {
        case GL_UNIFORM_TYPE: return GetType(L,program,count,indices,pname,params);
        case GL_UNIFORM_SIZE: return GetInt(L,program,count,indices,pname,params);
        case GL_UNIFORM_NAME_LENGTH: return GetInt(L,program,count,indices,pname,params);
        case GL_UNIFORM_BLOCK_INDEX: return GetInt(L,program,count,indices,pname,params);
        case GL_UNIFORM_OFFSET: return GetInt(L,program,count,indices,pname,params);
        case GL_UNIFORM_ARRAY_STRIDE: return GetInt(L,program,count,indices,pname,params);
        case GL_UNIFORM_MATRIX_STRIDE: return GetInt(L,program,count,indices,pname,params);
        case GL_UNIFORM_IS_ROW_MAJOR: return GetBoolean(L,program,count,indices,pname,params);
        case GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX: 
                            return GetInt(L,program,count,indices,pname,params);
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
callq 0x11af0
movl %eax, 0x14(%rsp)
movq 0x38(%rsp), %rdi
movl $0x4c, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, 0x10(%rsp)
movl $0x3, 0x34(%rsp)
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x11860
cmpl $0x0, %eax
setle %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x37ae8
jmp 0x37b01
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
callq 0x11af0
jmp 0x37acc
cmpl $0x3, 0x34(%rsp)
jne 0x37b27
movq 0x38(%rsp), %rdi
movl $0x3, %esi
leaq 0x25099(%rip), %rdx     # 0x5cbb2
callq 0x11940
movl %eax, 0x44(%rsp)
jmp 0x37dcf
movl 0x34(%rsp), %eax
subl $0x3, %eax
movl %eax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movslq 0x30(%rsp), %rsi
shlq $0x2, %rsi
movslq 0x30(%rsp), %rcx
shlq $0x2, %rcx
leaq 0x18(%rsp), %rdx
callq 0x11700
movq %rax, 0x20(%rsp)
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
cmpl 0x30(%rsp), %eax
jge 0x37b9b
movq 0x38(%rsp), %rdi
movl 0x2c(%rsp), %esi
addl $0x3, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x11040
movl %eax, %edx
movq 0x20(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x37b60
movl 0x10(%rsp), %eax
movl %eax, 0xc(%rsp)
subl $0x8a37, %eax           # imm = 0x8A37
je 0x37c3b
jmp 0x37bb0
movl 0xc(%rsp), %eax
subl $0x8a38, %eax           # imm = 0x8A38
je 0x37c65
jmp 0x37bc1
movl 0xc(%rsp), %eax
subl $0x8a39, %eax           # imm = 0x8A39
je 0x37c8f
jmp 0x37bd2
movl 0xc(%rsp), %eax
subl $0x8a3a, %eax           # imm = 0x8A3A
je 0x37cb9
jmp 0x37be3
movl 0xc(%rsp), %eax
subl $0x8a3b, %eax           # imm = 0x8A3B
je 0x37ce3
jmp 0x37bf4
movl 0xc(%rsp), %eax
subl $0x8a3c, %eax           # imm = 0x8A3C
je 0x37d0d
jmp 0x37c05
movl 0xc(%rsp), %eax
subl $0x8a3d, %eax           # imm = 0x8A3D
je 0x37d37
jmp 0x37c16
movl 0xc(%rsp), %eax
subl $0x8a3e, %eax           # imm = 0x8A3E
je 0x37d5e
jmp 0x37c27
movl 0xc(%rsp), %eax
subl $0x92da, %eax           # imm = 0x92DA
je 0x37d85
jmp 0x37dac
movq 0x38(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x30(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0x10(%rsp), %r8d
movq 0x18(%rsp), %r9
callq 0x38410
movl %eax, 0x44(%rsp)
jmp 0x37dcf
movq 0x38(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x30(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0x10(%rsp), %r8d
movq 0x18(%rsp), %r9
callq 0x384d0
movl %eax, 0x44(%rsp)
jmp 0x37dcf
movq 0x38(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x30(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0x10(%rsp), %r8d
movq 0x18(%rsp), %r9
callq 0x384d0
movl %eax, 0x44(%rsp)
jmp 0x37dcf
movq 0x38(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x30(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0x10(%rsp), %r8d
movq 0x18(%rsp), %r9
callq 0x384d0
movl %eax, 0x44(%rsp)
jmp 0x37dcf
movq 0x38(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x30(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0x10(%rsp), %r8d
movq 0x18(%rsp), %r9
callq 0x384d0
movl %eax, 0x44(%rsp)
jmp 0x37dcf
movq 0x38(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x30(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0x10(%rsp), %r8d
movq 0x18(%rsp), %r9
callq 0x384d0
movl %eax, 0x44(%rsp)
jmp 0x37dcf
movq 0x38(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x30(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0x10(%rsp), %r8d
movq 0x18(%rsp), %r9
callq 0x384d0
movl %eax, 0x44(%rsp)
jmp 0x37dcf
movq 0x38(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x30(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0x10(%rsp), %r8d
movq 0x18(%rsp), %r9
callq 0x38590
movl %eax, 0x44(%rsp)
jmp 0x37dcf
movq 0x38(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x30(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0x10(%rsp), %r8d
movq 0x18(%rsp), %r9
callq 0x384d0
movl %eax, 0x44(%rsp)
jmp 0x37dcf
movq 0x38(%rsp), %rdi
leaq 0x1a4cd(%rip), %rsi     # 0x52285
leaq 0x24dc3(%rip), %rdx     # 0x5cb82
movl $0xec, %ecx
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)