// File: /workspace/github_c_makefile_star2_O0/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_ParseSubCmd
const jim_subcmd_type *Jim_ParseSubCmd(Jim_Interp *interp, const jim_subcmd_type * command_table,
    int argc, Jim_Obj *const *argv)
{
    const jim_subcmd_type *ct;
    const jim_subcmd_type *partial = 0;
    int cmdlen;
    Jim_Obj *cmd;
    const char *cmdstr;
    int help = 0;
    int argsok = 1;

    if (argc < 2) {
        Jim_SetResultFormatted(interp, "wrong # args: should be \"%#s command ...\"\n"
            "Use \"%#s -help ?command?\" for help", argv[0], argv[0]);
        return 0;
    }

    cmd = argv[1];


    if (cmd->typePtr == &subcmdLookupObjType) {
        if (cmd->internalRep.ptrIntValue.ptr == command_table) {
            ct = command_table + cmd->internalRep.ptrIntValue.int1;
            goto found;
        }
    }


    if (Jim_CompareStringImmediate(interp, cmd, "-help")) {
        if (argc == 2) {

            show_cmd_usage(interp, command_table, argc, argv);
            return &dummy_subcmd;
        }
        help = 1;


        cmd = argv[2];
    }


    if (Jim_CompareStringImmediate(interp, cmd, "-commands")) {
        Jim_SetResult(interp, subcmd_cmd_list(interp, command_table, " "));
        return &dummy_subcmd;
    }

    cmdstr = Jim_GetString(cmd, &cmdlen);

    for (ct = command_table; ct->cmd; ct++) {
        if (Jim_CompareStringImmediate(interp, cmd, ct->cmd)) {

            break;
        }
        if (strncmp(cmdstr, ct->cmd, cmdlen) == 0) {
            if (partial) {

                if (help) {

                    show_cmd_usage(interp, command_table, argc, argv);
                    return &dummy_subcmd;
                }
                bad_subcmd(interp, command_table, "ambiguous", argv[0], argv[1 + help]);
                return 0;
            }
            partial = ct;
        }
        continue;
    }


    if (partial && !ct->cmd) {
        ct = partial;
    }

    if (!ct->cmd) {

        if (help) {

            show_cmd_usage(interp, command_table, argc, argv);
            return &dummy_subcmd;
        }
        bad_subcmd(interp, command_table, "unknown", argv[0], argv[1 + help]);
        return 0;
    }

    if (help) {
        Jim_SetResultString(interp, "Usage: ", -1);

        add_cmd_usage(interp, ct, argv[0]);
        return &dummy_subcmd;
    }


    Jim_FreeIntRep(interp, cmd);
    cmd->typePtr = &subcmdLookupObjType;
    cmd->internalRep.ptrIntValue.ptr = (void *)command_table;
    cmd->internalRep.ptrIntValue.int1 = ct - command_table;

found:


    if (argc - 2 < ct->minargs) {
        argsok = 0;
    }
    else if (ct->maxargs >= 0 && argc - 2 > ct->maxargs) {
        argsok = 0;
    }
    else if (ct->maxargs < -1 && (argc - 2) % -ct->maxargs != 0) {

        argsok = 0;
    }
    if (!argsok) {
        Jim_SetResultString(interp, "wrong # args: should be \"", -1);

        add_cmd_usage(interp, ct, argv[0]);
        Jim_AppendStrings(interp, Jim_GetResult(interp), "\"", NULL);

        return 0;
    }


    return ct;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x54(%rbp)
movl $0x1, -0x58(%rbp)
cmpl $0x2, -0x1c(%rbp)
jge 0x14770
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
movq -0x28(%rbp), %rax
movq (%rax), %rcx
leaq 0x26a59(%rip), %rsi     # 0x3b1b5
movb $0x0, %al
callq 0x6b40
movq $0x0, -0x8(%rbp)
jmp 0x14bf7
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
leaq 0x32251(%rip), %rcx     # 0x469d8
cmpq %rcx, 0x8(%rax)
jne 0x147b9
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x147b7
movq -0x18(%rbp), %rax
movq -0x48(%rbp), %rcx
movslq 0x20(%rcx), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0x14add
jmp 0x147b9
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
leaq 0x26eee(%rip), %rdx     # 0x3b6b6
callq 0x77a0
cmpl $0x0, %eax
je 0x1480f
cmpl $0x2, -0x1c(%rbp)
jne 0x147fc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
callq 0x14c10
leaq 0x3220d(%rip), %rax     # 0x46a00
movq %rax, -0x8(%rbp)
jmp 0x14bf7
movl $0x1, -0x54(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
leaq 0x2694e(%rip), %rdx     # 0x3b16c
callq 0x77a0
cmpl $0x0, %eax
je 0x1488f
jmp 0x1482a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq 0x2909c(%rip), %rdx     # 0x3d8d5
callq 0x14c70
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x14874
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x7a10
movq -0x60(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
leaq 0x3217a(%rip), %rax     # 0x46a00
movq %rax, -0x8(%rbp)
jmp 0x14bf7
movq -0x48(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0x89b0
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x14972
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x30(%rbp), %rax
movq (%rax), %rdx
callq 0x77a0
cmpl $0x0, %eax
je 0x148d4
jmp 0x14972
movq -0x50(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movslq -0x3c(%rbp), %rdx
callq 0x60b0
cmpl $0x0, %eax
jne 0x1495f
cmpq $0x0, -0x38(%rbp)
je 0x14957
cmpl $0x0, -0x54(%rbp)
je 0x1491e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
callq 0x14c10
leaq 0x320eb(%rip), %rax     # 0x46a00
movq %rax, -0x8(%rbp)
jmp 0x14bf7
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movl -0x54(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movq (%rax,%rdx,8), %r8
leaq 0x268bd(%rip), %rdx     # 0x3b202
callq 0x14d80
movq $0x0, -0x8(%rbp)
jmp 0x14bf7
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x14961
movq -0x30(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x30(%rbp)
jmp 0x148a8
cmpq $0x0, -0x38(%rbp)
je 0x1498b
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x1498b
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x149f8
cmpl $0x0, -0x54(%rbp)
je 0x149bf
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
callq 0x14c10
leaq 0x3204a(%rip), %rax     # 0x46a00
movq %rax, -0x8(%rbp)
jmp 0x14bf7
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movl -0x54(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movq (%rax,%rdx,8), %r8
leaq 0x2657a(%rip), %rdx     # 0x3af60
callq 0x14d80
movq $0x0, -0x8(%rbp)
jmp 0x14bf7
cmpl $0x0, -0x54(%rbp)
je 0x14a7a
jmp 0x14a00
movq -0x10(%rbp), %rdi
leaq 0x26801(%rip), %rsi     # 0x3b20c
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7990
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x14a4b
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x7a10
movq -0x68(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
callq 0x14650
leaq 0x31f8f(%rip), %rax     # 0x46a00
movq %rax, -0x8(%rbp)
jmp 0x14bf7
movq -0x48(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x14aaa
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0x14aaa
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq *%rax
movq -0x48(%rbp), %rax
leaq 0x31f23(%rip), %rcx     # 0x469d8
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
sarq $0x5, %rax
movl %eax, %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x1c(%rbp), %eax
subl $0x2, %eax
movq -0x30(%rbp), %rcx
movswl 0x18(%rcx), %ecx
cmpl %ecx, %eax
jge 0x14af8
movl $0x0, -0x58(%rbp)
jmp 0x14b52
movq -0x30(%rbp), %rax
movswl 0x1a(%rax), %eax
cmpl $0x0, %eax
jl 0x14b20
movl -0x1c(%rbp), %eax
subl $0x2, %eax
movq -0x30(%rbp), %rcx
movswl 0x1a(%rcx), %ecx
cmpl %ecx, %eax
jle 0x14b20
movl $0x0, -0x58(%rbp)
jmp 0x14b50
movq -0x30(%rbp), %rax
movswl 0x1a(%rax), %eax
cmpl $-0x1, %eax
jge 0x14b4e
movl -0x1c(%rbp), %eax
subl $0x2, %eax
movq -0x30(%rbp), %rcx
movswl 0x1a(%rcx), %edx
xorl %ecx, %ecx
subl %edx, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0x14b4e
movl $0x0, -0x58(%rbp)
jmp 0x14b50
jmp 0x14b52
cmpl $0x0, -0x58(%rbp)
jne 0x14bef
jmp 0x14b5e
movq -0x10(%rbp), %rdi
leaq 0x26632(%rip), %rsi     # 0x3b19b
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7990
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x14ba9
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x7a10
movq -0x70(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
callq 0x14650
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x2716b(%rip), %rdx     # 0x3bd45
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0xca20
movq $0x0, -0x8(%rbp)
jmp 0x14bf7
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)