// File: /workspace/github_c_makefile_star2_O3/johsteffens[P]beth/lib/bcore/bcore_spect_array.c
// Function: bcore_array_default_make_strong
void bcore_array_default_make_strong( const bcore_array_s* p, bcore_array* o )
{
    if( p->size_fix > 0 ) return;
    vd_t obj = ( u0_t* )o + p->caps_offset;
    if( ( ( bcore_array_dyn_head_s* )obj )->size <= ( ( bcore_array_dyn_head_s* )obj )->space ) return;
    switch( p->type_caps )
    {
        case BCORE_CAPS_ARRAY_DYN_SOLID_STATIC:
        {
            bcore_array_dyn_solid_static_s* arr = obj;
            const bcore_inst_s* instance_p = p->item_p;
            uz_t unit_size = instance_p->size;
            vc_t src_data = arr->data;
            arr->data = bcore_u_alloc( unit_size, NULL, arr->size, &arr->space );
            if( instance_p->move_flat )
            {
                bcore_u_memcpy( unit_size, arr->data, src_data, arr->size );
            }
            else
            {
                vd_t dst_data = arr->data;
                for( uz_t i = 0; i < arr->size; i++ )
                {
                    instance_p->copy( instance_p, dst_data, src_data );
                    dst_data = ( u0_t* )dst_data + unit_size;
                    src_data = ( u0_t* )src_data + unit_size;
                }
            }
        }
        break;

        case BCORE_CAPS_ARRAY_DYN_SOLID_TYPED:
        {
            bcore_array_dyn_solid_typed_s* arr = obj;
            if( !arr->type ) ERR( "attempt to take ownership of type-zero array" );
            const bcore_inst_s* instance_p = bcore_inst_s_get_typed( arr->type );
            uz_t unit_size = instance_p->size;
            vc_t src_data = arr->data;
            arr->data = bcore_u_alloc( unit_size, NULL, arr->size, &arr->space );
            if( instance_p->move_flat )
            {
                bcore_u_memcpy( unit_size, arr->data, src_data, arr->size );
            }
            else
            {
                vd_t dst_data = arr->data;
                for( uz_t i = 0; i < arr->size; i++ )
                {
                    instance_p->copy( instance_p, dst_data, src_data );
                    dst_data = ( u0_t* )dst_data + unit_size;
                    src_data = ( u0_t* )src_data + unit_size;
                }
            }
        }
        break;

        case BCORE_CAPS_ARRAY_DYN_LINK_STATIC:
        {
            bcore_array_dyn_link_static_s* arr = obj;
            const bcore_inst_s* instance_p = p->item_p;
            vd_t* src_data = arr->data;
            arr->data = bcore_u_alloc( sizeof( vd_t ), NULL, arr->size, &arr->space );
            vd_t* dst_data = arr->data;
            for( uz_t i = 0; i < arr->size; i++ ) *dst_data++ = instance_p->clone( instance_p, *src_data++ );
        }
        break;

        case BCORE_CAPS_ARRAY_DYN_LINK_TYPED:
        {
            bcore_array_dyn_link_typed_s* arr = obj;
            if( !arr->type ) ERR( "attempt to take ownership of type-zero array" );
            const bcore_inst_s* instance_p = bcore_inst_s_get_typed( arr->type );
            vd_t* src_data = arr->data;
            arr->data = bcore_u_alloc( sizeof( vd_t ), NULL, arr->size, &arr->space );
            vd_t* dst_data = arr->data;
            for( uz_t i = 0; i < arr->size; i++ ) *dst_data++ = instance_p->clone( instance_p, *src_data++ );
        }
        break;

        case BCORE_CAPS_ARRAY_DYN_LINK_AWARE:
        {
            bcore_array_dyn_link_aware_s* arr = obj;
            vd_t* src_data = arr->data;
            arr->data = bcore_u_alloc( sizeof( vd_t ), NULL, arr->size, &arr->space );
            vd_t* dst_data = arr->data;
            for( uz_t i = 0; i < arr->size; i++ ) *dst_data++ = bcore_inst_a_clone( *src_data++ );
        }
        break;

        default: ERR( "invalid type_caps (%"PRIu32")", ( u2_t )p->type_caps );
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpq $0x0, 0x18(%rdi)
jne 0xebea7
movq 0x20(%rdi), %rax
movq 0x8(%rsi,%rax), %rdx
cmpq 0x10(%rsi,%rax), %rdx
jbe 0xebea7
movq 0x10(%rdi), %r8
leaq -0x6(%r8), %rcx
cmpq $0x4, %rcx
ja 0xebe27
leaq (%rsi,%rax), %rbp
leaq (%rsi,%rax), %rbx
addq $0x10, %rbx
leaq 0x5cf4a(%rip), %rax     # 0x1489d0
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x28(%rdi), %r12
movq 0x18(%r12), %r15
movq (%rbp), %r14
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0xbe7d5
movq %rax, %rbx
movq %rax, (%rbp)
movq 0x8(%rbp), %rcx
cmpb $0x0, 0x2c(%r12)
je 0xebe56
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
jmp 0xebe14
movq (%rbp), %rax
movq %rax, 0x10(%rsp)
movl $0x8, %edi
xorl %esi, %esi
movq %rbx, %rcx
callq 0xbe7d5
movq %rax, 0x8(%rsp)
movq %rax, (%rbp)
movq 0x8(%rbp), %rcx
testq %rcx, %rcx
je 0xebea7
xorl %r14d, %r14d
leaq 0xb0962(%rip), %r15     # 0x19c468
movq 0x10(%rsp), %rax
movq (%rax,%r14,8), %r12
testq %r12, %r12
je 0xebbb6
movq %rbp, %rbx
movq (%r12), %r13
movl (%r15), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r15,%rax,8), %rcx
movq 0x18(%r15,%rax,8), %rdx
andq %r13, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r13, %rdx
je 0xebb75
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r13, %rdx
je 0xebb75
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r13, %rdx
je 0xebb75
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r13, %rdx
jne 0xebb7e
movq (%rax,%rcx), %rbp
testq %rbp, %rbp
jne 0xebba1
movabsq $0x782b96602f424981, %rdi # imm = 0x782B96602F424981
movq %r13, %rsi
callq 0xe9bc5
movq %rax, %rbp
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x115fac
movq %rbp, %rdi
movq %r12, %rsi
callq *0xc0(%rbp)
movq %rbx, %rbp
movq 0x8(%rbx), %rcx
jmp 0xebbb8
xorl %eax, %eax
movq 0x8(%rsp), %rdx
movq %rax, (%rdx,%r14,8)
incq %r14
cmpq %rcx, %r14
jb 0xebb06
jmp 0xebea7
movq 0x28(%rdi), %r14
movq (%rbp), %r15
movl $0x8, %edi
xorl %esi, %esi
movq %rbx, %rcx
callq 0xbe7d5
movq %rax, (%rbp)
cmpq $0x0, 0x8(%rbp)
je 0xebea7
movq %rax, %rbx
xorl %r12d, %r12d
movq (%r15,%r12,8), %rsi
movq %r14, %rdi
callq *0xc0(%r14)
movq %rax, (%rbx,%r12,8)
incq %r12
cmpq 0x8(%rbp), %r12
jb 0xebbfe
jmp 0xebea7
movq 0x18(%rbp), %r14
testq %r14, %r14
jne 0xebc4c
leaq 0x5cf5a(%rip), %rdi     # 0x148b88
leaq 0x5cf73(%rip), %rsi     # 0x148ba8
leaq 0x5cf80(%rip), %rcx     # 0x148bbc
movl $0xa9, %edx
xorl %eax, %eax
callq 0xbe592
movq 0x18(%rbp), %r14
leaq 0xb0815(%rip), %rax     # 0x19c468
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 0xebca9
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r14, %rdx
je 0xebca9
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r14, %rdx
je 0xebca9
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r14, %rdx
jne 0xebcb2
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0xebcd9
movabsq $0x782b96602f424981, %rdi # imm = 0x782B96602F424981
movq %r14, %rsi
callq 0xe9bc5
movq %rax, %r15
leaq 0xb079a(%rip), %rdi     # 0x19c468
movq %r14, %rsi
movq %rax, %rdx
callq 0x115fac
movq (%rbp), %r14
movq 0x8(%rbp), %rdx
movl $0x8, %edi
xorl %esi, %esi
movq %rbx, %rcx
callq 0xbe7d5
movq %rax, (%rbp)
cmpq $0x0, 0x8(%rbp)
je 0xebea7
movq %rax, %rbx
xorl %r12d, %r12d
movq (%r14,%r12,8), %rsi
movq %r15, %rdi
callq *0xc0(%r15)
movq %rax, (%rbx,%r12,8)
incq %r12
cmpq 0x8(%rbp), %r12
jb 0xebd05
jmp 0xebea7
movq 0x18(%rbp), %r15
testq %r15, %r15
jne 0xebd53
leaq 0x5ce53(%rip), %rdi     # 0x148b88
leaq 0x5ce6c(%rip), %rsi     # 0x148ba8
leaq 0x5ce79(%rip), %rcx     # 0x148bbc
movl $0x85, %edx
xorl %eax, %eax
callq 0xbe592
movq 0x18(%rbp), %r15
leaq 0xb070e(%rip), %rax     # 0x19c468
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 0xebdb0
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0xebdb0
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0xebdb0
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0xebdb9
movq (%rax,%rcx), %r14
testq %r14, %r14
jne 0xebde0
movabsq $0x782b96602f424981, %rdi # imm = 0x782B96602F424981
movq %r15, %rsi
callq 0xe9bc5
movq %rax, %r14
leaq 0xb0693(%rip), %rdi     # 0x19c468
movq %r15, %rsi
movq %rax, %rdx
callq 0x115fac
movq 0x18(%r14), %r12
movq (%rbp), %r15
movq 0x8(%rbp), %rdx
movq %r12, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0xbe7d5
movq %rax, %rbx
movq %rax, (%rbp)
movq 0x8(%rbp), %rcx
cmpb $0x0, 0x2c(%r14)
je 0xebe80
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xbe8bb
leaq 0x5cd5a(%rip), %rdi     # 0x148b88
leaq 0x5cd73(%rip), %rsi     # 0x148ba8
leaq 0x5cdad(%rip), %rcx     # 0x148be9
movl $0xbc, %edx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xbe592
testq %rcx, %rcx
je 0xebea7
xorl %r13d, %r13d
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq *0x90(%r12)
addq %r15, %rbx
addq %r15, %r14
incq %r13
cmpq 0x8(%rbp), %r13
jb 0xebe5e
jmp 0xebea7
testq %rcx, %rcx
je 0xebea7
xorl %r13d, %r13d
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq *0x90(%r14)
addq %r12, %rbx
addq %r12, %r15
incq %r13
cmpq 0x8(%rbp), %r13
jb 0xebe88
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq