// File: /workspace/github_c_makefile_star2_O3/johsteffens[P]beth/lib/bcore/bcore_btree.c
// Function: bcore_btree_node_vd_s_check_consistency
void bcore_btree_node_vd_s_check_consistency( bcore_btree_node_vd_s* o )
{
    if( bcore_btree_node_vd_s_null_g.kv1.key != 0    ) ERR( "bcore_btree_node_vd_s_null was modified" );
    if( bcore_btree_node_vd_s_null_g.kv2.key != 0    ) ERR( "bcore_btree_node_vd_s_null was modified" );
    if( bcore_btree_node_vd_s_null_g.parent  != NULL ) ERR( "bcore_btree_node_vd_s_null was modified" );
    if( bcore_btree_node_vd_s_null_g.child0  != NULL ) ERR( "bcore_btree_node_vd_s_null was modified" );
    if( bcore_btree_node_vd_s_null_g.child1  != NULL ) ERR( "bcore_btree_node_vd_s_null was modified" );
    if( bcore_btree_node_vd_s_null_g.child2  != NULL ) ERR( "bcore_btree_node_vd_s_null was modified" );

    if( !o ) return;
    if( bcore_btree_node_vd_s_is_empty( o ) ) ERR( "empty node" );
    if( o->child0 == NULL )       ERR( "deleted leaf" );
    if( o->child1 && o->child1 != BNUL_VP )
    {
        if( o != o->child0->parent ) ERR( "child0 incorrect parent" );
        if( o != o->child1->parent ) ERR( "child1 incorrect parent" );
        bcore_btree_node_vd_s_check_consistency( o->child0 );
        bcore_btree_node_vd_s_check_consistency( o->child1 );
        if(                      o->kv1.key <= o->child0->kv1.key ) ERR( "(%lu <= %lu)", o->kv1.key, o->child0->kv1.key );
        if( o->child0->child2 && o->kv1.key <= o->child0->kv2.key ) ERR( "(%lu <= %lu)", o->kv1.key, o->child0->kv2.key );
        if(                      o->kv1.key >= o->child1->kv1.key ) ERR( "(%lu >= %lu)", o->kv1.key, o->child1->kv1.key );
        if( o->child1->child2 && o->kv1.key >= o->child1->kv2.key ) ERR( "(%lu >= %lu)", o->kv1.key, o->child1->kv2.key );
    }
    if( o->child2 && o->child2 != BNUL_VP )
    {
        if( o->kv1.key >= o->kv2.key ) ERR( "(%lu >= %lu)", o->kv1.key, o->kv2.key );
        if( o != o->child2->parent ) ERR( "child2 incorrect parent" );
        bcore_btree_node_vd_s_check_consistency( o->child2 );
        if(                      o->kv2.key <= o->child1->kv1.key ) ERR( "(%lu <= %lu)", o->kv2.key, o->child1->kv1.key );
        if( o->child1->child2 && o->kv2.key <= o->child1->kv2.key ) ERR( "(%lu <= %lu)", o->kv2.key, o->child1->kv2.key );
        if(                      o->kv2.key >= o->child2->kv1.key ) ERR( "(%lu >= %lu)", o->kv2.key, o->child2->kv1.key );
        if( o->child2->child2 && o->kv2.key >= o->child2->kv2.key ) ERR( "(%lu >= %lu)", o->kv2.key, o->child2->kv2.key );
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x77783(%rip)     # 0x19d3f0
je 0x125c90
leaq 0x28e05(%rip), %rdi     # 0x14ea7b
leaq 0x28b82(%rip), %rsi     # 0x14e7ff
leaq 0x28e1f(%rip), %rcx     # 0x14eaa3
movl $0x9ca, %edx            # imm = 0x9CA
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x77760(%rip)     # 0x19d3f8
je 0x125cbb
leaq 0x28dda(%rip), %rdi     # 0x14ea7b
leaq 0x28b57(%rip), %rsi     # 0x14e7ff
leaq 0x28df4(%rip), %rcx     # 0x14eaa3
movl $0x9cb, %edx            # imm = 0x9CB
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x7773d(%rip)     # 0x19d400
je 0x125ce6
leaq 0x28daf(%rip), %rdi     # 0x14ea7b
leaq 0x28b2c(%rip), %rsi     # 0x14e7ff
leaq 0x28dc9(%rip), %rcx     # 0x14eaa3
movl $0x9cc, %edx            # imm = 0x9CC
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x7771a(%rip)     # 0x19d408
je 0x125d11
leaq 0x28d84(%rip), %rdi     # 0x14ea7b
leaq 0x28b01(%rip), %rsi     # 0x14e7ff
leaq 0x28d9e(%rip), %rcx     # 0x14eaa3
movl $0x9cd, %edx            # imm = 0x9CD
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x776f7(%rip)     # 0x19d410
je 0x125d3c
leaq 0x28d59(%rip), %rdi     # 0x14ea7b
leaq 0x28ad6(%rip), %rsi     # 0x14e7ff
leaq 0x28d73(%rip), %rcx     # 0x14eaa3
movl $0x9ce, %edx            # imm = 0x9CE
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x776d4(%rip)     # 0x19d418
je 0x125d67
leaq 0x28d2e(%rip), %rdi     # 0x14ea7b
leaq 0x28aab(%rip), %rsi     # 0x14e7ff
leaq 0x28d48(%rip), %rcx     # 0x14eaa3
movl $0x9cf, %edx            # imm = 0x9CF
xorl %eax, %eax
callq 0xbe592
testq %rbx, %rbx
je 0x126043
cmpq $0x0, 0x20(%rbx)
jne 0x125d98
leaq 0x28cfd(%rip), %rdi     # 0x14ea7b
leaq 0x28a7a(%rip), %rsi     # 0x14e7ff
leaq 0x28aa9(%rip), %rcx     # 0x14e835
movl $0x9d2, %edx            # imm = 0x9D2
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x18(%rbx)
jne 0x125dc0
leaq 0x28cd5(%rip), %rdi     # 0x14ea7b
leaq 0x28a52(%rip), %rsi     # 0x14e7ff
leaq 0x28a8c(%rip), %rcx     # 0x14e840
movl $0x9d3, %edx            # imm = 0x9D3
xorl %eax, %eax
callq 0xbe592
movq 0x20(%rbx), %rax
testq %rax, %rax
sete %cl
leaq 0x7761f(%rip), %r14     # 0x19d3f0
cmpq %r14, %rax
sete %dl
orb %cl, %dl
jne 0x125f17
movq 0x18(%rbx), %rcx
cmpq %rbx, 0x10(%rcx)
je 0x125e0e
leaq 0x28c8b(%rip), %rdi     # 0x14ea7b
leaq 0x28a08(%rip), %rsi     # 0x14e7ff
leaq 0x28a4f(%rip), %rcx     # 0x14e84d
movl $0x9d6, %edx            # imm = 0x9D6
xorl %eax, %eax
callq 0xbe592
movq 0x20(%rbx), %rax
cmpq %rbx, 0x10(%rax)
je 0x125e35
leaq 0x28c60(%rip), %rdi     # 0x14ea7b
leaq 0x289dd(%rip), %rsi     # 0x14e7ff
leaq 0x28a3c(%rip), %rcx     # 0x14e865
movl $0x9d7, %edx            # imm = 0x9D7
xorl %eax, %eax
callq 0xbe592
movq 0x18(%rbx), %rdi
callq 0x125c5e
movq 0x20(%rbx), %rdi
callq 0x125c5e
movq (%rbx), %r8
movq 0x18(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
ja 0x125e7e
leaq 0x28c1e(%rip), %rdi     # 0x14ea7b
leaq 0x2899b(%rip), %rsi     # 0x14e7ff
leaq 0x28a12(%rip), %rcx     # 0x14e87d
movl $0x9da, %edx            # imm = 0x9DA
xorl %eax, %eax
callq 0xbe592
movq (%rbx), %r8
movq 0x18(%rbx), %rax
cmpq $0x0, 0x28(%rax)
je 0x125eb2
movq 0x8(%rax), %r9
cmpq %r9, %r8
ja 0x125eb2
leaq 0x28be6(%rip), %rdi     # 0x14ea7b
leaq 0x28963(%rip), %rsi     # 0x14e7ff
leaq 0x289da(%rip), %rcx     # 0x14e87d
movl $0x9db, %edx            # imm = 0x9DB
xorl %eax, %eax
callq 0xbe592
movq (%rbx), %r8
movq 0x20(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
jb 0x125ee3
leaq 0x28bb6(%rip), %rdi     # 0x14ea7b
leaq 0x28933(%rip), %rsi     # 0x14e7ff
leaq 0x289b7(%rip), %rcx     # 0x14e88a
movl $0x9dc, %edx            # imm = 0x9DC
xorl %eax, %eax
callq 0xbe592
movq 0x20(%rbx), %rax
cmpq $0x0, 0x28(%rax)
je 0x125f17
movq (%rbx), %r8
movq 0x8(%rax), %r9
cmpq %r9, %r8
jb 0x125f17
leaq 0x28b7e(%rip), %rdi     # 0x14ea7b
leaq 0x288fb(%rip), %rsi     # 0x14e7ff
leaq 0x2897f(%rip), %rcx     # 0x14e88a
movl $0x9dd, %edx            # imm = 0x9DD
xorl %eax, %eax
callq 0xbe592
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
sete %al
cmpq %r14, %rdi
sete %cl
orb %al, %cl
jne 0x126043
movq (%rbx), %r8
movq 0x8(%rbx), %r9
cmpq %r9, %r8
jb 0x125f60
leaq 0x28b39(%rip), %rdi     # 0x14ea7b
leaq 0x288b6(%rip), %rsi     # 0x14e7ff
leaq 0x2893a(%rip), %rcx     # 0x14e88a
movl $0x9e1, %edx            # imm = 0x9E1
xorl %eax, %eax
callq 0xbe592
movq 0x28(%rbx), %rdi
cmpq %rbx, 0x10(%rdi)
je 0x125f8b
leaq 0x28b0e(%rip), %rdi     # 0x14ea7b
leaq 0x2888b(%rip), %rsi     # 0x14e7ff
leaq 0x2891c(%rip), %rcx     # 0x14e897
movl $0x9e2, %edx            # imm = 0x9E2
xorl %eax, %eax
callq 0xbe592
movq 0x28(%rbx), %rdi
callq 0x125c5e
movq 0x8(%rbx), %r8
movq 0x20(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
ja 0x125fc9
leaq 0x28ad4(%rip), %rdi     # 0x14ea7b
leaq 0x28851(%rip), %rsi     # 0x14e7ff
leaq 0x288c8(%rip), %rcx     # 0x14e87d
movl $0x9e4, %edx            # imm = 0x9E4
xorl %eax, %eax
callq 0xbe592
movq 0x8(%rbx), %r8
movq 0x20(%rbx), %rax
cmpq $0x0, 0x28(%rax)
je 0x125ffe
movq 0x8(%rax), %r9
cmpq %r9, %r8
ja 0x125ffe
leaq 0x28a9b(%rip), %rdi     # 0x14ea7b
leaq 0x28818(%rip), %rsi     # 0x14e7ff
leaq 0x2888f(%rip), %rcx     # 0x14e87d
movl $0x9e5, %edx            # imm = 0x9E5
xorl %eax, %eax
callq 0xbe592
movq 0x8(%rbx), %r8
movq 0x28(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
jb 0x12602f
leaq 0x28a6a(%rip), %rdi     # 0x14ea7b
leaq 0x287e7(%rip), %rsi     # 0x14e7ff
leaq 0x2886b(%rip), %rcx     # 0x14e88a
movl $0x9e6, %edx            # imm = 0x9E6
xorl %eax, %eax
callq 0xbe592
movq 0x28(%rbx), %rax
cmpq $0x0, 0x28(%rax)
je 0x126043
movq 0x8(%rbx), %r8
movq 0x8(%rax), %r9
cmpq %r9, %r8
jae 0x12604b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x28a29(%rip), %rdi     # 0x14ea7b
leaq 0x287a6(%rip), %rsi     # 0x14e7ff
leaq 0x2882a(%rip), %rcx     # 0x14e88a
movl $0x9e7, %edx            # imm = 0x9E7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xbe592