// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore.xo.c
// Function: x_hmap_tp_test_selftest
void x_hmap_tp_test_selftest( void )
{
    // bcore_x_hmap.x:54:5
    BLM_INIT_LEVEL(0);
    x_sink* log = x_sink_stdout();
    x_sink_push_fa(log,"#p80'='{== #<sc_t>_selftest }\n", bnameof( ((tp_t)(TYPEOF_x_hmap_tp_test)) ) );
    
    sz_t cycles = 200000;
    
    x_hmap_tp_test_map_s* map    = ((x_hmap_tp_test_map_s*)BLM_LEVEL_T_PUSH(0,x_hmap_tp_test_map_s,x_hmap_tp_test_map_s_create()));
    x_hmap_tp_test_kv_arr_s* kv_arr = ((x_hmap_tp_test_kv_arr_s*)BLM_LEVEL_T_PUSH(0,x_hmap_tp_test_kv_arr_s,x_hmap_tp_test_kv_arr_s_create()));
    x_array_set_space(((x_array*)(kv_arr)),cycles );
    
    clock_t time = clock();
    x_sink_push_fa(log,"Mixed access: " );
    
    x_hmap_tp_test_val_s mval;BLM_T_INIT_SPUSH(x_hmap_tp_test_val_s, &mval);;
    
    {
        u3_t rval1 = 1;
        u3_t rval2 = 12345;
        for(sz_t i = 0; i < cycles; i++ )
        {
            rval1 = bcore_lcg00_u3( rval1 );
            rval2 = bcore_lcg00_u3( rval2 );
            x_hmap_tp_test_kv_s* kv = ((x_hmap_tp_test_kv_s*)(x_array_push(((x_array*)(kv_arr)))));
            kv->key = ( tp_t )rval1;
            kv->val = rval2;
            mval.val = kv->val;
            x_hmap_tp_set_c(((x_hmap_tp*)(map)),kv->key,((const x_inst*)(&( mval ))));
    
            // retrieve
            rval1 = bcore_lcg00_u3( rval1 );
            kv = (&(kv_arr->data[ rval1 % kv_arr->size ]));
    
            u3_t val = ((const x_hmap_tp_test_val_s*)(x_hmap_tp_c_get(((const x_hmap_tp*)(map)),kv->key )))->val;
            if( kv->val != val ) ERR_fa( "value mismatch (#<u3_t> vs #<u3_t>)", kv->val, val );
    
            // delete
            rval1 = bcore_lcg00_u3( rval1 );
            if( ( ( rval1 >> 10 ) & 1 ) == 1 )
            {
                rval1 = bcore_lcg00_u3( rval1 );
                sz_t idx = rval1 % kv_arr->size;
                const x_hmap_tp_test_kv_s* kv =&( kv_arr->data[ idx ]);
                if( !((const x_hmap_tp_test_val_s*)(x_hmap_tp_c_get(((const x_hmap_tp*)(map)),kv->key ))) ) ERR_fa( "key #<tp_t> not found", kv->key );
                x_hmap_tp_remove(((x_hmap_tp*)(map)),kv->key );
                if( ((const x_hmap_tp_test_val_s*)(x_hmap_tp_c_get(((const x_hmap_tp*)(map)),kv->key ))) )  ERR_fa( "deleted key #<tp_t> still exists", kv->key );
                kv_arr->data[ idx ] = kv_arr->data[ kv_arr->size - 1 ];
                x_array_set_size(((x_array*)(kv_arr)),kv_arr->size - 1 );
            }
        }
    }
    
    time = clock() - time;
    x_sink_push_fa(log,"#<f3_t>s\n", ( f3_t )time/CLOCKS_PER_SEC );
    x_sink_push_st_d(log,x_hmap_tp_test_map_s_create_st_status(map) );
    
    time = clock();
    const x_hmap_tp_test_map_s* map_cloned = ((x_hmap_tp_test_map_s*)BLM_LEVEL_T_PUSH(0,x_hmap_tp_test_map_s,x_hmap_tp_test_map_s_clone(map)));
    time = clock() - time;
    x_sink_push_fa(log,"Clone .......... #<f3_t>s\n", ( f3_t )time/CLOCKS_PER_SEC );
    
    time = clock();
    if( bcore_compare_aware( map, map_cloned ) != 0 )
    {
        ERR( "comparison failed:\n%s", bcore_diff_aware( map, map_cloned )->sc );
    }
    
    time = clock() - time;
    x_sink_push_fa(log,"Comparison ..... #<f3_t>s\n", ( f3_t )time/CLOCKS_PER_SEC );
    
    {BLM_INIT_LEVEL(1);
        time = clock();
        x_hmap_tp_test_map_s* map_trans = ((x_hmap_tp_test_map_s*)BLM_LEVEL_T_PUSH(1,x_hmap_tp_test_map_s,x_hmap_tp_test_map_s_create()));
        BLM_TRY_EXIT(x_stamp_set_sr(((x_stamp*)(map_trans)),btypeof( "map" ), x_stamp_c_get_sr(((x_stamp*)(map)),btypeof( "map" ) ) ))
        time = clock() - time;
        x_sink_push_fa(log,"Stamp-assign ... #<f3_t>s\n", ( f3_t )time/CLOCKS_PER_SEC );
        time = clock();
        sz_t map_size = x_hmap_tp_size(((const x_hmap_tp*)(map)));
        for(uz_t i = 0; i < map_size; i++ )
        {
            tp_t key = x_hmap_tp_idx_key(((const x_hmap_tp*)(map)),i );
            if( key != 0 )
            {
                ASSERT( x_hmap_tp_exists(((const x_hmap_tp*)(map_trans)),key ) );
                ASSERT( ((const x_hmap_tp_test_val_s*)(x_hmap_tp_c_get(((const x_hmap_tp*)(map)),key )))->val == ((const x_hmap_tp_test_val_s*)(x_hmap_tp_c_get(((const x_hmap_tp*)(map_trans)),key )))->val );
            }
        }
        time = clock() - time;
        x_sink_push_fa(log,"verify assign .. #<f3_t>s\n", ( f3_t )time/CLOCKS_PER_SEC );
    BLM_DOWN();}
    
    {BLM_INIT_LEVEL(1);
        time = clock();
        x_hmap_tp_test_map_s* map_trans = ((x_hmap_tp_test_map_s*)BLM_LEVEL_T_PUSH(1,x_hmap_tp_test_map_s,x_hmap_tp_test_map_s_create()));
        st_s* buf = st_s_create();
        x_bbml_to_sink(((const x_bbml*)(map)),((x_sink*)(buf )));
        BLM_TRY_EXIT(x_bbml_from_source(((x_bbml*)(map_trans)),((x_source*)BLM_LEVEL_A_PUSH(1,x_source_create_from_st_d(buf ))) ))
        time = clock() - time;
        x_sink_push_fa(log,"BBML Transfer .. #<f3_t>s\n", ( f3_t )time/CLOCKS_PER_SEC );
        time = clock();
        sz_t map_size = x_hmap_tp_size(((const x_hmap_tp*)(map)));
        for(uz_t i = 0; i < map_size; i++ )
        {
            tp_t key = x_hmap_tp_idx_key(((const x_hmap_tp*)(map)),i );
            if( key != 0 )
            {
                ASSERT( x_hmap_tp_exists(((const x_hmap_tp*)(map_trans)),key ) );
                ASSERT( ((const x_hmap_tp_test_val_s*)(x_hmap_tp_c_get(((const x_hmap_tp*)(map)),key )))->val == ((const x_hmap_tp_test_val_s*)(x_hmap_tp_c_get(((const x_hmap_tp*)(map_trans)),key )))->val );
            }
        }
        time = clock() - time;
        x_sink_push_fa(log,"verify transfer  #<f3_t>s\n", ( f3_t )time/CLOCKS_PER_SEC );
    BLM_DOWN();}
    
    time = clock();
    x_sink_push_fa(log,"\nRead-access of #<sz_t> keys: ", kv_arr->size );
    uz_t read_cycles = 20;
    for(uz_t j = 0; j < read_cycles; j++ )
    {
        for(uz_t i = 0; i < kv_arr->size; i++ )
        {
            u3_t val = ((const x_hmap_tp_test_val_s*)(x_hmap_tp_c_get(((const x_hmap_tp*)(map)),kv_arr->data[ i ].key )))->val;
            if( val != kv_arr->data[ i ].val ) ERR_fa( "value mismatch (#<u3_t> vs #<u3_t>)", val, kv_arr->data[ i ].val );
        }
    }
    time = clock() - time;
    x_sink_push_fa(log,"(#<f3_t> per access)\n", ( ( f3_t )time/CLOCKS_PER_SEC ) / ( kv_arr->size * read_cycles ) );
    
    x_sink_push_fa(log,"\n" );
    x_sink_push_fa(log,"Removal: " );
    time = clock();
    while( kv_arr->size )
    {
        const x_hmap_tp_test_kv_s* kv =&( kv_arr->data[ kv_arr->size - 1 ]);
        if( !((const x_hmap_tp_test_val_s*)(x_hmap_tp_c_get(((const x_hmap_tp*)(map)),kv->key ))) ) ERR_fa( "key #<tp_t> not found", kv->key );
        x_hmap_tp_remove(((x_hmap_tp*)(map)),kv->key );
        if( ((const x_hmap_tp_test_val_s*)(x_hmap_tp_c_get(((const x_hmap_tp*)(map)),kv->key ))) ) ERR_fa( "deleted key #<tp_t> still exists", kv->key );
        x_array_set_size(((x_array*)(kv_arr)),kv_arr->size - 1 );
    }
    time = clock() - time;
    x_sink_push_fa(log,"(#<f3_t>s)\n", ( f3_t )time/CLOCKS_PER_SEC );
    x_sink_push_st_d(log,x_hmap_tp_test_map_s_create_st_status(map) );
    x_sink_push_fa(log,"#r80{=}\n" );
    BLM_DOWN();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movabsq $-0x6834659aae9abc39, %r14 # imm = 0x97CB9A65516543C7
movabsq $0x1c140000000001cd, %rbp # imm = 0x1C140000000001CD
leaq 0xcf0e5(%rip), %rax     # 0x117dd0
movq (%rax), %rsi
leaq 0x90(%rsp), %r12
movq %r12, 0x48(%rsp)
movq %r12, %rdi
callq 0x717f5
andq $0x0, 0x10(%r12)
leaq 0xcf0d8(%rip), %rax     # 0x117de8
movq (%rax), %rbx
movabsq $-0x742a684e9742d474, %rdi # imm = 0x8BD597B168BD2B8C
callq 0x71db6
leaq 0x6df53(%rip), %rsi     # 0xb6c7c
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2e1bb
callq 0x48be0
movq %r12, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rax, %rcx
callq 0x71967
movq %rax, %r14
callq 0x48aec
movabsq $-0x2dd2b458a7f76c66, %rdx # imm = 0xD22D4BA75808939A
movq %r12, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0x71967
movq %rax, %r15
movl $0x30d40, %esi          # imm = 0x30D40
movq %rax, %rdi
callq 0x49630
callq 0xd340
movq %rax, 0x38(%rsp)
leaq 0x6df10(%rip), %rsi     # 0xb6c9b
movq %rbx, 0x30(%rsp)
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2e1bb
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
callq 0x48b27
movabsq $0x33f73e3560adac2, %rsi # imm = 0x33F73E3560ADAC2
movq %r12, %rdi
movq %rbx, %rdx
callq 0x71998
movl $0x30d40, %eax          # imm = 0x30D40
pushq $0x1
popq %r12
movl $0x3039, %r13d          # imm = 0x3039
movq %r14, 0x28(%rsp)
subq $0x1, %rax
jb 0x48f57
movq %rax, 0x20(%rsp)
imulq %rbp, %r12
incq %r12
imulq %rbp, %r13
incq %r13
movq %r15, %rdi
callq 0x34305
movq %r12, (%rax)
movq %r13, 0x8(%rax)
movq %r13, 0x58(%rsp)
movq %r14, %rdi
movq %r12, %rsi
leaq 0x50(%rsp), %rdx
callq 0x33687
imulq %rbp, %r12
incq %r12
movq 0x8(%r15), %rbx
movq %r12, %rax
xorl %edx, %edx
divq 0x10(%r15)
movq %rdx, %rbp
shlq $0x4, %rbp
movq (%rbx,%rbp), %rsi
movq %r14, %rdi
callq 0x32705
movq 0x8(%rax), %r9
movq 0x8(%rbx,%rbp), %r8
cmpq %r9, %r8
je 0x48e67
leaq 0x6de5d(%rip), %rdi     # 0xb6caa
leaq 0x6b8fa(%rip), %rsi     # 0xb474e
movl $0x240d, %edx           # imm = 0x240D
leaq 0x6de62(%rip), %rcx     # 0xb6cc2
xorl %eax, %eax
callq 0x60186
movabsq $0x1c140000000001cd, %rbp # imm = 0x1C140000000001CD
imulq %rbp, %r12
incq %r12
btl $0xa, %r12d
jae 0x48f48
imulq %rbp, %r12
incq %r12
movq %r12, %rax
xorl %edx, %edx
divq 0x10(%r15)
movq %rdx, %rbp
movq 0x8(%r15), %rbx
shlq $0x4, %rbp
movq (%rbx,%rbp), %rsi
addq %rbp, %rbx
movq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x32705
testq %rax, %rax
jne 0x48edb
movq (%rbx), %r8
leaq 0x6dde9(%rip), %rdi     # 0xb6caa
leaq 0x6b886(%rip), %rsi     # 0xb474e
movl $0x2416, %edx           # imm = 0x2416
leaq 0x6de12(%rip), %rcx     # 0xb6ce6
xorl %eax, %eax
callq 0x60186
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x336b9
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x32705
testq %rax, %rax
je 0x48f1a
movq (%rbx), %r8
leaq 0x6ddaa(%rip), %rdi     # 0xb6caa
leaq 0x6b847(%rip), %rsi     # 0xb474e
movl $0x2418, %edx           # imm = 0x2418
leaq 0x6dde9(%rip), %rcx     # 0xb6cfc
xorl %eax, %eax
callq 0x60186
movq 0x8(%r15), %rax
movq 0x10(%r15), %rcx
shlq $0x4, %rcx
movups -0x10(%rax,%rcx), %xmm0
movups %xmm0, (%rax,%rbp)
movq 0x10(%r15), %rsi
decq %rsi
movq %r15, %rdi
callq 0x30a50
movabsq $0x1c140000000001cd, %rbp # imm = 0x1C140000000001CD
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %r14
jmp 0x48dd0
callq 0xd340
subq 0x38(%rsp), %rax
cvtsi2sd %rax, %xmm0
divsd 0x61102(%rip), %xmm0    # 0xaa070
leaq 0x6df42(%rip), %rsi     # 0xb6eb7
movq 0x30(%rsp), %r14
movq %r14, %rdi
movb $0x1, %al
callq 0x2e1bb
movq 0x28(%rsp), %rdi
callq 0x48c1b
movq %r14, %rdi
movq %rax, %rsi
callq 0x370f2
callq 0xd340
movq %rax, %rbx
movq 0x28(%rsp), %rdi
callq 0x48c01
leaq 0x90(%rsp), %rdi
xorl %esi, %esi
movabsq $-0x6834659aae9abc39, %rdx # imm = 0x97CB9A65516543C7
movq %rax, %rcx
callq 0x71967
movq %rax, %r12
callq 0xd340
subq %rbx, %rax
cvtsi2sd %rax, %xmm0
divsd 0x61091(%rip), %xmm0    # 0xaa070
leaq 0x6dd37(%rip), %rsi     # 0xb6d1d
movq %r14, %rdi
movq 0x28(%rsp), %r14
movb $0x1, %al
callq 0x2e1bb
callq 0xd340
movq %rax, %rbx
movq %r14, %rdi
movq %r12, %rsi
callq 0x81306
testl %eax, %eax
je 0x4903c
movq %r14, %rdi
movq %r12, %rsi
callq 0x81ada
movq 0x8(%rax), %r8
leaq 0x6dc88(%rip), %rdi     # 0xb6caa
leaq 0x6b725(%rip), %rsi     # 0xb474e
leaq 0x6dd08(%rip), %rcx     # 0xb6d38
movl $0x242b, %edx           # imm = 0x242B
xorl %eax, %eax
callq 0x60031
callq 0xd340
subq %rbx, %rax
cvtsi2sd %rax, %xmm0
divsd 0x6101f(%rip), %xmm0    # 0xaa070
leaq 0x6dcf6(%rip), %rsi     # 0xb6d4e
movq 0x30(%rsp), %rdi
movb $0x1, %al
callq 0x2e1bb
leaq 0x60(%rsp), %rbx
movq %rbx, 0x40(%rsp)
leaq 0x90(%rsp), %rsi
movq %rbx, %rdi
callq 0x717f5
movq $0x1, 0x10(%rbx)
callq 0xd340
movq %rax, %r12
callq 0x48be0
pushq $0x1
popq %rsi
movq %rbx, %rdi
movabsq $-0x6834659aae9abc39, %rdx # imm = 0x97CB9A65516543C7
movq %rax, %rcx
callq 0x71967
movq %rax, %rbx
leaq 0x7c107(%rip), %rdi     # 0xc51bc
callq 0x2f020
movq %rax, %r13
leaq 0xc0(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x4963b
movq (%rbx), %rsi
movq 0x10(%rbp), %rax
movq %rax, 0x10(%rsp)
movups (%rbp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %r13, %rdx
callq 0x2f7d2
testq %rax, %rax
je 0x4910c
movq %rax, %r13
leaq 0x60(%rsp), %rdi
callq 0x71b64
movl %r13d, %edi
callq 0x2dc20
callq 0xd340
subq %r12, %rax
cvtsi2sd %rax, %xmm0
divsd 0x60f4f(%rip), %xmm0    # 0xaa070
leaq 0x6dc41(%rip), %rsi     # 0xb6d69
movq 0x30(%rsp), %rdi
movb $0x1, %al
callq 0x2e1bb
callq 0xd340
movq %rax, 0x20(%rsp)
movq %r14, %rdi
callq 0x31a77
movq %rax, %rbp
xorl %r12d, %r12d
cmpq %r12, %rbp
je 0x491fa
movq %r14, %rdi
movq %r12, %rsi
callq 0x31a87
testq %rax, %rax
je 0x491f2
movq %rax, %r13
movq %rbx, %rdi
movq %rax, %rsi
callq 0x326ef
testb %al, %al
jne 0x491a4
leaq 0x614c5(%rip), %rdi     # 0xaa647
leaq 0x6dbfb(%rip), %rsi     # 0xb6d84
leaq 0x6db1a(%rip), %rdx     # 0xb6caa
leaq 0x6b5b7(%rip), %rcx     # 0xb474e
movl $0x243e, %r8d           # imm = 0x243E
xorl %eax, %eax
callq 0x5ffac
movq %r14, %rdi
movq %r13, %rsi
callq 0x32705
movq 0x8(%rax), %r14
movq %rbx, %rdi
movq %r13, %rsi
callq 0x32705
cmpq 0x8(%rax), %r14
movq 0x28(%rsp), %r14
je 0x491f2
leaq 0x61477(%rip), %rdi     # 0xaa647
leaq 0x6dbe4(%rip), %rsi     # 0xb6dbb
leaq 0x6dacc(%rip), %rdx     # 0xb6caa
leaq 0x6b569(%rip), %rcx     # 0xb474e
movl $0x243f, %r8d           # imm = 0x243F
xorl %eax, %eax
callq 0x5ffac
incq %r12
jmp 0x4914c
callq 0xd340
subq 0x20(%rsp), %rax
cvtsi2sd %rax, %xmm0
divsd 0x60e5f(%rip), %xmm0    # 0xaa070
leaq 0x6dc58(%rip), %rsi     # 0xb6e70
movq 0x30(%rsp), %rdi
movb $0x1, %al
callq 0x2e1bb
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x71b48
leaq 0x60(%rsp), %r12
movq %r12, (%rbx)
leaq 0x90(%rsp), %rsi
movq %r12, %rdi
callq 0x717f5
movq $0x1, 0x70(%rsp)
callq 0xd340
movq %rax, 0x20(%rsp)
callq 0x48be0
pushq $0x1
popq %r13
movq %r12, %rdi
movq %r13, %rsi
movabsq $-0x6834659aae9abc39, %rdx # imm = 0x97CB9A65516543C7
movq %rax, %rcx
callq 0x71967
movq %rax, %rbx
xorl %eax, %eax
callq 0x8eb65
movq %rax, %rbp
movq %r14, %rdi
movq %rax, %rsi
callq 0x4964f
movq %rbp, %rdi
callq 0x76c8f
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x71a90
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4965a
testq %rax, %rax
je 0x492d0
movq %rax, %r13
leaq 0x60(%rsp), %rdi
callq 0x71b64
movl %r13d, %edi
callq 0x2dc20
callq 0xd340
subq 0x20(%rsp), %rax
cvtsi2sd %rax, %xmm0
divsd 0x60d89(%rip), %xmm0    # 0xaa070
leaq 0x6db9d(%rip), %rsi     # 0xb6e8b
movq 0x30(%rsp), %rdi
movb $0x1, %al
callq 0x2e1bb
callq 0xd340
movq %rax, 0x20(%rsp)
movq %r14, %rdi
callq 0x31a77
movq %rax, %r13
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x493c0
movq %r14, %rdi
movq %r12, %rsi
callq 0x31a87
testq %rax, %rax
je 0x493b8
movq %rax, %rbp
movq %rbx, %rdi
movq %rax, %rsi
callq 0x326ef
testb %al, %al
jne 0x4936a
leaq 0x612ff(%rip), %rdi     # 0xaa647
leaq 0x6da35(%rip), %rsi     # 0xb6d84
leaq 0x6d954(%rip), %rdx     # 0xb6caa
leaq 0x6b3f1(%rip), %rcx     # 0xb474e
movl $0x2455, %r8d           # imm = 0x2455
xorl %eax, %eax
callq 0x5ffac
movq %r14, %rdi
movq %rbp, %rsi
callq 0x32705
movq 0x8(%rax), %r14
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x32705
cmpq 0x8(%rax), %r14
movq 0x28(%rsp), %r14
je 0x493b8
leaq 0x612b1(%rip), %rdi     # 0xaa647
leaq 0x6da1e(%rip), %rsi     # 0xb6dbb
leaq 0x6d906(%rip), %rdx     # 0xb6caa
leaq 0x6b3a3(%rip), %rcx     # 0xb474e
movl $0x2456, %r8d           # imm = 0x2456
xorl %eax, %eax
callq 0x5ffac
incq %r12
jmp 0x49312
callq 0xd340
subq 0x20(%rsp), %rax
cvtsi2sd %rax, %xmm0
divsd 0x60c99(%rip), %xmm0    # 0xaa070
leaq 0x6dac8(%rip), %rsi     # 0xb6ea6
movq 0x30(%rsp), %rbx
movq %rbx, %rdi
movb $0x1, %al
callq 0x2e1bb
leaq 0x40(%rsp), %rdi
callq 0x71b48
callq 0xd340
movq %rax, 0x38(%rsp)
movq 0x10(%r15), %rdx
leaq 0x6dab5(%rip), %rsi     # 0xb6ec1
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2e1bb
leaq 0x6d88d(%rip), %r12     # 0xb6caa
leaq 0x6b32a(%rip), %r13     # 0xb474e
leaq 0x6d897(%rip), %rbp     # 0xb6cc2
xorl %eax, %eax
cmpq $0x14, %rax
je 0x49494
movq %rax, 0x20(%rsp)
xorl %ebx, %ebx
xorl %r14d, %r14d
cmpq 0x10(%r15), %r14
jae 0x49485
movq 0x8(%r15), %rax
movq (%rax,%rbx), %rsi
movq 0x28(%rsp), %rdi
callq 0x32705
movq 0x8(%rax), %r8
movq 0x8(%r15), %rax
movq 0x8(%rax,%rbx), %r9
cmpq %r9, %r8
je 0x4947c
movq %r12, %rdi
movq %r13, %rsi
movl $0x2465, %edx           # imm = 0x2465
movq %rbp, %rcx
xorl %eax, %eax
callq 0x60186
incq %r14
addq $0x10, %rbx
jmp 0x4943d
movq 0x20(%rsp), %rax
incq %rax
movq 0x28(%rsp), %r14
jmp 0x4942d
callq 0xd340
subq 0x38(%rsp), %rax
cvtsi2sd %rax, %xmm0
divsd 0x60bc5(%rip), %xmm0    # 0xaa070
imulq $0x14, 0x10(%r15), %rax
movq %rax, %xmm1
punpckldq 0x6b1f3(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x6b1fb(%rip), %xmm1    # 0xb46c0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0x6da04(%rip), %rsi     # 0xb6ee0
movq 0x30(%rsp), %rbx
movq %rbx, %rdi
movb $0x1, %al
callq 0x2e1bb
leaq 0x7d0d9(%rip), %rsi     # 0xc65cb
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2e1bb
leaq 0x6d9f3(%rip), %rsi     # 0xb6ef6
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2e1bb
callq 0xd340
movq %rax, 0x20(%rsp)
leaq 0x6d78c(%rip), %r12     # 0xb6caa
leaq 0x6b229(%rip), %r13     # 0xb474e
leaq 0x6d7d0(%rip), %rbx     # 0xb6cfc
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x495c3
movq 0x8(%r15), %rcx
shlq $0x4, %rax
leaq (%rcx,%rax), %rbp
movq -0x10(%rcx,%rax), %rsi
movq %r14, %rdi
callq 0x32705
testq %rax, %rax
jne 0x49574
movq -0x10(%rbp), %r8
movq %r12, %rdi
movq %r13, %rsi
movl $0x2471, %edx           # imm = 0x2471
leaq 0x6d779(%rip), %rcx     # 0xb6ce6
xorl %eax, %eax
callq 0x60186
movq -0x10(%rbp), %rsi
movq %r14, %rdi
callq 0x336b9
movq -0x10(%rbp), %rsi
movq %r14, %rdi
callq 0x32705
testq %rax, %rax
je 0x495aa
movq -0x10(%rbp), %r8
movq %r12, %rdi
movq %r13, %rsi
movl $0x2473, %edx           # imm = 0x2473
movq %rbx, %rcx
xorl %eax, %eax
callq 0x60186
movq 0x10(%r15), %rsi
decq %rsi
movq %r15, %rdi
callq 0x30a50
movq 0x28(%rsp), %r14
jmp 0x4952c
callq 0xd340
subq 0x20(%rsp), %rax
cvtsi2sd %rax, %xmm0
divsd 0x60a96(%rip), %xmm0    # 0xaa070
leaq 0x6d91f(%rip), %rsi     # 0xb6f00
movq 0x30(%rsp), %rbx
movq %rbx, %rdi
movb $0x1, %al
callq 0x2e1bb
movq %r14, %rdi
callq 0x48c1b
movq %rbx, %rdi
movq %rax, %rsi
callq 0x370f2
leaq 0x6d902(%rip), %rsi     # 0xb6f0c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2e1bb
leaq 0x48(%rsp), %rdi
callq 0x71b48
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq