// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/networking.c
// Function: catClientInfoString
sds catClientInfoString(sds s, client *client) {
    char flags[16], events[3], *p;
    int emask;

    p = flags;
    if (client->flags & CLIENT_SLAVE) {
        if (client->flags & CLIENT_MONITOR)
            *p++ = 'O';
        else
            *p++ = 'S';
    }
    if (client->flags & CLIENT_MASTER) *p++ = 'M';
    if (client->flags & CLIENT_MULTI) *p++ = 'x';
    if (client->flags & CLIENT_BLOCKED) *p++ = 'b';
    if (client->flags & CLIENT_DIRTY_CAS) *p++ = 'd';
    if (client->flags & CLIENT_CLOSE_AFTER_REPLY) *p++ = 'c';
    if (client->flags & CLIENT_UNBLOCKED) *p++ = 'u';
    if (client->flags & CLIENT_CLOSE_ASAP) *p++ = 'A';
    if (client->flags & CLIENT_UNIX_SOCKET) *p++ = 'U';
    if (client->flags & CLIENT_READONLY) *p++ = 'r';
    if (p == flags) *p++ = 'N';
    *p++ = '\0';

    emask = client->fd == -1 ? 0 : aeGetFileEvents(server.el,client->fd);
    p = events;
    if (emask & AE_READABLE) *p++ = 'r';
    if (emask & AE_WRITABLE) *p++ = 'w';
    *p = '\0';
    return sdscatfmt(s,
        "id=%U addr=%s fd=%i name=%s age=%I idle=%I flags=%s db=%i sub=%i psub=%i multi=%i qbuf=%U qbuf-free=%U obl=%U oll=%U omem=%U events=%s cmd=%s",
        (unsigned long long) client->id,
        getClientPeerId(client),
        client->fd,
        client->name ? (char*)client->name->ptr : "",
        (long long)(server.unixtime - client->ctime),
        (long long)(server.unixtime - client->lastinteraction),
        flags,
        client->db->id,
        (int) dictSize(client->pubsub_channels),
        (int) listLength(client->pubsub_patterns),
        (client->flags & CLIENT_MULTI) ? client->mstate.count : -1,
        (unsigned long long) sdslen(client->querybuf),
        (unsigned long long) sdsavail(client->querybuf),
        (unsigned long long) client->bufpos,
        (unsigned long long) listLength(client->reply),
        (unsigned long long) getClientOutputBufferMemoryUsage(client),
        events,
        client->lastcmd ? client->lastcmd->name : "NULL");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x45630
movq -0x38(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4561c
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x4f, (%rax)
jmp 0x4562e
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x53, (%rax)
jmp 0x45630
movq -0x38(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x45654
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x4d, (%rax)
movq -0x38(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x45678
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x78, (%rax)
movq -0x38(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x4569c
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x62, (%rax)
movq -0x38(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x456c0
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x64, (%rax)
movq -0x38(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x456e4
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x63, (%rax)
movq -0x38(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x4570a
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x75, (%rax)
movq -0x38(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x45730
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x41, (%rax)
movq -0x38(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x45756
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x55, (%rax)
movq -0x38(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x20000, %eax          # imm = 0x20000
cmpl $0x0, %eax
je 0x4577c
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x72, (%rax)
movq -0x60(%rbp), %rax
leaq -0x50(%rbp), %rcx
cmpq %rcx, %rax
jne 0x4579b
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x4e, (%rax)
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x0, (%rax)
movq -0x38(%rbp), %rax
cmpl $-0x1, 0x8(%rax)
jne 0x457be
xorl %eax, %eax
movl %eax, -0x68(%rbp)
jmp 0x457d8
leaq 0x132a13(%rip), %rax    # 0x1781d8
movq 0x40(%rax), %rdi
movq -0x38(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x2ac40
movl %eax, -0x68(%rbp)
movl -0x68(%rbp), %eax
movl %eax, -0x64(%rbp)
leaq -0x53(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x64(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x45803
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x72, (%rax)
movl -0x64(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x45820
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x77, (%rax)
movq -0x60(%rbp), %rax
movb $0x0, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x38(%rbp), %rdi
callq 0x45c10
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x6c(%rbp)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x45874
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x90(%rbp)
jmp 0x45884
leaq 0xf5d97(%rip), %rax     # 0x13b612
movq %rax, -0x90(%rbp)
jmp 0x45884
movq -0x90(%rbp), %rax
movq %rax, -0xc0(%rbp)
leaq 0x13293f(%rip), %rax    # 0x1781d8
movq 0x978(%rax), %rax
movq -0x38(%rbp), %rcx
subq 0x80(%rcx), %rax
movq %rax, -0xb8(%rbp)
leaq 0x13291f(%rip), %rax    # 0x1781d8
movq 0x978(%rax), %rax
movq -0x38(%rbp), %rcx
subq 0x88(%rcx), %rax
movq %rax, -0xb0(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x30(%rax), %eax
movl %eax, -0x9c(%rbp)
movq -0x38(%rbp), %rax
movq 0x1a8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x38(%rbp), %rcx
movq 0x1a8(%rcx), %rcx
addq 0x48(%rcx), %rax
movl %eax, -0x98(%rbp)
movq -0x38(%rbp), %rax
movq 0x1b0(%rax), %rax
movq 0x28(%rax), %rax
movl %eax, -0x94(%rbp)
movq -0x38(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x4594b
movq -0x38(%rbp), %rax
movl 0x158(%rax), %eax
movl %eax, -0xc4(%rbp)
jmp 0x45958
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xc4(%rbp)
jmp 0x45958
movl -0xc4(%rbp), %eax
movl %eax, -0xfc(%rbp)
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x42810
movq %rax, -0xf8(%rbp)
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x45c70
movq %rax, -0xf0(%rbp)
movq -0x38(%rbp), %rax
movslq 0x1c0(%rax), %rax
movq %rax, -0xe8(%rbp)
movq -0x38(%rbp), %rax
movq 0x68(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0xe0(%rbp)
movq -0x38(%rbp), %rdi
callq 0x45d60
movq %rax, -0xd8(%rbp)
leaq -0x53(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x459eb
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
movq (%rax), %rax
movq %rax, -0x108(%rbp)
jmp 0x459fb
leaq 0xf832d(%rip), %rax     # 0x13dd1f
movq %rax, -0x108(%rbp)
jmp 0x459fb
movq -0xd8(%rbp), %r11
movq -0xe0(%rbp), %rbx
movq -0xe8(%rbp), %r14
movq -0xf0(%rbp), %r15
movq -0xf8(%rbp), %r12
movl -0xfc(%rbp), %r13d
movq -0xb8(%rbp), %r10
movq -0xc0(%rbp), %r9
movl -0x6c(%rbp), %r8d
movq -0x78(%rbp), %rcx
movq -0x80(%rbp), %rdx
movq -0x88(%rbp), %rdi
movq -0x108(%rbp), %rax
leaq 0xf52e5(%rip), %rsi     # 0x13ad39
movq %r10, (%rsp)
movq -0xb0(%rbp), %r10
movq %r10, 0x8(%rsp)
movq -0xa8(%rbp), %r10
movq %r10, 0x10(%rsp)
movl -0x9c(%rbp), %r10d
movl %r10d, 0x18(%rsp)
movl -0x98(%rbp), %r10d
movl %r10d, 0x20(%rsp)
movl -0x94(%rbp), %r10d
movl %r10d, 0x28(%rsp)
movq -0xd0(%rbp), %r10
movl %r13d, 0x30(%rsp)
movq %r12, 0x38(%rsp)
movq %r15, 0x40(%rsp)
movq %r14, 0x48(%rsp)
movq %rbx, 0x50(%rsp)
movq %r11, 0x58(%rsp)
movq %r10, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movb $0x0, %al
callq 0x39660
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)