// File: /workspace/github_c_makefile_star2_O0/stetre[P]moongl/src/teximage.c
// Function: ClearTextureSubImage
static int ClearTextureSubImage(lua_State *L)
    {
    int arg = 1;
    const void* data;
    size_t len;
    GLuint texture = luaL_checkinteger(L, arg++);
    GLint level = luaL_checkinteger(L, arg++);
    GLenum format = checkformat(L, arg++);
    GLenum type = checktype(L, arg++);
    if(lua_isnoneornil(L, arg))
        { data = 0; arg++; }
    else if(lua_isstring(L, arg))
        data = (void*)luaL_checkstring(L, arg++);
    else if(lua_istable(L, arg))
        data = (void*)checkdataptr(L, arg++, &len);
    else
        return luaL_argerror(L, arg, "invalid type");
    GLint xoffset = luaL_checkinteger(L, arg++);
    GLint yoffset = luaL_checkinteger(L, arg++);
    GLint zoffset = luaL_checkinteger(L, arg++);
    GLsizei width = luaL_checkinteger(L, arg++);
    GLsizei height = luaL_checkinteger(L, arg++);
    GLsizei depth = luaL_checkinteger(L, arg++);
    glClearTexSubImage(texture, level,xoffset,yoffset,zoffset,width,height,depth,format,type,data);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, 0x70(%rsp)
movl $0x1, 0x6c(%rsp)
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
callq 0x11af0
movl %eax, 0x54(%rsp)
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
callq 0x11af0
movl %eax, 0x50(%rsp)
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
movl $0x12, %esi
callq 0x11160
movl %eax, 0x4c(%rsp)
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
movl $0x7, %esi
callq 0x11160
movl %eax, 0x48(%rsp)
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %esi
callq 0x11860
cmpl $0x0, %eax
jg 0x4741a
movq $0x0, 0x60(%rsp)
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x474a7
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %esi
callq 0x110b0
cmpl $0x0, %eax
je 0x4744f
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
xorl %eax, %eax
movl %eax, %edx
callq 0x11450
movq %rax, 0x60(%rsp)
jmp 0x474a5
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %esi
callq 0x11860
cmpl $0x5, %eax
jne 0x47485
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
leaq 0x58(%rsp), %rdx
callq 0x11b20
movq %rax, 0x60(%rsp)
jmp 0x474a3
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %esi
leaq 0xad63(%rip), %rdx      # 0x521f8
callq 0x11940
movl %eax, 0x7c(%rsp)
jmp 0x475ae
jmp 0x474a5
jmp 0x474a7
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
callq 0x11af0
movl %eax, 0x44(%rsp)
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
callq 0x11af0
movl %eax, 0x40(%rsp)
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
callq 0x11af0
movl %eax, 0x3c(%rsp)
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
callq 0x11af0
movl %eax, 0x38(%rsp)
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
callq 0x11af0
movl %eax, 0x34(%rsp)
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
callq 0x11af0
movl %eax, 0x30(%rsp)
movq 0x20090(%rip), %rax     # 0x675e0
movq (%rax), %rax
movl 0x54(%rsp), %edi
movl 0x50(%rsp), %esi
movl 0x44(%rsp), %edx
movl 0x40(%rsp), %ecx
movl 0x3c(%rsp), %r8d
movl 0x38(%rsp), %r9d
movl 0x34(%rsp), %r14d
movl 0x30(%rsp), %ebp
movl 0x4c(%rsp), %ebx
movl 0x48(%rsp), %r11d
movq 0x60(%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
nop