// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x265b8
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x4f, (%rax)
movq -0x38(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x265dc
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x62, (%rax)
movq -0x38(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x26600
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x63, (%rax)
movq -0x38(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x26626
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x75, (%rax)
movq -0x38(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x2664c
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x41, (%rax)
movq -0x38(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x26672
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x55, (%rax)
movq -0x60(%rbp), %rax
leaq -0x50(%rbp), %rcx
cmpq %rcx, %rax
jne 0x26691
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 0x266b4
xorl %eax, %eax
movl %eax, -0x68(%rbp)
jmp 0x266ce
leaq 0x98a2d(%rip), %rax     # 0xbf0e8
movq 0x38(%rax), %rdi
movq -0x38(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x13b20
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 0x266f9
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 0x26716
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 0x26b10
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x6c(%rbp)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x2676a
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x90(%rbp)
jmp 0x2677a
leaq 0x7f601(%rip), %rax     # 0xa5d72
movq %rax, -0x90(%rbp)
jmp 0x2677a
movq -0x90(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq 0x98959(%rip), %rax     # 0xbf0e8
movq 0x648(%rax), %rax
movq -0x38(%rbp), %rcx
subq 0x70(%rcx), %rax
movq %rax, -0xa8(%rbp)
leaq 0x9893c(%rip), %rax     # 0xbf0e8
movq 0x648(%rax), %rax
movq -0x38(%rbp), %rcx
subq 0x78(%rcx), %rax
movq %rax, -0xa0(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x38(%rbp), %rax
cmpq $0x0, 0xa8(%rax)
je 0x26801
movq -0x38(%rbp), %rax
movq 0xa8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x38(%rbp), %rcx
movq 0xa8(%rcx), %rcx
addq 0x48(%rcx), %rax
movl %eax, -0xb4(%rbp)
jmp 0x2680b
xorl %eax, %eax
movl %eax, -0xb4(%rbp)
jmp 0x2680b
movl -0xb4(%rbp), %eax
movl %eax, -0xec(%rbp)
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x23ca0
movq %rax, -0xe8(%rbp)
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x26b70
movq %rax, -0xe0(%rbp)
movq -0x38(%rbp), %rax
movslq 0xb8(%rax), %rax
movq %rax, -0xd8(%rbp)
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0xd0(%rbp)
movq -0x38(%rbp), %rdi
callq 0x26c60
movq %rax, -0xc8(%rbp)
leaq -0x53(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x2689e
movq -0x38(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rax
movq %rax, -0xf8(%rbp)
jmp 0x268ae
leaq 0x82f4f(%rip), %rax     # 0xa97f4
movq %rax, -0xf8(%rbp)
jmp 0x268ae
movq -0xc8(%rbp), %r11
movq -0xd0(%rbp), %rbx
movq -0xd8(%rbp), %r14
movq -0xe0(%rbp), %r15
movq -0xe8(%rbp), %r12
movl -0xec(%rbp), %r13d
movq -0xa8(%rbp), %r10
movq -0xb0(%rbp), %r9
movl -0x6c(%rbp), %r8d
movq -0x78(%rbp), %rcx
movq -0x80(%rbp), %rdx
movq -0x88(%rbp), %rdi
movq -0xf8(%rbp), %rax
leaq 0x7f0b4(%rip), %rsi     # 0xa59bb
movq %r10, (%rsp)
movq -0xa0(%rbp), %r10
movq %r10, 0x8(%rsp)
movq -0x98(%rbp), %r10
movq %r10, 0x10(%rsp)
movq -0xc0(%rbp), %r10
movl %r13d, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movq %r14, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq %r11, 0x40(%rsp)
movq %r10, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movb $0x0, %al
callq 0x1f400
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)