// File: /workspace/github_c_makefile_star2_O1/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, 0x7ba59(%rip)     # 0x1aa370
je 0x12e93a
leaq 0x2afe2(%rip), %rdi     # 0x159902
leaq 0x2ae78(%rip), %rsi     # 0x15979f
leaq 0x2affc(%rip), %rcx     # 0x15992a
movl $0x37d, %edx            # imm = 0x37D
xorl %eax, %eax
callq 0xc80f6
cmpq $0x0, 0x7ba36(%rip)     # 0x1aa378
je 0x12e965
leaq 0x2afb7(%rip), %rdi     # 0x159902
leaq 0x2ae4d(%rip), %rsi     # 0x15979f
leaq 0x2afd1(%rip), %rcx     # 0x15992a
movl $0x37e, %edx            # imm = 0x37E
xorl %eax, %eax
callq 0xc80f6
cmpq $0x0, 0x7ba13(%rip)     # 0x1aa380
je 0x12e990
leaq 0x2af8c(%rip), %rdi     # 0x159902
leaq 0x2ae22(%rip), %rsi     # 0x15979f
leaq 0x2afa6(%rip), %rcx     # 0x15992a
movl $0x37f, %edx            # imm = 0x37F
xorl %eax, %eax
callq 0xc80f6
cmpq $0x0, 0x7b9f0(%rip)     # 0x1aa388
je 0x12e9bb
leaq 0x2af61(%rip), %rdi     # 0x159902
leaq 0x2adf7(%rip), %rsi     # 0x15979f
leaq 0x2af7b(%rip), %rcx     # 0x15992a
movl $0x380, %edx            # imm = 0x380
xorl %eax, %eax
callq 0xc80f6
cmpq $0x0, 0x7b9cd(%rip)     # 0x1aa390
je 0x12e9e6
leaq 0x2af36(%rip), %rdi     # 0x159902
leaq 0x2adcc(%rip), %rsi     # 0x15979f
leaq 0x2af50(%rip), %rcx     # 0x15992a
movl $0x381, %edx            # imm = 0x381
xorl %eax, %eax
callq 0xc80f6
cmpq $0x0, 0x7b9aa(%rip)     # 0x1aa398
je 0x12ea11
leaq 0x2af0b(%rip), %rdi     # 0x159902
leaq 0x2ada1(%rip), %rsi     # 0x15979f
leaq 0x2af25(%rip), %rcx     # 0x15992a
movl $0x382, %edx            # imm = 0x382
xorl %eax, %eax
callq 0xc80f6
cmpq $0x0, 0x7b987(%rip)     # 0x1aa3a0
je 0x12ea3c
leaq 0x2aee0(%rip), %rdi     # 0x159902
leaq 0x2ad76(%rip), %rsi     # 0x15979f
leaq 0x2aefa(%rip), %rcx     # 0x15992a
movl $0x383, %edx            # imm = 0x383
xorl %eax, %eax
callq 0xc80f6
cmpq $0x0, 0x7b964(%rip)     # 0x1aa3a8
je 0x12ea67
leaq 0x2aeb5(%rip), %rdi     # 0x159902
leaq 0x2ad4b(%rip), %rsi     # 0x15979f
leaq 0x2aecf(%rip), %rcx     # 0x15992a
movl $0x384, %edx            # imm = 0x384
xorl %eax, %eax
callq 0xc80f6
testq %rbx, %rbx
je 0x12ed43
cmpq $0x0, 0x30(%rbx)
jne 0x12ea98
leaq 0x2ae84(%rip), %rdi     # 0x159902
leaq 0x2ad1a(%rip), %rsi     # 0x15979f
leaq 0x2ad49(%rip), %rcx     # 0x1597d5
movl $0x387, %edx            # imm = 0x387
xorl %eax, %eax
callq 0xc80f6
cmpq $0x0, 0x28(%rbx)
jne 0x12eac0
leaq 0x2ae5c(%rip), %rdi     # 0x159902
leaq 0x2acf2(%rip), %rsi     # 0x15979f
leaq 0x2ad2c(%rip), %rcx     # 0x1597e0
movl $0x388, %edx            # imm = 0x388
xorl %eax, %eax
callq 0xc80f6
movq 0x30(%rbx), %rax
testq %rax, %rax
sete %cl
leaq 0x7b89f(%rip), %r14     # 0x1aa370
cmpq %r14, %rax
sete %al
orb %cl, %al
jne 0x12ec17
movq 0x28(%rbx), %rax
cmpq %rbx, 0x20(%rax)
je 0x12eb0a
leaq 0x2ae12(%rip), %rdi     # 0x159902
leaq 0x2aca8(%rip), %rsi     # 0x15979f
leaq 0x2acef(%rip), %rcx     # 0x1597ed
movl $0x38b, %edx            # imm = 0x38B
xorl %eax, %eax
callq 0xc80f6
movq 0x30(%rbx), %rax
cmpq %rbx, 0x20(%rax)
je 0x12eb35
leaq 0x2ade7(%rip), %rdi     # 0x159902
leaq 0x2ac7d(%rip), %rsi     # 0x15979f
leaq 0x2acdc(%rip), %rcx     # 0x159805
movl $0x38c, %edx            # imm = 0x38C
xorl %eax, %eax
callq 0xc80f6
movq 0x28(%rbx), %rdi
callq 0x12e908
movq 0x30(%rbx), %rdi
callq 0x12e908
movq (%rbx), %r8
movq 0x28(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
ja 0x12eb77
leaq 0x2ada5(%rip), %rdi     # 0x159902
leaq 0x2ac3b(%rip), %rsi     # 0x15979f
leaq 0x2acb2(%rip), %rcx     # 0x15981d
movl $0x38f, %edx            # imm = 0x38F
xorl %eax, %eax
callq 0xc80f6
movq 0x28(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0x12ebaf
movq (%rbx), %r8
movq 0x10(%rax), %r9
cmpq %r9, %r8
ja 0x12ebaf
leaq 0x2ad6d(%rip), %rdi     # 0x159902
leaq 0x2ac03(%rip), %rsi     # 0x15979f
leaq 0x2ac7a(%rip), %rcx     # 0x15981d
movl $0x390, %edx            # imm = 0x390
xorl %eax, %eax
callq 0xc80f6
movq (%rbx), %r8
movq 0x30(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
jb 0x12ebdf
leaq 0x2ad3d(%rip), %rdi     # 0x159902
leaq 0x2abd3(%rip), %rsi     # 0x15979f
leaq 0x2ac57(%rip), %rcx     # 0x15982a
movl $0x391, %edx            # imm = 0x391
xorl %eax, %eax
callq 0xc80f6
movq 0x30(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0x12ec17
movq (%rbx), %r8
movq 0x10(%rax), %r9
cmpq %r9, %r8
jb 0x12ec17
leaq 0x2ad05(%rip), %rdi     # 0x159902
leaq 0x2ab9b(%rip), %rsi     # 0x15979f
leaq 0x2ac1f(%rip), %rcx     # 0x15982a
movl $0x392, %edx            # imm = 0x392
xorl %eax, %eax
callq 0xc80f6
movq 0x38(%rbx), %rax
testq %rax, %rax
sete %cl
cmpq %r14, %rax
sete %al
orb %cl, %al
jne 0x12ed43
movq (%rbx), %r8
movq 0x10(%rbx), %r9
cmpq %r9, %r8
jb 0x12ec5c
leaq 0x2acc0(%rip), %rdi     # 0x159902
leaq 0x2ab56(%rip), %rsi     # 0x15979f
leaq 0x2abda(%rip), %rcx     # 0x15982a
movl $0x396, %edx            # imm = 0x396
xorl %eax, %eax
callq 0xc80f6
movq 0x38(%rbx), %rax
cmpq %rbx, 0x20(%rax)
je 0x12ec87
leaq 0x2ac95(%rip), %rdi     # 0x159902
leaq 0x2ab2b(%rip), %rsi     # 0x15979f
leaq 0x2abbc(%rip), %rcx     # 0x159837
movl $0x397, %edx            # imm = 0x397
xorl %eax, %eax
callq 0xc80f6
movq 0x38(%rbx), %rdi
callq 0x12e908
movq 0x10(%rbx), %r8
movq 0x30(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
ja 0x12ecc1
leaq 0x2ac5b(%rip), %rdi     # 0x159902
leaq 0x2aaf1(%rip), %rsi     # 0x15979f
leaq 0x2ab68(%rip), %rcx     # 0x15981d
movl $0x399, %edx            # imm = 0x399
xorl %eax, %eax
callq 0xc80f6
movq 0x30(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0x12ecfa
movq 0x10(%rbx), %r8
movq 0x10(%rax), %r9
cmpq %r9, %r8
ja 0x12ecfa
leaq 0x2ac22(%rip), %rdi     # 0x159902
leaq 0x2aab8(%rip), %rsi     # 0x15979f
leaq 0x2ab2f(%rip), %rcx     # 0x15981d
movl $0x39a, %edx            # imm = 0x39A
xorl %eax, %eax
callq 0xc80f6
movq 0x10(%rbx), %r8
movq 0x38(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
jb 0x12ed2b
leaq 0x2abf1(%rip), %rdi     # 0x159902
leaq 0x2aa87(%rip), %rsi     # 0x15979f
leaq 0x2ab0b(%rip), %rcx     # 0x15982a
movl $0x39b, %edx            # imm = 0x39B
xorl %eax, %eax
callq 0xc80f6
movq 0x38(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0x12ed43
movq 0x10(%rbx), %r8
movq 0x10(%rax), %r9
cmpq %r9, %r8
jae 0x12ed4b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2abb0(%rip), %rdi     # 0x159902
leaq 0x2aa46(%rip), %rsi     # 0x15979f
leaq 0x2aaca(%rip), %rcx     # 0x15982a
movl $0x39c, %edx            # imm = 0x39C
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc80f6