// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/API.cc
// Function: API::dropIndex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Response API::dropIndex(const std::string &indexName) {
    if (!cm.hasIndex(indexName)) {
        return Response("Index does not exist");
    }
    std::pair<std::string, int> psi = cm.getIndex(indexName);
    std::string tableName = psi.first;
    int attrIndex = psi.second;
    Table nt = cm.loadTable(tableName + ".table");
    assert(nt.attributes[attrIndex].indices.count(indexName));
    nt.attributes[attrIndex].indices.erase(indexName);
    nt.write();
    cm.dropIndex(indexName);
    if (nt.attributes[attrIndex].indices.size() == 0) {
        bm.deleteFile(tableName + "." + nt.attributes[attrIndex].name + ".index");
    }
    return Response();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0xe44c
testb %al, %al
je 0x442c
leaq -0x138(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xe516
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x8766
movslq -0x118(%rbp), %r12
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x8766
leaq 0xfd4d(%rip), %rsi      # 0x14051
leaq -0x48(%rbp), %rdi
callq 0x34f0
leaq -0xf0(%rbp), %rdi
leaq -0x48(%rbp), %rdx
movq %r14, %rsi
callq 0xde70
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x432e
callq 0x3270
movq -0xc8(%rbp), %rax
leaq (%r12,%r12,2), %r13
shlq $0x5, %r13
leaq (%rax,%r13), %r12
addq $0x30, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x8ab4
addq $0x8, %r12
cmpq %r12, %rax
je 0x4590
movq -0xc8(%rbp), %rax
leaq (%rax,%r13), %r12
addq $0x30, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x8b52
movq %r12, %rdi
movq %rax, %rsi
callq 0x8c04
leaq -0xf0(%rbp), %rdi
callq 0x12cc6
movq %r14, %rdi
movq %r15, %rsi
callq 0xe3c0
movq -0xc8(%rbp), %rax
cmpq $0x0, 0x58(%rax,%r13)
jne 0x4539
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x8766
leaq 0xfefe(%rip), %rsi      # 0x142d0
leaq -0x88(%rbp), %rdi
callq 0x34f0
movq -0xc8(%rbp), %rax
movq (%rax,%r13), %rsi
movq 0x8(%rax,%r13), %rdx
leaq -0x88(%rbp), %rdi
callq 0x30c0
leaq -0x98(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq -0x38(%rbp), %r13
je 0x4485
movq %rdx, -0xa8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x98(%rbp)
jmp 0x448d
leaq -0x100(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xfc84(%rip), %rsi      # 0x140c2
leaq 0xfc91(%rip), %rdx      # 0x140d6
leaq -0x110(%rbp), %r14
movq %r14, %rdi
callq 0x8800
movq %rbx, %rdi
movq %r14, %rsi
callq 0x134ae
movq -0x110(%rbp), %rdi
cmpq %r15, %rdi
je 0x4470
callq 0x3270
movq %rbx, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq -0xa8(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xfc8b(%rip), %rsi      # 0x1413d
callq 0x34f0
addq $0x98, %r14
movq %r13, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x44de
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x44e6
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
callq 0x9946
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x4517
callq 0x3270
movq -0xa8(%rbp), %rdi
cmpq %r12, %rdi
je 0x4528
callq 0x3270
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x4539
callq 0x3270
movq %rbx, %rdi
callq 0x13488
leaq -0xc8(%rbp), %r14
movq %r14, %rdi
callq 0x8304
movq -0x20(%r14), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x4565
callq 0x3270
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x4577
callq 0x3270
leaq -0x128(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x446b
jmp 0x4470
leaq 0xfb40(%rip), %rdi      # 0x140d7
leaq 0xfb6b(%rip), %rsi      # 0x14109
leaq 0xfb6b(%rip), %rcx      # 0x14110
movl $0x3a, %edx
callq 0x31a0
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x45c5
callq 0x3270
jmp 0x45c5
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
cmpq %r12, %rdi
je 0x45dd
callq 0x3270
jmp 0x45dd
jmp 0x45da
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x4625
callq 0x3270
jmp 0x4625
jmp 0x4622
jmp 0x45f4
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x4631
callq 0x3270
jmp 0x4631
movq %rax, %rbx
jmp 0x4631
movq %rax, %rbx
movq -0x110(%rbp), %rdi
cmpq %r15, %rdi
jne 0x4653
jmp 0x4658
movq %rax, %rbx
jmp 0x4643
movq %rax, %rbx
leaq -0xf0(%rbp), %rdi
callq 0x78f8
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x4643
callq 0x3270
leaq -0x128(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4658
callq 0x3270
movq %rbx, %rdi
callq 0x3480