// File: /workspace/github_c_makefile_star2_O3/haxlang[P]hax/haxBasic.c
// Function: Hax_CreateInterp
Hax_Interp *
Hax_CreateInterp(
    Hax_Memoryp *memoryp)
{
    Interp *iPtr;
    Command *cmdPtr;
    CmdInfo *cmdInfoPtr;
    int i;

    if (memoryp == NULL)
	return NULL;

    iPtr = (Interp *) ckalloc(memoryp, sizeof(Interp));
    iPtr->memoryp = memoryp;
    iPtr->result = iPtr->resultSpace;
    iPtr->freeProc = 0;
    iPtr->errorLine = 0;
    Hax_InitHashTable(&iPtr->commandTable, HAX_STRING_KEYS);
    Hax_InitHashTable(&iPtr->globalTable, HAX_STRING_KEYS);
    iPtr->numLevels = 0;
    iPtr->framePtr = NULL;
    iPtr->varFramePtr = NULL;
    iPtr->activeTracePtr = NULL;
    iPtr->numEvents = 0;
    iPtr->events = NULL;
    iPtr->curEvent = 0;
    iPtr->curEventNum = 0;
    iPtr->revPtr = NULL;
    iPtr->historyFirst = NULL;
    iPtr->revDisables = 1;
    iPtr->evalFirst = iPtr->evalLast = NULL;
    iPtr->appendResult = NULL;
    iPtr->appendAvl = 0;
    iPtr->appendUsed = 0;
    for (i = 0; i < NUM_REGEXPS; i++) {
	iPtr->patterns[i] = NULL;
	iPtr->patLengths[i] = -1;
	iPtr->regexps[i] = NULL;
    }
    iPtr->cmdCount = 0;
    iPtr->noEval = 0;
    iPtr->scriptFile = NULL;
    iPtr->flags = 0;
    iPtr->tracePtr = NULL;
    iPtr->resultSpace[0] = 0;
    iPtr->internalErrno = 0;
    iPtr->haxRegexpError = NULL;
    iPtr->regparse = NULL;
    iPtr->regnpar = 0;
    iPtr->regdummy = 0;
    iPtr->regcode = NULL;
    iPtr->regsize = 0;
    iPtr->reginput = NULL;
    iPtr->regbol = NULL;
    iPtr->regstartp = NULL;
    iPtr->regendp = NULL;

#ifdef HAX_LIBRARY
    iPtr->libraryPath = (char *) ckalloc(memoryp, strlen(HAX_LIBRARY) + 1);
    strcpy(iPtr->libraryPath, HAX_LIBRARY);
#else
    iPtr->libraryPath = NULL;
#endif

    /*
     * Create the built-in commands.  Do it here, rather than calling
     * Hax_CreateCommand, because it's faster (there's no need to
     * check for a pre-existing command by the same name).
     */

    for (cmdInfoPtr = builtInCmds; cmdInfoPtr->name != NULL; cmdInfoPtr++) {
	int newPtr;
	Hax_HashEntry *hPtr;

	hPtr = Hax_CreateHashEntry((Hax_Interp *) iPtr, &iPtr->commandTable,
		(char *) cmdInfoPtr->name, &newPtr);
	if (newPtr) {
	    cmdPtr = (Command *) ckalloc(memoryp, sizeof(Command));
	    cmdPtr->proc = cmdInfoPtr->proc;
	    cmdPtr->clientData = (ClientData) NULL;
	    cmdPtr->deleteProc = NULL;
	    Hax_SetHashValue(hPtr, cmdPtr);
	}
    }

    return (Hax_Interp *) iPtr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %r13d, %r13d
testq %rdi, %rdi
je 0x5ee8
movq %rdi, %rbx
leaq 0xe4ff(%rip), %r14      # 0x14240
movl $0x2d8, %esi            # imm = 0x2D8
movq %r14, %rdx
movl $0x76, %ecx
callq 0x44d0
movq %rax, %r15
movq %rbx, 0x280(%rax)
addq $0x1b0, %rax            # imm = 0x1B0
movq %rax, (%r15)
movq %r13, 0x8(%r15)
movl %r13d, 0x10(%r15)
leaq 0x18(%r15), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x45a0
leaq 0x68(%r15), %rdi
xorl %esi, %esi
callq 0x45a0
movl %r13d, 0xb8(%r15)
xorps %xmm1, %xmm1
movups %xmm1, 0xc0(%r15)
movups %xmm1, 0xcc(%r15)
movups %xmm1, 0xe0(%r15)
movups %xmm1, 0xf0(%r15)
movl $0x1, 0x100(%r15)
movups %xmm1, 0x108(%r15)
movups %xmm1, 0x118(%r15)
movups %xmm1, 0x128(%r15)
movups %xmm1, 0x138(%r15)
movq %r13, 0x148(%r15)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x150(%r15)
movl $0xffffffff, 0x160(%r15) # imm = 0xFFFFFFFF
movq %r13, 0x1a8(%r15)
movb $0x0, 0x1b0(%r15)
movl %r13d, 0x278(%r15)
movups %xmm1, 0x194(%r15)
movups %xmm1, 0x188(%r15)
movups %xmm1, 0x178(%r15)
movups %xmm1, 0x168(%r15)
movq %r13, 0x29d(%r15)
movups %xmm1, 0x290(%r15)
movups %xmm1, 0x2c8(%r15)
movups %xmm1, 0x2b8(%r15)
movups %xmm1, 0x2a8(%r15)
movl $0x13, %esi
movq %rbx, %rdi
movq %r14, %rdx
movl $0xa4, %ecx
callq 0x44d0
movq %rax, 0x288(%r15)
movups 0xe3d0(%rip), %xmm0     # 0x1424b
movups %xmm0, (%rax)
movl $0x786168, 0xf(%rax)    # imm = 0x786168
leaq 0xe539(%rip), %rdx      # 0x143c5
leaq 0x14cad(%rip), %r14     # 0x1ab40
leaq 0x4(%rsp), %r13
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq *0x60(%r15)
cmpl $0x0, 0x4(%rsp)
je 0x5eda
movq %rax, %rbp
movl $0x18, %esi
movq %rbx, %rdi
leaq 0xe382(%rip), %rdx      # 0x14240
movl $0xb7, %ecx
callq 0x44d0
movq -0x8(%r14), %rcx
movq %rcx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq %rax, 0x18(%rbp)
movq (%r14), %rdx
addq $0x10, %r14
testq %rdx, %rdx
jne 0x5e98
jmp 0x5eeb
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq