// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x98(%rsi), %ecx
testb $0x1, %cl
jne 0x3e92e
leaq 0x10(%rsp), %rax
jmp 0x3e944
leaq 0x11(%rsp), %rax
testb $0x4, %cl
jne 0x3e93f
movb $0x53, 0x10(%rsp)
jmp 0x3e944
movb $0x4f, 0x10(%rsp)
testb $0x2, %cl
je 0x3e94f
movb $0x4d, (%rax)
incq %rax
testb $0x8, %cl
je 0x3e961
movb $0x78, (%rax)
incq %rax
movl 0x98(%r14), %ecx
testb $0x10, %cl
je 0x3e973
movb $0x62, (%rax)
incq %rax
movl 0x98(%r14), %ecx
testb $0x20, %cl
je 0x3e985
movb $0x64, (%rax)
incq %rax
movl 0x98(%r14), %ecx
testb $0x40, %cl
je 0x3e997
movb $0x63, (%rax)
incq %rax
movl 0x98(%r14), %ecx
testb %cl, %cl
jns 0x3e9a8
movb $0x75, (%rax)
incq %rax
movl 0x98(%r14), %ecx
btl $0xa, %ecx
jae 0x3e9bb
movb $0x41, (%rax)
incq %rax
movl 0x98(%r14), %ecx
btl $0xb, %ecx
jae 0x3e9ce
movb $0x55, (%rax)
incq %rax
movl 0x98(%r14), %ecx
btl $0x11, %ecx
jae 0x3e9da
movb $0x72, (%rax)
incq %rax
leaq 0x10(%rsp), %rcx
cmpq %rcx, %rax
jne 0x3e9ea
movb $0x4e, (%rax)
incq %rax
movb $0x0, (%rax)
movl 0x8(%r14), %esi
cmpl $-0x1, %esi
je 0x3ea11
leaq 0xc2eab(%rip), %rax     # 0x1018a8
movq 0x40(%rax), %rdi
callq 0x2cfd5
testb $0x1, %al
jne 0x3ea18
leaq 0xd(%rsp), %rcx
jmp 0x3ea21
leaq 0xd(%rsp), %rcx
jmp 0x3ea2b
leaq 0xe(%rsp), %rcx
movb $0x72, -0x1(%rcx)
testb $0x2, %al
je 0x3ea2b
movb $0x77, (%rcx)
incq %rcx
movb $0x0, (%rcx)
movq (%r14), %r15
movq %r14, %rdi
callq 0x3ed41
movq 0x20(%r14), %rcx
testq %rcx, %rcx
je 0x3ea48
movq 0x8(%rcx), %r9
jmp 0x3ea4f
leaq 0x82066(%rip), %r9      # 0xc0ab5
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
testb $0x8, 0x98(%r14)
je 0x3ea65
movl 0x158(%r14), %edi
movq 0x28(%r14), %rcx
movzbl -0x1(%rcx), %r11d
movl %r11d, %r8d
andl $0x7, %r8d
cmpl $0x4, %r8d
movq %rdi, 0x50(%rsp)
movq %rax, 0x48(%rsp)
movq %rbx, 0x40(%rsp)
ja 0x3eaba
leaq 0x8142b(%rip), %rdx     # 0xbfebc
movslq (%rdx,%r8,4), %rsi
addq %rdx, %rsi
jmpq *%rsi
shrl $0x3, %r11d
jmp 0x3eabd
movq -0x11(%rcx), %r11
jmp 0x3eabd
movzwl -0x5(%rcx), %r11d
jmp 0x3eabd
movl -0x9(%rcx), %r11d
jmp 0x3eabd
movzbl -0x3(%rcx), %r11d
jmp 0x3eabd
xorl %r11d, %r11d
leaq 0xc2de4(%rip), %rbx     # 0x1018a8
movq 0x10(%r14), %rdi
movq 0x1a8(%r14), %rdx
movq 0x1b0(%r14), %rsi
decl %r8d
cmpl $0x3, %r8d
movq %r11, 0x38(%rsp)
ja 0x3eb2e
leaq 0x813e5(%rip), %r10     # 0xbfed0
movslq (%r10,%r8,4), %r8
addq %r10, %r8
jmpq *%r8
movq %r15, %rax
movzbl -0x2(%rcx), %r13d
movzbl -0x3(%rcx), %ecx
jmp 0x3eb29
movq %r15, %rax
movl -0x5(%rcx), %r13d
subl -0x9(%rcx), %r13d
jmp 0x3eb34
movq %r15, %rax
movq -0x9(%rcx), %r13
subq -0x11(%rcx), %r13
jmp 0x3eb34
movq %r15, %rax
movzwl -0x3(%rcx), %r13d
movzwl -0x5(%rcx), %ecx
subq %rcx, %r13
jmp 0x3eb34
movq %r15, %rax
xorl %r13d, %r13d
movl 0x8(%r14), %r8d
movq 0x978(%rbx), %rbp
movq 0x80(%r14), %rcx
movq 0x88(%r14), %r15
movl 0x30(%rdi), %edi
movq %rdi, 0x30(%rsp)
movq 0x28(%rdx), %rdi
movq 0x48(%rdx), %r12
movq 0x28(%rsi), %rdx
movq %rdx, 0x28(%rsp)
movslq 0x1c0(%r14), %rdx
movq %rdx, 0x20(%rsp)
movq 0x50(%r14), %rsi
movq 0x68(%r14), %rdx
movq 0x28(%rdx), %rbx
movq 0x70(%r14), %rdx
testq %rsi, %rsi
je 0x3eb8c
movq (%rsi), %r11
jmp 0x3eb93
leaq 0x84c40(%rip), %r11     # 0xc37d3
leaq (%rbx,%rbx,4), %rsi
leaq (%rdx,%rsi,8), %r10
addl %edi, %r12d
movq %rbp, %r14
subq %r15, %r14
subq %rcx, %rbp
leaq 0xd(%rsp), %r15
leaq 0x816a6(%rip), %rsi     # 0xc0259
movq 0x40(%rsp), %rdi
movq %rax, %rdx
movq 0x48(%rsp), %rcx
xorl %eax, %eax
pushq %r11
pushq %r15
pushq %r10
pushq %rbx
pushq 0x40(%rsp)
pushq %r13
pushq 0x68(%rsp)
pushq 0x88(%rsp)
pushq 0x68(%rsp)
pushq %r12
pushq 0x80(%rsp)
leaq 0x68(%rsp), %r10
pushq %r10
pushq %r14
pushq %rbp
callq 0x36fb1
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq