// File: /workspace/github_c_makefile_star2_O2/georgeweigt[P]sassafras/sassafras.c
// Function: scan1
int
scan1(void)
{
	int i, n;

	// skip spaces

	while (*inp && *inp <= ' ')
		inp++;

	token_str = inp;

	// end?

	if (*inp == '\0') {
		strbuf[0] = 0;
		return 0;
	}

	// name?

	if (isalpha(*inp) || *inp == '_') {
		for (i = 0; i < STRBUFLEN; i++) {
			if (isalnum(*inp) || *inp == '_')
				strbuf[i] = toupper(*inp++);
			else
				break;
		}
		if (i == STRBUFLEN)
			stop("Name too long");
		strbuf[i] = 0;
		return NAME;
	}

	// number?

	if (isdigit(*inp)
	|| (inp[0] == '.' && isdigit(inp[1]))
	|| ((*inp == '+' || *inp == '-')
	&& (isdigit(inp[1]) || (inp[1] == '.' && isdigit(inp[2]))))) {
		if (*inp == '+' || *inp == '-')
			inp++;
		while (isdigit(*inp))
			inp++;
		if (*inp == '.') {
			inp++;
			while (isdigit(*inp))
				inp++;
		}
		if (*inp == 'E' || *inp == 'e') {
			inp++;
			if (*inp == '+' || *inp == '-')
				inp++;
			while (isdigit(*inp))
				inp++;
		}
		n = (int) (inp - token_str);
		if (n >= STRBUFLEN)
			stop("Number format?");
		for (i = 0; i < n; i++)
			strbuf[i] = token_str[i];
		strbuf[i] = 0;
		n = sscanf(strbuf, "%lg", &token_num);
		if (n < 1)
			stop("Number format?");
		return NUMBER;
	}

	// string?

	if (*inp == '\'') {
		inp++;
		for (i = 0; i < STRBUFLEN; i++) {
			if (*inp == 0)
				break;
			if (*inp == '\r' || *inp == '\n')
				stop("Runaway string");
			if (inp[0] == '\'' && inp[1] == '\'') {
				strbuf[i] = *inp;
				inp += 2;
				continue;
			}
			if (*inp == '\'') {
				inp++;
				break;
			}
			strbuf[i] = *inp++;
		}
		if (i == STRBUFLEN)
			stop("String too long");
		strbuf[i] = 0;
		return STRING;
	}

	if (*inp == '"') {
		inp++;
		for (i = 0; i < STRBUFLEN; i++) {
			if (*inp == 0)
				break;
			if (*inp == '\r' || *inp == '\n')
				stop("Runaway string");
			if (inp[0] == '"' && inp[1] == '"') {
				strbuf[i] = *inp;
				inp += 2;
				continue;
			}
			if (*inp == '"') {
				inp++;
				break;
			}
			strbuf[i] = *inp++;
		}
		if (i == STRBUFLEN)
			stop("String too long");
		strbuf[i] = 0;
		return STRING;
	}

	// double at sign?

	if (inp[0] == '@' && inp[1] == '@') {
		strcpy(strbuf, "@@");
		inp += 2;
		return ATAT;
	}

	// double asterisk?

	if (inp[0] == '*' && inp[1] == '*') {
		strcpy(strbuf, "**");
		inp += 2;
		return STARSTAR;
	}

	// anything else is a single character token

	strbuf[0] = *inp;
	strbuf[1] = 0;

	return *inp++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x58bb(%rip), %r14      # 0xf898
xorl %r15d, %r15d
movb (%r14,%r15), %al
testb %al, %al
je 0x9fff
cmpb $0x20, %al
jg 0x9fff
leaq (%r14,%r15), %rax
incq %rax
movq %rax, 0x589e(%rip)      # 0xf898
incq %r15
jmp 0x9fe0
leaq (%r14,%r15), %r12
movq %r12, 0xbcae(%rip)      # 0x15cb8
movsbq (%r14,%r15), %r13
testq %r13, %r13
je 0xa09d
callq 0x2230
cmpb $0x5f, %r13b
je 0xa0ab
movq (%rax), %rdi
movzwl (%rdi,%r13,2), %edx
movl %edx, %ecx
andl $0x400, %ecx            # imm = 0x400
jne 0xa0ab
movzbl %r13b, %ecx
btl $0xb, %edx
jb 0xa086
leal -0x22(%rcx), %edx
cmpl $0xc, %edx
ja 0xa126
leaq 0x11ee(%rip), %rsi      # 0xb244
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movsbq 0x1(%r14,%r15), %rdx
testb $0x8, 0x1(%rdi,%rdx,2)
jne 0xa086
cmpb $0x2e, %dl
jne 0xa19f
movsbq 0x2(%r14,%r15), %rdx
testb $0x8, 0x1(%rdi,%rdx,2)
je 0xa19f
cmpl $0x2b, %ecx
je 0xa2d8
cmpl $0x2d, %ecx
je 0xa2d8
jmp 0xa2e2
movb $0x0, 0x5fec(%rip)      # 0x10090
xorl %eax, %eax
jmp 0xa3be
movq %rax, -0x30(%rbp)
leaq (%r14,%r15), %r13
xorl %r12d, %r12d
cmpq $0x3e8, %r12            # imm = 0x3E8
je 0xa2b4
leaq (%r14,%r12), %rbx
movsbq (%rbx,%r15), %rax
cmpq $0x5f, %rax
je 0xa0e2
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movzwl (%rcx,%rax,2), %eax
andl $0x8, %eax
je 0xa110
callq 0x2030
movq (%rax), %rax
leaq (%r12,%r13), %rcx
incq %rcx
movq %rcx, 0x57a0(%rip)      # 0xf898
movsbq (%r15,%rbx), %rcx
movb (%rax,%rcx,4), %al
leaq 0x5f89(%rip), %rcx      # 0x10090
movb %al, (%r12,%rcx)
incq %r12
jmp 0xa0b6
leaq 0x5f79(%rip), %rax      # 0x10090
movb $0x0, (%r12,%rax)
movl $0x3e9, %eax            # imm = 0x3E9
jmp 0xa3be
cmpl $0x40, %ecx
jne 0xa19f
cmpb $0x40, 0x1(%r14,%r15)
jne 0xa19f
movb $0x0, 0x5f58(%rip)      # 0x10092
movw $0x4040, 0x5f4d(%rip)   # imm = 0x4040
leaq (%r14,%r15), %rax
addq $0x2, %rax
movq %rax, 0x5746(%rip)      # 0xf898
movl $0x3ec, %eax            # imm = 0x3EC
jmp 0xa3be
movsbq 0x1(%r14,%r15), %rcx
testb $0x8, 0x1(%rdi,%rcx,2)
je 0xa19f
jmp 0xa2e2
cmpb $0x2a, 0x1(%r14,%r15)
jne 0xa19f
movb $0x0, 0x5f15(%rip)      # 0x10092
movw $0x2a2a, 0x5f0a(%rip)   # imm = 0x2A2A
leaq (%r14,%r15), %rax
addq $0x2, %rax
movq %rax, 0x5703(%rip)      # 0xf898
movl $0x3ed, %eax            # imm = 0x3ED
jmp 0xa3be
movb %r13b, 0x5eea(%rip)     # 0x10090
movb $0x0, 0x5ee4(%rip)      # 0x10091
leaq (%r14,%r15), %rax
incq %rax
movq %rax, 0x56dd(%rip)      # 0xf898
movsbl -0x1(%rax), %eax
jmp 0xa3be
leaq (%r14,%r15), %rdx
incq %rdx
movq %rdx, 0x56c6(%rip)      # 0xf898
xorl %eax, %eax
leaq 0x5eb5(%rip), %rcx      # 0x10090
cmpq $0x3e8, %rax            # imm = 0x3E8
je 0xa2c0
movzbl (%rdx), %esi
cmpl $0x22, %esi
je 0xa21e
testl %esi, %esi
je 0xa2a6
cmpl $0xd, %esi
je 0xa2cc
cmpl $0xa, %esi
je 0xa2cc
leaq 0x1(%rdx), %rsi
movq %rsi, 0x5684(%rip)      # 0xf898
movb (%rdx), %dl
movb %dl, (%rax,%rcx)
movq %rsi, %rdx
jmp 0xa233
cmpb $0x22, 0x1(%rdx)
jne 0xa29c
movb $0x22, (%rax,%rcx)
addq $0x2, %rdx
movq %rdx, 0x5665(%rip)      # 0xf898
incq %rax
jmp 0xa1db
leaq (%r14,%r15), %rdx
incq %rdx
movq %rdx, 0x5652(%rip)      # 0xf898
xorl %eax, %eax
leaq 0x5e41(%rip), %rcx      # 0x10090
cmpq $0x3e8, %rax            # imm = 0x3E8
je 0xa2c0
movzbl (%rdx), %esi
cmpl $0x27, %esi
je 0xa282
testl %esi, %esi
je 0xa2a6
cmpl $0xd, %esi
je 0xa2cc
cmpl $0xa, %esi
je 0xa2cc
leaq 0x1(%rdx), %rsi
movq %rsi, 0x5620(%rip)      # 0xf898
movb (%rdx), %dl
movb %dl, (%rax,%rcx)
movq %rsi, %rdx
jmp 0xa297
cmpb $0x27, 0x1(%rdx)
jne 0xa29c
movb $0x27, (%rax,%rcx)
addq $0x2, %rdx
movq %rdx, 0x5601(%rip)      # 0xf898
incq %rax
jmp 0xa24f
incq %rdx
movq %rdx, 0x55f2(%rip)      # 0xf898
movb $0x0, (%rax,%rcx)
movl $0x3eb, %eax            # imm = 0x3EB
jmp 0xa3be
leaq 0x1840(%rip), %rdi      # 0xbafb
callq 0x267a
leaq 0x1860(%rip), %rdi      # 0xbb27
callq 0x267a
leaq 0x1845(%rip), %rdi      # 0xbb18
callq 0x267a
incq %r12
movq %r12, 0x55b6(%rip)      # 0xf898
movq (%rax), %rcx
movsbq (%r12), %rdx
testb $0x8, 0x1(%rcx,%rdx,2)
jne 0xa2d8
cmpb $0x2e, %dl
jne 0xa315
incq %r12
movq %r12, 0x5598(%rip)      # 0xf898
movq (%rax), %rcx
movsbq (%r12), %rdx
incq %r12
testb $0x8, 0x1(%rcx,%rdx,2)
jne 0xa2f9
decq %r12
movzbl %dl, %ecx
orl $0x20, %ecx
cmpl $0x65, %ecx
jne 0xa363
leaq 0x1(%r12), %rsi
movq %rsi, 0x556c(%rip)      # 0xf898
movzbl 0x1(%r12), %ecx
cmpl $0x2d, %ecx
je 0xa33c
cmpl $0x2b, %ecx
jne 0xa34a
addq $0x2, %r12
movq %r12, %rsi
movq %r12, 0x554e(%rip)      # 0xf898
movq (%rax), %rcx
movsbq (%rsi), %rdx
testb $0x8, 0x1(%rcx,%rdx,2)
je 0xa360
incq %rsi
movq %rsi, %r12
jmp 0xa343
movq %rsi, %r12
movl %r12d, %eax
subl %r14d, %eax
subl %r15d, %eax
cmpl $0x3e7, %eax            # imm = 0x3E7
jg 0xa3cd
subq %r14, %r12
subq %r15, %r12
movslq %r12d, %rcx
xorl %eax, %eax
leaq 0x5d0b(%rip), %rdi      # 0x10090
cmpq %rcx, %rax
jge 0xa39a
leaq (%r14,%rax), %rdx
movb (%r15,%rdx), %dl
movb %dl, (%rax,%rdi)
incq %rax
jmp 0xa385
movb $0x0, (%rax,%rdi)
leaq 0x10d5(%rip), %rsi      # 0xb47a
leaq 0x9b24(%rip), %rdx      # 0x13ed0
xorl %eax, %eax
callq 0x2190
movl %eax, %ecx
movl $0x3ea, %eax            # imm = 0x3EA
testl %ecx, %ecx
jle 0xa3cd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1735(%rip), %rdi      # 0xbb09
callq 0x267a