// File: /workspace/github_c_makefile_star2_O3/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, 0x7a143(%rip)     # 0x19d370
je 0x123250
leaq 0x2b72c(%rip), %rdi     # 0x14e962
leaq 0x2b5c2(%rip), %rsi     # 0x14e7ff
leaq 0x2b746(%rip), %rcx     # 0x14e98a
movl $0x37d, %edx            # imm = 0x37D
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x7a120(%rip)     # 0x19d378
je 0x12327b
leaq 0x2b701(%rip), %rdi     # 0x14e962
leaq 0x2b597(%rip), %rsi     # 0x14e7ff
leaq 0x2b71b(%rip), %rcx     # 0x14e98a
movl $0x37e, %edx            # imm = 0x37E
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x7a0fd(%rip)     # 0x19d380
je 0x1232a6
leaq 0x2b6d6(%rip), %rdi     # 0x14e962
leaq 0x2b56c(%rip), %rsi     # 0x14e7ff
leaq 0x2b6f0(%rip), %rcx     # 0x14e98a
movl $0x37f, %edx            # imm = 0x37F
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x7a0da(%rip)     # 0x19d388
je 0x1232d1
leaq 0x2b6ab(%rip), %rdi     # 0x14e962
leaq 0x2b541(%rip), %rsi     # 0x14e7ff
leaq 0x2b6c5(%rip), %rcx     # 0x14e98a
movl $0x380, %edx            # imm = 0x380
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x7a0b7(%rip)     # 0x19d390
je 0x1232fc
leaq 0x2b680(%rip), %rdi     # 0x14e962
leaq 0x2b516(%rip), %rsi     # 0x14e7ff
leaq 0x2b69a(%rip), %rcx     # 0x14e98a
movl $0x381, %edx            # imm = 0x381
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x7a094(%rip)     # 0x19d398
je 0x123327
leaq 0x2b655(%rip), %rdi     # 0x14e962
leaq 0x2b4eb(%rip), %rsi     # 0x14e7ff
leaq 0x2b66f(%rip), %rcx     # 0x14e98a
movl $0x382, %edx            # imm = 0x382
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x7a071(%rip)     # 0x19d3a0
je 0x123352
leaq 0x2b62a(%rip), %rdi     # 0x14e962
leaq 0x2b4c0(%rip), %rsi     # 0x14e7ff
leaq 0x2b644(%rip), %rcx     # 0x14e98a
movl $0x383, %edx            # imm = 0x383
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x7a04e(%rip)     # 0x19d3a8
je 0x12337d
leaq 0x2b5ff(%rip), %rdi     # 0x14e962
leaq 0x2b495(%rip), %rsi     # 0x14e7ff
leaq 0x2b619(%rip), %rcx     # 0x14e98a
movl $0x384, %edx            # imm = 0x384
xorl %eax, %eax
callq 0xbe592
testq %rbx, %rbx
je 0x123659
cmpq $0x0, 0x30(%rbx)
jne 0x1233ae
leaq 0x2b5ce(%rip), %rdi     # 0x14e962
leaq 0x2b464(%rip), %rsi     # 0x14e7ff
leaq 0x2b493(%rip), %rcx     # 0x14e835
movl $0x387, %edx            # imm = 0x387
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x28(%rbx)
jne 0x1233d6
leaq 0x2b5a6(%rip), %rdi     # 0x14e962
leaq 0x2b43c(%rip), %rsi     # 0x14e7ff
leaq 0x2b476(%rip), %rcx     # 0x14e840
movl $0x388, %edx            # imm = 0x388
xorl %eax, %eax
callq 0xbe592
movq 0x30(%rbx), %rax
testq %rax, %rax
sete %cl
leaq 0x79f89(%rip), %r14     # 0x19d370
cmpq %r14, %rax
sete %dl
orb %cl, %dl
jne 0x12352d
movq 0x28(%rbx), %rcx
cmpq %rbx, 0x20(%rcx)
je 0x123424
leaq 0x2b55c(%rip), %rdi     # 0x14e962
leaq 0x2b3f2(%rip), %rsi     # 0x14e7ff
leaq 0x2b439(%rip), %rcx     # 0x14e84d
movl $0x38b, %edx            # imm = 0x38B
xorl %eax, %eax
callq 0xbe592
movq 0x30(%rbx), %rax
cmpq %rbx, 0x20(%rax)
je 0x12344b
leaq 0x2b531(%rip), %rdi     # 0x14e962
leaq 0x2b3c7(%rip), %rsi     # 0x14e7ff
leaq 0x2b426(%rip), %rcx     # 0x14e865
movl $0x38c, %edx            # imm = 0x38C
xorl %eax, %eax
callq 0xbe592
movq 0x28(%rbx), %rdi
callq 0x12321e
movq 0x30(%rbx), %rdi
callq 0x12321e
movq (%rbx), %r8
movq 0x28(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
ja 0x123494
leaq 0x2b4ef(%rip), %rdi     # 0x14e962
leaq 0x2b385(%rip), %rsi     # 0x14e7ff
leaq 0x2b3fc(%rip), %rcx     # 0x14e87d
movl $0x38f, %edx            # imm = 0x38F
xorl %eax, %eax
callq 0xbe592
movq (%rbx), %r8
movq 0x28(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0x1234c8
movq 0x10(%rax), %r9
cmpq %r9, %r8
ja 0x1234c8
leaq 0x2b4b7(%rip), %rdi     # 0x14e962
leaq 0x2b34d(%rip), %rsi     # 0x14e7ff
leaq 0x2b3c4(%rip), %rcx     # 0x14e87d
movl $0x390, %edx            # imm = 0x390
xorl %eax, %eax
callq 0xbe592
movq (%rbx), %r8
movq 0x30(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
jb 0x1234f9
leaq 0x2b487(%rip), %rdi     # 0x14e962
leaq 0x2b31d(%rip), %rsi     # 0x14e7ff
leaq 0x2b3a1(%rip), %rcx     # 0x14e88a
movl $0x391, %edx            # imm = 0x391
xorl %eax, %eax
callq 0xbe592
movq 0x30(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0x12352d
movq (%rbx), %r8
movq 0x10(%rax), %r9
cmpq %r9, %r8
jb 0x12352d
leaq 0x2b44f(%rip), %rdi     # 0x14e962
leaq 0x2b2e5(%rip), %rsi     # 0x14e7ff
leaq 0x2b369(%rip), %rcx     # 0x14e88a
movl $0x392, %edx            # imm = 0x392
xorl %eax, %eax
callq 0xbe592
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
sete %al
cmpq %r14, %rdi
sete %cl
orb %al, %cl
jne 0x123659
movq (%rbx), %r8
movq 0x10(%rbx), %r9
cmpq %r9, %r8
jb 0x123576
leaq 0x2b40a(%rip), %rdi     # 0x14e962
leaq 0x2b2a0(%rip), %rsi     # 0x14e7ff
leaq 0x2b324(%rip), %rcx     # 0x14e88a
movl $0x396, %edx            # imm = 0x396
xorl %eax, %eax
callq 0xbe592
movq 0x38(%rbx), %rdi
cmpq %rbx, 0x20(%rdi)
je 0x1235a1
leaq 0x2b3df(%rip), %rdi     # 0x14e962
leaq 0x2b275(%rip), %rsi     # 0x14e7ff
leaq 0x2b306(%rip), %rcx     # 0x14e897
movl $0x397, %edx            # imm = 0x397
xorl %eax, %eax
callq 0xbe592
movq 0x38(%rbx), %rdi
callq 0x12321e
movq 0x10(%rbx), %r8
movq 0x30(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
ja 0x1235df
leaq 0x2b3a5(%rip), %rdi     # 0x14e962
leaq 0x2b23b(%rip), %rsi     # 0x14e7ff
leaq 0x2b2b2(%rip), %rcx     # 0x14e87d
movl $0x399, %edx            # imm = 0x399
xorl %eax, %eax
callq 0xbe592
movq 0x10(%rbx), %r8
movq 0x30(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0x123614
movq 0x10(%rax), %r9
cmpq %r9, %r8
ja 0x123614
leaq 0x2b36c(%rip), %rdi     # 0x14e962
leaq 0x2b202(%rip), %rsi     # 0x14e7ff
leaq 0x2b279(%rip), %rcx     # 0x14e87d
movl $0x39a, %edx            # imm = 0x39A
xorl %eax, %eax
callq 0xbe592
movq 0x10(%rbx), %r8
movq 0x38(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
jb 0x123645
leaq 0x2b33b(%rip), %rdi     # 0x14e962
leaq 0x2b1d1(%rip), %rsi     # 0x14e7ff
leaq 0x2b255(%rip), %rcx     # 0x14e88a
movl $0x39b, %edx            # imm = 0x39B
xorl %eax, %eax
callq 0xbe592
movq 0x38(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0x123659
movq 0x10(%rbx), %r8
movq 0x10(%rax), %r9
cmpq %r9, %r8
jae 0x123661
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2b2fa(%rip), %rdi     # 0x14e962
leaq 0x2b190(%rip), %rsi     # 0x14e7ff
leaq 0x2b214(%rip), %rcx     # 0x14e88a
movl $0x39c, %edx            # imm = 0x39C
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xbe592