// File: /workspace/github_c_makefile_star2_O1/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 0x14567(%rip), %r15     # 0x1e180
leaq 0xc927(%rip), %rbx      # 0x16547
movslq 0x14a71(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rdi
callq 0x3220
movl %eax, %r14d
cmpl $0x3b, %r14d
jne 0x9c90
movslq 0x14a58(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rdi
callq 0x3220
cmpl $0x3b, %eax
jne 0x9ceb
movl $0x3b, %r14d
cmpl $0x0, 0x14955(%rip)     # 0x1e5b4
jne 0x9c82
cmpl $-0x1, %r14d
je 0x9c82
cmpl $0xa, %r14d
je 0x9c82
movslq 0x14a24(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rdi
callq 0x3220
movl %eax, %r14d
jmp 0x9c58
cmpl $0x0, 0x1492b(%rip)     # 0x1e5b4
je 0x9c33
jmp 0xa002
cmpl $0xc, %r14d
jle 0x9cc7
cmpl $0xd, %r14d
je 0x9cd9
cmpl $0x20, %r14d
je 0x9cd9
cmpl $0x28, %r14d
jne 0x9cfd
movslq 0x149e9(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rdi
callq 0x3220
cmpl $0x2a, %eax
jne 0x9ceb
callq 0x9b4a
jmp 0x9c20
cmpl $0x9, %r14d
je 0x9cd9
cmpl $0xa, %r14d
jne 0x9cfd
incl 0x148f7(%rip)           # 0x1e5d0
cmpl $0x0, 0x148d4(%rip)     # 0x1e5b4
je 0x9c20
jmp 0xa002
movslq 0x149a6(%rip), %rcx     # 0x1e698
movq (%r15,%rcx,8), %rsi
movl %eax, %edi
callq 0x3170
movq $-0x5, 0x14450(%rip) # 0x1e158
cmpl $0x3a, %r14d
jg 0x9d33
cmpl $0x28, %r14d
jle 0x9d58
cmpl $0x29, %r14d
je 0x9f2c
cmpl $0x2c, %r14d
je 0x9f5e
cmpl $0x3a, %r14d
jne 0x9d81
jmp 0x9ed5
cmpl $0x5c, %r14d
jle 0x9d6d
cmpl $0x5d, %r14d
je 0x9ecb
cmpl $0x60, %r14d
je 0x9f54
cmpl $0x7c, %r14d
jne 0x9d81
jmp 0x9f4a
cmpl $-0x1, %r14d
je 0x9f22
cmpl $0x28, %r14d
jne 0x9d81
jmp 0x9f40
cmpl $0x3b, %r14d
je 0x9f36
cmpl $0x5b, %r14d
je 0x9ec1
callq 0x3230
movq (%rax), %r12
movslq %r14d, %rax
movzwl (%r12,%rax,2), %eax
btl $0xb, %eax
jb 0x9f68
btl $0xa, %eax
jb 0x9e45
cmpl $0x5f, %r14d
je 0x9e45
cmpl $0x27, %r14d
je 0x9e45
movl $0x10, %edx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x30f0
testq %rax, %rax
jne 0x9f81
cmpl $0x23, %r14d
jne 0x9e7c
movslq 0x148b5(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rdi
callq 0x3220
movl %eax, %r14d
movslq 0x148a2(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rsi
movl %r14d, %edi
callq 0x3170
cmpl $0x21, %r14d
jne 0x9e9c
cmpl $-0x1, %r14d
je 0x9e2d
cmpl $0xa, %r14d
je 0x9e2d
movslq 0x14879(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rdi
callq 0x3220
movl %eax, %r14d
jmp 0x9e0c
movslq 0x14864(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rsi
movl %r14d, %edi
callq 0x3170
jmp 0x9c20
movl %r14d, %edi
xorl %esi, %esi
callq 0x8277
movq %rax, %rcx
movq %rax, 0x142ff(%rip)     # 0x1e158
leaq 0x3(%rax), %rdx
movl $0xfffffed0, %eax       # imm = 0xFFFFFED0
cmpq $0x2, %rdx
jb 0xa007
movq 0x1474d(%rip), %rax     # 0x1e5c0
movq (%rax,%rcx,8), %rdi
jmp 0x9fd4
cmpl $0x22, %r14d
jne 0x9ff3
callq 0x7e7b
movq %rax, 0x142c6(%rip)     # 0x1e158
movl $0xfffffed3, %eax       # imm = 0xFFFFFED3
jmp 0xa007
movl $0xffffff21, %eax       # imm = 0xFFFFFF21
cmpl $0x22, %r14d
jne 0xa007
callq 0x7fd0
movq %rax, 0x142a1(%rip)     # 0x1e158
movl $0xfffffed2, %eax       # imm = 0xFFFFFED2
jmp 0xa007
movl $0xffffff96, %eax       # imm = 0xFFFFFF96
jmp 0xa007
movl $0xffffff95, %eax       # imm = 0xFFFFFF95
jmp 0xa007
movslq 0x147bc(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rdi
callq 0x3220
movl %eax, %edi
movl $0xffffff99, %eax       # imm = 0xFFFFFF99
cmpl $0x3a, %edi
je 0xa007
movslq 0x1479c(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rsi
callq 0x3170
movl $0x3a, %edi
xorl %esi, %esi
callq 0x8277
movq %rax, 0x14240(%rip)     # 0x1e158
movl $0xfffffed1, %eax       # imm = 0xFFFFFED1
jmp 0xa007
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
jmp 0xa007
movl $0xffffff97, %eax       # imm = 0xFFFFFF97
jmp 0xa007
movl $0xffffff9b, %eax       # imm = 0xFFFFFF9B
jmp 0xa007
movl $0xffffff98, %eax       # imm = 0xFFFFFF98
jmp 0xa007
movl $0xffffff9a, %eax       # imm = 0xFFFFFF9A
jmp 0xa007
movl $0xffffff36, %eax       # imm = 0xFFFFFF36
jmp 0xa007
movl $0xffffff9c, %eax       # imm = 0xFFFFFF9C
jmp 0xa007
movl %r14d, %edi
callq 0x81b7
movq %rax, 0x141e1(%rip)     # 0x1e158
movl $0xfffffed4, %eax       # imm = 0xFFFFFED4
jmp 0xa007
cmpl $0x7e, %r14d
jne 0x9fba
movslq 0x1470a(%rip), %rax     # 0x1e698
movq (%r15,%rax,8), %rdi
callq 0x3220
movslq %eax, %rcx
testb $0x8, 0x1(%r12,%rcx,2)
jne 0xa010
movslq 0x146ef(%rip), %rcx     # 0x1e698
movq (%r15,%rcx,8), %rsi
movl %eax, %edi
callq 0x3170
movl $0x7e, %r14d
movl %r14d, %edi
callq 0x83aa
movq %rax, 0x1418f(%rip)     # 0x1e158
movq 0x145f0(%rip), %rcx     # 0x1e5c0
movq (%rcx,%rax,8), %rdi
shlq $0x3, %rdi
addq 0x14609(%rip), %rdi     # 0x1e5e8
callq 0x97f3
movl %eax, %ecx
cmpl $-0x5, %eax
movl $0xfffffed1, %eax       # imm = 0xFFFFFED1
cmovnel %ecx, %eax
jmp 0xa007
leaq 0xc5c9(%rip), %rdi      # 0x165c3
movl %r14d, %esi
callq 0x80fd
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x81b7
movq %rax, 0x1413a(%rip)     # 0x1e158
movq %rax, %rdi
callq 0x5c78
jmp 0x9f70