// File: /workspace/github_c_makefile_star2_O0/azhai[P]mlite/mlite.c
// Function: fnmatch
cell fnmatch(cell n, int *ps) {
	cell	c, cas, p, a, v, rib, g;
	cell	new;

	save(Environment);
	p = car(n);
	Environment = cadr(p);
	if (cdr(n) != NIL && cddr(n) == NIL)
		a = cadr(n);
	else
		a = cdr(n);
	c = rib = UNDEFINED;
	for (cas = cdddr(p); cas != NIL; cas = cdr(cas)) {
		c = car(cas);
		v = car(c);
		g = 0;
		if (tuple_p(v) && car(v) == GUARD) {
			v = cadr(v);
			g =  1;
		}
		if ((rib = destructuring_bind(v, a)) == UNDEFINED)
			continue;
		if (!g)
			break;
		Environment = make_env(rib, Environment);
		save(n);
		set(car(Stack), next_case(n, cas));
		*ps = EV_GUARD;
		return cddar(c);
	}
	*ps = EV_BETA;
	if (rib == UNDEFINED)
		return error("no match", n);
	Environment = make_env(rib, Environment);
	return cadr(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq 0xa641(%rip), %rdi      # 0x28118
movq 0xa65a(%rip), %rsi      # 0x28138
xorl %edx, %edx
callq 0x3780
movq %rax, 0xa64c(%rip)      # 0x28138
movq 0xa68d(%rip), %rax      # 0x28180
movq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq 0xa67a(%rip), %rax      # 0x28180
movq 0xaac3(%rip), %rcx      # 0x285d0
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0xa5f8(%rip)      # 0x28118
movq 0xaaa9(%rip), %rax      # 0x285d0
movq -0x10(%rbp), %rcx
cmpq $-0x1, (%rax,%rcx,8)
je 0x1db6f
movq 0xaa97(%rip), %rax      # 0x285d0
movq 0xaa90(%rip), %rcx      # 0x285d0
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $-0x1, (%rax,%rcx,8)
jne 0x1db6f
movq 0xa62a(%rip), %rax      # 0x28180
movq 0xaa73(%rip), %rcx      # 0x285d0
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
jmp 0x1db82
movq 0xaa5a(%rip), %rax      # 0x285d0
movq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq $-0x5, -0x48(%rbp)
movq $-0x5, -0x20(%rbp)
movq 0xaa37(%rip), %rax      # 0x285d0
movq 0xaa30(%rip), %rcx      # 0x285d0
movq 0xaa29(%rip), %rdx      # 0x285d0
movq -0x30(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
cmpq $-0x1, -0x28(%rbp)
je 0x1dd44
movq 0xa5b3(%rip), %rax      # 0x28180
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq 0xa5a0(%rip), %rax      # 0x28180
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x50(%rbp)
cmpq $0x0, -0x40(%rbp)
jl 0x1dc78
movq 0xa9ee(%rip), %rax      # 0x285f0
movq -0x40(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x1dc78
movq 0xa9d7(%rip), %rax      # 0x285f0
movq -0x40(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x1dc78
movq 0xa9c0(%rip), %rax      # 0x285f0
movq -0x40(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x1dc78
movq 0xa539(%rip), %rax      # 0x28180
movq -0x40(%rbp), %rcx
cmpq $-0x9, (%rax,%rcx,8)
jne 0x1dc78
movq 0xa527(%rip), %rax      # 0x28180
movq 0xa970(%rip), %rcx      # 0x285d0
movq -0x40(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq $0x1, -0x50(%rbp)
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x1d590
movq %rax, -0x48(%rbp)
cmpq $-0x5, %rax
jne 0x1dc94
jmp 0x1dd2c
cmpq $0x0, -0x50(%rbp)
jne 0x1dca0
jmp 0x1dd44
movq -0x48(%rbp), %rdi
movq 0xa46d(%rip), %rsi      # 0x28118
callq 0x12870
movq %rax, 0xa461(%rip)      # 0x28118
movq -0x10(%rbp), %rdi
movq 0xa476(%rip), %rsi      # 0x28138
xorl %edx, %edx
callq 0x3780
movq %rax, 0xa468(%rip)      # 0x28138
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1da00
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdx
movq 0xa494(%rip), %rax      # 0x28180
movq 0xa445(%rip), %rcx      # 0x28138
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
movl $0x3, (%rax)
movq 0xa8c8(%rip), %rax      # 0x285d0
movq 0xa8c1(%rip), %rcx      # 0x285d0
movq 0xa46a(%rip), %rdx      # 0x28180
movq -0x20(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
jmp 0x1dda0
movq 0xa89d(%rip), %rax      # 0x285d0
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
jmp 0x1dbbb
movq -0x18(%rbp), %rax
movl $0x2, (%rax)
cmpq $-0x5, -0x48(%rbp)
jne 0x1dd6b
movq -0x10(%rbp), %rsi
leaq 0x34c7(%rip), %rdi      # 0x21227
callq 0x34b0
movq %rax, -0x8(%rbp)
jmp 0x1dda0
movq -0x48(%rbp), %rdi
movq 0xa3a2(%rip), %rsi      # 0x28118
callq 0x12870
movq %rax, 0xa396(%rip)      # 0x28118
movq 0xa3f7(%rip), %rax      # 0x28180
movq 0xa840(%rip), %rcx      # 0x285d0
movq -0x20(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)