// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0xbdbe
testb %al, %al
je 0x3e6f
leaq -0x130(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xbe5c
leaq -0x60(%rbp), %rdi
movq %r12, %rsi
callq 0x3380
movslq -0x110(%rbp), %r12
leaq 0xd308(%rip), %rdx      # 0x11051
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x5d7d
leaq -0xe8(%rbp), %rdi
leaq -0x40(%rbp), %rdx
movq %r14, %rsi
callq 0xb966
leaq -0x40(%rbp), %rdi
callq 0x34f8
movq -0xc0(%rbp), %rax
imulq $0x60, %r12, %r12
leaq (%rax,%r12), %rdi
addq $0x30, %rdi
movq %r15, %rsi
callq 0x5e4a
testq %rax, %rax
je 0x3eb7
movq -0xc0(%rbp), %rax
leaq (%rax,%r12), %rdi
addq $0x30, %rdi
movq %r15, %rsi
callq 0x70d2
leaq -0xe8(%rbp), %rdi
callq 0xf884
movq %r14, %rdi
movq %r15, %rsi
callq 0xbd58
movq -0xc0(%rbp), %rax
cmpq $0x0, 0x58(%rax,%r12)
jne 0x3e49
leaq 0xd4cc(%rip), %rdx      # 0x112a6
leaq -0x80(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x5d7d
addq -0xc0(%rbp), %r12
leaq -0xa0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movq %r12, %rdx
callq 0x5dd8
leaq 0xd335(%rip), %rdx      # 0x1113d
leaq -0x40(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x5e6e
addq $0x98, %r14
leaq -0x40(%rbp), %rsi
movq %r14, %rdi
callq 0x7e42
leaq -0x40(%rbp), %rdi
callq 0x34f8
leaq -0xa0(%rbp), %rdi
callq 0x34f8
leaq -0x80(%rbp), %rdi
callq 0x34f8
movq %rbx, %rdi
callq 0xfdbe
leaq -0xe8(%rbp), %rdi
callq 0x5e26
leaq -0x60(%rbp), %rdi
callq 0x34f8
leaq -0x130(%rbp), %rdi
jmp 0x3e9f
leaq 0xd24c(%rip), %rsi      # 0x110c2
leaq -0x108(%rbp), %rdi
leaq -0xe8(%rbp), %rdx
callq 0x30e0
leaq -0x108(%rbp), %rsi
movq %rbx, %rdi
callq 0xfde4
leaq -0x108(%rbp), %rdi
callq 0x34f8
movq %rbx, %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd219(%rip), %rdi      # 0x110d7
leaq 0xd244(%rip), %rsi      # 0x11109
leaq 0xd244(%rip), %rcx      # 0x11110
pushq $0x3a
popq %rdx
callq 0x31a0
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x34f8
jmp 0x3ee5
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x34f8
jmp 0x3ef6
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x34f8
jmp 0x3f2f
jmp 0x3f2c
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x34f8
jmp 0x3f3b
movq %rax, %rbx
leaq -0x108(%rbp), %rdi
jmp 0x3f4b
movq %rax, %rbx
jmp 0x3f3b
movq %rax, %rbx
jmp 0x3f50
movq %rax, %rbx
jmp 0x3f44
movq %rax, %rbx
leaq -0xe8(%rbp), %rdi
callq 0x5e26
leaq -0x60(%rbp), %rdi
callq 0x34f8
leaq -0x130(%rbp), %rdi
callq 0x34f8
movq %rbx, %rdi
callq 0x3450