// File: /workspace/github_c_makefile_star2_O1/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 0x1ccb0
movl %esi, %r15d
movl $0x1, %r12d
movl %esi, -0x2c(%rbp)
cmpl %r15d, %r12d
jge 0x1ccb0
movslq %r12d, %rax
movq (%r14,%rax,8), %rsi
movq %rdi, %rbx
leaq -0x30(%rbp), %rdx
callq 0xfcb7
testl %eax, %eax
jne 0x1cc28
leal 0x1(%r12), %r13d
cmpl %r15d, %r13d
movq %rbx, %rdi
jge 0x1ccb0
movslq %r13d, %rax
movq (%r14,%rax,8), %rsi
leaq 0x1097e(%rip), %rdx     # 0x2d51e
callq 0x73d6
testl %eax, %eax
je 0x1cbb0
addl $0x2, %r12d
movl %r12d, %r13d
cmpl %r15d, %r13d
movq %rbx, %rdi
jge 0x1ccb0
cmpl $0x0, -0x30(%rbp)
jne 0x1cc30
leal 0x1(%r13), %eax
cmpl %r15d, %eax
jge 0x1cc35
leal 0x2(%r13), %r12d
movslq %eax, %rbx
movq (%r14,%rbx,8), %rsi
movq %r14, %r15
movq %rdi, %r14
leaq 0x10940(%rip), %rdx     # 0x2d523
callq 0x73d6
testl %eax, %eax
jne 0x1cc85
movq (%r15,%rbx,8), %rsi
movq %r14, %rdi
leaq 0x1092a(%rip), %rdx     # 0x2d528
callq 0x73d6
testl %eax, %eax
movq %r14, %rdi
movq %r15, %r14
movl -0x2c(%rbp), %r15d
jne 0x1cb5d
addl $-0x2, %r15d
cmpl %r15d, %r13d
jne 0x1ccb0
movq (%r14,%rbx,8), %rsi
jmp 0x1cc9d
movl %eax, %r13d
jmp 0x1ccca
movslq %r13d, %rax
jmp 0x1cc99
movq %rbx, %rdi
callq 0xae58
movq %rbx, %rdx
movq %rax, %r14
leaq 0x1b64e(%rip), %rax     # 0x38298
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 0x1cc7d
movq %rbx, %rdi
callq 0x759a
movq %rbx, %rdx
movq %r14, (%rdx)
xorl %r13d, %r13d
jmp 0x1ccca
movl -0x2c(%rbp), %eax
addl $-0x3, %eax
cmpl %eax, %r13d
movq %r14, %rdi
movq %r15, %r14
jne 0x1ccb0
movslq %r12d, %rax
movq (%r14,%rax,8), %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9078
leaq 0x10878(%rip), %rcx     # 0x2d52f
movl $0x1, %r13d
movl $0x1, %esi
movq %r14, %rdx
callq 0x7454
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq