// File: /workspace/github_c_makefile_star2_O3/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 0x370d(%rip), %rdx      # 0x14045
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movq 0x70(%r14), %rsi
movq %rbx, %rdi
callq 0x7530
leaq 0x3ec9(%rip), %rdx      # 0x14821
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movq 0x78(%r14), %rsi
movq %rbx, %rdi
callq 0x7530
leaq 0x3ebd(%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 0x3e8b(%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 0x2842(%rip), %rdx      # 0x1320c
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movl 0x90(%r14), %eax
cmpl $0x6f75746b, %eax       # imm = 0x6F75746B
jg 0x10b5a
cmpl $0x62697473, %eax       # imm = 0x62697473
je 0x10ba2
cmpl $0x636f6d70, %eax       # imm = 0x636F6D70
jne 0x10bf6
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x73c0
cmpl $0x0, 0xf0(%r14)
je 0x10b4e
leaq 0x48(%rsp), %r12
leaq 0x50(%rsp), %r13
leaq 0x4c(%rsp), %rbp
xorl %r15d, %r15d
leaq 0x58(%rsp), %rax
movq %rax, (%rsp)
movq %r14, %rdi
movl %r15d, %esi
leaq 0x54(%rsp), %rdx
movq %r12, %rcx
movq %r13, %r8
movq %rbp, %r9
callq 0x7500
testl %eax, %eax
je 0x10a6a
movl %eax, %edi
callq 0x7d00
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x7a60
jmp 0x10b2b
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 0x2273(%rip), %rdx      # 0x12d08
callq 0x74e0
movl 0x48(%rsp), %esi
movq %rbx, %rdi
callq 0x7530
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x2d8c(%rip), %rdx      # 0x13841
callq 0x74e0
movslq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x7530
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x3ebd(%rip), %rdx      # 0x14993
callq 0x74e0
movslq 0x4c(%rsp), %rsi
movq %rbx, %rdi
callq 0x7530
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x3ea1(%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 0x34e8(%rip), %rdx      # 0x1400e
callq 0x74e0
incq %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x76a0
movl 0xf0(%r14), %eax
cmpq %rax, %r15
jb 0x10a2b
leaq 0x3cf4(%rip), %rdx      # 0x14849
jmp 0x10be9
cmpl $0x6f75746c, %eax       # imm = 0x6F75746C
je 0x10b6c
cmpl $0x706c6f74, %eax       # imm = 0x706C6F74
jne 0x10bf6
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 0x376b(%rip), %rdx      # 0x1430b
jmp 0x10be9
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 0x1461(%rip), %rdx      # 0x1204a
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movq 0x108(%r14), %rdx
testq %rdx, %rdx
jle 0x10c25
movq 0x100(%r14), %rsi
movq %rbx, %rdi
callq 0x7960
leaq 0x3c3b(%rip), %rdx      # 0x14853
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movq 0x110(%r14), %rsi
movq %rbx, %rdi
callq 0x7530
leaq 0x3c25(%rip), %rdx      # 0x14860
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movq 0x118(%r14), %rsi
movq %rbx, %rdi
callq 0x7530
leaq 0x3c0c(%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