// File: /workspace/github_c_makefile_star2_O0/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
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x1, -0x40(%rbp)
cmpl $0x4, -0x14(%rbp)
jl 0x2661f
cmpl $0x6, -0x14(%rbp)
jle 0x26644
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x1, %esi
leaq 0x161c1(%rip), %rcx     # 0x3c7f4
callq 0x7880
movl $0x1, -0x4(%rbp)
jmp 0x2692c
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x30(%rbp), %rdx
callq 0xf830
movl %eax, -0x24(%rbp)
cmpl $0x4, -0x14(%rbp)
jle 0x26680
cmpl $0x0, -0x24(%rbp)
jne 0x26680
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rsi
leaq -0x38(%rbp), %rdx
callq 0xf830
movl %eax, -0x24(%rbp)
cmpl $0x5, -0x14(%rbp)
jle 0x266a1
cmpl $0x0, -0x24(%rbp)
jne 0x266a1
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rsi
leaq -0x40(%rbp), %rdx
callq 0xf830
cmpl $0x0, -0x24(%rbp)
je 0x266b2
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2692c
cmpl $0x4, -0x14(%rbp)
jne 0x266c8
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x8d60
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq %rax, %rdx
callq 0x8df0
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jge 0x26722
cmpq $0x0, -0x40(%rbp)
jg 0x2673d
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x38(%rbp), %rcx
movb %al, -0x69(%rbp)
jle 0x26747
xorl %eax, %eax
cmpq $0x0, -0x40(%rbp)
movb %al, -0x69(%rbp)
jge 0x26747
cmpl $0x0, -0x24(%rbp)
sete %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0x26753
jmp 0x268bd
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x9b80
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x2eea0
cmpl $0x0, %eax
je 0x2677f
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2692c
cmpl $0x0, -0x24(%rbp)
je 0x2678f
cmpl $0x4, -0x24(%rbp)
jne 0x268b8
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movl $0x1, %edx
callq 0xa7b0
movq %rax, -0x50(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x40(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x26878
movq -0x50(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jg 0x26878
movq -0x50(%rbp), %rax
leaq 0x1fc10(%rip), %rcx     # 0x463f0
cmpq %rcx, 0x8(%rax)
jne 0x26878
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
leaq 0x205df(%rip), %rcx     # 0x46dd8
cmpq %rcx, 0x8(%rax)
je 0x26827
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x50(%rbp), %rdx
callq 0x8df0
cmpl $0x0, %eax
je 0x26825
movl $0x1, -0x4(%rbp)
jmp 0x2692c
jmp 0x26827
movq -0x30(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x50(%rbp), %rdi
callq 0xa9b0
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
leaq 0x2058d(%rip), %rcx     # 0x46dd8
cmpq %rcx, 0x8(%rax)
je 0x26876
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x50(%rbp), %rdx
callq 0x8df0
cmpl $0x0, %eax
je 0x26874
movl $0x1, -0x24(%rbp)
jmp 0x268bd
jmp 0x26876
jmp 0x268b6
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x8d60
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x50(%rbp), %rdx
callq 0x8df0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x268b4
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x7a10
jmp 0x268b6
jmp 0x268b8
jmp 0x26711
cmpl $0x0, -0x24(%rbp)
je 0x268cf
cmpl $0x4, -0x24(%rbp)
je 0x268cf
cmpl $0x3, -0x24(%rbp)
jne 0x26926
jmp 0x268d1
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x26912
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x7a10
movq -0x58(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x2692c
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)