// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x6840
movq $0x0, -0x8(%rbp)
jmp 0x6bd1
movq -0x10(%rbp), %rdi
movl $0x2d8, %esi            # imm = 0x2D8
leaq 0x169b1(%rip), %rdx     # 0x1d201
movl $0x76, %ecx
callq 0x44c0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x280(%rax)
movq -0x18(%rbp), %rcx
addq $0x1b0, %rcx            # imm = 0x1B0
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
xorl %esi, %esi
callq 0x4590
movq -0x18(%rbp), %rdi
addq $0x68, %rdi
xorl %esi, %esi
callq 0x4590
movq -0x18(%rbp), %rax
movl $0x0, 0xb8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0xc0(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0xc8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0xd0(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0xd8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0xe0(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0xe8(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0xec(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0xf0(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0xf8(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x100(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x110(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x108(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x118(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x120(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x124(%rax)
movl $0x0, -0x2c(%rbp)
cmpl $0x5, -0x2c(%rbp)
jge 0x69f0
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq $0x0, 0x128(%rax,%rcx,8)
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl $0xffffffff, 0x150(%rax,%rcx,4) # imm = 0xFFFFFFFF
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq $0x0, 0x168(%rax,%rcx,8)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x69a4
movq -0x18(%rbp), %rax
movl $0x0, 0x190(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x194(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x198(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x1a0(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x1a8(%rax)
movq -0x18(%rbp), %rax
movb $0x0, 0x1b0(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x278(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x290(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x298(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x2a0(%rax)
movq -0x18(%rbp), %rax
movb $0x0, 0x2a4(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x2a8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x2b0(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x2b8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x2c0(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x2c8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x2d0(%rax)
movq -0x10(%rbp), %rdi
movl $0x13, %esi
leaq 0x1670f(%rip), %rdx     # 0x1d201
movl $0xa4, %ecx
callq 0x44c0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x288(%rax)
movq -0x18(%rbp), %rax
movq 0x288(%rax), %rdi
leaq 0x166f0(%rip), %rsi     # 0x1d20c
callq 0x40d0
leaq 0x1c818(%rip), %rax     # 0x23340
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
je 0x6bc9
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x18, %rsi
movq -0x28(%rbp), %rcx
movq (%rcx), %rdx
leaq -0x30(%rbp), %rcx
callq *%rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0x6bb6
movq -0x10(%rbp), %rdi
movl $0x18, %esi
leaq 0x1668c(%rip), %rdx     # 0x1d201
movl $0xb7, %ecx
callq 0x44c0
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x6bb8
movq -0x28(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x28(%rbp)
jmp 0x6b2c
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)