// File: /workspace/github_cpp_makefile_star2_O3/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 0xe560
testb %al, %al
je 0x4472
leaq -0x138(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xe62a
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x88b4
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 0x88b4
leaq 0xfd07(%rip), %rsi      # 0x14051
leaq -0x48(%rbp), %rdi
callq 0x34f0
leaq -0xf0(%rbp), %rdi
leaq -0x48(%rbp), %rdx
movq %r14, %rsi
callq 0xdf7e
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x4374
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 0x8c0a
addq $0x8, %r12
cmpq %r12, %rax
je 0x45d6
movq -0xc8(%rbp), %rax
leaq (%rax,%r13), %r12
addq $0x30, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x8ca8
movq %r12, %rdi
movq %rax, %rsi
callq 0x8d64
leaq -0xf0(%rbp), %rdi
callq 0x12df6
movq %r14, %rdi
movq %r15, %rsi
callq 0xe4d4
movq -0xc8(%rbp), %rax
cmpq $0x0, 0x58(%rax,%r13)
jne 0x457f
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x88b4
leaq 0xfeb8(%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 0x44cb
movq %rdx, -0xa8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x98(%rbp)
jmp 0x44d3
leaq -0x100(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xfc3e(%rip), %rsi      # 0x140c2
leaq 0xfc4b(%rip), %rdx      # 0x140d6
leaq -0x110(%rbp), %r14
movq %r14, %rdi
callq 0x8952
movq %rbx, %rdi
movq %r14, %rsi
callq 0x135e0
movq -0x110(%rbp), %rdi
cmpq %r15, %rdi
je 0x44b6
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 0xfc45(%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 0x4524
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x452c
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 0x9a9a
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x455d
callq 0x3270
movq -0xa8(%rbp), %rdi
cmpq %r12, %rdi
je 0x456e
callq 0x3270
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x457f
callq 0x3270
movq %rbx, %rdi
callq 0x135ba
leaq -0xc8(%rbp), %r14
movq %r14, %rdi
callq 0x844c
movq -0x20(%r14), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x45ab
callq 0x3270
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x45bd
callq 0x3270
leaq -0x128(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x44b1
jmp 0x44b6
leaq 0xfafa(%rip), %rdi      # 0x140d7
leaq 0xfb25(%rip), %rsi      # 0x14109
leaq 0xfb25(%rip), %rcx      # 0x14110
movl $0x3a, %edx
callq 0x31a0
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x460b
callq 0x3270
jmp 0x460b
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
cmpq %r12, %rdi
je 0x4623
callq 0x3270
jmp 0x4623
jmp 0x4620
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x466b
callq 0x3270
jmp 0x466b
jmp 0x4668
jmp 0x463a
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x4677
callq 0x3270
jmp 0x4677
movq %rax, %rbx
jmp 0x4677
movq %rax, %rbx
movq -0x110(%rbp), %rdi
cmpq %r15, %rdi
jne 0x4699
jmp 0x469e
movq %rax, %rbx
jmp 0x4689
movq %rax, %rbx
leaq -0xf0(%rbp), %rdi
callq 0x7a3c
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x4689
callq 0x3270
leaq -0x128(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x469e
callq 0x3270
movq %rbx, %rdi
callq 0x3480