// File: /workspace/github_c_makefile_star2_O3/johsteffens[P]beth/lib/bcore/bcore_spect_compare.c
// Function: create_from_self
static bcore_compare_s* create_from_self( const bcore_self_s* self )
{
    assert( self != NULL );

    bcore_compare_s* o = compare_s_create();
    o->o_type  = self->type;
    o->via     = bcore_via_s_get_typed( o->o_type );
    fp_t cmp_a =                     bcore_self_s_try_external_fp( self, typeof( "ap_t" ), typeof( "compare" ) );
    fp_t cmp_o = ( cmp_a ) ? cmp_a : bcore_self_s_try_external_fp( self, typeof( "bcore_fp_compare" ), 0 );

    o->fp_compare = cmp_o;

    typedef s2_t (*fp_icmp)( const bcore_compare_s*, vc_t, vc_t );

    switch( o->o_type )
    {
        case TYPEOF_s3_t: o->compare = ( fp_icmp )compare_s3_t; break;
        case TYPEOF_s2_t: o->compare = ( fp_icmp )compare_s2_t; break;
        case TYPEOF_s1_t: o->compare = ( fp_icmp )compare_s1_t; break;
        case TYPEOF_s0_t: o->compare = ( fp_icmp )compare_s0_t; break;
        case TYPEOF_u3_t: o->compare = ( fp_icmp )compare_u3_t; break;
        case TYPEOF_u2_t: o->compare = ( fp_icmp )compare_u2_t; break;
        case TYPEOF_u1_t: o->compare = ( fp_icmp )compare_u1_t; break;
        case TYPEOF_u0_t: o->compare = ( fp_icmp )compare_u0_t; break;
        case TYPEOF_f3_t: o->compare = ( fp_icmp )compare_f3_t; break;
        case TYPEOF_f2_t: o->compare = ( fp_icmp )compare_f2_t; break;
        case TYPEOF_sz_t: o->compare = ( fp_icmp )compare_sz_t; break;
        case TYPEOF_uz_t: o->compare = ( fp_icmp )compare_uz_t; break;
        case TYPEOF_tp_t: o->compare = ( fp_icmp )compare_tp_t; break;
        default:
        {
            o->compare = cmp_a ? compare_amoebic : ( cmp_o ? compare_o : compare_generic );
        }
        break;
    }

    return o;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movl $0x28, %esi
xorl %edi, %edi
callq 0xbe7b1
movq %rax, %rbx
movl $0x28, %esi
movq %rax, %rdi
callq 0xbe802
movabsq $-0x12447a62f86214d4, %rax # imm = 0xEDBB859D079DEB2C
movq %rax, (%rbx)
movq 0x8(%r15), %r14
movq %r14, 0x8(%rbx)
leaq 0xa749b(%rip), %rax     # 0x19d0f8
movl (%rax), %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %r14, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %r14, %rdx
je 0xf5cb3
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r14, %rdx
je 0xf5cb3
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r14, %rdx
je 0xf5cb3
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r14, %rdx
jne 0xf5cbc
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0xf5ce3
movabsq $0x541d0401d4dcff33, %rdi # imm = 0x541D0401D4DCFF33
movq %r14, %rsi
callq 0xe9bc5
movq %rax, %r12
leaq 0xa7420(%rip), %rdi     # 0x19d0f8
movq %r14, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r12, 0x10(%rbx)
movabsq $0x7760d984346dd75f, %rsi # imm = 0x7760D984346DD75F
movabsq $0x56d12ea086274034, %rdx # imm = 0x56D12EA086274034
movq %r15, %rdi
callq 0xc473a
movq %rax, %r14
testq %rax, %rax
jne 0xf5d1f
movabsq $-0x3eb3fd3a650b58f3, %rsi # imm = 0xC14C02C59AF4A70D
movq %r15, %rdi
xorl %edx, %edx
callq 0xc473a
movq %rax, 0x18(%rbx)
movq 0x8(%rbx), %rcx
movabsq $-0x4882601bdca6aefc, %rdx # imm = 0xB77D9FE423595104
cmpq %rdx, %rcx
jle 0xf5d8e
movabsq $0x585a3b17ca3de1ff, %rdx # imm = 0x585A3B17CA3DE1FF
cmpq %rdx, %rcx
jle 0xf5de6
movabsq $0x69849117d3eb7d61, %rdx # imm = 0x69849117D3EB7D61
cmpq %rdx, %rcx
jg 0xf5e6c
movabsq $0x585a3b17ca3de200, %rdx # imm = 0x585A3B17CA3DE200
cmpq %rdx, %rcx
je 0xf5e93
movabsq $0x62367a17d02b474d, %rdx # imm = 0x62367A17D02B474D
cmpq %rdx, %rcx
jne 0xf5edb
leaq 0x242(%rip), %rax       # 0xf5fcb
jmp 0xf5efe
movabsq $-0x5fc2af85f419929c, %rdx # imm = 0xA03D507A0BE66D64
cmpq %rdx, %rcx
jg 0xf5e2b
movabsq $-0x73f6ae1ad309fd45, %rdx # imm = 0x8C0951E52CF602BB
cmpq %rdx, %rcx
je 0xf5eb7
movabsq $-0x6bce971ace902370, %rdx # imm = 0x943168E5316FDC90
cmpq %rdx, %rcx
je 0xf5ec9
movabsq $-0x6119581ac7eacd63, %rdx # imm = 0x9EE6A7E53815329D
cmpq %rdx, %rcx
jne 0xf5edb
leaq 0x248(%rip), %rax       # 0xf6029
jmp 0xf5efe
movabsq $-0x4882601bdca6aefb, %rdx # imm = 0xB77D9FE423595105
cmpq %rdx, %rcx
je 0xf5ea5
movabsq $-0x3f1363e6d8155aed, %rdx # imm = 0xC0EC9C1927EAA513
cmpq %rdx, %rcx
je 0xf5eae
movabsq $0x510c2417c67dabeb, %rdx # imm = 0x510C2417C67DABEB
cmpq %rdx, %rcx
jne 0xf5edb
leaq 0x149(%rip), %rax       # 0xf5f6f
jmp 0xf5efe
movabsq $-0x5fc2af85f419929b, %rdx # imm = 0xA03D507A0BE66D65
cmpq %rdx, %rcx
je 0xf5ec0
movabsq $-0x5aa4411ac4e2880e, %rdx # imm = 0xA55BBEE53B1D77F2
cmpq %rdx, %rcx
je 0xf5ed2
movabsq $-0x58737885f0577326, %rdx # imm = 0xA78C877A0FA88CDA
cmpq %rdx, %rcx
jne 0xf5edb
leaq 0x285(%rip), %rax       # 0xf60ec
jmp 0xf5efe
movabsq $0x69849117d3eb7d62, %rdx # imm = 0x69849117D3EB7D62
cmpq %rdx, %rcx
je 0xf5e9c
movabsq $0x6d07f9ef5b68e8a2, %rdx # imm = 0x6D07F9EF5B68E8A2
cmpq %rdx, %rcx
jne 0xf5edb
leaq 0x2f1(%rip), %rax       # 0xf6182
jmp 0xf5efe
leaq 0xa6(%rip), %rax        # 0xf5f40
jmp 0xf5efe
leaq 0xf9(%rip), %rax        # 0xf5f9c
jmp 0xf5efe
leaq 0x2a5(%rip), %rax       # 0xf6151
jmp 0xf5efe
leaq 0x26d(%rip), %rax       # 0xf6122
jmp 0xf5efe
leaq 0x1c9(%rip), %rax       # 0xf6087
jmp 0xf5efe
leaq 0x1ed(%rip), %rax       # 0xf60b4
jmp 0xf5efe
leaq 0x186(%rip), %rax       # 0xf6056
jmp 0xf5efe
leaq 0x11f(%rip), %rax       # 0xf5ff8
jmp 0xf5efe
testq %rax, %rax
leaq -0x1496(%rip), %rax     # 0xf4a4f
leaq 0x300(%rip), %rcx       # 0xf61ec
cmoveq %rax, %rcx
testq %r14, %r14
leaq 0x2b9(%rip), %rax       # 0xf61b3
cmoveq %rcx, %rax
movq %rax, 0x20(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq