// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_string.c
// Function: setCommand
void setCommand(client *c) {
    int j;
    robj *expire = NULL;
    int unit = UNIT_SECONDS;
    int flags = OBJ_SET_NO_FLAGS;

    for (j = 3; j < c->argc; j++) {
        char *a = c->argv[j]->ptr;
        robj *next = (j == c->argc-1) ? NULL : c->argv[j+1];

        if ((a[0] == 'n' || a[0] == 'N') &&
            (a[1] == 'x' || a[1] == 'X') && a[2] == '\0' &&
            !(flags & OBJ_SET_XX))
        {
            flags |= OBJ_SET_NX;
        } else if ((a[0] == 'x' || a[0] == 'X') &&
                   (a[1] == 'x' || a[1] == 'X') && a[2] == '\0' &&
                   !(flags & OBJ_SET_NX))
        {
            flags |= OBJ_SET_XX;
        } else if ((a[0] == 'e' || a[0] == 'E') &&
                   (a[1] == 'x' || a[1] == 'X') && a[2] == '\0' &&
                   !(flags & OBJ_SET_PX) && next)
        {
            flags |= OBJ_SET_EX;
            unit = UNIT_SECONDS;
            expire = next;
            j++;
        } else if ((a[0] == 'p' || a[0] == 'P') &&
                   (a[1] == 'x' || a[1] == 'X') && a[2] == '\0' &&
                   !(flags & OBJ_SET_EX) && next)
        {
            flags |= OBJ_SET_PX;
            unit = UNIT_MILLISECONDS;
            expire = next;
            j++;
        } else {
            addReply(c,shared.syntaxerr);
            return;
        }
    }

    c->argv[2] = tryObjectEncoding(c->argv[2]);
    setGenericCommand(c,flags,c->argv[1],c->argv[2],expire,unit,NULL,NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x38(%rdi), %ecx
movq 0x40(%rdi), %rax
cmpl $0x4, %ecx
jl 0x4b4c3
leal -0x1(%rcx), %edx
xorl %r15d, %r15d
movl $0x3, %esi
xorl %ebp, %ebp
xorl %r14d, %r14d
movslq %esi, %r8
cmpl %edx, %r8d
jne 0x4b35e
xorl %edi, %edi
jmp 0x4b363
movq 0x8(%rax,%r8,8), %rdi
movq (%rax,%r8,8), %r8
movq 0x8(%r8), %r8
movzbl (%r8), %r9d
cmpl $0x64, %r9d
jg 0x4b390
cmpl $0x4f, %r9d
jg 0x4b3db
cmpl $0x45, %r9d
je 0x4b44b
cmpl $0x4e, %r9d
je 0x4b3aa
jmp 0x4b50a
cmpl $0x6f, %r9d
jg 0x4b3e6
cmpl $0x65, %r9d
je 0x4b44b
cmpl $0x6e, %r9d
jne 0x4b50a
movzbl 0x1(%r8), %r10d
orl $0x20, %r10d
cmpl $0x78, %r10d
jne 0x4b3f7
cmpb $0x0, 0x2(%r8)
sete %r10b
testb $0x2, %bpl
sete %r11b
andb %r10b, %r11b
cmpb $0x1, %r11b
jne 0x4b3f7
orl $0x1, %ebp
jmp 0x4b4a2
cmpl $0x50, %r9d
jne 0x4b403
jmp 0x4b46b
cmpl $0x70, %r9d
je 0x4b46b
cmpl $0x78, %r9d
je 0x4b40d
jmp 0x4b50a
cmpl $0x50, %r9d
je 0x4b46b
cmpl $0x65, %r9d
je 0x4b44b
cmpl $0x58, %r9d
jne 0x4b50a
movzbl 0x1(%r8), %r10d
orl $0x20, %r10d
cmpl $0x78, %r10d
jne 0x4b43b
cmpb $0x0, 0x2(%r8)
sete %r10b
testb $0x1, %bpl
sete %r11b
andb %r10b, %r11b
cmpb $0x1, %r11b
jne 0x4b43b
orl $0x2, %ebp
jmp 0x4b4a2
cmpl $0x70, %r9d
je 0x4b46b
cmpl $0x65, %r9d
jne 0x4b50a
movzbl 0x1(%r8), %r10d
orl $0x20, %r10d
cmpl $0x78, %r10d
jne 0x4b461
cmpb $0x0, 0x2(%r8)
je 0x4b4ae
cmpl $0x50, %r9d
jne 0x4b50a
movzbl 0x1(%r8), %r9d
orl $0x20, %r9d
cmpl $0x78, %r9d
jne 0x4b50a
cmpb $0x0, 0x2(%r8)
jne 0x4b50a
testb $0x4, %bpl
jne 0x4b50a
testq %rdi, %rdi
je 0x4b50a
orl $0x8, %ebp
incl %esi
movl $0x1, %r14d
movq %rdi, %r15
incl %esi
cmpl %ecx, %esi
jl 0x4b352
jmp 0x4b4cb
testb $0x8, %bpl
jne 0x4b461
testq %rdi, %rdi
je 0x4b461
orl $0x4, %ebp
incl %esi
xorl %r14d, %r14d
jmp 0x4b49f
xorl %r14d, %r14d
xorl %ebp, %ebp
xorl %r15d, %r15d
movq 0x10(%rax), %rdi
callq 0x40e09
movq 0x40(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rdx
movq 0x10(%rax), %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %r8
movl %r14d, %r9d
callq 0x4b1ac
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb6dff(%rip), %rax     # 0x102310
movq 0x80(%rax), %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3c854