// File: /workspace/github_c_makefile_star2_O1/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 0xaa8f(%rip), %rbx      # 0x10d08
movsbq (%rbx), %rcx
testq %rcx, %rcx
je 0x62cb
movq (%rax), %rax
movzwl (%rax,%rcx,2), %edx
movl %edx, %esi
andl $0x2000, %esi           # imm = 0x2000
jne 0x62cb
testb $0x8, %dl
jne 0x62dc
movzbl %cl, %eax
cmpl $0x22, %eax
je 0x63ac
cmpl $0x2f, %eax
jne 0x6434
cmpb $0x2f, 0x1(%rbx)
jne 0x63a3
addq $0x2, %rbx
movq %rbx, 0xaa46(%rip)      # 0x10d08
movb $0x25, 0xaa47(%rip)     # 0x10d10
jmp 0x62d2
movb $0x7a, 0xaa3e(%rip)     # 0x10d10
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0xaa25(%rip), %rcx      # 0x10d08
movq %rcx, %r14
subq %rbx, %r14
movsbq 0x1(%rcx), %rdx
incq %rcx
incq %r14
testb $0x8, (%rax,%rdx,2)
jne 0x62e9
movq %rcx, 0xaa07(%rip)      # 0x10d08
cmpq $0x21, %r14
jb 0x6324
leaq 0x390d(%rip), %rdi      # 0x9c1b
movq %r14, %rsi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x331d
movl $0x20, %r14d
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x31e0
movb $0x0, (%rsp,%r14)
leaq 0x38f0(%rip), %rsi      # 0x9c31
movq %r15, %rdi
callq 0x3160
cmpq %r14, %rax
jne 0x6378
movb $0x30, 0xa9bb(%rip)     # 0x10d10
movq %rsp, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3270
movq %rax, %rdi
callq 0x376c
movq %rax, 0xa9a5(%rip)      # 0x10d18
jmp 0x62d2
movq %rsp, %rdi
callq 0x878c
movq %rax, 0xa999(%rip)      # 0x10d20
movq %rax, %rdi
callq 0x8909
testl %eax, %eax
sete %al
addb %al, %al
orb $0x64, %al
movb %al, 0xa972(%rip)       # 0x10d10
jmp 0x62d2
cmpb $0x22, %cl
jne 0x6434
movb $0x30, 0xa95d(%rip)     # 0x10d10
movq $0x0, 0xa95a(%rip) # 0x10d18
incq %rbx
movq %rbx, 0xa940(%rip)      # 0x10d08
movq %rbx, %rdi
movl $0x22, %esi
callq 0x3110
movq %rax, %r14
testq %rax, %rax
je 0x6449
movl %r14d, %eax
subl %ebx, %eax
cmpl $0x6, %eax
jb 0x63fa
leaq 0x385a(%rip), %rdi      # 0x9c48
xorl %eax, %eax
callq 0x331d
movl $0x5, %eax
testl %eax, %eax
je 0x6470
movl %eax, %r15d
xorl %ebx, %ebx
movq 0xa8fe(%rip), %rax      # 0x10d08
movsbl (%rax,%rbx), %edi
callq 0x41b1
incq %rbx
movq 0xa8fb(%rip), %rdx      # 0x10d18
movl %eax, %edi
movl %ebx, %esi
callq 0x387b
movq %rax, 0xa8eb(%rip)      # 0x10d18
cmpq %rbx, %r15
jne 0x6403
jmp 0x6470
incq %rbx
movq %rbx, 0xa8ca(%rip)      # 0x10d08
movb %cl, 0xa8cc(%rip)       # 0x10d10
jmp 0x62d2
leaq 0x37ec(%rip), %rdi      # 0x9c3c
xorl %eax, %eax
callq 0x5bbc
movq 0xa8aa(%rip), %rbx      # 0x10d08
movq %rbx, %rdi
callq 0x3100
addq %rbx, %rax
movq %rax, 0xa898(%rip)      # 0x10d08
incq %r14
movq %r14, 0xa88e(%rip)      # 0x10d08
jmp 0x62d2