// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglmath/src/utils.c
// Function: moonglmath_checkoption_hint
int checkoption_hint(lua_State *L, int arg, const char *def, const char *const lst[])
/* Variant of luaL_checkoption(), with an added hint in the error message */
    {
    const char *hint = NULL;
    const char *name = (def) ? luaL_optstring(L, arg, def) : luaL_checkstring(L, arg);
    int i;
    for (i=0; lst[i]; i++)
        if (strcmp(lst[i], name) == 0)  return i;

    if(lua_checkstack(L, i*2))
        {
        for(i=0; lst[i]; i++)
            {
            lua_pushfstring(L, "'%s'", lst[i]);
            lua_pushstring(L, "|");
            }
        i = i*2;
        if(i>0)
            {
            lua_pop(L, 1); /* the last separator */
            lua_concat(L, i-1);
            hint = lua_tostring(L, -1); 
            }
        }
    if(hint)
        return luaL_argerror(L, arg, lua_pushfstring(L, 
                    "invalid option '%s', valid options are: %s", name, hint));
    return luaL_argerror(L, arg, lua_pushfstring(L, "invalid option '%s'", name));
    }

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movl %esi, 0x54(%rsp)
movq %rdx, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x1e886
movq 0x58(%rsp), %rdi
movl 0x54(%rsp), %esi
movq 0x48(%rsp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x8360
movq %rax, 0x20(%rsp)
jmp 0x1e89d
movq 0x58(%rsp), %rdi
movl 0x54(%rsp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x8600
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movq 0x40(%rsp), %rax
movslq 0x2c(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x1e8f9
movq 0x40(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x30(%rsp), %rsi
callq 0x8700
cmpl $0x0, %eax
jne 0x1e8ea
movl 0x2c(%rsp), %eax
movl %eax, 0x64(%rsp)
jmp 0x1ea40
jmp 0x1e8ec
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x1e8af
movq 0x58(%rsp), %rdi
movl 0x2c(%rsp), %esi
shll %esi
callq 0x8030
cmpl $0x0, %eax
je 0x1e9b5
movl $0x0, 0x2c(%rsp)
movq 0x40(%rsp), %rax
movslq 0x2c(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x1e96a
movq 0x58(%rsp), %rdi
movq 0x40(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x4f16(%rip), %rsi      # 0x2385b
movb $0x0, %al
callq 0x8660
movq 0x58(%rsp), %rdi
leaq 0x4fbd(%rip), %rsi      # 0x23915
callq 0x8de0
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x1e91a
movl 0x2c(%rsp), %eax
shll %eax
movl %eax, 0x2c(%rsp)
cmpl $0x0, 0x2c(%rsp)
jle 0x1e9b3
movq 0x58(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
movq 0x58(%rsp), %rdi
movl 0x2c(%rsp), %esi
subl $0x1, %esi
callq 0x8ca0
movq 0x58(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x82c0
movq %rax, 0x38(%rsp)
jmp 0x1e9b5
cmpq $0x0, 0x38(%rsp)
je 0x1ea03
movq 0x58(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x54(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x58(%rsp), %rdi
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x4f32(%rip), %rsi      # 0x23917
movb $0x0, %al
callq 0x8660
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %esi
movq %rax, %rdx
callq 0x81b0
movl %eax, 0x64(%rsp)
jmp 0x1ea40
movq 0x58(%rsp), %rax
movq %rax, (%rsp)
movl 0x54(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x58(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0x4f1d(%rip), %rsi      # 0x23942
movb $0x0, %al
callq 0x8660
movq (%rsp), %rdi
movl 0xc(%rsp), %esi
movq %rax, %rdx
callq 0x81b0
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopl (%rax)