// File: /workspace/github_c_makefile_star2_O0/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
subq $0xc0, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movq 0x18538(%rip), %rax     # 0x21a00
movq %rax, -0x60(%rbp)
movq 0x18535(%rip), %rax     # 0x21a08
movq %rax, -0x58(%rbp)
movq 0x18532(%rip), %rax     # 0x21a10
movq %rax, -0x50(%rbp)
movq 0x1852f(%rip), %rax     # 0x21a18
movq %rax, -0x48(%rbp)
cmpl $0x0, 0x1f19c(%rip)     # 0x28690
jne 0x9502
movl 0x1f0e4(%rip), %eax     # 0x285e0
movl %eax, 0x1f192(%rip)     # 0x28694
movl 0x1f188(%rip), %eax     # 0x28690
addl $0x1, %eax
movl %eax, 0x1f17f(%rip)     # 0x28690
cmpl $0x10000, %eax          # imm = 0x10000
jle 0x9538
leaq 0x16f32(%rip), %rdi     # 0x20451
movq $-0x8, %rsi
callq 0x34b0
movq $-0x1, -0x8(%rbp)
jmp 0x9816
movl -0xc(%rbp), %edx
movq $-0x1, %rsi
movq %rsi, %rdi
callq 0x3780
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq 0x1ebdf(%rip), %rsi     # 0x28138
xorl %edx, %edx
callq 0x3780
movq %rax, 0x1ebd1(%rip)     # 0x28138
movq $-0x1, -0x28(%rbp)
movl $0x0, -0x34(%rbp)
movl 0x1f048(%rip), %eax     # 0x285c4
cmpl $0x0, %eax
je 0x9598
movl $0x1, %edi
callq 0x3950
movq $-0x1, -0x8(%rbp)
jmp 0x9816
callq 0x9830
movq %rax, -0x18(%rbp)
cmpq $-0x4, -0x18(%rbp)
jne 0x95f6
cmpl $0x0, 0x1f0e9(%rip)     # 0x28698
je 0x95c8
movl $0x1, %edi
callq 0x3950
movq $-0x4, -0x8(%rbp)
jmp 0x9816
leaq -0xb0(%rbp), %rdi
movl 0x1f0bf(%rip), %edx     # 0x28694
leaq 0x16e9d(%rip), %rsi     # 0x20479
movb $0x0, %al
callq 0x3200
leaq -0xb0(%rbp), %rdi
movq $-0x8, %rsi
callq 0x34b0
cmpq $-0x67, -0x18(%rbp)
jne 0x9704
cmpl $0x1, -0x34(%rbp)
jne 0x960d
cmpl $0x0, -0xc(%rbp)
jne 0x961d
movq 0x1f08c(%rip), %rax     # 0x286a0
movq %rax, -0x18(%rbp)
jmp 0x9702
callq 0x9830
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdx
movq 0x1ef9f(%rip), %rax     # 0x285d0
movq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
cmpq $0x0, -0x18(%rbp)
jl 0x9685
movq 0x1efa9(%rip), %rax     # 0x285f0
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x9685
movq 0x1ef92(%rip), %rax     # 0x285f0
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x9685
movq 0x1ef7b(%rip), %rax     # 0x285f0
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x96bc
cmpq $-0x1, -0x18(%rbp)
je 0x96bc
cmpq $0x0, -0x18(%rbp)
jl 0x96c7
movq 0x1ef56(%rip), %rax     # 0x285f0
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x96c7
movq 0x1eacf(%rip), %rax     # 0x28180
movq -0x18(%rbp), %rcx
cmpq $-0x22, (%rax,%rcx,8)
jne 0x96c7
callq 0x9830
cmpq $-0x6b, %rax
je 0x96dc
leaq -0x60(%rbp), %rdi
movq $-0x8, %rsi
callq 0x34b0
jmp 0x9576
movl $0x1, %edi
callq 0x3950
movl 0x1efa4(%rip), %eax     # 0x28690
addl $-0x1, %eax
movl %eax, 0x1ef9b(%rip)     # 0x28690
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x9816
jmp 0x9704
cmpq $-0x69, -0x18(%rbp)
je 0x9712
cmpq $-0x6b, -0x18(%rbp)
jne 0x9747
movq -0x18(%rbp), %rax
movslq -0x10(%rbp), %rcx
cmpq %rcx, %rax
je 0x9745
movq -0x18(%rbp), %rcx
leaq 0x16d8b(%rip), %rdi     # 0x204b5
leaq 0x16d68(%rip), %rax     # 0x20499
cmpq $-0x69, %rcx
cmoveq %rax, %rdi
movq $-0x8, %rsi
callq 0x34b0
jmp 0x97b5
cmpq $-0x1, -0x28(%rbp)
jne 0x9758
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x976b
movq 0x1ee71(%rip), %rax     # 0x285d0
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdx
movq 0x1ea0a(%rip), %rax     # 0x28180
movq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %edx
movq $-0x1, %rsi
movq %rsi, %rdi
callq 0x3780
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdx
movq 0x1ee31(%rip), %rax     # 0x285d0
movq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x9576
movl 0x1eed5(%rip), %eax     # 0x28690
addl $-0x1, %eax
movl %eax, 0x1eecc(%rip)     # 0x28690
cmpq $-0x1, -0x28(%rbp)
je 0x97de
movq 0x1edfe(%rip), %rax     # 0x285d0
movq -0x28(%rbp), %rcx
movq $-0x1, (%rax,%rcx,8)
movl $0x1, %edi
callq 0x3950
cmpl $0x0, -0x34(%rbp)
je 0x97fb
movq -0x20(%rbp), %rax
movq %rax, -0xb8(%rbp)
jmp 0x980b
movq $-0x1, %rax
movq %rax, -0xb8(%rbp)
jmp 0x980b
movq -0xb8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)