// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x1, 0xac(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xecfd
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0xeff0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0xf1d0
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xecc6
movq -0x8(%rbp), %rdi
addq $0x68, %rdi
callq 0xc210
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0xed37
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rsi
callq 0x7a10
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0xed64
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rsi
callq 0x7a10
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0xed91
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rsi
callq 0x7a10
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0xedb6
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
callq 0x7a10
movq -0x8(%rbp), %rax
movq 0x188(%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0xede3
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x188(%rax), %rsi
callq 0x7a10
movq -0x8(%rbp), %rax
movq 0x190(%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0xee10
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x190(%rax), %rsi
callq 0x7a10
movq -0x8(%rbp), %rax
movq 0x198(%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0xee3d
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x198(%rax), %rsi
callq 0x7a10
movq -0x8(%rbp), %rax
movq 0x1a0(%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0xee6a
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x1a0(%rax), %rsi
callq 0x7a10
movq -0x8(%rbp), %rax
movq 0x120(%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0xee97
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x120(%rax), %rsi
callq 0x7a10
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0xeebe
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x7a10
movq -0x8(%rbp), %rdi
callq 0xd520
movq -0x8(%rbp), %rdi
addq $0x210, %rdi            # imm = 0x210
callq 0xc210
movq 0x393b2(%rip), %rax     # 0x48290
movq -0x8(%rbp), %rcx
movq 0x208(%rcx), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq -0x8(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0xc210
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1a8(%rax)
je 0xef3c
movq -0x8(%rbp), %rax
movq 0x1a8(%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0xef3a
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x1a8(%rax), %rsi
callq 0x7a10
jmp 0xef3c
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xef79
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq 0x3932b(%rip), %rax     # 0x48290
movq -0x20(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xef4b
movq -0x8(%rbp), %rax
movq 0x1d0(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xefce
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xefb3
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0xc210
movq 0x392d6(%rip), %rax     # 0x48290
movq -0x10(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xef88
movq 0x392bb(%rip), %rax     # 0x48290
movq -0x8(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)