// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x73d0
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rax
addq $0x30, %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups 0x30(%rax), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x7980
movq 0x50(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x3a7e(%rip), %rdx      # 0x1b05f
callq 0x74f0
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rax
movq 0x70(%rax), %rsi
callq 0x7540
movq 0x50(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x4267(%rip), %rdx      # 0x1b871
callq 0x74f0
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rax
movq 0x78(%rax), %rsi
callq 0x7540
movq 0x50(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x4252(%rip), %rdx      # 0x1b885
callq 0x74f0
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rax
movq 0x80(%rax), %rsi
movq 0x88(%rax), %rdx
callq 0x7bb0
movq 0x50(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x4217(%rip), %rdx      # 0x1b87d
callq 0x74f0
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rax
movl 0x90(%rax), %edx
movl $0xb, %esi
callq 0x7280
movq 0x50(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x2e7c(%rip), %rdx      # 0x1a512
callq 0x74f0
movq 0x48(%rsp), %rax
cmpl $0x62697473, 0x90(%rax) # imm = 0x62697473
jne 0x17711
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rcx
addq $0x98, %rcx
movq 0x48(%rsp), %rax
movl 0xc0(%rax), %esi
movq 0x48(%rsp), %rax
movl 0xc4(%rax), %edx
movq 0x20(%rcx), %r8
movq %rsp, %rax
movq %r8, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movl $0x1, %ecx
callq 0x7cf0
movq 0x50(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x1943(%rip), %rdx      # 0x1904a
callq 0x74f0
jmp 0x17809
movq 0x48(%rsp), %rax
cmpl $0x6f75746c, 0x90(%rax) # imm = 0x6F75746C
je 0x17733
movq 0x48(%rsp), %rax
cmpl $0x706c6f74, 0x90(%rax) # imm = 0x706C6F74
jne 0x1777d
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rcx
addq $0xc8, %rcx
movq 0x20(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x7360
movq 0x50(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x3bb8(%rip), %rdx      # 0x1b32b
callq 0x74f0
jmp 0x17807
movq 0x48(%rsp), %rax
cmpl $0x636f6d70, 0x90(%rax) # imm = 0x636F6D70
jne 0x17805
movq 0x50(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x73d0
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
movq 0x48(%rsp), %rcx
cmpl 0xf0(%rcx), %eax
jae 0x177ef
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x44(%rsp), %edx
callq 0x17a40
movq 0x50(%rsp), %rdi
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x76b0
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x177a4
movq 0x50(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x4099(%rip), %rdx      # 0x1b899
callq 0x74f0
jmp 0x17807
jmp 0x17809
movq 0x48(%rsp), %rax
cmpq $0x0, 0x108(%rax)
jle 0x17850
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rax
movq 0x100(%rax), %rsi
movq 0x48(%rsp), %rax
movq 0x108(%rax), %rdx
callq 0x7970
movq 0x50(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x4058(%rip), %rdx      # 0x1b8a3
callq 0x74f0
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rax
movq 0x110(%rax), %rsi
callq 0x7540
movq 0x50(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x4039(%rip), %rdx      # 0x1b8b0
callq 0x74f0
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rax
movq 0x118(%rax), %rsi
callq 0x7540
movq 0x50(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x4017(%rip), %rdx      # 0x1b8ba
callq 0x74f0
movl $0x1, %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)