// File: /workspace/github_c_makefile_star2_O0/stetre[P]moongl/src/getintformat.c
// Function: GetInternalformat
static int GetInternalformat(lua_State *L)
    {
    GLenum target = checktexturetarget(L, 1);
    GLenum internalformat = checkinternalformat(L, 2);
    GLenum pname = checkintformatpname(L, 3);
    switch(pname)
        {
        /* supported operations queries: */
        case GL_CLEAR_BUFFER:
        case GL_CLEAR_TEXTURE:
        case GL_COMPUTE_TEXTURE:
        case GL_FILTER:
        case GL_FRAGMENT_TEXTURE:
        case GL_FRAMEBUFFER_BLEND:
        case GL_FRAMEBUFFER_RENDERABLE:
        case GL_FRAMEBUFFER_RENDERABLE_LAYERED:
        case GL_GEOMETRY_TEXTURE:
        case GL_MANUAL_GENERATE_MIPMAP:
        case GL_GENERATE_MIPMAP:
        case GL_AUTO_GENERATE_MIPMAP:
        case GL_READ_PIXELS:
        case GL_SHADER_IMAGE_ATOMIC:
        case GL_SHADER_IMAGE_LOAD:
        case GL_SHADER_IMAGE_STORE:
        case GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST:
        case GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE:
        case GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST:
        case GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE:
        case GL_SRGB_READ:
        case GL_SRGB_WRITE:
        case GL_TESS_CONTROL_TEXTURE:
        case GL_TESS_EVALUATION_TEXTURE:
        case GL_TEXTURE_GATHER:
        case GL_TEXTURE_GATHER_SHADOW:
        case GL_TEXTURE_SHADOW:
        case GL_TEXTURE_VIEW:
        case GL_VERTEX_TEXTURE:
                    return GetEnum(L, target, internalformat, pname, DOMAIN_SUPPORTED_OP);
        /* booleans */
        case GL_COLOR_COMPONENTS:
        case GL_COLOR_RENDERABLE:
        case GL_DEPTH_COMPONENTS:
        case GL_DEPTH_RENDERABLE:
        case GL_INTERNALFORMAT_SUPPORTED:  
        case GL_MIPMAP:
        case GL_STENCIL_COMPONENTS:
        case GL_STENCIL_RENDERABLE:
        case GL_TEXTURE_COMPRESSED:
                        return GetBoolean(L, target, internalformat, pname);
        /* integer */
        case GL_INTERNALFORMAT_RED_SIZE:
        case GL_INTERNALFORMAT_GREEN_SIZE:
        case GL_INTERNALFORMAT_ALPHA_SIZE:
        case GL_INTERNALFORMAT_DEPTH_SIZE:
        case GL_INTERNALFORMAT_STENCIL_SIZE:
        case GL_INTERNALFORMAT_BLUE_SIZE:
        case GL_INTERNALFORMAT_SHARED_SIZE:
        case GL_MAX_COMBINED_DIMENSIONS:
        case GL_MAX_WIDTH:
        case GL_MAX_HEIGHT:
        case GL_MAX_DEPTH:
        case GL_MAX_LAYERS:
        case GL_NUM_SAMPLE_COUNTS:
        case GL_TEXTURE_COMPRESSED_BLOCK_SIZE:
        case GL_TEXTURE_COMPRESSED_BLOCK_WIDTH:
        case GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT:
        case GL_IMAGE_TEXEL_SIZE:
                         return GetInt(L, target, internalformat, pname);
        /* N integers */
        case GL_SAMPLES:
                    return GetN(L, target, internalformat, pname, GL_NUM_SAMPLE_COUNTS);
        /* enums */
        case GL_COLOR_ENCODING:
                    return GetEnum(L, target, internalformat, pname, DOMAIN_COLOR_ENCODING);
        case GL_GET_TEXTURE_IMAGE_FORMAT:
                    return GetEnum(L, target, internalformat, pname, DOMAIN_FORMAT);
        case GL_GET_TEXTURE_IMAGE_TYPE:
                    return GetEnum(L, target, internalformat, pname, DOMAIN_TYPE);
        case GL_IMAGE_COMPATIBILITY_CLASS:
                return GetEnum(L, target, internalformat, pname, DOMAIN_IMAGE_COMPATIBILITY_CLASS);
        case GL_IMAGE_FORMAT_COMPATIBILITY_TYPE:
                return GetEnum(L, target, internalformat, pname, DOMAIN_IMAGE_FORMAT_COMP_TYPE);
        case GL_IMAGE_PIXEL_FORMAT:
                return GetEnum(L, target, internalformat, pname, DOMAIN_FORMAT);
        case GL_IMAGE_PIXEL_TYPE:
                    return GetEnum(L, target, internalformat, pname, DOMAIN_TYPE);
        case GL_VIEW_COMPATIBILITY_CLASS:
                return GetEnum(L, target, internalformat, pname, DOMAIN_VIEW_COMPATIBILITY_TYPE);
        case GL_INTERNALFORMAT_PREFERRED:
                    return GetEnum(L, target, internalformat, pname, DOMAIN_INTERNAL_FORMAT);
        case GL_INTERNALFORMAT_RED_TYPE:
        case GL_INTERNALFORMAT_GREEN_TYPE:
        case GL_INTERNALFORMAT_BLUE_TYPE:
        case GL_INTERNALFORMAT_ALPHA_TYPE:
        case GL_INTERNALFORMAT_DEPTH_TYPE:
        case GL_INTERNALFORMAT_STENCIL_TYPE:
                    return GetEnum(L, target, internalformat, pname, DOMAIN_COMPONENT_TYPE);
        case GL_READ_PIXELS_FORMAT:
                    return GetEnum(L, target, internalformat, pname, DOMAIN_FORMAT);
        case GL_READ_PIXELS_TYPE: 
                    return GetEnum(L, target, internalformat, pname, DOMAIN_TYPE);
        case GL_TEXTURE_IMAGE_FORMAT:
                    return GetEnum(L, target, internalformat, pname, DOMAIN_FORMAT);
        case GL_TEXTURE_IMAGE_TYPE:
                    return GetEnum(L, target, internalformat, pname, DOMAIN_TYPE);

        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x13, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rdi
movl $0x11, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movl $0x66, %esi
movl $0x3, %edx
callq 0x11160
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x8(%rsp)
subl $0x80a9, %eax           # imm = 0x80A9
je 0x36ac1
jmp 0x36836
movl 0x8(%rsp), %eax
subl $0x8191, %eax           # imm = 0x8191
je 0x36a55
jmp 0x36847
movl 0x8(%rsp), %eax
subl $0x826f, %eax           # imm = 0x826F
je 0x36a7a
jmp 0x36858
movl 0x8(%rsp), %eax
subl $0x8270, %eax           # imm = 0x8270
je 0x36c0e
jmp 0x36869
movl 0x8(%rsp), %eax
addl $0xffff7d8f, %eax       # imm = 0xFFFF7D8F
subl $0x7, %eax
jb 0x36a9f
jmp 0x3687d
movl 0x8(%rsp), %eax
addl $0xffff7d88, %eax       # imm = 0xFFFF7D88
subl $0x6, %eax
jb 0x36c33
jmp 0x36891
movl 0x8(%rsp), %eax
addl $0xffff7d82, %eax       # imm = 0xFFFF7D82
subl $0x5, %eax
jb 0x36a9f
jmp 0x368a5
movl 0x8(%rsp), %eax
addl $0xffff7d7d, %eax       # imm = 0xFFFF7D7D
subl $0x6, %eax
jb 0x36a7a
jmp 0x368b9
movl 0x8(%rsp), %eax
addl $0xffff7d77, %eax       # imm = 0xFFFF7D77
subl $0x4, %eax
jb 0x36a55
jmp 0x368cd
movl 0x8(%rsp), %eax
subl $0x828d, %eax           # imm = 0x828D
je 0x36c58
jmp 0x368de
movl 0x8(%rsp), %eax
subl $0x828e, %eax           # imm = 0x828E
je 0x36c7d
jmp 0x368ef
movl 0x8(%rsp), %eax
subl $0x828f, %eax           # imm = 0x828F
je 0x36c9f
jmp 0x36900
movl 0x8(%rsp), %eax
subl $0x8290, %eax           # imm = 0x8290
je 0x36cc1
jmp 0x36911
movl 0x8(%rsp), %eax
subl $0x8291, %eax           # imm = 0x8291
je 0x36b0b
jmp 0x36922
movl 0x8(%rsp), %eax
subl $0x8292, %eax           # imm = 0x8292
je 0x36b30
jmp 0x36933
movl 0x8(%rsp), %eax
subl $0x8293, %eax           # imm = 0x8293
je 0x36a7a
jmp 0x36944
movl 0x8(%rsp), %eax
addl $0xffff7d6c, %eax       # imm = 0xFFFF7D6C
subl $0x2, %eax
jb 0x36a55
jmp 0x36958
movl 0x8(%rsp), %eax
subl $0x8296, %eax           # imm = 0x8296
je 0x36ae6
jmp 0x36969
movl 0x8(%rsp), %eax
addl $0xffff7d69, %eax       # imm = 0xFFFF7D69
subl $0x2, %eax
jb 0x36a55
jmp 0x3697d
movl 0x8(%rsp), %eax
addl $0xffff7d66, %eax       # imm = 0xFFFF7D66
subl $0xd, %eax
jb 0x36a55
jmp 0x36991
movl 0x8(%rsp), %eax
subl $0x82a7, %eax           # imm = 0x82A7
je 0x36a9f
jmp 0x369a2
movl 0x8(%rsp), %eax
subl $0x82a8, %eax           # imm = 0x82A8
je 0x36b55
jmp 0x369b3
movl 0x8(%rsp), %eax
subl $0x82a9, %eax           # imm = 0x82A9
je 0x36b9f
jmp 0x369c4
movl 0x8(%rsp), %eax
subl $0x82aa, %eax           # imm = 0x82AA
je 0x36bc4
jmp 0x369d5
movl 0x8(%rsp), %eax
addl $0xffff7d54, %eax       # imm = 0xFFFF7D54
subl $0x4, %eax
jb 0x36a55
jmp 0x369e5
movl 0x8(%rsp), %eax
addl $0xffff7d4f, %eax       # imm = 0xFFFF7D4F
subl $0x3, %eax
jb 0x36a9f
jmp 0x369f9
movl 0x8(%rsp), %eax
addl $0xffff7d4c, %eax       # imm = 0xFFFF7D4C
subl $0x2, %eax
jb 0x36a55
jmp 0x36a09
movl 0x8(%rsp), %eax
subl $0x82b6, %eax           # imm = 0x82B6
je 0x36be9
jmp 0x36a1a
movl 0x8(%rsp), %eax
subl $0x86a1, %eax           # imm = 0x86A1
je 0x36a7a
jmp 0x36a27
movl 0x8(%rsp), %eax
subl $0x90c7, %eax           # imm = 0x90C7
je 0x36b7a
jmp 0x36a38
movl 0x8(%rsp), %eax
subl $0x9365, %eax           # imm = 0x9365
je 0x36a55
jmp 0x36a45
movl 0x8(%rsp), %eax
subl $0x9380, %eax           # imm = 0x9380
je 0x36a9f
jmp 0x36ce3
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x67, %r8d
callq 0x36d10
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x1, %r8d
callq 0x36d70
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
xorl %r8d, %r8d
callq 0x36d70
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x9380, %r8d           # imm = 0x9380
callq 0x36df0
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x2b, %r8d
callq 0x36d10
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x12, %r8d
callq 0x36d10
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x7, %r8d
callq 0x36d10
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x68, %r8d
callq 0x36d10
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x69, %r8d
callq 0x36d10
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x12, %r8d
callq 0x36d10
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x7, %r8d
callq 0x36d10
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x6a, %r8d
callq 0x36d10
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x11, %r8d
callq 0x36d10
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x2a, %r8d
callq 0x36d10
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x12, %r8d
callq 0x36d10
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x7, %r8d
callq 0x36d10
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x12, %r8d
callq 0x36d10
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x7, %r8d
callq 0x36d10
movl %eax, 0x24(%rsp)
jmp 0x36d06
movq 0x18(%rsp), %rdi
leaq 0x1b596(%rip), %rsi     # 0x52285
leaq 0x25d50(%rip), %rdx     # 0x5ca46
movl $0xb3, %ecx
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop