// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: configCommand
void configCommand(client *c) {
    /* Only allow CONFIG GET while loading. */
    if (server.loading && strcasecmp(c->argv[1]->ptr,"get")) {
        addReplyError(c,"Only CONFIG GET is allowed during loading");
        return;
    }

    if (!strcasecmp(c->argv[1]->ptr,"set")) {
        if (c->argc != 4) goto badarity;
        configSetCommand(c);
    } else if (!strcasecmp(c->argv[1]->ptr,"get")) {
        if (c->argc != 3) goto badarity;
        configGetCommand(c);
    } else if (!strcasecmp(c->argv[1]->ptr,"resetstat")) {
        if (c->argc != 2) goto badarity;
        resetServerStats();
        resetCommandTableStats();
        addReply(c,shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr,"rewrite")) {
        if (c->argc != 2) goto badarity;
        if (server.configfile == NULL) {
            addReplyError(c,"The server is running without a config file");
            return;
        }
        if (rewriteConfig(server.configfile) == -1) {
            serverLog(LL_WARNING,"CONFIG REWRITE failed: %s", strerror(errno));
            addReplyErrorFormat(c,"Rewriting config file: %s", strerror(errno));
        } else {
            serverLog(LL_WARNING,"CONFIG REWRITE executed with success.");
            addReply(c,shared.ok);
        }
    } else {
        addReplyError(c,
            "CONFIG subcommand must be one of GET, SET, RESETSTAT, REWRITE");
    }
    return;

badarity:
    addReplyErrorFormat(c,"Wrong number of arguments for CONFIG %s",
        (char*) c->argv[1]->ptr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0xa627e(%rip), %r15     # 0xf98a8
cmpl $0x0, 0x31c(%r15)
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
je 0x5366a
leaq 0x5b01b(%rip), %rsi     # 0xae665
movq %r14, %rdi
callq 0x262f0
testl %eax, %eax
je 0x5366a
leaq 0x62a73(%rip), %rsi     # 0xb60d0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x36b6f
leaq 0x5c144(%rip), %rsi     # 0xaf7b5
movq %r14, %rdi
callq 0x262f0
testl %eax, %eax
je 0x536bf
leaq 0x5afe1(%rip), %rsi     # 0xae665
movq %r14, %rdi
callq 0x262f0
testl %eax, %eax
je 0x536d2
leaq 0x62a63(%rip), %rsi     # 0xb60fa
movq %r14, %rdi
callq 0x262f0
testl %eax, %eax
je 0x536e5
leaq 0x6206a(%rip), %rsi     # 0xb5714
movq %r14, %rdi
callq 0x262f0
testl %eax, %eax
je 0x5370d
leaq 0x62acd(%rip), %rsi     # 0xb618a
jmp 0x5365d
cmpl $0x4, 0x38(%rbx)
jne 0x53739
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4f5ba
cmpl $0x3, 0x38(%rbx)
jne 0x53739
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x50a71
cmpl $0x2, 0x38(%rbx)
jne 0x53739
callq 0x2d9bf
callq 0x2e013
leaq 0xa6c14(%rip), %rax     # 0xfa310
movq 0x8(%rax), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x36987
cmpl $0x2, 0x38(%rbx)
jne 0x53739
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x53752
callq 0x52ea3
cmpl $-0x1, %eax
je 0x5375e
leaq 0x62a37(%rip), %rsi     # 0xb6164
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x2b699
jmp 0x536f5
leaq 0x62a88(%rip), %rsi     # 0xb61c8
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x36b96
leaq 0x629ab(%rip), %rsi     # 0xb6104
jmp 0x5365d
callq 0x26880
movq %rax, %r14
movl (%rax), %edi
callq 0x26680
leaq 0x629bc(%rip), %rsi     # 0xb6130
pushq $0x3
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2b699
movl (%r14), %edi
callq 0x26680
leaq 0x629ba(%rip), %rsi     # 0xb614a
movq %rbx, %rdi
movq %rax, %rdx
jmp 0x53746