// File: /workspace/github_c_makefile_star2_O0/stetre[P]moongl/src/sampler.c
// Function: SamplerParameter
static int SamplerParameter(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 SetEnum(L, sampler, pname, 3, DOMAIN_WRAP);
        case GL_TEXTURE_MIN_FILTER:  return SetEnum(L, sampler, pname, 3, DOMAIN_MIN_FILTER);
        case GL_TEXTURE_MAG_FILTER:  return SetEnum(L, sampler, pname, 3, DOMAIN_MAG_FILTER);
        case GL_TEXTURE_BORDER_COLOR:  return SetColor(L, sampler, pname, 3);
        case GL_TEXTURE_MIN_LOD:  return SetFloat(L, sampler, pname, 3);
        case GL_TEXTURE_MAX_LOD:  return SetFloat(L, sampler, pname, 3);
        case GL_TEXTURE_LOD_BIAS: return SetFloat(L, sampler, pname, 3);
        case GL_TEXTURE_COMPARE_MODE:  return SetEnum(L, sampler, pname, 3, DOMAIN_COMPARE_MODE);
        case GL_TEXTURE_COMPARE_FUNC:  return SetEnum(L, sampler, pname, 3, DOMAIN_COMPARE_FUNC);
        case GL_TEXTURE_MAX_ANISOTROPY:  return SetFloat(L, sampler, pname, 3); //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 0x41e23
jmp 0x41d09
movl 0xc(%rsp), %eax
subl $0x2800, %eax           # imm = 0x2800
je 0x41dfd
jmp 0x41d1a
movl 0xc(%rsp), %eax
subl $0x2801, %eax           # imm = 0x2801
je 0x41dd7
jmp 0x41d2b
movl 0xc(%rsp), %eax
addl $0xffffd7fe, %eax       # imm = 0xFFFFD7FE
subl $0x2, %eax
jb 0x41db1
jmp 0x41d3b
movl 0xc(%rsp), %eax
subl $0x8072, %eax           # imm = 0x8072
je 0x41db1
jmp 0x41d48
movl 0xc(%rsp), %eax
subl $0x813a, %eax           # imm = 0x813A
je 0x41e43
jmp 0x41d59
movl 0xc(%rsp), %eax
subl $0x813b, %eax           # imm = 0x813B
je 0x41e63
jmp 0x41d6a
movl 0xc(%rsp), %eax
subl $0x84fe, %eax           # imm = 0x84FE
je 0x41ee9
jmp 0x41d7b
movl 0xc(%rsp), %eax
subl $0x8501, %eax           # imm = 0x8501
je 0x41e83
jmp 0x41d8c
movl 0xc(%rsp), %eax
subl $0x884c, %eax           # imm = 0x884C
je 0x41ea3
jmp 0x41d9d
movl 0xc(%rsp), %eax
subl $0x884d, %eax           # imm = 0x884D
je 0x41ec6
jmp 0x41f06
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl $0x3, %ecx
movl $0x19, %r8d
callq 0x42180
movl %eax, 0x24(%rsp)
jmp 0x41f29
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl $0x3, %ecx
movl $0x1b, %r8d
callq 0x42180
movl %eax, 0x24(%rsp)
jmp 0x41f29
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl $0x3, %ecx
movl $0x1a, %r8d
callq 0x42180
movl %eax, 0x24(%rsp)
jmp 0x41f29
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl $0x3, %ecx
callq 0x421e0
movl %eax, 0x24(%rsp)
jmp 0x41f29
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl $0x3, %ecx
callq 0x42230
movl %eax, 0x24(%rsp)
jmp 0x41f29
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl $0x3, %ecx
callq 0x42230
movl %eax, 0x24(%rsp)
jmp 0x41f29
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl $0x3, %ecx
callq 0x42230
movl %eax, 0x24(%rsp)
jmp 0x41f29
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl $0x3, %ecx
movl $0x17, %r8d
callq 0x42180
movl %eax, 0x24(%rsp)
jmp 0x41f29
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl $0x3, %ecx
movl $0x16, %r8d
callq 0x42180
movl %eax, 0x24(%rsp)
jmp 0x41f29
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl $0x3, %ecx
callq 0x42230
movl %eax, 0x24(%rsp)
jmp 0x41f29
movq 0x18(%rsp), %rdi
leaq 0x10373(%rip), %rsi     # 0x52285
leaq 0x1b8ae(%rip), %rdx     # 0x5d7c7
movl $0x6c, %ecx
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)