// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/config.c
// Function: configCommand
void configCommand(redisClient *c) {
    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) {
            redisLog(REDIS_WARNING,"CONFIG REWRITE failed: %s", strerror(errno));
            addReplyErrorFormat(c,"Rewriting config file: %s", strerror(errno));
        } else {
            redisLog(REDIS_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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x81013(%rip), %rsi     # 0xdf556
callq 0x1f2f0
cmpl $0x0, %eax
jne 0x5e56a
movq -0x8(%rbp), %rax
cmpl $0x4, 0x30(%rax)
je 0x5e55c
jmp 0x5e6f3
movq -0x8(%rbp), %rdi
callq 0x591d0
jmp 0x5e6f1
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x7ff5e(%rip), %rsi     # 0xde4df
callq 0x1f2f0
cmpl $0x0, %eax
jne 0x5e5a8
movq -0x8(%rbp), %rax
cmpl $0x3, 0x30(%rax)
je 0x5e59a
jmp 0x5e6f3
movq -0x8(%rbp), %rdi
callq 0x5aad0
jmp 0x5e6ef
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x85f9e(%rip), %rsi     # 0xe455d
callq 0x1f2f0
cmpl $0x0, %eax
jne 0x5e5fb
movq -0x8(%rbp), %rax
cmpl $0x2, 0x30(%rax)
je 0x5e5d8
jmp 0x5e6f3
callq 0x27d40
callq 0x28550
movq -0x8(%rbp), %rdi
leaq 0xb5b63(%rip), %rax     # 0x114150
movq 0x8(%rax), %rsi
callq 0x35a70
jmp 0x5e6ed
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x8575b(%rip), %rsi     # 0xe3d6d
callq 0x1f2f0
cmpl $0x0, %eax
jne 0x5e6db
movq -0x8(%rbp), %rax
cmpl $0x2, 0x30(%rax)
je 0x5e62f
jmp 0x5e6f3
leaq 0xb52c2(%rip), %rax     # 0x1138f8
cmpq $0x0, (%rax)
jne 0x5e651
movq -0x8(%rbp), %rdi
leaq 0x85f20(%rip), %rsi     # 0xe4567
callq 0x35d40
jmp 0x5e715
leaq 0xb52a0(%rip), %rax     # 0x1138f8
movq (%rax), %rdi
callq 0x5db90
cmpl $-0x1, %eax
jne 0x5e6b2
callq 0x1f820
movl (%rax), %edi
callq 0x1f630
movq %rax, %rdx
movl $0x3, %edi
leaq 0x85f13(%rip), %rsi     # 0xe4593
movb $0x0, %al
callq 0x24fb0
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
callq 0x1f820
movl (%rax), %edi
callq 0x1f630
movq -0x10(%rbp), %rdi
movq %rax, %rdx
leaq 0x85f04(%rip), %rsi     # 0xe45ad
movb $0x0, %al
callq 0x35d80
jmp 0x5e6d9
movl $0x3, %edi
leaq 0x85f09(%rip), %rsi     # 0xe45c7
movb $0x0, %al
callq 0x24fb0
movq -0x8(%rbp), %rdi
leaq 0xb5a80(%rip), %rax     # 0x114150
movq 0x8(%rax), %rsi
callq 0x35a70
jmp 0x5e6eb
movq -0x8(%rbp), %rdi
leaq 0x85f07(%rip), %rsi     # 0xe45ed
callq 0x35d40
jmp 0x5e6ed
jmp 0x5e6ef
jmp 0x5e6f1
jmp 0x5e715
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdx
leaq 0x85f1d(%rip), %rsi     # 0xe462b
movb $0x0, %al
callq 0x35d80
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)