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

    if( !o ) return;
    if( bcore_btree_node_ip_s_is_empty( o ) ) ERR( "empty node" );
    if( o->child0 == NULL )       ERR( "deleted leaf" );
    if( o->child1 && o->child1 != BNUL_IP )
    {
        if( o != o->child0->parent ) ERR( "child0 incorrect parent" );
        if( o != o->child1->parent ) ERR( "child1 incorrect parent" );
        bcore_btree_node_ip_s_check_consistency( o->child0 );
        bcore_btree_node_ip_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_IP )
    {
        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_ip_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, 0x7b661(%rip)     # 0x19d330
je 0x121cf2
leaq 0x2caff(%rip), %rdi     # 0x14e7d7
leaq 0x2cb20(%rip), %rsi     # 0x14e7ff
leaq 0x2cb27(%rip), %rcx     # 0x14e80d
movl $0x7e, %edx
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x7b63e(%rip)     # 0x19d338
je 0x121d1d
leaq 0x2cad4(%rip), %rdi     # 0x14e7d7
leaq 0x2caf5(%rip), %rsi     # 0x14e7ff
leaq 0x2cafc(%rip), %rcx     # 0x14e80d
movl $0x7f, %edx
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x7b61b(%rip)     # 0x19d340
je 0x121d48
leaq 0x2caa9(%rip), %rdi     # 0x14e7d7
leaq 0x2caca(%rip), %rsi     # 0x14e7ff
leaq 0x2cad1(%rip), %rcx     # 0x14e80d
movl $0x80, %edx
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x7b5f8(%rip)     # 0x19d348
je 0x121d73
leaq 0x2ca7e(%rip), %rdi     # 0x14e7d7
leaq 0x2ca9f(%rip), %rsi     # 0x14e7ff
leaq 0x2caa6(%rip), %rcx     # 0x14e80d
movl $0x81, %edx
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x7b5d5(%rip)     # 0x19d350
je 0x121d9e
leaq 0x2ca53(%rip), %rdi     # 0x14e7d7
leaq 0x2ca74(%rip), %rsi     # 0x14e7ff
leaq 0x2ca7b(%rip), %rcx     # 0x14e80d
movl $0x82, %edx
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x7b5b2(%rip)     # 0x19d358
je 0x121dc9
leaq 0x2ca28(%rip), %rdi     # 0x14e7d7
leaq 0x2ca49(%rip), %rsi     # 0x14e7ff
leaq 0x2ca50(%rip), %rcx     # 0x14e80d
movl $0x83, %edx
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x7b58f(%rip)     # 0x19d360
je 0x121df4
leaq 0x2c9fd(%rip), %rdi     # 0x14e7d7
leaq 0x2ca1e(%rip), %rsi     # 0x14e7ff
leaq 0x2ca25(%rip), %rcx     # 0x14e80d
movl $0x84, %edx
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x7b56c(%rip)     # 0x19d368
je 0x121e1f
leaq 0x2c9d2(%rip), %rdi     # 0x14e7d7
leaq 0x2c9f3(%rip), %rsi     # 0x14e7ff
leaq 0x2c9fa(%rip), %rcx     # 0x14e80d
movl $0x85, %edx
xorl %eax, %eax
callq 0xbe592
testq %rbx, %rbx
je 0x1220fb
cmpq $0x0, 0x30(%rbx)
jne 0x121e50
leaq 0x2c9a1(%rip), %rdi     # 0x14e7d7
leaq 0x2c9c2(%rip), %rsi     # 0x14e7ff
leaq 0x2c9f1(%rip), %rcx     # 0x14e835
movl $0x88, %edx
xorl %eax, %eax
callq 0xbe592
cmpq $0x0, 0x28(%rbx)
jne 0x121e78
leaq 0x2c979(%rip), %rdi     # 0x14e7d7
leaq 0x2c99a(%rip), %rsi     # 0x14e7ff
leaq 0x2c9d4(%rip), %rcx     # 0x14e840
movl $0x89, %edx
xorl %eax, %eax
callq 0xbe592
movq 0x30(%rbx), %rax
testq %rax, %rax
sete %cl
leaq 0x7b4a7(%rip), %r14     # 0x19d330
cmpq %r14, %rax
sete %dl
orb %cl, %dl
jne 0x121fcf
movq 0x28(%rbx), %rcx
cmpq %rbx, 0x20(%rcx)
je 0x121ec6
leaq 0x2c92f(%rip), %rdi     # 0x14e7d7
leaq 0x2c950(%rip), %rsi     # 0x14e7ff
leaq 0x2c997(%rip), %rcx     # 0x14e84d
movl $0x8c, %edx
xorl %eax, %eax
callq 0xbe592
movq 0x30(%rbx), %rax
cmpq %rbx, 0x20(%rax)
je 0x121eed
leaq 0x2c904(%rip), %rdi     # 0x14e7d7
leaq 0x2c925(%rip), %rsi     # 0x14e7ff
leaq 0x2c984(%rip), %rcx     # 0x14e865
movl $0x8d, %edx
xorl %eax, %eax
callq 0xbe592
movq 0x28(%rbx), %rdi
callq 0x121cc0
movq 0x30(%rbx), %rdi
callq 0x121cc0
movq (%rbx), %r8
movq 0x28(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
ja 0x121f36
leaq 0x2c8c2(%rip), %rdi     # 0x14e7d7
leaq 0x2c8e3(%rip), %rsi     # 0x14e7ff
leaq 0x2c95a(%rip), %rcx     # 0x14e87d
movl $0x90, %edx
xorl %eax, %eax
callq 0xbe592
movq (%rbx), %r8
movq 0x28(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0x121f6a
movq 0x10(%rax), %r9
cmpq %r9, %r8
ja 0x121f6a
leaq 0x2c88a(%rip), %rdi     # 0x14e7d7
leaq 0x2c8ab(%rip), %rsi     # 0x14e7ff
leaq 0x2c922(%rip), %rcx     # 0x14e87d
movl $0x91, %edx
xorl %eax, %eax
callq 0xbe592
movq (%rbx), %r8
movq 0x30(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
jb 0x121f9b
leaq 0x2c85a(%rip), %rdi     # 0x14e7d7
leaq 0x2c87b(%rip), %rsi     # 0x14e7ff
leaq 0x2c8ff(%rip), %rcx     # 0x14e88a
movl $0x92, %edx
xorl %eax, %eax
callq 0xbe592
movq 0x30(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0x121fcf
movq (%rbx), %r8
movq 0x10(%rax), %r9
cmpq %r9, %r8
jb 0x121fcf
leaq 0x2c822(%rip), %rdi     # 0x14e7d7
leaq 0x2c843(%rip), %rsi     # 0x14e7ff
leaq 0x2c8c7(%rip), %rcx     # 0x14e88a
movl $0x93, %edx
xorl %eax, %eax
callq 0xbe592
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
sete %al
cmpq %r14, %rdi
sete %cl
orb %al, %cl
jne 0x1220fb
movq (%rbx), %r8
movq 0x10(%rbx), %r9
cmpq %r9, %r8
jb 0x122018
leaq 0x2c7dd(%rip), %rdi     # 0x14e7d7
leaq 0x2c7fe(%rip), %rsi     # 0x14e7ff
leaq 0x2c882(%rip), %rcx     # 0x14e88a
movl $0x97, %edx
xorl %eax, %eax
callq 0xbe592
movq 0x38(%rbx), %rdi
cmpq %rbx, 0x20(%rdi)
je 0x122043
leaq 0x2c7b2(%rip), %rdi     # 0x14e7d7
leaq 0x2c7d3(%rip), %rsi     # 0x14e7ff
leaq 0x2c864(%rip), %rcx     # 0x14e897
movl $0x98, %edx
xorl %eax, %eax
callq 0xbe592
movq 0x38(%rbx), %rdi
callq 0x121cc0
movq 0x10(%rbx), %r8
movq 0x30(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
ja 0x122081
leaq 0x2c778(%rip), %rdi     # 0x14e7d7
leaq 0x2c799(%rip), %rsi     # 0x14e7ff
leaq 0x2c810(%rip), %rcx     # 0x14e87d
movl $0x9a, %edx
xorl %eax, %eax
callq 0xbe592
movq 0x10(%rbx), %r8
movq 0x30(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0x1220b6
movq 0x10(%rax), %r9
cmpq %r9, %r8
ja 0x1220b6
leaq 0x2c73f(%rip), %rdi     # 0x14e7d7
leaq 0x2c760(%rip), %rsi     # 0x14e7ff
leaq 0x2c7d7(%rip), %rcx     # 0x14e87d
movl $0x9b, %edx
xorl %eax, %eax
callq 0xbe592
movq 0x10(%rbx), %r8
movq 0x38(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
jb 0x1220e7
leaq 0x2c70e(%rip), %rdi     # 0x14e7d7
leaq 0x2c72f(%rip), %rsi     # 0x14e7ff
leaq 0x2c7b3(%rip), %rcx     # 0x14e88a
movl $0x9c, %edx
xorl %eax, %eax
callq 0xbe592
movq 0x38(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0x1220fb
movq 0x10(%rbx), %r8
movq 0x10(%rax), %r9
cmpq %r9, %r8
jae 0x122103
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2c6cd(%rip), %rdi     # 0x14e7d7
leaq 0x2c6ee(%rip), %rsi     # 0x14e7ff
leaq 0x2c772(%rip), %rcx     # 0x14e88a
movl $0x9d, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xbe592