// File: /workspace/github_cpp_makefile_star2_O3/pawan231[P]MiniDataBase/include/BPtree.h
// Function: BPtree::BPtree(char*)
BPtree(char table_name[])
    {
        strcpy(tablename,table_name);
        char *str;
        str = (char *) malloc(sizeof(char) * BPTREE_MAX_FILE_PATH_SIZE);
        sprintf(str, "mkdir -p table/%s/tree", tablename);
        system(str);
        sprintf(str, "table/%s/tree/meta_tree.dat", tablename);

        std::ifstream in_file(str, std::ifstream::in | std::ifstream::binary);
        if (!in_file)
        {
            /* If no meta data for table's BTree is found i.e.,
               It is new table. Then Create new meta data */
            std::ofstream out_file(str, std::ofstream::binary |
                                   std::ofstream::out | std::ofstream::trunc);
            if (!out_file)
            {
                printf("Critical Error : Unable to Write on Disk !!");
                printf("\nAborting ... ... \n");
                abort();
            }
            files_till_now = root_num = 0;
            out_file.write((char *) (&files_till_now), sizeof(files_till_now));
            out_file.write((char *) (&root_num), sizeof(root_num));
            //out_file << files_till_now << " " << root_num;
            out_file.close();
            Btreenode root(true);
            root.set_next(-1);
            write_node(0, root);
        }
        else
        {
            /* Read old Meta Data */
            in_file >> files_till_now >> root_num;
            in_file.close();
        }
        free(str);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x490, %rsp            # imm = 0x490
movq %rdi, %r14
leaq 0x8(%rdi), %r15
movq %r15, %rdi
callq 0x2180
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x2250
movq %rax, %rbx
leaq 0x17ee(%rip), %rsi      # 0x691d
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2040
movq %rbx, %rdi
callq 0x2140
leaq 0x1785(%rip), %rsi      # 0x68d0
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2040
leaq 0x288(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movl $0xc, %edx
callq 0x2360
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x2a8(%rsp,%rax)
je 0x5295
leaq 0x88(%rsp), %rdi
movq %rbx, %rsi
movl $0x34, %edx
callq 0x21c0
movq 0x88(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xa8(%rsp,%rax)
jne 0x52e3
movq $0x0, (%r14)
leaq 0x88(%rsp), %rdi
movl $0x4, %edx
movq %r14, %rsi
callq 0x2240
leaq 0x4(%r14), %rsi
leaq 0x88(%rsp), %rdi
movl $0x4, %edx
callq 0x2240
leaq 0x88(%rsp), %rdi
callq 0x2270
leaq 0x50(%rsp), %rsi
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsi)
movups %xmm0, 0x10(%rsi)
movups %xmm0, (%rsi)
movb $0x1, %al
movb %al, -0x8(%rsi)
movl $0xffffffff, 0x30(%rsi) # imm = 0xFFFFFFFF
leaq 0x10(%rsp), %rdi
movb %al, -0x8(%rdi)
callq 0x5862
leaq 0x28(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x5862
movl 0x80(%rsp), %eax
leaq 0x8(%rsp), %rdx
movl %eax, 0x38(%rdx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x4d02
leaq 0x8(%rsp), %rdi
callq 0x4c04
leaq 0x48(%rsp), %rdi
callq 0x4c04
movq 0x3d5e(%rip), %rax      # 0x8fc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x90(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x88(%rsp,%rcx)
callq 0x2130
leaq 0x180(%rsp), %rdi
callq 0x2080
jmp 0x52c1
leaq 0x288(%rsp), %rdi
movq %r14, %rsi
callq 0x2100
addq $0x4, %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x2100
leaq 0x288(%rsp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2210
leaq 0x288(%rsp), %rdi
callq 0x2060
addq $0x490, %rsp            # imm = 0x490
popq %rbx
popq %r14
popq %r15
retq
leaq 0x164a(%rip), %rdi      # 0x6934
xorl %eax, %eax
callq 0x2030
leaq 0x17da(%rip), %rdi      # 0x6ad2
callq 0x22d0
callq 0x20f0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4c04
jmp 0x5330
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5330
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
jmp 0x5330
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x4c04
jmp 0x5346
jmp 0x533e
movq %rax, %rbx
jmp 0x5353
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x22a0
leaq 0x288(%rsp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2340