// File: /workspace/github_cpp_makefile_star2_O1/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, %r15d
movq %rsi, %r12
movq %rdi, %rbx
addq $0x20058, %rdi          # imm = 0x20058
movq %rdi, -0x30(%rbp)
callq 0x83f0
testl %eax, %eax
jne 0xfda6
leaq 0x200c8(%rbx), %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0xec4e
testw %ax, %ax
je 0xfd8e
movzwl %ax, %eax
decl %eax
movq 0x20110(%rbx), %rcx
movq (%rcx,%rax,8), %r14
xorl %edx, %edx
movq %rdx, (%rcx,%rax,8)
movq %rdx, -0x60(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
leaq 0x18(%r14), %rdi
callq 0x83f0
testl %eax, %eax
jne 0xfdad
cmpl $0x0, 0x28(%rbx)
jle 0xfd6b
xorl %ecx, %ecx
leaq 0x86db(%rip), %r12      # 0x18335
movq %rbx, -0x48(%rbp)
movq %r14, -0x40(%rbp)
movq 0x40(%r14), %rax
movq %rcx, -0x50(%rbp)
leaq (%rcx,%rcx,4), %rcx
shlq $0x5, %rcx
leaq (%rax,%rcx), %rdx
movq %rdx, -0x38(%rbp)
movq 0x60(%rax,%rcx), %rbx
movq 0x80(%rax,%rcx), %r14
cmpq %r14, %rbx
je 0xfcf0
movq -0x38(%rbp), %rax
movq 0x70(%rax), %r13
movq 0x78(%rax), %r15
movq (%rbx), %rsi
leaq -0x70(%rbp), %rdi
movl $0x1, %edx
callq 0x168de
movq (%rbx), %rax
movq 0x18(%rax), %rdi
testq %rdi, %rdi
je 0xfcd3
cmpl $-0x1, (%rdi)
je 0xfcd3
addq $0x18, %rdi
movq %r12, %rsi
callq 0x9ee0
movq %rax, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x9f54
addq $0x8, %rbx
cmpq %r13, %rbx
jne 0xfceb
movq 0x8(%r15), %rbx
addq $0x8, %r15
leaq 0x200(%rbx), %r13
cmpq %r14, %rbx
jne 0xfc98
movq -0x38(%rbp), %rax
movq 0x10(%rax), %r14
movq 0x30(%rax), %rbx
cmpq %rbx, %r14
je 0xfd4f
movq 0x20(%rax), %r13
movq 0x28(%rax), %r15
movq (%r14), %rdi
callq 0x898c
movq (%r14), %rdi
cmpl $-0x1, (%rdi)
je 0xfd32
addq $0x18, %rdi
movq %r12, %rsi
callq 0x9ee0
movq %rax, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x9f54
addq $0x8, %r14
cmpq %r13, %r14
jne 0xfd4a
movq 0x8(%r15), %r14
addq $0x8, %r15
leaq 0x200(%r14), %r13
cmpq %rbx, %r14
jne 0xfd09
movq -0x50(%rbp), %rcx
incq %rcx
movq -0x48(%rbp), %rbx
movslq 0x28(%rbx), %rax
cmpq %rax, %rcx
movq -0x40(%rbp), %r14
jl 0xfc62
testq %r14, %r14
je 0xfd85
movq %r14, %rdi
callq 0x1339a
movl $0x88, %esi
movq %r14, %rdi
callq 0x8320
leaq -0x70(%rbp), %rdi
callq 0xc13a
movq -0x30(%rbp), %rdi
callq 0x8240
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x81d0
movl %eax, %edi
callq 0x81d0
jmp 0xfdbd
movq %rax, %r14
jmp 0xfdc9
jmp 0xfdbd
movq %rax, %r14
leaq -0x70(%rbp), %rdi
callq 0xc13a
movq -0x30(%rbp), %rdi
callq 0x8240
movq %r14, %rdi
callq 0x84a0