// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/server.cpp
// Function: Server::delete_queue(ISlice)
void Server::delete_queue(ISlice key) {
    LOCK _l(global_lock);
    int n = _mapper.del(key);
    if(!n) return;
    auto *ql = _queue_list[n-1];
    _queue_list[n-1] = NULL;

    GC gc;
    Message *msg = NULL;
    ql->mutex.lock();
    for(int index=0;index<this->threads;index++) {
        auto q = &ql->queue[index];
        for(auto const &msg : q->clients) {
            gc.add(msg, GC::Message);
            if(!msg->conn) continue;
            if(!msg->conn->is_closed()) msg->conn->send.status("400 Closed")->done(-1);
        }
        for(auto const &worker : q->workers) {
            worker->unlink();
            if(!worker->is_closed()) worker->send.status("400 Closed")->done(-1);
        }
    }
    delete ql;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
addq $0x20058, %rdi          # imm = 0x20058
movq %rdi, -0x30(%rbp)
callq 0xd764
movq %r15, -0x38(%rbp)
leaq 0x200c8(%r15), %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0xf920
testw %ax, %ax
je 0x10805
movzwl %ax, %eax
decl %eax
movq -0x38(%rbp), %rcx
movq 0x20110(%rcx), %rcx
movq (%rcx,%rax,8), %rbx
andq $0x0, (%rcx,%rax,8)
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
andq $0x0, -0x60(%rbp)
leaq 0x18(%rbx), %rdi
callq 0xd764
xorl %ecx, %ecx
pushq $-0x1
popq %r13
pushq $0x1
popq %r14
movq %rbx, -0x48(%rbp)
movq -0x38(%rbp), %rax
movslq 0x28(%rax), %rax
cmpq %rax, %rcx
jge 0x107e2
movq 0x40(%rbx), %rax
movq %rcx, -0x50(%rbp)
imulq $0xa0, %rcx, %rcx
leaq (%rax,%rcx), %rdx
movq %rdx, -0x58(%rbp)
movq 0x60(%rax,%rcx), %r15
movq 0x70(%rax,%rcx), %r12
movq 0x78(%rax,%rcx), %rdx
movq %rdx, -0x40(%rbp)
movq 0x80(%rax,%rcx), %rbx
cmpq %rbx, %r15
je 0x10770
movq (%r15), %rsi
leaq -0x70(%rbp), %rdi
movl %r14d, %edx
callq 0x16d24
movq (%r15), %rax
movq 0x18(%rax), %rdi
testq %rdi, %rdi
je 0x1074e
cmpl $-0x1, (%rdi)
je 0x1074e
addq $0x18, %rdi
leaq 0x8bfb(%rip), %rsi      # 0x19339
callq 0xb93e
movq %rax, %rdi
movl %r13d, %esi
callq 0xb9b2
addq $0x8, %r15
cmpq %r12, %r15
jne 0x1070e
movq -0x40(%rbp), %rax
movq 0x8(%rax), %r15
addq $0x8, %rax
movq %rax, -0x40(%rbp)
leaq 0x200(%r15), %r12
jmp 0x1070e
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rbx
movq 0x20(%rax), %r15
movq 0x28(%rax), %r14
movq 0x30(%rax), %r12
cmpq %r12, %rbx
je 0x107ce
movq (%rbx), %rdi
callq 0xa84c
movq (%rbx), %rdi
cmpl $-0x1, (%rdi)
je 0x107b4
addq $0x18, %rdi
leaq 0x8b95(%rip), %rsi      # 0x19339
callq 0xb93e
movq %rax, %rdi
movl %r13d, %esi
callq 0xb9b2
addq $0x8, %rbx
cmpq %r15, %rbx
jne 0x10784
movq 0x8(%r14), %rbx
addq $0x8, %r14
leaq 0x200(%rbx), %r15
jmp 0x10784
movq -0x50(%rbp), %rcx
incq %rcx
movq -0x48(%rbp), %rbx
pushq $0x1
popq %r14
jmp 0x106cb
testq %rbx, %rbx
je 0x107ef
movq %rbx, %rdi
callq 0x1337e
movl $0x88, %esi
movq %rbx, %rdi
callq 0xa300
leaq -0x70(%rbp), %rdi
callq 0xd2dc
movq -0x30(%rbp), %rdi
callq 0xa220
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10826
movq %rax, %rbx
jmp 0x10832
jmp 0x10826
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0xd2dc
movq -0x30(%rbp), %rdi
callq 0xa220
movq %rbx, %rdi
callq 0xa470
nop