// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/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_MONITOR) *p++ = 'O';
    if (client->flags & CLIENT_BLOCKED) *p++ = 'b';
    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 (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 sub=%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->sub_counters ? (int) dictSize(client->sub_counters) : 0,
        (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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x88(%rsi), %ecx
testb $0x4, %cl
jne 0x23b16
leaq 0x10(%rsp), %rax
jmp 0x23b1f
leaq 0x11(%rsp), %rax
movb $0x4f, -0x1(%rax)
testb $0x10, %cl
je 0x23b2a
movb $0x62, (%rax)
incq %rax
testb $0x40, %cl
je 0x23b3c
movb $0x63, (%rax)
incq %rax
movl 0x88(%r14), %ecx
testb %cl, %cl
jns 0x23b4d
movb $0x75, (%rax)
incq %rax
movl 0x88(%r14), %ecx
btl $0xa, %ecx
jae 0x23b60
movb $0x41, (%rax)
incq %rax
movl 0x88(%r14), %ecx
btl $0xb, %ecx
jae 0x23b6c
movb $0x55, (%rax)
incq %rax
leaq 0x10(%rsp), %rcx
cmpq %rcx, %rax
jne 0x23b7f
leaq 0x11(%rsp), %rax
movb $0x4e, -0x1(%rax)
movb $0x0, (%rax)
movl 0x8(%r14), %esi
cmpl $-0x1, %esi
je 0x23ba6
leaq 0x4b4f6(%rip), %rax     # 0x6f088
movq 0x38(%rax), %rdi
callq 0x16e9d
testb $0x1, %al
jne 0x23bad
leaq 0xd(%rsp), %rcx
jmp 0x23bb6
leaq 0xd(%rsp), %rcx
jmp 0x23bc0
leaq 0xe(%rsp), %rcx
movb $0x72, -0x1(%rcx)
testb $0x2, %al
je 0x23bc0
movb $0x77, (%rcx)
incq %rcx
movb $0x0, (%rcx)
movq (%r14), %r15
movq %r14, %rdi
callq 0x23efe
movq 0x10(%r14), %rcx
testq %rcx, %rcx
je 0x23bdd
movq 0x8(%rcx), %r9
jmp 0x23be4
leaq 0x31639(%rip), %r9      # 0x5521d
movq 0xa8(%r14), %rcx
testq %rcx, %rcx
je 0x23bfa
movl 0x48(%rcx), %r8d
addl 0x28(%rcx), %r8d
jmp 0x23bfd
xorl %r8d, %r8d
movq 0x18(%r14), %rcx
movzbl -0x1(%rcx), %r10d
movl %r10d, %edx
andl $0x7, %edx
cmpl $0x4, %edx
ja 0x23c41
leaq 0x30f84(%rip), %rsi     # 0x54b9c
movslq (%rsi,%rdx,4), %rdi
addq %rsi, %rdi
jmpq *%rdi
shrl $0x3, %r10d
jmp 0x23c44
movq -0x11(%rcx), %r10
jmp 0x23c44
movzwl -0x5(%rcx), %r10d
jmp 0x23c44
movl -0x9(%rcx), %r10d
jmp 0x23c44
movzbl -0x3(%rcx), %r10d
jmp 0x23c44
xorl %r10d, %r10d
leaq 0x4b43d(%rip), %rsi     # 0x6f088
decl %edx
cmpl $0x3, %edx
movq %r8, 0x40(%rsp)
movq %rax, 0x38(%rsp)
movq %r9, 0x30(%rsp)
movq %r10, 0x28(%rsp)
ja 0x23cbb
leaq 0x30f43(%rip), %rdi     # 0x54bb0
movslq (%rdi,%rdx,4), %rdx
addq %rdi, %rdx
jmpq *%rdx
movq %r15, %r9
movq %rbx, %rax
movzbl -0x2(%rcx), %r13d
movzbl -0x3(%rcx), %ecx
jmp 0x23cb6
movq %r15, %r9
movq %rbx, %rax
movl -0x5(%rcx), %r13d
subl -0x9(%rcx), %r13d
jmp 0x23cc4
movq %r15, %r9
movq %rbx, %rax
movq -0x9(%rcx), %r13
subq -0x11(%rcx), %r13
jmp 0x23cc4
movq %r15, %r9
movq %rbx, %rax
movzwl -0x3(%rcx), %r13d
movzwl -0x5(%rcx), %ecx
subq %rcx, %r13
jmp 0x23cc4
movq %r15, %r9
movq %rbx, %rax
xorl %r13d, %r13d
movl 0x8(%r14), %r8d
movq 0x648(%rsi), %r15
movq 0x70(%r14), %rcx
movq 0x78(%r14), %rdx
movslq 0xb8(%r14), %r12
movq 0x40(%r14), %rsi
movq 0x58(%r14), %rdi
movq 0x28(%rdi), %rbx
movq 0x60(%r14), %r14
testq %rsi, %rsi
je 0x23cf8
movq (%rsi), %r10
jmp 0x23cff
leaq 0x35129(%rip), %r10     # 0x58e28
leaq (%rbx,%rbx,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %rbx, %r14
addq %rbx, %r14
addq %rsi, %r14
movq %r15, %rbp
subq %rdx, %rbp
subq %rcx, %r15
subq $0x8, %rsp
leaq 0x15(%rsp), %r11
leaq 0x311be(%rip), %rsi     # 0x54ee7
movq %rax, %rdi
movq %r9, %rdx
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %r9
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r14
pushq %rbx
pushq %r12
pushq %r13
pushq 0x60(%rsp)
pushq 0x80(%rsp)
leaq 0x58(%rsp), %r10
pushq %r10
pushq %rbp
pushq %r15
callq 0x1e8aa
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq