// File: /workspace/github_c_makefile_star2_O0/stetre[P]moongl/src/vertex_array.c
// Function: PatchParameter
static int PatchParameter(lua_State *L)
/* patch_parameter(pname, val1, ...) */
    {
    int arg, i, count;
    GLint value;
    GLfloat *values;
    GLenum pname = checkpatchpname(L, 1);
    switch(pname)
        {
        case GL_PATCH_VERTICES:
                value = luaL_checkinteger(L, 2);
                glPatchParameteri(pname, value);
                CheckError(L);
                return 0;
        case GL_PATCH_DEFAULT_OUTER_LEVEL:
        case GL_PATCH_DEFAULT_INNER_LEVEL:
                arg = 2;
                while(!lua_isnoneornil(L, arg))
                    luaL_checknumber(L, arg++);
                if(arg==2)
                    luaL_checknumber(L, 2); /* raises an error */
                count = arg - 2;
                values = (GLfloat*)Malloc(L, count*sizeof(GLfloat));
                arg = 2;
                for(i=0; i<count; i++)
                    values[i] = lua_tonumber(L, arg++);
                glPatchParameterfv(pname, values);
                Free(L, values);
                CheckError(L);
                return 0;
        default:
            return luaL_error(L,UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x45, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x8(%rsp)
subl $0x8e72, %eax           # imm = 0x8E72
je 0x4ee65
jmp 0x4ee52
movl 0x8(%rsp), %eax
addl $0xffff718d, %eax       # imm = 0xFFFF718D
subl $0x2, %eax
jb 0x4eea3
jmp 0x4efa6
movq 0x28(%rsp), %rdi
movl $0x2, %esi
callq 0x11af0
movl %eax, 0x18(%rsp)
movq 0x18309(%rip), %rax     # 0x67188
movq (%rax), %rax
movl 0xc(%rsp), %edi
movl 0x18(%rsp), %esi
callq *%rax
movq 0x28(%rsp), %rdi
callq 0x11880
movl $0x0, 0x34(%rsp)
jmp 0x4efc9
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 0x4eec7
jmp 0x4eee0
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
callq 0x11a80
jmp 0x4eeab
cmpl $0x2, 0x24(%rsp)
jne 0x4eef6
movq 0x28(%rsp), %rdi
movl $0x2, %esi
callq 0x11a80
movl 0x24(%rsp), %eax
subl $0x2, %eax
movl %eax, 0x1c(%rsp)
movq 0x28(%rsp), %rdi
movslq 0x1c(%rsp), %rsi
shlq $0x2, %rsi
callq 0x11200
movq %rax, 0x10(%rsp)
movl $0x2, 0x24(%rsp)
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x1c(%rsp), %eax
jge 0x4ef6e
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 0x11790
cvtsd2ss %xmm0, %xmm0
movq 0x10(%rsp), %rax
movslq 0x20(%rsp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x4ef29
movq 0x186bb(%rip), %rax     # 0x67630
movq (%rax), %rax
movl 0xc(%rsp), %edi
movq 0x10(%rsp), %rsi
callq *%rax
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x11370
movq 0x28(%rsp), %rdi
callq 0x11880
movl $0x0, 0x34(%rsp)
jmp 0x4efc9
movq 0x28(%rsp), %rdi
leaq 0x32d3(%rip), %rsi      # 0x52285
leaq 0xf627(%rip), %rdx      # 0x5e5e0
movl $0x1ee, %ecx            # imm = 0x1EE
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)