// File: /workspace/github_c_makefile_star2_O3/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 0x11b1b(%rip), %rsi     # 0x1e128
movq %rax, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x11b0a(%rip)     # 0x1e128
movq $-0x1, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %rbx
movq 0x11aeb(%rip), %rsi     # 0x1e128
movq %rax, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x11ada(%rip)     # 0x1e128
movq $-0x1, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %r15
movq 0x11abb(%rip), %rsi     # 0x1e128
movq %rax, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x11aaa(%rip)     # 0x1e128
callq 0x9ac4
movl %eax, 0x12047(%rip)     # 0x1e6d0
callq 0xb2cd
movq 0x11adb(%rip), %rcx     # 0x1e170
movq %rax, (%rcx,%rbx,8)
movq %rax, %rdi
movq %r15, %rsi
callq 0xc4e1
cmpl $0xfffffed1, 0x12022(%rip) # imm = 0xFFFFFED1
jne 0xc79e
movq %rax, %r12
movq 0x11a9a(%rip), %rax     # 0x1e158
cmpq 0x12033(%rip), %rax     # 0x1e6f8
jne 0xc79e
callq 0x9ac4
movl %eax, 0x11ffa(%rip)     # 0x1e6d0
callq 0xa3ad
movq 0x11a8e(%rip), %rcx     # 0x1e170
movq %rax, (%rcx,%r14,8)
cmpl $0xffffff37, 0x11fe0(%rip) # imm = 0xFFFFFF37
jne 0xc7d1
movq $-0x1, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %r13
movq 0x11eab(%rip), %rax     # 0x1e5c0
movq %r13, (%rax,%r12,8)
movq $-0x1, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %r15
movq 0x11e88(%rip), %rax     # 0x1e5c0
movq %r15, (%rax,%rbx,8)
movq $-0x1, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %rbx
movq 0x11e65(%rip), %rax     # 0x1e5c0
movq %rbx, (%rax,%r14,8)
callq 0x9ac4
movl %eax, 0x11f66(%rip)     # 0x1e6d0
callq 0xb2cd
movq 0x119fa(%rip), %rcx     # 0x1e170
movq %rax, (%rcx,%r15,8)
movq %rax, %rdi
movq %r13, %rsi
callq 0xc4e1
movq %rax, %r12
cmpl $0xfffffed1, 0x11f3e(%rip) # imm = 0xFFFFFED1
movq %rbx, %r14
movq %r15, %rbx
je 0xc6b7
movl $0x3, %edi
callq 0x384f
movq 0x119a9(%rip), %rsi     # 0x1e158
leaq 0xa0e8(%rip), %rdi      # 0x1689e
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 0xc7f4
movq 0x11de2(%rip), %rax     # 0x1e5c0
movq 0x11943(%rip), %rdx     # 0x1e128
movq (%rcx,%rdx,8), %rsi
cmpq $-0x1, (%rax,%rsi,8)
je 0xc87b
movl $0x1, %edi
callq 0x384f
movq %rax, %rbx
movl $0x1, %edi
callq 0x384f
movq 0x11dae(%rip), %rcx     # 0x1e5c0
cmpq $-0x1, (%rcx,%rax,8)
jne 0xc824
movq 0x11950(%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 0x11ebf(%rip), %rdi     # 0x1e708
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %rbx
movl $0x1, %edi
callq 0x384f
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 0xc7f4
movq 0x11d49(%rip), %rdx     # 0x1e5e0
testb $0x10, (%rdx,%rax)
je 0xc7f4
cmpq $-0x22, (%rcx,%rax,8)
jne 0xc7f4
movl $0x1, %edi
callq 0x384f
movq 0x118b3(%rip), %r14     # 0x1e170
movq 0x11cfc(%rip), %rax     # 0x1e5c0
movq 0x1185d(%rip), %rcx     # 0x1e128
movq (%rax,%rcx,8), %rax
movq (%r14,%rax,8), %rbx
movl $0x1, %edi
callq 0x384f
movq (%r14,%rax,8), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x36e8
movq 0x11e6e(%rip), %rdi     # 0x1e760
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %rbx
movl $0x1, %edi
callq 0x384f
movq %rbx, %rax
jmp 0xc7c2