// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/parse.c
// Function: advance
static void advance(void)
{
    char token_text[max_identifier_length + 1];
    if (isspace(the_string[0]) || the_string[0] == '\0')
	token = eos;
    else if (isalnum(the_string[0])) {  /* symbol or number */
	size_t length;
	const char *start = the_string;
	do {
	    ++the_string;
	} while (isalnum(the_string[0]));
	length = the_string - start;
	if (sizeof token_text - 1 < length) {
	    warn("Atom truncated: %*.*s", length, length, start);
	    length = sizeof token_text - 1;
	}
	memcpy(token_text, start, length);
	token_text[length] = '\0';
	if (strspn(token_text, "0123456789") == length) {   /* a number */
	    token = number;
	    token_value = ulong_to_cell(strtoul(token_text, NULL, 10));
	} else {    /* token is a symbol, either defined or future */
	    token_symbol = string_to_symbol(token_text);
	    token = is_defined(token_symbol) ? defined_sym : future_sym;
	}
    } else if (the_string[0] == '/' && the_string[1] == '/') {
	the_string += 2;
	token = slash_slash;
    } else if (the_string[0] == '"') {      /* a quoted string */
	token = number;
	token_value = zero;
	++the_string;
	{
	    const char *end = strchr(the_string, '"');
	    if (!end) {
		error("Missing '\"'");
		the_string += strlen (the_string);
	    } else {
		unsigned length = end - the_string;
		if (5 < length) {
		    warn("String doesn't fit in a machine word");
		    length = 5;
		}
		{
		    unsigned i;
		    for (i = 0; i < length; ++i)
			token_value =
			  set_byte(C_char_to_mix(the_string[i]), i+1, token_value);
		}
	    }
	    the_string = end + 1;
	}
    } else 
	token = *the_string++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
callq 0x32d0
movq 0xae07(%rip), %rbx      # 0x10d08
movsbq (%rbx), %rcx
testq %rcx, %rcx
je 0x5f53
movq (%rax), %rax
movzwl (%rax,%rcx,2), %edx
movl %edx, %esi
andl $0x2000, %esi           # imm = 0x2000
jne 0x5f53
testb $0x8, %dl
jne 0x5f64
movzbl %cl, %eax
cmpl $0x22, %eax
je 0x6034
cmpl $0x2f, %eax
jne 0x601f
cmpb $0x2f, 0x1(%rbx)
jne 0x601f
addq $0x2, %rbx
movq %rbx, 0xadbe(%rip)      # 0x10d08
movb $0x25, 0xadbf(%rip)     # 0x10d10
jmp 0x5f5a
movb $0x7a, 0xadb6(%rip)     # 0x10d10
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
xorl %r14d, %r14d
movsbq 0x1(%rbx,%r14), %rcx
incq %r14
testb $0x8, (%rax,%rcx,2)
jne 0x5f67
leaq (%rbx,%r14), %rax
movq %rax, 0xad87(%rip)      # 0x10d08
cmpq $0x21, %r14
jb 0x5fa2
leaq 0x3c8d(%rip), %rdi      # 0x9c1b
movq %r14, %rsi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x57c3
pushq $0x20
popq %r14
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x31e0
movb $0x0, (%rsp,%r14)
leaq 0x3c72(%rip), %rsi      # 0x9c31
movq %r15, %rdi
callq 0x3160
cmpq %r14, %rax
jne 0x5ff4
movb $0x30, 0xad3d(%rip)     # 0x10d10
movq %rsp, %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x3270
movq %rax, %rdi
callq 0x3554
movq %rax, 0xad29(%rip)      # 0x10d18
jmp 0x5f5a
movq %rsp, %rdi
callq 0x8104
movq %rax, 0xad1d(%rip)      # 0x10d20
movq %rax, %rdi
callq 0x81f8
testl %eax, %eax
sete %al
addb %al, %al
orb $0x64, %al
movb %al, 0xacf6(%rip)       # 0x10d10
jmp 0x5f5a
incq %rbx
movq %rbx, 0xacdf(%rip)      # 0x10d08
movb %cl, 0xace1(%rip)       # 0x10d10
jmp 0x5f5a
andq $0x0, 0xacdc(%rip)      # 0x10d18
movb $0x30, 0xaccd(%rip)     # 0x10d10
incq %rbx
movq %rbx, 0xacbb(%rip)      # 0x10d08
pushq $0x22
popq %rsi
movq %rbx, %rdi
callq 0x3110
movq %rax, %r14
testq %rax, %rax
je 0x60b2
movq %r14, %rax
subq %rbx, %rax
cmpl $0x6, %eax
jb 0x607c
leaq 0x3bd6(%rip), %rdi      # 0x9c48
xorl %eax, %eax
callq 0x57c3
pushq $0x5
popq %rax
movl %eax, %r15d
xorl %ebx, %ebx
cmpq %rbx, %r15
je 0x60c0
movq 0xac7b(%rip), %rax      # 0x10d08
movsbl (%rax,%rbx), %edi
callq 0x3f47
incq %rbx
movq 0xac78(%rip), %rdx      # 0x10d18
movl %eax, %edi
movl %ebx, %esi
callq 0x363f
movq %rax, 0xac68(%rip)      # 0x10d18
jmp 0x6081
leaq 0x3b83(%rip), %rdi      # 0x9c3c
xorl %eax, %eax
callq 0x5700
incq %r14
movq %r14, 0xac3e(%rip)      # 0x10d08
jmp 0x5f5a