// File: /workspace/github_cpp_makefile_star2_O2/zimpha[P]MiniSQL/indexManager.cc
// Function: IndexManager::load()
void IndexManager::load() {
    mp.clear();
    if (currentFile.empty()) return;
    FILE *file = fopen(currentFile.c_str(), "rb");
    int n = 0;
    element lhs;
    long rhs;
    fread(&n, sizeof(int), 1, file);
    for (int i = 0; i < n; i++) {
        int type;
        fread(&type, sizeof(type), 1, file);
        if (type == 0) {
            int tmp;
            fread(&tmp, sizeof(tmp), 1, file);
            lhs = element(tmp);
        } else if (type == 1) {
            float tmp;
            fread(&tmp, sizeof(tmp), 1, file);
            lhs = element(tmp);
        } else if (type == 2) {
            string s;
            for (char c;;) {
                fread(&c, sizeof(c), 1, file);
                if (c == 0) break;
                s += c;
            }
            lhs = element(s);
        } else {
            lhs.type = -1;
        }
        fread(&rhs, sizeof(rhs), 1, file);
        mp[lhs] = rhs;
    }
    fclose(file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r14
addq $0x8, %rdi
movq %rdi, -0x60(%rbp)
callq 0xa6ea
cmpq $0x0, 0x40(%r14)
je 0x9bb0
movq 0x38(%r14), %rdi
leaq 0x7873(%rip), %rsi      # 0x1126d
callq 0x3300
movq %rax, %r14
leaq -0x6c(%rbp), %r15
andl $0x0, (%r15)
leaq -0xa0(%rbp), %rdi
callq 0xfafa
pushq $0x4
popq %rsi
pushq $0x1
popq %r13
movq %r15, %rdi
movq %r13, %rdx
movq %r14, %rcx
callq 0x33c0
movl (%r15), %eax
movl %eax, -0x2c(%rbp)
xorl %r12d, %r12d
leaq -0xd0(%rbp), %r15
leaq -0x58(%rbp), %rbx
cmpl -0x2c(%rbp), %r12d
jge 0x9b9c
leaq -0x34(%rbp), %rdi
pushq $0x4
popq %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x33c0
movl -0x34(%rbp), %eax
cmpl $0x2, %eax
movl %r12d, -0x30(%rbp)
je 0x9ad6
cmpl $0x1, %eax
je 0x9a92
testl %eax, %eax
jne 0x9b0f
movq %rbx, %rdi
pushq $0x4
popq %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x33c0
movl -0x58(%rbp), %esi
movq %r15, %rdi
callq 0xfb16
jmp 0x9ab0
movq %rbx, %rdi
pushq $0x4
popq %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x33c0
movss -0x58(%rbp), %xmm0
movq %r15, %rdi
callq 0xfb34
leaq -0xa0(%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa578
leaq -0xc8(%rbp), %rdi
callq 0x34f8
movq %rbx, %r15
jmp 0x9b6b
leaq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
andq $0x0, -0x50(%rbp)
movb $0x0, -0x48(%rbp)
movq %r15, %rdi
movq %r13, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x33c0
movb -0xd0(%rbp), %al
testb %al, %al
je 0x9b1c
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3220
jmp 0x9ae7
orl $-0x1, -0x78(%rbp)
leaq -0xa0(%rbp), %r15
jmp 0x9b6b
movq %rbx, %rsi
leaq -0xf0(%rbp), %rbx
movq %rbx, %rdi
callq 0x3380
movq %r15, %rdi
movq %rbx, %rsi
callq 0xfb80
leaq -0xa0(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xa578
leaq -0xc8(%rbp), %rdi
callq 0x34f8
movq %rbx, %rdi
callq 0x34f8
leaq -0x58(%rbp), %rdi
callq 0x34f8
movq %r12, %r15
leaq -0x68(%rbp), %rdi
pushq $0x8
popq %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x33c0
movq -0x68(%rbp), %rbx
movq -0x60(%rbp), %rdi
movq %r15, %rsi
callq 0xa1ae
movq %rbx, (%rax)
movl -0x30(%rbp), %r12d
incl %r12d
jmp 0x9a34
movq %r14, %rdi
callq 0x3290
leaq -0x98(%rbp), %rdi
callq 0x34f8
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9bde
movq %rax, %rbx
leaq -0xf0(%rbp), %rdi
callq 0x34f8
jmp 0x9be1
jmp 0x9bd9
jmp 0x9bd9
movq %rax, %rbx
jmp 0x9bea
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x34f8
leaq -0x98(%rbp), %rdi
callq 0x34f8
movq %rbx, %rdi
callq 0x3450