// File: /workspace/github_c_makefile_star2_O2/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)
pushq $-0x1
popq %r14
movq %r14, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3613
movq %rax, %r15
movq 0x10a9b(%rip), %rsi     # 0x1c128
movq %rax, %rdi
xorl %edx, %edx
callq 0x3613
movq %rax, 0x10a8a(%rip)     # 0x1c128
movq %r14, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3613
movq %rax, %r12
movq 0x10a73(%rip), %rsi     # 0x1c128
movq %rax, %rdi
xorl %edx, %edx
callq 0x3613
movq %rax, 0x10a62(%rip)     # 0x1c128
movq %r14, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3613
movq %rax, %r13
movq 0x10a4b(%rip), %rsi     # 0x1c128
movq %rax, %rdi
xorl %edx, %edx
callq 0x3613
movq %rax, 0x10a3a(%rip)     # 0x1c128
callq 0x8d74
movl %eax, 0x10fd7(%rip)     # 0x1c6d0
callq 0xa43e
movq 0x10a6b(%rip), %rcx     # 0x1c170
movq %rax, (%rcx,%r12,8)
movq %rax, %rdi
movq %r13, %rsi
callq 0xb583
cmpl $0xfffffed1, 0x10fb2(%rip) # imm = 0xFFFFFED1
jne 0xb7bf
movq %rax, %rbx
movq 0x10a2a(%rip), %rax     # 0x1c158
cmpq 0x10fc3(%rip), %rax     # 0x1c6f8
jne 0xb7bf
callq 0x8d74
movl %eax, 0x10f8a(%rip)     # 0x1c6d0
callq 0x95f5
movq 0x10a1e(%rip), %rcx     # 0x1c170
movq %rax, (%rcx,%r15,8)
cmpl $0xffffff37, 0x10f70(%rip) # imm = 0xFFFFFF37
jne 0xb7ec
movq %r14, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3613
movq %rax, %r13
movq 0x10e43(%rip), %rax     # 0x1c5c0
movq %r13, (%rax,%rbx,8)
movq %r14, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3613
movq %rax, %rbx
movq 0x10e28(%rip), %rax     # 0x1c5c0
movq %rbx, (%rax,%r12,8)
movq %r14, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3613
movq 0x10e10(%rip), %rcx     # 0x1c5c0
movq %rax, (%rcx,%r15,8)
movq %rbx, %r12
movq %rax, %r15
jmp 0xb6ee
pushq $0x3
popq %rdi
callq 0x3775
movq 0x1098a(%rip), %rsi     # 0x1c158
leaq 0x90c9(%rip), %rdi      # 0x1489e
callq 0x33e4
pushq $-0x5
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, -0x2c(%rbp)
jne 0xb80f
movq 0x10dc7(%rip), %rax     # 0x1c5c0
movq 0x10928(%rip), %rdx     # 0x1c128
movq (%rcx,%rdx,8), %rsi
cmpq $-0x1, (%rax,%rsi,8)
je 0xb890
pushq $0x1
popq %r14
movl %r14d, %edi
callq 0x3775
movq %rax, %rbx
movl %r14d, %edi
callq 0x3775
movq 0x10d93(%rip), %rcx     # 0x1c5c0
cmpq $-0x1, (%rcx,%rax,8)
jne 0xb83f
movq 0x10935(%rip), %rcx     # 0x1c170
movq (%rcx,%rax,8), %rax
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3613
pushq $-0x1
popq %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x3613
movq 0x10ea8(%rip), %rdi     # 0x1c708
movq %rax, %rsi
xorl %edx, %edx
callq 0x3613
movq %rax, %rbx
pushq $0x1
popq %rdi
callq 0x3775
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 0x3613
movq (%rax,%rdx,8), %rax
movq (%rcx,%rax,8), %rax
movq (%rcx,%rax,8), %rax
testq %rax, %rax
js 0xb80f
movq 0x10d34(%rip), %rdx     # 0x1c5e0
testb $0x10, (%rdx,%rax)
je 0xb80f
cmpq $-0x22, (%rcx,%rax,8)
jne 0xb80f
pushq $0x1
popq %rbx
movl %ebx, %edi
callq 0x3775
movq 0x1089e(%rip), %r15     # 0x1c170
movq 0x10ce7(%rip), %rax     # 0x1c5c0
movq 0x10848(%rip), %rcx     # 0x1c128
movq (%rax,%rcx,8), %rax
movq (%r15,%rax,8), %r14
movl %ebx, %edi
callq 0x3775
movq (%r15,%rax,8), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3613
movq 0x10e5c(%rip), %rdi     # 0x1c760
movq %rax, %rsi
xorl %edx, %edx
callq 0x3613
movq %rax, %r14
movl %ebx, %edi
callq 0x3775
movq %r14, %rax
jmp 0xb7dd