// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: cliOutputHelp
static void cliOutputHelp(int argc, char **argv) {
    int i, j, len;
    int group = -1;
    helpEntry *entry;
    struct commandHelp *help;

    if (argc == 0) {
        cliOutputGenericHelp();
        return;
    } else if (argc > 0 && argv[0][0] == '@') {
        len = sizeof(commandGroups)/sizeof(char*);
        for (i = 0; i < len; i++) {
            if (strcasecmp(argv[0]+1,commandGroups[i]) == 0) {
                group = i;
                break;
            }
        }
    }

    assert(argc > 0);
    for (i = 0; i < helpEntriesLen; i++) {
        entry = &helpEntries[i];
        if (entry->type != CLI_HELP_COMMAND) continue;

        help = entry->org;
        if (group == -1) {
            /* Compare all arguments */
            if (argc == entry->argc) {
                for (j = 0; j < argc; j++) {
                    if (strcasecmp(argv[j],entry->argv[j]) != 0) break;
                }
                if (j == argc) {
                    cliOutputCommandHelp(help,1);
                }
            }
        } else {
            if (group == help->group) {
                cliOutputCommandHelp(help,0);
            }
        }
    }
    printf("\r\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF
cmpl $0x0, -0x4(%rbp)
jne 0x19416
callq 0x195a0
jmp 0x19592
cmpl $0x0, -0x4(%rbp)
jle 0x1947c
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x40, %eax
jne 0x1947c
movl $0xe, -0x1c(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x1947a
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x1, %rdi
movslq -0x14(%rbp), %rcx
leaq 0x87ea9(%rip), %rax     # 0xa1300
movq (%rax,%rcx,8), %rsi
callq 0x10060
cmpl $0x0, %eax
jne 0x1946d
movl -0x14(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x1947a
jmp 0x1946f
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x19439
jmp 0x1947c
jmp 0x1947e
cmpl $0x0, -0x4(%rbp)
jle 0x19486
jmp 0x194a5
leaq 0x73640(%rip), %rdi     # 0x8cacd
leaq 0x72927(%rip), %rsi     # 0x8bdbb
movl $0x174, %edx            # imm = 0x174
leaq 0x73636(%rip), %rcx     # 0x8cad6
callq 0x10230
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x8812f(%rip), %eax     # 0xa15e4
jge 0x19584
movq 0x88126(%rip), %rax     # 0xa15e8
movslq -0x14(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x1, (%rax)
je 0x194df
jmp 0x19576
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
cmpl $-0x1, -0x20(%rbp)
jne 0x1955b
movl -0x4(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x19559
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x19541
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x10060
cmpl $0x0, %eax
je 0x19534
jmp 0x19541
jmp 0x19536
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x19504
movl -0x18(%rbp), %eax
cmpl -0x4(%rbp), %eax
jne 0x19557
movq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0x195e0
jmp 0x19559
jmp 0x19574
movl -0x20(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jne 0x19572
movq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0x195e0
jmp 0x19574
jmp 0x19576
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x194ac
leaq 0x7188f(%rip), %rdi     # 0x8ae1a
movb $0x0, %al
callq 0x101d0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)