// File: /workspace/github_c_makefile_star2_O3/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_func_s_finalize
er_t xoico_func_s_finalize( xoico_func_s* o, const xoico_host* host )
{
    // xoico_func.x:220:1
    
    xoico_compiler_s* compiler = xoico_host_a_compiler(host);
    BLM_TRY(xoico_func_s_freeze_global_name(o,host ))
    o->obj_type = xoico_host_a_obj_type(host);
    
    if( !o->signature )
    {
        const xoico_signature_s* signature = xoico_compiler_s_get_signature(compiler,o->signature_global_name );
        if( !signature )
        {
            return  x_source_point_s_parse_error_fa(&(o->source_point),"Function #<sc_t>: Could not find signature #<sc_t>",
                xoico_compiler_s_nameof(compiler,o->name ),
                xoico_compiler_s_nameof(compiler,o->signature_global_name )
            );
        }
    
        o->signature = xoico_signature_s_clone(signature);
        BLM_TRY(xoico_signature_s_relent(o->signature,host, xoico_host_a_obj_type(host) ))
        if( xoico_host_defines_transient_map(host) ) BLM_TRY(xoico_signature_s_convert_transient_types(o->signature,host, xoico_host_a_transient_map(host) ))
    }
    
    if( o->body ) BLM_TRY(xoico_body_s_finalize(o->body,host ))
    
    return  0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
movq (%rsi), %r12
leaq 0x1775b0(%rip), %r14    # 0x1926a0
movl 0x1775aa(%rip), %eax    # 0x1926a0
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r14,%rax,8), %rcx
movq 0x18(%r14,%rax,8), %rdx
andq %r12, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r12, %rdx
je 0x1b149
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r12, %rdx
je 0x1b149
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r12, %rdx
je 0x1b149
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r12, %rdx
jne 0x1b152
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x1b179
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %r12, %rsi
callq 0xe9bc5
movq %rax, %r13
leaq 0x177532(%rip), %rdi    # 0x1926a0
movq %r12, %rsi
movq %rax, %rdx
callq 0x115fac
movq %rbx, %rdi
callq *0x20(%r13)
movq %rax, %r12
movq %r15, %rdi
movq %rbx, %rsi
callq 0x19e33
movq (%rbx), %r13
movl 0x177509(%rip), %eax    # 0x1926a0
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r14,%rax,8), %rcx
movq 0x18(%r14,%rax,8), %rdx
andq %r13, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r13, %rdx
je 0x1b1ea
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r13, %rdx
je 0x1b1ea
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r13, %rdx
je 0x1b1ea
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r13, %rdx
jne 0x1b1f3
movq (%rax,%rcx), %rbp
testq %rbp, %rbp
jne 0x1b21a
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %r13, %rsi
callq 0xe9bc5
movq %rax, %rbp
leaq 0x177491(%rip), %rdi    # 0x1926a0
movq %r13, %rsi
movq %rax, %rdx
callq 0x115fac
movq %rbx, %rdi
callq *0x30(%rbp)
movq %rax, 0x18(%r15)
cmpq $0x0, 0x40(%r15)
je 0x1b23c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%r15), %rsi
movq %r12, %rdi
callq 0x15785
testq %rax, %rax
je 0x1b43e
movq %rax, %rdi
callq 0x145cb
movq %rax, %r12
movq %rax, 0x40(%r15)
movq (%rbx), %r13
movl 0x177437(%rip), %eax    # 0x1926a0
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r14,%rax,8), %rcx
movq 0x18(%r14,%rax,8), %rdx
andq %r13, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r13, %rdx
je 0x1b2bc
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r13, %rdx
je 0x1b2bc
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r13, %rdx
je 0x1b2bc
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r13, %rdx
jne 0x1b2c5
movq (%rax,%rcx), %rbp
testq %rbp, %rbp
jne 0x1b2ec
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %r13, %rsi
callq 0xe9bc5
movq %rax, %rbp
leaq 0x1773bf(%rip), %rdi    # 0x1926a0
movq %r13, %rsi
movq %rax, %rdx
callq 0x115fac
movq %rbx, %rdi
callq *0x30(%rbp)
movq %r12, %rdi
movq %rax, %rdx
callq 0x147df
movq (%rbx), %r12
movl 0x17739a(%rip), %eax    # 0x1926a0
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r14,%rax,8), %rcx
movq 0x18(%r14,%rax,8), %rdx
andq %r12, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r12, %rdx
je 0x1b359
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r12, %rdx
je 0x1b359
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r12, %rdx
je 0x1b359
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r12, %rdx
jne 0x1b362
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x1b389
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %r12, %rsi
callq 0xe9bc5
movq %rax, %r13
leaq 0x177322(%rip), %rdi    # 0x1926a0
movq %r12, %rsi
movq %rax, %rdx
callq 0x115fac
cmpq $0x0, 0x40(%r13)
je 0x1b22b
movq 0x40(%r15), %r15
movq (%rbx), %r12
movl 0x1772ff(%rip), %eax    # 0x1926a0
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r14,%rax,8), %rcx
movq 0x18(%r14,%rax,8), %rdx
andq %r12, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r12, %rdx
je 0x1b3f4
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r12, %rdx
je 0x1b3f4
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r12, %rdx
je 0x1b3f4
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r12, %rdx
jne 0x1b3fd
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x1b424
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %r12, %rsi
callq 0xe9bc5
movq %rax, %r13
leaq 0x177287(%rip), %rdi    # 0x1926a0
movq %r12, %rsi
movq %rax, %rdx
callq 0x115fac
movq %rbx, %rdi
callq *0x40(%r13)
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x1468a
jmp 0x1b22b
leaq 0x48(%r15), %rbx
movq 0x8(%r15), %rsi
movq %r12, %rdi
callq 0xe3d7
movq %rax, %r14
movq 0x20(%r15), %rsi
movq %r12, %rdi
callq 0xe3d7
leaq 0x1122dd(%rip), %rsi    # 0x12d741
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x13254