// File: /workspace/github_c_makefile_star2_O1/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
movq %rdi, 0x10(%rsp)
cmpl $0x1, %edx
jg 0x4063
movq (%r14), %rdx
leaq 0x510c(%rip), %rsi      # 0x9143
leaq 0x511f(%rip), %rcx      # 0x915d
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x3510
movl $0x1, %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edx, %r15d
movq 0x8(%r14), %rdi
cmpb $0x2d, (%rdi)
jne 0x4083
leaq 0x5107(%rip), %rsi      # 0x917d
callq 0x3320
testl %eax, %eax
je 0x4194
movq $0x0, (%rsp)
xorl %ebp, %ebp
movl %r15d, 0xc(%rsp)
movl %r15d, %r15d
incq %rbp
leaq 0x57d2(%rip), %r12      # 0x9871
cmpq %r15, %rbp
jae 0x4100
movq (%r14,%rbp,8), %rdx
cmpb $0x7e, (%rdx)
jne 0x40c2
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x3570
movq %rax, %rdx
testq %rax, %rax
je 0x40f6
cmpb $0x2f, (%rdx)
jne 0x40d6
incq %rdx
movq %rbx, %rdi
leaq 0x50b5(%rip), %rsi      # 0x9189
jmp 0x40dc
movq %rbx, %rdi
movq %r12, %rsi
callq 0x41ae
testl %eax, %eax
sete %cl
cmovnel %eax, %r13d
incq %rbp
testb %cl, %cl
jne 0x409f
jmp 0x4051
movl $0x1, %r13d
xorl %ecx, %ecx
jmp 0x40ea
movq (%rbx), %rax
cmpb $0x0, (%rax)
setne %al
xorl %r13d, %r13d
movq (%rsp), %rcx
orb %al, %cl
jne 0x4051
movl 0xc(%rsp), %ebp
cmpl $0x2, %ebp
leaq 0x4ff9(%rip), %rax      # 0x911f
leaq 0x507c(%rip), %rdx      # 0x91a9
cmoveq %rax, %rdx
leaq 0x5053(%rip), %rsi      # 0x918b
movq %rbx, %rdi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x3510
cmpl $0x3, %ebp
movl $0x2, %r15d
cmovgel %ebp, %r15d
movl $0x1, %r13d
leaq 0x52f1(%rip), %rbp      # 0x944f
movq (%r14,%r13,8), %rdx
movq %rbx, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x3510
incq %r13
movq %rbp, %r12
cmpq %r13, %r15
jne 0x415e
leaq 0x4f9d(%rip), %rsi      # 0x9120
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x3510
jmp 0x404b
cmpl $0x2, %r15d
je 0x402d
movl $0x1, %ebp
movb $0x1, %al
movq %rax, (%rsp)
jmp 0x408d