// File: /workspace/github_c_makefile_star2_O2/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 $0xc8, %rsp
movq %rsi, %r14
movq %rdi, %r12
leaq 0x28893(%rip), %rax     # 0x31408
cmpq %rax, 0x8(%rsi)
jne 0x8b85
cmpq $0x0, (%r14)
je 0x908f
incl 0x10(%r14)
movq %r12, %rdi
movq %r14, %rsi
callq 0xad8c
movq %rax, %rbx
movl 0x24(%rax), %esi
movq %r12, %rdi
callq 0xf7d0
testl %eax, %eax
je 0x8bd4
pushq $0x1
popq %r15
movq %r12, %rdi
movq %rbx, %rsi
callq 0xf84c
movl 0x10(%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r14)
cmpl $0x1, %eax
jg 0x907a
movq %r12, %rdi
movq %r14, %rsi
jmp 0x9075
movq %rbx, -0x58(%rbp)
movq 0x128(%r12), %rbx
incl 0x10(%rbx)
movq (%r12), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x8bfd
movq %r12, %rdi
callq 0x73bf
movq %rbx, (%r12)
movq -0x58(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x60(%rbp)
incl 0x18(%rax)
xorps %xmm0, %xmm0
leaq -0xe8(%rbp), %rax
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movq 0x108(%r12), %rcx
movq %rcx, 0x18(%rax)
movl 0x8(%rcx), %ecx
incl %ecx
movl %ecx, 0x8(%rax)
movl 0x110(%r12), %ecx
movl %ecx, 0xc(%rax)
movq 0x58(%r12), %rcx
movq %rcx, (%rax)
movq %r14, -0x70(%rbp)
movq %r14, 0x30(%rax)
movq %rax, 0x108(%r12)
andl $0x0, 0x1b4(%r12)
xorl %r15d, %r15d
leaq -0xb0(%rbp), %r13
xorl %r14d, %r14d
movq %r12, -0x40(%rbp)
movq -0x58(%rbp), %rax
cmpl 0x10(%rax), %r14d
jge 0x900c
testl %r15d, %r15d
jne 0x900c
movslq %r14d, %rax
shlq $0x4, %rax
movq -0x60(%rbp), %r15
movq (%r15,%rax), %rax
movslq 0x1c(%rax), %r8
movl 0x18(%rax), %eax
movq -0x58(%rbp), %rcx
movl %eax, 0x20(%rcx)
cmpq $0x9, %r8
jl 0x8cc5
leaq (,%r8,8), %rsi
xorl %edi, %edi
movq %r8, %rbx
callq *0x2a5c9(%rip)          # 0x33288
movq %rbx, %r8
movq %rax, %r13
incl %r14d
xorl %r12d, %r12d
movslq %r12d, %rdi
shlq $0x3, %rdi
xorl %r9d, %r9d
movl %r12d, -0x64(%rbp)
movq %r13, -0x48(%rbp)
movq %r8, -0x38(%rbp)
cmpl %r8d, %r12d
jge 0x8f72
movslq %r14d, %rsi
movq %rsi, %rcx
shlq $0x4, %rcx
movl 0x8(%r15,%rcx), %eax
movb $0x1, %bl
cmpl $0xa, %eax
jne 0x8d36
addq %r15, %rcx
incl %r14d
movq (%rcx), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
setns %bl
movq %rax, %r13
negq %r13
cmovsq %rax, %r13
movslq %r14d, %rsi
cmpq $0x1, %r13
jne 0x8d5d
movq %rsi, %rax
shlq $0x4, %rax
movl 0x8(%r15,%rax), %eax
movq -0x48(%rbp), %r13
shlq $0x4, %rsi
addq %r15, %rsi
leal -0x1(%rax), %ecx
cmpl $0x4, %ecx
ja 0x8d98
leaq 0x1a2f8(%rip), %rdx     # 0x23044
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movq (%rsi), %r15
jmp 0x8e27
shlq $0x4, %rsi
addq %r15, %rsi
movq %rdi, -0x50(%rbp)
movq -0x40(%rbp), %rdi
movl %r13d, %edx
xorl %ecx, %ecx
movl %r12d, %r15d
movl %ebx, %r12d
movl %r9d, %ebx
callq 0xf9b2
movl %ebx, %r9d
movl %r12d, %ebx
movl %r15d, %r12d
movq -0x50(%rbp), %rdi
movq -0x38(%rbp), %r8
movq %rax, %r15
jmp 0x8e2d
cmpl $0x11, %eax
jne 0x9007
movl %r9d, -0x2c(%rbp)
movq %rdi, -0x50(%rbp)
movq (%rsi), %rsi
movq -0x40(%rbp), %r13
movq %r13, %rdi
callq 0xcb7c
jmp 0x8dd1
movl %r9d, -0x2c(%rbp)
movq %rdi, -0x50(%rbp)
movq (%rsi), %rsi
movq -0x40(%rbp), %r13
movq %r13, %rdi
callq 0x8b54
testl %eax, %eax
jne 0x8faa
movq (%r13), %r15
pushq $0x1
popq %rax
movl %eax, %r13d
movq -0x38(%rbp), %r8
movq -0x50(%rbp), %rdi
movl -0x2c(%rbp), %r9d
jmp 0x8e2d
movq (%rsi), %rsi
movq %rdi, %r15
movq -0x40(%rbp), %rdi
pushq $0x1
popq %rdx
movl %r9d, %r13d
callq 0x9378
jmp 0x8e1a
movq (%rsi), %rsi
movq %rdi, %r15
movq -0x40(%rbp), %rdi
movl %r9d, %r13d
callq 0xf92d
movl %r13d, %r9d
movq %r15, %rdi
movq -0x38(%rbp), %r8
movq %rax, %r15
pushq $0x1
popq %rax
movl %eax, %r13d
testq %r15, %r15
je 0x8fa0
incl 0x10(%r15)
addl %r13d, %r14d
movslq %r12d, %r13
testb %bl, %bl
je 0x8e62
movq -0x48(%rbp), %rax
movq %r15, (%rax,%r13,8)
movq %rax, %r13
incl %r12d
addq $0x8, %rdi
incl %r9d
movq -0x60(%rbp), %r15
jmp 0x8ce1
movl %r9d, -0x2c(%rbp)
movq %rdi, -0x50(%rbp)
movq -0x40(%rbp), %rdi
movq %r15, %rsi
callq 0x8b3c
movl %eax, %edi
cmpl $0x2, %eax
jl 0x8eba
movq -0x38(%rbp), %r8
leal (%rdi,%r8), %eax
decl %eax
leaq -0xb0(%rbp), %r12
movq -0x48(%rbp), %rbx
cmpq %r12, %rbx
je 0x8f39
movslq %eax, %rsi
shlq $0x3, %rsi
movq %rdi, %r12
movq %rbx, %rdi
callq *0x2a3da(%rip)          # 0x33288
movq %r12, %rdi
movq -0x38(%rbp), %r8
movq %rax, %rbx
jmp 0x8ec2
movq -0x48(%rbp), %rbx
movq -0x38(%rbp), %r8
testl %edi, %edi
movl $0x0, %eax
cmovgl %edi, %eax
movq -0x50(%rbp), %rsi
addq %rbx, %rsi
movl -0x64(%rbp), %r12d
addl -0x2c(%rbp), %r12d
addl %eax, %r12d
xorl %ecx, %ecx
movq %rbx, %r13
cmpq %rcx, %rax
je 0x8f04
movq 0x18(%r15), %rdx
movq (%rdx,%rcx,8), %rdx
movq %rdx, (%rsi,%rcx,8)
movq 0x18(%r15), %rdx
movq (%rdx,%rcx,8), %rdx
incl 0x10(%rdx)
incq %rcx
jmp 0x8ee3
movl 0x10(%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r15)
cmpl $0x1, %eax
jg 0x8f2a
movq %rdi, %rbx
movq -0x40(%rbp), %rdi
movq %r15, %rsi
callq 0x73bf
movq %rbx, %rdi
movq -0x38(%rbp), %r8
addl %edi, %r8d
decl %r8d
movq -0x60(%rbp), %r15
jmp 0x8ccb
leal (%rdi,%r8), %ecx
cmpl $0xa, %ecx
jl 0x8ec2
movl %eax, %esi
shlq $0x3, %rsi
movq %rdi, -0x48(%rbp)
xorl %edi, %edi
callq *0x2a334(%rip)          # 0x33288
movq %rax, %rbx
shlq $0x3, %r13
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x6320
movq -0x48(%rbp), %rdi
jmp 0x8ebe
testl %r8d, %r8d
je 0x8fa5
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movl %r8d, %esi
movq %r13, %rdx
callq 0xf3ff
movl %eax, %r15d
cmpl $0x0, 0x40(%rbx)
je 0x8fb9
cmpq $0x0, 0x48(%rbx)
pushq $0x5
popq %rax
cmovnel %eax, %r15d
jmp 0x8fb9
xorl %r15d, %r15d
jmp 0x8fad
xorl %r15d, %r15d
jmp 0x8fb9
movl %eax, %r15d
movq -0x48(%rbp), %r13
cmpl $0x1, %r15d
adcl $0x0, %r15d
movl %r12d, %ebx
movq -0x40(%rbp), %r12
testl %ebx, %ebx
jle 0x8fe4
movq -0x8(%r13,%rbx,8), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x8fdf
movq %r12, %rdi
callq 0x73bf
decq %rbx
jmp 0x8fc0
leaq -0xb0(%rbp), %rbx
cmpq %rbx, %r13
je 0x8c72
movq %r13, %rdi
xorl %esi, %esi
callq *0x2a289(%rip)          # 0x33288
movq %rbx, %r13
jmp 0x8c72
xorl %r15d, %r15d
jmp 0x8fb1
cmpl $0x1, %r15d
jne 0x901c
movq %r12, %rdi
xorl %esi, %esi
callq 0xf84c
movq 0x108(%r12), %rax
movq 0x18(%rax), %rax
movq %rax, 0x108(%r12)
movq -0x70(%rbp), %rbx
movq 0x8(%rbx), %rax
testq %rax, %rax
movq -0x58(%rbp), %r14
je 0x9052
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x9052
movq %r12, %rdi
movq %rbx, %rsi
callq *%rax
leaq 0x28257(%rip), %rax     # 0x312b0
movq %rax, 0x8(%rbx)
movq %r14, 0x18(%rbx)
movl 0x10(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rbx)
cmpl $0x1, %eax
jg 0x907a
movq %r12, %rdi
movq %rbx, %rsi
callq 0x73bf
movl %r15d, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
movq %r14, %rsi
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf722