// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r14
pushq $0x43
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
leal -0x2802(%rax), %ecx
cmpl $0x2, %ecx
jb 0x32478
cmpl $0x1004, %eax           # imm = 0x1004
je 0x3250d
cmpl $0x2800, %eax           # imm = 0x2800
je 0x324de
cmpl $0x2801, %eax           # imm = 0x2801
je 0x32485
cmpl $0x884d, %eax           # imm = 0x884D
je 0x324ee
cmpl $0x813a, %eax           # imm = 0x813A
je 0x324a2
cmpl $0x813b, %eax           # imm = 0x813B
je 0x324cc
cmpl $0x84fe, %eax           # imm = 0x84FE
je 0x32495
cmpl $0x8501, %eax           # imm = 0x8501
je 0x324af
cmpl $0x884c, %eax           # imm = 0x884C
je 0x324bc
cmpl $0x8072, %eax           # imm = 0x8072
jne 0x3253c
pushq $0x19
popq %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl %eax, %edx
jmp 0x324fc
pushq $0x1b
popq %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl $0x2801, %edx           # imm = 0x2801
jmp 0x324fc
movq %rbx, %rdi
movl %r14d, %esi
movl $0x84fe, %edx           # imm = 0x84FE
jmp 0x324d7
movq %rbx, %rdi
movl %r14d, %esi
movl $0x813a, %edx           # imm = 0x813A
jmp 0x324d7
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8501, %edx           # imm = 0x8501
jmp 0x324d7
pushq $0x17
popq %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl $0x884c, %edx           # imm = 0x884C
jmp 0x324fc
movq %rbx, %rdi
movl %r14d, %esi
movl $0x813b, %edx           # imm = 0x813B
callq 0x3272a
jmp 0x32501
pushq $0x1a
popq %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl $0x2800, %edx           # imm = 0x2800
jmp 0x324fc
pushq $0x16
popq %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl $0x884d, %edx           # imm = 0x884D
callq 0x326fa
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
pushq $0x3
popq %rsi
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rdx
callq 0x113f0
movq 0x23743(%rip), %rax     # 0x55c68
movl %r14d, %edi
movl $0x1004, %esi           # imm = 0x1004
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
jmp 0x32501
leaq 0x8d42(%rip), %rsi      # 0x3b285
leaq 0x14c07(%rip), %rdx     # 0x47151
pushq $0x6c
popq %rcx
movq %rbx, %rdi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x11ae0