// File: /workspace/github_c_makefile_star2_O1/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, %r14
movl $0x28, %esi
xorl %edi, %edi
callq 0xc8315
movq %rax, %rbx
movl $0x28, %esi
movq %rax, %rdi
callq 0xc8366
movabsq $-0x12447a62f86214d4, %rax # imm = 0xEDBB859D079DEB2C
movq %rax, (%rbx)
movq 0x8(%r14), %r15
movq %r15, 0x8(%rbx)
leaq 0xa9d26(%rip), %rax     # 0x1aa0f8
movl (%rax), %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %r15, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
je 0x10042c
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x10042c
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x10042c
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x10068a
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0x10045c
movabsq $0x541d0401d4dcff33, %rdi # imm = 0x541D0401D4DCFF33
movq %r15, %rsi
callq 0xf3f85
movq %rax, %r12
leaq 0xa9ca7(%rip), %rdi     # 0x1aa0f8
movq %r15, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r12, 0x10(%rbx)
movabsq $0x7760d984346dd75f, %rsi # imm = 0x7760D984346DD75F
movabsq $0x56d12ea086274034, %rdx # imm = 0x56D12EA086274034
movq %r14, %rdi
callq 0xce882
movq %rax, %r15
testq %rax, %rax
jne 0x100498
movabsq $-0x3eb3fd3a650b58f3, %rsi # imm = 0xC14C02C59AF4A70D
movq %r14, %rdi
xorl %edx, %edx
callq 0xce882
movq %rax, 0x18(%rbx)
movq 0x8(%rbx), %rcx
movabsq $-0x4882601bdca6aefc, %rdx # imm = 0xB77D9FE423595104
cmpq %rdx, %rcx
jle 0x100507
movabsq $0x585a3b17ca3de1ff, %rdx # imm = 0x585A3B17CA3DE1FF
cmpq %rdx, %rcx
jle 0x10055f
movabsq $0x69849117d3eb7d61, %rdx # imm = 0x69849117D3EB7D61
cmpq %rdx, %rcx
jg 0x1005e5
movabsq $0x585a3b17ca3de200, %rdx # imm = 0x585A3B17CA3DE200
cmpq %rdx, %rcx
je 0x10060c
movabsq $0x62367a17d02b474d, %rdx # imm = 0x62367A17D02B474D
cmpq %rdx, %rcx
jne 0x100654
leaq 0x24a(%rip), %rax       # 0x10074c
jmp 0x100677
movabsq $-0x5fc2af85f419929c, %rdx # imm = 0xA03D507A0BE66D64
cmpq %rdx, %rcx
jg 0x1005a4
movabsq $-0x73f6ae1ad309fd45, %rdx # imm = 0x8C0951E52CF602BB
cmpq %rdx, %rcx
je 0x100630
movabsq $-0x6bce971ace902370, %rdx # imm = 0x943168E5316FDC90
cmpq %rdx, %rcx
je 0x100642
movabsq $-0x6119581ac7eacd63, %rdx # imm = 0x9EE6A7E53815329D
cmpq %rdx, %rcx
jne 0x100654
leaq 0x250(%rip), %rax       # 0x1007aa
jmp 0x100677
movabsq $-0x4882601bdca6aefb, %rdx # imm = 0xB77D9FE423595105
cmpq %rdx, %rcx
je 0x10061e
movabsq $-0x3f1363e6d8155aed, %rdx # imm = 0xC0EC9C1927EAA513
cmpq %rdx, %rcx
je 0x100627
movabsq $0x510c2417c67dabeb, %rdx # imm = 0x510C2417C67DABEB
cmpq %rdx, %rcx
jne 0x100654
leaq 0x151(%rip), %rax       # 0x1006f0
jmp 0x100677
movabsq $-0x5fc2af85f419929b, %rdx # imm = 0xA03D507A0BE66D65
cmpq %rdx, %rcx
je 0x100639
movabsq $-0x5aa4411ac4e2880e, %rdx # imm = 0xA55BBEE53B1D77F2
cmpq %rdx, %rcx
je 0x10064b
movabsq $-0x58737885f0577326, %rdx # imm = 0xA78C877A0FA88CDA
cmpq %rdx, %rcx
jne 0x100654
leaq 0x28d(%rip), %rax       # 0x10086d
jmp 0x100677
movabsq $0x69849117d3eb7d62, %rdx # imm = 0x69849117D3EB7D62
cmpq %rdx, %rcx
je 0x100615
movabsq $0x6d07f9ef5b68e8a2, %rdx # imm = 0x6D07F9EF5B68E8A2
cmpq %rdx, %rcx
jne 0x100654
leaq 0x2f9(%rip), %rax       # 0x100903
jmp 0x100677
leaq 0xae(%rip), %rax        # 0x1006c1
jmp 0x100677
leaq 0x101(%rip), %rax       # 0x10071d
jmp 0x100677
leaq 0x2ad(%rip), %rax       # 0x1008d2
jmp 0x100677
leaq 0x275(%rip), %rax       # 0x1008a3
jmp 0x100677
leaq 0x1d1(%rip), %rax       # 0x100808
jmp 0x100677
leaq 0x1f5(%rip), %rax       # 0x100835
jmp 0x100677
leaq 0x18e(%rip), %rax       # 0x1007d7
jmp 0x100677
leaq 0x127(%rip), %rax       # 0x100779
jmp 0x100677
testq %rax, %rax
leaq -0x1518(%rip), %rax     # 0xff146
leaq 0x308(%rip), %rcx       # 0x10096d
cmoveq %rax, %rcx
testq %r15, %r15
leaq 0x2c1(%rip), %rax       # 0x100934
cmoveq %rcx, %rax
movq %rax, 0x20(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %r12d, %r12d
jmp 0x100430