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

    p = flags;
    if (client->flags & REDIS_SLAVE) {
        if (client->flags & REDIS_MONITOR)
            *p++ = 'O';
        else
            *p++ = 'S';
    }
    if (client->flags & REDIS_MASTER) *p++ = 'M';
    if (client->flags & REDIS_MULTI) *p++ = 'x';
    if (client->flags & REDIS_BLOCKED) *p++ = 'b';
    if (client->flags & REDIS_DIRTY_CAS) *p++ = 'd';
    if (client->flags & REDIS_CLOSE_AFTER_REPLY) *p++ = 'c';
    if (client->flags & REDIS_UNBLOCKED) *p++ = 'u';
    if (client->flags & REDIS_CLOSE_ASAP) *p++ = 'A';
    if (client->flags & REDIS_UNIX_SOCKET) *p++ = 'U';
    if (client->flags & REDIS_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,
        "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",
        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 & REDIS_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 $0x148, %rsp            # imm = 0x148
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x37cd0
movq -0x38(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x37cbc
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x4f, (%rax)
jmp 0x37cce
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x53, (%rax)
jmp 0x37cd0
movq -0x38(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x37cf4
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x4d, (%rax)
movq -0x38(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x37d18
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x78, (%rax)
movq -0x38(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x37d3c
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x62, (%rax)
movq -0x38(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x37d60
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x64, (%rax)
movq -0x38(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x37d84
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x63, (%rax)
movq -0x38(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x37daa
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x75, (%rax)
movq -0x38(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x37dd0
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x41, (%rax)
movq -0x38(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x37df6
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x55, (%rax)
movq -0x38(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x20000, %eax          # imm = 0x20000
cmpl $0x0, %eax
je 0x37e1c
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 0x37e3b
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, (%rax)
jne 0x37e5d
xorl %eax, %eax
movl %eax, -0x68(%rbp)
jmp 0x37e76
leaq 0xdba94(%rip), %rax     # 0x1138f8
movq 0x28(%rax), %rdi
movq -0x38(%rbp), %rax
movl (%rax), %esi
callq 0x20df0
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 0x37ea1
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 0x37ebe
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, -0x80(%rbp)
movq -0x38(%rbp), %rdi
callq 0x38330
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x37f03
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x88(%rbp)
jmp 0x37f13
leaq 0xa94ef(%rip), %rax     # 0xe13f9
movq %rax, -0x88(%rbp)
jmp 0x37f13
movq -0x88(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq 0xdb9d0(%rip), %rax     # 0x1138f8
movq 0x798(%rax), %rax
movq -0x38(%rbp), %rcx
subq 0x78(%rcx), %rax
movq %rax, -0xb0(%rbp)
leaq 0xdb9b3(%rip), %rax     # 0x1138f8
movq 0x798(%rax), %rax
movq -0x38(%rbp), %rcx
subq 0x80(%rcx), %rax
movq %rax, -0xa8(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x30(%rax), %eax
movl %eax, -0x94(%rbp)
movq -0x38(%rbp), %rax
movq 0x158(%rax), %rax
movq 0x28(%rax), %rax
movq -0x38(%rbp), %rcx
movq 0x158(%rcx), %rcx
addq 0x48(%rcx), %rax
movl %eax, -0x90(%rbp)
movq -0x38(%rbp), %rax
movq 0x160(%rax), %rax
movq 0x28(%rax), %rax
movl %eax, -0x8c(%rbp)
movq -0x38(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x37fd7
movq -0x38(%rbp), %rax
movl 0x108(%rax), %eax
movl %eax, -0xbc(%rbp)
jmp 0x37fe4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xbc(%rbp)
jmp 0x37fe4
movl -0xbc(%rbp), %eax
movl %eax, -0xf4(%rbp)
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x34800
movq %rax, -0xf0(%rbp)
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x34820
movq %rax, -0xe8(%rbp)
movq -0x38(%rbp), %rax
movslq 0x170(%rax), %rax
movq %rax, -0xe0(%rbp)
movq -0x38(%rbp), %rax
movq 0x60(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0xd8(%rbp)
movq -0x38(%rbp), %rdi
callq 0x38390
movq %rax, -0xd0(%rbp)
leaq -0x53(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x38077
movq -0x38(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x100(%rbp)
jmp 0x38087
leaq 0xab30d(%rip), %rax     # 0xe338b
movq %rax, -0x100(%rbp)
jmp 0x38087
movq -0xd0(%rbp), %r11
movq -0xd8(%rbp), %rbx
movq -0xe0(%rbp), %r14
movq -0xe8(%rbp), %r15
movq -0xf0(%rbp), %r12
movl -0xf4(%rbp), %r13d
movq -0xa8(%rbp), %r10
movq -0xb0(%rbp), %r9
movq -0xb8(%rbp), %r8
movl -0x6c(%rbp), %ecx
movq -0x78(%rbp), %rdx
movq -0x80(%rbp), %rdi
movq -0x100(%rbp), %rax
leaq 0xa9086(%rip), %rsi     # 0xe1165
movq %r10, (%rsp)
movq -0xa0(%rbp), %r10
movq %r10, 0x8(%rsp)
movl -0x94(%rbp), %r10d
movl %r10d, 0x10(%rsp)
movl -0x90(%rbp), %r10d
movl %r10d, 0x18(%rsp)
movl -0x8c(%rbp), %r10d
movl %r10d, 0x20(%rsp)
movq -0xc8(%rbp), %r10
movl %r13d, 0x28(%rsp)
movq %r12, 0x30(%rsp)
movq %r15, 0x38(%rsp)
movq %r14, 0x40(%rsp)
movq %rbx, 0x48(%rsp)
movq %r11, 0x50(%rsp)
movq %r10, 0x58(%rsp)
movq %rax, 0x60(%rsp)
movb $0x0, %al
callq 0x2cb80
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)