// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x133f7(%rip), %r13     # 0x1c180
pushq $0x3b
popq %r14
pushq $-0x5
popq %rbx
pushq $-0x6b
popq %r15
movslq 0x138fd(%rip), %rax     # 0x1c698
movq (%r13,%rax,8), %rdi
callq 0x3220
movl %eax, %r12d
cmpl $0x3b, %r12d
jne 0x8e04
movslq 0x138e3(%rip), %rax     # 0x1c698
movq (%r13,%rax,8), %rdi
callq 0x3220
cmpl $0x3b, %eax
jne 0x8f8c
movl %r14d, %r12d
cmpl $0x0, 0x137e2(%rip)     # 0x1c5b4
jne 0x8df6
cmpl $-0x1, %r12d
je 0x8df6
cmpl $0xa, %r12d
je 0x8df6
movslq 0x138b1(%rip), %rax     # 0x1c698
movq (%r13,%rax,8), %rdi
callq 0x3220
movl %eax, %r12d
jmp 0x8dcb
cmpl $0x0, 0x137b7(%rip)     # 0x1c5b4
je 0x8da8
jmp 0x8fad
cmpl $0x9, %r12d
je 0x8e28
cmpl $0x28, %r12d
je 0x8e3a
cmpl $0xd, %r12d
je 0x8e28
cmpl $0x20, %r12d
je 0x8e28
cmpl $0xa, %r12d
jne 0x8e5e
incl 0x137a8(%rip)           # 0x1c5d0
cmpl $0x0, 0x13785(%rip)     # 0x1c5b4
je 0x8d94
jmp 0x8fad
movslq 0x13857(%rip), %rax     # 0x1c698
movq (%r13,%rax,8), %rdi
callq 0x3220
cmpl $0x2a, %eax
jne 0x901e
callq 0x8cdd
jmp 0x8d94
movq $-0x5, 0x132ef(%rip) # 0x1c158
cmpl $-0x1, %r12d
je 0x905b
cmpl $0x29, %r12d
je 0x904d
cmpl $0x2c, %r12d
je 0x908b
cmpl $0x3a, %r12d
je 0x9062
cmpl $0x5b, %r12d
je 0x9092
cmpl $0x5d, %r12d
je 0x9083
cmpl $0x7c, %r12d
je 0x9054
cmpl $0x60, %r12d
je 0x9043
movl %r15d, %ebx
callq 0x3230
movq (%rax), %r15
movslq %r12d, %rax
movzwl (%r15,%rax,2), %eax
btl $0xb, %eax
jb 0x9099
btl $0xa, %eax
jb 0x8fbe
cmpl $0x5f, %r12d
je 0x8fbe
cmpl $0x27, %r12d
je 0x8fbe
leaq 0xb634(%rip), %rdi      # 0x1452f
movl %r12d, %esi
pushq $0x10
popq %rdx
callq 0x30f0
testq %rax, %rax
jne 0x90b2
cmpl $0x23, %r12d
jne 0x8fe3
movslq 0x13778(%rip), %rax     # 0x1c698
movq (%r13,%rax,8), %rdi
callq 0x3220
movl %eax, %r12d
movslq 0x13764(%rip), %rax     # 0x1c698
movq (%r13,%rax,8), %rsi
movl %r12d, %edi
callq 0x3170
cmpl $0x21, %r12d
jne 0x9000
movl %ebx, %r15d
pushq $-0x5
popq %rbx
cmpl $-0x1, %r12d
je 0x8f73
cmpl $0xa, %r12d
je 0x8f73
movslq 0x13734(%rip), %rax     # 0x1c698
movq (%r13,%rax,8), %rdi
callq 0x3220
movl %eax, %r12d
jmp 0x8f51
movslq 0x1371e(%rip), %rax     # 0x1c698
movq (%r13,%rax,8), %rsi
movl %r12d, %edi
callq 0x3170
jmp 0x8d94
movslq 0x13705(%rip), %rcx     # 0x1c698
movq (%r13,%rcx,8), %rsi
movl %eax, %edi
callq 0x3170
movq $-0x5, 0x131ae(%rip) # 0x1c158
pushq $-0x65
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r12d, %edi
xorl %esi, %esi
callq 0x7710
movq %rax, 0x13189(%rip)     # 0x1c158
leaq 0x3(%rax), %rcx
movl $0xfffffed0, %ebx       # imm = 0xFFFFFED0
cmpq $0x2, %rcx
jb 0x8fad
jmp 0x90fa
cmpl $0x22, %r12d
jne 0x9125
callq 0x73f2
movq %rax, 0x1315f(%rip)     # 0x1c158
movl $0xfffffed3, %ebx       # imm = 0xFFFFFED3
jmp 0x8fad
movl $0xffffff21, %ebx       # imm = 0xFFFFFF21
cmpl $0x22, %r12d
jne 0x8fad
callq 0x74ec
movq %rax, 0x13141(%rip)     # 0x1c158
movl $0xfffffed2, %ebx       # imm = 0xFFFFFED2
jmp 0x8fad
movslq 0x13673(%rip), %rcx     # 0x1c698
movq (%r13,%rcx,8), %rsi
movl %eax, %edi
callq 0x3170
movq $-0x5, 0x1311c(%rip) # 0x1c158
pushq $-0x68
jmp 0x8fac
movl $0xffffff36, %ebx       # imm = 0xFFFFFF36
jmp 0x8fad
pushq $-0x69
jmp 0x8fac
pushq $-0x66
jmp 0x8fac
pushq $-0x4
jmp 0x8fac
movslq 0x1362f(%rip), %rax     # 0x1c698
movq (%r13,%rax,8), %rdi
callq 0x3220
cmpl $0x3a, %eax
jne 0x913b
pushq $-0x67
jmp 0x8fac
movl %r15d, %ebx
jmp 0x8fad
pushq $-0x64
jmp 0x8fac
pushq $-0x6a
jmp 0x8fac
movl %r12d, %edi
callq 0x7658
movq %rax, 0x130b0(%rip)     # 0x1c158
movl $0xfffffed4, %ebx       # imm = 0xFFFFFED4
jmp 0x8fad
cmpl $0x7e, %r12d
jne 0x90eb
movslq 0x135d9(%rip), %rax     # 0x1c698
movq (%r13,%rax,8), %rdi
callq 0x3220
movslq %eax, %rcx
testb $0x8, 0x1(%r15,%rcx,2)
jne 0x9169
movslq 0x135b9(%rip), %rcx     # 0x1c698
movq (%r13,%rcx,8), %rsi
movl %eax, %edi
callq 0x3170
movl %r12d, %edi
callq 0x7836
movq %rax, 0x1305e(%rip)     # 0x1c158
movq 0x134bf(%rip), %rcx     # 0x1c5c0
movq (%rcx,%rax,8), %rdi
shlq $0x3, %rdi
addq 0x134d8(%rip), %rdi     # 0x1c5e8
callq 0x89ca
cmpl $-0x5, %eax
movl $0xfffffed1, %ebx       # imm = 0xFFFFFED1
cmovnel %eax, %ebx
jmp 0x8fad
leaq 0xb47f(%rip), %rdi      # 0x145ab
movl %r12d, %esi
callq 0x75e3
pushq $-0x5
jmp 0x8fac
movslq 0x13556(%rip), %rcx     # 0x1c698
movq (%r13,%rcx,8), %rsi
movl %eax, %edi
callq 0x3170
pushq $0x3a
popq %rdi
xorl %esi, %esi
callq 0x7710
movq %rax, 0x12ff9(%rip)     # 0x1c158
movl $0xfffffed1, %ebx       # imm = 0xFFFFFED1
jmp 0x8fad
movl %eax, %edi
callq 0x7658
movq %rax, 0x12fe1(%rip)     # 0x1c158
movq %rax, %rdi
callq 0x5648
jmp 0x90a1