// File: /workspace/github_c_makefile_star2_O3/azhai[P]mlite/mlite.c
// Function: read_list
cell read_list(int lst, int delim) {
	cell	n,	/* Node read */
		m,	/* List */
		a;	/* Used to append nodes to m */
	cell	new;
	int	c;	/* Member counter */
	char	badcons[] = "malformed list constructor (::)";
	char	msg[80];

	if (!Level)
		Opening_line = Line_no;
	if (++Level > MAX_IO_DEPTH) {
		error("reader: too many nested lists or tuples", NOEXPR);
		return NIL;
	}
	m = node3(NIL, NIL, lst);		/* root */
	save(m);
	a = NIL;
	c = 0;
	while (1) {
		if (Error_flag) {
			unsave(1);
			return NIL;
		}
		n = read_form();
		if (n == END_OF_FILE)  {
			if (Load_level) {
				unsave(1);
				return END_OF_FILE;
			}
			sprintf(msg, "missing ')', started in line %d",
					Opening_line);
			error(msg, NOEXPR);
		}
		if (n == TOK_CONS) {
			if (c != 1 || lst == 0) {
				n = S_cons;
			}
			else {
				n = read_form();
				cdr(a) = n;
				if (	(!list_p(n) && !symbol_p(n)) ||
					read_form() != TOK_RBRACK
				) {
					error(badcons, NOEXPR);
					continue;
				}
				unsave(1);
				Level--;
				return m;
			}
		}
		if (n == TOK_RPAREN || n == TOK_RBRACK) {
			if (n != delim)
				error(n == TOK_RPAREN?
				  "expected ']' instead of `)'":
				  "expected `)' instead of `]'",
				  NOEXPR);
			break;
		}
		if (a == NIL)
			a = m;		/* First member: insert at root */
		else
			a = cdr(a);	/* Subsequent members: append */
		car(a) = n;
		set(cdr(a), node3(NIL, NIL, lst)); /* Space for next member */
		c++;
	}
	Level--;
	if (a != NIL)
		cdr(a) = NIL;	/* Remove trailing empty node */
	unsave(1);
	return c? m: NIL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %edi, %r12d
movaps 0x10672(%rip), %xmm0    # 0x17910
movaps %xmm0, -0x40(%rbp)
movaps 0x10657(%rip), %xmm0    # 0x17900
movaps %xmm0, -0x50(%rbp)
movl 0x173cd(%rip), %eax     # 0x1e680
testl %eax, %eax
je 0x72e3
leal 0x1(%rax), %ecx
movl %ecx, 0x173c0(%rip)     # 0x1e680
cmpl $0x10000, %eax          # imm = 0x10000
jl 0x72f9
leaq 0xf0bb(%rip), %rdi      # 0x16389
movq $-0x8, %rsi
callq 0x33eb
movq $-0x1, %r13
jmp 0x7347
movl 0x172e7(%rip), %eax     # 0x1e5d0
movl %eax, 0x17395(%rip)     # 0x1e684
movl $0x1, 0x17387(%rip)     # 0x1e680
movl %esi, -0x2c(%rbp)
movq $-0x1, %r13
movq $-0x1, %rdi
movq $-0x1, %rsi
movl %r12d, %edx
callq 0x36e8
movq %rax, %r14
movq 0x16e05(%rip), %rsi     # 0x1e128
movq %rax, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x16df4(%rip)     # 0x1e128
cmpl $0x0, 0x17279(%rip)     # 0x1e5b4
je 0x7359
movl $0x1, %edi
callq 0x384f
movq %r13, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $-0x1, %r15
xorl %ebx, %ebx
callq 0x754a
cmpq $-0x67, %rax
jne 0x73fd
testl %r12d, %r12d
je 0x7446
cmpl $0x1, %ebx
jne 0x7446
callq 0x754a
movq 0x17231(%rip), %rcx     # 0x1e5c0
movq %rax, (%rcx,%r15,8)
testq %rax, %rax
js 0x73c1
movq 0x17241(%rip), %rcx     # 0x1e5e0
movb (%rcx,%rax), %cl
movl %ecx, %edx
andb $0x19, %dl
cmpb $0x8, %dl
je 0x73c7
testb $0x10, %cl
je 0x73d6
movq 0x16db8(%rip), %rcx     # 0x1e170
cmpq $-0x22, (%rcx,%rax,8)
je 0x73c7
jmp 0x73d6
cmpq $-0x1, %rax
jne 0x73d6
callq 0x754a
cmpq $-0x6b, %rax
je 0x74bb
leaq -0x50(%rbp), %rdi
movq $-0x8, %rsi
callq 0x33eb
movl $0x1, %ebx
cmpl $0x0, 0x171c2(%rip)     # 0x1e5b4
je 0x7362
jmp 0x733d
cmpq $-0x4, %rax
jne 0x744d
cmpl $0x0, 0x1727e(%rip)     # 0x1e688
jne 0x7534
movl 0x1726e(%rip), %edx     # 0x1e684
leaq -0xa0(%rbp), %r13
movq %r13, %rdi
leaq 0xef8a(%rip), %rsi      # 0x163b1
xorl %eax, %eax
callq 0x31f0
movq %r13, %rdi
movq $-0x8, %rsi
callq 0x33eb
movq $-0x4, %rax
jmp 0x745a
movq 0x17243(%rip), %rax     # 0x1e690
movq %rax, %rcx
orq $0x2, %rcx
cmpq $-0x69, %rcx
je 0x74d3
movq %r14, %r13
cmpq $-0x1, %r15
je 0x746e
movq 0x17156(%rip), %rcx     # 0x1e5c0
movq (%rcx,%r15,8), %r14
movq 0x16cfb(%rip), %rcx     # 0x1e170
movq %rax, (%rcx,%r14,8)
movq $-0x1, %rdi
movq $-0x1, %rsi
movl %r12d, %edx
callq 0x36e8
movq 0x1712a(%rip), %rcx     # 0x1e5c0
movq %rax, (%rcx,%r14,8)
incl %ebx
cmpl $0x0, 0x17111(%rip)     # 0x1e5b4
movq %r14, %r15
movq %r13, %r14
movq $-0x1, %r13
je 0x7362
jmp 0x733d
movl $0x1, %edi
callq 0x384f
decl 0x171b5(%rip)           # 0x1e680
movq %r14, %r13
jmp 0x7347
movslq -0x2c(%rbp), %rcx
cmpq %rcx, %rax
je 0x74fe
cmpq $-0x69, %rax
leaq 0xeeea(%rip), %rax      # 0x163d1
leaq 0xeeff(%rip), %rdi      # 0x163ed
cmoveq %rax, %rdi
movq $-0x8, %rsi
callq 0x33eb
decl 0x1717c(%rip)           # 0x1e680
cmpq $-0x1, %r15
je 0x7519
movq 0x170af(%rip), %rax     # 0x1e5c0
movq $-0x1, (%rax,%r15,8)
movl $0x1, %edi
callq 0x384f
xorl %r13d, %r13d
cmpl $0x1, %ebx
sbbq %r13, %r13
orq %r14, %r13
jmp 0x7347
movl $0x1, %edi
callq 0x384f
movq $-0x4, %r13
jmp 0x7347