// File: /workspace/github_c_makefile_star2_O2/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 0xc24b
movq %rbx, %rdi
xorl %esi, %esi
callq 0xc425
movq 0x48(%r14), %r15
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xc559
movq %r15, %r14
jmp 0xc226
leaq 0x68(%rbx), %rdi
callq 0xa3ca
movq 0x128(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xc271
movq %rbx, %rdi
callq 0x73bf
movq 0x130(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xc28e
movq %rbx, %rdi
callq 0x73bf
movq 0x138(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xc2ab
movq %rbx, %rdi
callq 0x73bf
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xc2c4
movq %rbx, %rdi
callq 0x73bf
movq 0x188(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xc2e1
movq %rbx, %rdi
callq 0x73bf
movq 0x190(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xc2fe
movq %rbx, %rdi
callq 0x73bf
movq 0x198(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xc31b
movq %rbx, %rdi
callq 0x73bf
movq 0x1a0(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xc338
movq %rbx, %rdi
callq 0x73bf
movq 0x120(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xc355
movq %rbx, %rdi
callq 0x73bf
movq 0x10(%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xc36f
movq %rbx, %rdi
callq 0x73bf
movq %rbx, %rdi
callq 0xb41b
leaq 0x210(%rbx), %rdi
callq 0xa3ca
movq 0x208(%rbx), %rdi
xorl %esi, %esi
callq *0x26ef6(%rip)          # 0x33288
leaq 0x1d8(%rbx), %rdi
callq 0xa3ca
movq 0x1a8(%rbx), %rsi
testq %rsi, %rsi
je 0xc3c0
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0xc3c0
movq %rbx, %rdi
callq 0x73bf
movq 0xc0(%rbx), %rdi
testq %rdi, %rdi
je 0xc3dd
movq 0x38(%rdi), %r14
xorl %esi, %esi
callq *0x26eb0(%rip)          # 0x33288
movq %r14, %rdi
jmp 0xc3c7
movq 0x1d0(%rbx), %r14
testq %r14, %r14
je 0xc40d
movq 0x70(%r14), %r15
cmpq $0x0, 0x10(%r14)
je 0xc3fd
leaq 0x10(%r14), %rdi
callq 0xa3ca
movq %r14, %rdi
xorl %esi, %esi
callq *0x26e80(%rip)          # 0x33288
movq %r15, %r14
jmp 0xc3e4
movq 0x26e74(%rip), %rax     # 0x33288
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax