// File: /workspace/github_c_makefile_star2_O0/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 %rbx
subq $0x60, %rsp
movq %rdi, 0x50(%rsp)
movl $0x1, 0x34(%rsp)
movq 0x50(%rsp), %rdi
movl 0x34(%rsp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
movl $0x13, %esi
callq 0x11160
movl %eax, 0x30(%rsp)
movq 0x50(%rsp), %rdi
movl 0x34(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
callq 0x11af0
movl %eax, 0x2c(%rsp)
movq 0x50(%rsp), %rdi
movl 0x34(%rsp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
movl $0x11, %esi
callq 0x11160
movl %eax, 0x28(%rsp)
movq 0x50(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x110b0
cmpl $0x0, %eax
je 0x460b3
movq 0x50(%rsp), %rdi
movl 0x34(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
leaq 0x40(%rsp), %rdx
callq 0x11450
movq %rax, 0x48(%rsp)
jmp 0x46109
movq 0x50(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x11860
cmpl $0x5, %eax
jne 0x460e9
movq 0x50(%rsp), %rdi
movl 0x34(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
leaq 0x40(%rsp), %rdx
callq 0x11b20
movq %rax, 0x48(%rsp)
jmp 0x46107
movq 0x50(%rsp), %rdi
movl 0x34(%rsp), %esi
leaq 0xc0ff(%rip), %rdx      # 0x521f8
callq 0x11940
movl %eax, 0x5c(%rsp)
jmp 0x4626d
jmp 0x46109
movq 0x50(%rsp), %rdi
movl 0x34(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
callq 0x11af0
movl %eax, 0x24(%rsp)
movq 0x50(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x11860
cmpl $0x0, %eax
jg 0x4617e
movq 0x2155a(%rip), %rax     # 0x67698
movq (%rax), %rax
movl 0x30(%rsp), %edi
movl 0x2c(%rsp), %esi
movl 0x28(%rsp), %edx
movl 0x24(%rsp), %ecx
movq 0x40(%rsp), %r8
movl %r8d, %r9d
movq 0x48(%rsp), %r10
xorl %r8d, %r8d
movq %r10, (%rsp)
callq *%rax
movq 0x50(%rsp), %rdi
callq 0x11880
movl $0x0, 0x5c(%rsp)
jmp 0x4626d
movq 0x50(%rsp), %rdi
movl 0x34(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
callq 0x11af0
movl %eax, 0x3c(%rsp)
movq 0x50(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x11860
cmpl $0x0, %eax
jg 0x461fa
movq 0x21b75(%rip), %rax     # 0x67d28
movq (%rax), %rax
movl 0x30(%rsp), %edi
movl 0x2c(%rsp), %esi
movl 0x28(%rsp), %edx
movl 0x24(%rsp), %ecx
movl 0x3c(%rsp), %r8d
movq 0x40(%rsp), %r9
movl %r9d, %r11d
movq 0x48(%rsp), %r10
xorl %r9d, %r9d
movl %r11d, (%rsp)
movq %r10, 0x8(%rsp)
callq *%rax
movq 0x50(%rsp), %rdi
callq 0x11880
movl $0x0, 0x5c(%rsp)
jmp 0x4626d
movq 0x50(%rsp), %rdi
movl 0x34(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
callq 0x11af0
movl %eax, 0x38(%rsp)
movq 0x21dc4(%rip), %rax     # 0x67fe0
movq (%rax), %rax
movl 0x30(%rsp), %edi
movl 0x2c(%rsp), %esi
movl 0x28(%rsp), %edx
movl 0x24(%rsp), %ecx
movl 0x3c(%rsp), %r8d
movl 0x38(%rsp), %r9d
movq 0x40(%rsp), %r10
movl %r10d, %r11d
movq 0x48(%rsp), %r10
xorl %ebx, %ebx
movl $0x0, (%rsp)
movl %r11d, 0x8(%rsp)
movq %r10, 0x10(%rsp)
callq *%rax
movq 0x50(%rsp), %rdi
callq 0x11880
movl $0x0, 0x5c(%rsp)
movl 0x5c(%rsp), %eax
addq $0x60, %rsp
popq %rbx
retq
nopw (%rax,%rax)