// File: /workspace/github_c_makefile_star2_O3/johsteffens[P]beth/lib/bcore/bcore_hmap.c
// Function: tpto_s_set_data
static void tpto_s_set_data( bcore_hmap_tpto_s* o, sr_s data )
{
    bcore_hmap_tpto_s_clear( o );
    assert( sr_s_type( &data ) == bcore_flect_type_parse_sc( "{ tp_t type; { tp_t key; sr_s obj; } [] arr; }" ) );

    {
        sr_s type_sr = bcore_via_r_nget( &data, typeof( "type" ) );
        bcore_hmap_tpto_s_set_type( o, *( tp_t* )type_sr.o );
        sr_down( type_sr );
    }

    uz_t size = bcore_array_r_get_size( &data );
    if( sr_s_is_strong( &data ) )
    {
        struct { tp_t key; sr_s obj; }* src = bcore_array_r_get_d_data( &data );
        for( uz_t i = 0; i < size; i++ )
        {
            bcore_hmap_tpto_s_set_d( o, src[ i ].key, src[ i ].obj.o );
            src[ i ].obj = sr_null();
        }
    }
    else
    {
        const struct { tp_t key; sr_s obj; }* src = bcore_array_r_get_c_data( &data );
        for( uz_t i = 0; i < size; i++ )
        {
            bcore_hmap_tpto_s_set_d( o, src[ i ].key, bcore_inst_r_clone( &src[ i ].obj ) );
        }
    }
    sr_down( data );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
leaq 0x70(%rsp), %rbx
movabsq $0x541d0401d4dcff33, %r12 # imm = 0x541D0401D4DCFF33
callq 0xcb63e
movq 0x8(%rbx), %r13
movq 0x8(%r13), %r15
cmpq %r12, %r15
je 0xd2e54
leaq 0xca323(%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 %r15, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
je 0xd2e2b
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0xd2e2b
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0xd2e2b
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0xd2e34
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0xd2e54
movq %r12, %rdi
movq %r15, %rsi
callq 0xe9bc5
movq %rax, %r13
leaq 0xca2af(%rip), %rdi     # 0x19d0f8
movq %r15, %rsi
movq %rax, %rdx
callq 0x115fac
movq (%rbx), %rdx
leaq 0x20(%rsp), %r15
movabsq $-0x586bc610840563d3, %rcx # imm = 0xA79439EF7BFA9C2D
movq %r15, %rdi
movq %r13, %rsi
callq 0x102bbb
movq (%r15), %rax
movq (%rax), %r15
cmpq %r15, 0x8(%r14)
je 0xd2e89
movq %r14, %rdi
callq 0xcb63e
movq %r15, 0x8(%r14)
testb $0x2, 0x30(%rsp)
je 0xd2ea8
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x107590
movabsq $-0x5073d588c3beb52e, %rdi # imm = 0xAF8C2A773C414AD2
movq 0x8(%rbx), %r12
movq 0x8(%r12), %r15
cmpq %rdi, %r15
je 0xd2f47
leaq 0xc8f55(%rip), %rax     # 0x19be20
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 0xd2f21
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0xd2f21
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0xd2f21
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0xd2f2a
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0xd2f47
movq %r15, %rsi
callq 0xe9bc5
movq %rax, %r12
leaq 0xc8ee4(%rip), %rdi     # 0x19be20
movq %r15, %rsi
movq %rax, %rdx
callq 0x115fac
movq (%rbx), %rsi
movq %r12, %rdi
callq 0xede4d
movq %rax, %r15
testb $0x2, 0x10(%rbx)
jne 0xd2fc3
movq %rbx, %rdi
callq 0xf08ff
testq %r15, %r15
je 0xd3002
movq %rax, %r12
addq $0x10, %r12
movabsq $0x782b96602f424981, %r13 # imm = 0x782B96602F424981
movq -0x10(%r12), %rbp
movq (%r12), %rdi
testq %rdi, %rdi
je 0xd2fab
movq %r13, %rsi
callq 0xeb464
movq -0x8(%r12), %rsi
testq %rsi, %rsi
je 0xd2fab
movq %rax, %rdi
callq *0xc0(%rax)
movq %rax, %rdx
jmp 0xd2fad
xorl %edx, %edx
movq %r14, %rdi
movq %rbp, %rsi
callq 0xcb9be
addq $0x20, %r12
decq %r15
jne 0xd2f7d
jmp 0xd3002
movq %rbx, %rdi
callq 0xf0922
testq %r15, %r15
je 0xd3002
movq %rax, %r12
addq $0x8, %r12
movq -0x8(%r12), %rsi
movq (%r12), %rdx
movq %r14, %rdi
callq 0xcb9be
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq $0x0, 0x10(%r12)
addq $0x20, %r12
decq %r15
jne 0xd2fd7
testb $0x2, 0x10(%rbx)
je 0xd301d
movq 0x10(%rbx), %rax
movq %rax, 0x10(%rsp)
movups (%rbx), %xmm0
movups %xmm0, (%rsp)
callq 0x107590
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq