// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_spect_hash.c
// Function: bcore_hash_default_fold_tp
tp_t bcore_hash_default_fold_tp( const bcore_hash_s* p, const bcore_hash* o, tp_t hash )
{
    if( o )
    {
        switch( p->header.o_type )
        {
            case TYPEOF_s3_t: return bcore_tp_fold_u3( hash, *( u3_t* )o );
            case TYPEOF_s2_t: return bcore_tp_fold_u2( hash, *( u2_t* )o );
            case TYPEOF_s1_t: return bcore_tp_fold_u1( hash, *( u1_t* )o );
            case TYPEOF_s0_t: return bcore_tp_fold_u0( hash, *( u0_t* )o );

            case TYPEOF_u3_t: return bcore_tp_fold_u3( hash, *( u3_t* )o );
            case TYPEOF_u2_t: return bcore_tp_fold_u2( hash, *( u2_t* )o );
            case TYPEOF_u1_t: return bcore_tp_fold_u1( hash, *( u1_t* )o );
            case TYPEOF_u0_t: return bcore_tp_fold_u0( hash, *( u0_t* )o );

            case TYPEOF_f3_t:
            {
                int exp = 0;
                s3_t man_s3 = frexp( *( f3_t* )o, &exp ) * 0x7FFFFFFFFFFFFFFF;
                s2_t exp_s2 = exp;
                hash = bcore_tp_fold_u3( hash, man_s3 );
                hash = bcore_tp_fold_u2( hash, exp_s2 );
                return hash;
            }

            case TYPEOF_f2_t:
            {
                int exp = 0;
                s3_t man_s3 = frexp( *( f2_t* )o, &exp ) * 0x7FFFFFFFFFFFFFFF;
                s2_t exp_s2 = exp;
                hash = bcore_tp_fold_u3( hash, man_s3 );
                hash = bcore_tp_fold_u2( hash, exp_s2 );
                return hash;
            }

            case TYPEOF_sz_t: return bcore_tp_fold_vc( hash, o, sizeof( sz_t ) );
            case TYPEOF_uz_t: return bcore_tp_fold_vc( hash, o, sizeof( uz_t ) );
            case TYPEOF_sd_t: return bcore_tp_fold_sc( hash, *( sd_t* )o );
            case TYPEOF_sc_t: return bcore_tp_fold_sc( hash, *( sc_t* )o );
            case TYPEOF_st_s: return bcore_tp_fold_sc( hash, ( ( st_s* )o )->sc );
            case TYPEOF_tp_t: return bcore_tp_fold_tp( hash, *( tp_t* )o );
            case TYPEOF_bl_t: return bcore_tp_fold_u0( hash, (*(bl_t*)o) ? 1 : 0 );
            case TYPEOF_aware_t: return bcore_tp_fold_tp( hash, *( tp_t* )o );

            default:
            {
                hash = bcore_tp_fold_tp( hash, p->header.o_type );
                if( bcore_via_p_is_pure_array( p->spect_via, ( bcore_via* )o ) )
                {
                    const bcore_array_s* arr_p = bcore_array_s_get_typed( p->spect_via->header.o_type );
                    uz_t size = bcore_array_p_get_size( arr_p, ( bcore_array* )o );
                    hash = bcore_tp_fold_uz( hash, size );
                    for( uz_t i = 0; i < size; i++ )
                    {
                        sr_s sr = bcore_array_p_get( arr_p, (bcore_array*)o, i );
                        hash = bcore_tp_fold_tp( hash, sr_s_type( &sr ) );
                        if( sr.p ) hash = bcore_hash_r_fold_tp( &sr, hash );
                        sr_down( sr );
                    }
                }
                else
                {
                    const bcore_via_s* via = p->spect_via;
                    uz_t size = via->size;
                    for( uz_t i = 0; i < size; i++ )
                    {
                        sr_s sr = bcore_via_p_iget( via, (bcore_via*)o, i );
                        hash = bcore_tp_fold_tp( hash, sr_s_type( &sr ) );
                        if( sr.p ) hash = bcore_hash_r_fold_tp( &sr, hash );
                        sr_down( sr );
                    }
                }
            }
        }
    }
    else
    {
        hash = bcore_tp_fold_tp( hash, p->header.o_type );
    }
    return hash;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq 0x8(%rdi), %rsi
testq %rbx, %rbx
je 0x82b06
movabsq $-0x73f6ae1ad309fd45, %rax # imm = 0x8C0951E52CF602BB
cmpq %rax, %rsi
je 0x82b1c
movabsq $-0x6bce971ace902370, %rax # imm = 0x943168E5316FDC90
cmpq %rax, %rsi
je 0x82b55
movabsq $-0x6119581ac7eacd63, %rax # imm = 0x9EE6A7E53815329D
cmpq %rax, %rsi
je 0x82b32
movabsq $-0x5fc2af85f419929b, %rax # imm = 0xA03D507A0BE66D65
cmpq %rax, %rsi
je 0x82baa
movabsq $-0x5aa4411ac4e2880e, %rax # imm = 0xA55BBEE53B1D77F2
cmpq %rax, %rsi
je 0x82b03
movabsq $-0x58737885f0577326, %rax # imm = 0xA78C877A0FA88CDA
cmpq %rax, %rsi
je 0x82cbb
movabsq $-0x503db0e6e1c2e704, %rax # imm = 0xAFC24F191E3D18FC
cmpq %rax, %rsi
je 0x82b90
movabsq $-0x4882601bdca6aefb, %rax # imm = 0xB77D9FE423595105
cmpq %rax, %rsi
je 0x82b3c
movabsq $-0x3f1363e6d8155aed, %rax # imm = 0xC0EC9C1927EAA513
cmpq %rax, %rsi
je 0x82b3c
movabsq $-0x3ac242643d9c35a8, %rax # imm = 0xC53DBD9BC263CA58
cmpq %rax, %rsi
je 0x82b1c
movabsq $-0x388c46b188de83fe, %rax # imm = 0xC773B94E77217C02
cmpq %rax, %rsi
je 0x82b03
movabsq $-0x84b14e74a9e1ff0, %rax # imm = 0xF7B4EB18B561E010
cmpq %rax, %rsi
je 0x82b8b
movabsq $0x230abe18cdeefc99, %rax # imm = 0x230ABE18CDEEFC99
cmpq %rax, %rsi
je 0x82b8b
movabsq $0x510c2417c67dabeb, %rax # imm = 0x510C2417C67DABEB
cmpq %rax, %rsi
je 0x82b32
movabsq $0x6d07f9ef5b68e8a2, %rax # imm = 0x6D07F9EF5B68E8A2
cmpq %rax, %rsi
je 0x82b03
movabsq $0x62367a17d02b474d, %rax # imm = 0x62367A17D02B474D
cmpq %rax, %rsi
je 0x82b1c
movabsq $0x69849117d3eb7d62, %rax # imm = 0x69849117D3EB7D62
cmpq %rax, %rsi
je 0x82b55
movabsq $0x585a3b17ca3de200, %rax # imm = 0x585A3B17CA3DE200
cmpq %rax, %rsi
jne 0x82bbc
movq (%rbx), %rsi
movq %r15, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x82d79
movzbl (%rbx), %eax
xorq %r15, %rax
movabsq $0x100000001b3, %r14    # imm = 0x100000001B3
imulq %rax, %r14
jmp 0x82b79
movl (%rbx), %esi
movq %r15, %rdi
jmp 0x82ced
movq %r15, %rdi
movq %rbx, %rsi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x82dcd
movzwl (%rbx), %r14d
movzbl %r14b, %eax
xorq %r15, %rax
movabsq $0x100000001b3, %rcx    # imm = 0x100000001B3
imulq %rcx, %rax
shrl $0x8, %r14d
xorq %rax, %r14
imulq %rcx, %r14
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rsi
jmp 0x82b94
movq 0x8(%rbx), %rsi
movq %r15, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x82df3
leaq 0x20(%rsp), %r14
andl $0x0, (%r14)
movsd (%rbx), %xmm0
jmp 0x82cc8
movq %rdi, %r12
movq %r15, %rdi
callq 0x82d79
movq %rax, %r14
movq 0x10(%r12), %rdi
movq %rbx, %rsi
callq 0x8b194
movq 0x10(%r12), %r15
testb %al, %al
je 0x82d00
movq 0x8(%r15), %r12
leaq 0x95231(%rip), %rdi     # 0x117e20
movq %r12, %rsi
callq 0x82ff1
movq %rax, %r15
testq %rax, %rax
jne 0x82c26
movabsq $-0x5073d588c3beb52e, %rdi # imm = 0xAF8C2A773C414AD2
movq %r12, %rsi
callq 0x79b94
movq %rax, %r15
leaq 0x95205(%rip), %rdi     # 0x117e20
movq %r12, %rsi
movq %rax, %rdx
callq 0x98d4b
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7c954
movq %rax, %r12
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
movq %r14, %rdi
callq 0x82dcd
movq %rax, %r14
xorl %ebp, %ebp
cmpq %rbp, %r12
je 0x82b79
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x7c97c
movq 0x28(%rsp), %r13
testq %r13, %r13
je 0x82c75
movq 0x8(%r13), %rsi
jmp 0x82c77
xorl %esi, %esi
movq %r14, %rdi
callq 0x82d79
movq %rax, %r14
testq %r13, %r13
je 0x82c97
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x82e1e
movq %rax, %r14
testb $0x2, 0x30(%rsp)
je 0x82cb6
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x8cdc1
incq %rbp
jmp 0x82c49
leaq 0x20(%rsp), %r14
andl $0x0, (%r14)
cvtss2sd (%rbx), %xmm0
movq %r14, %rdi
callq 0xd070
mulsd 0x31a08(%rip), %xmm0    # 0xb46e0
cvttsd2si %xmm0, %rsi
movl (%r14), %ebx
movq %r15, %rdi
callq 0x82d79
movq %rax, %rdi
movl %ebx, %esi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x82d8e
movq 0x20(%r15), %rbp
xorl %r12d, %r12d
cmpq %r12, %rbp
je 0x82b79
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x8a459
movq 0x28(%rsp), %r13
testq %r13, %r13
je 0x82d33
movq 0x8(%r13), %rsi
jmp 0x82d35
xorl %esi, %esi
movq %r14, %rdi
callq 0x82d79
movq %rax, %r14
testq %r13, %r13
je 0x82d55
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x82e1e
movq %rax, %r14
testb $0x2, 0x30(%rsp)
je 0x82d74
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x8cdc1
incq %r12
jmp 0x82d07