// File: /workspace/github_c_makefile_star2_O1/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_EvalObj
int Jim_EvalObj(Jim_Interp *interp, Jim_Obj *scriptObjPtr)
{
    int i;
    ScriptObj *script;
    ScriptToken *token;
    int retcode = JIM_OK;
    Jim_Obj *sargv[JIM_EVAL_SARGV_LEN], **argv = NULL;
    Jim_EvalFrame frame;

    if (Jim_IsList(scriptObjPtr) && scriptObjPtr->bytes == NULL) {
        return JimEvalObjList(interp, scriptObjPtr);
    }

    Jim_IncrRefCount(scriptObjPtr);
    script = JimGetScript(interp, scriptObjPtr);
    if (JimParseCheckMissing(interp, script->missing) == JIM_ERR) {
        JimSetErrorStack(interp, script);
        Jim_DecrRefCount(interp, scriptObjPtr);
        return JIM_ERR;
    }

    Jim_SetEmptyResult(interp);

    token = script->token;

#ifdef JIM_OPTIMIZATION
    if (script->len == 0) {
        Jim_DecrRefCount(interp, scriptObjPtr);
        return JIM_OK;
    }
    if (script->len == 3
        && token[1].objPtr->typePtr == &commandObjType
        && token[1].objPtr->internalRep.cmdValue.cmdPtr->isproc == 0
        && token[1].objPtr->internalRep.cmdValue.cmdPtr->u.native.cmdProc == Jim_IncrCoreCommand
        && token[2].objPtr->typePtr == &variableObjType) {

        Jim_Obj *objPtr = Jim_GetVariable(interp, token[2].objPtr, JIM_NONE);

        if (objPtr && !Jim_IsShared(objPtr) && objPtr->typePtr == &intObjType) {
            JimWideValue(objPtr)++;
            Jim_InvalidateStringRep(objPtr);
            Jim_DecrRefCount(interp, scriptObjPtr);
            Jim_SetResult(interp, objPtr);
            return JIM_OK;
        }
    }
#endif

    script->inUse++;

    JimPushEvalFrame(interp, &frame, scriptObjPtr);


    interp->errorFlag = 0;
    argv = sargv;

    for (i = 0; i < script->len && retcode == JIM_OK; ) {
        int argc;
        int j;


        argc = token[i].objPtr->internalRep.scriptLineValue.argc;
        script->linenr = token[i].objPtr->internalRep.scriptLineValue.line;


        if (argc > JIM_EVAL_SARGV_LEN)
            argv = Jim_Alloc(sizeof(Jim_Obj *) * argc);


        i++;

        for (j = 0; j < argc; j++) {
            long wordtokens = 1;
            int expand = 0;
            Jim_Obj *wordObjPtr = NULL;

            if (token[i].type == JIM_TT_WORD) {
                wordtokens = JimWideValue(token[i++].objPtr);
                if (wordtokens < 0) {
                    expand = 1;
                    wordtokens = -wordtokens;
                }
            }

            if (wordtokens == 1) {

                switch (token[i].type) {
                    case JIM_TT_ESC:
                    case JIM_TT_STR:
                        wordObjPtr = token[i].objPtr;
                        break;
                    case JIM_TT_VAR:
                        wordObjPtr = Jim_GetVariable(interp, token[i].objPtr, JIM_ERRMSG);
                        break;
                    case JIM_TT_EXPRSUGAR:
                        retcode = Jim_EvalExpression(interp, token[i].objPtr);
                        if (retcode == JIM_OK) {
                            wordObjPtr = Jim_GetResult(interp);
                        }
                        else {
                            wordObjPtr = NULL;
                        }
                        break;
                    case JIM_TT_DICTSUGAR:
                        wordObjPtr = JimExpandDictSugar(interp, token[i].objPtr);
                        break;
                    case JIM_TT_CMD:
                        retcode = Jim_EvalObj(interp, token[i].objPtr);
                        if (retcode == JIM_OK) {
                            wordObjPtr = Jim_GetResult(interp);
                        }
                        break;
                    default:
                        JimPanic((1, "default token type reached " "in Jim_EvalObj()."));
                }
            }
            else {
                wordObjPtr = JimInterpolateTokens(interp, token + i, wordtokens, JIM_NONE);
            }

            if (!wordObjPtr) {
                if (retcode == JIM_OK) {
                    retcode = JIM_ERR;
                }
                break;
            }

            Jim_IncrRefCount(wordObjPtr);
            i += wordtokens;

            if (!expand) {
                argv[j] = wordObjPtr;
            }
            else {

                int len = Jim_ListLength(interp, wordObjPtr);
                int newargc = argc + len - 1;
                int k;

                if (len > 1) {
                    if (argv == sargv) {
                        if (newargc > JIM_EVAL_SARGV_LEN) {
                            argv = Jim_Alloc(sizeof(*argv) * newargc);
                            memcpy(argv, sargv, sizeof(*argv) * j);
                        }
                    }
                    else {

                        argv = Jim_Realloc(argv, sizeof(*argv) * newargc);
                    }
                }


                for (k = 0; k < len; k++) {
                    argv[j++] = wordObjPtr->internalRep.listValue.ele[k];
                    Jim_IncrRefCount(wordObjPtr->internalRep.listValue.ele[k]);
                }

                Jim_DecrRefCount(interp, wordObjPtr);


                j--;
                argc += len - 1;
            }
        }

        if (retcode == JIM_OK && argc) {

            retcode = JimInvokeCommand(interp, argc, argv);

            if (Jim_CheckSignal(interp)) {
                retcode = JIM_SIGNAL;
            }
        }


        while (j-- > 0) {
            Jim_DecrRefCount(interp, argv[j]);
        }

        if (argv != sargv) {
            Jim_Free(argv);
            argv = sargv;
        }
    }


    if (retcode == JIM_ERR) {
        JimSetErrorStack(interp, NULL);
    }

    JimPopEvalFrame(interp);

    Jim_FreeIntRep(interp, scriptObjPtr);
    scriptObjPtr->typePtr = &scriptObjType;
    Jim_SetIntRepPtr(scriptObjPtr, script);
    Jim_DecrRefCount(interp, scriptObjPtr);

    return retcode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x2d2bf(%rip), %rax     # 0x36358
cmpq %rax, 0x8(%rsi)
jne 0x90a9
cmpq $0x0, (%r14)
je 0x94f9
incl 0x10(%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0xb66b
movq %rax, %rbx
movl 0x24(%rax), %esi
movq %r15, %rdi
callq 0x10a87
testl %eax, %eax
je 0x9103
movq %r15, %rdi
movq %rbx, %rsi
callq 0x10b0c
movl 0x10(%r14), %edx
leal -0x1(%rdx), %ecx
movl %ecx, 0x10(%r14)
movl $0x1, %eax
cmpl $0x1, %edx
jg 0x958a
movq %r15, %rdi
movq %r14, %rsi
callq 0x759a
movl $0x1, %eax
jmp 0x958a
movq %rbx, -0x40(%rbp)
movq 0x128(%r15), %rbx
incl 0x10(%rbx)
movq (%r15), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x912a
movq %r15, %rdi
callq 0x759a
movq %rbx, (%r15)
movq -0x40(%rbp), %rdx
movq (%rdx), %rax
movq %rax, -0x38(%rbp)
incl 0x18(%rdx)
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movq $0x0, -0x60(%rbp)
movq 0x108(%r15), %rax
movq %rax, -0x78(%rbp)
movl 0x8(%rax), %ecx
incl %ecx
movl %ecx, -0x88(%rbp)
movl 0x110(%r15), %ecx
movl %ecx, -0x84(%rbp)
movq 0x58(%r15), %rcx
movq %rcx, -0x90(%rbp)
movq %r14, %rcx
testq %r14, %r14
jne 0x918f
movq 0x30(%rax), %rcx
movq %r14, -0x58(%rbp)
leaq -0x90(%rbp), %rax
movq %rcx, 0x30(%rax)
movq %rax, 0x108(%r15)
movl $0x0, 0x1b4(%r15)
cmpl $0x0, 0x10(%rdx)
jle 0x9515
leaq -0xd0(%rbp), %r13
xorl %esi, %esi
movq %r15, -0x48(%rbp)
movq -0x38(%rbp), %rcx
movslq %esi, %rax
shlq $0x4, %rax
movq (%rcx,%rax), %rax
movslq 0x1c(%rax), %r12
movl 0x18(%rax), %eax
movl %eax, 0x20(%rdx)
cmpq $0x9, %r12
jl 0x9203
movq %rsi, %rbx
leaq (,%r12,8), %rsi
xorl %edi, %edi
callq *0x2f08f(%rip)          # 0x38288
movq %rbx, %rsi
movq -0x38(%rbp), %rcx
movq %rax, %r13
incl %esi
testl %r12d, %r12d
jle 0x9454
xorl %ebx, %ebx
movl $0x0, -0x30(%rbp)
movq %r12, -0x50(%rbp)
movslq %esi, %rax
shlq $0x4, %rax
cmpl $0xa, 0x8(%rcx,%rax)
jne 0x9248
addq %rcx, %rax
incl %esi
movq (%rax), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
setns %r8b
movq %rax, %r12
negq %r12
cmovsq %rax, %r12
jmp 0x9251
movb $0x1, %r8b
movl $0x1, %r12d
movq %r15, %rdi
movq %rsi, %r14
movslq %esi, %rsi
shlq $0x4, %rsi
addq %rcx, %rsi
cmpq $0x1, %r12
jne 0x928b
movl 0x8(%rsi), %eax
leal -0x1(%rax), %ecx
cmpl $0x4, %ecx
ja 0x9320
leaq 0x1ee27(%rip), %rdx     # 0x280a4
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movq (%rsi), %r15
jmp 0x929e
movl %r8d, %r15d
movl %r12d, %edx
xorl %ecx, %ecx
callq 0x10c96
movl %r15d, %r8d
movq %rax, %r15
movq -0x38(%rbp), %rcx
movq %r14, %rsi
testq %r15, %r15
je 0x92c0
incl 0x10(%r15)
addl %r12d, %esi
testb %r8b, %r8b
je 0x92d5
movslq %ebx, %rax
movq %r15, (%r13,%rax,8)
jmp 0x92cc
movl -0x30(%rbp), %eax
cmpl $0x1, %eax
adcl $0x0, %eax
movl %eax, -0x30(%rbp)
movq -0x50(%rbp), %r12
jmp 0x9424
movq %rsi, %r14
movq -0x48(%rbp), %rdi
movq %r15, %rsi
callq 0xe338
movslq 0x20(%r15), %r12
cmpq $0x2, %r12
jl 0x93b5
movq -0x50(%rbp), %rdx
leal (%r12,%rdx), %eax
decl %eax
leaq -0xd0(%rbp), %rcx
cmpq %rcx, %r13
je 0x9385
movslq %eax, %rsi
shlq $0x3, %rsi
movq %r13, %rdi
callq *0x2ef70(%rip)          # 0x38288
movq %rax, %r13
jmp 0x93b5
cmpl $0x11, %eax
jne 0x9336
movb %r8b, -0x29(%rbp)
movq (%rsi), %rsi
movq %rdi, %r15
callq 0xd8dd
jmp 0x934d
xorl %r15d, %r15d
jmp 0x929e
movb %r8b, -0x29(%rbp)
movq (%rsi), %rsi
movq %rdi, %r15
callq 0x9078
testl %eax, %eax
je 0x943a
movl %eax, -0x30(%rbp)
xorl %r15d, %r15d
jmp 0x9444
movq (%rsi), %rsi
movl %r8d, %r15d
movl $0x1, %edx
callq 0x98ef
jmp 0x9298
movq (%rsi), %rsi
movl %r8d, %r15d
callq 0x10c0e
jmp 0x9298
leal (%r12,%rdx), %ecx
cmpl $0xa, %ecx
jl 0x93b5
movl %eax, %esi
shlq $0x3, %rsi
xorl %edi, %edi
callq *0x2eeec(%rip)          # 0x38288
movq %rax, %r13
movslq %ebx, %rdx
shlq $0x3, %rdx
movq %rax, %rdi
leaq -0xd0(%rbp), %rsi
callq 0x6320
testl %r12d, %r12d
jle 0x93f0
movslq %ebx, %rax
leaq (,%rax,8), %rcx
addq %r13, %rcx
xorl %eax, %eax
movq %r14, %rsi
movq 0x18(%r15), %rdx
movq (%rdx,%rax,8), %rdx
movq %rdx, (%rcx,%rax,8)
movq 0x18(%r15), %rdx
movq (%rdx,%rax,8), %rdx
incl 0x10(%rdx)
incq %rax
cmpq %rax, %r12
jne 0x93cd
addl %eax, %ebx
jmp 0x93f3
movq %r14, %rsi
movl 0x10(%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r15)
cmpl $0x1, %eax
jg 0x9412
movq -0x48(%rbp), %rdi
movq %r15, %rsi
callq 0x759a
movq %r14, %rsi
decl %ebx
movq -0x50(%rbp), %rax
addl %r12d, %eax
decl %eax
movq %rax, %r12
movq -0x38(%rbp), %rcx
testq %r15, %r15
je 0x945f
incl %ebx
cmpl %r12d, %ebx
movq -0x48(%rbp), %r15
jl 0x9217
jmp 0x9463
movq (%r15), %r15
movl $0x0, -0x30(%rbp)
movq -0x38(%rbp), %rcx
movq %r14, %rsi
movb -0x29(%rbp), %r8b
jmp 0x92a5
movl $0x0, -0x30(%rbp)
xorl %ebx, %ebx
jmp 0x9463
movq -0x48(%rbp), %r15
movq %rsi, %r14
movl -0x30(%rbp), %eax
testl %eax, %eax
jne 0x9494
testl %r12d, %r12d
je 0x9494
movq %r15, %rdi
movl %r12d, %esi
movq %r13, %rdx
callq 0x10640
cmpl $0x0, 0x40(%r15)
je 0x9494
cmpq $0x0, 0x48(%r15)
movl $0x5, %ecx
cmovnel %ecx, %eax
movl %eax, %r12d
testl %ebx, %ebx
jle 0x94c4
movl %ebx, %ebx
incq %rbx
movq -0x10(%r13,%rbx,8), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x94bb
movq %r15, %rdi
callq 0x759a
decq %rbx
cmpq $0x1, %rbx
jg 0x94a0
leaq -0xd0(%rbp), %rbx
cmpq %rbx, %r13
je 0x94de
movq %r13, %rdi
xorl %esi, %esi
callq *0x2edad(%rip)          # 0x38288
movq %rbx, %r13
movq -0x40(%rbp), %rdx
movq %r14, %rsi
cmpl 0x10(%rdx), %esi
movq -0x38(%rbp), %rcx
jge 0x9518
testl %r12d, %r12d
je 0x91cb
jmp 0x9518
movq %r15, %rdi
movq %r14, %rsi
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x109ce
xorl %r12d, %r12d
movl %r12d, %r14d
cmpl $0x1, %r12d
jne 0x952b
movq %r15, %rdi
xorl %esi, %esi
callq 0x10b0c
movq 0x108(%r15), %rax
movq 0x18(%rax), %rax
movq %rax, 0x108(%r15)
movq -0x58(%rbp), %rbx
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x955b
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x955b
movq %r15, %rdi
movq %rbx, %rsi
callq *%rax
leaq 0x2cc9e(%rip), %rax     # 0x36200
movq %rax, 0x8(%rbx)
movq -0x40(%rbp), %rax
movq %rax, 0x18(%rbx)
movl 0x10(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rbx)
cmpl $0x1, %eax
jg 0x9587
movq %r15, %rdi
movq %rbx, %rsi
callq 0x759a
movl %r14d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq