// File: /workspace/github_c_makefile_star2_O0/stetre[P]moongl/src/sampler.c
// Function: GetSamplerParameter
static int GetSamplerParameter(lua_State *L)
    {
    GLuint sampler = luaL_checkinteger(L, 1);
    GLenum pname = checksamplerpname(L, 2);
    switch(pname)
        {
        case GL_TEXTURE_WRAP_S:
        case GL_TEXTURE_WRAP_T:
        case GL_TEXTURE_WRAP_R: return GetEnum(L, sampler, pname, DOMAIN_WRAP);
        case GL_TEXTURE_MIN_FILTER:  return GetEnum(L, sampler, pname, DOMAIN_MIN_FILTER);
        case GL_TEXTURE_MAG_FILTER:  return GetEnum(L, sampler, pname, DOMAIN_MAG_FILTER);
        case GL_TEXTURE_BORDER_COLOR:  return GetFloat4(L, sampler, pname);
        case GL_TEXTURE_MIN_LOD:  return GetFloat(L, sampler, pname);
        case GL_TEXTURE_MAX_LOD:  return GetFloat(L, sampler, pname);
        case GL_TEXTURE_LOD_BIAS: return GetFloat(L, sampler, pname);
        case GL_TEXTURE_COMPARE_MODE:  return GetEnum(L, sampler, pname, DOMAIN_COMPARE_MODE);
        case GL_TEXTURE_COMPARE_FUNC: return GetEnum(L, sampler, pname, DOMAIN_COMPARE_FUNC);
        case GL_TEXTURE_MAX_ANISOTROPY:  return GetFloat(L, sampler, pname); //GL_VERSION_4_6
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x11af0
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rdi
movl $0x43, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, 0xc(%rsp)
subl $0x1004, %eax           # imm = 0x1004
je 0x42091
jmp 0x41f89
movl 0xc(%rsp), %eax
subl $0x2800, %eax           # imm = 0x2800
je 0x42071
jmp 0x41f9a
movl 0xc(%rsp), %eax
subl $0x2801, %eax           # imm = 0x2801
je 0x42051
jmp 0x41fab
movl 0xc(%rsp), %eax
addl $0xffffd7fe, %eax       # imm = 0xFFFFD7FE
subl $0x2, %eax
jb 0x42031
jmp 0x41fbb
movl 0xc(%rsp), %eax
subl $0x8072, %eax           # imm = 0x8072
je 0x42031
jmp 0x41fc8
movl 0xc(%rsp), %eax
subl $0x813a, %eax           # imm = 0x813A
je 0x420ac
jmp 0x41fd9
movl 0xc(%rsp), %eax
subl $0x813b, %eax           # imm = 0x813B
je 0x420c7
jmp 0x41fea
movl 0xc(%rsp), %eax
subl $0x84fe, %eax           # imm = 0x84FE
je 0x42134
jmp 0x41ffb
movl 0xc(%rsp), %eax
subl $0x8501, %eax           # imm = 0x8501
je 0x420e2
jmp 0x4200c
movl 0xc(%rsp), %eax
subl $0x884c, %eax           # imm = 0x884C
je 0x420fa
jmp 0x4201d
movl 0xc(%rsp), %eax
subl $0x884d, %eax           # imm = 0x884D
je 0x42117
jmp 0x4214c
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl $0x19, %ecx
callq 0x42290
movl %eax, 0x24(%rsp)
jmp 0x4216f
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl $0x1b, %ecx
callq 0x42290
movl %eax, 0x24(%rsp)
jmp 0x4216f
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl $0x1a, %ecx
callq 0x42290
movl %eax, 0x24(%rsp)
jmp 0x4216f
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
callq 0x422f0
movl %eax, 0x24(%rsp)
jmp 0x4216f
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
callq 0x42380
movl %eax, 0x24(%rsp)
jmp 0x4216f
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
callq 0x42380
movl %eax, 0x24(%rsp)
jmp 0x4216f
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
callq 0x42380
movl %eax, 0x24(%rsp)
jmp 0x4216f
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl $0x17, %ecx
callq 0x42290
movl %eax, 0x24(%rsp)
jmp 0x4216f
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl $0x16, %ecx
callq 0x42290
movl %eax, 0x24(%rsp)
jmp 0x4216f
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
callq 0x42380
movl %eax, 0x24(%rsp)
jmp 0x4216f
movq 0x18(%rsp), %rdi
leaq 0x1012d(%rip), %rsi     # 0x52285
leaq 0x1b668(%rip), %rdx     # 0x5d7c7
movl $0xa7, %ecx
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)