// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/t_list.c
// Function: pushGenericCommand
void pushGenericCommand(client *c, int where) {
    int j, waiting = 0, pushed = 0;
    robj *lobj = lookupKeyWrite(c->db,c->argv[1]);

    if (lobj && lobj->type != OBJ_LIST) {
        addReply(c,shared.wrongtypeerr);
        return;
    }

    for (j = 2; j < c->argc; j++) {
        c->argv[j] = tryObjectEncoding(c->argv[j]);
        if (!lobj) {
            lobj = createQuicklistObject();
            quicklistSetOptions(lobj->ptr, server.list_max_ziplist_size,
                                server.list_compress_depth);
            dbAdd(c->db,c->argv[1],lobj);
        }
        listTypePush(lobj,c->argv[j],where);
        pushed++;
    }
    addReplyLongLong(c, waiting + (lobj ? listTypeLength(lobj) : 0));
    if (pushed) {
        char *event = (where == LIST_HEAD) ? "lpush" : "rpush";

        signalModifiedKey(c->db,c->argv[1]);
        notifyKeyspaceEvent(NOTIFY_LIST,event,c->argv[1],c->db->id);
    }
    server.dirty += pushed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x4a6f0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x59758
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x1, %eax
je 0x59758
movq -0x8(%rbp), %rdi
leaq 0x11f4f6(%rip), %rax    # 0x178c40
movq 0x70(%rax), %rsi
callq 0x42cc0
jmp 0x598e0
movl $0x2, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jge 0x5981e
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x491b0
movq %rax, %rdx
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x10(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
cmpq $0x0, -0x20(%rbp)
jne 0x597eb
callq 0x48b30
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x11ea22(%rip), %rax    # 0x1781d8
movl 0x970(%rax), %esi
leaq 0x11ea15(%rip), %rax    # 0x1781d8
movl 0x974(%rax), %edx
callq 0x277c0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x4a7d0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0xc(%rbp), %edx
callq 0x58f20
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x5975f
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x59844
movq -0x20(%rbp), %rdi
callq 0x59140
movq %rax, -0x40(%rbp)
jmp 0x5984c
xorl %eax, %eax
movq %rax, -0x40(%rbp)
jmp 0x5984c
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x40(%rbp), %rax
addq %rax, %rsi
callq 0x43780
cmpl $0x0, -0x18(%rbp)
je 0x598c0
movl -0xc(%rbp), %edx
leaq 0xddcb5(%rip), %rax     # 0x137525
leaq 0xddcdb(%rip), %rcx     # 0x137552
cmpl $0x0, %edx
cmoveq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x4aa60
movq -0x28(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rdx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x30(%rax), %ecx
movl $0x10, %edi
callq 0x9ce20
movslq -0x18(%rbp), %rcx
leaq 0x11e90d(%rip), %rax    # 0x1781d8
addq 0x720(%rax), %rcx
leaq 0x11e8ff(%rip), %rax    # 0x1781d8
movq %rcx, 0x720(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)