// File: /workspace/github_c_makefile_star2_O3/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 0x1c674
movl %esi, %r15d
movl $0x1, %r12d
movl %esi, -0x2c(%rbp)
cmpl %r15d, %r12d
jge 0x1c674
movslq %r12d, %rax
movq (%r14,%rax,8), %rsi
movq %rdi, %rbx
leaq -0x30(%rbp), %rdx
callq 0xfc6e
testl %eax, %eax
jne 0x1c5ec
leal 0x1(%r12), %r13d
cmpl %r15d, %r13d
movq %rbx, %rdi
jge 0x1c674
movslq %r13d, %rax
movq (%r14,%rax,8), %rsi
leaq 0xff5c(%rip), %rdx      # 0x2c4c0
callq 0x73c6
testl %eax, %eax
je 0x1c574
addl $0x2, %r12d
movl %r12d, %r13d
cmpl %r15d, %r13d
movq %rbx, %rdi
jge 0x1c674
cmpl $0x0, -0x30(%rbp)
jne 0x1c5f4
leal 0x1(%r13), %eax
cmpl %r15d, %eax
jge 0x1c5f9
leal 0x2(%r13), %r12d
movslq %eax, %rbx
movq (%r14,%rbx,8), %rsi
movq %r14, %r15
movq %rdi, %r14
leaq 0xff1e(%rip), %rdx      # 0x2c4c5
callq 0x73c6
testl %eax, %eax
jne 0x1c649
movq (%r15,%rbx,8), %rsi
movq %r14, %rdi
leaq 0xff08(%rip), %rdx      # 0x2c4ca
callq 0x73c6
testl %eax, %eax
movq %r14, %rdi
movq %r15, %r14
movl -0x2c(%rbp), %r15d
jne 0x1c521
addl $-0x2, %r15d
cmpl %r15d, %r13d
jne 0x1c674
movq (%r14,%rbx,8), %rsi
jmp 0x1c661
movl %eax, %r13d
jmp 0x1c68e
movslq %r13d, %rax
jmp 0x1c65d
movq %rbx, %rdi
callq 0xae38
movq %rbx, %rdx
movq %rax, %r14
leaq 0x1ac8a(%rip), %rax     # 0x37298
movq %rax, (%r14)
movl $0x0, 0x14(%r14)
movq $0x0, 0x8(%r14)
incl 0x10(%r14)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x1c641
movq %rbx, %rdi
callq 0x758c
movq %rbx, %rdx
movq %r14, (%rdx)
xorl %r13d, %r13d
jmp 0x1c68e
movl -0x2c(%rbp), %eax
addl $-0x3, %eax
cmpl %eax, %r13d
movq %r14, %rdi
movq %r15, %r14
jne 0x1c674
movslq %r12d, %rax
movq (%r14,%rax,8), %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x908a
leaq 0xfe56(%rip), %rcx      # 0x2c4d1
movl $0x1, %r13d
movl $0x1, %esi
movq %r14, %rdx
callq 0x7446
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq