// File: /workspace/github_c_makefile_star2_O2/haxlang[P]hax/haxBasic.c
// Function: Hax_VarEval
int
Hax_VarEval(
    Hax_Interp *interp,		/* Interpreter in which to execute command. */
    ...				/* One or more strings to concatenate,
				 * terminated with a NULL string. */)
{
    Interp *iPtr = (Interp *) interp;
    Hax_Memoryp *memoryp = iPtr->memoryp;
    va_list argList;
#define FIXED_SIZE 200
    char fixedSpace[FIXED_SIZE+1];
    int spaceAvl, spaceUsed, length;
    char *string, *cmd;
    int result;

    /*
     * Copy the strings one after the other into a single larger
     * string.  Use stack-allocated space for small commands, but if
     * the commands gets too large than call ckalloc to create the
     * space.
     */

    va_start(argList, interp);
    interp = va_arg(argList, Hax_Interp *);
    spaceAvl = FIXED_SIZE;
    spaceUsed = 0;
    cmd = fixedSpace;
    while (1) {
	string = va_arg(argList, char *);
	if (string == NULL) {
	    break;
	}
	length = strlen(string);
	if ((spaceUsed + length) > spaceAvl) {
	    char *newPtr;

	    spaceAvl = spaceUsed + length;
	    spaceAvl += spaceAvl/2;
	    newPtr = (char *) ckalloc(memoryp, (unsigned) spaceAvl);
	    memcpy(newPtr, cmd, spaceUsed);
	    if (cmd != fixedSpace) {
		ckfree(memoryp, cmd);
	    }
	    cmd = newPtr;
	}
	strcpy(cmd + spaceUsed, string);
	spaceUsed += length;
    }
    va_end(argList);
    cmd[spaceUsed] = '\0';

    result = Hax_Eval(interp, NULL, cmd, 0, (char **) NULL);
    if (cmd != fixedSpace) {
	ckfree(memoryp, cmd);
    }
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
leaq 0x100(%rsp), %r10
movq %rsi, 0x8(%r10)
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x6614
movaps %xmm0, 0x130(%rsp)
movaps %xmm1, 0x140(%rsp)
movaps %xmm2, 0x150(%rsp)
movaps %xmm3, 0x160(%rsp)
movaps %xmm4, 0x170(%rsp)
movaps %xmm5, 0x180(%rsp)
movaps %xmm6, 0x190(%rsp)
movaps %xmm7, 0x1a0(%rsp)
movq 0x280(%rdi), %r15
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
leaq 0x1f0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r10, 0x10(%rsp)
pushq $0x8
popq %rax
pushq $0x8
popq %rcx
cmpq $0x28, %rcx
ja 0x6654
addq 0x10(%rsp), %rcx
addl $0x8, %eax
movl %eax, (%rsp)
jmp 0x6662
movq 0x8(%rsp), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq (%rcx), %rcx
movq %rcx, 0x28(%rsp)
movl $0xc8, %r14d
leaq 0x30(%rsp), %rbx
xorl %r13d, %r13d
movq %r15, 0x18(%rsp)
cmpl $0x28, %eax
ja 0x6691
movl %eax, %ecx
addq 0x10(%rsp), %rcx
addl $0x8, %eax
movl %eax, (%rsp)
jmp 0x669f
movq 0x8(%rsp), %rcx
leaq 0x8(%rcx), %rax
movq %rax, 0x8(%rsp)
movq (%rcx), %rbp
testq %rbp, %rbp
je 0x6751
movq %rbp, %rdi
callq 0x41d0
movq %rax, %r12
addl %r13d, %r12d
cmpl %r14d, %r12d
jle 0x6720
movl %r12d, %esi
shrl %esi
addl %r12d, %esi
movq %r15, %rdi
movq %rsi, 0x20(%rsp)
leaq 0xcb6b(%rip), %r14      # 0x13240
movq %r14, %rdx
movl $0x3f2, %ecx            # imm = 0x3F2
callq 0x44e0
movq %rax, %r15
movslq %r13d, %r13
movq %rax, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x43c0
leaq 0x30(%rsp), %rax
cmpq %rax, %rbx
je 0x6728
movq %rbx, %rsi
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
movl $0x3f5, %ecx            # imm = 0x3F5
callq 0x4280
movq %r15, %rax
movq %rbx, %r15
jmp 0x6730
movslq %r13d, %r13
movq %rbx, %rax
jmp 0x6735
movq %r15, %rax
movq 0x18(%rsp), %r15
movq 0x20(%rsp), %r14
movq %rax, %rbx
addq %rax, %r13
movq %r13, %rdi
movq %rbp, %rsi
callq 0x40f0
movl (%rsp), %eax
movl %r12d, %r13d
jmp 0x667d
movslq %r13d, %rax
movb $0x0, (%rbx,%rax)
movq 0x28(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45d0
movl %eax, %ebp
leaq 0x30(%rsp), %rax
cmpq %rax, %rbx
je 0x678f
leaq 0xcac1(%rip), %rdx      # 0x13240
movq %r15, %rdi
movq %rbx, %rsi
movl $0x401, %ecx            # imm = 0x401
callq 0x4280
movl %ebp, %eax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq