// File: Konano[P]UselessDatabase/Index.cpp
// Function: Index::debug(int)
void Index::debug(int now) {
    BtreeNode* node = convert_buf_to_BtreeNode(now);
    cout << "node " << node->index << " fa " << node->fa_index << " isleaf " << node->is_leaf <<endl;
    cout << node->record_cnt << endl;
    printf("val:\n");
    for (auto a: node->record) {
        cout << a.record_id << " " <<*a.key[0].anyCast<int>() << endl;
    }
    printf("son:\n");
    for (auto a: node->child) {
        cout << a << endl;
    }
    for (auto a: node->child) {
        if (a >= 0) debug(a);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
movl -0xc(%rbp), %esi
callq 0x36fd0
movq %rax, -0x18(%rbp)
movq 0x7a2b8(%rip), %rdi     # 0xb0fb8
leaq 0x4cbd1(%rip), %rsi     # 0x838d8
callq 0x6480
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x18(%rax), %esi
callq 0x6870
movq %rax, %rdi
leaq 0x4cbb9(%rip), %rsi     # 0x838de
callq 0x6480
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x6c(%rax), %esi
callq 0x6870
movq %rax, %rdi
leaq 0x4cba0(%rip), %rsi     # 0x838e3
callq 0x6480
movq %rax, %rdi
movq -0x18(%rbp), %rax
movb 0x68(%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x68b0
movq %rax, %rdi
movq 0x7a222(%rip), %rsi     # 0xb0f88
callq 0x64f0
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %esi
movq 0x7a23f(%rip), %rdi     # 0xb0fb8
callq 0x6870
movq %rax, %rdi
movq 0x7a200(%rip), %rsi     # 0xb0f88
callq 0x64f0
leaq 0x4cb58(%rip), %rdi     # 0x838ec
movb $0x0, %al
callq 0x6090
movq -0x18(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3d460
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3d490
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3d4c0
testb $0x1, %al
jne 0x36dd7
jmp 0x36ead
leaq -0x28(%rbp), %rdi
callq 0x3d500
movq %rax, %rsi
leaq -0x50(%rbp), %rdi
callq 0x3d520
movl -0x50(%rbp), %esi
movq 0x7a1c2(%rip), %rdi     # 0xb0fb8
callq 0x6870
movq %rax, -0xb0(%rbp)
jmp 0x36e04
movq -0xb0(%rbp), %rdi
leaq 0x4b4dd(%rip), %rsi     # 0x822ef
callq 0x6480
movq %rax, -0xb8(%rbp)
jmp 0x36e20
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
callq 0xc8f0
movq %rax, -0xc0(%rbp)
jmp 0x36e34
movq -0xc0(%rbp), %rdi
callq 0x10b40
movq %rax, -0xc8(%rbp)
jmp 0x36e49
movq -0xb8(%rbp), %rdi
movq -0xc8(%rbp), %rax
movl (%rax), %esi
callq 0x6870
movq %rax, -0xd0(%rbp)
jmp 0x36e67
movq -0xd0(%rbp), %rdi
movq 0x7a113(%rip), %rsi     # 0xb0f88
callq 0x64f0
jmp 0x36e7c
leaq -0x50(%rbp), %rdi
callq 0x3d560
leaq -0x28(%rbp), %rdi
callq 0x3d580
jmp 0x36dc1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3d560
jmp 0x36fc1
leaq 0x4ca3e(%rip), %rdi     # 0x838f2
movb $0x0, %al
callq 0x6090
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
callq 0xd0f0
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rdi
callq 0xd120
movq %rax, -0x78(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xd150
testb $0x1, %al
jne 0x36ef4
jmp 0x36f2b
leaq -0x70(%rbp), %rdi
callq 0xd190
movl (%rax), %eax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %esi
movq 0x7a0ac(%rip), %rdi     # 0xb0fb8
callq 0x6870
movq %rax, %rdi
movq 0x7a06d(%rip), %rsi     # 0xb0f88
callq 0x64f0
leaq -0x70(%rbp), %rdi
callq 0xd1b0
jmp 0x36ee1
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0xd0f0
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
callq 0xd120
movq %rax, -0x98(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0xd150
testb $0x1, %al
jne 0x36f79
jmp 0x36fb8
leaq -0x90(%rbp), %rdi
callq 0xd190
movl (%rax), %eax
movl %eax, -0x9c(%rbp)
cmpl $0x0, -0x9c(%rbp)
jl 0x36fa8
movq -0xa8(%rbp), %rdi
movl -0x9c(%rbp), %esi
callq 0x36cd0
jmp 0x36faa
leaq -0x90(%rbp), %rdi
callq 0xd1b0
jmp 0x36f60
addq $0xd0, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x6890
nopw (%rax,%rax)