// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_set.c
// Function: smoveCommand
void smoveCommand(client *c) {
    robj *srcset, *dstset, *ele;
    srcset = lookupKeyWrite(c->db,c->argv[1]);
    dstset = lookupKeyWrite(c->db,c->argv[2]);
    ele = c->argv[3] = tryObjectEncoding(c->argv[3]);

    /* If the source key does not exist return 0 */
    if (srcset == NULL) {
        addReply(c,shared.czero);
        return;
    }

    /* If the source key has the wrong type, or the destination key
     * is set and has the wrong type, return with an error. */
    if (checkType(c,srcset,OBJ_SET) ||
        (dstset && checkType(c,dstset,OBJ_SET))) return;

    /* If srcset and dstset are equal, SMOVE is a no-op */
    if (srcset == dstset) {
        addReply(c,setTypeIsMember(srcset,ele) ? shared.cone : shared.czero);
        return;
    }

    /* If the element cannot be removed from the src set, return 0. */
    if (!setTypeRemove(srcset,ele)) {
        addReply(c,shared.czero);
        return;
    }
    notifyKeyspaceEvent(NOTIFY_SET,"srem",c->argv[1],c->db->id);

    /* Remove the src set from the database when empty */
    if (setTypeSize(srcset) == 0) {
        dbDelete(c->db,c->argv[1]);
        notifyKeyspaceEvent(NOTIFY_GENERIC,"del",c->argv[1],c->db->id);
    }

    /* Create the destination set when it doesn't exist */
    if (!dstset) {
        dstset = setTypeCreate(ele);
        dbAdd(c->db,c->argv[2],dstset);
    }

    signalModifiedKey(c->db,c->argv[1]);
    signalModifiedKey(c->db,c->argv[2]);
    server.dirty++;

    /* An extra key has changed when ele was successfully added to dstset */
    if (setTypeAdd(dstset,ele)) {
        server.dirty++;
        notifyKeyspaceEvent(NOTIFY_SET,"sadd",c->argv[2],c->db->id);
    }
    addReply(c,shared.cone);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x3aec2
movq %rax, %r12
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
callq 0x3aec2
movq %rax, %r15
movq 0x40(%rbx), %rax
movq 0x18(%rax), %rdi
callq 0x3a3ad
movq %rax, %r14
movq 0x40(%rbx), %rax
movq %r14, 0x18(%rax)
testq %r12, %r12
je 0x46599
pushq $0x2
popq %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3a311
testl %eax, %eax
je 0x46475
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
testq %r15, %r15
je 0x4648c
pushq $0x2
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3a311
testl %eax, %eax
jne 0x46469
cmpq %r15, %r12
je 0x465b7
movq %r12, %rdi
movq %r14, %rsi
callq 0x45ea1
testl %eax, %eax
je 0x46599
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x6804c(%rip), %rsi     # 0xae50a
pushq $0x20
popq %rdi
callq 0x6fb58
movq %r12, %rdi
callq 0x461ae
testq %rax, %rax
jne 0x46502
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x3b1df
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x69f1e(%rip), %rsi     # 0xb0418
pushq $0x4
popq %rdi
callq 0x6fb58
testq %r15, %r15
jne 0x46526
movq %r14, %rdi
callq 0x45c68
movq %rax, %r15
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq %r15, %rdx
callq 0x3af45
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x3b125
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
callq 0x3b125
leaq 0xb3359(%rip), %r12     # 0xf98a8
incq 0x720(%r12)
movq %r15, %rdi
movq %r14, %rsi
callq 0x45c80
testl %eax, %eax
je 0x4658c
incq 0x720(%r12)
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x10(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x67f81(%rip), %rsi     # 0xae505
pushq $0x20
popq %rdi
callq 0x6fb58
leaq 0xb3d7d(%rip), %rax     # 0xfa310
movq 0x28(%rax), %rsi
jmp 0x465a4
leaq 0xb3d70(%rip), %rax     # 0xfa310
movq 0x20(%rax), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x36987
movq %r12, %rdi
movq %r14, %rsi
callq 0x45f47
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq 0xb3d40(%rip), %rax     # 0xfa310
movq 0x20(%rax,%rcx,8), %rsi
jmp 0x465a4