// File: /workspace/github_c_makefile_star2_O0/stetre[P]moongl/src/teximage.c
// Function: CompressedTextureSubImage
static int CompressedTextureSubImage(lua_State *L)
    {
#define imagesize (GLsizei)len
    const void* data;
    size_t len;
    int arg = 1;
    GLint v1, v2, v3, v4, v5, v6;
    GLenum target;
    GLuint texture = checktargetorname(L, arg++, &target, DOMAIN_TEXTURE_TARGET);
    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");
    v1 = luaL_checkinteger(L, arg++);
    v2 = luaL_checkinteger(L, arg++);
    if(lua_isnoneornil(L, arg))
        {
        CheckError(L);
        if(texture==0)
            glCompressedTexSubImage1D(target,level,v1,v2,intfmt,imagesize,data);
        else
            glCompressedTextureSubImage1D(texture,level,v1,v2,intfmt,imagesize,data);
        return 0;
        }
    v3 = luaL_checkinteger(L, arg++);
    v4 = luaL_checkinteger(L, arg++);
    if(lua_isnoneornil(L, arg))
        {
        if(texture==0)
            glCompressedTexSubImage2D(target,level,v1,v2,v3,v4,intfmt,imagesize,data);
        else
            glCompressedTextureSubImage2D(texture,level,v1,v2,v3,v4,intfmt,imagesize,data);
        CheckError(L);
        return 0;
        }
    v5 = luaL_checkinteger(L, arg++);
    v6 = luaL_checkinteger(L, arg++);
    if(texture==0)
        glCompressedTexSubImage3D(target,level,v1,v2,v3,v4,v5,v6,intfmt,imagesize,data);
    else
        glCompressedTextureSubImage3D(texture,level,v1,v2,v3,v4,v5,v6,intfmt,imagesize,data);
    CheckError(L);
    return 0;
#undef imagesize
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, 0x70(%rsp)
movl $0x1, 0x5c(%rsp)
movq 0x70(%rsp), %rdi
movl 0x5c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
leaq 0x40(%rsp), %rdx
movl $0x13, %ecx
callq 0x11430
movl %eax, 0x3c(%rsp)
movq 0x70(%rsp), %rdi
movl 0x5c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
callq 0x11af0
movl %eax, 0x38(%rsp)
movq 0x70(%rsp), %rdi
movl 0x5c(%rsp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
movl $0x11, %esi
callq 0x11160
movl %eax, 0x34(%rsp)
movq 0x70(%rsp), %rdi
movl 0x5c(%rsp), %esi
callq 0x110b0
cmpl $0x0, %eax
je 0x4632e
movq 0x70(%rsp), %rdi
movl 0x5c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
leaq 0x60(%rsp), %rdx
callq 0x11450
movq %rax, 0x68(%rsp)
jmp 0x46384
movq 0x70(%rsp), %rdi
movl 0x5c(%rsp), %esi
callq 0x11860
cmpl $0x5, %eax
jne 0x46364
movq 0x70(%rsp), %rdi
movl 0x5c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
leaq 0x60(%rsp), %rdx
callq 0x11b20
movq %rax, 0x68(%rsp)
jmp 0x46382
movq 0x70(%rsp), %rdi
movl 0x5c(%rsp), %esi
leaq 0xbe84(%rip), %rdx      # 0x521f8
callq 0x11940
movl %eax, 0x7c(%rsp)
jmp 0x4663d
jmp 0x46384
movq 0x70(%rsp), %rdi
movl 0x5c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
callq 0x11af0
movl %eax, 0x58(%rsp)
movq 0x70(%rsp), %rdi
movl 0x5c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
callq 0x11af0
movl %eax, 0x54(%rsp)
movq 0x70(%rsp), %rdi
movl 0x5c(%rsp), %esi
callq 0x11860
cmpl $0x0, %eax
jg 0x4644b
movq 0x70(%rsp), %rdi
callq 0x11880
cmpl $0x0, 0x3c(%rsp)
jne 0x4640f
movq 0x210db(%rip), %rax     # 0x674c0
movq (%rax), %rax
movl 0x40(%rsp), %edi
movl 0x38(%rsp), %esi
movl 0x58(%rsp), %edx
movl 0x54(%rsp), %ecx
movl 0x34(%rsp), %r8d
movq 0x60(%rsp), %r9
movq 0x68(%rsp), %r10
movq %r10, (%rsp)
callq *%rax
jmp 0x4643e
movq 0x21352(%rip), %rax     # 0x67768
movq (%rax), %rax
movl 0x3c(%rsp), %edi
movl 0x38(%rsp), %esi
movl 0x58(%rsp), %edx
movl 0x54(%rsp), %ecx
movl 0x34(%rsp), %r8d
movq 0x60(%rsp), %r9
movq 0x68(%rsp), %r10
movq %r10, (%rsp)
callq *%rax
movl $0x0, 0x7c(%rsp)
jmp 0x4663d
movq 0x70(%rsp), %rdi
movl 0x5c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
callq 0x11af0
movl %eax, 0x50(%rsp)
movq 0x70(%rsp), %rdi
movl 0x5c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
callq 0x11af0
movl %eax, 0x4c(%rsp)
movq 0x70(%rsp), %rdi
movl 0x5c(%rsp), %esi
callq 0x11860
cmpl $0x0, %eax
jg 0x46540
cmpl $0x0, 0x3c(%rsp)
jne 0x464e5
movq 0x21312(%rip), %rax     # 0x677b8
movq (%rax), %rax
movl 0x40(%rsp), %edi
movl 0x38(%rsp), %esi
movl 0x58(%rsp), %edx
movl 0x54(%rsp), %ecx
movl 0x50(%rsp), %r8d
movl 0x4c(%rsp), %r9d
movl 0x34(%rsp), %ebx
movq 0x60(%rsp), %r10
movl %r10d, %r11d
movq 0x68(%rsp), %r10
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movq %r10, 0x10(%rsp)
callq *%rax
jmp 0x46529
movq 0x213bc(%rip), %rax     # 0x678a8
movq (%rax), %rax
movl 0x3c(%rsp), %edi
movl 0x38(%rsp), %esi
movl 0x58(%rsp), %edx
movl 0x54(%rsp), %ecx
movl 0x50(%rsp), %r8d
movl 0x4c(%rsp), %r9d
movl 0x34(%rsp), %ebx
movq 0x60(%rsp), %r10
movl %r10d, %r11d
movq 0x68(%rsp), %r10
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movq %r10, 0x10(%rsp)
callq *%rax
movq 0x70(%rsp), %rdi
callq 0x11880
movl $0x0, 0x7c(%rsp)
jmp 0x4663d
movq 0x70(%rsp), %rdi
movl 0x5c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
callq 0x11af0
movl %eax, 0x48(%rsp)
movq 0x70(%rsp), %rdi
movl 0x5c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
callq 0x11af0
movl %eax, 0x44(%rsp)
cmpl $0x0, 0x3c(%rsp)
jne 0x465d5
movq 0x214d4(%rip), %rax     # 0x67a58
movq (%rax), %rax
movl 0x40(%rsp), %edi
movl 0x38(%rsp), %esi
movl 0x58(%rsp), %edx
movl 0x54(%rsp), %ecx
movl 0x50(%rsp), %r8d
movl 0x4c(%rsp), %r9d
movl 0x48(%rsp), %r14d
movl 0x44(%rsp), %ebp
movl 0x34(%rsp), %ebx
movq 0x60(%rsp), %r10
movl %r10d, %r11d
movq 0x68(%rsp), %r10
movl %r14d, (%rsp)
movl %ebp, 0x8(%rsp)
movl %ebx, 0x10(%rsp)
movl %r11d, 0x18(%rsp)
movq %r10, 0x20(%rsp)
callq *%rax
jmp 0x4662b
movq 0x2177c(%rip), %rax     # 0x67d58
movq (%rax), %rax
movl 0x3c(%rsp), %edi
movl 0x38(%rsp), %esi
movl 0x58(%rsp), %edx
movl 0x54(%rsp), %ecx
movl 0x50(%rsp), %r8d
movl 0x4c(%rsp), %r9d
movl 0x48(%rsp), %r14d
movl 0x44(%rsp), %ebp
movl 0x34(%rsp), %ebx
movq 0x60(%rsp), %r10
movl %r10d, %r11d
movq 0x68(%rsp), %r10
movl %r14d, (%rsp)
movl %ebp, 0x8(%rsp)
movl %ebx, 0x10(%rsp)
movl %r11d, 0x18(%rsp)
movq %r10, 0x20(%rsp)
callq *%rax
movq 0x70(%rsp), %rdi
callq 0x11880
movl $0x0, 0x7c(%rsp)
movl 0x7c(%rsp), %eax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)