// File: /workspace/github_c_makefile_star2_O0/stetre[P]moongl/src/getuniform.c
// Function: GetUniformIndices
static int GetUniformIndices(lua_State *L)
    {
    GLsizei i, count;
    const GLchar **names;
    GLuint *indices;
    GLuint program = luaL_checkinteger(L, 1);
    i = 2;
    while(!lua_isnoneornil(L, i)) luaL_checkstring(L, i++);
    if(i == 2)
        return luaL_argerror(L, 2, "string expected");
    count = i - 2;
    names = (const GLchar**)Malloc2(L, count*sizeof(GLchar*), (void**)&indices, count*sizeof(GLuint));
    for(i = 0; i < count; i++)
        names[i] = lua_tostring(L, i + 2);
    glGetUniformIndices(program, count, names, indices);
    CheckErrorFree2(L, names, indices);
    for(i = 0; i < count; i++)
        {
        if(indices[i] == GL_INVALID_INDEX)
            {
            lua_pushfstring(L, "invalid name '%s'", names[i]);
            Free(L, names);
            Free(L, indices);
            return lua_error(L);
            }
        }
    for(i = 0; i < count; i++)
        lua_pushinteger(L, indices[i]);
    Free(L, names);
    Free(L, indices);
    return count;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0x11af0
movl %eax, 0xc(%rsp)
movl $0x2, 0x24(%rsp)
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x11860
cmpl $0x0, %eax
setle %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x37790
jmp 0x377ad
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
xorl %eax, %eax
movl %eax, %edx
callq 0x11450
jmp 0x37774
cmpl $0x2, 0x24(%rsp)
jne 0x377d3
movq 0x28(%rsp), %rdi
movl $0x2, %esi
leaq 0x1a83b(%rip), %rdx     # 0x52000
callq 0x11940
movl %eax, 0x34(%rsp)
jmp 0x37959
movl 0x24(%rsp), %eax
subl $0x2, %eax
movl %eax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movslq 0x20(%rsp), %rsi
shlq $0x3, %rsi
movslq 0x20(%rsp), %rcx
shlq $0x2, %rcx
leaq 0x10(%rsp), %rdx
callq 0x11700
movq %rax, 0x18(%rsp)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x20(%rsp), %eax
jge 0x37849
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
addl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x11950
movq %rax, %rdx
movq 0x18(%rsp), %rax
movslq 0x24(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x3780c
movq 0x2fab0(%rip), %rax     # 0x67300
movq (%rax), %rax
movl 0xc(%rsp), %edi
movl 0x20(%rsp), %esi
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rcx
callq *%rax
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x111e0
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x20(%rsp), %eax
jge 0x378fb
movq 0x10(%rsp), %rax
movslq 0x24(%rsp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jne 0x378ec
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rax
movslq 0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x252d8(%rip), %rsi     # 0x5cb8f
movb $0x0, %al
callq 0x11170
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x11370
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x11370
movq 0x28(%rsp), %rdi
callq 0x11640
movl %eax, 0x34(%rsp)
jmp 0x37959
jmp 0x378ee
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x37883
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x20(%rsp), %eax
jge 0x37933
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rax
movslq 0x24(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, %esi
callq 0x113c0
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x37903
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x11370
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x11370
movl 0x20(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)