// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonfonts/src/fonts.c
// Function: font_new
static int font_new(lua_State *L, const char *name, createfunc_t create,
    unsigned int first_char, unsigned int num_chars, 
    unsigned int width, unsigned int height, unsigned int height_pow2, unsigned int line_spacing)
    {
    rec_t *rec;
    if((rec = (rec_t*)Malloc(L, sizeof(rec_t))) == NULL) 
        return luaL_error(L, errstring(ERR_MEMORY));

    memset(rec, 0, sizeof(rec_t));
    rec->name= Strdup(L, name);
    rec->font.name = name;
    rec->font.create = create;
    rec->font.num_chars = num_chars;
    rec->font.first_char = first_char;
    rec->font.width = width;
    rec->font.height = height;
    rec->font.height_pow2 = height_pow2;
    rec->font.line_spacing = line_spacing;

    if(search(name))
        {
        Free(L, rec->name);
        Free(L, rec); 
        return unexpected(L); /* duplicate value */
        }
    insert(rec);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r15d
movl %r8d, 0x14(%rsp)
movl %ecx, 0xc(%rsp)
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %r14
movl 0x58(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x50(%rsp), %ebp
movl $0x50, %esi
callq 0x1070
testq %rax, %rax
je 0xf486
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq %r14, %rdi
movq %r12, %rsi
callq 0x1180
movl %r15d, %ecx
movq %rax, %r15
movq %rax, 0x20(%rbx)
movq %r12, 0x28(%rbx)
movq %r13, 0x48(%rbx)
movl 0xc(%rsp), %eax
movl %eax, 0x44(%rbx)
movl $0x20, 0x40(%rbx)
movl 0x14(%rsp), %eax
movl %eax, 0x30(%rbx)
movl %ecx, 0x34(%rbx)
movl %ebp, 0x38(%rbx)
movl 0x10(%rsp), %eax
movl %eax, 0x3c(%rbx)
movq %r12, %rdi
callq 0xed7a
testq %rax, %rax
je 0xf4ab
movq %r14, %rdi
movq %r15, %rsi
callq 0x1190
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1190
leaq 0x1055a9(%rip), %rsi    # 0x114a0b
leaq 0x1055bc(%rip), %rdx    # 0x114a25
movq %r14, %rdi
movl $0x66, %ecx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1170
movl $0xfffffffa, %edi       # imm = 0xFFFFFFFA
callq 0x1050
movq %r14, %rdi
movq %rax, %rsi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1170
movq 0x1927c56(%rip), %rcx   # 0x1937108
testq %rcx, %rcx
je 0xf6b6
movq %rcx, %r14
movq 0x20(%rcx), %rsi
movq %r15, %rdi
callq 0x1100
movq %r14, %rcx
testl %eax, %eax
js 0xf4db
je 0xf6d9
leaq 0x8(%r14), %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
jne 0xf4bb
movq %r14, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movl $0x1, 0x18(%rbx)
notl %eax
shrl $0x1f, %eax
movq %rbx, (%r14,%rax,8)
leaq 0x1927c04(%rip), %rax   # 0x1937108
xorl %ecx, %ecx
cmpl $0x1, 0x18(%r14)
jne 0xf6ad
movq 0x10(%r14), %rdx
movq (%rdx), %rsi
cmpq %rsi, %r14
je 0xf540
testq %rsi, %rsi
je 0xf52d
cmpl $0x1, 0x18(%rsi)
jne 0xf52d
movl %ecx, 0x18(%rsi)
jmp 0xf552
movq (%r14), %rsi
cmpq %rbx, %rsi
je 0xf579
movq %r14, %rsi
movq %rbx, %r14
jmp 0xf5e8
movq 0x8(%rdx), %rdi
testq %rdi, %rdi
je 0xf565
cmpl $0x1, 0x18(%rdi)
jne 0xf565
movl %ecx, 0x18(%rdi)
movl %ecx, 0x18(%r14)
movl $0x1, 0x18(%rdx)
movq %rdx, %r14
jmp 0xf69d
movq 0x8(%r14), %rdi
cmpq %rbx, %rdi
je 0xf59b
movq %r14, %rdi
movq %rbx, %r14
jmp 0xf656
movq 0x8(%rsi), %rdi
movq %rdi, (%r14)
testq %rdi, %rdi
je 0xf5c4
movq %r14, 0x10(%rdi)
movq 0x10(%r14), %rdi
movq %rdi, 0x10(%rsi)
movq %rax, %r8
testq %rdi, %rdi
jne 0xf5cc
jmp 0xf5da
movq (%rdi), %rsi
movq %rsi, 0x8(%r14)
testq %rsi, %rsi
je 0xf630
movq %r14, 0x10(%rsi)
movq 0x10(%r14), %rsi
movq %rsi, 0x10(%rdi)
movq %rax, %r8
testq %rsi, %rsi
jne 0xf638
jmp 0xf646
movq %rdx, 0x10(%rsi)
movq 0x10(%r14), %rdi
xorl %r8d, %r8d
cmpq (%rdi), %r14
setne %r8b
leaq (%rdi,%r8,8), %r8
movq %rsi, (%r8)
movq %r14, 0x8(%rsi)
movq %rsi, 0x10(%r14)
movq %rbx, %rsi
movl $0x0, 0x18(%rsi)
movl $0x1, 0x18(%rdx)
movq 0x8(%rdx), %rsi
movq (%rsi), %rdi
movq %rdi, 0x8(%rdx)
testq %rdi, %rdi
je 0xf60a
movq %rdx, 0x10(%rdi)
movq 0x10(%rdx), %rdi
movq %rdi, 0x10(%rsi)
movq %rax, %r8
testq %rdi, %rdi
je 0xf628
xorl %r8d, %r8d
cmpq (%rdi), %rdx
setne %r8b
leaq (%rdi,%r8,8), %r8
movq %rsi, (%r8)
movq %rdx, (%rsi)
jmp 0xf699
movq %rdx, 0x10(%rdi)
movq 0x10(%r14), %rsi
xorl %r8d, %r8d
cmpq (%rsi), %r14
setne %r8b
leaq (%rsi,%r8,8), %r8
movq %rdi, (%r8)
movq %r14, (%rdi)
movq %rdi, 0x10(%r14)
movq (%rdx), %rsi
movq %rbx, %rdi
movl $0x0, 0x18(%rdi)
movl $0x1, 0x18(%rdx)
movq 0x8(%rsi), %rdi
movq %rdi, (%rdx)
testq %rdi, %rdi
je 0xf674
movq %rdx, 0x10(%rdi)
movq 0x10(%rdx), %rdi
movq %rdi, 0x10(%rsi)
movq %rax, %r8
testq %rdi, %rdi
je 0xf692
xorl %r8d, %r8d
cmpq (%rdi), %rdx
setne %r8b
leaq (%rdi,%r8,8), %r8
movq %rsi, (%r8)
movq %rdx, 0x8(%rsi)
movq %rsi, 0x10(%rdx)
movq %r14, %rbx
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0xf506
movq 0x1927a54(%rip), %rbx   # 0x1937108
jmp 0xf6d2
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movl $0x1, 0x18(%rbx)
movq %rbx, 0x1927a36(%rip)   # 0x1937108
movl $0x0, 0x18(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq