// File: /workspace/github_c_makefile_star2_O1/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 0xcdd7
movq %rbx, %rdi
xorl %esi, %esi
callq 0xd081
movq 0x48(%r14), %r15
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xd1df
movq %r15, %r14
testq %r15, %r15
jne 0xcdb4
leaq 0x68(%rbx), %rdi
callq 0xabc9
movq 0x68(%rbx), %rdi
xorl %esi, %esi
callq *0x2b49c(%rip)          # 0x38288
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 0xce25
movq %rbx, %rdi
callq 0x759a
movq 0x130(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xce42
movq %rbx, %rdi
callq 0x759a
movq 0x138(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xce5f
movq %rbx, %rdi
callq 0x759a
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xce78
movq %rbx, %rdi
callq 0x759a
movq 0x188(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xce95
movq %rbx, %rdi
callq 0x759a
movq 0x190(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xceb2
movq %rbx, %rdi
callq 0x759a
movq 0x198(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xcecf
movq %rbx, %rdi
callq 0x759a
movq 0x1a0(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xceec
movq %rbx, %rdi
callq 0x759a
movq 0x120(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xcf09
movq %rbx, %rdi
callq 0x759a
movq 0x10(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xcf23
movq %rbx, %rdi
callq 0x759a
incq 0x98(%rbx)
movq 0x1c0(%rbx), %rdi
testq %rdi, %rdi
je 0xcf51
movq 0x8(%rdi), %r14
xorl %esi, %esi
callq *0x2b346(%rip)          # 0x38288
movq %r14, 0x1c0(%rbx)
movq %r14, %rdi
testq %r14, %r14
jne 0xcf36
xorl %r14d, %r14d
movl %r14d, 0x1c8(%rbx)
leaq 0x210(%rbx), %rdi
callq 0xabc9
movq 0x210(%rbx), %rdi
xorl %esi, %esi
callq *0x2b312(%rip)          # 0x38288
movq %r14, 0x210(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x228(%rbx)
movl %r14d, 0x238(%rbx)
movq 0x208(%rbx), %rdi
xorl %esi, %esi
callq *0x2b2eb(%rip)          # 0x38288
leaq 0x1d8(%rbx), %rdi
callq 0xabc9
movq 0x1d8(%rbx), %rdi
xorl %esi, %esi
callq *0x2b2d0(%rip)          # 0x38288
movq %r14, 0x1d8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x1f0(%rbx)
movl %r14d, 0x200(%rbx)
movq 0x1a8(%rbx), %rsi
testq %rsi, %rsi
je 0xcff2
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xcff2
movq %rbx, %rdi
callq 0x759a
movq 0xc0(%rbx), %rdi
testq %rdi, %rdi
je 0xd012
movq 0x38(%rdi), %r14
xorl %esi, %esi
callq *0x2b27e(%rip)          # 0x38288
movq %r14, %rdi
testq %r14, %r14
jne 0xcffe
movq 0x1d0(%rbx), %r14
testq %r14, %r14
je 0xd069
movq 0x70(%r14), %r15
cmpq $0x0, 0x10(%r14)
je 0xd056
leaq 0x10(%r14), %rdi
callq 0xabc9
movq 0x10(%r14), %rdi
xorl %esi, %esi
callq *0x2b24a(%rip)          # 0x38288
movq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movl $0x0, 0x38(%r14)
movq %r14, %rdi
xorl %esi, %esi
callq *0x2b227(%rip)          # 0x38288
movq %r15, %r14
testq %r15, %r15
jne 0xd01e
movq 0x2b218(%rip), %rax     # 0x38288
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax