LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore.xo.c
// Function: x_deque_inst_s_push_first_d
x_inst* x_deque_inst_s_push_first_d( x_deque_inst_s* o, x_inst* inst )
{
    // bcore_x_deque.h:123:5
    
    if( o->size == o->adl.size )  x_deque_inst_s_inc_adl_size(o);
    o->first = ( o->first == 0 ) ? o->adl.size - 1 : o->first - 1;
    x_inst_a_attach( &(o->adl.data[ o->first ] ), (x_inst*)( inst));
    o->size++;
    return  ((x_inst*)(inst));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x28(%rdi), %rax
cmpq 0x18(%rdi), %rax
jne 0x498b4
movq %r14, %rdi
callq 0x497c2
movq 0x30(%r14), %rax
testq %rax, %rax
jne 0x498c1
movq 0x18(%r14), %rax
leaq -0x1(%rax), %rcx
movq %rcx, 0x30(%r14)
leaq -0x8(,%rax,8), %rdi
addq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x49865
incq 0x28(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore.xo.c
// Function: x_deque_inst_s_d_pop_last
x_inst* x_deque_inst_s_d_pop_last( x_deque_inst_s* o )
{
    // bcore_x_deque.h:132:5
    
    if( o->size == 0 ) return  NULL;
    sz_t adl_idx = x_deque_inst_s_adl_idx(o,o->size - 1 );
    x_inst* inst = ((x_inst*)(o->adl.data[ adl_idx ]));
    o->adl.data[ adl_idx ] = NULL;
    o->size--;
    return  inst;
}

// Assembly:
movq 0x28(%rdi), %rcx
testq %rcx, %rcx
je 0x49917
decq %rcx
movq 0x30(%rdi), %rax
addq %rcx, %rax
xorl %edx, %edx
divq 0x18(%rdi)
movq 0x10(%rdi), %rsi
movq (%rsi,%rdx,8), %rax
andq $0x0, (%rsi,%rdx,8)
movq %rcx, 0x28(%rdi)
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore.xo.c
// Function: x_deque_inst_s_d_pop_first
x_inst* x_deque_inst_s_d_pop_first( x_deque_inst_s* o )
{
    // bcore_x_deque.h:142:5
    
    if( o->size == 0 ) return  NULL;
    x_inst* inst = ((x_inst*)(o->adl.data[ o->first ]));
    o->adl.data[ o->first ] = NULL;
    o->size--;
    o->first = ( o->first + 1 ) % o->adl.size;
    return  inst;
}

// Assembly:
movq 0x28(%rdi), %rdx
testq %rdx, %rdx
je 0x4994a
movq 0x10(%rdi), %rsi
movq 0x30(%rdi), %rax
movq (%rsi,%rax,8), %rcx
andq $0x0, (%rsi,%rax,8)
decq %rdx
movq %rdx, 0x28(%rdi)
incq %rax
xorl %edx, %edx
divq 0x18(%rdi)
movq %rdx, 0x30(%rdi)
jmp 0x4994c
xorl %ecx, %ecx
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore.xo.c
// Function: x_deque_m_inst_
x_deque_inst_s* x_deque_m_inst_( x_deque* o )
{
    // bcore_x_deque.h:168:1
    
    assert( x_stamp_is_aware(((const x_stamp*)(o))) );
    x_inst* que = x_stamp_m_get_i(((x_stamp*)(o)),0 );
    if( !que || que->_ != TYPEOF_x_deque_inst_s ) ERR_fa( "First element of '#<sc_t>' must be of type '#<sc_t>'", bnameof( o->_ ), bnameof( ((tp_t)(TYPEOF_x_deque_inst_s)) ) );
    return  ((x_deque_inst_s*)(que));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movabsq $-0x13dd24988bd0f869, %r14 # imm = 0xEC22DB67742F0797
xorl %esi, %esi
callq 0x48861
movq %rax, %rbx
testq %rax, %rax
je 0x49a08
cmpq %r14, (%rbx)
je 0x49a42
movq (%r15), %rdi
callq 0x71db6
movq %rax, %r15
movq %r14, %rdi
callq 0x71db6
leaq 0x6d51d(%rip), %rdi     # 0xb6f3f
leaq 0x6ad25(%rip), %rsi     # 0xb474e
leaq 0x6d1bc(%rip), %rcx     # 0xb6bec
movl $0x24fc, %edx           # imm = 0x24FC
movq %r15, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x60186
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore.xo.c
// Function: x_deque_c_inst_
const x_deque_inst_s* x_deque_c_inst_( const x_deque* o )
{
    // bcore_x_deque.h:176:1
    
    assert( x_stamp_is_aware(((const x_stamp*)(o))) );
    const x_inst* que = x_stamp_c_get_i(((x_stamp*)(o)),0 );
    if( !que || que->_ != TYPEOF_x_deque_inst_s ) ERR_fa( "First element of '#<sc_t>' must be of type '#<sc_t>'", bnameof( o->_ ), bnameof( ((tp_t)(TYPEOF_x_deque_inst_s)) ) );
    return  ((const x_deque_inst_s*)(que));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movabsq $-0x13dd24988bd0f869, %r14 # imm = 0xEC22DB67742F0797
xorl %esi, %esi
callq 0x488fd
movq %rax, %rbx
testq %rax, %rax
je 0x49a71
cmpq %r14, (%rbx)
je 0x49aab
movq (%r15), %rdi
callq 0x71db6
movq %rax, %r15
movq %r14, %rdi
callq 0x71db6
leaq 0x6d4c4(%rip), %rdi     # 0xb6f4f
leaq 0x6acbc(%rip), %rsi     # 0xb474e
leaq 0x6d153(%rip), %rcx     # 0xb6bec
movl $0x2506, %edx           # imm = 0x2506
movq %r15, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x60186
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_uz_s_copy
void bcore_arr_uz_s_copy( bcore_arr_uz_s* o, const bcore_arr_uz_s* src )
{
    if( o->space < src->size )
    {
        if( o->space > 0 ) o->data = bcore_un_alloc( sizeof( uz_t ), o->data, o->space, 0, &o->space );
        o->data = bcore_un_alloc( sizeof( uz_t ), NULL, o->space, src->size, &o->space );
    }
    bcore_u_memcpy( sizeof( uz_t ), o->data, src->data, src->size );
    o->size = src->size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdx
movq 0x10(%rsi), %rcx
cmpq %rcx, %rdx
jae 0x588be
leaq 0x18(%rbx), %r15
testq %rdx, %rdx
je 0x588c4
movq 0x8(%rbx), %rsi
pushq $0x8
popq %rdi
xorl %ecx, %ecx
movq %r15, %r8
callq 0x60263
movq %rax, 0x8(%rbx)
movq 0x18(%rbx), %rdx
movq 0x10(%r14), %rcx
jmp 0x588c6
movq 0x8(%rbx), %rsi
jmp 0x588de
xorl %edx, %edx
pushq $0x8
popq %rdi
xorl %esi, %esi
movq %r15, %r8
callq 0x60263
movq %rax, %rsi
movq %rax, 0x8(%rbx)
movq 0x10(%r14), %rcx
movq 0x8(%r14), %rdx
pushq $0x8
popq %rdi
callq 0x6033c
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_uz_s_set_space
bcore_arr_uz_s* bcore_arr_uz_s_set_space( bcore_arr_uz_s* o, uz_t space )
{
    if( o->space == 0 )
    {
        o->data = bcore_u_alloc( sizeof( uz_t ), NULL, space, &o->space );
    }
    else
    {
        o->data = bcore_un_alloc( sizeof( uz_t ), o->data, o->space, space, &o->space );
    }
    if( o->size > space ) o->size = space;
    return o;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rdi), %r8
movq 0x18(%rdi), %rdx
testq %rdx, %rdx
je 0x58994
movq 0x8(%rbx), %rsi
pushq $0x8
popq %rdi
movq %r14, %rcx
callq 0x60263
jmp 0x589a4
pushq $0x8
popq %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %r8, %rcx
callq 0x6025e
movq %rax, 0x8(%rbx)
cmpq %r14, 0x10(%rbx)
jbe 0x589b2
movq %r14, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_uz_s_fill
bcore_arr_uz_s* bcore_arr_uz_s_fill( bcore_arr_uz_s* o, uz_t size, uz_t v )
{
    bcore_arr_uz_s_set_space( o, size );
    for( uz_t i = 0; i < size; i++ ) o->data[ i ] = v;
    o->size = size;
    return o;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
callq 0x5896c
xorl %eax, %eax
cmpq %rax, %r14
je 0x589e4
movq 0x8(%rbx), %rcx
movq %r15, (%rcx,%rax,8)
incq %rax
jmp 0x589d2
movq %r14, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_uz_s_set_size
bcore_arr_uz_s* bcore_arr_uz_s_set_size( bcore_arr_uz_s* o, uz_t size )
{
    bcore_arr_uz_s_set_space( o, size );
    if( size > o->size )
    {
        for( sz_t i = o->size; i < size; i++ ) o->data[ i ] = 0;
    }
    o->size = size;
    return o;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x5896c
movq 0x10(%rbx), %rax
cmpq %r14, %rax
jae 0x58a1c
cmpq %r14, %rax
jae 0x58a1c
movq 0x8(%rbx), %rcx
andq $0x0, (%rcx,%rax,8)
incq %rax
jmp 0x58a09
movq %r14, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_uz_s_step_fill
bcore_arr_uz_s* bcore_arr_uz_s_step_fill( bcore_arr_uz_s* o, uz_t v_start, s3_t step, uz_t size )
{
    bcore_arr_uz_s_set_space( o, size );
    uz_t v = v_start;
    for( uz_t i = 0; i < size; i++ )
    {
        o->data[ i ] = v;
        v += step;
    }
    o->size = size;
    return o;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq %rcx, %rsi
callq 0x5896c
xorl %eax, %eax
cmpq %rax, %rbx
je 0x58a5e
movq 0x8(%r14), %rcx
movq %r12, (%rcx,%rax,8)
addq %r15, %r12
incq %rax
jmp 0x58a49
movq %rbx, 0x10(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_uz_s_make_strong
void bcore_arr_uz_s_make_strong( bcore_arr_uz_s* o )
{
    if( o->size > o->space )
    {
        uz_t* data = o->data;
        o->data = bcore_u_alloc( sizeof( uz_t ), NULL, o->size, &o->space );
        bcore_u_memcpy( sizeof( uz_t ), o->data, data, o->size );
    }
}

// Assembly:
movq 0x10(%rdi), %rdx
cmpq 0x18(%rdi), %rdx
jbe 0x58ab4
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x18(%rdi), %rcx
movq 0x8(%rdi), %r14
pushq $0x8
popq %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x6025e
movq %rax, 0x8(%rbx)
movq 0x10(%rbx), %rcx
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x6033c
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_uz_s_push
void bcore_arr_uz_s_push( bcore_arr_uz_s* o, uz_t v )
{
    if( o->size >  o->space ) bcore_arr_uz_s_make_strong( o );
    if( o->size == o->space )
    {
        o->data = bcore_un_alloc( sizeof( uz_t ), o->data, o->space, o->space > 0 ? o->space * 2 : 1, &o->space );
    }
    o->data[ o->size++ ] = v;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rcx
movq 0x18(%rdi), %rdx
cmpq %rdx, %rcx
jbe 0x58adc
movq %r14, %rdi
callq 0x58a71
movq 0x10(%r14), %rcx
movq 0x18(%r14), %rdx
movq 0x8(%r14), %rax
cmpq %rdx, %rcx
jne 0x58b0a
leaq 0x18(%r14), %r8
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
pushq $0x1
popq %rcx
cmovneq %rsi, %rcx
pushq $0x8
popq %rdi
movq %rax, %rsi
callq 0x60263
movq %rax, 0x8(%r14)
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movq %rbx, (%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_uz_s_push_left
bcore_arr_uz_s* bcore_arr_uz_s_push_left( bcore_arr_uz_s* o, uz_t v )
{
    bcore_arr_uz_s_push( o, 0 );
    for( sz_t i = o->size - 1; i > 0; i-- ) o->data[ i ] = o->data[ i - 1 ];
    o->data[ 0 ] = v;
    return o;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %esi, %esi
callq 0x58ab5
movq 0x10(%rbx), %rax
decq %rax
movq 0x8(%rbx), %rcx
testq %rax, %rax
jle 0x58b4a
movq -0x8(%rcx,%rax,8), %rdx
movq %rdx, (%rcx,%rax,8)
jmp 0x58b33
movq %r14, (%rcx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_uz_s_push_arr
bcore_arr_uz_s* bcore_arr_uz_s_push_arr( bcore_arr_uz_s* o, const bcore_arr_uz_s* arr )
{
    if( arr->size == 0 ) return o;
    if( o->size > o->space ) bcore_arr_uz_s_make_strong( o );
    if( o->size + arr->size >= o->space )
    {
        uz_t new_space = uz_max( o->space * 2, o->size + arr->size );
        o->data = bcore_un_alloc( sizeof( uz_t ), o->data, o->space, new_space, &o->space );
    }
    for( sz_t i = 0; i < arr->size; i++ ) o->data[ o->size++ ] = arr->data[ i ];
    return o;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rsi), %rcx
testq %rcx, %rcx
je 0x58bdc
movq %rsi, %r14
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rdx
cmpq %rdx, %rax
jbe 0x58b8c
movq %rbx, %rdi
callq 0x58a71
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rdx
movq 0x10(%r14), %rcx
addq %rax, %rcx
cmpq %rdx, %rcx
jb 0x58bb3
leaq 0x18(%rbx), %r8
leaq (%rdx,%rdx), %rax
cmpq %rcx, %rax
cmovaq %rax, %rcx
movq 0x8(%rbx), %rsi
pushq $0x8
popq %rdi
callq 0x60263
movq %rax, 0x8(%rbx)
xorl %eax, %eax
cmpq 0x10(%r14), %rax
jae 0x58bdc
movq 0x8(%r14), %rcx
movq (%rcx,%rax,8), %rcx
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x10(%rbx)
movq %rcx, (%rdx,%rsi,8)
incq %rax
jmp 0x58bb5
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_uz_s_cmp
s2_t bcore_arr_uz_s_cmp( const bcore_arr_uz_s* o, const bcore_arr_uz_s* b )
{
    if( o->size == 0 ) return ( b->size == 0 ) ? 0 :  1;
    if( b->size == 0 ) return -1;
    uz_t min_size = uz_min( o->size, b->size );
    for( sz_t i = 0; i < min_size; i++ )
    {
        if( o->data[ i ] != b->data[ i ] ) return ( o->data[ i ] < b->data[ i ] ) ? 2 : -2;
    }
    return ( o->size == b->size ) ? 0 : ( o->size < b->size ) ? +1 : -1;
}

// Assembly:
movq 0x10(%rdi), %rdx
movq 0x10(%rsi), %rcx
testq %rdx, %rdx
je 0x58c50
testq %rcx, %rcx
je 0x58c59
cmpq %rcx, %rdx
movq %rcx, %rax
cmovbq %rdx, %rax
movq 0x8(%rdi), %rdi
movq 0x8(%rsi), %rsi
xorl %r8d, %r8d
cmpq %r8, %rax
je 0x58c5d
movq (%rsi,%r8,8), %r9
leaq 0x1(%r8), %r10
cmpq %r9, (%rdi,%r8,8)
movq %r10, %r8
je 0x58c2c
setb %al
movzbl %al, %eax
leal -0x2(,%rax,4), %eax
retq
xorl %eax, %eax
testq %rcx, %rcx
setne %al
retq
pushq $-0x1
popq %rax
retq
xorl %esi, %esi
cmpq %rcx, %rdx
movl $0x0, %eax
adcl $-0x1, %eax
orl $0x1, %eax
cmpq %rcx, %rdx
cmovel %esi, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_uz_s_sort
bcore_arr_uz_s* bcore_arr_uz_s_sort( bcore_arr_uz_s* o, s2_t order ) // stable mergesort
{
    if( o->space < o->size ) bcore_arr_uz_s_make_strong( o );
    uz_t* buf = bcore_u_alloc( sizeof( uz_t ), NULL, o->size >> 1, NULL );
    uz_sort( o->data, o->size, buf, order );
    bcore_free( buf );
    return o;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x10(%rdi), %rdx
cmpq %rdx, 0x18(%rdi)
jae 0x58c93
movq %rbx, %rdi
callq 0x58a71
movq 0x10(%rbx), %rdx
shrq %rdx
pushq $0x8
popq %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x6025e
movq %rax, %r14
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
movq %rax, %rdx
movl %ebp, %ecx
callq 0x58cc7
movq %r14, %rdi
callq 0x60230
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: uz_sort
static void uz_sort( uz_t* data, uz_t size, uz_t* buf, s2_t order )
{
    if( size < 2 ) return;
    uz_t size1 = size >> 1;
    uz_sort( data,         size1       , buf, order );
    uz_sort( data + size1, size - size1, buf, order );
    bcore_u_memcpy( sizeof( uz_t ), buf, data, size1 );
    if( order > 0 )
    {
        for( uz_t i = 0, w = 0, r = size1; i < size1; )
        {
            data[ w++ ] = ( r == size || buf[ i ] <= data[ r ] ) ? buf[ i++ ] : data[ r++ ];
        }
    }
    else
    {
        for( uz_t i = 0, w = 0, r = size1; i < size1; )
        {
            data[ w++ ] = ( r == size || buf[ i ] >= data[ r ] ) ? buf[ i++ ] : data[ r++ ];
        }
    }
}

// Assembly:
cmpq $0x2, %rsi
jb 0x58d7f
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %r12
shrq %r12
movq %r12, %rsi
callq 0x58cc7
leaq (%r15,%r12,8), %rdi
movq %r14, %rsi
subq %r12, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0x58cc7
pushq $0x8
popq %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x6033c
xorl %eax, %eax
movq %r15, %rcx
movq %r12, %rdx
testl %ebp, %ebp
jg 0x58d72
cmpq %r12, %rax
jae 0x58d77
movq (%rbx,%rax,8), %rsi
cmpq %r14, %rdx
je 0x58d42
movq (%r15,%rdx,8), %rdi
cmpq %rdi, %rsi
jae 0x58d42
incq %rdx
movq %rdi, %rsi
jmp 0x58d45
incq %rax
movq %rsi, (%rcx)
addq $0x8, %rcx
jmp 0x58d23
movq (%rbx,%rax,8), %rsi
cmpq %r14, %rdx
je 0x58d68
movq (%r15,%rdx,8), %rdi
cmpq %rdi, %rsi
jbe 0x58d68
incq %rdx
movq %rdi, %rsi
jmp 0x58d6b
incq %rax
movq %rsi, (%rcx)
addq $0x8, %rcx
cmpq %r12, %rax
jb 0x58d4e
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_uz_s_reorder
bcore_arr_uz_s* bcore_arr_uz_s_reorder( bcore_arr_uz_s* o, const bcore_arr_uz_s* order )
{
    if( o->space < o->size ) bcore_arr_uz_s_make_strong( o );
    uz_t buf_space = 0;
    uz_t* buf = bcore_u_alloc( sizeof( uz_t ), NULL, order->size, &buf_space );
    for( uz_t i = 0; i < order->size; i++ )
    {
        assert( order->data[ i ] < o->size );
        buf[ i ] = o->data[ order->data[ i ] ];
    }
    bcore_un_alloc( sizeof( uz_t ), o->data, o->space, 0, &o->space );
    o->data = buf;
    o->space = buf_space;
    o->size = order->size;
    return o;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rax
cmpq 0x10(%rdi), %rax
jae 0x58da5
movq %rbx, %rdi
callq 0x58a71
leaq 0x18(%rbx), %r15
leaq 0x8(%rsp), %rcx
andq $0x0, (%rcx)
movq 0x10(%r14), %rdx
xorl %r13d, %r13d
pushq $0x8
popq %rdi
xorl %esi, %esi
callq 0x6025e
movq %rax, %r12
movq 0x8(%rbx), %rsi
cmpq 0x10(%r14), %r13
jae 0x58de5
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rax
movq (%rsi,%rax,8), %rax
movq %rax, (%r12,%r13,8)
incq %r13
jmp 0x58dc6
movq 0x18(%rbx), %rdx
pushq $0x8
popq %rdi
xorl %ecx, %ecx
movq %r15, %r8
callq 0x60263
movq %r12, 0x8(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_uz_s_create_random_permutation
bcore_arr_uz_s* bcore_arr_uz_s_create_random_permutation( u2_t ( *rg )( u2_t ), u2_t rval, uz_t size )
{
    bcore_arr_uz_s* o = bcore_arr_uz_s_create();
    if( size == 0 ) return o;

    bcore_arr_uz_s_step_fill( o, 0, 1, size );
    uz_t idx = 0;

    for( uz_t i = 0; i < size; i++ )
    {
        idx = i + ( ( idx + ( rval = rg( rval ) ) ) % ( size - i ) );
        uz_t t = o->data[ i ];
        o->data[ i ] = o->data[ idx ];
        o->data[ idx ] = t;
    }

    return o;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, (%rsp)
callq 0x588f8
movq %rax, %r14
testq %rbx, %rbx
je 0x58e96
xorl %r12d, %r12d
pushq $0x1
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x58a2b
xorl %r13d, %r13d
movq %rbx, %r15
subq $0x1, %r15
jb 0x58e96
movl %ebp, %edi
callq *(%rsp)
movl %eax, %ebp
movl %eax, %eax
addq %rax, %r12
movq %r12, %rax
xorl %edx, %edx
divq %rbx
movq %rdx, %r12
addq %r13, %r12
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rcx
movq (%rax,%r12,8), %rdx
movq %rdx, (%rax,%r13,8)
movq 0x8(%r14), %rax
movq %rcx, (%rax,%r12,8)
incq %r13
movq %r15, %rbx
jmp 0x58e56
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_uz_s_find
uz_t bcore_arr_uz_s_find( const bcore_arr_uz_s* o, uz_t start, uz_t end, uz_t v )
{
    if( end >= start )
    {
        uz_t end_l = end < o->size ? end : o->size;
        for( uz_t j = start; j < end_l; j++ ) if( o->data[ j ] == v ) return j;
        return end_l;
    }
    else
    {
        uz_t start_l = start < o->size ? start : o->size;
        for( uz_t j = start_l - 1;  j < start_l && j >= end; j-- ) if( o->data[ j ] == v ) return j;
        return start_l;
    }
}

// Assembly:
movq 0x10(%rdi), %rax
cmpq %rsi, %rdx
jae 0x58ed3
cmpq %rsi, %rax
cmovbq %rax, %rsi
movq %rsi, %rax
decq %rax
cmpq %rsi, %rax
jae 0x58ef8
cmpq %rdx, %rax
jb 0x58ef8
movq 0x8(%rdi), %r8
cmpq %rcx, (%r8,%rax,8)
jne 0x58ebb
retq
cmpq %rdx, %rax
cmovbq %rax, %rdx
cmpq %rdx, %rsi
movq %rdx, %rax
cmovaq %rsi, %rax
cmpq %rdx, %rsi
jae 0x58eff
movq 0x8(%rdi), %r8
cmpq %rcx, (%r8,%rsi,8)
je 0x58efc
incq %rsi
jmp 0x58ee4
movq %rsi, %rax
retq
movq %rsi, %rax
cmpq %rdx, %rax
cmovbq %rax, %rdx
movq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_uz_s_idx_max
uz_t bcore_arr_uz_s_idx_max( const bcore_arr_uz_s* o )
{
    if( o->size == 0 ) return 0;
    uz_t max = o->data[ 0 ];
    uz_t idx = 0;
    for( uz_t i = 1; i < o->size; i++ )
    {
        if( o->data[ i ] > max )
        {
            max = o->data[ i ];
            idx = i;
        }
    }
    return idx;
}

// Assembly:
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x58f8e
movq 0x8(%rdi), %rdx
movq (%rdx), %rsi
pushq $0x1
popq %rdi
xorl %eax, %eax
cmpq %rdi, %rcx
je 0x58f90
movq (%rdx,%rdi,8), %r8
cmpq %rsi, %r8
cmovaq %r8, %rsi
cmovaq %rdi, %rax
incq %rdi
jmp 0x58f75
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_uz_s_idx_min
uz_t bcore_arr_uz_s_idx_min( const bcore_arr_uz_s* o )
{
    if( o->size == 0 ) return 0;
    uz_t min = o->data[ 0 ];
    uz_t idx = 0;
    for( uz_t i = 1; i < o->size; i++ )
    {
        if( o->data[ i ] < min )
        {
            min = o->data[ i ];
            idx = i;
        }
    }
    return idx;
}

// Assembly:
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x58fbf
movq 0x8(%rdi), %rdx
movq (%rdx), %rsi
pushq $0x1
popq %rdi
xorl %eax, %eax
cmpq %rdi, %rcx
je 0x58fc1
movq (%rdx,%rdi,8), %r8
cmpq %rsi, %r8
cmovbq %r8, %rsi
cmovbq %rdi, %rax
incq %rdi
jmp 0x58fa6
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_sz_s_copy
void bcore_arr_sz_s_copy( bcore_arr_sz_s* o, const bcore_arr_sz_s* src )
{
    if( o->space < src->size )
    {
        if( o->space > 0 ) o->data = bcore_un_alloc( sizeof( sz_t ), o->data, o->space, 0, &o->space );
        o->data = bcore_un_alloc( sizeof( sz_t ), NULL, o->space, src->size, &o->space );
    }
    bcore_u_memcpy( sizeof( sz_t ), o->data, src->data, src->size );
    o->size = src->size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdx
movq 0x10(%rsi), %rcx
cmpq %rcx, %rdx
jae 0x5905d
leaq 0x18(%rbx), %r15
testq %rdx, %rdx
je 0x59063
movq 0x8(%rbx), %rsi
pushq $0x8
popq %rdi
xorl %ecx, %ecx
movq %r15, %r8
callq 0x60263
movq %rax, 0x8(%rbx)
movq 0x18(%rbx), %rdx
movq 0x10(%r14), %rcx
jmp 0x59065
movq 0x8(%rbx), %rsi
jmp 0x5907d
xorl %edx, %edx
pushq $0x8
popq %rdi
xorl %esi, %esi
movq %r15, %r8
callq 0x60263
movq %rax, %rsi
movq %rax, 0x8(%rbx)
movq 0x10(%r14), %rcx
movq 0x8(%r14), %rdx
pushq $0x8
popq %rdi
callq 0x6033c
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_sz_s_set_space
bcore_arr_sz_s* bcore_arr_sz_s_set_space( bcore_arr_sz_s* o, uz_t space )
{
    if( o->space == 0 )
    {
        o->data = bcore_u_alloc( sizeof( sz_t ), NULL, space, &o->space );
    }
    else
    {
        o->data = bcore_un_alloc( sizeof( sz_t ), o->data, o->space, space, &o->space );
    }
    if( o->size > space ) o->size = space;
    return o;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rdi), %r8
movq 0x18(%rdi), %rdx
testq %rdx, %rdx
je 0x59133
movq 0x8(%rbx), %rsi
pushq $0x8
popq %rdi
movq %r14, %rcx
callq 0x60263
jmp 0x59143
pushq $0x8
popq %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %r8, %rcx
callq 0x6025e
movq %rax, 0x8(%rbx)
cmpq %r14, 0x10(%rbx)
jbe 0x59151
movq %r14, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_sz_s_fill
bcore_arr_sz_s* bcore_arr_sz_s_fill( bcore_arr_sz_s* o, uz_t size, sz_t v )
{
    bcore_arr_sz_s_set_space( o, size );
    for( uz_t i = 0; i < size; i++ ) o->data[ i ] = v;
    o->size = size;
    return o;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
callq 0x5910b
xorl %eax, %eax
cmpq %rax, %r14
je 0x59183
movq 0x8(%rbx), %rcx
movq %r15, (%rcx,%rax,8)
incq %rax
jmp 0x59171
movq %r14, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_sz_s_set_size
bcore_arr_sz_s* bcore_arr_sz_s_set_size( bcore_arr_sz_s* o, uz_t size )
{
    bcore_arr_sz_s_set_space( o, size );
    if( size > o->size )
    {
        for( sz_t i = o->size; i < size; i++ ) o->data[ i ] = 0;
    }
    o->size = size;
    return o;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x5910b
movq 0x10(%rbx), %rax
cmpq %r14, %rax
jae 0x591bb
cmpq %r14, %rax
jae 0x591bb
movq 0x8(%rbx), %rcx
andq $0x0, (%rcx,%rax,8)
incq %rax
jmp 0x591a8
movq %r14, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_sz_s_step_fill
bcore_arr_sz_s* bcore_arr_sz_s_step_fill( bcore_arr_sz_s* o, sz_t v_start, sz_t step, uz_t size )
{
    bcore_arr_sz_s_set_space( o, size );
    sz_t v = v_start;
    for( uz_t i = 0; i < size; i++ )
    {
        o->data[ i ] = v;
        v += step;
    }
    o->size = size;
    return o;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq %rcx, %rsi
callq 0x5910b
xorl %eax, %eax
cmpq %rax, %rbx
je 0x591fd
movq 0x8(%r14), %rcx
movq %r12, (%rcx,%rax,8)
addq %r15, %r12
incq %rax
jmp 0x591e8
movq %rbx, 0x10(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_sz_s_make_strong
void bcore_arr_sz_s_make_strong( bcore_arr_sz_s* o )
{
    if( o->size > o->space )
    {
        sz_t* data = o->data;
        o->data = bcore_u_alloc( sizeof( sz_t ), NULL, o->size, &o->space );
        bcore_u_memcpy( sizeof( sz_t ), o->data, data, o->size );
    }
}

// Assembly:
movq 0x10(%rdi), %rdx
cmpq 0x18(%rdi), %rdx
jbe 0x59253
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x18(%rdi), %rcx
movq 0x8(%rdi), %r14
pushq $0x8
popq %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x6025e
movq %rax, 0x8(%rbx)
movq 0x10(%rbx), %rcx
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x6033c
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_sz_s_push
void bcore_arr_sz_s_push( bcore_arr_sz_s* o, sz_t v )
{
    if( o->size >  o->space ) bcore_arr_sz_s_make_strong( o );
    if( o->size == o->space )
    {
        o->data = bcore_un_alloc( sizeof( sz_t ), o->data, o->space, o->space > 0 ? o->space * 2 : 1, &o->space );
    }
    o->data[ o->size++ ] = v;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rcx
movq 0x18(%rdi), %rdx
cmpq %rdx, %rcx
jbe 0x5927b
movq %r14, %rdi
callq 0x59210
movq 0x10(%r14), %rcx
movq 0x18(%r14), %rdx
movq 0x8(%r14), %rax
cmpq %rdx, %rcx
jne 0x592a9
leaq 0x18(%r14), %r8
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
pushq $0x1
popq %rcx
cmovneq %rsi, %rcx
pushq $0x8
popq %rdi
movq %rax, %rsi
callq 0x60263
movq %rax, 0x8(%r14)
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movq %rbx, (%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_sz_s_push_left
bcore_arr_sz_s* bcore_arr_sz_s_push_left( bcore_arr_sz_s* o, sz_t v )
{
    bcore_arr_sz_s_push( o, 0 );
    for( sz_t i = o->size - 1; i > 0; i-- ) o->data[ i ] = o->data[ i - 1 ];
    o->data[ 0 ] = v;
    return o;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %esi, %esi
callq 0x59254
movq 0x10(%rbx), %rax
decq %rax
movq 0x8(%rbx), %rcx
testq %rax, %rax
jle 0x592e9
movq -0x8(%rcx,%rax,8), %rdx
movq %rdx, (%rcx,%rax,8)
jmp 0x592d2
movq %r14, (%rcx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_sz_s_push_arr
bcore_arr_sz_s* bcore_arr_sz_s_push_arr( bcore_arr_sz_s* o, const bcore_arr_sz_s* arr )
{
    if( arr->size == 0 ) return o;
    if( o->size > o->space ) bcore_arr_sz_s_make_strong( o );
    if( o->size + arr->size >= o->space )
    {
        uz_t new_space = uz_max( o->space * 2, o->size + arr->size );
        o->data = bcore_un_alloc( sizeof( tp_t ), o->data, o->space, new_space, &o->space );
    }
    for( sz_t i = 0; i < arr->size; i++ ) o->data[ o->size++ ] = arr->data[ i ];
    return o;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rsi), %rcx
testq %rcx, %rcx
je 0x5937b
movq %rsi, %r14
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rdx
cmpq %rdx, %rax
jbe 0x5932b
movq %rbx, %rdi
callq 0x59210
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rdx
movq 0x10(%r14), %rcx
addq %rax, %rcx
cmpq %rdx, %rcx
jb 0x59352
leaq 0x18(%rbx), %r8
leaq (%rdx,%rdx), %rax
cmpq %rcx, %rax
cmovaq %rax, %rcx
movq 0x8(%rbx), %rsi
pushq $0x8
popq %rdi
callq 0x60263
movq %rax, 0x8(%rbx)
xorl %eax, %eax
cmpq 0x10(%r14), %rax
jae 0x5937b
movq 0x8(%r14), %rcx
movq (%rcx,%rax,8), %rcx
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x10(%rbx)
movq %rcx, (%rdx,%rsi,8)
incq %rax
jmp 0x59354
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_sz_s_cmp
s2_t bcore_arr_sz_s_cmp( const bcore_arr_sz_s* o, const bcore_arr_sz_s* b )
{
    if( o->size == 0 ) return ( b->size == 0 ) ? 0 :  1;
    if( b->size == 0 ) return -1;
    uz_t min_size = uz_min( o->size, b->size );
    for( sz_t i = 0; i < min_size; i++ )
    {
        if( o->data[ i ] != b->data[ i ] ) return ( o->data[ i ] < b->data[ i ] ) ? 2 : -2;
    }
    return ( o->size == b->size ) ? 0 : ( o->size < b->size ) ? +1 : -1;
}

// Assembly:
movq 0x10(%rdi), %rdx
movq 0x10(%rsi), %rcx
testq %rdx, %rdx
je 0x593ef
testq %rcx, %rcx
je 0x593f8
cmpq %rcx, %rdx
movq %rcx, %rax
cmovbq %rdx, %rax
movq 0x8(%rdi), %rdi
movq 0x8(%rsi), %rsi
xorl %r8d, %r8d
cmpq %r8, %rax
je 0x593fc
movq (%rsi,%r8,8), %r9
leaq 0x1(%r8), %r10
cmpq %r9, (%rdi,%r8,8)
movq %r10, %r8
je 0x593cb
setl %al
movzbl %al, %eax
leal -0x2(,%rax,4), %eax
retq
xorl %eax, %eax
testq %rcx, %rcx
setne %al
retq
pushq $-0x1
popq %rax
retq
xorl %esi, %esi
cmpq %rcx, %rdx
movl $0x0, %eax
adcl $-0x1, %eax
orl $0x1, %eax
cmpq %rcx, %rdx
cmovel %esi, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_sz_s_sort
bcore_arr_sz_s* bcore_arr_sz_s_sort( bcore_arr_sz_s* o, s2_t order ) // stable mergesort
{
    if( o->space < o->size ) bcore_arr_sz_s_make_strong( o );
    sz_t* buf = bcore_u_alloc( sizeof( sz_t ), NULL, o->size >> 1, NULL );
    sz_sort( o->data, o->size, buf, order );
    bcore_free( buf );
    return o;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x10(%rdi), %rdx
cmpq %rdx, 0x18(%rdi)
jae 0x59432
movq %rbx, %rdi
callq 0x59210
movq 0x10(%rbx), %rdx
shrq %rdx
pushq $0x8
popq %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x6025e
movq %rax, %r14
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
movq %rax, %rdx
movl %ebp, %ecx
callq 0x59466
movq %r14, %rdi
callq 0x60230
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: sz_sort
static void sz_sort( sz_t* data, uz_t size, sz_t* buf, s2_t order )
{
    if( size < 2 ) return;
    uz_t size1 = size >> 1;
    sz_sort( data,         size1       , buf, order );
    sz_sort( data + size1, size - size1, buf, order );
    bcore_u_memcpy( sizeof( sz_t ), buf, data, size1 );
    if( order > 0 )
    {
        for( uz_t i = 0, w = 0, r = size1; i < size1; )
        {
            data[ w++ ] = ( r == size || buf[ i ] <= data[ r ] ) ? buf[ i++ ] : data[ r++ ];
        }
    }
    else
    {
        for( uz_t i = 0, w = 0, r = size1; i < size1; )
        {
            data[ w++ ] = ( r == size || buf[ i ] >= data[ r ] ) ? buf[ i++ ] : data[ r++ ];
        }
    }
}

// Assembly:
cmpq $0x2, %rsi
jb 0x5951e
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %r12
shrq %r12
movq %r12, %rsi
callq 0x59466
leaq (%r15,%r12,8), %rdi
movq %r14, %rsi
subq %r12, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0x59466
pushq $0x8
popq %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x6033c
xorl %eax, %eax
movq %r15, %rcx
movq %r12, %rdx
testl %ebp, %ebp
jg 0x59511
cmpq %r12, %rax
jae 0x59516
movq (%rbx,%rax,8), %rsi
cmpq %r14, %rdx
je 0x594e1
movq (%r15,%rdx,8), %rdi
cmpq %rdi, %rsi
jge 0x594e1
incq %rdx
movq %rdi, %rsi
jmp 0x594e4
incq %rax
movq %rsi, (%rcx)
addq $0x8, %rcx
jmp 0x594c2
movq (%rbx,%rax,8), %rsi
cmpq %r14, %rdx
je 0x59507
movq (%r15,%rdx,8), %rdi
cmpq %rdi, %rsi
jle 0x59507
incq %rdx
movq %rdi, %rsi
jmp 0x5950a
incq %rax
movq %rsi, (%rcx)
addq $0x8, %rcx
cmpq %r12, %rax
jb 0x594ed
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_sz_s_reorder
bcore_arr_sz_s* bcore_arr_sz_s_reorder( bcore_arr_sz_s* o, const bcore_arr_uz_s* order )
{
    if( o->space < o->size ) bcore_arr_sz_s_make_strong( o );
    uz_t buf_space = 0;
    sz_t* buf = bcore_u_alloc( sizeof( sz_t ), NULL, order->size, &buf_space );
    for( uz_t i = 0; i < order->size; i++ )
    {
        assert( order->data[ i ] < o->size );
        buf[ i ] = o->data[ order->data[ i ] ];
    }
    bcore_un_alloc( sizeof( sz_t ), o->data, o->space, 0, &o->space );
    o->data = buf;
    o->space = buf_space;
    o->size = order->size;
    return o;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rax
cmpq 0x10(%rdi), %rax
jae 0x59544
movq %rbx, %rdi
callq 0x59210
leaq 0x18(%rbx), %r15
leaq 0x8(%rsp), %rcx
andq $0x0, (%rcx)
movq 0x10(%r14), %rdx
xorl %r13d, %r13d
pushq $0x8
popq %rdi
xorl %esi, %esi
callq 0x6025e
movq %rax, %r12
movq 0x8(%rbx), %rsi
cmpq 0x10(%r14), %r13
jae 0x59584
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rax
movq (%rsi,%rax,8), %rax
movq %rax, (%r12,%r13,8)
incq %r13
jmp 0x59565
movq 0x18(%rbx), %rdx
pushq $0x8
popq %rdi
xorl %ecx, %ecx
movq %r15, %r8
callq 0x60263
movq %r12, 0x8(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_sz_s_find
uz_t bcore_arr_sz_s_find( const bcore_arr_sz_s* o, uz_t start, uz_t end, sz_t v )
{
    if( end >= start )
    {
        uz_t end_l = end < o->size ? end : o->size;
        for( uz_t j = start; j < end_l; j++ ) if( o->data[ j ] == v ) return j;
        return end_l;
    }
    else
    {
        uz_t start_l = start < o->size ? start : o->size;
        for( uz_t j = start_l - 1;  j < start_l && j >= end; j-- ) if( o->data[ j ] == v ) return j;
        return start_l;
    }
}

// Assembly:
movq 0x10(%rdi), %rax
cmpq %rsi, %rdx
jae 0x595e6
cmpq %rsi, %rax
cmovbq %rax, %rsi
movq %rsi, %rax
decq %rax
cmpq %rsi, %rax
jae 0x5960b
cmpq %rdx, %rax
jb 0x5960b
movq 0x8(%rdi), %r8
cmpq %rcx, (%r8,%rax,8)
jne 0x595ce
retq
cmpq %rdx, %rax
cmovbq %rax, %rdx
cmpq %rdx, %rsi
movq %rdx, %rax
cmovaq %rsi, %rax
cmpq %rdx, %rsi
jae 0x59612
movq 0x8(%rdi), %r8
cmpq %rcx, (%r8,%rsi,8)
je 0x5960f
incq %rsi
jmp 0x595f7
movq %rsi, %rax
retq
movq %rsi, %rax
cmpq %rdx, %rax
cmovbq %rax, %rdx
movq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_sz_s_idx_max
uz_t bcore_arr_sz_s_idx_max( const bcore_arr_sz_s* o )
{
    if( o->size == 0 ) return 0;
    sz_t max = o->data[ 0 ];
    uz_t idx = 0;
    for( uz_t i = 1; i < o->size; i++ )
    {
        if( o->data[ i ] > max )
        {
            max = o->data[ i ];
            idx = i;
        }
    }
    return idx;
}

// Assembly:
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x596a1
movq 0x8(%rdi), %rdx
movq (%rdx), %rsi
pushq $0x1
popq %rdi
xorl %eax, %eax
cmpq %rdi, %rcx
je 0x596a3
movq (%rdx,%rdi,8), %r8
cmpq %rsi, %r8
cmovgq %r8, %rsi
cmovgq %rdi, %rax
incq %rdi
jmp 0x59688
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_sz_s_idx_min
uz_t bcore_arr_sz_s_idx_min( const bcore_arr_sz_s* o )
{
    if( o->size == 0 ) return 0;
    sz_t min = o->data[ 0 ];
    uz_t idx = 0;
    for( uz_t i = 1; i < o->size; i++ )
    {
        if( o->data[ i ] < min )
        {
            min = o->data[ i ];
            idx = i;
        }
    }
    return idx;
}

// Assembly:
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x596d2
movq 0x8(%rdi), %rdx
movq (%rdx), %rsi
pushq $0x1
popq %rdi
xorl %eax, %eax
cmpq %rdi, %rcx
je 0x596d4
movq (%rdx,%rdi,8), %r8
cmpq %rsi, %r8
cmovlq %r8, %rsi
cmovlq %rdi, %rax
incq %rdi
jmp 0x596b9
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_u0_s_copy
void bcore_arr_u0_s_copy( bcore_arr_u0_s* o, const bcore_arr_u0_s* src )
{
    if( o->space < src->size )
    {
        if( o->space > 0 ) o->data = bcore_un_alloc( sizeof( u0_t ), o->data, o->space, 0, &o->space );
        o->data = bcore_un_alloc( sizeof( u0_t ), NULL, o->space, src->size, &o->space );
    }
    bcore_u_memcpy( sizeof( u0_t ), o->data, src->data, src->size );
    o->size = src->size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdx
movq 0x10(%rsi), %rcx
cmpq %rcx, %rdx
jae 0x59770
leaq 0x18(%rbx), %r15
testq %rdx, %rdx
je 0x59776
movq 0x8(%rbx), %rsi
pushq $0x1
popq %rdi
xorl %ecx, %ecx
movq %r15, %r8
callq 0x60263
movq %rax, 0x8(%rbx)
movq 0x18(%rbx), %rdx
movq 0x10(%r14), %rcx
jmp 0x59778
movq 0x8(%rbx), %rsi
jmp 0x59790
xorl %edx, %edx
pushq $0x1
popq %rdi
xorl %esi, %esi
movq %r15, %r8
callq 0x60263
movq %rax, %rsi
movq %rax, 0x8(%rbx)
movq 0x10(%r14), %rcx
movq 0x8(%r14), %rdx
pushq $0x1
popq %rdi
callq 0x6033c
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_u0_s_set_space
bcore_arr_u0_s* bcore_arr_u0_s_set_space( bcore_arr_u0_s* o, uz_t space )
{
    if( o->space == 0 )
    {
        o->data = bcore_u_alloc( sizeof( u0_t ), NULL, space, &o->space );
    }
    else
    {
        o->data = bcore_un_alloc( sizeof( u0_t ), o->data, o->space, space, &o->space );
    }
    if( o->size > space ) o->size = space;
    return o;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rdi), %r8
movq 0x18(%rdi), %rdx
testq %rdx, %rdx
je 0x59846
movq 0x8(%rbx), %rsi
pushq $0x1
popq %rdi
movq %r14, %rcx
callq 0x60263
jmp 0x59856
pushq $0x1
popq %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %r8, %rcx
callq 0x6025e
movq %rax, 0x8(%rbx)
cmpq %r14, 0x10(%rbx)
jbe 0x59864
movq %r14, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_u0_s_fill
bcore_arr_u0_s* bcore_arr_u0_s_fill( bcore_arr_u0_s* o, uz_t size, u0_t v )
{
    bcore_arr_u0_s_set_space( o, size );
    for( uz_t i = 0; i < size; i++ ) o->data[ i ] = v;
    o->size = size;
    return o;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x5981e
xorl %eax, %eax
cmpq %rax, %r14
je 0x59894
movq 0x8(%rbx), %rcx
movb %bpl, (%rcx,%rax)
incq %rax
jmp 0x59882
movq %r14, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_u0_s_set_size
bcore_arr_u0_s* bcore_arr_u0_s_set_size( bcore_arr_u0_s* o, uz_t size )
{
    bcore_arr_u0_s_set_space( o, size );
    if( size > o->size )
    {
        for( sz_t i = o->size; i < size; i++ ) o->data[ i ] = 0;
    }
    o->size = size;
    return o;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x5981e
movq 0x10(%rbx), %rax
cmpq %r14, %rax
jae 0x598ca
cmpq %r14, %rax
jae 0x598ca
movq 0x8(%rbx), %rcx
movb $0x0, (%rcx,%rax)
incq %rax
jmp 0x598b8
movq %r14, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_u0_s_step_fill
bcore_arr_u0_s* bcore_arr_u0_s_step_fill( bcore_arr_u0_s* o, u0_t v_start, s3_t step, uz_t size )
{
    bcore_arr_u0_s_set_space( o, size );
    u0_t v = v_start;
    for( uz_t i = 0; i < size; i++ )
    {
        o->data[ i ] = v;
        v += step;
    }
    o->size = size;
    return o;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r14
movq %rcx, %rsi
callq 0x5981e
xorl %eax, %eax
cmpq %rax, %rbx
je 0x5990a
movq 0x8(%r14), %rcx
movb %bpl, (%rcx,%rax)
addb %r15b, %bpl
incq %rax
jmp 0x598f5
movq %rbx, 0x10(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_u0_s_make_strong
void bcore_arr_u0_s_make_strong( bcore_arr_u0_s* o )
{
    if( o->size > o->space )
    {
        u0_t* data = o->data;
        o->data = bcore_u_alloc( sizeof( u0_t ), NULL, o->size, &o->space );
        bcore_u_memcpy( sizeof( u0_t ), o->data, data, o->size );
    }
}

// Assembly:
movq 0x10(%rdi), %rdx
cmpq 0x18(%rdi), %rdx
jbe 0x5995f
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x18(%rdi), %rcx
movq 0x8(%rdi), %r14
pushq $0x1
popq %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x6025e
movq %rax, 0x8(%rbx)
movq 0x10(%rbx), %rcx
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x6033c
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_u0_s_push
bcore_arr_u0_s* bcore_arr_u0_s_push( bcore_arr_u0_s* o, u0_t v )
{
    if( o->size >  o->space ) bcore_arr_u0_s_make_strong( o );
    if( o->size == o->space )
    {
        o->data = bcore_un_alloc( sizeof( u0_t ), o->data, o->space, o->space > 0 ? o->space * 2 : 1, &o->space );
    }
    o->data[ o->size++ ] = v;
    return o;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x10(%rdi), %rcx
movq 0x18(%rdi), %rdx
cmpq %rdx, %rcx
jbe 0x59985
movq %rbx, %rdi
callq 0x5991c
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %rdx
movq 0x8(%rbx), %rax
cmpq %rdx, %rcx
jne 0x599b0
leaq 0x18(%rbx), %r8
leaq (%rdx,%rdx), %rcx
testq %rdx, %rdx
pushq $0x1
popq %rdi
cmoveq %rdi, %rcx
movq %rax, %rsi
callq 0x60263
movq %rax, 0x8(%rbx)
movq 0x10(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%rbx)
movb %bpl, (%rax,%rcx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_u0_s_push_left
bcore_arr_u0_s* bcore_arr_u0_s_push_left( bcore_arr_u0_s* o, u0_t v )
{
    bcore_arr_u0_s_push( o, 0 );
    for( sz_t i = o->size - 1; i > 0; i-- ) o->data[ i ] = o->data[ i - 1 ];
    o->data[ 0 ] = v;
    return o;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
xorl %esi, %esi
callq 0x59960
movq 0x10(%rbx), %rax
decq %rax
movq 0x8(%rbx), %rcx
testq %rax, %rax
jle 0x599ee
movb -0x1(%rcx,%rax), %dl
movb %dl, (%rcx,%rax)
jmp 0x599d9
movb %bpl, (%rcx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_u0_s_push_arr
bcore_arr_u0_s* bcore_arr_u0_s_push_arr( bcore_arr_u0_s* o, const bcore_arr_u0_s* arr )
{
    if( arr->size == 0 ) return o;
    if( o->size > o->space ) bcore_arr_u0_s_make_strong( o );
    if( o->size + arr->size >= o->space )
    {
        uz_t new_space = uz_max( o->space * 2, o->size + arr->size );
        o->data = bcore_un_alloc( sizeof( tp_t ), o->data, o->space, new_space, &o->space );
    }
    for( sz_t i = 0; i < arr->size; i++ ) o->data[ o->size++ ] = arr->data[ i ];
    return o;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rsi), %rcx
testq %rcx, %rcx
je 0x59a7d
movq %rsi, %r14
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rdx
cmpq %rdx, %rax
jbe 0x59a2f
movq %rbx, %rdi
callq 0x5991c
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rdx
movq 0x10(%r14), %rcx
addq %rax, %rcx
cmpq %rdx, %rcx
jb 0x59a56
leaq 0x18(%rbx), %r8
leaq (%rdx,%rdx), %rax
cmpq %rcx, %rax
cmovaq %rax, %rcx
movq 0x8(%rbx), %rsi
pushq $0x8
popq %rdi
callq 0x60263
movq %rax, 0x8(%rbx)
xorl %eax, %eax
cmpq 0x10(%r14), %rax
jae 0x59a7d
movq 0x8(%r14), %rcx
movb (%rcx,%rax), %cl
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x10(%rbx)
movb %cl, (%rdx,%rsi)
incq %rax
jmp 0x59a58
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_u0_s_cmp
s2_t bcore_arr_u0_s_cmp( const bcore_arr_u0_s* o, const bcore_arr_u0_s* b )
{
    if( o->size == 0 ) return ( b->size == 0 ) ? 0 :  1;
    if( b->size == 0 ) return -1;
    uz_t min_size = uz_min( o->size, b->size );
    for( sz_t i = 0; i < min_size; i++ )
    {
        if( o->data[ i ] != b->data[ i ] ) return ( o->data[ i ] < b->data[ i ] ) ? 2 : -2;
    }
    return ( o->size == b->size ) ? 0 : ( o->size < b->size ) ? +1 : -1;
}

// Assembly:
movq 0x10(%rdi), %rdx
movq 0x10(%rsi), %rcx
testq %rdx, %rdx
je 0x59af0
testq %rcx, %rcx
je 0x59af9
cmpq %rcx, %rdx
movq %rcx, %rax
cmovbq %rdx, %rax
movq 0x8(%rdi), %rdi
movq 0x8(%rsi), %rsi
xorl %r8d, %r8d
cmpq %r8, %rax
je 0x59afd
movb (%rsi,%r8), %r9b
leaq 0x1(%r8), %r10
cmpb %r9b, (%rdi,%r8)
movq %r10, %r8
je 0x59acc
setb %al
movzbl %al, %eax
leal -0x2(,%rax,4), %eax
retq
xorl %eax, %eax
testq %rcx, %rcx
setne %al
retq
pushq $-0x1
popq %rax
retq
xorl %esi, %esi
cmpq %rcx, %rdx
movl $0x0, %eax
adcl $-0x1, %eax
orl $0x1, %eax
cmpq %rcx, %rdx
cmovel %esi, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_arr.c
// Function: bcore_arr_u0_s_sort
bcore_arr_u0_s* bcore_arr_u0_s_sort( bcore_arr_u0_s* o, s2_t order ) // stable mergesort
{
    if( o->space < o->size ) bcore_arr_u0_s_make_strong( o );
    u0_t* buf = bcore_u_alloc( sizeof( u0_t ), NULL, o->size >> 1, NULL );
    u0_sort( o->data, o->size, buf, order );
    bcore_free( buf );
    return o;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x10(%rdi), %rdx
cmpq %rdx, 0x18(%rdi)
jae 0x59b33
movq %rbx, %rdi
callq 0x5991c
movq 0x10(%rbx), %rdx
shrq %rdx
pushq $0x1
popq %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x6025e
movq %rax, %r14
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
movq %rax, %rdx
movl %ebp, %ecx
callq 0x59b67
movq %r14, %rdi
callq 0x60230
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq