// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/teximage.c
// Function: CompressedTextureImage
static int CompressedTextureImage(lua_State *L)
    {
#define imagesize (GLsizei)len
    const void* data;
    size_t len;
    GLsizei height, depth;
    int arg = 1;
    GLenum target = checktexturetarget(L, arg++);
    GLint level = luaL_checkinteger(L, arg++);
    GLenum intfmt = checkinternalformat(L, arg++);
    if(lua_isstring(L, arg))
        data = (void*)luaL_checklstring(L, arg++, &len);
    else if(lua_istable(L, arg))
        data = (void*)checkdataptr(L, arg++, &len);
    else
        return luaL_argerror(L, arg, "invalid type");
    GLsizei width = luaL_checkinteger(L, arg++);
    if(lua_isnoneornil(L, arg))
        {
        glCompressedTexImage1D(target, level, intfmt, width, border, imagesize, data);
        CheckError(L);
        return 0;
        }
    height = luaL_checkinteger(L, arg++);
    if(lua_isnoneornil(L, arg))
        {
        glCompressedTexImage2D(target,level,intfmt,width,height,border,imagesize,data);
        CheckError(L);
        return 0;
        }
    depth = luaL_checkinteger(L, arg++);
    glCompressedTexImage3D(target,level,intfmt,width,height,depth,border,imagesize,data);
    CheckError(L);
    return 0;
#undef imagesize
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x13, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x11, %esi
movl $0x3, %edx
callq 0x11160
movl %eax, %r15d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x110b0
testl %eax, %eax
je 0x37717
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11450
jmp 0x3773f
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11860
cmpl $0x5, %eax
jne 0x3782f
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11b20
movq %rax, %r12
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq %rax, %r13
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11860
testl %eax, %eax
jle 0x377cb
movq %r12, 0x10(%rsp)
movl %r15d, %r12d
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11860
testl %eax, %eax
jle 0x377ed
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11af0
movq 0x1f840(%rip), %r10     # 0x56fe0
movl 0x8(%rsp), %r11d
subq $0x8, %rsp
movl %ebp, %edi
movl %r14d, %esi
movl %r12d, %edx
movl %r13d, %ecx
movl %r15d, %r8d
movl %eax, %r9d
pushq 0x18(%rsp)
pushq %r11
pushq $0x0
callq *(%r10)
addq $0x20, %rsp
jmp 0x37816
movq 0x1effe(%rip), %rax     # 0x567d0
movl 0x8(%rsp), %r9d
subq $0x8, %rsp
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r13d, %ecx
xorl %r8d, %r8d
pushq %r12
jmp 0x37810
movq 0x1f5ac(%rip), %rax     # 0x56da0
movl 0x8(%rsp), %r10d
movl %ebp, %edi
movl %r14d, %esi
movl %r12d, %edx
movl %r13d, %ecx
movl %r15d, %r8d
xorl %r9d, %r9d
pushq 0x10(%rsp)
pushq %r10
callq *(%rax)
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x79c2(%rip), %rdx      # 0x3f1f8
movq %rbx, %rdi
movl $0x4, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11940