// File: /workspace/github_c_makefile_star2_O3/haxlang[P]hax/haxGlob.c
// Function: Hax_GlobCmd
int
Hax_GlobCmd(
    ClientData clientData,		/* Unix Client Data */
    Hax_Interp *interp,			/* Current interpreter. */
    int argc,				/* Number of arguments. */
    char **argv				/* Argument strings. */)
{
    UnixClientData *clientDataPtr = (UnixClientData *) clientData;
    int i, result, noComplain;

    if (argc < 2) {
	notEnoughArgs:
	Hax_AppendResult(interp, "wrong # args: should be \"", argv[0],
		" ?-nocomplain? name ?name ...?\"", (char *) NULL);
	return HAX_ERROR;
    }
    noComplain = 0;
    if ((argv[1][0] == '-') && (strcmp(argv[1], "-nocomplain") == 0)) {
	if (argc < 3) {
	    goto notEnoughArgs;
	}
	noComplain = 1;
    }

    for (i = 1 + noComplain; i < argc; i++) {
	char *thisName;

	/*
	 * Do special checks for names starting at the root and for
	 * names beginning with ~.  Then let DoGlob do the rest.
	 */

	thisName = argv[i];
	if (*thisName == '~') {
	    thisName = Hax_TildeSubst(interp, clientDataPtr, thisName);
	    if (thisName == NULL) {
		return HAX_ERROR;
	    }
	}
	if (*thisName == '/') {
	    result = DoGlob(interp, (char *) "/", thisName+1);
	} else {
	    result = DoGlob(interp, (char *) "", thisName);
	}
	if (result != HAX_OK) {
	    return result;
	}
    }
    if ((*interp->result == 0) && !noComplain) {
	const char *sep = "";

	Hax_AppendResult(interp, "no files matched glob pattern",
		(argc == 2) ? " \"" : "s \"", (char *) NULL);
	for (i = 1; i < argc; i++) {
	    Hax_AppendResult(interp, (char *) sep, argv[i], (char *) NULL);
	    sep = " ";
	}
	Hax_AppendResult(interp, "\"", (char *) NULL);
	return HAX_ERROR;
    }
    return HAX_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rsi, %rbx
cmpl $0x1, %edx
jg 0x4029
movq (%r14), %rdx
leaq 0x4142(%rip), %rsi      # 0x8143
leaq 0x4155(%rip), %rcx      # 0x815d
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x3510
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edx, %ebp
movq %rdi, %r15
movq 0x8(%r14), %rdi
cmpb $0x2d, (%rdi)
jne 0x404b
leaq 0x413f(%rip), %rsi      # 0x817d
callq 0x3320
testl %eax, %eax
je 0x413f
movq $0x0, 0x8(%rsp)
xorl %r13d, %r13d
movl %ebp, 0x14(%rsp)
movl %ebp, %ebp
incq %r13
leaq 0x482e(%rip), %r12      # 0x8895
cmpq %rbp, %r13
jae 0x40ba
movq (%r14,%r13,8), %rax
movb (%rax), %cl
cmpb $0x7e, %cl
jne 0x408c
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3570
testq %rax, %rax
je 0x4015
movb (%rax), %cl
cmpb $0x2f, %cl
jne 0x40a0
incq %rax
movq %rbx, %rdi
leaq 0x40eb(%rip), %rsi      # 0x8189
jmp 0x40a6
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x415a
incq %r13
testl %eax, %eax
je 0x4067
jmp 0x401a
movq (%rbx), %rax
cmpb $0x0, (%rax)
setne %cl
xorl %eax, %eax
movq 0x8(%rsp), %rdx
orb %cl, %dl
jne 0x401a
cmpl $0x2, 0x14(%rsp)
leaq 0x4041(%rip), %rax      # 0x811f
leaq 0x40c4(%rip), %rdx      # 0x81a9
cmoveq %rax, %rdx
leaq 0x409b(%rip), %rsi      # 0x818b
movq %rbx, %rdi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x3510
movl $0x1, %r15d
leaq 0x436a(%rip), %r13      # 0x8473
movq (%r14,%r15,8), %rdx
movq %rbx, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x3510
incq %r15
movq %r13, %r12
cmpq %r15, %rbp
jne 0x4109
leaq 0x3ff2(%rip), %rsi      # 0x8120
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x3510
jmp 0x4015
cmpl $0x2, %ebp
je 0x3ff7
movl $0x1, %r13d
movb $0x1, %al
movq %rax, 0x8(%rsp)
jmp 0x4057