// File: /workspace/github_c_makefile_star2_O0/haxlang[P]hax/haxUtil.c
// Function: Hax_Concat
char *
Hax_Concat(
    Hax_Interp *interp,
    int argc,			/* Number of strings to concatenate. */
    char **argv			/* Array of strings to concatenate. */)
{
    Interp *iPtr = (Interp *) interp;
    Hax_Memoryp *memoryp = iPtr->memoryp;
    int totalSize, i;
    char *p;
    char *result;

    for (totalSize = 1, i = 0; i < argc; i++) {
	totalSize += strlen(argv[i]) + 1;
    }
    result = (char *) ckalloc(memoryp, (unsigned) totalSize);
    if (argc == 0) {
	*result = '\0';
	return result;
    }
    for (p = result, i = 0; i < argc; i++) {
	char *element;
	int length;

	/*
	 * Clip white space off the front and back of the string
	 * to generate a neater result, and ignore any empty
	 * elements.
	 */

	element = argv[i];
	while (isspace(*element)) {
	    element++;
	}
	for (length = strlen(element);
		(length > 0) && (isspace(element[length-1]));
		length--) {
	    /* Null loop body. */
	}
	if (length == 0) {
	    continue;
	}
	(void) strncpy(p, element, length);
	p += length;
	*p = ' ';
	p++;
    }
    if (p != result) {
	p[-1] = 0;
    } else {
	*p = 0;
    }
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x280(%rax), %rax
movq %rax, -0x30(%rbp)
movl $0x1, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x1866d
movq -0x20(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x41b0
movq %rax, %rcx
addq $0x1, %rcx
movslq -0x34(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x34(%rbp)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x18638
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %eax
movl %eax, %esi
leaq 0x71ad(%rip), %rdx      # 0x1f82a
movl $0x2f2, %ecx            # imm = 0x2F2
callq 0x44c0
movq %rax, -0x48(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x186a5
movq -0x48(%rbp), %rax
movb $0x0, (%rax)
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x187c7
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x187a4
movq -0x20(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
callq 0x4630
movq (%rax), %rax
movq -0x50(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x186fe
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x186d0
movq -0x50(%rbp), %rdi
callq 0x41b0
movl %eax, -0x54(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x54(%rbp)
movb %al, -0x55(%rbp)
jle 0x18743
callq 0x4630
movq (%rax), %rax
movq -0x50(%rbp), %rcx
movl -0x54(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, -0x55(%rbp)
movb -0x55(%rbp), %al
testb $0x1, %al
jne 0x1874c
jmp 0x18759
jmp 0x1874e
movl -0x54(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x1870a
cmpl $0x0, -0x54(%rbp)
jne 0x18761
jmp 0x18796
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rsi
movslq -0x54(%rbp), %rdx
callq 0x4080
movl -0x54(%rbp), %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movb $0x20, (%rax)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x186b4
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
je 0x187b8
movq -0x40(%rbp), %rax
movb $0x0, -0x1(%rax)
jmp 0x187bf
movq -0x40(%rbp), %rax
movb $0x0, (%rax)
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)