// File: /workspace/github_c_makefile_star2_O2/azhai[P]mlite/mlite.c
// Function: type_decl
cell type_decl(void) {
	cell	n, t, new;

	Token = scan();
	if (Token != TOK_ID || !consname_p(Attr))
		return error("constructor name expected at", Attr);
	save(Attr);
	Token = scan();
	if (Token != TOK_ID || Attr != S_equal) {
		unsave(1);
		return error("missing '=' after 'type'", NOEXPR);
	}
	Token = scan();
	t = node(NIL, NIL);
	save(t);
	for (;;) {
		if (Token != TOK_ID) {
			unsave(2);
			return error("constructor expected", NOEXPR);
		}
		save(Attr);
		Token = scan();
		if (Token == TOK_LPAREN) {
			Token = scan();
			n = node(NIL, NIL);
			save(n);
			while (Token == TOK_ID || Token == TOK_CONS) {
				if (Token == TOK_CONS)
					Attr = S_cons;
				car(n) = Attr;
				Token = scan();
				if (Token != TOK_COMMA)
					break;
				Token = scan();
				set(cdr(n), node(NIL, NIL));
				n = cdr(n);
			}
			if (Token != TOK_RPAREN) {
				unsave(4);
				return error("missing ')' in constructor",
						NOEXPR);
			}
			Token = scan();
			n = unsave(1);
			n = node(unsave(1), n);
			save(n);
		}
		car(t) = unsave(1);
		if (Token != TOK_PIPE)
			break;
		Token = scan();
		set(cdr(t), node(NIL, NIL));
		t = cdr(t);
	}
	n = unsave(1);
	n = node(unsave(1), n);
	n = node(S_define_type, n);
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
callq 0x8d74
movl %eax, 0x10b6e(%rip)     # 0x1c6d0
movq 0x105ef(%rip), %rsi     # 0x1c158
cmpl $0xfffffed1, %eax       # imm = 0xFFFFFED1
jne 0xbd81
movq 0x10a6d(%rip), %rax     # 0x1c5e8
movq 0x10a3e(%rip), %rcx     # 0x1c5c0
movq (%rcx,%rsi,8), %rcx
cmpb $0x3a, (%rax,%rcx,8)
jne 0xbd81
movq 0x10591(%rip), %rax     # 0x1c128
movq %rsi, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x3613
movq %rax, 0x1057d(%rip)     # 0x1c128
callq 0x8d74
movl %eax, 0x10b1a(%rip)     # 0x1c6d0
cmpl $0xfffffed1, %eax       # imm = 0xFFFFFED1
jne 0xbd8a
movq 0x10590(%rip), %rax     # 0x1c158
cmpq 0x10b29(%rip), %rax     # 0x1c6f8
jne 0xbd8a
callq 0x8d74
movl %eax, 0x10af0(%rip)     # 0x1c6d0
pushq $-0x1
popq %rbx
movq %rbx, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3613
movq %rax, %r14
movq 0x1052e(%rip), %rsi     # 0x1c128
movq %rax, %rdi
xorl %edx, %edx
callq 0x3613
movq %rax, 0x1051d(%rip)     # 0x1c128
pushq $0x1
popq %r15
cmpl $0xfffffed1, 0x10ab7(%rip) # imm = 0xFFFFFED1
jne 0xbdad
movq 0x10532(%rip), %rdi     # 0x1c158
movq 0x104fb(%rip), %rsi     # 0x1c128
xorl %edx, %edx
callq 0x3613
movq %rax, 0x104ed(%rip)     # 0x1c128
callq 0x8d74
movl %eax, 0x10a8a(%rip)     # 0x1c6d0
cmpl $-0x68, %eax
jne 0xbd3a
callq 0x8d74
movl %eax, 0x10a76(%rip)     # 0x1c6d0
movq %rbx, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3613
movq %rax, %r12
movq 0x104b7(%rip), %rsi     # 0x1c128
movq %rax, %rdi
xorl %edx, %edx
callq 0x3613
movq %rax, 0x104a6(%rip)     # 0x1c128
movl 0x10a48(%rip), %eax     # 0x1c6d0
cmpl $-0x67, %eax
je 0xbc9d
cmpl $0xfffffed1, %eax       # imm = 0xFFFFFED1
jne 0xbcee
movq 0x104bd(%rip), %rax     # 0x1c158
jmp 0xbcab
movq 0x109ec(%rip), %rax     # 0x1c690
movq %rax, 0x104ad(%rip)     # 0x1c158
movq 0x104be(%rip), %rcx     # 0x1c170
movq %rax, (%rcx,%r12,8)
callq 0x8d74
movl %eax, 0x10a0f(%rip)     # 0x1c6d0
cmpl $-0x64, %eax
jne 0xbcee
callq 0x8d74
movl %eax, 0x109ff(%rip)     # 0x1c6d0
movq %rbx, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3613
movq 0x108db(%rip), %rcx     # 0x1c5c0
movq %rax, (%rcx,%r12,8)
movq %rax, %r12
jmp 0xbc82
cmpl $-0x69, %eax
jne 0xbdf8
callq 0x8d74
movl %eax, 0x109ce(%rip)     # 0x1c6d0
movl %r15d, %edi
callq 0x3775
movq %rax, %r12
movl %r15d, %edi
callq 0x3775
movq %rax, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x3613
movq 0x103ff(%rip), %rsi     # 0x1c128
movq %rax, %rdi
xorl %edx, %edx
callq 0x3613
movq %rax, 0x103ee(%rip)     # 0x1c128
movl %r15d, %edi
callq 0x3775
movq 0x10427(%rip), %rcx     # 0x1c170
movq %rax, (%rcx,%r14,8)
cmpl $-0x66, 0x1097c(%rip)   # 0x1c6d0
jne 0xbdbe
callq 0x8d74
movl %eax, 0x1096f(%rip)     # 0x1c6d0
movq %rbx, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3613
movq 0x1084b(%rip), %rcx     # 0x1c5c0
movq %rax, (%rcx,%r14,8)
movq %rax, %r14
jmp 0xbc0f
leaq 0x8b42(%rip), %rdi      # 0x148ca
jmp 0xbd9c
pushq $0x1
popq %rdi
callq 0x3775
leaq 0x8b4e(%rip), %rdi      # 0x148e7
pushq $-0x8
popq %rsi
callq 0x33e4
pushq $-0x5
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x2
popq %rdi
callq 0x3775
leaq 0x8b44(%rip), %rdi      # 0x14900
jmp 0xbd99
pushq $0x1
popq %rbx
movl %ebx, %edi
callq 0x3775
movq %rax, %r14
movl %ebx, %edi
callq 0x3775
movq %rax, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3613
movq 0x1098a(%rip), %rdi     # 0x1c770
movq %rax, %rsi
xorl %edx, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3613
pushq $0x4
popq %rdi
callq 0x3775
leaq 0x8b0e(%rip), %rdi      # 0x14915
jmp 0xbd99