// File: /workspace/github_c_makefile_star2_O3/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 0xaa53(%rip), %rbx      # 0x10d08
movsbq (%rbx), %rcx
testq %rcx, %rcx
je 0x6307
movq (%rax), %rax
movzwl (%rax,%rcx,2), %edx
movl %edx, %esi
andl $0x2000, %esi           # imm = 0x2000
jne 0x6307
testb $0x8, %dl
jne 0x6318
movzbl %cl, %eax
cmpl $0x22, %eax
je 0x63ec
cmpl $0x2f, %eax
jne 0x63d7
cmpb $0x2f, 0x1(%rbx)
jne 0x63d7
addq $0x2, %rbx
movq %rbx, 0xaa0a(%rip)      # 0x10d08
movb $0x25, 0xaa0b(%rip)     # 0x10d10
jmp 0x630e
movb $0x7a, 0xaa02(%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 0x631b
leaq (%rbx,%r14), %rax
movq %rax, 0xa9d3(%rip)      # 0x10d08
cmpq $0x21, %r14
jb 0x6358
leaq 0x38d9(%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 0x38bc(%rip), %rsi      # 0x9c31
movq %r15, %rdi
callq 0x3160
cmpq %r14, %rax
jne 0x63ac
movb $0x30, 0xa987(%rip)     # 0x10d10
movq %rsp, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3270
movq %rax, %rdi
callq 0x374c
movq %rax, 0xa971(%rip)      # 0x10d18
jmp 0x630e
movq %rsp, %rdi
callq 0x87a4
movq %rax, 0xa965(%rip)      # 0x10d20
movq %rax, %rdi
callq 0x892a
testl %eax, %eax
sete %al
addb %al, %al
orb $0x64, %al
movb %al, 0xa93e(%rip)       # 0x10d10
jmp 0x630e
incq %rbx
movq %rbx, 0xa927(%rip)      # 0x10d08
movb %cl, 0xa929(%rip)       # 0x10d10
jmp 0x630e
movb $0x30, 0xa91d(%rip)     # 0x10d10
movq $0x0, 0xa91a(%rip) # 0x10d18
incq %rbx
movq %rbx, 0xa900(%rip)      # 0x10d08
movq %rbx, %rdi
movl $0x22, %esi
callq 0x3110
movq %rax, %r14
testq %rax, %rax
je 0x643f
movq %r14, %r15
subq %rbx, %r15
cmpl $0x6, %r15d
jb 0x644f
leaq 0x3818(%rip), %rdi      # 0x9c48
xorl %eax, %eax
callq 0x331d
movl $0x5, %r15d
jmp 0x6454
leaq 0x37f6(%rip), %rdi      # 0x9c3c
xorl %eax, %eax
callq 0x5bec
jmp 0x6489
testl %r15d, %r15d
je 0x6489
andl $0x7, %r15d
xorl %ebx, %ebx
movq 0xa8a7(%rip), %rax      # 0x10d08
movsbl (%rax,%rbx), %edi
callq 0x4189
incq %rbx
movq 0xa8a4(%rip), %rdx      # 0x10d18
movl %eax, %edi
movl %ebx, %esi
callq 0x385b
movq %rax, 0xa894(%rip)      # 0x10d18
cmpq %rbx, %r15
jne 0x645a
incq %r14
movq %r14, 0xa875(%rip)      # 0x10d08
jmp 0x630e