// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x3, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jge 0x57bd5
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x579ea
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0x57a03
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x6e, %eax
je 0x57a23
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x4e, %eax
jne 0x57a63
movq -0x28(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x78, %eax
je 0x57a3d
movq -0x28(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x58, %eax
jne 0x57a63
movq -0x28(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
jne 0x57a63
movl -0x20(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x57a63
movl -0x20(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x57bc5
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x78, %eax
je 0x57a7b
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x58, %eax
jne 0x57abb
movq -0x28(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x78, %eax
je 0x57a95
movq -0x28(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x58, %eax
jne 0x57abb
movq -0x28(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
jne 0x57abb
movl -0x20(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x57abb
movl -0x20(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x20(%rbp)
jmp 0x57bc3
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x65, %eax
je 0x57ad3
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x45, %eax
jne 0x57b32
movq -0x28(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x78, %eax
je 0x57aed
movq -0x28(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x58, %eax
jne 0x57b32
movq -0x28(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
jne 0x57b32
movl -0x20(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x57b32
cmpq $0x0, -0x30(%rbp)
je 0x57b32
movl -0x20(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x57bc1
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x70, %eax
je 0x57b4a
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x50, %eax
jne 0x57ba6
movq -0x28(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x78, %eax
je 0x57b64
movq -0x28(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x58, %eax
jne 0x57ba6
movq -0x28(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
jne 0x57ba6
movl -0x20(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x57ba6
cmpq $0x0, -0x30(%rbp)
je 0x57ba6
movl -0x20(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x20(%rbp)
movl $0x1, -0x1c(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x57bbf
movq -0x8(%rbp), %rdi
leaq 0x12108f(%rip), %rax    # 0x178c40
movq 0x80(%rax), %rsi
callq 0x42cc0
jmp 0x57c34
jmp 0x57bc1
jmp 0x57bc3
jmp 0x57bc5
jmp 0x57bc7
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x579a9
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x491b0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %esi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rdx
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %r8
movl -0x1c(%rbp), %r9d
xorl %eax, %eax
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x57780
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)