// File: /workspace/github_c_makefile_star2_O0/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
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x34(%rbp)
movq $0x0, -0x88(%rbp)
movq -0x18(%rbp), %rdi
callq 0x109d0
cmpl $0x0, %eax
je 0x9bd2
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x9bd2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x130d0
movl %eax, -0x4(%rbp)
jmp 0xa2b8
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xd380
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x24(%rax), %esi
callq 0x13160
cmpl $0x1, %eax
jne 0x9c3d
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x13260
movq -0x18(%rbp), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x9c31
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7a10
movl $0x1, -0x4(%rbp)
jmp 0xa2b8
jmp 0x9c3f
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%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 0x9c86
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x7a10
movq -0xc8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq -0xc0(%rbp), %rsi
callq 0x12b70
movq -0x10(%rbp), %rax
movl $0x0, 0x1b4(%rax)
leaq -0x80(%rbp), %rax
movq %rax, -0x88(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rdx
xorl %eax, %eax
cmpl 0x10(%rdx), %ecx
movb %al, -0xf5(%rbp)
jge 0x9d01
cmpl $0x0, -0x34(%rbp)
sete %al
movb %al, -0xf5(%rbp)
movb -0xf5(%rbp), %al
testb $0x1, %al
jne 0x9d10
jmp 0xa22c
movq -0x30(%rbp), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl 0x1c(%rax), %eax
movl %eax, -0xcc(%rbp)
movq -0x30(%rbp), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl 0x18(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x20(%rax)
cmpl $0x8, -0xcc(%rbp)
jle 0x9d6f
movq 0x3e539(%rip), %rax     # 0x48290
movslq -0xcc(%rbp), %rsi
shlq $0x3, %rsi
xorl %ecx, %ecx
movl %ecx, %edi
callq *%rax
movq %rax, -0x88(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl $0x0, -0xd0(%rbp)
movl -0xd0(%rbp), %eax
cmpl -0xcc(%rbp), %eax
jge 0xa15d
movq $0x1, -0xd8(%rbp)
movl $0x0, -0xdc(%rbp)
movq $0x0, -0xe8(%rbp)
movq -0x30(%rbp), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0xa, 0x8(%rax)
jne 0x9e16
movq -0x30(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rbp)
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0xd8(%rbp)
cmpq $0x0, -0xd8(%rbp)
jge 0x9e14
movl $0x1, -0xdc(%rbp)
xorl %eax, %eax
subq -0xd8(%rbp), %rax
movq %rax, -0xd8(%rbp)
jmp 0x9e16
cmpq $0x1, -0xd8(%rbp)
jne 0x9f46
movq -0x30(%rbp), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
movl 0x8(%rax,%rcx), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x100(%rbp)
subl $0x10, %eax
ja 0x9f42
movq -0x100(%rbp), %rax
leaq 0x2c1e6(%rip), %rcx     # 0x3603c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x30(%rbp), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0xe8(%rbp)
jmp 0x9f44
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
movl $0x1, %edx
callq 0xa7b0
movq %rax, -0xe8(%rbp)
jmp 0x9f44
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0xf920
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x9edd
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xe8(%rbp)
jmp 0x9ee8
movq $0x0, -0xe8(%rbp)
jmp 0x9f44
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x13390
movq %rax, -0xe8(%rbp)
jmp 0x9f44
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x9b80
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x9f40
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xe8(%rbp)
jmp 0x9f44
jmp 0x9f44
jmp 0x9f70
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movslq -0x1c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rsi
movq -0xd8(%rbp), %rax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x13460
movq %rax, -0xe8(%rbp)
cmpq $0x0, -0xe8(%rbp)
jne 0x9f8c
cmpl $0x0, -0x34(%rbp)
jne 0x9f87
movl $0x1, -0x34(%rbp)
jmp 0xa15d
movq -0xe8(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0xd8(%rbp), %rcx
movslq -0x1c(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0xdc(%rbp)
jne 0x9fd4
movq -0xe8(%rbp), %rdx
movq -0x88(%rbp), %rax
movslq -0xd0(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0xa147
movq -0x10(%rbp), %rdi
movq -0xe8(%rbp), %rsi
callq 0x9b50
movl %eax, -0xec(%rbp)
movl -0xcc(%rbp), %eax
addl -0xec(%rbp), %eax
subl $0x1, %eax
movl %eax, -0xf0(%rbp)
cmpl $0x1, -0xec(%rbp)
jle 0xa081
movq -0x88(%rbp), %rax
leaq -0x80(%rbp), %rcx
cmpq %rcx, %rax
jne 0xa05d
cmpl $0x8, -0xf0(%rbp)
jle 0xa05b
movq 0x3e268(%rip), %rax     # 0x48290
movslq -0xf0(%rbp), %rsi
shlq $0x3, %rsi
xorl %ecx, %ecx
movl %ecx, %edi
callq *%rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movslq -0xd0(%rbp), %rdx
shlq $0x3, %rdx
callq 0x6340
jmp 0xa07f
movq 0x3e22c(%rip), %rax     # 0x48290
movq -0x88(%rbp), %rdi
movslq -0xf0(%rbp), %rsi
shlq $0x3, %rsi
callq *%rax
movq %rax, -0x88(%rbp)
jmp 0xa081
movl $0x0, -0xf4(%rbp)
movl -0xf4(%rbp), %eax
cmpl -0xec(%rbp), %eax
jge 0xa0fe
movq -0xe8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0xf4(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x88(%rbp), %rax
movl -0xd0(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0xd0(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0xe8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0xf4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movl -0xf4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xf4(%rbp)
jmp 0xa08b
movq -0xe8(%rbp), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0xa123
movq -0x10(%rbp), %rdi
movq -0xe8(%rbp), %rsi
callq 0x7a10
movl -0xd0(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xd0(%rbp)
movl -0xec(%rbp), %eax
subl $0x1, %eax
addl -0xcc(%rbp), %eax
movl %eax, -0xcc(%rbp)
jmp 0xa149
movl -0xd0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd0(%rbp)
jmp 0x9d82
cmpl $0x0, -0x34(%rbp)
jne 0xa1a3
cmpl $0x0, -0xcc(%rbp)
je 0xa1a3
movq -0x10(%rbp), %rdi
movl -0xcc(%rbp), %esi
movq -0x88(%rbp), %rdx
callq 0x12c20
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x40(%rax)
je 0xa1a1
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0xa1a1
movl $0x5, -0x34(%rbp)
jmp 0xa1a3
jmp 0xa1a5
movl -0xd0(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xd0(%rbp)
cmpl $0x0, %eax
jle 0xa1f8
movq -0x88(%rbp), %rax
movslq -0xd0(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0xa1f6
movq -0x10(%rbp), %rdi
movq -0x88(%rbp), %rax
movslq -0xd0(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x7a10
jmp 0xa1a5
movq -0x88(%rbp), %rax
leaq -0x80(%rbp), %rcx
cmpq %rcx, %rax
je 0xa227
movq 0x3e081(%rip), %rax     # 0x48290
movq -0x88(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
leaq -0x80(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0x9ce0
cmpl $0x1, -0x34(%rbp)
jne 0xa23f
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x13260
movq -0x10(%rbp), %rdi
callq 0x12fe0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xa278
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0xa278
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movq -0x18(%rbp), %rax
leaq 0x3c08d(%rip), %rcx     # 0x46310
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0xa2b2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7a10
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw %cs:(%rax,%rax)