// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_btree.c
// Function: bcore_btree_node_ps_s_check_consistency
void bcore_btree_node_ps_s_check_consistency( bcore_btree_node_ps_s* o )
{
    if( bcore_btree_node_ps_s_null_g.kv1.key != 0    ) ERR( "bcore_btree_node_ps_s_null was modified" );
    if( bcore_btree_node_ps_s_null_g.kv1.val != 0    ) ERR( "bcore_btree_node_ps_s_null was modified" );
    if( bcore_btree_node_ps_s_null_g.kv2.key != 0    ) ERR( "bcore_btree_node_ps_s_null was modified" );
    if( bcore_btree_node_ps_s_null_g.kv2.val != 0    ) ERR( "bcore_btree_node_ps_s_null was modified" );
    if( bcore_btree_node_ps_s_null_g.parent  != NULL ) ERR( "bcore_btree_node_ps_s_null was modified" );
    if( bcore_btree_node_ps_s_null_g.child0  != NULL ) ERR( "bcore_btree_node_ps_s_null was modified" );
    if( bcore_btree_node_ps_s_null_g.child1  != NULL ) ERR( "bcore_btree_node_ps_s_null was modified" );
    if( bcore_btree_node_ps_s_null_g.child2  != NULL ) ERR( "bcore_btree_node_ps_s_null was modified" );

    if( !o ) return;
    if( bcore_btree_node_ps_s_is_empty( o ) ) ERR( "empty node" );
    if( o->child0 == NULL )       ERR( "deleted leaf" );
    if( o->child1 && o->child1 != BNUL_PS )
    {
        if( o != o->child0->parent ) ERR( "child0 incorrect parent" );
        if( o != o->child1->parent ) ERR( "child1 incorrect parent" );
        bcore_btree_node_ps_s_check_consistency( o->child0 );
        bcore_btree_node_ps_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_PS )
    {
        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_ps_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, 0x77fcb(%rip)     # 0x119370
je 0xa13c8
leaq 0x2b639(%rip), %rdi     # 0xcc9e7
leaq 0x2b4cf(%rip), %rsi     # 0xcc884
leaq 0x2b653(%rip), %rcx     # 0xcca0f
movl $0x37d, %edx            # imm = 0x37D
xorl %eax, %eax
callq 0x60031
cmpq $0x0, 0x77fa8(%rip)     # 0x119378
je 0xa13f3
leaq 0x2b60e(%rip), %rdi     # 0xcc9e7
leaq 0x2b4a4(%rip), %rsi     # 0xcc884
leaq 0x2b628(%rip), %rcx     # 0xcca0f
movl $0x37e, %edx            # imm = 0x37E
xorl %eax, %eax
callq 0x60031
cmpq $0x0, 0x77f85(%rip)     # 0x119380
je 0xa141e
leaq 0x2b5e3(%rip), %rdi     # 0xcc9e7
leaq 0x2b479(%rip), %rsi     # 0xcc884
leaq 0x2b5fd(%rip), %rcx     # 0xcca0f
movl $0x37f, %edx            # imm = 0x37F
xorl %eax, %eax
callq 0x60031
cmpq $0x0, 0x77f62(%rip)     # 0x119388
je 0xa1449
leaq 0x2b5b8(%rip), %rdi     # 0xcc9e7
leaq 0x2b44e(%rip), %rsi     # 0xcc884
leaq 0x2b5d2(%rip), %rcx     # 0xcca0f
movl $0x380, %edx            # imm = 0x380
xorl %eax, %eax
callq 0x60031
cmpq $0x0, 0x77f3f(%rip)     # 0x119390
je 0xa1474
leaq 0x2b58d(%rip), %rdi     # 0xcc9e7
leaq 0x2b423(%rip), %rsi     # 0xcc884
leaq 0x2b5a7(%rip), %rcx     # 0xcca0f
movl $0x381, %edx            # imm = 0x381
xorl %eax, %eax
callq 0x60031
cmpq $0x0, 0x77f1c(%rip)     # 0x119398
je 0xa149f
leaq 0x2b562(%rip), %rdi     # 0xcc9e7
leaq 0x2b3f8(%rip), %rsi     # 0xcc884
leaq 0x2b57c(%rip), %rcx     # 0xcca0f
movl $0x382, %edx            # imm = 0x382
xorl %eax, %eax
callq 0x60031
cmpq $0x0, 0x77ef9(%rip)     # 0x1193a0
je 0xa14ca
leaq 0x2b537(%rip), %rdi     # 0xcc9e7
leaq 0x2b3cd(%rip), %rsi     # 0xcc884
leaq 0x2b551(%rip), %rcx     # 0xcca0f
movl $0x383, %edx            # imm = 0x383
xorl %eax, %eax
callq 0x60031
cmpq $0x0, 0x77ed6(%rip)     # 0x1193a8
je 0xa14f5
leaq 0x2b50c(%rip), %rdi     # 0xcc9e7
leaq 0x2b3a2(%rip), %rsi     # 0xcc884
leaq 0x2b526(%rip), %rcx     # 0xcca0f
movl $0x384, %edx            # imm = 0x384
xorl %eax, %eax
callq 0x60031
testq %rbx, %rbx
je 0xa17d1
cmpq $0x0, 0x30(%rbx)
jne 0xa1526
leaq 0x2b4db(%rip), %rdi     # 0xcc9e7
leaq 0x2b371(%rip), %rsi     # 0xcc884
leaq 0x2b3a0(%rip), %rcx     # 0xcc8ba
movl $0x387, %edx            # imm = 0x387
xorl %eax, %eax
callq 0x60031
cmpq $0x0, 0x28(%rbx)
jne 0xa154e
leaq 0x2b4b3(%rip), %rdi     # 0xcc9e7
leaq 0x2b349(%rip), %rsi     # 0xcc884
leaq 0x2b383(%rip), %rcx     # 0xcc8c5
movl $0x388, %edx            # imm = 0x388
xorl %eax, %eax
callq 0x60031
movq 0x30(%rbx), %rax
testq %rax, %rax
sete %cl
leaq 0x77e11(%rip), %r14     # 0x119370
cmpq %r14, %rax
sete %dl
orb %cl, %dl
jne 0xa16a5
movq 0x28(%rbx), %rcx
cmpq %rbx, 0x20(%rcx)
je 0xa159c
leaq 0x2b469(%rip), %rdi     # 0xcc9e7
leaq 0x2b2ff(%rip), %rsi     # 0xcc884
leaq 0x2b346(%rip), %rcx     # 0xcc8d2
movl $0x38b, %edx            # imm = 0x38B
xorl %eax, %eax
callq 0x60031
movq 0x30(%rbx), %rax
cmpq %rbx, 0x20(%rax)
je 0xa15c3
leaq 0x2b43e(%rip), %rdi     # 0xcc9e7
leaq 0x2b2d4(%rip), %rsi     # 0xcc884
leaq 0x2b333(%rip), %rcx     # 0xcc8ea
movl $0x38c, %edx            # imm = 0x38C
xorl %eax, %eax
callq 0x60031
movq 0x28(%rbx), %rdi
callq 0xa1396
movq 0x30(%rbx), %rdi
callq 0xa1396
movq (%rbx), %r8
movq 0x28(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
ja 0xa160c
leaq 0x2b3fc(%rip), %rdi     # 0xcc9e7
leaq 0x2b292(%rip), %rsi     # 0xcc884
leaq 0x2b309(%rip), %rcx     # 0xcc902
movl $0x38f, %edx            # imm = 0x38F
xorl %eax, %eax
callq 0x60031
movq (%rbx), %r8
movq 0x28(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0xa1640
movq 0x10(%rax), %r9
cmpq %r9, %r8
ja 0xa1640
leaq 0x2b3c4(%rip), %rdi     # 0xcc9e7
leaq 0x2b25a(%rip), %rsi     # 0xcc884
leaq 0x2b2d1(%rip), %rcx     # 0xcc902
movl $0x390, %edx            # imm = 0x390
xorl %eax, %eax
callq 0x60031
movq (%rbx), %r8
movq 0x30(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
jb 0xa1671
leaq 0x2b394(%rip), %rdi     # 0xcc9e7
leaq 0x2b22a(%rip), %rsi     # 0xcc884
leaq 0x2b2ae(%rip), %rcx     # 0xcc90f
movl $0x391, %edx            # imm = 0x391
xorl %eax, %eax
callq 0x60031
movq 0x30(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0xa16a5
movq (%rbx), %r8
movq 0x10(%rax), %r9
cmpq %r9, %r8
jb 0xa16a5
leaq 0x2b35c(%rip), %rdi     # 0xcc9e7
leaq 0x2b1f2(%rip), %rsi     # 0xcc884
leaq 0x2b276(%rip), %rcx     # 0xcc90f
movl $0x392, %edx            # imm = 0x392
xorl %eax, %eax
callq 0x60031
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
sete %al
cmpq %r14, %rdi
sete %cl
orb %al, %cl
jne 0xa17d1
movq (%rbx), %r8
movq 0x10(%rbx), %r9
cmpq %r9, %r8
jb 0xa16ee
leaq 0x2b317(%rip), %rdi     # 0xcc9e7
leaq 0x2b1ad(%rip), %rsi     # 0xcc884
leaq 0x2b231(%rip), %rcx     # 0xcc90f
movl $0x396, %edx            # imm = 0x396
xorl %eax, %eax
callq 0x60031
movq 0x38(%rbx), %rdi
cmpq %rbx, 0x20(%rdi)
je 0xa1719
leaq 0x2b2ec(%rip), %rdi     # 0xcc9e7
leaq 0x2b182(%rip), %rsi     # 0xcc884
leaq 0x2b213(%rip), %rcx     # 0xcc91c
movl $0x397, %edx            # imm = 0x397
xorl %eax, %eax
callq 0x60031
movq 0x38(%rbx), %rdi
callq 0xa1396
movq 0x10(%rbx), %r8
movq 0x30(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
ja 0xa1757
leaq 0x2b2b2(%rip), %rdi     # 0xcc9e7
leaq 0x2b148(%rip), %rsi     # 0xcc884
leaq 0x2b1bf(%rip), %rcx     # 0xcc902
movl $0x399, %edx            # imm = 0x399
xorl %eax, %eax
callq 0x60031
movq 0x10(%rbx), %r8
movq 0x30(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0xa178c
movq 0x10(%rax), %r9
cmpq %r9, %r8
ja 0xa178c
leaq 0x2b279(%rip), %rdi     # 0xcc9e7
leaq 0x2b10f(%rip), %rsi     # 0xcc884
leaq 0x2b186(%rip), %rcx     # 0xcc902
movl $0x39a, %edx            # imm = 0x39A
xorl %eax, %eax
callq 0x60031
movq 0x10(%rbx), %r8
movq 0x38(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
jb 0xa17bd
leaq 0x2b248(%rip), %rdi     # 0xcc9e7
leaq 0x2b0de(%rip), %rsi     # 0xcc884
leaq 0x2b162(%rip), %rcx     # 0xcc90f
movl $0x39b, %edx            # imm = 0x39B
xorl %eax, %eax
callq 0x60031
movq 0x38(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0xa17d1
movq 0x10(%rbx), %r8
movq 0x10(%rax), %r9
cmpq %r9, %r8
jae 0xa17d9
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2b207(%rip), %rdi     # 0xcc9e7
leaq 0x2b09d(%rip), %rsi     # 0xcc884
leaq 0x2b121(%rip), %rcx     # 0xcc90f
movl $0x39c, %edx            # imm = 0x39C
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x60031