// File: /workspace/github_c_makefile_star2_O2/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_ReturnCoreCommand
static int Jim_ReturnCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
    int i;
    Jim_Obj *stackTraceObj = NULL;
    Jim_Obj *errorCodeObj = NULL;
    int returnCode = JIM_OK;
    long level = 1;

    for (i = 1; i < argc - 1; i += 2) {
        if (Jim_CompareStringImmediate(interp, argv[i], "-code")) {
            if (Jim_GetReturnCode(interp, argv[i + 1], &returnCode) == JIM_ERR) {
                return JIM_ERR;
            }
        }
        else if (Jim_CompareStringImmediate(interp, argv[i], "-errorinfo")) {
            stackTraceObj = argv[i + 1];
        }
        else if (Jim_CompareStringImmediate(interp, argv[i], "-errorcode")) {
            errorCodeObj = argv[i + 1];
        }
        else if (Jim_CompareStringImmediate(interp, argv[i], "-level")) {
            if (Jim_GetLong(interp, argv[i + 1], &level) != JIM_OK || level < 0) {
                Jim_SetResultFormatted(interp, "bad level \"%#s\"", argv[i + 1]);
                return JIM_ERR;
            }
        }
        else {
            break;
        }
    }

    if (i != argc - 1 && i != argc) {
        Jim_WrongNumArgs(interp, 1, argv,
            "?-code code? ?-errorinfo stacktrace? ?-level level? ?result?");
    }


    if (stackTraceObj && returnCode == JIM_ERR) {
        JimSetStackTrace(interp, stackTraceObj);
    }

    if (errorCodeObj && returnCode == JIM_ERR) {
        Jim_SetGlobalVariableStr(interp, "errorCode", errorCodeObj);
    }
    interp->returnCode = returnCode;
    interp->returnLevel = level;

    if (i == argc - 1) {
        Jim_SetResult(interp, argv[i]);
    }
    return level == 0 ? returnCode : JIM_RETURN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq -0x2c(%rbp), %rax
andl $0x0, (%rax)
leaq -0x50(%rbp), %rax
movq $0x1, (%rax)
movq %rsi, -0x58(%rbp)
leal -0x1(%rsi), %eax
movslq %eax, %r12
pushq $0x1
popq %rax
movq %rax, -0x38(%rbp)
pushq $0x2
popq %r15
movq $0x0, -0x48(%rbp)
leaq 0xc952(%rip), %r13      # 0x27e31
movq $0x0, -0x40(%rbp)
leaq -0x1(%r15), %rax
cmpq %r12, %rax
jge 0x1b5b3
movq -0x8(%r14,%r15,8), %rsi
movq %rbx, %rdi
movq %r13, %rdx
callq 0x7223
testl %eax, %eax
je 0x1b525
movq (%r14,%r15,8), %rsi
movq %rbx, %rdi
leaq -0x2c(%rbp), %rdx
callq 0xe9c5
testl %eax, %eax
je 0x1b5aa
jmp 0x1b679
movq -0x8(%r14,%r15,8), %rsi
movq %rbx, %rdi
leaq 0xd597(%rip), %rdx      # 0x28acb
callq 0x7223
testl %eax, %eax
je 0x1b547
movq (%r14,%r15,8), %rax
movq %rax, -0x48(%rbp)
jmp 0x1b5aa
movq -0x8(%r14,%r15,8), %rsi
movq %rbx, %rdi
leaq 0xd580(%rip), %rdx      # 0x28ad6
callq 0x7223
testl %eax, %eax
je 0x1b569
movq (%r14,%r15,8), %rax
movq %rax, -0x40(%rbp)
jmp 0x1b5aa
movq -0x8(%r14,%r15,8), %rsi
movq %rbx, %rdi
leaq 0xd569(%rip), %rdx      # 0x28ae1
callq 0x7223
testl %eax, %eax
je 0x1b5b3
movq (%r14,%r15,8), %rsi
movq %rbx, %rdi
leaq -0x50(%rbp), %rdx
callq 0xc8cb
testl %eax, %eax
jne 0x1b664
movq -0x50(%rbp), %rax
movq %rax, -0x38(%rbp)
testq %rax, %rax
js 0x1b664
addq $0x2, %r15
jmp 0x1b4e7
subl -0x58(%rbp), %r15d
testl $0xfffffffe, %r15d      # imm = 0xFFFFFFFE
je 0x1b5d5
leaq 0xd531(%rip), %rcx      # 0x28af8
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x72a5
movq -0x48(%rbp), %rsi
testq %rsi, %rsi
setne %al
movl -0x2c(%rbp), %r13d
cmpl $0x1, %r13d
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1b5f9
movq %rbx, %rdi
callq 0x191a6
cmpl $0x1, %r13d
sete %al
movq -0x40(%rbp), %rdx
testq %rdx, %rdx
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1b620
leaq 0xc3c7(%rip), %rsi      # 0x279df
movq %rbx, %rdi
callq 0xb985
movl %r13d, 0x28(%rbx)
movq -0x38(%rbp), %rax
movl %eax, 0x2c(%rbx)
testl %r15d, %r15d
jne 0x1b658
movq (%r14,%r12,8), %r14
incl 0x10(%r14)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x1b651
movq %rbx, %rdi
callq 0x73bf
movq %r14, (%rbx)
movq -0x38(%rbp), %rax
testq %rax, %rax
pushq $0x2
popq %rax
cmovel %r13d, %eax
jmp 0x1b67c
movq (%r14,%r15,8), %rdx
leaq 0xd479(%rip), %rsi      # 0x28ae8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x68a7
pushq $0x1
popq %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq