// File: /workspace/github_c_makefile_star2_O0/haxlang[P]hax/haxBasic.c
// Function: Hax_DeleteInterp
void
Hax_DeleteInterp(
    Hax_Interp *interp		/* Token for command interpreter (returned
				 * by a previous call to Hax_CreateInterp). */)
{
    Interp *iPtr = (Interp *) interp;
    Hax_Memoryp *memoryp = iPtr->memoryp;
    Hax_HashEntry *hPtr;
    Hax_HashSearch search;
    Command *cmdPtr;
    int i;

    /*
     * If the interpreter is in use, delay the deletion until later.
     */

    iPtr->flags |= DELETED;
    if (iPtr->numLevels != 0) {
	return;
    }

    /*
     * Free up any remaining resources associated with the
     * interpreter.
     */

    for (hPtr = Hax_FirstHashEntry(&iPtr->commandTable, &search);
	    hPtr != NULL; hPtr = Hax_NextHashEntry(&search)) {
	cmdPtr = (Command *) Hax_GetHashValue(hPtr);
	if (cmdPtr->deleteProc != NULL) {
	    (*cmdPtr->deleteProc)(interp, cmdPtr->clientData);
	}
	ckfree(memoryp, (char *) cmdPtr);
    }
    Hax_DeleteHashTable(interp, &iPtr->commandTable);
    HaxDeleteVars(iPtr, &iPtr->globalTable);
    if (iPtr->events != NULL) {
	int i;

	for (i = 0; i < iPtr->numEvents; i++) {
	    ckfree(memoryp, iPtr->events[i].command);
	}
	ckfree(memoryp, (char *) iPtr->events);
    }
    while (iPtr->revPtr != NULL) {
	HistoryRev *nextPtr = iPtr->revPtr->nextPtr;

	ckfree(memoryp, (char *) iPtr->revPtr);
	iPtr->revPtr = nextPtr;
    }
    if (iPtr->appendResult != NULL) {
	ckfree(memoryp, iPtr->appendResult);
    }
    for (i = 0; i < NUM_REGEXPS; i++) {
	if (iPtr->patterns[i] == NULL) {
	    break;
	}
	ckfree(memoryp, iPtr->patterns[i]);
	ckfree(memoryp, (char *) iPtr->regexps[i]);
    }
    while (iPtr->tracePtr != NULL) {
	Trace *nextPtr = iPtr->tracePtr->nextPtr;

	ckfree(memoryp, (char *) iPtr->tracePtr);
	iPtr->tracePtr = nextPtr;
    }

    if (iPtr->libraryPath != NULL) {
	ckfree(memoryp, iPtr->libraryPath);
    }

    ckfree(memoryp, (char *) iPtr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x280(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x1a0(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x1a0(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xb8(%rax)
je 0x6c28
jmp 0x6ecc
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
leaq -0x38(%rbp), %rsi
callq 0x43c0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x6c99
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x6c71
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rcx
movq 0x8(%rcx), %rsi
callq *%rax
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
leaq 0x16581(%rip), %rdx     # 0x1d201
movl $0xf4, %ecx
callq 0x4260
leaq -0x38(%rbp), %rdi
callq 0x4370
movq %rax, -0x20(%rbp)
jmp 0x6c3d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
callq 0x41f0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x68, %rsi
callq 0x4330
movq -0x10(%rbp), %rax
cmpq $0x0, 0xe0(%rax)
je 0x6d38
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xd8(%rcx), %eax
jge 0x6d18
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xe0(%rax), %rax
movslq -0x48(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
leaq 0x164fe(%rip), %rdx     # 0x1d201
movl $0xfc, %ecx
callq 0x4260
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x6cd0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xe0(%rax), %rsi
leaq 0x164d3(%rip), %rdx     # 0x1d201
movl $0xfe, %ecx
callq 0x4260
jmp 0x6d3a
movq -0x10(%rbp), %rax
cmpq $0x0, 0xf0(%rax)
je 0x6d8c
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rsi
leaq 0x16490(%rip), %rdx     # 0x1d201
movl $0x103, %ecx            # imm = 0x103
callq 0x4260
movq -0x50(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xf0(%rax)
jmp 0x6d3a
movq -0x10(%rbp), %rax
cmpq $0x0, 0x118(%rax)
je 0x6dba
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rsi
leaq 0x16451(%rip), %rdx     # 0x1d201
movl $0x107, %ecx            # imm = 0x107
callq 0x4260
movl $0x0, -0x44(%rbp)
cmpl $0x5, -0x44(%rbp)
jge 0x6e31
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
cmpq $0x0, 0x128(%rax,%rcx,8)
jne 0x6ddc
jmp 0x6e31
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq 0x128(%rax,%rcx,8), %rsi
leaq 0x1640a(%rip), %rdx     # 0x1d201
movl $0x10d, %ecx            # imm = 0x10D
callq 0x4260
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq 0x168(%rax,%rcx,8), %rsi
leaq 0x163e5(%rip), %rdx     # 0x1d201
movl $0x10e, %ecx            # imm = 0x10E
callq 0x4260
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x6dc1
jmp 0x6e33
movq -0x10(%rbp), %rax
cmpq $0x0, 0x1a8(%rax)
je 0x6e85
movq -0x10(%rbp), %rax
movq 0x1a8(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x1a8(%rax), %rsi
leaq 0x16397(%rip), %rdx     # 0x1d201
movl $0x113, %ecx            # imm = 0x113
callq 0x4260
movq -0x58(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x1a8(%rax)
jmp 0x6e33
movq -0x10(%rbp), %rax
cmpq $0x0, 0x288(%rax)
je 0x6eb3
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x288(%rax), %rsi
leaq 0x16358(%rip), %rdx     # 0x1d201
movl $0x118, %ecx            # imm = 0x118
callq 0x4260
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x1633f(%rip), %rdx     # 0x1d201
movl $0x11b, %ecx            # imm = 0x11B
callq 0x4260
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)