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

    if( !o ) return;
    if( bcore_btree_node_pp_s_is_empty( o ) ) ERR( "empty node" );
    if( o->child0 == NULL )       ERR( "deleted leaf" );
    if( o->child1 && o->child1 != BNUL_PP )
    {
        if( o != o->child0->parent ) ERR( "child0 incorrect parent" );
        if( o != o->child1->parent ) ERR( "child1 incorrect parent" );
        bcore_btree_node_pp_s_check_consistency( o->child0 );
        bcore_btree_node_pp_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_PP )
    {
        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_pp_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, 0x78c6c(%rip)     # 0x19d3b0
je 0x124767
leaq 0x2a2de(%rip), %rdi     # 0x14ea2b
leaq 0x2a0ab(%rip), %rsi     # 0x14e7ff
leaq 0x2a2f8(%rip), %rcx     # 0x14ea53
movl $0x693, %edx            # imm = 0x693
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x78c49(%rip)     # 0x19d3b8
je 0x124792
leaq 0x2a2b3(%rip), %rdi     # 0x14ea2b
leaq 0x2a080(%rip), %rsi     # 0x14e7ff
leaq 0x2a2cd(%rip), %rcx     # 0x14ea53
movl $0x694, %edx            # imm = 0x694
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x78c26(%rip)     # 0x19d3c0
je 0x1247bd
leaq 0x2a288(%rip), %rdi     # 0x14ea2b
leaq 0x2a055(%rip), %rsi     # 0x14e7ff
leaq 0x2a2a2(%rip), %rcx     # 0x14ea53
movl $0x695, %edx            # imm = 0x695
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x78c03(%rip)     # 0x19d3c8
je 0x1247e8
leaq 0x2a25d(%rip), %rdi     # 0x14ea2b
leaq 0x2a02a(%rip), %rsi     # 0x14e7ff
leaq 0x2a277(%rip), %rcx     # 0x14ea53
movl $0x696, %edx            # imm = 0x696
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x78be0(%rip)     # 0x19d3d0
je 0x124813
leaq 0x2a232(%rip), %rdi     # 0x14ea2b
leaq 0x29fff(%rip), %rsi     # 0x14e7ff
leaq 0x2a24c(%rip), %rcx     # 0x14ea53
movl $0x697, %edx            # imm = 0x697
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x78bbd(%rip)     # 0x19d3d8
je 0x12483e
leaq 0x2a207(%rip), %rdi     # 0x14ea2b
leaq 0x29fd4(%rip), %rsi     # 0x14e7ff
leaq 0x2a221(%rip), %rcx     # 0x14ea53
movl $0x698, %edx            # imm = 0x698
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x78b9a(%rip)     # 0x19d3e0
je 0x124869
leaq 0x2a1dc(%rip), %rdi     # 0x14ea2b
leaq 0x29fa9(%rip), %rsi     # 0x14e7ff
leaq 0x2a1f6(%rip), %rcx     # 0x14ea53
movl $0x699, %edx            # imm = 0x699
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x78b77(%rip)     # 0x19d3e8
je 0x124894
leaq 0x2a1b1(%rip), %rdi     # 0x14ea2b
leaq 0x29f7e(%rip), %rsi     # 0x14e7ff
leaq 0x2a1cb(%rip), %rcx     # 0x14ea53
movl $0x69a, %edx            # imm = 0x69A
xorl %eax, %eax
callq 0xbe592
testq %rbx, %rbx
je 0x124b70
cmpq $0x0, 0x30(%rbx)
jne 0x1248c5
leaq 0x2a180(%rip), %rdi     # 0x14ea2b
leaq 0x29f4d(%rip), %rsi     # 0x14e7ff
leaq 0x29f7c(%rip), %rcx     # 0x14e835
movl $0x69d, %edx            # imm = 0x69D
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x28(%rbx)
jne 0x1248ed
leaq 0x2a158(%rip), %rdi     # 0x14ea2b
leaq 0x29f25(%rip), %rsi     # 0x14e7ff
leaq 0x29f5f(%rip), %rcx     # 0x14e840
movl $0x69e, %edx            # imm = 0x69E
xorl %eax, %eax
callq 0xbe592
movq 0x30(%rbx), %rax
testq %rax, %rax
sete %cl
leaq 0x78ab2(%rip), %r14     # 0x19d3b0
cmpq %r14, %rax
sete %dl
orb %cl, %dl
jne 0x124a44
movq 0x28(%rbx), %rcx
cmpq %rbx, 0x20(%rcx)
je 0x12493b
leaq 0x2a10e(%rip), %rdi     # 0x14ea2b
leaq 0x29edb(%rip), %rsi     # 0x14e7ff
leaq 0x29f22(%rip), %rcx     # 0x14e84d
movl $0x6a1, %edx            # imm = 0x6A1
xorl %eax, %eax
callq 0xbe592
movq 0x30(%rbx), %rax
cmpq %rbx, 0x20(%rax)
je 0x124962
leaq 0x2a0e3(%rip), %rdi     # 0x14ea2b
leaq 0x29eb0(%rip), %rsi     # 0x14e7ff
leaq 0x29f0f(%rip), %rcx     # 0x14e865
movl $0x6a2, %edx            # imm = 0x6A2
xorl %eax, %eax
callq 0xbe592
movq 0x28(%rbx), %rdi
callq 0x124735
movq 0x30(%rbx), %rdi
callq 0x124735
movq (%rbx), %r8
movq 0x28(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
ja 0x1249ab
leaq 0x2a0a1(%rip), %rdi     # 0x14ea2b
leaq 0x29e6e(%rip), %rsi     # 0x14e7ff
leaq 0x29ee5(%rip), %rcx     # 0x14e87d
movl $0x6a5, %edx            # imm = 0x6A5
xorl %eax, %eax
callq 0xbe592
movq (%rbx), %r8
movq 0x28(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0x1249df
movq 0x10(%rax), %r9
cmpq %r9, %r8
ja 0x1249df
leaq 0x2a069(%rip), %rdi     # 0x14ea2b
leaq 0x29e36(%rip), %rsi     # 0x14e7ff
leaq 0x29ead(%rip), %rcx     # 0x14e87d
movl $0x6a6, %edx            # imm = 0x6A6
xorl %eax, %eax
callq 0xbe592
movq (%rbx), %r8
movq 0x30(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
jb 0x124a10
leaq 0x2a039(%rip), %rdi     # 0x14ea2b
leaq 0x29e06(%rip), %rsi     # 0x14e7ff
leaq 0x29e8a(%rip), %rcx     # 0x14e88a
movl $0x6a7, %edx            # imm = 0x6A7
xorl %eax, %eax
callq 0xbe592
movq 0x30(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0x124a44
movq (%rbx), %r8
movq 0x10(%rax), %r9
cmpq %r9, %r8
jb 0x124a44
leaq 0x2a001(%rip), %rdi     # 0x14ea2b
leaq 0x29dce(%rip), %rsi     # 0x14e7ff
leaq 0x29e52(%rip), %rcx     # 0x14e88a
movl $0x6a8, %edx            # imm = 0x6A8
xorl %eax, %eax
callq 0xbe592
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
sete %al
cmpq %r14, %rdi
sete %cl
orb %al, %cl
jne 0x124b70
movq (%rbx), %r8
movq 0x10(%rbx), %r9
cmpq %r9, %r8
jb 0x124a8d
leaq 0x29fbc(%rip), %rdi     # 0x14ea2b
leaq 0x29d89(%rip), %rsi     # 0x14e7ff
leaq 0x29e0d(%rip), %rcx     # 0x14e88a
movl $0x6ac, %edx            # imm = 0x6AC
xorl %eax, %eax
callq 0xbe592
movq 0x38(%rbx), %rdi
cmpq %rbx, 0x20(%rdi)
je 0x124ab8
leaq 0x29f91(%rip), %rdi     # 0x14ea2b
leaq 0x29d5e(%rip), %rsi     # 0x14e7ff
leaq 0x29def(%rip), %rcx     # 0x14e897
movl $0x6ad, %edx            # imm = 0x6AD
xorl %eax, %eax
callq 0xbe592
movq 0x38(%rbx), %rdi
callq 0x124735
movq 0x10(%rbx), %r8
movq 0x30(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
ja 0x124af6
leaq 0x29f57(%rip), %rdi     # 0x14ea2b
leaq 0x29d24(%rip), %rsi     # 0x14e7ff
leaq 0x29d9b(%rip), %rcx     # 0x14e87d
movl $0x6af, %edx            # imm = 0x6AF
xorl %eax, %eax
callq 0xbe592
movq 0x10(%rbx), %r8
movq 0x30(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0x124b2b
movq 0x10(%rax), %r9
cmpq %r9, %r8
ja 0x124b2b
leaq 0x29f1e(%rip), %rdi     # 0x14ea2b
leaq 0x29ceb(%rip), %rsi     # 0x14e7ff
leaq 0x29d62(%rip), %rcx     # 0x14e87d
movl $0x6b0, %edx            # imm = 0x6B0
xorl %eax, %eax
callq 0xbe592
movq 0x10(%rbx), %r8
movq 0x38(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
jb 0x124b5c
leaq 0x29eed(%rip), %rdi     # 0x14ea2b
leaq 0x29cba(%rip), %rsi     # 0x14e7ff
leaq 0x29d3e(%rip), %rcx     # 0x14e88a
movl $0x6b1, %edx            # imm = 0x6B1
xorl %eax, %eax
callq 0xbe592
movq 0x38(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0x124b70
movq 0x10(%rbx), %r8
movq 0x10(%rax), %r9
cmpq %r9, %r8
jae 0x124b78
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x29eac(%rip), %rdi     # 0x14ea2b
leaq 0x29c79(%rip), %rsi     # 0x14e7ff
leaq 0x29cfd(%rip), %rcx     # 0x14e88a
movl $0x6b2, %edx            # imm = 0x6B2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xbe592