// File: zimpha[P]MiniSQL/indexManager.cc
// Function: IndexManager::insert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, element const&, long)
Response IndexManager::insert(const string &indexName, const element &e, long offset) {
    string name = getIndexFileName(indexName);
    if (!isFileExist(name)) return badRes("No such Index. -- IndexManager::insert");
    if (name != currentFile) {
        save();
        currentFile = name;
        load();
    }
    if (mp.count(e)) return badRes("Element exist. -- IndexManager::insert");
    mp[e] = offset;
    return goodRes();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0xc8(%rbp)
movq %rdi, %rax
movq %rax, -0xc0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x48(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x11a90
movq -0xb0(%rbp), %rdi
callq 0x118b0
movb %al, -0xa2(%rbp)
jmp 0x13aa3
movb -0xa2(%rbp), %al
testb $0x1, %al
jne 0x13b4e
jmp 0x13ab3
leaq -0x79(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x3500
movq -0xd0(%rbp), %rdx
leaq 0x1383c(%rip), %rsi     # 0x2730d
leaq -0x78(%rbp), %rdi
callq 0x3400
jmp 0x13adc
movq -0xc8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x11be0
jmp 0x13aee
leaq -0x78(%rbp), %rdi
callq 0x35b8
leaq -0x79(%rbp), %rdi
callq 0x3320
movl $0x1, -0x80(%rbp)
jmp 0x13cb4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x13ccd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x13b40
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x35b8
leaq -0x79(%rbp), %rdi
callq 0x3320
jmp 0x13ccd
movq -0xb8(%rbp), %rsi
addq $0x38, %rsi
leaq -0x48(%rbp), %rdi
callq 0x15b20
testb $0x1, %al
jne 0x13b68
jmp 0x13b9c
movq -0xb8(%rbp), %rdi
callq 0x13450
jmp 0x13b76
movq -0xb8(%rbp), %rdi
addq $0x38, %rdi
leaq -0x48(%rbp), %rsi
callq 0x3050
jmp 0x13b8c
movq -0xb8(%rbp), %rdi
callq 0x13ce0
jmp 0x13b9a
jmp 0x13b9c
movq -0xb8(%rbp), %rdi
addq $0x8, %rdi
movq -0x20(%rbp), %rsi
callq 0x15b50
movq %rax, -0xd8(%rbp)
jmp 0x13bb9
movq -0xd8(%rbp), %rax
cmpq $0x0, %rax
je 0x13c66
leaq -0xa1(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x3500
movq -0xe0(%rbp), %rdx
leaq 0x13749(%rip), %rsi     # 0x27334
leaq -0xa0(%rbp), %rdi
callq 0x3400
jmp 0x13bf9
movq -0xc8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x11be0
jmp 0x13c0e
leaq -0xa0(%rbp), %rdi
callq 0x35b8
leaq -0xa1(%rbp), %rdi
callq 0x3320
movl $0x1, -0x80(%rbp)
jmp 0x13cb4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x13c58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x35b8
leaq -0xa1(%rbp), %rdi
callq 0x3320
jmp 0x13ccd
movq -0xb8(%rbp), %rdi
movq -0x28(%rbp), %rax
movq %rax, -0xf0(%rbp)
addq $0x8, %rdi
movq -0x20(%rbp), %rsi
callq 0x14dc0
movq %rax, -0xe8(%rbp)
jmp 0x13c8e
movq -0xc8(%rbp), %rdi
movq -0xe8(%rbp), %rax
movq -0xf0(%rbp), %rcx
movq %rcx, (%rax)
callq 0x11b90
jmp 0x13cad
movl $0x1, -0x80(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x35b8
movq -0xc0(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
leaq -0x48(%rbp), %rdi
callq 0x35b8
movq -0x50(%rbp), %rdi
callq 0x34f0
nop