// File: /workspace/github_c_makefile_star2_O1/azhai[P]mlite/mlite.c
// Function: val_decl
cell val_decl(int inner) {
	cell	n, def, v, a, new;

	a = node(NIL, NIL);
	save(a);
	v = node(NIL, NIL);
	save(v);
	def = node(NIL, NIL);
	save(def);
	for (;;) {
		Token = scan();
		set(car(v), pattern());
		def = make_defines(car(v), def);
		if (Token != TOK_ID || Attr != S_equal) {
			unsave(3);
			return error("missing '=' in 'val'", Attr);
		}
		Token = scan();
		set(car(a), expr());
		if (Token != TOK_AND)
			break;
		set(cdr(def), node(NIL, NIL));
		def = cdr(def);
		set(cdr(v), node(NIL, NIL));
		v = cdr(v);
		set(cdr(a), node(NIL, NIL));
		a = cdr(a);
	}
	if (!inner && cdar(Stack) == NIL && symbol_p(caadr(Stack))) {
		unsave(1);
		n = cadr(Stack);
		n = node(car(unsave(1)), n);
		n = node(S_define, n);
		unsave(1);
		return n;
	}
	def = unsave(1);	/* ((fn (v... def...)) a...) */
	n = unsave(1);
	if (cdr(n) == NIL)
		n = car(n);
	n = node(n, def);
	n = node(n, NIL);
	n = node(S_fn, n);
	n = node(n, unsave(1));
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, -0x2c(%rbp)
movq $-0x1, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %r14
movq 0x119b6(%rip), %rsi     # 0x1e128
movq %rax, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x119a5(%rip)     # 0x1e128
movq $-0x1, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %rbx
movq 0x11986(%rip), %rsi     # 0x1e128
movq %rax, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x11975(%rip)     # 0x1e128
movq $-0x1, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %r15
movq 0x11956(%rip), %rsi     # 0x1e128
movq %rax, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x11945(%rip)     # 0x1e128
callq 0x9c07
movl %eax, 0x11ee2(%rip)     # 0x1e6d0
callq 0xb42e
movq 0x11976(%rip), %rcx     # 0x1e170
movq %rax, (%rcx,%rbx,8)
movq %rax, %rdi
movq %r15, %rsi
callq 0xc655
cmpl $0xfffffed1, 0x11ebd(%rip) # imm = 0xFFFFFED1
jne 0xc903
movq %rax, %r12
movq 0x11935(%rip), %rax     # 0x1e158
cmpq 0x11ece(%rip), %rax     # 0x1e6f8
jne 0xc903
callq 0x9c07
movl %eax, 0x11e95(%rip)     # 0x1e6d0
callq 0xa4fd
movq 0x11929(%rip), %rcx     # 0x1e170
movq %rax, (%rcx,%r14,8)
cmpl $0xffffff37, 0x11e7b(%rip) # imm = 0xFFFFFF37
jne 0xc936
movq $-0x1, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %r13
movq 0x11d46(%rip), %rax     # 0x1e5c0
movq %r13, (%rax,%r12,8)
movq $-0x1, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %r15
movq 0x11d23(%rip), %rax     # 0x1e5c0
movq %r15, (%rax,%rbx,8)
movq $-0x1, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %rbx
movq 0x11d00(%rip), %rax     # 0x1e5c0
movq %rbx, (%rax,%r14,8)
callq 0x9c07
movl %eax, 0x11e01(%rip)     # 0x1e6d0
callq 0xb42e
movq 0x11895(%rip), %rcx     # 0x1e170
movq %rax, (%rcx,%r15,8)
movq %rax, %rdi
movq %r13, %rsi
callq 0xc655
movq %rax, %r12
cmpl $0xfffffed1, 0x11dd9(%rip) # imm = 0xFFFFFED1
movq %rbx, %r14
movq %r15, %rbx
je 0xc81c
movl $0x3, %edi
callq 0x3851
movq 0x11844(%rip), %rsi     # 0x1e158
leaq 0x9f9e(%rip), %rdi      # 0x168b9
callq 0x33eb
movq $-0x5, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, -0x2c(%rbp)
jne 0xc959
movq 0x11c7d(%rip), %rax     # 0x1e5c0
movq 0x117de(%rip), %rdx     # 0x1e128
movq (%rcx,%rdx,8), %rsi
cmpq $-0x1, (%rax,%rsi,8)
je 0xc9e0
movl $0x1, %edi
callq 0x3851
movq %rax, %rbx
movl $0x1, %edi
callq 0x3851
movq 0x11c49(%rip), %rcx     # 0x1e5c0
cmpq $-0x1, (%rcx,%rax,8)
jne 0xc989
movq 0x117eb(%rip), %rcx     # 0x1e170
movq (%rcx,%rax,8), %rax
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq 0x11d5a(%rip), %rdi     # 0x1e708
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %rbx
movl $0x1, %edi
callq 0x3851
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x36e8
movq (%rax,%rdx,8), %rax
movq (%rcx,%rax,8), %rax
movq (%rcx,%rax,8), %rax
testq %rax, %rax
js 0xc959
movq 0x11be4(%rip), %rdx     # 0x1e5e0
testb $0x10, (%rdx,%rax)
je 0xc959
cmpq $-0x22, (%rcx,%rax,8)
jne 0xc959
movl $0x1, %edi
callq 0x3851
movq 0x1174e(%rip), %r14     # 0x1e170
movq 0x11b97(%rip), %rax     # 0x1e5c0
movq 0x116f8(%rip), %rcx     # 0x1e128
movq (%rax,%rcx,8), %rax
movq (%r14,%rax,8), %rbx
movl $0x1, %edi
callq 0x3851
movq (%r14,%rax,8), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x36e8
movq 0x11d09(%rip), %rdi     # 0x1e760
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %rbx
movl $0x1, %edi
callq 0x3851
movq %rbx, %rax
jmp 0xc927