// File: /workspace/github_c_makefile_star2_O2/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 0x73d0
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 0x7980
leaq 0x2d05(%rip), %rdx      # 0x13065
pushq $-0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
movq 0x70(%r14), %rsi
movq %rbx, %rdi
callq 0x7540
leaq 0x34c1(%rip), %rdx      # 0x13841
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
movq 0x78(%r14), %rsi
movq %rbx, %rdi
callq 0x7540
leaq 0x34b8(%rip), %rdx      # 0x13855
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
movq 0x80(%r14), %rsi
movq 0x88(%r14), %rdx
movq %rbx, %rdi
callq 0x7bb0
leaq 0x3489(%rip), %rdx      # 0x1384d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
movl 0x90(%r14), %edx
pushq $0xb
popq %rsi
movq %rbx, %rdi
callq 0x7280
leaq 0x1e45(%rip), %rdx      # 0x1222c
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
movl 0x90(%r14), %eax
cmpl $0x706c6f74, %eax       # imm = 0x706C6F74
je 0x10466
cmpl $0x636f6d70, %eax       # imm = 0x636F6D70
je 0x1049f
cmpl $0x6f75746c, %eax       # imm = 0x6F75746C
je 0x10466
cmpl $0x62697473, %eax       # imm = 0x62697473
jne 0x105e8
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)
pushq $0x1
popq %rcx
movq %rbx, %rdi
callq 0x7cf0
leaq 0xbe9(%rip), %rdx       # 0x1104a
jmp 0x105dd
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 0x7360
leaq 0x2e91(%rip), %rdx      # 0x1332b
jmp 0x105dd
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x73d0
leaq 0x50(%rsp), %r13
leaq 0x4c(%rsp), %rbp
pushq $-0x2
popq %r15
xorl %r12d, %r12d
movl 0xf0(%r14), %eax
cmpq %rax, %r12
jae 0x105d6
leaq 0x58(%rsp), %rax
movq %rax, (%rsp)
movq %r14, %rdi
movl %r12d, %esi
leaq 0x54(%rsp), %rdx
leaq 0x48(%rsp), %rcx
movq %r13, %r8
movq %rbp, %r9
callq 0x7510
testl %eax, %eax
je 0x1050d
movl %eax, %edi
callq 0x7d30
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x7a70
jmp 0x105c0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x73d0
movl 0x54(%rsp), %esi
movq %rbx, %rdi
callq 0x7ce0
movq %rbx, %rdi
movl %r15d, %esi
leaq 0x17f6(%rip), %rdx      # 0x11d28
callq 0x74f0
movl 0x48(%rsp), %esi
movq %rbx, %rdi
callq 0x7540
movq %rbx, %rdi
movl %r15d, %esi
leaq 0x2311(%rip), %rdx      # 0x12861
callq 0x74f0
movslq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x7540
movq %rbx, %rdi
movl %r15d, %esi
leaq 0x3444(%rip), %rdx      # 0x139b3
callq 0x74f0
movslq 0x4c(%rsp), %rsi
movq %rbx, %rdi
callq 0x7540
movq %rbx, %rdi
movl %r15d, %esi
leaq 0x342a(%rip), %rdx      # 0x139b8
callq 0x74f0
movups 0x58(%rsp), %xmm0
movups 0x68(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x7bf0
movq %rbx, %rdi
movl %r15d, %esi
leaq 0x2a73(%rip), %rdx      # 0x1302e
callq 0x74f0
incq %r12
movq %rbx, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x76b0
jmp 0x104bc
leaq 0x328c(%rip), %rdx      # 0x13869
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x74f0
movq 0x108(%r14), %rdx
testq %rdx, %rdx
jle 0x10615
movq 0x100(%r14), %rsi
movq %rbx, %rdi
callq 0x7970
leaq 0x3269(%rip), %rdx      # 0x13873
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x74f0
movq 0x110(%r14), %rsi
movq %rbx, %rdi
callq 0x7540
leaq 0x3255(%rip), %rdx      # 0x13880
pushq $-0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
movq 0x118(%r14), %rsi
movq %rbx, %rdi
callq 0x7540
leaq 0x323c(%rip), %rdx      # 0x1388a
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
pushq $0x1
popq %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq