// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movq %rdi, %r15
callq 0x82671
movq %rax, %rbx
movq 0x8(%r15), %rdi
movq %rdi, 0x8(%rax)
callq 0x8268c
movq %rax, 0x10(%rbx)
leaq 0x3f481(%rip), %rdi     # 0xc1915
callq 0x81a11
movq %rax, %r14
leaq 0x42a2d(%rip), %rdi     # 0xc4ed0
callq 0x81a11
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x6449c
movq %rax, %r14
testq %rax, %rax
jne 0x824d7
leaq 0x408f0(%rip), %rdi     # 0xc2db5
callq 0x81a11
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x6449c
movq %rax, 0x18(%rbx)
movq 0x8(%rbx), %rcx
movabsq $-0x73f6ae1ad309fd45, %rdx # imm = 0x8C0951E52CF602BB
cmpq %rdx, %rcx
je 0x82642
movabsq $-0x6bce971ace902370, %rdx # imm = 0x943168E5316FDC90
cmpq %rdx, %rcx
je 0x825e7
movabsq $-0x6119581ac7eacd63, %rdx # imm = 0x9EE6A7E53815329D
cmpq %rdx, %rcx
je 0x825d2
movabsq $-0x5fc2af85f419929b, %rdx # imm = 0xA03D507A0BE66D65
cmpq %rdx, %rcx
je 0x82654
movabsq $-0x5aa4411ac4e2880e, %rdx # imm = 0xA55BBEE53B1D77F2
cmpq %rdx, %rcx
je 0x825f0
movabsq $-0x58737885f0577326, %rdx # imm = 0xA78C877A0FA88CDA
cmpq %rdx, %rcx
je 0x8265d
movabsq $-0x4882601bdca6aefb, %rdx # imm = 0xB77D9FE423595105
cmpq %rdx, %rcx
je 0x8260b
movabsq $-0x3f1363e6d8155aed, %rdx # imm = 0xC0EC9C1927EAA513
cmpq %rdx, %rcx
je 0x8264b
movabsq $0x6d07f9ef5b68e8a2, %rdx # imm = 0x6D07F9EF5B68E8A2
cmpq %rdx, %rcx
je 0x82639
movabsq $0x585a3b17ca3de200, %rdx # imm = 0x585A3B17CA3DE200
cmpq %rdx, %rcx
je 0x825de
movabsq $0x62367a17d02b474d, %rdx # imm = 0x62367A17D02B474D
cmpq %rdx, %rcx
je 0x82602
movabsq $0x69849117d3eb7d62, %rdx # imm = 0x69849117D3EB7D62
cmpq %rdx, %rcx
je 0x825f9
movabsq $0x510c2417c67dabeb, %rdx # imm = 0x510C2417C67DABEB
cmpq %rdx, %rcx
jne 0x82614
leaq 0x13b(%rip), %rax       # 0x82708
jmp 0x82664
leaq 0x1dd(%rip), %rax       # 0x827b6
jmp 0x82664
leaq 0xf7(%rip), %rax        # 0x826dc
jmp 0x82664
leaq 0x1f2(%rip), %rax       # 0x827e0
jmp 0x82664
leaq 0x191(%rip), %rax       # 0x82788
jmp 0x82664
leaq 0x132(%rip), %rax       # 0x82732
jmp 0x82664
leaq 0x155(%rip), %rax       # 0x8275e
jmp 0x82664
leaq 0x2ba(%rip), %rax       # 0x828cc
jmp 0x82664
testq %rax, %rax
leaq -0xde1(%rip), %rax      # 0x8183d
leaq 0x339(%rip), %rcx       # 0x8295e
cmoveq %rax, %rcx
testq %r14, %r14
leaq 0x2f5(%rip), %rax       # 0x82928
cmoveq %rcx, %rax
jmp 0x82664
leaq 0x2ba(%rip), %rax       # 0x828fa
jmp 0x82664
leaq 0x1c5(%rip), %rax       # 0x8280e
jmp 0x82664
leaq 0x24e(%rip), %rax       # 0x828a0
jmp 0x82664
leaq 0x1dd(%rip), %rax       # 0x82838
jmp 0x82664
leaq 0x209(%rip), %rax       # 0x8286d
movq %rax, 0x20(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq