// File: /workspace/github_c_makefile_star2_O2/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, %r15d
movaps 0xeea6(%rip), %xmm0     # 0x15910
movaps %xmm0, -0x40(%rbp)
movaps 0xee8b(%rip), %xmm0     # 0x15900
movaps %xmm0, -0x50(%rbp)
movl 0x15c01(%rip), %eax     # 0x1c680
testl %eax, %eax
je 0x6aa7
leal 0x1(%rax), %ecx
movl %ecx, 0x15bf4(%rip)     # 0x1c680
cmpl $0x10000, %eax          # imm = 0x10000
jl 0x6abd
leaq 0xd8ef(%rip), %rdi      # 0x14389
pushq $-0x8
popq %rsi
callq 0x33e4
jmp 0x6c29
movl 0x15b23(%rip), %eax     # 0x1c5d0
movl %eax, 0x15bd1(%rip)     # 0x1c684
movl $0x1, 0x15bc3(%rip)     # 0x1c680
movl %esi, -0x2c(%rbp)
pushq $-0x1
popq %r13
movq %r13, %rdi
movq %r13, %rsi
movl %r15d, %edx
callq 0x3613
movq %rax, %r12
movq 0x1564c(%rip), %rsi     # 0x1c128
movq %rax, %rdi
xorl %edx, %edx
callq 0x3613
movq %rax, 0x1563b(%rip)     # 0x1c128
leaq -0x50(%rbp), %r14
xorl %ebx, %ebx
cmpl $0x0, 0x15aba(%rip)     # 0x1c5b4
jne 0x6c21
callq 0x6cb2
cmpq $-0x67, %rax
jne 0x6b83
testl %r15d, %r15d
je 0x6bc4
cmpl $0x1, %ebx
jne 0x6bc4
callq 0x6cb2
movq 0x15a97(%rip), %rcx     # 0x1c5c0
movq %rax, (%rcx,%r13,8)
testq %rax, %rax
js 0x6b5b
movq 0x15aa7(%rip), %rcx     # 0x1c5e0
movb (%rcx,%rax), %cl
movl %ecx, %edx
andb $0x19, %dl
cmpb $0x8, %dl
je 0x6b61
testb $0x10, %cl
je 0x6b70
movq 0x1561e(%rip), %rcx     # 0x1c170
cmpq $-0x22, (%rcx,%rax,8)
je 0x6b61
jmp 0x6b70
cmpq $-0x1, %rax
jne 0x6b70
callq 0x6cb2
cmpq $-0x6b, %rax
je 0x6c2f
movq %r14, %rdi
pushq $-0x8
popq %rsi
callq 0x33e4
pushq $0x1
popq %rbx
jmp 0x6af3
cmpq $-0x4, %rax
jne 0x6bcb
cmpl $0x0, 0x15af8(%rip)     # 0x1c688
jne 0x6ca3
movl 0x15ae8(%rip), %edx     # 0x1c684
leaq -0xa0(%rbp), %r14
movq %r14, %rdi
leaq 0xd804(%rip), %rsi      # 0x143b1
xorl %eax, %eax
callq 0x31f0
movq %r14, %rdi
pushq $-0x8
popq %rsi
callq 0x33e4
pushq $-0x4
popq %rax
jmp 0x6bd8
movq 0x15ac5(%rip), %rax     # 0x1c690
movq %rax, %rcx
orq $0x2, %rcx
cmpq $-0x69, %rcx
je 0x6c4f
movq %r12, %r14
cmpq $-0x1, %r13
je 0x6bec
movq 0x159d8(%rip), %rcx     # 0x1c5c0
movq (%rcx,%r13,8), %r12
movq 0x1557d(%rip), %rcx     # 0x1c170
movq %rax, (%rcx,%r12,8)
pushq $-0x1
popq %rdi
movq %rdi, %rsi
movl %r15d, %edx
callq 0x3613
movq 0x159b4(%rip), %rcx     # 0x1c5c0
movq %rax, (%rcx,%r12,8)
incl %ebx
movq %r12, %r13
movq %r14, %r12
leaq -0x50(%rbp), %r14
jmp 0x6af3
pushq $0x1
popq %rdi
callq 0x3775
pushq $-0x1
popq %r12
jmp 0x6c3d
pushq $0x1
popq %rdi
callq 0x3775
decl 0x15a43(%rip)           # 0x1c680
movq %r12, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq -0x2c(%rbp), %rcx
cmpq %rcx, %rax
je 0x6c76
cmpq $-0x69, %rax
leaq 0xd76e(%rip), %rax      # 0x143d1
leaq 0xd783(%rip), %rdi      # 0x143ed
cmoveq %rax, %rdi
pushq $-0x8
popq %rsi
callq 0x33e4
decl 0x15a04(%rip)           # 0x1c680
cmpq $-0x1, %r13
je 0x6c8e
movq 0x15937(%rip), %rax     # 0x1c5c0
orq $-0x1, (%rax,%r13,8)
pushq $0x1
popq %rdi
callq 0x3775
xorl %eax, %eax
cmpl $0x1, %ebx
sbbq %rax, %rax
orq %rax, %r12
jmp 0x6c3d
pushq $0x1
popq %rdi
callq 0x3775
pushq $-0x4
jmp 0x6c2b