// File: lega911[P]ijson/src/connect.cpp
// Function: Connect::send_help()
void Connect::send_help() {
    Buffer res(256);
    res.add("ijson ");
    res.add(ijson_version);
    res.add(help_msg);
    LOCK _l(server->global_lock);
    std::vector<QueueLine*> list;
    for(const auto &ql : server->_queue_list) {
        if(ql == NULL) continue;
        list.push_back(ql);
    }
    std::sort(list.begin(), list.end(), [](const auto& l,const auto& r) {
        return l->name.compare(r->name) < 0;
    });

    for(const auto &ql : list) {
        res.add(ql->name);

        int client_count = 0;
        int worker_count = 0;
        for(int i=0;i<server->threads;i++) {
            client_count += ql->queue[i].clients.size();
            worker_count += ql->queue[i].workers.size();
        }

        for(int i=ql->name.size();i<20;i++) res.add(" ", 1);
        res.add(" ", 1);
        res.add_number(client_count);
        res.add("/");
        res.add_number(worker_count);
        if(!ql->info.empty()) {
            res.add("  ");
            int start = res.size();
            res.add(ql->info);
        }
        res.add("\n");
    }
    send.status("200 OK")->done(res);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0x18(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
movl $0x100, %esi            # imm = 0x100
callq 0x1f190
movq -0xc0(%rbp), %rdi
leaq 0x1b47f(%rip), %rsi     # 0x3869c
callq 0x1f2c0
jmp 0x1d224
movq 0x2a06d(%rip), %rsi     # 0x47298
leaq -0x18(%rbp), %rdi
callq 0x1f2c0
jmp 0x1d236
movq 0x2a063(%rip), %rsi     # 0x472a0
leaq -0x18(%rbp), %rdi
callq 0x1f2c0
jmp 0x1d248
movq -0xc8(%rbp), %rax
movq 0x48(%rax), %rsi
addq $0x20058, %rsi          # imm = 0x20058
leaq -0x30(%rbp), %rdi
callq 0x1f5d0
jmp 0x1d265
leaq -0x48(%rbp), %rdi
callq 0x1f8b0
movq -0xc8(%rbp), %rax
movq 0x48(%rax), %rax
addq $0x20110, %rax          # imm = 0x20110
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x1f600
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
callq 0x1f630
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x1f660
testb $0x1, %al
jne 0x1d2b0
jmp 0x1d319
leaq -0x58(%rbp), %rdi
callq 0x1f6a0
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x1d2da
jmp 0x1d2eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x1d60e
movq -0x68(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x1f8d0
jmp 0x1d2e9
jmp 0x1d2eb
leaq -0x58(%rbp), %rdi
callq 0x1f820
jmp 0x1d29d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x1f970
leaq -0x30(%rbp), %rdi
callq 0x1f880
jmp 0x1d60e
leaq -0x48(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x1f600
movq -0xd0(%rbp), %rdi
movq %rax, -0x70(%rbp)
callq 0x1f630
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x1d620
jmp 0x1d34c
leaq -0x48(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0x1f600
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
callq 0x1f630
movq %rax, -0x98(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x1f660
testb $0x1, %al
jne 0x1d399
jmp 0x1d5b8
leaq -0x90(%rbp), %rdi
callq 0x1f6a0
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq (%rax), %rsi
leaq -0x18(%rbp), %rdi
callq 0x1ea60
jmp 0x1d3c1
movl $0x0, -0xa4(%rbp)
movl $0x0, -0xa8(%rbp)
movl $0x0, -0xac(%rbp)
movq -0xc8(%rbp), %rcx
movl -0xac(%rbp), %eax
movq 0x48(%rcx), %rcx
cmpl 0x28(%rcx), %eax
jge 0x1d47f
movq -0xa0(%rbp), %rax
movq (%rax), %rax
movq 0x40(%rax), %rdi
movslq -0xac(%rbp), %rax
imulq $0xa0, %rax, %rax
addq %rax, %rdi
addq $0x50, %rdi
callq 0x1f7f0
movq %rax, %rcx
movslq -0xa4(%rbp), %rax
addq %rcx, %rax
movl %eax, -0xa4(%rbp)
movq -0xa0(%rbp), %rax
movq (%rax), %rax
movq 0x40(%rax), %rdi
movslq -0xac(%rbp), %rax
imulq $0xa0, %rax, %rax
addq %rax, %rdi
callq 0x1f940
movq %rax, %rcx
movslq -0xa8(%rbp), %rax
addq %rcx, %rax
movl %eax, -0xa8(%rbp)
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0x1d3df
movq -0xa0(%rbp), %rax
movq (%rax), %rdi
callq 0x1e6d0
movl %eax, -0xd4(%rbp)
jmp 0x1d496
movl -0xd4(%rbp), %eax
movl %eax, -0xb0(%rbp)
cmpl $0x14, -0xb0(%rbp)
jge 0x1d4d5
leaq 0x1b1f2(%rip), %rsi     # 0x386a4
leaq -0x18(%rbp), %rdi
movl $0x1, %edx
callq 0x1e8b0
jmp 0x1d4c2
jmp 0x1d4c4
movl -0xb0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb0(%rbp)
jmp 0x1d4a2
leaq 0x1b1c8(%rip), %rsi     # 0x386a4
leaq -0x18(%rbp), %rdi
movl $0x1, %edx
callq 0x1e8b0
jmp 0x1d4ec
movslq -0xa4(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x1f1d0
jmp 0x1d4fe
leaq 0x1ad9b(%rip), %rsi     # 0x382a0
leaq -0x18(%rbp), %rdi
callq 0x1f2c0
jmp 0x1d510
movslq -0xa8(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x1f1d0
jmp 0x1d522
movq -0xa0(%rbp), %rax
movq (%rax), %rdi
addq $0x48, %rdi
callq 0x1eb40
movb %al, -0xd5(%rbp)
jmp 0x1d53d
movb -0xd5(%rbp), %al
testb $0x1, %al
jne 0x1d593
jmp 0x1d549
leaq 0x1b153(%rip), %rsi     # 0x386a3
leaq -0x18(%rbp), %rdi
callq 0x1f2c0
jmp 0x1d55b
leaq -0x18(%rbp), %rdi
callq 0x1e6d0
movl %eax, -0xdc(%rbp)
jmp 0x1d56c
movl -0xdc(%rbp), %eax
movl %eax, -0xb4(%rbp)
movq -0xa0(%rbp), %rax
movq (%rax), %rsi
addq $0x48, %rsi
leaq -0x18(%rbp), %rdi
callq 0x1ea60
jmp 0x1d591
jmp 0x1d593
leaq 0x1b100(%rip), %rsi     # 0x3869a
leaq -0x18(%rbp), %rdi
callq 0x1f2c0
jmp 0x1d5a5
jmp 0x1d5a7
leaq -0x90(%rbp), %rdi
callq 0x1f820
jmp 0x1d37d
movq -0xc8(%rbp), %rdi
addq $0x18, %rdi
leaq 0x1ac67(%rip), %rsi     # 0x38231
callq 0x1b6d0
movq %rax, -0xe8(%rbp)
jmp 0x1d5d8
movq -0xe8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x1be40
jmp 0x1d5ea
leaq -0x48(%rbp), %rdi
callq 0x1f970
leaq -0x30(%rbp), %rdi
callq 0x1f880
leaq -0x18(%rbp), %rdi
callq 0x1f460
addq $0xf0, %rsp
popq %rbp
retq
leaq -0x18(%rbp), %rdi
callq 0x1f460
movq -0x20(%rbp), %rdi
callq 0x194a0