// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/t_string.c
// Function: msetGenericCommand
void msetGenericCommand(client *c, int nx) {
    int j, busykeys = 0;

    if ((c->argc % 2) == 0) {
        addReplyError(c,"wrong number of arguments for MSET");
        return;
    }
    /* Handle the NX flag. The MSETNX semantic is to return zero and don't
     * set nothing at all if at least one already key exists. */
    if (nx) {
        for (j = 1; j < c->argc; j += 2) {
            if (lookupKeyWrite(c->db,c->argv[j]) != NULL) {
                busykeys++;
            }
        }
        if (busykeys) {
            addReply(c, shared.czero);
            return;
        }
    }

    for (j = 1; j < c->argc; j += 2) {
        c->argv[j+1] = tryObjectEncoding(c->argv[j+1]);
        setKey(c->db,c->argv[j],c->argv[j+1]);
        notifyKeyspaceEvent(NOTIFY_STRING,"set",c->argv[j],c->db->id);
    }
    server.dirty += (c->argc-1)/2;
    addReply(c, nx ? shared.cone : shared.ok);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x585bf
movq -0x8(%rbp), %rdi
leaq 0xe533c(%rip), %rsi     # 0x13d8f1
callq 0x42f90
jmp 0x58753
cmpl $0x0, -0xc(%rbp)
je 0x58632
movl $0x1, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jge 0x58611
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x4a6f0
cmpq $0x0, %rax
je 0x58604
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x58606
movl -0x10(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x10(%rbp)
jmp 0x585cc
cmpl $0x0, -0x14(%rbp)
je 0x58630
movq -0x8(%rbp), %rdi
leaq 0x12061e(%rip), %rax    # 0x178c40
movq 0x20(%rax), %rsi
callq 0x42cc0
jmp 0x58753
jmp 0x58632
movl $0x1, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jge 0x586e7
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x10(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x491b0
movq %rax, %rdx
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x10(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x10(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
callq 0x4a960
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x30(%rax), %ecx
movl $0x8, %edi
leaq 0xe0161(%rip), %rsi     # 0x138835
callq 0x9ce20
movl -0x10(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x10(%rbp)
jmp 0x58639
movq -0x8(%rbp), %rax
movl 0x38(%rax), %eax
subl $0x1, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movslq %eax, %rcx
leaq 0x11fad5(%rip), %rax    # 0x1781d8
addq 0x720(%rax), %rcx
leaq 0x11fac7(%rip), %rax    # 0x1781d8
movq %rcx, 0x720(%rax)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x58737
leaq 0x120513(%rip), %rax    # 0x178c40
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x58746
leaq 0x120502(%rip), %rax    # 0x178c40
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x42cc0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)