// File: /workspace/github_c_makefile_star2_O0/stetre[P]moongl/src/whole_framebuffer.c
// Function: CheckBufList
static GLenum* CheckBufList(lua_State *L, int arg, GLsizei *n)
/* the caller must Free() the returned bufs */
    {
    GLenum *bufs;
    int i, err;
    if(lua_istable(L, arg))
        {
        *n = luaL_len(L, arg);
        if(*n==0) /* raise an error */
            checkbuffer(L, arg);
        bufs = (GLenum*)Malloc(L, (*n)*sizeof(GLenum));
        for(i = 0; i < (*n); i++)
            {
            lua_rawgeti(L, arg, i+1);
            bufs[i] = testbuffer(L, -1, &err);
            if(err) /* raise an error */
                { Free(L, bufs); checkbuffer(L, -1); }
            lua_pop(L, 1);
            }
        }
    else
        {
        i = arg;
        while(!lua_isnoneornil(L, i))
            { checkbuffer(L, i); i++; }
        if(i==arg) /* raise an error */
            checkbuffer(L, arg);
        *n = i - arg;
        bufs = (GLenum*)Malloc(L, (*n)*sizeof(GLenum));
        i = 0;
        for(i = 0; i < (*n); i++)
            bufs[i] = checkbuffer(L, arg + i);
        }
    return bufs;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x11860
cmpl $0x5, %eax
jne 0x51aac
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x11230
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, (%rax)
movq 0x10(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x519ed
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %edx
movl $0x4f, %esi
callq 0x11160
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movslq (%rax), %rsi
shlq $0x2, %rsi
callq 0x11200
movq %rax, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
movq 0x10(%rsp), %rcx
cmpl (%rcx), %eax
jge 0x51aa7
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %esi
movl 0x4(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rdx
callq 0x11410
movq 0x20(%rsp), %rdi
movl $0x4f, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rsp, %rcx
callq 0x11420
movl %eax, %edx
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
cmpl $0x0, (%rsp)
je 0x51a88
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x11370
movq 0x20(%rsp), %rdi
movl $0x4f, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11160
movq 0x20(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x116c0
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x51a10
jmp 0x51b89
movl 0x1c(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x11860
cmpl $0x0, %eax
setle %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x51ad0
jmp 0x51af0
movq 0x20(%rsp), %rdi
movl 0x4(%rsp), %edx
movl $0x4f, %esi
callq 0x11160
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x51ab4
movl 0x4(%rsp), %eax
cmpl 0x1c(%rsp), %eax
jne 0x51b0d
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %edx
movl $0x4f, %esi
callq 0x11160
movl 0x4(%rsp), %ecx
subl 0x1c(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, (%rax)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movslq (%rax), %rsi
shlq $0x2, %rsi
callq 0x11200
movq %rax, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
movq 0x10(%rsp), %rcx
cmpl (%rcx), %eax
jge 0x51b87
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %edx
addl 0x4(%rsp), %edx
movl $0x4f, %esi
callq 0x11160
movl %eax, %edx
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x51b47
jmp 0x51b89
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)