// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonfreetype/src/utils.c
// Function: moonfreetype_pushglyphslot
int pushglyphslot(lua_State *L, FT_GlyphSlot glyph)
    {
    FT_UInt i;

    lua_newtable(L);
    pushglyphmetrics(L, glyph->metrics);
    lua_setfield(L, -2, "metrics");
    lua_pushinteger(L, glyph->linearHoriAdvance);
    lua_setfield(L, -2, "linear_hori_advance");
    lua_pushinteger(L, glyph->linearVertAdvance);
    lua_setfield(L, -2, "linear_vert_advance");
    pushvector(L, glyph->advance);
    lua_setfield(L, -2, "advance");
    pushglyphformat(L, glyph->format);
    lua_setfield(L, -2, "format");
    if(glyph->format == FT_GLYPH_FORMAT_BITMAP)
        {
        pushbitmapdata(L, glyph->bitmap, glyph->bitmap_left, glyph->bitmap_top, 1);
        lua_setfield(L, -2, "bitmap");
        }
    else if((glyph->format == FT_GLYPH_FORMAT_OUTLINE)||(glyph->format == FT_GLYPH_FORMAT_PLOTTER))
        {
        pushoutlinedata(L, glyph->outline);
        lua_setfield(L, -2, "outline");
        }
    else if(glyph->format == FT_GLYPH_FORMAT_COMPOSITE)
        {
#if 0
        lua_pushinteger(L, glyph->num_subglyphs);
        lua_setfield(L, -2, "num_subglyphs");
#endif
        lua_newtable(L);
        for(i = 0; i <  glyph->num_subglyphs; i++)
            {
            pushsubglyph(L, glyph, i);
            lua_seti(L, -2, i+1);
            }
        lua_setfield(L, -2, "subglyphs");
        }

    if(glyph->control_len > 0)
        {
#if 0
        lua_pushinteger(L, glyph->control_len );
        lua_setfield(L, -2, "control_len");
#endif
        lua_pushlstring(L, (char*)glyph->control_data, (size_t)glyph->control_len);
        lua_setfield(L, -2, "control_data");
        }
    lua_pushinteger(L, glyph->lsb_delta);
    lua_setfield(L, -2, "lsb_delta");
    lua_pushinteger(L, glyph->rsb_delta);
    lua_setfield(L, -2, "rsb_delta");
    // glyph->other: not supported (need the size...)
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x73c0
movups 0x30(%r14), %xmm0
movups 0x40(%r14), %xmm1
movups 0x50(%r14), %xmm2
movups 0x60(%r14), %xmm3
movups %xmm3, 0x30(%rsp)
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x7970
leaq 0x37e2(%rip), %rdx      # 0x14045
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movq 0x70(%r14), %rsi
movq %rbx, %rdi
callq 0x7530
leaq 0x3f9e(%rip), %rdx      # 0x14821
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movq 0x78(%r14), %rsi
movq %rbx, %rdi
callq 0x7530
leaq 0x3f92(%rip), %rdx      # 0x14835
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movq 0x80(%r14), %rsi
movq 0x88(%r14), %rdx
movq %rbx, %rdi
callq 0x7b90
leaq 0x3f60(%rip), %rdx      # 0x1482d
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movl 0x90(%r14), %edx
movq %rbx, %rdi
movl $0xb, %esi
callq 0x7280
leaq 0x2917(%rip), %rdx      # 0x1320c
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movl 0x90(%r14), %eax
cmpl $0x6f75746b, %eax       # imm = 0x6F75746B
jg 0x10a8c
cmpl $0x62697473, %eax       # imm = 0x62697473
je 0x10ad4
cmpl $0x636f6d70, %eax       # imm = 0x636F6D70
jne 0x10b28
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x73c0
leaq 0x3f0c(%rip), %rdx      # 0x14849
cmpl $0x0, 0xf0(%r14)
je 0x10b1b
leaq 0x48(%rsp), %r13
leaq 0x50(%rsp), %rbp
leaq 0x4c(%rsp), %r15
xorl %r12d, %r12d
leaq 0x58(%rsp), %rax
movq %rax, (%rsp)
movq %r14, %rdi
movl %r12d, %esi
leaq 0x54(%rsp), %rdx
movq %r13, %rcx
movq %rbp, %r8
movq %r15, %r9
callq 0x7500
testl %eax, %eax
je 0x1099c
movl %eax, %edi
callq 0x7d00
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x7a60
jmp 0x10a5d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x73c0
movslq 0x54(%rsp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x7530
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x2341(%rip), %rdx      # 0x12d08
callq 0x74e0
movl 0x48(%rsp), %esi
movq %rbx, %rdi
callq 0x7530
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x2e5a(%rip), %rdx      # 0x13841
callq 0x74e0
movslq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x7530
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x3f8b(%rip), %rdx      # 0x14993
callq 0x74e0
movslq 0x4c(%rsp), %rsi
movq %rbx, %rdi
callq 0x7530
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x3f6f(%rip), %rdx      # 0x14998
callq 0x74e0
movups 0x58(%rsp), %xmm0
movups 0x68(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x7bd0
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x35b6(%rip), %rdx      # 0x1400e
callq 0x74e0
incq %r12
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r12, %rdx
callq 0x76a0
movl 0xf0(%r14), %eax
cmpq %rax, %r12
jb 0x1095d
leaq 0x3dc2(%rip), %rdx      # 0x14849
jmp 0x10b1b
cmpl $0x6f75746c, %eax       # imm = 0x6F75746C
je 0x10a9e
cmpl $0x706c6f74, %eax       # imm = 0x706C6F74
jne 0x10b28
movq 0xe8(%r14), %rax
movq %rax, 0x20(%rsp)
movups 0xc8(%r14), %xmm0
movups 0xd8(%r14), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x7350
leaq 0x3839(%rip), %rdx      # 0x1430b
jmp 0x10b1b
movl 0xc0(%r14), %esi
movl 0xc4(%r14), %edx
movq 0xb8(%r14), %rax
movq %rax, 0x20(%rsp)
movups 0x98(%r14), %xmm0
movups 0xa8(%r14), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x7cd0
leaq 0x152f(%rip), %rdx      # 0x1204a
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movq 0x108(%r14), %rdx
testq %rdx, %rdx
jle 0x10b57
movq 0x100(%r14), %rsi
movq %rbx, %rdi
callq 0x7960
leaq 0x3d09(%rip), %rdx      # 0x14853
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movq 0x110(%r14), %rsi
movq %rbx, %rdi
callq 0x7530
leaq 0x3cf3(%rip), %rdx      # 0x14860
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movq 0x118(%r14), %rsi
movq %rbx, %rdi
callq 0x7530
leaq 0x3cda(%rip), %rdx      # 0x1486a
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movl $0x1, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq