// File: /workspace/github_c_makefile_star2_O2/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, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x11af0
movq %rax, %r15
pushq $0x43
popq %rsi
pushq $0x2
popq %rdx
movq %r14, %rdi
callq 0x11150
leal -0x2802(%rax), %ecx
cmpl $0x2, %ecx
jb 0x325e8
cmpl $0x1004, %eax           # imm = 0x1004
je 0x3267d
cmpl $0x2800, %eax           # imm = 0x2800
je 0x3264e
cmpl $0x2801, %eax           # imm = 0x2801
je 0x325f5
cmpl $0x884d, %eax           # imm = 0x884D
je 0x3265e
cmpl $0x813a, %eax           # imm = 0x813A
je 0x32612
cmpl $0x813b, %eax           # imm = 0x813B
je 0x3263c
cmpl $0x84fe, %eax           # imm = 0x84FE
je 0x32605
cmpl $0x8501, %eax           # imm = 0x8501
je 0x3261f
cmpl $0x884c, %eax           # imm = 0x884C
je 0x3262c
cmpl $0x8072, %eax           # imm = 0x8072
jne 0x326d4
pushq $0x19
popq %rcx
movq %r14, %rdi
movl %r15d, %esi
movl %eax, %edx
jmp 0x3266c
pushq $0x1b
popq %rcx
movq %r14, %rdi
movl %r15d, %esi
movl $0x2801, %edx           # imm = 0x2801
jmp 0x3266c
movq %r14, %rdi
movl %r15d, %esi
movl $0x84fe, %edx           # imm = 0x84FE
jmp 0x32647
movq %r14, %rdi
movl %r15d, %esi
movl $0x813a, %edx           # imm = 0x813A
jmp 0x32647
movq %r14, %rdi
movl %r15d, %esi
movl $0x8501, %edx           # imm = 0x8501
jmp 0x32647
pushq $0x17
popq %rcx
movq %r14, %rdi
movl %r15d, %esi
movl $0x884c, %edx           # imm = 0x884C
jmp 0x3266c
movq %r14, %rdi
movl %r15d, %esi
movl $0x813b, %edx           # imm = 0x813B
callq 0x3279c
jmp 0x32671
pushq $0x1a
popq %rcx
movq %r14, %rdi
movl %r15d, %esi
movl $0x2800, %edx           # imm = 0x2800
jmp 0x3266c
pushq $0x16
popq %rcx
movq %r14, %rdi
movl %r15d, %esi
movl $0x884d, %edx           # imm = 0x884D
callq 0x3275a
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x11870
movq 0x22e4c(%rip), %rax     # 0x554d8
movq %rsp, %rbx
movl %r15d, %edi
movl $0x1004, %esi           # imm = 0x1004
movq %rbx, %rdx
callq *(%rax)
cvtss2sd (%rbx), %xmm0
movq %r14, %rdi
callq 0x11370
cvtss2sd 0x4(%rbx), %xmm0
movq %r14, %rdi
callq 0x11370
cvtss2sd 0x8(%rbx), %xmm0
movq %r14, %rdi
callq 0x11370
cvtss2sd 0xc(%rbx), %xmm0
movq %r14, %rdi
callq 0x11370
pushq $0x4
popq %rbx
jmp 0x32671
leaq 0x8baa(%rip), %rsi      # 0x3b285
leaq 0x14a6f(%rip), %rdx     # 0x47151
movq %r14, %rdi
movl $0xa7, %ecx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x11ae0