// File: /workspace/github_c_makefile_star2_O0/haxlang[P]hax/haxCmdMZ.c
// Function: Hax_SplitCmd
int
Hax_SplitCmd(
    ClientData dummy,			/* Not used. */
    Hax_Interp *interp,			/* Current interpreter. */
    int argc,				/* Number of arguments. */
    char **argv				/* Argument strings. */)
{
    char *splitChars;
    char *p, *p2;
    char *elementStart;

    if (argc == 2) {
	splitChars = (char *) " \n\t\r";
    } else if (argc == 3) {
	splitChars = argv[2];
    } else {
	Hax_AppendResult(interp, "wrong # args: should be \"", argv[0],
		" string ?splitChars?\"", (char *) NULL);
	return HAX_ERROR;
    }

    /*
     * Handle the special case of splitting on every character.
     */

    if (*splitChars == 0) {
	char string[2];
	string[1] = 0;
	for (p = argv[1]; *p != 0; p++) {
	    string[0] = *p;
	    Hax_AppendElement(interp, string, 0);
	}
	return HAX_OK;
    }

    /*
     * Normal case: split on any of a given set of characters.
     * Discard instances of the split characters.
     */

    for (p = elementStart = argv[1]; *p != 0; p++) {
	char c = *p;
	for (p2 = splitChars; *p2 != 0; p2++) {
	    if (*p2 == c) {
		*p = 0;
		Hax_AppendElement(interp, elementStart, 0);
		*p = c;
		elementStart = p+1;
		break;
	    }
	}
    }
    if (p != argv[1]) {
	Hax_AppendElement(interp, elementStart, 0);
    }
    return HAX_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
cmpl $0x2, -0x1c(%rbp)
jne 0xe10a
leaq 0x10386(%rip), %rax     # 0x1e48a
movq %rax, -0x30(%rbp)
jmp 0xe151
cmpl $0x3, -0x1c(%rbp)
jne 0xe11e
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xe14f
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0xf844(%rip), %rsi      # 0x1d974
leaq 0x10358(%rip), %rcx     # 0x1e48f
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0xe267
jmp 0xe151
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xe1ab
movb $0x0, -0x49(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xe19f
movq -0x38(%rbp), %rax
movb (%rax), %al
movb %al, -0x4a(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x4a(%rbp), %rsi
xorl %edx, %edx
callq 0x4040
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xe16d
movl $0x0, -0x4(%rbp)
jmp 0xe267
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xe243
movq -0x38(%rbp), %rax
movb (%rax), %al
movb %al, -0x4b(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xe230
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x4b(%rbp), %ecx
cmpl %ecx, %eax
jne 0xe220
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rsi
xorl %edx, %edx
callq 0x4040
movb -0x4b(%rbp), %cl
movq -0x38(%rbp), %rax
movb %cl, (%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0xe230
jmp 0xe222
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0xe1d8
jmp 0xe232
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xe1bb
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0xe260
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rsi
xorl %edx, %edx
callq 0x4040
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq