// File: /workspace/github_c_makefile_star2_O1/johsteffens[P]beth/lib/bcore/bcore_btree.c
// Function: bcore_btree_node_vd_s_check_consistency
void bcore_btree_node_vd_s_check_consistency( bcore_btree_node_vd_s* o )
{
    if( bcore_btree_node_vd_s_null_g.kv1.key != 0    ) ERR( "bcore_btree_node_vd_s_null was modified" );
    if( bcore_btree_node_vd_s_null_g.kv2.key != 0    ) ERR( "bcore_btree_node_vd_s_null was modified" );
    if( bcore_btree_node_vd_s_null_g.parent  != NULL ) ERR( "bcore_btree_node_vd_s_null was modified" );
    if( bcore_btree_node_vd_s_null_g.child0  != NULL ) ERR( "bcore_btree_node_vd_s_null was modified" );
    if( bcore_btree_node_vd_s_null_g.child1  != NULL ) ERR( "bcore_btree_node_vd_s_null was modified" );
    if( bcore_btree_node_vd_s_null_g.child2  != NULL ) ERR( "bcore_btree_node_vd_s_null was modified" );

    if( !o ) return;
    if( bcore_btree_node_vd_s_is_empty( o ) ) ERR( "empty node" );
    if( o->child0 == NULL )       ERR( "deleted leaf" );
    if( o->child1 && o->child1 != BNUL_VP )
    {
        if( o != o->child0->parent ) ERR( "child0 incorrect parent" );
        if( o != o->child1->parent ) ERR( "child1 incorrect parent" );
        bcore_btree_node_vd_s_check_consistency( o->child0 );
        bcore_btree_node_vd_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_VP )
    {
        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_vd_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, 0x791f3(%rip)     # 0x1aa3f0
je 0x131220
leaq 0x28815(%rip), %rdi     # 0x159a1b
leaq 0x28592(%rip), %rsi     # 0x15979f
leaq 0x2882f(%rip), %rcx     # 0x159a43
movl $0x9ca, %edx            # imm = 0x9CA
xorl %eax, %eax
callq 0xc80f6
cmpq $0x0, 0x791d0(%rip)     # 0x1aa3f8
je 0x13124b
leaq 0x287ea(%rip), %rdi     # 0x159a1b
leaq 0x28567(%rip), %rsi     # 0x15979f
leaq 0x28804(%rip), %rcx     # 0x159a43
movl $0x9cb, %edx            # imm = 0x9CB
xorl %eax, %eax
callq 0xc80f6
cmpq $0x0, 0x791ad(%rip)     # 0x1aa400
je 0x131276
leaq 0x287bf(%rip), %rdi     # 0x159a1b
leaq 0x2853c(%rip), %rsi     # 0x15979f
leaq 0x287d9(%rip), %rcx     # 0x159a43
movl $0x9cc, %edx            # imm = 0x9CC
xorl %eax, %eax
callq 0xc80f6
cmpq $0x0, 0x7918a(%rip)     # 0x1aa408
je 0x1312a1
leaq 0x28794(%rip), %rdi     # 0x159a1b
leaq 0x28511(%rip), %rsi     # 0x15979f
leaq 0x287ae(%rip), %rcx     # 0x159a43
movl $0x9cd, %edx            # imm = 0x9CD
xorl %eax, %eax
callq 0xc80f6
cmpq $0x0, 0x79167(%rip)     # 0x1aa410
je 0x1312cc
leaq 0x28769(%rip), %rdi     # 0x159a1b
leaq 0x284e6(%rip), %rsi     # 0x15979f
leaq 0x28783(%rip), %rcx     # 0x159a43
movl $0x9ce, %edx            # imm = 0x9CE
xorl %eax, %eax
callq 0xc80f6
cmpq $0x0, 0x79144(%rip)     # 0x1aa418
je 0x1312f7
leaq 0x2873e(%rip), %rdi     # 0x159a1b
leaq 0x284bb(%rip), %rsi     # 0x15979f
leaq 0x28758(%rip), %rcx     # 0x159a43
movl $0x9cf, %edx            # imm = 0x9CF
xorl %eax, %eax
callq 0xc80f6
testq %rbx, %rbx
je 0x1315d3
cmpq $0x0, 0x20(%rbx)
jne 0x131328
leaq 0x2870d(%rip), %rdi     # 0x159a1b
leaq 0x2848a(%rip), %rsi     # 0x15979f
leaq 0x284b9(%rip), %rcx     # 0x1597d5
movl $0x9d2, %edx            # imm = 0x9D2
xorl %eax, %eax
callq 0xc80f6
cmpq $0x0, 0x18(%rbx)
jne 0x131350
leaq 0x286e5(%rip), %rdi     # 0x159a1b
leaq 0x28462(%rip), %rsi     # 0x15979f
leaq 0x2849c(%rip), %rcx     # 0x1597e0
movl $0x9d3, %edx            # imm = 0x9D3
xorl %eax, %eax
callq 0xc80f6
movq 0x20(%rbx), %rax
testq %rax, %rax
sete %cl
leaq 0x7908f(%rip), %r14     # 0x1aa3f0
cmpq %r14, %rax
sete %al
orb %cl, %al
jne 0x1314a7
movq 0x18(%rbx), %rax
cmpq %rbx, 0x10(%rax)
je 0x13139a
leaq 0x2869b(%rip), %rdi     # 0x159a1b
leaq 0x28418(%rip), %rsi     # 0x15979f
leaq 0x2845f(%rip), %rcx     # 0x1597ed
movl $0x9d6, %edx            # imm = 0x9D6
xorl %eax, %eax
callq 0xc80f6
movq 0x20(%rbx), %rax
cmpq %rbx, 0x10(%rax)
je 0x1313c5
leaq 0x28670(%rip), %rdi     # 0x159a1b
leaq 0x283ed(%rip), %rsi     # 0x15979f
leaq 0x2844c(%rip), %rcx     # 0x159805
movl $0x9d7, %edx            # imm = 0x9D7
xorl %eax, %eax
callq 0xc80f6
movq 0x18(%rbx), %rdi
callq 0x1311ee
movq 0x20(%rbx), %rdi
callq 0x1311ee
movq (%rbx), %r8
movq 0x18(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
ja 0x131407
leaq 0x2862e(%rip), %rdi     # 0x159a1b
leaq 0x283ab(%rip), %rsi     # 0x15979f
leaq 0x28422(%rip), %rcx     # 0x15981d
movl $0x9da, %edx            # imm = 0x9DA
xorl %eax, %eax
callq 0xc80f6
movq 0x18(%rbx), %rax
cmpq $0x0, 0x28(%rax)
je 0x13143f
movq (%rbx), %r8
movq 0x8(%rax), %r9
cmpq %r9, %r8
ja 0x13143f
leaq 0x285f6(%rip), %rdi     # 0x159a1b
leaq 0x28373(%rip), %rsi     # 0x15979f
leaq 0x283ea(%rip), %rcx     # 0x15981d
movl $0x9db, %edx            # imm = 0x9DB
xorl %eax, %eax
callq 0xc80f6
movq (%rbx), %r8
movq 0x20(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
jb 0x13146f
leaq 0x285c6(%rip), %rdi     # 0x159a1b
leaq 0x28343(%rip), %rsi     # 0x15979f
leaq 0x283c7(%rip), %rcx     # 0x15982a
movl $0x9dc, %edx            # imm = 0x9DC
xorl %eax, %eax
callq 0xc80f6
movq 0x20(%rbx), %rax
cmpq $0x0, 0x28(%rax)
je 0x1314a7
movq (%rbx), %r8
movq 0x8(%rax), %r9
cmpq %r9, %r8
jb 0x1314a7
leaq 0x2858e(%rip), %rdi     # 0x159a1b
leaq 0x2830b(%rip), %rsi     # 0x15979f
leaq 0x2838f(%rip), %rcx     # 0x15982a
movl $0x9dd, %edx            # imm = 0x9DD
xorl %eax, %eax
callq 0xc80f6
movq 0x28(%rbx), %rax
testq %rax, %rax
sete %cl
cmpq %r14, %rax
sete %al
orb %cl, %al
jne 0x1315d3
movq (%rbx), %r8
movq 0x8(%rbx), %r9
cmpq %r9, %r8
jb 0x1314ec
leaq 0x28549(%rip), %rdi     # 0x159a1b
leaq 0x282c6(%rip), %rsi     # 0x15979f
leaq 0x2834a(%rip), %rcx     # 0x15982a
movl $0x9e1, %edx            # imm = 0x9E1
xorl %eax, %eax
callq 0xc80f6
movq 0x28(%rbx), %rax
cmpq %rbx, 0x10(%rax)
je 0x131517
leaq 0x2851e(%rip), %rdi     # 0x159a1b
leaq 0x2829b(%rip), %rsi     # 0x15979f
leaq 0x2832c(%rip), %rcx     # 0x159837
movl $0x9e2, %edx            # imm = 0x9E2
xorl %eax, %eax
callq 0xc80f6
movq 0x28(%rbx), %rdi
callq 0x1311ee
movq 0x8(%rbx), %r8
movq 0x20(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
ja 0x131551
leaq 0x284e4(%rip), %rdi     # 0x159a1b
leaq 0x28261(%rip), %rsi     # 0x15979f
leaq 0x282d8(%rip), %rcx     # 0x15981d
movl $0x9e4, %edx            # imm = 0x9E4
xorl %eax, %eax
callq 0xc80f6
movq 0x20(%rbx), %rax
cmpq $0x0, 0x28(%rax)
je 0x13158a
movq 0x8(%rbx), %r8
movq 0x8(%rax), %r9
cmpq %r9, %r8
ja 0x13158a
leaq 0x284ab(%rip), %rdi     # 0x159a1b
leaq 0x28228(%rip), %rsi     # 0x15979f
leaq 0x2829f(%rip), %rcx     # 0x15981d
movl $0x9e5, %edx            # imm = 0x9E5
xorl %eax, %eax
callq 0xc80f6
movq 0x8(%rbx), %r8
movq 0x28(%rbx), %rax
movq (%rax), %r9
cmpq %r9, %r8
jb 0x1315bb
leaq 0x2847a(%rip), %rdi     # 0x159a1b
leaq 0x281f7(%rip), %rsi     # 0x15979f
leaq 0x2827b(%rip), %rcx     # 0x15982a
movl $0x9e6, %edx            # imm = 0x9E6
xorl %eax, %eax
callq 0xc80f6
movq 0x28(%rbx), %rax
cmpq $0x0, 0x28(%rax)
je 0x1315d3
movq 0x8(%rbx), %r8
movq 0x8(%rax), %r9
cmpq %r9, %r8
jae 0x1315db
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x28439(%rip), %rdi     # 0x159a1b
leaq 0x281b6(%rip), %rsi     # 0x15979f
leaq 0x2823a(%rip), %rcx     # 0x15982a
movl $0x9e7, %edx            # imm = 0x9E7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc80f6