// File: /workspace/github_c_makefile_star2_O3/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_FreeInterp
void Jim_FreeInterp(Jim_Interp *i)
{
    Jim_CallFrame *cf, *cfx;

    Jim_Obj *objPtr, *nextObjPtr;

    i->quitting = 1;


    for (cf = i->framePtr; cf; cf = cfx) {

        JimInvokeDefer(i, JIM_OK);
        cfx = cf->parent;
        JimFreeCallFrame(i, cf, JIM_FCF_FULL);
    }


    Jim_FreeHashTable(&i->commands);

    Jim_DecrRefCount(i, i->emptyObj);
    Jim_DecrRefCount(i, i->trueObj);
    Jim_DecrRefCount(i, i->falseObj);
    Jim_DecrRefCount(i, i->result);
    Jim_DecrRefCount(i, i->stackTrace);
    Jim_DecrRefCount(i, i->errorProc);
    Jim_DecrRefCount(i, i->unknown);
    Jim_DecrRefCount(i, i->defer);
    Jim_DecrRefCount(i, i->nullScriptObj);
    Jim_DecrRefCount(i, i->currentFilenameObj);


    Jim_InterpIncrProcEpoch(i);

#ifdef JIM_REFERENCES
    Jim_FreeHashTable(&i->references);
#endif
    Jim_FreeHashTable(&i->packages);
    Jim_Free(i->prngState);
    Jim_FreeHashTable(&i->assocData);
    if (i->traceCmdObj) {
        Jim_DecrRefCount(i, i->traceCmdObj);
    }

#ifdef JIM_MAINTAINER
    if (i->liveList != NULL) {
        objPtr = i->liveList;

        printf("\n-------------------------------------\n");
        printf("Objects still in the free list:\n");
        while (objPtr) {
            const char *type = objPtr->typePtr ? objPtr->typePtr->name : "string";
            Jim_String(objPtr);

            if (objPtr->bytes && strlen(objPtr->bytes) > 20) {
                printf("%p (%d) %-10s: '%.20s...'\n",
                    (void *)objPtr, objPtr->refCount, type, objPtr->bytes);
            }
            else {
                printf("%p (%d) %-10s: '%s'\n",
                    (void *)objPtr, objPtr->refCount, type, objPtr->bytes ? objPtr->bytes : "(null)");
            }
            if (objPtr->typePtr == &sourceObjType) {
                printf("FILE %s LINE %d\n",
                    Jim_String(objPtr->internalRep.sourceValue.fileNameObj),
                    objPtr->internalRep.sourceValue.lineNumber);
            }
            objPtr = objPtr->nextObjPtr;
        }
        printf("-------------------------------------\n\n");
        JimPanic((1, "Live list non empty freeing the interpreter! Leak?"));
    }
#endif


    objPtr = i->freeList;
    while (objPtr) {
        nextObjPtr = objPtr->nextObjPtr;
        Jim_Free(objPtr);
        objPtr = nextObjPtr;
    }


    for (cf = i->freeFramesList; cf; cf = cfx) {
        cfx = cf->next;
        if (cf->vars.table)
            Jim_FreeHashTable(&cf->vars);
        Jim_Free(cf);
    }


    Jim_Free(i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, 0xac(%rdi)
movq 0x58(%rdi), %r14
testq %r14, %r14
je 0xcdfc
movq %rbx, %rdi
xorl %esi, %esi
callq 0xd0a6
movq 0x48(%r14), %r15
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xd1e6
movq %r15, %r14
testq %r15, %r15
jne 0xcdd9
leaq 0x68(%rbx), %rdi
callq 0xaba2
movq 0x68(%rbx), %rdi
xorl %esi, %esi
callq *0x2a477(%rip)          # 0x37288
movq $0x0, 0x68(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%rbx)
movl $0x0, 0x90(%rbx)
movq 0x128(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xce4a
movq %rbx, %rdi
callq 0x758c
movq 0x130(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xce67
movq %rbx, %rdi
callq 0x758c
movq 0x138(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xce84
movq %rbx, %rdi
callq 0x758c
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xce9d
movq %rbx, %rdi
callq 0x758c
movq 0x188(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xceba
movq %rbx, %rdi
callq 0x758c
movq 0x190(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xced7
movq %rbx, %rdi
callq 0x758c
movq 0x198(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xcef4
movq %rbx, %rdi
callq 0x758c
movq 0x1a0(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xcf11
movq %rbx, %rdi
callq 0x758c
movq 0x120(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xcf2e
movq %rbx, %rdi
callq 0x758c
movq 0x10(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xcf48
movq %rbx, %rdi
callq 0x758c
incq 0x98(%rbx)
movq 0x1c0(%rbx), %rdi
testq %rdi, %rdi
je 0xcf76
movq 0x8(%rdi), %r14
xorl %esi, %esi
callq *0x2a321(%rip)          # 0x37288
movq %r14, 0x1c0(%rbx)
movq %r14, %rdi
testq %r14, %r14
jne 0xcf5b
xorl %r14d, %r14d
movl %r14d, 0x1c8(%rbx)
leaq 0x210(%rbx), %rdi
callq 0xaba2
movq 0x210(%rbx), %rdi
xorl %esi, %esi
callq *0x2a2ed(%rip)          # 0x37288
movq %r14, 0x210(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x228(%rbx)
movl %r14d, 0x238(%rbx)
movq 0x208(%rbx), %rdi
xorl %esi, %esi
callq *0x2a2c6(%rip)          # 0x37288
leaq 0x1d8(%rbx), %rdi
callq 0xaba2
movq 0x1d8(%rbx), %rdi
xorl %esi, %esi
callq *0x2a2ab(%rip)          # 0x37288
movq %r14, 0x1d8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x1f0(%rbx)
movl %r14d, 0x200(%rbx)
movq 0x1a8(%rbx), %rsi
testq %rsi, %rsi
je 0xd017
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xd017
movq %rbx, %rdi
callq 0x758c
movq 0xc0(%rbx), %rdi
testq %rdi, %rdi
je 0xd037
movq 0x38(%rdi), %r14
xorl %esi, %esi
callq *0x2a259(%rip)          # 0x37288
movq %r14, %rdi
testq %r14, %r14
jne 0xd023
movq 0x1d0(%rbx), %r14
testq %r14, %r14
je 0xd08e
movq 0x70(%r14), %r15
cmpq $0x0, 0x10(%r14)
je 0xd07b
leaq 0x10(%r14), %rdi
callq 0xaba2
movq 0x10(%r14), %rdi
xorl %esi, %esi
callq *0x2a225(%rip)          # 0x37288
movq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movl $0x0, 0x38(%r14)
movq %r14, %rdi
xorl %esi, %esi
callq *0x2a202(%rip)          # 0x37288
movq %r15, %r14
testq %r15, %r15
jne 0xd043
movq 0x2a1f3(%rip), %rax     # 0x37288
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax