// File: /workspace/github_c_makefile_star2_O1/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_LoopCoreCommand
static int Jim_LoopCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
    int retval;
    jim_wide i;
    jim_wide limit = 0;
    jim_wide incr = 1;
    Jim_Obj *bodyObjPtr;

    if (argc < 4 || argc > 6) {
        Jim_WrongNumArgs(interp, 1, argv, "var ?first? limit ?incr? body");
        return JIM_ERR;
    }

    retval = Jim_GetWideExpr(interp, argv[2], &i);
    if (argc > 4 && retval == JIM_OK) {
        retval = Jim_GetWideExpr(interp, argv[3], &limit);
    }
    if (argc > 5 && retval == JIM_OK) {
        Jim_GetWideExpr(interp, argv[4], &incr);
    }
    if (retval != JIM_OK) {
        return retval;
    }
    if (argc == 4) {
        limit = i;
        i = 0;
    }
    bodyObjPtr = argv[argc - 1];

    retval = Jim_SetVariable(interp, argv[1], Jim_NewIntObj(interp, i));

    while (((i < limit && incr > 0) || (i > limit && incr < 0)) && retval == JIM_OK) {
        retval = Jim_EvalObj(interp, bodyObjPtr);
        if (JimCheckLoopRetcode(interp, retval)) {
            return retval;
        }
        if (retval == JIM_OK || retval == JIM_CONTINUE) {
            Jim_Obj *objPtr = Jim_GetVariable(interp, argv[1], JIM_ERRMSG);

            retval = JIM_OK;


            i += incr;

            if (objPtr && !Jim_IsShared(objPtr) && objPtr->typePtr == &intObjType) {
                if (argv[1]->typePtr != &variableObjType) {
                    if (Jim_SetVariable(interp, argv[1], objPtr) != JIM_OK) {
                        return JIM_ERR;
                    }
                }
                JimWideValue(objPtr) = i;
                Jim_InvalidateStringRep(objPtr);

                if (argv[1]->typePtr != &variableObjType) {
                    if (Jim_SetVariable(interp, argv[1], objPtr) != JIM_OK) {
                        retval = JIM_ERR;
                        break;
                    }
                }
            }
            else {
                objPtr = Jim_NewIntObj(interp, i);
                retval = Jim_SetVariable(interp, argv[1], objPtr);
                if (retval != JIM_OK) {
                    Jim_FreeNewObj(interp, objPtr);
                }
            }
        }
    }

    if (retval == JIM_OK || retval == JIM_CONTINUE || retval == JIM_BREAK) {
        Jim_SetEmptyResult(interp);
        return JIM_OK;
    }
    return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r13
movl %esi, %r15d
movq %rdi, %rbx
movq $0x0, -0x48(%rbp)
movq $0x1, -0x50(%rbp)
leal -0x7(%r15), %eax
cmpl $-0x4, %eax
ja 0x1c5b1
leaq 0x10efa(%rip), %rcx     # 0x2d490
movl $0x1, %r12d
movq %rbx, %rdi
movl $0x1, %esi
movq %r13, %rdx
callq 0x7454
jmp 0x1c86a
movq 0x10(%r13), %rsi
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0xd80a
movl %eax, %r12d
cmpl $0x5, %r15d
setge %al
testl %r12d, %r12d
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1c5eb
movq 0x18(%r13), %rsi
leaq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0xd80a
movl %eax, %r12d
cmpl $0x6, %r15d
jl 0x1c606
testl %r12d, %r12d
jne 0x1c606
movq 0x20(%r13), %rsi
leaq -0x50(%rbp), %rdx
movq %rbx, %rdi
callq 0xd80a
testl %r12d, %r12d
jne 0x1c86a
cmpl $0x4, %r15d
jne 0x1c625
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movl %r15d, %eax
movq -0x8(%r13,%rax,8), %rax
movq %rax, -0x60(%rbp)
movq 0x8(%r13), %r12
movq -0x40(%rbp), %r14
movq %rbx, %rdi
callq 0xae58
leaq 0x19c98(%rip), %rcx     # 0x362e0
movq %rcx, 0x8(%rax)
movq $0x0, (%rax)
movq %r14, 0x18(%rax)
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x871b
movl %eax, %r12d
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rax
movq -0x40(%rbp), %rdx
movq %r13, -0x58(%rbp)
movq %rax, -0x30(%rbp)
testq %rax, %rax
sets %al
setg %cl
movq %rdx, -0x38(%rbp)
cmpq %rsi, %rdx
setl %r13b
setg %r14b
andb %cl, %r13b
andb %al, %r14b
testb %r13b, %r13b
je 0x1c6a9
testl %r12d, %r12d
je 0x1c6b8
jmp 0x1c823
testl %r12d, %r12d
sete %al
testb %al, %r14b
je 0x1c823
movq %rsi, %r15
movq %rbx, %rdi
movq -0x60(%rbp), %rsi
callq 0x9078
movl %eax, %r12d
leal -0x3(%r12), %eax
cmpl $0x1, %eax
ja 0x1c6e6
movl 0x18(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x18(%rbx)
cmpl $0x1, %eax
jg 0x1c862
testl $0xfffffffb, %r12d      # imm = 0xFFFFFFFB
movq %r15, %rsi
jne 0x1c69a
movq -0x58(%rbp), %r13
movq 0x8(%r13), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x98ef
movq -0x38(%rbp), %r14
addq -0x30(%rbp), %r14
testq %rax, %rax
movq %r14, -0x38(%rbp)
je 0x1c72f
movq %rax, %r12
cmpl $0x1, 0x10(%rax)
jg 0x1c72f
leaq 0x19bb8(%rip), %rax     # 0x362e0
cmpq %rax, 0x8(%r12)
je 0x1c77c
movq %rbx, %rdi
callq 0xae58
movq %rax, %r12
leaq 0x19b9f(%rip), %rax     # 0x362e0
movq %rax, 0x8(%r12)
movq $0x0, (%r12)
movq %r14, 0x18(%r12)
movq 0x8(%r13), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x871b
xorl %r14d, %r14d
testl %eax, %eax
je 0x1c7a2
movq %rbx, %rdi
movq %r12, %rsi
callq 0x759a
movl $0x1, %r12d
jmp 0x1c7a5
movq 0x8(%r13), %rsi
leaq 0x1a5d1(%rip), %rax     # 0x36d58
cmpq %rax, 0x8(%rsi)
je 0x1c7be
movq %rbx, %rdi
movq %r12, %rdx
callq 0x871b
testl %eax, %eax
je 0x1c7be
movl $0x1, %r14d
xorl %r12d, %r12d
movq -0x30(%rbp), %rax
testl %r14d, %r14d
movq -0x38(%rbp), %rdx
movq %r15, %rsi
je 0x1c67c
jmp 0x1c87c
movq %r14, 0x18(%r12)
movq (%r12), %rdi
testq %rdi, %rdi
sete %al
leaq 0x1bac4(%rip), %rcx     # 0x38298
cmpq %rcx, %rdi
sete %cl
orb %al, %cl
jne 0x1c7e6
xorl %esi, %esi
callq *0x1baa2(%rip)          # 0x38288
movq $0x0, (%r12)
movq 0x8(%r13), %rsi
leaq 0x1a55f(%rip), %rax     # 0x36d58
cmpq %rax, 0x8(%rsi)
je 0x1c81b
movq %rbx, %rdi
movq %r12, %rdx
callq 0x871b
movl %eax, %r12d
xorl %eax, %eax
testl %r12d, %r12d
setne %al
leal (%rax,%rax,2), %r14d
jmp 0x1c7a5
xorl %r12d, %r12d
xorl %r14d, %r14d
jmp 0x1c7a5
movq -0x38(%rbp), %rdx
movq %rdx, -0x40(%rbp)
cmpl $0x3, %r12d
je 0x1c836
testl %r12d, %r12d
jne 0x1c86a
movq 0x128(%rbx), %r14
incl 0x10(%r14)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x1c85a
movq %rbx, %rdi
callq 0x759a
movq %r14, (%rbx)
xorl %r12d, %r12d
jmp 0x1c86a
movq -0x38(%rbp), %rdx
movq %rdx, -0x40(%rbp)
movl %r12d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x3, %r14d
je 0x1c827
movl $0x1, %r12d
jmp 0x1c866