// File: zimpha[P]MiniSQL/global.cc
// Function: Table::write()
void Table::write() {
    std::ofstream fout((name).c_str());
    fout << name << std::endl;
    fout << entrySize << std::endl;
    fout << attributes.size() << std::endl;
    fout << blockCount << std::endl;
    for (size_t i = 0; i < attributes.size(); ++ i) {
        fout << attributes[i].name << std::endl;
        fout << attributes[i].type << std::endl;
        fout << attributes[i].length << std::endl;
        fout << attributes[i].unique << std::endl;
        fout << attributes[i].indices.size() << std::endl;
        std::set<std::string> &indices = attributes[i].indices;
        for (auto &x : indices) {
            fout << x << std::endl;
        }
        fout << std::endl;
    }
    fout.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2c0, %rsp            # imm = 0x2C0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x268(%rbp)
addq $0x8, %rdi
movq %rdi, -0x258(%rbp)
callq 0x3120
movq %rax, %rsi
leaq -0x208(%rbp), %rdi
movq %rdi, -0x260(%rbp)
movl $0x10, %edx
callq 0x3330
movq -0x260(%rbp), %rdi
movq -0x258(%rbp), %rsi
callq 0x3280
movq %rax, -0x250(%rbp)
jmp 0x24121
movq -0x250(%rbp), %rdi
movq 0x14e79(%rip), %rsi     # 0x38fa8
callq 0x3310
jmp 0x24136
movq -0x268(%rbp), %rax
movl (%rax), %esi
leaq -0x208(%rbp), %rdi
callq 0x34e0
movq %rax, -0x270(%rbp)
jmp 0x24154
movq -0x270(%rbp), %rdi
movq 0x14e46(%rip), %rsi     # 0x38fa8
callq 0x3310
jmp 0x24169
movq -0x268(%rbp), %rdi
addq $0x28, %rdi
callq 0x7750
movq %rax, %rsi
leaq -0x208(%rbp), %rdi
callq 0x30b0
movq %rax, -0x278(%rbp)
jmp 0x24191
movq -0x278(%rbp), %rdi
movq 0x14e09(%rip), %rsi     # 0x38fa8
callq 0x3310
jmp 0x241a6
movq -0x268(%rbp), %rax
movl 0x40(%rax), %esi
leaq -0x208(%rbp), %rdi
callq 0x34e0
movq %rax, -0x280(%rbp)
jmp 0x241c5
movq -0x280(%rbp), %rdi
movq 0x14dd5(%rip), %rsi     # 0x38fa8
callq 0x3310
jmp 0x241da
movq $0x0, -0x220(%rbp)
movq -0x268(%rbp), %rdi
movq -0x220(%rbp), %rax
movq %rax, -0x288(%rbp)
addq $0x28, %rdi
callq 0x7750
movq %rax, %rcx
movq -0x288(%rbp), %rax
cmpq %rcx, %rax
jae 0x2448b
movq -0x268(%rbp), %rdi
addq $0x28, %rdi
movq -0x220(%rbp), %rsi
callq 0x7810
movq %rax, %rsi
leaq -0x208(%rbp), %rdi
callq 0x3280
movq %rax, -0x290(%rbp)
jmp 0x24245
movq -0x290(%rbp), %rdi
movq 0x14d55(%rip), %rsi     # 0x38fa8
callq 0x3310
jmp 0x2425a
movq -0x268(%rbp), %rdi
addq $0x28, %rdi
movq -0x220(%rbp), %rsi
callq 0x7810
movl 0x20(%rax), %esi
leaq -0x208(%rbp), %rdi
callq 0x34e0
movq %rax, -0x298(%rbp)
jmp 0x24289
movq -0x298(%rbp), %rdi
movq 0x14d11(%rip), %rsi     # 0x38fa8
callq 0x3310
jmp 0x2429e
movq -0x268(%rbp), %rdi
addq $0x28, %rdi
movq -0x220(%rbp), %rsi
callq 0x7810
movl 0x24(%rax), %esi
leaq -0x208(%rbp), %rdi
callq 0x34e0
movq %rax, -0x2a0(%rbp)
jmp 0x242cd
movq -0x2a0(%rbp), %rdi
movq 0x14ccd(%rip), %rsi     # 0x38fa8
callq 0x3310
jmp 0x242e2
movq -0x268(%rbp), %rdi
addq $0x28, %rdi
movq -0x220(%rbp), %rsi
callq 0x7810
movzbl 0x28(%rax), %esi
andl $0x1, %esi
leaq -0x208(%rbp), %rdi
callq 0x3510
movq %rax, -0x2a8(%rbp)
jmp 0x24315
movq -0x2a8(%rbp), %rdi
movq 0x14c85(%rip), %rsi     # 0x38fa8
callq 0x3310
jmp 0x2432a
movq -0x268(%rbp), %rdi
addq $0x28, %rdi
movq -0x220(%rbp), %rsi
callq 0x7810
movq %rax, %rdi
addq $0x30, %rdi
callq 0x7880
movq %rax, %rsi
leaq -0x208(%rbp), %rdi
callq 0x30b0
movq %rax, -0x2b0(%rbp)
jmp 0x24365
movq -0x2b0(%rbp), %rdi
movq 0x14c35(%rip), %rsi     # 0x38fa8
callq 0x3310
jmp 0x2437a
movq -0x268(%rbp), %rdi
addq $0x28, %rdi
movq -0x220(%rbp), %rsi
callq 0x7810
addq $0x30, %rax
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rdi
callq 0x1c060
movq %rax, -0x238(%rbp)
movq -0x230(%rbp), %rdi
callq 0x1c090
movq %rax, -0x240(%rbp)
leaq -0x238(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0xc8c0
testb $0x1, %al
jne 0x243e9
jmp 0x2445d
leaq -0x238(%rbp), %rdi
callq 0x1c0c0
movq %rax, -0x248(%rbp)
movq -0x248(%rbp), %rsi
leaq -0x208(%rbp), %rdi
callq 0x3280
movq %rax, -0x2b8(%rbp)
jmp 0x24418
movq -0x2b8(%rbp), %rdi
movq 0x14b82(%rip), %rsi     # 0x38fa8
callq 0x3310
jmp 0x2442d
jmp 0x2442f
leaq -0x238(%rbp), %rdi
callq 0x1c0e0
jmp 0x243d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x3440
jmp 0x244ae
movq 0x14b44(%rip), %rsi     # 0x38fa8
leaq -0x208(%rbp), %rdi
callq 0x3310
jmp 0x24472
jmp 0x24474
movq -0x220(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x220(%rbp)
jmp 0x241e5
leaq -0x208(%rbp), %rdi
callq 0x3420
jmp 0x24499
leaq -0x208(%rbp), %rdi
callq 0x3440
addq $0x2c0, %rsp            # imm = 0x2C0
popq %rbp
retq
movq -0x210(%rbp), %rdi
callq 0x34f0
nopw (%rax,%rax)