// File: /workspace/github_c_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x43, %esi
movl $0x2, %edx
callq 0x11160
cmpl $0x8139, %eax           # imm = 0x8139
jg 0x351ef
cmpl $0x2801, %eax           # imm = 0x2801
jg 0x3523a
cmpl $0x1004, %eax           # imm = 0x1004
je 0x352cc
cmpl $0x2800, %eax           # imm = 0x2800
je 0x3536d
cmpl $0x2801, %eax           # imm = 0x2801
jne 0x35405
movq 0x21b29(%rip), %rax     # 0x56cf0
movq %rsp, %r15
movl %r14d, %edi
movl $0x2801, %esi           # imm = 0x2801
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movl (%r15), %edx
movq %rbx, %rdi
movl $0x1b, %esi
jmp 0x353f1
cmpl $0x8500, %eax           # imm = 0x8500
jg 0x3527c
cmpl $0x813a, %eax           # imm = 0x813A
je 0x35335
cmpl $0x813b, %eax           # imm = 0x813B
je 0x35399
cmpl $0x84fe, %eax           # imm = 0x84FE
jne 0x35405
movq %rbx, %rdi
callq 0x11880
movq 0x212ae(%rip), %rax     # 0x564d8
movq %rsp, %r15
movl %r14d, %edi
movl $0x84fe, %esi           # imm = 0x84FE
jmp 0x353b3
leal -0x2802(%rax), %ecx
cmpl $0x2, %ecx
jb 0x35250
cmpl $0x8072, %eax           # imm = 0x8072
jne 0x35405
movq 0x21a99(%rip), %rcx     # 0x56cf0
movq %rsp, %r15
movl %r14d, %edi
movl %eax, %esi
movq %r15, %rdx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
movl (%r15), %edx
movq %rbx, %rdi
movl $0x19, %esi
jmp 0x353f1
cmpl $0x8501, %eax           # imm = 0x8501
je 0x35351
cmpl $0x884c, %eax           # imm = 0x884C
je 0x353c7
cmpl $0x884d, %eax           # imm = 0x884D
jne 0x35405
movq 0x21a4c(%rip), %rax     # 0x56cf0
movq %rsp, %r15
movl %r14d, %edi
movl $0x884d, %esi           # imm = 0x884D
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movl (%r15), %edx
movq %rbx, %rdi
movl $0x16, %esi
jmp 0x353f1
movq %rbx, %rdi
callq 0x11880
movq 0x211fd(%rip), %rax     # 0x564d8
movq %rsp, %r15
movl %r14d, %edi
movl $0x1004, %esi           # imm = 0x1004
movq %r15, %rdx
callq *(%rax)
cvtss2sd (%r15), %xmm0
movq %rbx, %rdi
callq 0x11380
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r15), %xmm0
movq %rbx, %rdi
callq 0x11380
xorps %xmm0, %xmm0
cvtss2sd 0x8(%r15), %xmm0
movq %rbx, %rdi
callq 0x11380
xorps %xmm0, %xmm0
cvtss2sd 0xc(%r15), %xmm0
movq %rbx, %rdi
callq 0x11380
movl $0x4, %eax
jmp 0x353fb
movq %rbx, %rdi
callq 0x11880
movq 0x21194(%rip), %rax     # 0x564d8
movq %rsp, %r15
movl %r14d, %edi
movl $0x813a, %esi           # imm = 0x813A
jmp 0x353b3
movq %rbx, %rdi
callq 0x11880
movq 0x21178(%rip), %rax     # 0x564d8
movq %rsp, %r15
movl %r14d, %edi
movl $0x8501, %esi           # imm = 0x8501
jmp 0x353b3
movq 0x2197c(%rip), %rax     # 0x56cf0
movq %rsp, %r15
movl %r14d, %edi
movl $0x2800, %esi           # imm = 0x2800
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movl (%r15), %edx
movq %rbx, %rdi
movl $0x1a, %esi
jmp 0x353f1
movq %rbx, %rdi
callq 0x11880
movq 0x21130(%rip), %rax     # 0x564d8
movq %rsp, %r15
movl %r14d, %edi
movl $0x813b, %esi           # imm = 0x813B
movq %r15, %rdx
callq *(%rax)
cvtss2sd (%r15), %xmm0
movq %rbx, %rdi
callq 0x11380
jmp 0x353f6
movq 0x21922(%rip), %rax     # 0x56cf0
movq %rsp, %r15
movl %r14d, %edi
movl $0x884c, %esi           # imm = 0x884C
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movl (%r15), %edx
movq %rbx, %rdi
movl $0x17, %esi
callq 0x11120
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x9e79(%rip), %rsi      # 0x3f285
leaq 0x15d16(%rip), %rdx     # 0x4b129
movq %rbx, %rdi
movl $0xa7, %ecx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x11ae0
nop