// File: /workspace/github_c_makefile_star2_O1/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_uz_selftest
st_s* bcore_arr_uz_selftest( void )
{
    st_s* log = st_s_createf( "== bcore_arr_uz_selftest " );
    st_s_push_char_n( log, '=', 80 - log->size );
    st_s_push_char( log, '\n' );

    bcore_arr_uz_s* sz_arr1 = bcore_arr_uz_s_create();
    bcore_arr_uz_s* sz_arr2 = bcore_arr_uz_s_create();
    uz_t size = 100000;
    {
        u2_t rval = 1;
        clock_t time = clock();
        for( uz_t i = 0; i < size; i++ )
        {
            rval = bcore_xsg_u2( rval );
            bcore_arr_uz_s_push( sz_arr1, rval );
        }
        time = clock() - time;
        st_s_push_fa( log, "#p28.{bcore_arr_uz_s_push } #<uz_t>ns\n", ( uz_t ) ( ( 1E9 * ( f3_t )time/CLOCKS_PER_SEC ) / size ) );
    }

    const bcore_array_s* array_p = bcore_array_s_get_typed( TYPEOF_bcore_arr_uz_s );
    const bcore_inst_s* u2_t_p = bcore_inst_s_get_typed( TYPEOF_u2_t );

    {
        u2_t rval = 1;
        clock_t time = clock();
        for( uz_t i = 0; i < size; i++ )
        {
            rval = bcore_xsg_u2( rval );
            bcore_array_p_push( array_p, (bcore_array*)sz_arr2, sr_pwc( u2_t_p, &rval ) );
        }
        time = clock() - time;
        st_s_push_fa( log, "#p28.{bcore_array_p_push } #<uz_t>ns\n", ( uz_t ) ( ( 1E9 * ( f3_t )time/CLOCKS_PER_SEC ) / size ) );
    }

    ASSERT( bcore_compare_aware( sz_arr1, sz_arr2 ) == 0 );

    {
        clock_t time = clock();
        bcore_arr_uz_s_sort( sz_arr1, 1 );
        time = clock() - time;
        st_s_push_fa( log, "#p28.{bcore_arr_uz_s_sort } #<uz_t>ns\n", ( uz_t ) ( ( 1E9 * ( f3_t )time/CLOCKS_PER_SEC ) / size ) );
    }

    {
        clock_t time = clock();
        bcore_array_a_sort( (bcore_array*)sz_arr2, 0, -1, 1 );
        time = clock() - time;
        st_s_push_fa( log, "#p28.{bcore_array_a_sort } #<uz_t>ns\n", ( uz_t ) ( ( 1E9 * ( f3_t )time/CLOCKS_PER_SEC ) / size ) );
    }

    bcore_arr_uz_s* permutation = bcore_arr_uz_s_create_random_permutation( bcore_xsg2_u2, 1, size );

    {
        clock_t time = clock();
        bcore_arr_uz_s_reorder( sz_arr1, permutation );
        time = clock() - time;
        st_s_push_fa( log, "#p28.{bcore_arr_uz_s_reorder } #<uz_t>ns\n", ( uz_t ) ( ( 1E9 * ( f3_t )time/CLOCKS_PER_SEC ) / size ) );
    }

    {
        clock_t time = clock();
        bcore_array_a_reorder( (bcore_array*)sz_arr2, permutation );
        time = clock() - time;
        st_s_push_fa( log, "#p28.{bcore_array_a_reorder } #<uz_t>ns\n", ( uz_t ) ( ( 1E9 * ( f3_t )time/CLOCKS_PER_SEC ) / size ) );
    }

    ASSERT( bcore_compare_aware( sz_arr1, sz_arr2 ) == 0 );

//    bcore_txt_ml_to_stdout( sr_awc( sz_arr1 ) );

    bcore_arr_uz_s_discard( permutation );
    bcore_arr_uz_s_discard( sz_arr1 );
    bcore_arr_uz_s_discard( sz_arr2 );

    st_s_push_char_n( log, '=', 80 );
    st_s_push_char( log, '\n' );
    return log;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movabsq $0x3cc9acead7f9ac2e, %rbx # imm = 0x3CC9ACEAD7F9AC2E
leaq 0x8829a(%rip), %rdi     # 0x14d766
xorl %eax, %eax
callq 0x114c1e
movq %rax, %r14
movl $0x50, %edx
subq 0x10(%rax), %rdx
movq %rax, %rdi
movl $0x3d, %esi
callq 0x115408
movq %r14, %rdi
movl $0xa, %esi
callq 0x115381
movl $0x20, %esi
xorl %edi, %edi
callq 0xc8315
movq %rax, %rbp
movl $0x20, %esi
movq %rax, %rdi
callq 0xc8366
movq %rbx, (%rbp)
movl $0x20, %esi
xorl %edi, %edi
callq 0xc8315
movq %rax, %r15
movl $0x20, %esi
movq %rax, %rdi
callq 0xc8366
movq %rbx, (%r15)
movl $0x1, %r13d
movl $0x186a0, %ebx          # imm = 0x186A0
callq 0xd340
movq %rax, %r12
movl %r13d, %eax
shrl $0x7, %eax
xorl %r13d, %eax
movl %eax, %ecx
shll $0x19, %ecx
xorl %eax, %ecx
movl %ecx, %r13d
shrl $0xc, %r13d
xorl %ecx, %r13d
movq %rbp, %rdi
movq %r13, %rsi
callq 0xbf737
decq %rbx
jne 0xc554b
movq %rbp, 0x28(%rsp)
callq 0xd340
subq %r12, %rax
cvtsi2sd %rax, %xmm0
mulsd 0x7cda9(%rip), %xmm0    # 0x142338
divsd 0x72ad9(%rip), %xmm0    # 0x138070
divsd 0x881b1(%rip), %xmm0    # 0x14d750
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x7cd0d(%rip), %xmm0    # 0x1422c0
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
leaq 0x881bb(%rip), %rsi     # 0x14d780
movq %r14, %rdi
xorl %eax, %eax
callq 0x1157cb
leaq 0xe384a(%rip), %rdx     # 0x1a8e20
movl (%rdx), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rdx,%rax,8), %rcx
movq 0x18(%rdx,%rax,8), %rdx
movabsq $0x3cc9acead7f9ac2e, %rbx # imm = 0x3CC9ACEAD7F9AC2E
andq %rbx, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %rbx, %rdx
je 0xc5639
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbx, %rdx
je 0xc5639
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbx, %rdx
je 0xc5639
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbx, %rdx
jne 0xc5c4a
movq (%rax,%rcx), %rbp
testq %rbp, %rbp
jne 0xc5669
movabsq $-0x5073d588c3beb52e, %rdi # imm = 0xAF8C2A773C414AD2
movq %rbx, %rsi
callq 0xf3f85
movq %rax, %rbp
leaq 0xe37c2(%rip), %rdi     # 0x1a8e20
movq %rbx, %rsi
movq %rax, %rdx
callq 0x12128c
movabsq $-0x6119581ac7eacd63, %r13 # imm = 0x9EE6A7E53815329D
leaq 0xe3dee(%rip), %rax     # 0x1a9468
movl (%rax), %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %r13, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %r13, %rdx
je 0xc56d4
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r13, %rdx
je 0xc56d4
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r13, %rdx
je 0xc56d4
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r13, %rdx
jne 0xc5c51
movq (%rax,%rcx), %r12
movq %r14, 0x38(%rsp)
testq %r12, %r12
jne 0xc5709
movabsq $0x782b96602f424981, %rdi # imm = 0x782B96602F424981
movq %r13, %rsi
callq 0xf3f85
movq %rax, %r12
leaq 0xe3d6a(%rip), %rdi     # 0x1a9468
movq %r13, %rsi
movq %rax, %rdx
callq 0x12128c
leaq 0x24(%rsp), %rbx
movl $0x1, (%rbx)
movl $0x186a0, %r13d         # imm = 0x186A0
callq 0xd340
movq %rax, 0x30(%rsp)
movl $0x1, %r14d
movl 0x24(%rsp), %eax
movl %eax, %ecx
shrl $0x7, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0x19, %eax
xorl %ecx, %eax
movl %eax, %ecx
shrl $0xc, %ecx
xorl %eax, %ecx
movl %ecx, 0x24(%rsp)
movq %rbx, 0x40(%rsp)
movq %r12, 0x48(%rsp)
movq %r14, 0x50(%rsp)
movq %r14, 0x10(%rsp)
movupd 0x40(%rsp), %xmm0
movupd %xmm0, (%rsp)
movq %rbp, %rdi
movq %r15, %rsi
callq 0xf7857
decq %r13
jne 0xc572a
callq 0xd340
subq 0x30(%rsp), %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x7cba8(%rip), %xmm0    # 0x142338
divsd 0x728d8(%rip), %xmm0    # 0x138070
divsd 0x87fb0(%rip), %xmm0    # 0x14d750
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x7cb0c(%rip), %xmm0    # 0x1422c0
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
leaq 0x87fe1(%rip), %rsi     # 0x14d7a7
movq 0x38(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x1157cb
movq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xfe9cd
testl %eax, %eax
je 0xc5812
leaq 0x72e57(%rip), %rdi     # 0x138647
leaq 0x87fd6(%rip), %rsi     # 0x14d7cd
leaq 0x87ffc(%rip), %rdx     # 0x14d7fa
leaq 0x8800b(%rip), %rcx     # 0x14d810
movl $0xd92, %r8d            # imm = 0xD92
xorl %eax, %eax
callq 0xc8053
callq 0xd340
movq %rax, %rbx
movq %r12, %rdi
movl $0x1, %esi
callq 0xbf927
callq 0xd340
subq %rbx, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x7caf9(%rip), %xmm0    # 0x142338
divsd 0x72829(%rip), %xmm0    # 0x138070
divsd 0x87f01(%rip), %xmm0    # 0x14d750
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x7ca5d(%rip), %xmm0    # 0x1422c0
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
leaq 0x87fa7(%rip), %rsi     # 0x14d81c
movq %r14, %rdi
xorl %eax, %eax
callq 0x1157cb
callq 0xd340
movq %rax, %rbp
movq (%r15), %r12
leaq 0xe358f(%rip), %rdx     # 0x1a8e20
movl (%rdx), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rdx,%rax,8), %rcx
movq 0x18(%rdx,%rax,8), %rdx
andq %r12, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r12, %rdx
je 0xc58ea
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r12, %rdx
je 0xc58ea
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r12, %rdx
je 0xc58ea
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r12, %rdx
jne 0xc5c59
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0xc591a
movabsq $-0x5073d588c3beb52e, %rdi # imm = 0xAF8C2A773C414AD2
movq %r12, %rsi
callq 0xf3f85
movq %rax, %r13
leaq 0xe3511(%rip), %rdi     # 0x1a8e20
movq %r12, %rsi
movq %rax, %rdx
callq 0x12128c
xorl %ebx, %ebx
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq $-0x1, %rcx
movl $0x1, %r8d
callq 0xf914f
callq 0xd340
subq %rbp, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x7c9ea(%rip), %xmm0    # 0x142338
divsd 0x7271a(%rip), %xmm0    # 0x138070
divsd 0x87df2(%rip), %xmm0    # 0x14d750
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x7c94e(%rip), %xmm0    # 0x1422c0
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
leaq 0x87ebf(%rip), %rsi     # 0x14d843
movq %r14, %rdi
xorl %eax, %eax
callq 0x1157cb
movl $0x20, %esi
xorl %edi, %edi
callq 0xc8315
movq %rax, %rbp
movl $0x20, %esi
movq %rax, %rdi
callq 0xc8366
movabsq $0x3cc9acead7f9ac2e, %rax # imm = 0x3CC9ACEAD7F9AC2E
movq %rax, (%rbp)
movl $0x186a0, %esi          # imm = 0x186A0
movq %rbp, %rdi
callq 0xbf5e2
movq 0x8(%rbp), %rax
movq %rbx, (%rax,%rbx,8)
incq %rbx
cmpq $0x186a0, %rbx          # imm = 0x186A0
jne 0xc59c5
movq $0x186a0, 0x10(%rbp)    # imm = 0x186A0
movl $0x1, %r9d
movl $0x186a0, %esi          # imm = 0x186A0
movq $-0x186a0, %rdi         # imm = 0xFFFE7960
xorl %r8d, %r8d
xorl %ecx, %ecx
movl %r9d, %eax
shrl $0x5, %eax
xorl %r9d, %eax
movl %eax, %edx
shll $0x1b, %edx
xorl %eax, %edx
movl %edx, %r9d
shrl $0x8, %r9d
xorl %edx, %r9d
addq %r9, %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
imulq %rdi, %rax
addq %r8, %rcx
addq %rax, %rcx
movq 0x8(%rbp), %rax
movq (%rax,%r8,8), %rdx
movq (%rax,%rcx,8), %r10
movq %r10, (%rax,%r8,8)
movq 0x8(%rbp), %rax
movq %rdx, (%rax,%rcx,8)
incq %r8
incq %rdi
decq %rsi
jne 0xc59f8
callq 0xd340
movq %rax, %rbx
movq 0x28(%rsp), %rdi
movq %rbp, %rsi
callq 0xbfa33
callq 0xd340
subq %rbx, %rax
cvtsi2sd %rax, %xmm0
mulsd 0x7c8c4(%rip), %xmm0    # 0x142338
divsd 0x725f4(%rip), %xmm0    # 0x138070
divsd 0x87ccc(%rip), %xmm0    # 0x14d750
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x7c828(%rip), %xmm0    # 0x1422c0
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
leaq 0x87dbf(%rip), %rsi     # 0x14d869
movq %r14, %rdi
xorl %eax, %eax
callq 0x1157cb
callq 0xd340
movq %rax, %r13
movq (%r15), %r12
leaq 0xe335a(%rip), %rdx     # 0x1a8e20
movl (%rdx), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rdx,%rax,8), %rcx
movq 0x18(%rdx,%rax,8), %rdx
andq %r12, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r12, %rdx
je 0xc5b1f
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r12, %rdx
je 0xc5b1f
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r12, %rdx
je 0xc5b1f
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r12, %rdx
jne 0xc5c61
movq (%rax,%rcx), %rbx
testq %rbx, %rbx
jne 0xc5b4f
movabsq $-0x5073d588c3beb52e, %rdi # imm = 0xAF8C2A773C414AD2
movq %r12, %rsi
callq 0xf3f85
movq %rax, %rbx
leaq 0xe32dc(%rip), %rdi     # 0x1a8e20
movq %r12, %rsi
movq %rax, %rdx
callq 0x12128c
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0xf9848
callq 0xd340
subq %r13, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x7c7c3(%rip), %xmm0    # 0x142338
divsd 0x724f3(%rip), %xmm0    # 0x138070
divsd 0x87bcb(%rip), %xmm0    # 0x14d750
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x7c727(%rip), %xmm0    # 0x1422c0
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
leaq 0x87ce8(%rip), %rsi     # 0x14d893
movq %r14, %rdi
xorl %eax, %eax
callq 0x1157cb
movq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0xfe9cd
testl %eax, %eax
je 0xc5bef
leaq 0x72a7a(%rip), %rdi     # 0x138647
leaq 0x87bf9(%rip), %rsi     # 0x14d7cd
leaq 0x87c1f(%rip), %rdx     # 0x14d7fa
leaq 0x87c2e(%rip), %rcx     # 0x14d810
movl $0xdb2, %r8d            # imm = 0xDB2
xorl %eax, %eax
callq 0xc8053
leaq -0x6755(%rip), %rbx     # 0xbf4a1
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xc8352
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
callq 0xc8352
movq %rbx, %rdi
movq %r15, %rsi
callq 0xc8352
movl $0x50, %edx
movq %r14, %rdi
movl $0x3d, %esi
callq 0x115408
movq %r14, %rdi
movl $0xa, %esi
callq 0x115381
movq %r14, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
jmp 0xc563d
xorl %r12d, %r12d
jmp 0xc56d8
xorl %r13d, %r13d
jmp 0xc58ee
xorl %ebx, %ebx
jmp 0xc5b23