// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $0x2, -0x1c(%rbp)
jge 0x4498
jmp 0x4467
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x6cca(%rip), %rsi      # 0xb143
leaq 0x6cdd(%rip), %rcx      # 0xb15d
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x3510
movl $0x1, -0x4(%rbp)
jmp 0x4653
movl $0x0, -0x3c(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x44d7
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x6cbf(%rip), %rsi      # 0xb17d
callq 0x3320
cmpl $0x0, %eax
jne 0x44d7
cmpl $0x3, -0x1c(%rbp)
jge 0x44d0
jmp 0x4467
movl $0x1, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x4593
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7e, %eax
jne 0x4532
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x3570
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x4530
movl $0x1, -0x4(%rbp)
jmp 0x4653
jmp 0x4532
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x455b
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rdx
addq $0x1, %rdx
leaq 0x6c38(%rip), %rsi      # 0xb189
callq 0x4660
movl %eax, -0x38(%rbp)
jmp 0x4572
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rdx
leaq 0x729e(%rip), %rsi      # 0xb808
callq 0x4660
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
je 0x4583
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4653
jmp 0x4585
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x44e0
movq -0x18(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x464c
cmpl $0x0, -0x3c(%rbp)
jne 0x464c
leaq 0x7251(%rip), %rax      # 0xb808
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %ecx
leaq 0x6be0(%rip), %rdx      # 0xb1a9
leaq 0x6b4f(%rip), %rax      # 0xb11f
cmpl $0x2, %ecx
cmoveq %rax, %rdx
leaq 0x6bad(%rip), %rsi      # 0xb18b
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x3510
movl $0x1, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x462d
movq -0x18(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x3510
leaq 0x6dc8(%rip), %rax      # 0xb3e6
movq %rax, -0x50(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x45f0
movq -0x18(%rbp), %rdi
leaq 0x6ae8(%rip), %rsi      # 0xb120
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x3510
movl $0x1, -0x4(%rbp)
jmp 0x4653
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)