// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/hyperloglog.c
// Function: pfaddCommand
void pfaddCommand(client *c) {
    robj *o = lookupKeyWrite(c->db,c->argv[1]);
    struct hllhdr *hdr;
    int updated = 0, j;

    if (o == NULL) {
        /* Create the key with a string value of the exact length to
         * hold our HLL data structure. sdsnewlen() when NULL is passed
         * is guaranteed to return bytes initialized to zero. */
        o = createHLLObject();
        dbAdd(c->db,c->argv[1],o);
        updated++;
    } else {
        if (isHLLObjectOrReply(c,o) != C_OK) return;
        o = dbUnshareStringValue(c->db,c->argv[1],o);
    }
    /* Perform the low level ADD operation for every element. */
    for (j = 2; j < c->argc; j++) {
        int retval = hllAdd(o, (unsigned char*)c->argv[j]->ptr,
                               sdslen(c->argv[j]->ptr));
        switch(retval) {
        case 1:
            updated++;
            break;
        case -1:
            addReplySds(c,sdsnew(invalid_hll_err));
            return;
        }
    }
    hdr = o->ptr;
    if (updated) {
        signalModifiedKey(c->db,c->argv[1]);
        notifyKeyspaceEvent(NOTIFY_STRING,"pfadd",c->argv[1],c->db->id);
        server.dirty++;
        HLL_INVALIDATE_CACHE(hdr);
    }
    addReply(c, updated ? shared.cone : shared.czero);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%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, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x9fcb8
callq 0x9fa20
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rdx
callq 0x4a7d0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x9fcf0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x9fb30
cmpl $0x0, %eax
je 0x9fccf
jmp 0x9fe55
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rdx
callq 0x4ad00
movq %rax, -0x10(%rbp)
movl $0x2, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jge 0x9fd96
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rdi
movq %rdi, -0x30(%rbp)
callq 0x9e660
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq %rax, %rdx
callq 0x9f710
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
subl $-0x1, %eax
je 0x9fd61
jmp 0x9fd4c
movl -0x28(%rbp), %eax
subl $0x1, %eax
jne 0x9fd86
jmp 0x9fd56
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x9fd86
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0xd79a0(%rip), %rdi     # 0x177710
callq 0x38510
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x42e50
jmp 0x9fe55
jmp 0x9fd88
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x9fcf7
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x9fe1a
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x4aa60
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 $0x8, %edi
leaq 0x97b50(%rip), %rsi     # 0x137934
callq 0x9ce20
leaq 0xd83e8(%rip), %rax     # 0x1781d8
movq 0x720(%rax), %rcx
addq $0x1, %rcx
leaq 0xd83d6(%rip), %rax     # 0x1781d8
movq %rcx, 0x720(%rax)
movq -0x18(%rbp), %rax
movzbl 0xf(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0xf(%rax)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x9fe39
leaq 0xd8e11(%rip), %rax     # 0x178c40
movq 0x28(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x9fe48
leaq 0xd8e00(%rip), %rax     # 0x178c40
movq 0x20(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x42cc0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)