// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
callq 0x9ac4
movl %eax, 0x11b45(%rip)     # 0x1e6d0
movq 0x115c6(%rip), %rsi     # 0x1e158
cmpl $0xfffffed1, %eax       # imm = 0xFFFFFED1
jne 0xcdeb
movq 0x11a44(%rip), %rax     # 0x1e5e8
movq 0x11a15(%rip), %rcx     # 0x1e5c0
movq (%rcx,%rsi,8), %rcx
cmpb $0x3a, (%rax,%rcx,8)
jne 0xcdeb
movq 0x11568(%rip), %rax     # 0x1e128
movq %rsi, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x11554(%rip)     # 0x1e128
callq 0x9ac4
movl %eax, 0x11af1(%rip)     # 0x1e6d0
cmpl $0xfffffed1, %eax       # imm = 0xFFFFFED1
jne 0xcdf4
movq 0x11567(%rip), %rax     # 0x1e158
cmpq 0x11b00(%rip), %rax     # 0x1e6f8
jne 0xcdf4
callq 0x9ac4
movl %eax, 0x11ac7(%rip)     # 0x1e6d0
movq $-0x1, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %rbx
movq 0x11500(%rip), %rsi     # 0x1e128
movq %rax, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x114ef(%rip)     # 0x1e128
cmpl $0xfffffed1, 0x11a8d(%rip) # imm = 0xFFFFFED1
jne 0xcdd8
movq 0x11508(%rip), %rdi     # 0x1e158
movq 0x114d1(%rip), %rsi     # 0x1e128
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x114c3(%rip)     # 0x1e128
callq 0x9ac4
movl %eax, 0x11a60(%rip)     # 0x1e6d0
cmpl $-0x68, %eax
jne 0xcd78
callq 0x9ac4
movl %eax, 0x11a4c(%rip)     # 0x1e6d0
movq $-0x1, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %r14
movq 0x11485(%rip), %rsi     # 0x1e128
movq %rax, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x11474(%rip)     # 0x1e128
movl 0x11a16(%rip), %eax     # 0x1e6d0
cmpl $-0x67, %eax
je 0xcccf
cmpl $0xfffffed1, %eax       # imm = 0xFFFFFED1
jne 0xcd28
movq 0x1148b(%rip), %rax     # 0x1e158
jmp 0xccdd
movq 0x119ba(%rip), %rax     # 0x1e690
movq %rax, 0x1147b(%rip)     # 0x1e158
movq 0x1148c(%rip), %rcx     # 0x1e170
movq %rax, (%rcx,%r14,8)
callq 0x9ac4
movl %eax, 0x119dd(%rip)     # 0x1e6d0
cmpl $-0x64, %eax
jne 0xcd28
callq 0x9ac4
movl %eax, 0x119cd(%rip)     # 0x1e6d0
movq $-0x1, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq 0x118a1(%rip), %rcx     # 0x1e5c0
movq %rax, (%rcx,%r14,8)
movq %rax, %r14
jmp 0xccb4
cmpl $-0x69, %eax
jne 0xce56
callq 0x9ac4
movl %eax, 0x11994(%rip)     # 0x1e6d0
movl $0x1, %edi
callq 0x384f
movq %rax, %r14
movl $0x1, %edi
callq 0x384f
movq %rax, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x36e8
movq 0x113c1(%rip), %rsi     # 0x1e128
movq %rax, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x113b0(%rip)     # 0x1e128
movl $0x1, %edi
callq 0x384f
movq 0x113e7(%rip), %rcx     # 0x1e170
movq %rax, (%rcx,%rbx,8)
cmpl $-0x66, 0x1193c(%rip)   # 0x1e6d0
jne 0xce1d
callq 0x9ac4
movl %eax, 0x1192b(%rip)     # 0x1e6d0
movq $-0x1, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq 0x117ff(%rip), %rcx     # 0x1e5c0
movq %rax, (%rcx,%rbx,8)
cmpl $0xfffffed1, 0x11901(%rip) # imm = 0xFFFFFED1
movq %rax, %rbx
je 0xcc49
movl $0x2, %edi
callq 0x384f
leaq 0x9b17(%rip), %rdi      # 0x16900
jmp 0xce05
leaq 0x9ad8(%rip), %rdi      # 0x168ca
jmp 0xce0c
movl $0x1, %edi
callq 0x384f
leaq 0x9ae2(%rip), %rdi      # 0x168e7
movq $-0x8, %rsi
callq 0x33eb
movq $-0x5, %rax
popq %rbx
popq %r14
popq %rbp
retq
movl $0x1, %edi
callq 0x384f
movq %rax, %rbx
movl $0x1, %edi
callq 0x384f
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x36e8
movq 0x11928(%rip), %rdi     # 0x1e770
movq %rax, %rsi
xorl %edx, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x36e8
movl $0x4, %edi
callq 0x384f
leaq 0x9aae(%rip), %rdi      # 0x16915
jmp 0xce05