// File: /workspace/github_cpp_makefile_star2_O3/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, -0xb8(%rbp)
callq 0xcdfe
cmpq $0x0, 0x40(%r14)
je 0xc2cc
movq 0x38(%r14), %rdi
leaq 0x8202(%rip), %rsi      # 0x14297
callq 0x3330
movq %rax, %r14
leaq -0xe4(%rbp), %r15
movl $0x0, (%r15)
leaq -0xb0(%rbp), %rdi
callq 0x13296
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rcx
callq 0x33d0
movl (%r15), %eax
movl %eax, -0x2c(%rbp)
testl %eax, %eax
jle 0xc2af
xorl %ebx, %ebx
leaq -0x80(%rbp), %r12
leaq -0xd8(%rbp), %r13
leaq -0x50(%rbp), %r15
movl $0x4, %esi
movl $0x1, %edx
leaq -0x30(%rbp), %rdi
movq %r14, %rcx
callq 0x33d0
movl -0x30(%rbp), %eax
cmpl $0x2, %eax
je 0xc18f
cmpl $0x1, %eax
je 0xc13c
testl %eax, %eax
jne 0xc1cc
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rcx
callq 0x33d0
movl -0x50(%rbp), %esi
movq %r12, %rdi
callq 0x132b8
jmp 0xc15e
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rcx
callq 0x33d0
movss -0x50(%rbp), %xmm0
movq %r12, %rdi
callq 0x132dc
movq -0x80(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x3340
movl -0x58(%rbp), %eax
movl %eax, -0x88(%rbp)
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
jmp 0xc25d
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movb $0x0, -0x40(%rbp)
movl $0x1, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rcx
callq 0x33d0
movb -0x80(%rbp), %al
testb %al, %al
je 0xc1db
movsbl %al, %esi
movq %r15, %rdi
callq 0x3230
jmp 0xc1a3
movl $0xffffffff, -0x88(%rbp) # imm = 0xFFFFFFFF
jmp 0xc267
leaq -0xc8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x88b4
movq %r12, %rdi
movq %r13, %rsi
callq 0x1332c
movq -0x80(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x3340
movl -0x58(%rbp), %eax
movl %eax, -0x88(%rbp)
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0xc23d
callq 0x3270
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0xc255
callq 0x3270
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xc267
callq 0x3270
movl $0x8, %esi
movl $0x1, %edx
leaq -0xe0(%rbp), %rdi
movq %r14, %rcx
callq 0x33d0
movq -0xe0(%rbp), %r13
movq -0xb8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xc9d8
movq %r13, (%rax)
incl %ebx
cmpl -0x2c(%rbp), %ebx
leaq -0xd8(%rbp), %r13
jne 0xc0eb
movq %r14, %rdi
callq 0x3290
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc2cc
callq 0x3270
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc301
jmp 0xc306
jmp 0xc301
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0xc309
callq 0x3270
jmp 0xc309
movq %rax, %rbx
jmp 0xc31b
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xc31b
callq 0x3270
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc330
callq 0x3270
movq %rbx, %rdi
callq 0x3480