// File: /workspace/github_c_makefile_star2_O2/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_IfCoreCommand
static int Jim_IfCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
    int boolean, retval, current = 1, falsebody = 0;

    if (argc >= 3) {
        while (1) {

            if (current >= argc)
                goto err;
            if ((retval = Jim_GetBoolFromExpr(interp, argv[current++], &boolean))
                != JIM_OK)
                return retval;

            if (current >= argc)
                goto err;
            if (Jim_CompareStringImmediate(interp, argv[current], "then"))
                current++;

            if (current >= argc)
                goto err;
            if (boolean)
                return Jim_EvalObj(interp, argv[current]);

            if (++current >= argc) {
                Jim_SetResult(interp, Jim_NewEmptyStringObj(interp));
                return JIM_OK;
            }
            falsebody = current++;
            if (Jim_CompareStringImmediate(interp, argv[falsebody], "else")) {

                if (current != argc - 1)
                    goto err;
                return Jim_EvalObj(interp, argv[current]);
            }
            else if (Jim_CompareStringImmediate(interp, argv[falsebody], "elseif"))
                continue;

            else if (falsebody != argc - 1)
                goto err;
            return Jim_EvalObj(interp, argv[falsebody]);
        }
        return JIM_OK;
    }
  err:
    Jim_WrongNumArgs(interp, 1, argv, "condition ?then? trueBody ?elseif ...? ?else? falseBody");
    return JIM_ERR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
cmpl $0x3, %esi
jl 0x19da3
movl %esi, %r15d
pushq $0x1
popq %r12
movl %esi, -0x2c(%rbp)
cmpl %r15d, %r12d
jge 0x19da3
movslq %r12d, %rax
movq (%r14,%rax,8), %rsi
movq %rdi, %rbx
leaq -0x30(%rbp), %rdx
callq 0xeb85
testl %eax, %eax
jne 0x19d2d
leal 0x1(%r12), %r13d
cmpl %r15d, %r13d
movq %rbx, %rdi
jge 0x19da3
movslq %r13d, %rax
movq (%r14,%rax,8), %rsi
leaq 0xe863(%rip), %rdx      # 0x28510
callq 0x7223
testl %eax, %eax
je 0x19cbd
addl $0x2, %r12d
movl %r12d, %r13d
cmpl %r15d, %r13d
movq %rbx, %rdi
jge 0x19da3
cmpl $0x0, -0x30(%rbp)
jne 0x19d35
leal 0x1(%r13), %eax
cmpl %r15d, %eax
jge 0x19d3a
leal 0x2(%r13), %r12d
movslq %eax, %rbx
movq (%r14,%rbx,8), %rsi
movq %r14, %r15
movq %rdi, %r14
leaq 0xe825(%rip), %rdx      # 0x28515
callq 0x7223
testl %eax, %eax
jne 0x19d78
movq (%r15,%rbx,8), %rsi
movq %r14, %rdi
leaq 0xe813(%rip), %rdx      # 0x2851a
callq 0x7223
testl %eax, %eax
movq %r14, %rdi
movq %r15, %r14
movl -0x2c(%rbp), %r15d
jne 0x19c6a
addl $-0x2, %r15d
cmpl %r15d, %r13d
jne 0x19da3
movq (%r14,%rbx,8), %rsi
jmp 0x19d90
movl %eax, %r13d
jmp 0x19db9
movslq %r13d, %rax
jmp 0x19d8c
leaq 0xf900(%rip), %rsi      # 0x29641
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x7363
movq %rbx, %rdx
movq %rax, %r14
incl 0x10(%rax)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x19d73
movq %rbx, %rdi
callq 0x73bf
movq %rbx, %rdx
movq %r14, (%rdx)
jmp 0x19db9
movl -0x2c(%rbp), %eax
addl $-0x3, %eax
cmpl %eax, %r13d
movq %r14, %rdi
movq %r15, %r14
jne 0x19da3
movslq %r12d, %rax
movq (%r14,%rax,8), %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8b54
pushq $0x1
popq %r13
leaq 0xe773(%rip), %rcx      # 0x28521
movl %r13d, %esi
movq %r14, %rdx
callq 0x72a5
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq