// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/structs.c
// Function: moonnuklear_echeckfontconfig
nk_font_config_t *echeckfontconfig(lua_State *L, int arg, float height, int *err)
    {
    int count;
    nk_font_config_t *p;
    if(lua_isnoneornil(L, arg))
        { *err = ERR_NOTPRESENT; lua_pushstring(L, errstring(ERR_NOTPRESENT)); return NULL; }
    if(lua_type(L, arg) != LUA_TTABLE)
        { *err = ERR_TABLE; lua_pushstring(L, errstring(ERR_TABLE)); return NULL; }
    if((p = (nk_font_config_t*)MallocNoErr(L, sizeof(nk_font_config_t))) == NULL)
        { *err = ERR_MEMORY; lua_pushstring(L, errstring(ERR_MEMORY)); return NULL; }

    p->size = height;

    lua_pushstring(L, "merge_mode"); lua_rawget(L, arg); 
    p->merge_mode = optboolean(L, -1, 0); //@@ DOC
    lua_pop(L, 1);

    lua_pushstring(L, "pixel_snap"); lua_rawget(L, arg); 
    p->pixel_snap = optboolean(L, -1, 0); //@@ DOC
    lua_pop(L, 1);

    lua_pushstring(L, "coord_type"); lua_rawget(L, arg); 
    p->coord_type = testfontcoordtype(L, -1, err);
    lua_pop(L, 1);
    if(*err == ERR_NOTPRESENT)
        p->coord_type = NK_COORD_UV;
    else if(*err)
        { lua_pushstring(L, errstring(*err)); return NULL; }
    
    lua_pushstring(L, "spacing"); lua_rawget(L, arg); 
    *err = echeckvec2(L, -1, &p->spacing);
    lua_pop(L, 1);
    if(*err == ERR_NOTPRESENT)
        p->spacing = nk_vec2(0, 0);
    else if(*err)
        { lua_pushstring(L, errstring(*err)); return NULL; }

    lua_pushstring(L, "oversample_v"); lua_rawget(L, arg); 
    p->oversample_v = luaL_optinteger(L, -1, 1);
    lua_pop(L, 1);

    lua_pushstring(L, "oversample_h"); lua_rawget(L, arg);
    p->oversample_h = luaL_optinteger(L, -1, 3);
    lua_pop(L, 1);

    lua_pushstring(L, "fallback_glyph"); lua_rawget(L, arg);
    p->fallback_glyph = luaL_optinteger(L, -1, '?');
    lua_pop(L, 1);

    lua_pushstring(L, "ranges"); lua_rawget(L, arg);
    if(lua_isnil(L, -1))
        { lua_pop(L, 1); pushrunelist(L, nk_font_default_glyph_ranges()); }
    p->range = checkrunelist(L, -1, &count, err);
    lua_pop(L, 1);
    if(*err)
        { Free(L, p); lua_pushstring(L, errstring(*err)); return NULL; }

    *err = ERR_SUCCESS;
    return p;
    }

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movl %esi, 0x64(%rsp)
movss %xmm0, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x68(%rsp), %rdi
movl 0x64(%rsp), %esi
callq 0x15090
cmpl $0x0, %eax
jg 0x96415
movq 0x58(%rsp), %rax
movl $0x1, (%rax)
movq 0x68(%rsp), %rax
movq %rax, 0x38(%rsp)
movl $0x1, %edi
callq 0x14d10
movq 0x38(%rsp), %rdi
movq %rax, %rsi
callq 0x15240
movq $0x0, 0x70(%rsp)
jmp 0x9688f
movq 0x68(%rsp), %rdi
movl 0x64(%rsp), %esi
callq 0x15090
cmpl $0x5, %eax
je 0x96462
movq 0x58(%rsp), %rax
movl $0xfffffffc, (%rax)     # imm = 0xFFFFFFFC
movq 0x68(%rsp), %rax
movq %rax, 0x30(%rsp)
movl $0xfffffffc, %edi       # imm = 0xFFFFFFFC
callq 0x14d10
movq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x15240
movq $0x0, 0x70(%rsp)
jmp 0x9688f
movq 0x68(%rsp), %rdi
movl $0x58, %esi
callq 0x13ca0
movq %rax, 0x48(%rsp)
cmpq $0x0, %rax
jne 0x964b6
movq 0x58(%rsp), %rax
movl $0xfffffffa, (%rax)     # imm = 0xFFFFFFFA
movq 0x68(%rsp), %rax
movq %rax, 0x28(%rsp)
movl $0xfffffffa, %edi       # imm = 0xFFFFFFFA
callq 0x14d10
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x15240
movq $0x0, 0x70(%rsp)
jmp 0x9688f
movss 0x60(%rsp), %xmm0
movq 0x48(%rsp), %rax
movss %xmm0, 0x20(%rax)
movq 0x68(%rsp), %rdi
leaq 0x1c065(%rip), %rsi     # 0xb2537
callq 0x15240
movq 0x68(%rsp), %rdi
movl 0x64(%rsp), %esi
callq 0x14750
movq 0x68(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x14ba0
movb %al, %cl
movq 0x48(%rsp), %rax
movb %cl, 0x19(%rax)
movq 0x68(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x131a0
movq 0x68(%rsp), %rdi
leaq 0x1c027(%rip), %rsi     # 0xb2542
callq 0x15240
movq 0x68(%rsp), %rdi
movl 0x64(%rsp), %esi
callq 0x14750
movq 0x68(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x14ba0
movb %al, %cl
movq 0x48(%rsp), %rax
movb %cl, 0x1a(%rax)
movq 0x68(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x131a0
movq 0x68(%rsp), %rdi
leaq 0x1bfe9(%rip), %rsi     # 0xb254d
callq 0x15240
movq 0x68(%rsp), %rdi
movl 0x64(%rsp), %esi
callq 0x14750
movq 0x68(%rsp), %rdi
movq 0x58(%rsp), %rcx
movl $0x11, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x145d0
movl %eax, %ecx
movq 0x48(%rsp), %rax
movl %ecx, 0x24(%rax)
movq 0x68(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x131a0
movq 0x58(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x965c1
movq 0x48(%rsp), %rax
movl $0x0, 0x24(%rax)
jmp 0x965fe
movq 0x58(%rsp), %rax
cmpl $0x0, (%rax)
je 0x965fc
movq 0x68(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x58(%rsp), %rax
movl (%rax), %edi
callq 0x14d10
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x15240
movq $0x0, 0x70(%rsp)
jmp 0x9688f
jmp 0x965fe
movq 0x68(%rsp), %rdi
leaq 0x142d2(%rip), %rsi     # 0xaa8dc
callq 0x15240
movq 0x68(%rsp), %rdi
movl 0x64(%rsp), %esi
callq 0x14750
movq 0x68(%rsp), %rdi
movq 0x48(%rsp), %rdx
addq $0x28, %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15460
movl %eax, %ecx
movq 0x58(%rsp), %rax
movl %ecx, (%rax)
movq 0x68(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x131a0
movq 0x58(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x96682
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x13460
movq 0x18(%rsp), %rax
movlpd %xmm0, 0x40(%rsp)
movq 0x40(%rsp), %rcx
movq %rcx, 0x28(%rax)
jmp 0x966bf
movq 0x58(%rsp), %rax
cmpl $0x0, (%rax)
je 0x966bd
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x58(%rsp), %rax
movl (%rax), %edi
callq 0x14d10
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x15240
movq $0x0, 0x70(%rsp)
jmp 0x9688f
jmp 0x966bf
movq 0x68(%rsp), %rdi
leaq 0x1be8d(%rip), %rsi     # 0xb2558
callq 0x15240
movq 0x68(%rsp), %rdi
movl 0x64(%rsp), %esi
callq 0x14750
movq 0x68(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x1, %edx
callq 0x14490
movb %al, %cl
movq 0x48(%rsp), %rax
movb %cl, 0x1b(%rax)
movq 0x68(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x131a0
movq 0x68(%rsp), %rdi
leaq 0x1be4e(%rip), %rsi     # 0xb2565
callq 0x15240
movq 0x68(%rsp), %rdi
movl 0x64(%rsp), %esi
callq 0x14750
movq 0x68(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x3, %edx
callq 0x14490
movb %al, %cl
movq 0x48(%rsp), %rax
movb %cl, 0x1c(%rax)
movq 0x68(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x131a0
movq 0x68(%rsp), %rdi
leaq 0x1be0f(%rip), %rsi     # 0xb2572
callq 0x15240
movq 0x68(%rsp), %rdi
movl 0x64(%rsp), %esi
callq 0x14750
movq 0x68(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x3f, %edx
callq 0x14490
movl %eax, %ecx
movq 0x48(%rsp), %rax
movl %ecx, 0x40(%rax)
movq 0x68(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x131a0
movq 0x68(%rsp), %rdi
leaq 0x108e2(%rip), %rsi     # 0xa7091
callq 0x15240
movq 0x68(%rsp), %rdi
movl 0x64(%rsp), %esi
callq 0x14750
movq 0x68(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15090
cmpl $0x0, %eax
jne 0x96801
movq 0x68(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x131a0
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x13330
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x14240
movq 0x68(%rsp), %rdi
movq 0x58(%rsp), %rcx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x54(%rsp), %rdx
callq 0x13ae0
movq %rax, %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x68(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x131a0
movq 0x58(%rsp), %rax
cmpl $0x0, (%rax)
je 0x9687a
movq 0x68(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x14230
movq 0x68(%rsp), %rax
movq %rax, (%rsp)
movq 0x58(%rsp), %rax
movl (%rax), %edi
callq 0x14d10
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x15240
movq $0x0, 0x70(%rsp)
jmp 0x9688f
movq 0x58(%rsp), %rax
movl $0x0, (%rax)
movq 0x48(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
addq $0x78, %rsp
retq
nopl (%rax)