// File: /workspace/github_c_makefile_star2_O3/azhai[P]mlite/mlite.c
// Function: scan
int scan(void) {
	int	c;
	cell	n;

	c = read_c();
	while (1) {	/* Skip over spaces and comments */
		while (c == ' ' || c == '\t' || c == '\n' || c == '\r') {
			if (c == '\n')
				Line_no++;
			if (Error_flag)
				return UNDEFINED;
			c = read_c();
		}
		if (c == ';') {		/* ;; comment */
			c = read_c();
			if (c != ';') {
				reject(c);
				c = ';';
				break;
			}
		}
		else if (c == '(') {	/* (*...*) comment */
			c = read_c();
			if (c != '*') {
				reject(c);
				c = '(';
				break;
			}
			block_comment();
			c = read_c();
			continue;
		}
		else {
			break;
		}
		while (!Error_flag && c != '\n' && c != EOF)
			c = read_c();
		if (Error_flag)
			return UNDEFINED;
	}
	Attr = UNDEFINED;
	if (c == EOF)
		return END_OF_FILE;
	if (c == ';')
		return TOK_SEMI;
	if (c == ',')
		return TOK_COMMA;
	if (c == '|')
		return TOK_PIPE;
	if (c == '(')
		return TOK_LPAREN;
	if (c == ')')
		return TOK_RPAREN;
	if (c == '[')
		return TOK_LBRACK;
	if (c == ']')
		return TOK_RBRACK;
	if (c == '`')
		return TOK_APPLY;
	if (c == ':') {
		c = read_c();
		if (c == ':')
			return TOK_CONS;
		reject(c);
		Attr = read_ident(':', 0);
		return TOK_ID;
	}
	if (isdigit(c)) {
		Attr = read_number(c);
		return TOK_NUM;
	}
	if (is_ident(c)) {
		Attr = read_ident(c, 0);
		if (Attr == TRUE || Attr == FALSE)
			return TOK_BOOL;
		if ((n = keyword(symbol_name(Attr))) != UNDEFINED)
			return n;
		return TOK_ID;
	}
	if (is_opsym(c)) {
		if (c == '~') {
			if (isdigit(c = read_c())) {
				Attr = read_number(c);
				Attr = real_negate(Attr);
				return TOK_NUM;
			}
			else {
				reject(c);
				c = '~';
			}
		}
		Attr = read_opsym(c);
		if ((n = keyword(symbol_name(Attr))) != UNDEFINED)
			return n;
		return TOK_ID;
	}
	if (c == '"') {
		Attr = read_string();
		return TOK_STR;
	}
	if (c == '#') {
		c = read_c();
		reject(c);
		if (c == '!') {
			while (c != '\n' && c != EOF)
				c = read_c();
			reject(c);
			return scan();
		}
		if (c != '"')
			return TOK_REF;
		Attr = read_char();
		return TOK_CHR;
	}
	return funny_char("funny input character", c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x146aa(%rip), %r15     # 0x1e180
leaq 0xca52(%rip), %rbx      # 0x1652f
movslq 0x14bb4(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rdi
callq 0x3220
movl %eax, %r14d
cmpl $0x3b, %r14d
jne 0x9b4d
movslq 0x14b9b(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rdi
callq 0x3220
cmpl $0x3b, %eax
jne 0x9ce0
movl $0x3b, %r14d
cmpl $0x0, 0x14a98(%rip)     # 0x1e5b4
jne 0x9b3f
cmpl $-0x1, %r14d
je 0x9b3f
cmpl $0xa, %r14d
je 0x9b3f
movslq 0x14b67(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rdi
callq 0x3220
movl %eax, %r14d
jmp 0x9b15
cmpl $0x0, 0x14a6e(%rip)     # 0x1e5b4
je 0x9af0
jmp 0x9ed1
cmpl $0xc, %r14d
jle 0x9b88
cmpl $0xd, %r14d
je 0x9b9a
cmpl $0x20, %r14d
je 0x9b9a
cmpl $0x28, %r14d
jne 0x9bac
movslq 0x14b2c(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rdi
callq 0x3220
cmpl $0x2a, %eax
jne 0x9d83
callq 0x9a18
jmp 0x9add
cmpl $0x9, %r14d
je 0x9b9a
cmpl $0xa, %r14d
jne 0x9bac
incl 0x14a36(%rip)           # 0x1e5d0
cmpl $0x0, 0x14a13(%rip)     # 0x1e5b4
je 0x9add
jmp 0x9ed1
movq $-0x5, 0x145a1(%rip) # 0x1e158
cmpl $0x5a, %r14d
jg 0x9bd8
cmpl $0x2b, %r14d
jg 0x9bf3
cmpl $-0x1, %r14d
je 0x9e1f
cmpl $0x29, %r14d
jne 0x9c1c
jmp 0x9e15
cmpl $0x5f, %r14d
jg 0x9c08
cmpl $0x5b, %r14d
je 0x9e33
cmpl $0x5d, %r14d
jne 0x9c1c
jmp 0x9e29
cmpl $0x2c, %r14d
je 0x9db4
cmpl $0x3a, %r14d
jne 0x9c1c
jmp 0x9dc8
cmpl $0x7c, %r14d
je 0x9dbe
cmpl $0x60, %r14d
je 0x9daa
callq 0x3230
movq (%rax), %r12
movslq %r14d, %rax
movzwl (%r12,%rax,2), %eax
btl $0xb, %eax
jb 0x9e3d
btl $0xa, %eax
jb 0x9d07
cmpl $0x5f, %r14d
je 0x9d07
cmpl $0x27, %r14d
je 0x9d07
movl $0x10, %edx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x30f0
testq %rax, %rax
jne 0x9e56
cmpl $0x23, %r14d
jne 0x9d3e
movslq 0x14a1a(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rdi
callq 0x3220
movl %eax, %r14d
movslq 0x14a07(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rsi
movl %r14d, %edi
callq 0x3170
cmpl $0x21, %r14d
jne 0x9d5e
cmpl $-0x1, %r14d
je 0x9cc8
cmpl $0xa, %r14d
je 0x9cc8
movslq 0x149de(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rdi
callq 0x3220
movl %eax, %r14d
jmp 0x9ca7
movslq 0x149c9(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rsi
movl %r14d, %edi
callq 0x3170
jmp 0x9add
movslq 0x149b1(%rip), %rcx     # 0x1e698
movq (%r15,%rcx,8), %rsi
movl %eax, %edi
callq 0x3170
movq $-0x5, 0x1445b(%rip) # 0x1e158
movl $0xffffff9b, %eax       # imm = 0xFFFFFF9B
jmp 0x9ed6
movl %r14d, %edi
xorl %esi, %esi
callq 0x81e1
movq %rax, %rcx
movq %rax, 0x1443d(%rip)     # 0x1e158
leaq 0x3(%rax), %rdx
movl $0xfffffed0, %eax       # imm = 0xFFFFFED0
cmpq $0x2, %rdx
jb 0x9ed6
movq 0x1488b(%rip), %rax     # 0x1e5c0
movq (%rax,%rcx,8), %rdi
jmp 0x9ea3
cmpl $0x22, %r14d
jne 0x9ec2
callq 0x7de5
movq %rax, 0x14404(%rip)     # 0x1e158
movl $0xfffffed3, %eax       # imm = 0xFFFFFED3
jmp 0x9ed6
movl $0xffffff21, %eax       # imm = 0xFFFFFF21
cmpl $0x22, %r14d
jne 0x9ed6
callq 0x7f3a
movq %rax, 0x143df(%rip)     # 0x1e158
movl $0xfffffed2, %eax       # imm = 0xFFFFFED2
jmp 0x9ed6
movslq 0x1490e(%rip), %rcx     # 0x1e698
movq (%r15,%rcx,8), %rsi
movl %eax, %edi
callq 0x3170
movq $-0x5, 0x143b8(%rip) # 0x1e158
movl $0xffffff98, %eax       # imm = 0xFFFFFF98
jmp 0x9ed6
movl $0xffffff36, %eax       # imm = 0xFFFFFF36
jmp 0x9ed6
movl $0xffffff9c, %eax       # imm = 0xFFFFFF9C
jmp 0x9ed6
movl $0xffffff9a, %eax       # imm = 0xFFFFFF9A
jmp 0x9ed6
movslq 0x148c9(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rdi
callq 0x3220
movl %eax, %edi
movl $0xffffff99, %eax       # imm = 0xFFFFFF99
cmpl $0x3a, %edi
je 0x9ed6
movslq 0x148a9(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rsi
callq 0x3170
movl $0x3a, %edi
xorl %esi, %esi
callq 0x81e1
movq %rax, 0x1434d(%rip)     # 0x1e158
movl $0xfffffed1, %eax       # imm = 0xFFFFFED1
jmp 0x9ed6
movl $0xffffff97, %eax       # imm = 0xFFFFFF97
jmp 0x9ed6
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
jmp 0x9ed6
movl $0xffffff95, %eax       # imm = 0xFFFFFF95
jmp 0x9ed6
movl $0xffffff96, %eax       # imm = 0xFFFFFF96
jmp 0x9ed6
movl %r14d, %edi
callq 0x8121
movq %rax, 0x1430c(%rip)     # 0x1e158
movl $0xfffffed4, %eax       # imm = 0xFFFFFED4
jmp 0x9ed6
cmpl $0x7e, %r14d
jne 0x9e89
movslq 0x14835(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rdi
callq 0x3220
movslq %eax, %rcx
testb $0x8, 0x1(%r12,%rcx,2)
jne 0x9edf
movslq 0x1481a(%rip), %rcx     # 0x1e698
movq (%r15,%rcx,8), %rsi
movl %eax, %edi
callq 0x3170
movl %r14d, %edi
callq 0x8314
movq %rax, 0x142c0(%rip)     # 0x1e158
movq 0x14721(%rip), %rcx     # 0x1e5c0
movq (%rcx,%rax,8), %rdi
shlq $0x3, %rdi
addq 0x1473a(%rip), %rdi     # 0x1e5e8
callq 0x96fc
movl %eax, %ecx
cmpl $-0x5, %eax
movl $0xfffffed1, %eax       # imm = 0xFFFFFED1
cmovnel %ecx, %eax
jmp 0x9ed6
leaq 0xc6e2(%rip), %rdi      # 0x165ab
movl %r14d, %esi
callq 0x8067
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x8121
movq %rax, 0x1426b(%rip)     # 0x1e158
movq %rax, %rdi
callq 0x5c6b
jmp 0x9e45