// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x13
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
pushq $0x11
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %r15d
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x110b0
pushq $0x4
popq %rsi
testl %eax, %eax
je 0x348fb
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x11440
jmp 0x3491c
movq %rbx, %rdi
callq 0x11850
cmpl $0x5, %eax
jne 0x34a05
pushq $0x4
popq %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x11b20
movq %rax, %r12
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r13
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x11850
testl %eax, %eax
jle 0x349a1
movq %r12, 0x10(%rsp)
movl %r15d, %r12d
movq %r14, %r15
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x11850
testl %eax, %eax
jle 0x349c3
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq 0x2166a(%rip), %r10     # 0x55fe0
movl 0x8(%rsp), %r11d
subq $0x8, %rsp
movl %ebp, %edi
movl %r15d, %esi
movl %r12d, %edx
movl %r13d, %ecx
movl %r14d, %r8d
movl %eax, %r9d
pushq 0x18(%rsp)
pushq %r11
pushq $0x0
callq *(%r10)
addq $0x20, %rsp
jmp 0x349ec
movq 0x20e28(%rip), %rax     # 0x557d0
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 0x349e6
movq 0x213d6(%rip), %rax     # 0x55da0
movl 0x8(%rsp), %r10d
movl %ebp, %edi
movl %r15d, %esi
movl %r12d, %edx
movl %r13d, %ecx
movl %r14d, %r8d
xorl %r9d, %r9d
pushq 0x10(%rsp)
pushq %r10
callq *(%rax)
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x67ec(%rip), %rdx      # 0x3b1f8
pushq $0x4
popq %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11930