// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/t_string.c
// Function: setGenericCommand
void setGenericCommand(client *c, int flags, robj *key, robj *val, robj *expire, int unit, robj *ok_reply, robj *abort_reply) {
    long long milliseconds = 0; /* initialized to avoid any harmness warning */

    if (expire) {
        if (getLongLongFromObjectOrReply(c, expire, &milliseconds, NULL) != C_OK)
            return;
        if (milliseconds <= 0) {
            addReplyErrorFormat(c,"invalid expire time in %s",c->cmd->name);
            return;
        }
        if (unit == UNIT_SECONDS) milliseconds *= 1000;
    }

    if ((flags & OBJ_SET_NX && lookupKeyWrite(c->db,key) != NULL) ||
        (flags & OBJ_SET_XX && lookupKeyWrite(c->db,key) == NULL))
    {
        addReply(c, abort_reply ? abort_reply : shared.nullbulk);
        return;
    }
    setKey(c->db,key,val);
    server.dirty++;
    if (expire) setExpire(c->db,key,mstime()+milliseconds);
    notifyKeyspaceEvent(NOTIFY_STRING,"set",key,c->db->id);
    if (expire) notifyKeyspaceEvent(NOTIFY_GENERIC,
        "expire",key,c->db->id);
    addReply(c, ok_reply ? ok_reply : shared.ok);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x57812
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x38(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x49ea0
cmpl $0x0, %eax
je 0x577d5
jmp 0x57975
cmpq $0x0, -0x38(%rbp)
jg 0x577fe
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rdx
leaq 0xe60ce(%rip), %rsi     # 0x13d8c0
movb $0x0, %al
callq 0x42fd0
jmp 0x57975
cmpl $0x0, -0x2c(%rbp)
jne 0x57810
imulq $0x3e8, -0x38(%rbp), %rax # imm = 0x3E8
movq %rax, -0x38(%rbp)
jmp 0x57812
movl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x57834
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x4a6f0
cmpq $0x0, %rax
jne 0x57856
movl -0xc(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x57890
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x4a6f0
cmpq $0x0, %rax
jne 0x57890
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, 0x18(%rbp)
je 0x5786f
movq 0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x5787e
leaq 0x1213ca(%rip), %rax    # 0x178c40
movq 0x50(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x42cc0
jmp 0x57975
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4a960
leaq 0x12092c(%rip), %rax    # 0x1781d8
movq 0x720(%rax), %rcx
addq $0x1, %rcx
leaq 0x12091a(%rip), %rax    # 0x1781d8
movq %rcx, 0x720(%rax)
cmpq $0x0, -0x28(%rbp)
je 0x578f9
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
callq 0x2ff70
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq %rax, %rdx
addq -0x38(%rbp), %rdx
callq 0x4c4f0
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x30(%rax), %ecx
movl $0x8, %edi
leaq 0xe0f21(%rip), %rsi     # 0x138835
callq 0x9ce20
cmpq $0x0, -0x28(%rbp)
je 0x57940
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x30(%rax), %ecx
movl $0x4, %edi
leaq 0xf1777(%rip), %rsi     # 0x1490b2
callq 0x9ce20
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, 0x10(%rbp)
je 0x57959
movq 0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x57968
leaq 0x1212e0(%rip), %rax    # 0x178c40
movq 0x8(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x42cc0
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)