// File: /workspace/github_c_makefile_star2_O0/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_SwitchCoreCommand
static int Jim_SwitchCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
    enum { SWITCH_EXACT, SWITCH_GLOB, SWITCH_RE, SWITCH_CMD };
    int matchOpt = SWITCH_EXACT, opt = 1, patCount, i;
    int match_flags = 0;
    Jim_Obj *command = NULL, *scriptObj = NULL, *strObj;
    Jim_Obj **caseList;

    if (argc < 3) {
      wrongnumargs:
        Jim_WrongNumArgs(interp, 1, argv, "?options? string "
            "pattern body ... ?default body?   or   " "{pattern body ?pattern body ...?}");
        return JIM_ERR;
    }
    for (opt = 1; opt < argc; ++opt) {
        const char *option = Jim_String(argv[opt]);

        if (*option != '-')
            break;
        else if (strncmp(option, "--", 2) == 0) {
            ++opt;
            break;
        }
        else if (strncmp(option, "-exact", 2) == 0)
            matchOpt = SWITCH_EXACT;
        else if (strncmp(option, "-glob", 2) == 0)
            matchOpt = SWITCH_GLOB;
        else if (strncmp(option, "-regexp", 2) == 0) {
            matchOpt = SWITCH_RE;
            match_flags |= JIM_OPT_END;
        }
        else if (strncmp(option, "-command", 2) == 0) {
            matchOpt = SWITCH_CMD;
            if ((argc - opt) < 2)
                goto wrongnumargs;
            command = argv[++opt];
        }
        else {
            Jim_SetResultFormatted(interp,
                "bad option \"%#s\": must be -exact, -glob, -regexp, -command procname or --",
                argv[opt]);
            return JIM_ERR;
        }
        if ((argc - opt) < 2)
            goto wrongnumargs;
    }
    strObj = argv[opt++];
    patCount = argc - opt;
    if (patCount == 1) {
        JimListGetElements(interp, argv[opt], &patCount, &caseList);
    }
    else
        caseList = (Jim_Obj **)&argv[opt];
    if (patCount == 0 || patCount % 2 != 0)
        goto wrongnumargs;
    for (i = 0; scriptObj == NULL && i < patCount; i += 2) {
        Jim_Obj *patObj = caseList[i];

        if (!Jim_CompareStringImmediate(interp, patObj, "default")
            || i < (patCount - 2)) {
            switch (matchOpt) {
                case SWITCH_EXACT:
                    if (Jim_StringEqObj(strObj, patObj))
                        scriptObj = caseList[i + 1];
                    break;
                case SWITCH_GLOB:
                    if (Jim_StringMatchObj(interp, patObj, strObj, 0))
                        scriptObj = caseList[i + 1];
                    break;
                case SWITCH_RE:
                    command = Jim_NewStringObj(interp, "regexp", -1);

                case SWITCH_CMD:{
                        int rc = Jim_CommandMatchObj(interp, command, patObj, strObj, match_flags);

                        if (argc - opt == 1) {
                            JimListGetElements(interp, argv[opt], &patCount, &caseList);
                        }

                        if (rc < 0) {
                            return -rc;
                        }
                        if (rc)
                            scriptObj = caseList[i + 1];
                        break;
                    }
            }
        }
        else {
            scriptObj = caseList[i + 1];
        }
    }
    for (; i < patCount && Jim_CompareStringImmediate(interp, scriptObj, "-"); i += 2)
        scriptObj = caseList[i + 1];
    if (scriptObj && Jim_CompareStringImmediate(interp, scriptObj, "-")) {
        Jim_SetResultFormatted(interp, "no body specified for pattern \"%#s\"", caseList[i - 2]);
        return JIM_ERR;
    }
    Jim_SetEmptyResult(interp);
    if (scriptObj) {
        return Jim_EvalObj(interp, scriptObj);
    }
    return JIM_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x1, -0x28(%rbp)
movl $0x0, -0x34(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
cmpl $0x3, -0x14(%rbp)
jge 0x26fe8
jmp 0x26fc3
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x1, %esi
leaq 0x158f4(%rip), %rcx     # 0x3c8cb
callq 0x7880
movl $0x1, -0x4(%rbp)
jmp 0x27490
movl $0x1, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x27160
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x7960
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x27021
jmp 0x27160
movq -0x60(%rbp), %rdi
leaq 0x15955(%rip), %rsi     # 0x3c981
movl $0x2, %edx
callq 0x60b0
cmpl $0x0, %eax
jne 0x27049
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x27160
movq -0x60(%rbp), %rdi
leaq 0x158d1(%rip), %rsi     # 0x3c925
movl $0x2, %edx
callq 0x60b0
cmpl $0x0, %eax
jne 0x2706f
movl $0x0, -0x24(%rbp)
jmp 0x2713c
movq -0x60(%rbp), %rdi
leaq 0x158b2(%rip), %rsi     # 0x3c92c
movl $0x2, %edx
callq 0x60b0
cmpl $0x0, %eax
jne 0x27095
movl $0x1, -0x24(%rbp)
jmp 0x2713a
movq -0x60(%rbp), %rdi
leaq 0x15892(%rip), %rsi     # 0x3c932
movl $0x2, %edx
callq 0x60b0
cmpl $0x0, %eax
jne 0x270c1
movl $0x2, -0x24(%rbp)
movl -0x34(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x34(%rbp)
jmp 0x27138
movq -0x60(%rbp), %rdi
leaq 0x13b61(%rip), %rsi     # 0x3ac2d
movl $0x2, %edx
callq 0x60b0
cmpl $0x0, %eax
jne 0x2710c
movl $0x3, -0x24(%rbp)
movl -0x14(%rbp), %eax
subl -0x28(%rbp), %eax
cmpl $0x2, %eax
jge 0x270f2
jmp 0x26fc3
movq -0x20(%rbp), %rax
movl -0x28(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x28(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
jmp 0x27136
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x15817(%rip), %rsi     # 0x3c93a
movb $0x0, %al
callq 0x6b40
movl $0x1, -0x4(%rbp)
jmp 0x27490
jmp 0x27138
jmp 0x2713a
jmp 0x2713c
jmp 0x2713e
jmp 0x27140
movl -0x14(%rbp), %eax
subl -0x28(%rbp), %eax
cmpl $0x2, %eax
jge 0x27150
jmp 0x26fc3
jmp 0x27152
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x26fef
movq -0x20(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x28(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movl -0x14(%rbp), %eax
subl -0x28(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x1, -0x2c(%rbp)
jne 0x271a8
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq -0x2c(%rbp), %rdx
leaq -0x58(%rbp), %rcx
callq 0x115c0
jmp 0x271bb
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x271d1
movl -0x2c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0x271d6
jmp 0x26fc3
movl $0x0, -0x30(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x48(%rbp)
movb %al, -0x79(%rbp)
jne 0x271f5
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
setl %al
movb %al, -0x79(%rbp)
movb -0x79(%rbp), %al
testb $0x1, %al
jne 0x27201
jmp 0x27378
movq -0x58(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
movq -0x68(%rbp), %rsi
leaq 0x16020(%rip), %rdx     # 0x3d240
callq 0x77a0
cmpl $0x0, %eax
je 0x2723b
movl -0x30(%rbp), %eax
movl -0x2c(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jge 0x27353
movl -0x24(%rbp), %eax
movq %rax, -0x88(%rbp)
subq $0x3, %rax
ja 0x27351
movq -0x88(%rbp), %rax
leaq 0xffd3(%rip), %rcx      # 0x37230
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x50(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0xcb50
cmpl $0x0, %eax
je 0x2728d
movq -0x58(%rbp), %rax
movl -0x30(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
jmp 0x27351
movq -0x10(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x50(%rbp), %rdx
xorl %ecx, %ecx
callq 0xcbd0
cmpl $0x0, %eax
je 0x272bf
movq -0x58(%rbp), %rax
movl -0x30(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
jmp 0x27351
movq -0x10(%rbp), %rdi
leaq 0x15664(%rip), %rsi     # 0x3c933
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7990
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x50(%rbp), %rcx
movl -0x34(%rbp), %r8d
callq 0x13d30
movl %eax, -0x6c(%rbp)
movl -0x14(%rbp), %eax
subl -0x28(%rbp), %eax
cmpl $0x1, %eax
jne 0x27321
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq -0x2c(%rbp), %rdx
leaq -0x58(%rbp), %rcx
callq 0x115c0
cmpl $0x0, -0x6c(%rbp)
jge 0x27334
xorl %eax, %eax
subl -0x6c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x27490
cmpl $0x0, -0x6c(%rbp)
je 0x2734f
movq -0x58(%rbp), %rax
movl -0x30(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
jmp 0x27351
jmp 0x27368
movq -0x58(%rbp), %rax
movl -0x30(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
jmp 0x2736a
movl -0x30(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x30(%rbp)
jmp 0x271dd
jmp 0x2737a
movl -0x30(%rbp), %ecx
xorl %eax, %eax
cmpl -0x2c(%rbp), %ecx
movb %al, -0x89(%rbp)
jge 0x273aa
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
leaq 0x14ed7(%rip), %rdx     # 0x3c270
callq 0x77a0
cmpl $0x0, %eax
setne %al
movb %al, -0x89(%rbp)
movb -0x89(%rbp), %al
testb $0x1, %al
jne 0x273b6
jmp 0x273d6
movq -0x58(%rbp), %rax
movl -0x30(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movl -0x30(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x30(%rbp)
jmp 0x2737a
cmpq $0x0, -0x48(%rbp)
je 0x27422
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
leaq 0x14e84(%rip), %rdx     # 0x3c270
callq 0x77a0
cmpl $0x0, %eax
je 0x27422
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rax
movl -0x30(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x15572(%rip), %rsi     # 0x3c984
movb $0x0, %al
callq 0x6b40
movl $0x1, -0x4(%rbp)
jmp 0x27490
jmp 0x27424
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%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 0x27465
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x7a10
movq -0x78(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x48(%rbp)
je 0x27489
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x9b80
movl %eax, -0x4(%rbp)
jmp 0x27490
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)