// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore.xo.c
// Function: x_btcl_generic_copy
er_t x_btcl_generic_copy( sr_s* sr, const sr_s* sb )
{
    // bcore_x_btcl.x:167:1
    
    er_t copy_typed_err = x_inst_t_copy_typed( sr->o,sr_s_o_type(sr), sr_s_o_type(sb), sb->o );
    if( copy_typed_err == ((tp_t)(TYPEOF_conversion_error)) )
    {
        if( sr_s_o_type(sb) == ((tp_t)(TYPEOF_x_btcl_list_s)) )
        {
            x_array* array = NULL;
            tp_t t_array = 0;
            if( x_array_t_is_array(sr_s_type(sr) ) )
            {
                array =((x_array*)( sr->o));
                t_array = sr_s_type(sr);
            }
            else if( x_stamp_t_is_aware(sr_s_type(sr) ) && ( array = x_array_feature_a_m_get_wrapped_array(((x_array_feature*)(sr->o))) ) )
            {
                t_array = array->_;
            }
    
            if( array )
            {
                const x_btcl_list_s* list = ((const x_btcl_list_s*)(sb->o));
                x_array_t_clear( array,t_array );
                for(sz_t i = 0; i < list->arr.size; i++ ) x_array_t_push_sr( array,t_array, sr_cw( list->arr.data[ i ] ) );
                bcore_error_remove_last_if_of(((tp_t)(TYPEOF_conversion_error)) );
                copy_typed_err = 0;
            }
        }
    }
    return  copy_typed_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x3a9e4
movq 0x8(%rax), %rdi
jmp 0x3a9e6
xorl %edi, %edi
movq (%r15), %rsi
testq %r14, %r14
je 0x3a9fd
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x3a9fd
movq 0x8(%rax), %rdx
jmp 0x3a9ff
xorl %edx, %edx
movabsq $-0x4e68f1e683c13928, %rbx # imm = 0xB1970E197C3EC6D8
movq (%r14), %rcx
callq 0x58579
cmpq %rbx, %rax
jne 0x3ab43
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x3ab40
movabsq $-0x240ec4eb25c1f3e8, %rcx # imm = 0xDBF13B14DA3E0C18
cmpq %rcx, 0x8(%rax)
jne 0x3ab40
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x3aa4a
movq 0x8(%rax), %rdi
jmp 0x3aa4c
xorl %edi, %edi
callq 0x3f11e
testb %al, %al
je 0x3aa67
movq (%r15), %r12
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x3aa76
movq 0x8(%rax), %r15
jmp 0x3aa79
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x3aa83
movq 0x8(%rax), %rdi
jmp 0x3aa85
xorl %r15d, %r15d
testq %r12, %r12
jne 0x3aae8
jmp 0x3ab40
xorl %edi, %edi
callq 0x2dd1e
testb %al, %al
je 0x3ab40
movq (%r15), %r15
movq (%r15), %r12
leaq 0xd8151(%rip), %rdi     # 0x112bf0
movq %r12, %rsi
callq 0x582de
movq %rax, %r13
testq %rax, %rax
jne 0x3aad6
movabsq $-0x104628ab2f6e56c8, %rdi # imm = 0xEFB9D754D091A938
movq %r12, %rsi
callq 0x79b94
movq %rax, %r13
leaq 0xd8125(%rip), %rdi     # 0x112bf0
movq %r12, %rsi
movq %rax, %rdx
callq 0x98d4b
movq %r15, %rdi
callq *0x18(%r13)
testq %rax, %rax
je 0x3ab40
movq %rax, %r12
movq (%rax), %r15
movq (%r14), %r14
movq %r12, %rdi
movq %r15, %rsi
callq 0x42414
pushq $0x10
popq %r13
xorl %ebp, %ebp
cmpq 0x18(%r14), %rbp
jae 0x3ab52
movq 0x10(%r14), %rax
movups -0x10(%rax,%r13), %xmm0
movaps %xmm0, 0x20(%rsp)
movq (%rax,%r13), %rax
andq $-0x3, %rax
movq %rax, 0x30(%rsp)
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x3702e
incq %rbp
addq $0x18, %r13
jmp 0x3aafc
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x604b4
xorl %eax, %eax
jmp 0x3ab43