// File: /workspace/github_c_makefile_star2_O0/azhai[P]mlite/mlite.c
// Function: list
cell list(int pat, int lst) {
	cell	n, m, a, new;
	int	c;
	char	badcons[] = "malformed list constructor (::)";
	char	msg[80];

	Level++;
	a = m = node(NIL, NIL);		/* root */
	save(m);
	c = 0;
	while (1) {
		if (Error_flag) {
			unsave(1);
			return NIL;
		}
		if (Token == END_OF_FILE)  {
			if (Load_level) {
				unsave(1);
				return END_OF_FILE;
			}
			sprintf(msg, "missing ')' or ']', started in line %d",
					Opening_line);
			error(msg, NOEXPR);
		}
		if (Token == TOK_RPAREN || Token == TOK_RBRACK) {
			if (c == 0)
				break;
			unsave(1);
			return error(Token == TOK_RPAREN?
					"unexpected `)' in tuple":
					"unexpected `]' in list",
					NOEXPR);
		}
		if (pat) {
			set(car(a), x_pattern(1));
			if (opr(car(a)) != NIL) {
				set(cdr(Guard_ops), node(NIL, NIL));
				Guard_ops = cdr(Guard_ops);
				car(Guard_ops) = opr(car(a));
			}
			car(a) = pat(car(a));
		}
		else {
			set(car(a), lst? expr(): sequence());
		}
		c++;
		if (Token == TOK_CONS) {
			Token = scan();
			if (c != 1 || lst == 0) {
				n = S_cons;
			}
			else {
				n = pat? pat_primary(1): primary();
				cdr(a) = n;
				if (	(!list_p(n) && !symbol_p(n)) ||
					Token != TOK_RBRACK) {
					error(badcons, NOEXPR);
					continue;
				}
				Token = scan();
				unsave(1);
				Level--;
				return m;
			}
		}
		if (Token != TOK_COMMA)
			break;
		Token = scan();
		set(cdr(a), node(NIL, NIL));	/* Space for next member */
		a = cdr(a);
	}
	if (	(Token != TOK_RPAREN && !lst) ||
		(Token != TOK_RBRACK && lst)
	) {
		unsave(1);
		return error(lst? "missing ']' in list":
				  "missing ')' in tuple",
					NOEXPR);
	}
	Token = scan();
	Level--;
	unsave(1);
	return c? m: lst? NIL: UNIT;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movq 0x14788(%rip), %rax     # 0x21a00
movq %rax, -0x60(%rbp)
movq 0x14785(%rip), %rax     # 0x21a08
movq %rax, -0x58(%rbp)
movq 0x14782(%rip), %rax     # 0x21a10
movq %rax, -0x50(%rbp)
movq 0x1477f(%rip), %rax     # 0x21a18
movq %rax, -0x48(%rbp)
movl 0x1b3ed(%rip), %eax     # 0x28690
addl $0x1, %eax
movl %eax, 0x1b3e4(%rip)     # 0x28690
movq $-0x1, %rsi
xorl %edx, %edx
movq %rsi, %rdi
callq 0x3780
movq %rax, -0x20(%rbp)
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq 0x1ae68(%rip), %rsi     # 0x28138
xorl %edx, %edx
callq 0x3780
movq %rax, 0x1ae5a(%rip)     # 0x28138
movl $0x0, -0x34(%rbp)
movl 0x1b2d9(%rip), %eax     # 0x285c4
cmpl $0x0, %eax
je 0xd307
movl $0x1, %edi
callq 0x3950
movq $-0x1, -0x8(%rbp)
jmp 0xd730
cmpl $-0x4, 0x1b3d2(%rip)    # 0x286e0
jne 0xd35e
cmpl $0x0, 0x1b381(%rip)     # 0x28698
je 0xd330
movl $0x1, %edi
callq 0x3950
movq $-0x4, -0x8(%rbp)
jmp 0xd730
leaq -0xb0(%rbp), %rdi
movl 0x1b357(%rip), %edx     # 0x28694
leaq 0x1349a(%rip), %rsi     # 0x207de
movb $0x0, %al
callq 0x3200
leaq -0xb0(%rbp), %rdi
movq $-0x8, %rsi
callq 0x34b0
cmpl $-0x69, 0x1b37b(%rip)   # 0x286e0
je 0xd370
cmpl $-0x6b, 0x1b372(%rip)   # 0x286e0
jne 0xd3b5
cmpl $0x0, -0x34(%rbp)
jne 0xd37b
jmp 0xd680
movl $0x1, %edi
callq 0x3950
movl 0x1b355(%rip), %ecx     # 0x286e0
leaq 0x1348b(%rip), %rdi     # 0x2081d
leaq 0x1346c(%rip), %rax     # 0x20805
cmpl $-0x69, %ecx
cmoveq %rax, %rdi
movq $-0x8, %rsi
callq 0x34b0
movq %rax, -0x8(%rbp)
jmp 0xd730
cmpl $0x0, -0xc(%rbp)
je 0xd498
movl $0x1, %edi
callq 0xd740
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdx
movq 0x1ada8(%rip), %rax     # 0x28180
movq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x1b1e9(%rip), %rax     # 0x285d0
movq 0x1ad92(%rip), %rcx     # 0x28180
movq -0x28(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $-0x1, (%rax,%rcx,8)
je 0xd46d
movq $-0x1, %rsi
xorl %edx, %edx
movq %rsi, %rdi
callq 0x3780
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdx
movq 0x1b1b3(%rip), %rax     # 0x285d0
movq 0x1b2c4(%rip), %rcx     # 0x286e8
movq %rdx, (%rax,%rcx,8)
movq 0x1b1a1(%rip), %rax     # 0x285d0
movq 0x1b2b2(%rip), %rcx     # 0x286e8
movq (%rax,%rcx,8), %rax
movq %rax, 0x1b2a7(%rip)     # 0x286e8
movq 0x1b188(%rip), %rax     # 0x285d0
movq 0x1ad31(%rip), %rcx     # 0x28180
movq -0x28(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x1ad1e(%rip), %rax     # 0x28180
movq 0x1b27f(%rip), %rcx     # 0x286e8
movq %rdx, (%rax,%rcx,8)
movq 0x1ad0c(%rip), %rax     # 0x28180
movq 0x1ad05(%rip), %rcx     # 0x28180
movq -0x28(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x1acf2(%rip), %rax     # 0x28180
movq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0xd4d6
cmpl $0x0, -0x10(%rbp)
je 0xd4ac
callq 0xd930
movq %rax, -0xb8(%rbp)
jmp 0xd4b8
callq 0xda10
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdx
movq 0x1acb2(%rip), %rax     # 0x28180
movq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
cmpl $-0x67, 0x1b1fa(%rip)   # 0x286e0
jne 0xd62a
callq 0xcc90
movl %eax, 0x1b1e9(%rip)     # 0x286e0
cmpl $0x1, -0x34(%rbp)
jne 0xd503
cmpl $0x0, -0x10(%rbp)
jne 0xd513
movq 0x1b196(%rip), %rax     # 0x286a0
movq %rax, -0x18(%rbp)
jmp 0xd628
cmpl $0x0, -0xc(%rbp)
je 0xd52c
movl $0x1, %edi
callq 0xdb10
movq %rax, -0xc0(%rbp)
jmp 0xd538
callq 0xdd10
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdx
movq 0x1b082(%rip), %rax     # 0x285d0
movq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
cmpq $0x0, -0x18(%rbp)
jl 0xd5a2
movq 0x1b08c(%rip), %rax     # 0x285f0
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xd5a2
movq 0x1b075(%rip), %rax     # 0x285f0
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0xd5a2
movq 0x1b05e(%rip), %rax     # 0x285f0
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0xd5d9
cmpq $-0x1, -0x18(%rbp)
je 0xd5d9
cmpq $0x0, -0x18(%rbp)
jl 0xd5e2
movq 0x1b039(%rip), %rax     # 0x285f0
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xd5e2
movq 0x1abb2(%rip), %rax     # 0x28180
movq -0x18(%rbp), %rcx
cmpq $-0x22, (%rax,%rcx,8)
jne 0xd5e2
cmpl $-0x6b, 0x1b100(%rip)   # 0x286e0
je 0xd5f7
leaq -0x60(%rbp), %rdi
movq $-0x8, %rsi
callq 0x34b0
jmp 0xd2e5
callq 0xcc90
movl %eax, 0x1b0de(%rip)     # 0x286e0
movl $0x1, %edi
callq 0x3950
movl 0x1b07e(%rip), %eax     # 0x28690
addl $-0x1, %eax
movl %eax, 0x1b075(%rip)     # 0x28690
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xd730
jmp 0xd62a
cmpl $-0x64, 0x1b0af(%rip)   # 0x286e0
je 0xd635
jmp 0xd680
callq 0xcc90
movl %eax, 0x1b0a0(%rip)     # 0x286e0
movq $-0x1, %rsi
xorl %edx, %edx
movq %rsi, %rdi
callq 0x3780
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdx
movq 0x1af70(%rip), %rax     # 0x285d0
movq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x1af61(%rip), %rax     # 0x285d0
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
jmp 0xd2e5
cmpl $-0x69, 0x1b059(%rip)   # 0x286e0
je 0xd68f
cmpl $0x0, -0x10(%rbp)
je 0xd69e
cmpl $-0x6b, 0x1b04a(%rip)   # 0x286e0
je 0xd6d2
cmpl $0x0, -0x10(%rbp)
je 0xd6d2
movl $0x1, %edi
callq 0x3950
movl -0x10(%rbp), %ecx
leaq 0x13196(%rip), %rdi     # 0x20848
leaq 0x1317b(%rip), %rax     # 0x20834
cmpl $0x0, %ecx
cmovneq %rax, %rdi
movq $-0x8, %rsi
callq 0x34b0
movq %rax, -0x8(%rbp)
jmp 0xd730
callq 0xcc90
movl %eax, 0x1b003(%rip)     # 0x286e0
movl 0x1afad(%rip), %eax     # 0x28690
addl $-0x1, %eax
movl %eax, 0x1afa4(%rip)     # 0x28690
movl $0x1, %edi
callq 0x3950
cmpl $0x0, -0x34(%rbp)
je 0xd709
movq -0x20(%rbp), %rax
movq %rax, -0xc8(%rbp)
jmp 0xd725
movl -0x10(%rbp), %edx
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovnel %ecx, %eax
cltq
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)