// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelSetCommand
void sentinelSetCommand(client *c) {
    sentinelRedisInstance *ri;
    int j, changes = 0;
    char *option, *value;

    if ((ri = sentinelGetMasterByNameOrReplyError(c,c->argv[2]))
        == NULL) return;

    /* Process option - value pairs. */
    for (j = 3; j < c->argc; j += 2) {
        option = c->argv[j]->ptr;
        value = c->argv[j+1]->ptr;
        robj *o = c->argv[j+1];
        long long ll;

        if (!strcasecmp(option,"down-after-milliseconds")) {
            /* down-after-millisecodns <milliseconds> */
            if (getLongLongFromObject(o,&ll) == C_ERR || ll <= 0)
                goto badfmt;
            ri->down_after_period = ll;
            sentinelPropagateDownAfterPeriod(ri);
            changes++;
        } else if (!strcasecmp(option,"failover-timeout")) {
            /* failover-timeout <milliseconds> */
            if (getLongLongFromObject(o,&ll) == C_ERR || ll <= 0)
                goto badfmt;
            ri->failover_timeout = ll;
            changes++;
       } else if (!strcasecmp(option,"parallel-syncs")) {
            /* parallel-syncs <milliseconds> */
            if (getLongLongFromObject(o,&ll) == C_ERR || ll <= 0)
                goto badfmt;
            ri->parallel_syncs = ll;
            changes++;
       } else if (!strcasecmp(option,"notification-script")) {
            /* notification-script <path> */
            if (strlen(value) && access(value,X_OK) == -1) {
                addReplyError(c,
                    "Notification script seems non existing or non executable");
                if (changes) sentinelFlushConfig();
                return;
            }
            sdsfree(ri->notification_script);
            ri->notification_script = strlen(value) ? sdsnew(value) : NULL;
            changes++;
       } else if (!strcasecmp(option,"client-reconfig-script")) {
            /* client-reconfig-script <path> */
            if (strlen(value) && access(value,X_OK) == -1) {
                addReplyError(c,
                    "Client reconfiguration script seems non existing or "
                    "non executable");
                if (changes) sentinelFlushConfig();
                return;
            }
            sdsfree(ri->client_reconfig_script);
            ri->client_reconfig_script = strlen(value) ? sdsnew(value) : NULL;
            changes++;
       } else if (!strcasecmp(option,"auth-pass")) {
            /* auth-pass <password> */
            sdsfree(ri->auth_pass);
            ri->auth_pass = strlen(value) ? sdsnew(value) : NULL;
            changes++;
       } else if (!strcasecmp(option,"quorum")) {
            /* quorum <count> */
            if (getLongLongFromObject(o,&ll) == C_ERR || ll <= 0)
                goto badfmt;
            ri->quorum = ll;
            changes++;
        } else {
            addReplyErrorFormat(c,"Unknown option '%s' for SENTINEL SET",
                option);
            if (changes) sentinelFlushConfig();
            return;
        }
        sentinelEvent(LL_WARNING,"+set",ri,"%@ %s %s",option,value);
    }

    if (changes) sentinelFlushConfig();
    addReply(c,shared.ok);
    return;

badfmt: /* Bad format errors */
    if (changes) sentinelFlushConfig();
    addReplyErrorFormat(c,"Invalid argument '%s' for SENTINEL SET '%s'",
            value, option);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rsi
callq 0x9a700
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x9ace7
jmp 0x9b0fe
movl $0x3, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jge 0x9b0b8
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
leaq 0xab530(%rip), %rsi     # 0x146287
callq 0x26300
cmpl $0x0, %eax
jne 0x9ada2
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x49d70
cmpl $-0x1, %eax
je 0x9ad7a
cmpq $0x0, -0x38(%rbp)
jg 0x9ad7f
jmp 0x9b0d9
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rdi
callq 0x96c20
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x9b084
movq -0x20(%rbp), %rdi
leaq 0xab537(%rip), %rsi     # 0x1462e4
callq 0x26300
cmpl $0x0, %eax
jne 0x9adf2
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x49d70
cmpl $-0x1, %eax
je 0x9add0
cmpq $0x0, -0x38(%rbp)
jg 0x9add5
jmp 0x9b0d9
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x108(%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x9b082
movq -0x20(%rbp), %rdi
leaq 0xab4f8(%rip), %rsi     # 0x1462f5
callq 0x26300
cmpl $0x0, %eax
jne 0x9ae43
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x49d70
cmpl $-0x1, %eax
je 0x9ae20
cmpq $0x0, -0x38(%rbp)
jg 0x9ae25
jmp 0x9b0d9
movq -0x38(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x94(%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x9b080
movq -0x20(%rbp), %rdi
leaq 0xab4b6(%rip), %rsi     # 0x146304
callq 0x26300
cmpl $0x0, %eax
jne 0x9aef1
movq -0x28(%rbp), %rdi
callq 0x264f0
cmpq $0x0, %rax
je 0x9ae9e
movq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0x26aa0
cmpl $-0x1, %eax
jne 0x9ae9e
movq -0x8(%rbp), %rdi
leaq 0xac19a(%rip), %rsi     # 0x147023
callq 0x42f90
cmpl $0x0, -0x18(%rbp)
je 0x9ae99
callq 0x946c0
jmp 0x9b0fe
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rdi
callq 0x38620
movq -0x28(%rbp), %rdi
callq 0x264f0
cmpq $0x0, %rax
je 0x9aecc
movq -0x28(%rbp), %rdi
callq 0x38510
movq %rax, -0x40(%rbp)
jmp 0x9aed4
xorl %eax, %eax
movq %rax, -0x40(%rbp)
jmp 0x9aed4
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x9b07e
movq -0x20(%rbp), %rdi
leaq 0xab456(%rip), %rsi     # 0x146352
callq 0x26300
cmpl $0x0, %eax
jne 0x9af9f
movq -0x28(%rbp), %rdi
callq 0x264f0
cmpq $0x0, %rax
je 0x9af4c
movq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0x26aa0
cmpl $-0x1, %eax
jne 0x9af4c
movq -0x8(%rbp), %rdi
leaq 0xac125(%rip), %rsi     # 0x14705c
callq 0x42f90
cmpl $0x0, -0x18(%rbp)
je 0x9af47
callq 0x946c0
jmp 0x9b0fe
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rdi
callq 0x38620
movq -0x28(%rbp), %rdi
callq 0x264f0
cmpq $0x0, %rax
je 0x9af7a
movq -0x28(%rbp), %rdi
callq 0x38510
movq %rax, -0x48(%rbp)
jmp 0x9af82
xorl %eax, %eax
movq %rax, -0x48(%rbp)
jmp 0x9af82
movq -0x48(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x128(%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x9b07c
movq -0x20(%rbp), %rdi
leaq 0xab403(%rip), %rsi     # 0x1463ad
callq 0x26300
cmpl $0x0, %eax
jne 0x9b004
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rdi
callq 0x38620
movq -0x28(%rbp), %rdi
callq 0x264f0
cmpq $0x0, %rax
je 0x9afe2
movq -0x28(%rbp), %rdi
callq 0x38510
movq %rax, -0x50(%rbp)
jmp 0x9afea
xorl %eax, %eax
movq %rax, -0x50(%rbp)
jmp 0x9afea
movq -0x50(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x9b07a
movq -0x20(%rbp), %rdi
leaq 0xabc46(%rip), %rsi     # 0x146c55
callq 0x26300
cmpl $0x0, %eax
jne 0x9b052
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x49d70
cmpl $-0x1, %eax
je 0x9b032
cmpq $0x0, -0x38(%rbp)
jg 0x9b037
jmp 0x9b0d9
movq -0x38(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x90(%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x9b078
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0xac03e(%rip), %rsi     # 0x14709f
movb $0x0, %al
callq 0x42fd0
cmpl $0x0, -0x18(%rbp)
je 0x9b073
callq 0x946c0
jmp 0x9b0fe
jmp 0x9b07a
jmp 0x9b07c
jmp 0x9b07e
jmp 0x9b080
jmp 0x9b082
jmp 0x9b084
movq -0x10(%rbp), %rdx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
movl $0x3, %edi
leaq 0xac028(%rip), %rsi     # 0x1470c4
leaq 0xac026(%rip), %rcx     # 0x1470c9
movb $0x0, %al
callq 0x94990
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0x9acee
cmpl $0x0, -0x18(%rbp)
je 0x9b0c3
callq 0x946c0
movq -0x8(%rbp), %rdi
leaq 0xddb72(%rip), %rax     # 0x178c40
movq 0x8(%rax), %rsi
callq 0x42cc0
jmp 0x9b0fe
cmpl $0x0, -0x18(%rbp)
je 0x9b0e4
callq 0x946c0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq 0xabfdb(%rip), %rsi     # 0x1470d2
movb $0x0, %al
callq 0x42fd0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)