// File: /workspace/github_cpp_makefile_star2_O2/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 0x2170
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x2240
movq %rax, %rbx
leaq 0x233c(%rip), %rsi      # 0x691d
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2040
movq %rbx, %rdi
callq 0x2130
leaq 0x22d3(%rip), %rsi      # 0x68d0
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2040
leaq 0x288(%rsp), %r15
pushq $0xc
popq %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2340
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x2a8(%rsp,%rax)
je 0x46f1
leaq 0x88(%rsp), %rdi
pushq $0x34
popq %rdx
movq %rbx, %rsi
callq 0x21c0
movq 0x88(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xa8(%rsp,%rax)
jne 0x473f
andq $0x0, (%r14)
leaq 0x88(%rsp), %rdi
pushq $0x4
popq %rdx
movq %r14, %rsi
callq 0x2230
leaq 0x4(%r14), %rsi
leaq 0x88(%rsp), %rdi
pushq $0x4
popq %rdx
callq 0x2230
leaq 0x88(%rsp), %rdi
callq 0x2260
xorps %xmm0, %xmm0
leaq 0x48(%rsp), %rsi
movups %xmm0, 0x28(%rsi)
movups %xmm0, 0x18(%rsi)
movups %xmm0, 0x8(%rsi)
movb $0x1, (%rsi)
orl $-0x1, 0x38(%rsi)
leaq 0x8(%rsp), %rdi
callq 0x4296
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x41fc
leaq 0x8(%rsp), %rdi
callq 0x4142
leaq 0x48(%rsp), %rdi
callq 0x4142
leaq 0x88(%rsp), %rdi
callq 0x2290
jmp 0x471d
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 0x2200
leaq 0x288(%rsp), %rdi
callq 0x2060
addq $0x490, %rsp            # imm = 0x490
popq %rbx
popq %r14
popq %r15
retq
leaq 0x21ee(%rip), %rdi      # 0x6934
xorl %eax, %eax
callq 0x2030
leaq 0x237e(%rip), %rdi      # 0x6ad2
callq 0x22c0
callq 0x20f0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4142
jmp 0x4770
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x4142
jmp 0x4786
jmp 0x477e
movq %rax, %rbx
jmp 0x4793
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x2290
leaq 0x288(%rsp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2320