// File: zimpha[P]MiniSQL/CatalogManager.cc
// Function: CatalogManager::loadTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Table CatalogManager::loadTable(const std::string &tableName) {
    assert(hasTable(tableName));
    Table nt;
    int attrSum;
    std::ifstream fin((tableName).c_str());
    fin >> nt.name >> nt.entrySize >> attrSum >> nt.blockCount;
    for (int i = 0, n; i < attrSum; ++ i) {
        AttrType attr;
        fin >> attr.name >> attr.type >> attr.length >> attr.unique;
        fin >> n;
        for (int j = 0; j < n; ++ j) {
            std::string index;
            fin >> index;
            attr.indices.insert(index);
        }
        nt.attributes.push_back(attr);
    }
    return nt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x340, %rsp            # imm = 0x340
movq %rdi, -0x2e8(%rbp)
movq %rdi, %rax
movq %rax, -0x2e0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1b550
testb $0x1, %al
jne 0x1b78b
jmp 0x1b78d
jmp 0x1b7ac
leaq 0xbc17(%rip), %rdi      # 0x273ab
leaq 0xbc24(%rip), %rsi      # 0x273bf
movl $0x1e, %edx
leaq 0xbc80(%rip), %rcx      # 0x27427
callq 0x31f0
movq -0x2e8(%rbp), %rdi
movb $0x0, -0x19(%rbp)
callq 0x23f20
movq -0x18(%rbp), %rdi
callq 0x3120
movq %rax, %rsi
leaq -0x228(%rbp), %rdi
movl $0x8, %edx
callq 0x3540
jmp 0x1b7db
movq -0x2e8(%rbp), %rsi
addq $0x8, %rsi
leaq -0x228(%rbp), %rdi
callq 0x33a0
movq %rax, -0x2f0(%rbp)
jmp 0x1b7fb
movq -0x2e8(%rbp), %rsi
movq -0x2f0(%rbp), %rdi
callq 0x31c0
movq %rax, -0x2f8(%rbp)
jmp 0x1b817
movq -0x2f8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x31c0
movq %rax, -0x300(%rbp)
jmp 0x1b830
movq -0x300(%rbp), %rdi
movq -0x2e8(%rbp), %rsi
addq $0x40, %rsi
callq 0x31c0
jmp 0x1b849
movl $0x0, -0x238(%rbp)
movl -0x238(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x1ba3c
leaq -0x2a0(%rbp), %rdi
movq %rdi, -0x310(%rbp)
callq 0x1bfc0
movq -0x310(%rbp), %rsi
leaq -0x228(%rbp), %rdi
callq 0x33a0
movq %rax, -0x308(%rbp)
jmp 0x1b891
movq -0x308(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x31c0
movq %rax, -0x318(%rbp)
jmp 0x1b8ad
movq -0x318(%rbp), %rdi
leaq -0x27c(%rbp), %rsi
callq 0x31c0
movq %rax, -0x320(%rbp)
jmp 0x1b8c9
movq -0x320(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0x3260
jmp 0x1b8de
leaq -0x228(%rbp), %rdi
leaq -0x23c(%rbp), %rsi
callq 0x31c0
jmp 0x1b8f3
movl $0x0, -0x2a4(%rbp)
movl -0x2a4(%rbp), %eax
cmpl -0x23c(%rbp), %eax
jge 0x1b9f5
leaq -0x2c8(%rbp), %rdi
movq %rdi, -0x328(%rbp)
callq 0x3410
movq -0x328(%rbp), %rsi
leaq -0x228(%rbp), %rdi
callq 0x33a0
jmp 0x1b937
leaq -0x270(%rbp), %rdi
leaq -0x2c8(%rbp), %rsi
callq 0x7830
movb %dl, -0x331(%rbp)
movq %rax, -0x330(%rbp)
jmp 0x1b959
movb -0x331(%rbp), %al
movq -0x330(%rbp), %rcx
movq %rcx, -0x2d8(%rbp)
movb %al, -0x2d0(%rbp)
leaq -0x2c8(%rbp), %rdi
callq 0x35b8
movl -0x2a4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2a4(%rbp)
jmp 0x1b8fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x230(%rbp)
movl %eax, -0x234(%rbp)
jmp 0x1ba7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x230(%rbp)
movl %eax, -0x234(%rbp)
jmp 0x1ba54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x230(%rbp)
movl %eax, -0x234(%rbp)
jmp 0x1ba2e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x230(%rbp)
movl %eax, -0x234(%rbp)
leaq -0x2c8(%rbp), %rdi
callq 0x35b8
jmp 0x1ba2e
movq -0x2e8(%rbp), %rdi
addq $0x28, %rdi
leaq -0x2a0(%rbp), %rsi
callq 0x1bff0
jmp 0x1ba0e
leaq -0x2a0(%rbp), %rdi
callq 0x9fd0
movl -0x238(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x238(%rbp)
jmp 0x1b853
leaq -0x2a0(%rbp), %rdi
callq 0x9fd0
jmp 0x1ba54
movb $0x1, -0x19(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x30d0
testb $0x1, -0x19(%rbp)
jne 0x1ba6e
jmp 0x1ba62
leaq -0x228(%rbp), %rdi
callq 0x30d0
jmp 0x1ba7e
movq -0x2e8(%rbp), %rdi
callq 0x7920
movq -0x2e0(%rbp), %rax
addq $0x340, %rsp            # imm = 0x340
popq %rbp
retq
movq -0x2e8(%rbp), %rdi
callq 0x7920
movq -0x230(%rbp), %rdi
callq 0x34f0
nopw %cs:(%rax,%rax)