// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
callq 0x3280
movq (%rax), %rax
movq 0xbd81(%rip), %rcx      # 0x13d28
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
jne 0x7fca
movq 0xbd66(%rip), %rax      # 0x13d28
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x7fd6
movb $0x7a, 0xbd5f(%rip)     # 0x13d30
jmp 0x8273
callq 0x3280
movq (%rax), %rax
movq 0xbd43(%rip), %rcx      # 0x13d28
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x810b
movq 0xbd26(%rip), %rax      # 0x13d28
movq %rax, -0x40(%rbp)
movq 0xbd1b(%rip), %rax      # 0x13d28
addq $0x1, %rax
movq %rax, 0xbd10(%rip)      # 0x13d28
callq 0x3280
movq (%rax), %rax
movq 0xbd01(%rip), %rcx      # 0x13d28
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x8006
movq 0xbce8(%rip), %rax      # 0x13d28
movq -0x40(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x20, %eax
cmpq -0x38(%rbp), %rax
jae 0x8078
movq -0x38(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq 0x4cea(%rip), %rdi      # 0xcd53
movb $0x0, %al
callq 0x7590
movq $0x20, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x3190
movq -0x38(%rbp), %rax
movb $0x0, -0x30(%rbp,%rax)
leaq -0x30(%rbp), %rdi
leaq 0x4ccc(%rip), %rsi      # 0xcd69
callq 0x3120
cmpq -0x38(%rbp), %rax
jne 0x80d2
movb $0x30, 0xbc81(%rip)     # 0x13d30
leaq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x3230
movq %rax, %rdi
callq 0x3570
movq %rax, 0xbc68(%rip)      # 0x13d38
jmp 0x8106
leaq -0x30(%rbp), %rdi
callq 0xb2b0
movq %rax, 0xbc5e(%rip)      # 0x13d40
movq 0xbc57(%rip), %rdi      # 0x13d40
callq 0xb520
movl %eax, %edx
movl $0x66, %eax
movl $0x64, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, 0xbc2a(%rip)       # 0x13d30
jmp 0x8271
movq 0xbc16(%rip), %rax      # 0x13d28
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x8148
movq 0xbc07(%rip), %rax      # 0x13d28
movsbl 0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0x8148
movq 0xbbf7(%rip), %rax      # 0x13d28
addq $0x2, %rax
movq %rax, 0xbbec(%rip)      # 0x13d28
movb $0x25, 0xbbed(%rip)     # 0x13d30
jmp 0x826f
movq 0xbbd9(%rip), %rax      # 0x13d28
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x8250
movb $0x30, 0xbbce(%rip)     # 0x13d30
movq $0x0, 0xbbcb(%rip) # 0x13d38
movq 0xbbb4(%rip), %rax      # 0x13d28
addq $0x1, %rax
movq %rax, 0xbba9(%rip)      # 0x13d28
movq 0xbba2(%rip), %rdi      # 0x13d28
movl $0x22, %esi
callq 0x30e0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x81c5
leaq 0x4bd2(%rip), %rdi      # 0xcd74
movb $0x0, %al
callq 0x74b0
movq 0xbb78(%rip), %rdi      # 0x13d28
callq 0x30d0
addq 0xbb6c(%rip), %rax      # 0x13d28
movq %rax, 0xbb65(%rip)      # 0x13d28
jmp 0x823f
movq -0x48(%rbp), %rax
movq 0xbb58(%rip), %rcx      # 0x13d28
subq %rcx, %rax
movl %eax, -0x4c(%rbp)
movl $0x5, %eax
cmpl -0x4c(%rbp), %eax
jae 0x81f5
leaq 0x4b99(%rip), %rdi      # 0xcd80
movb $0x0, %al
callq 0x7590
movl $0x5, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jae 0x823d
movq 0xbb1d(%rip), %rax      # 0x13d28
movl -0x50(%rbp), %ecx
movsbl (%rax,%rcx), %edi
callq 0x4a20
movl %eax, %edi
movl -0x50(%rbp), %esi
addl $0x1, %esi
movq 0xbb12(%rip), %rdx      # 0x13d38
callq 0x3730
movq %rax, 0xbb06(%rip)      # 0x13d38
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x81fc
jmp 0x823f
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, 0xbada(%rip)      # 0x13d28
jmp 0x826d
movq 0xbad1(%rip), %rax      # 0x13d28
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xbac3(%rip)      # 0x13d28
movb (%rax), %al
movb %al, 0xbac3(%rip)       # 0x13d30
jmp 0x826f
jmp 0x8271
jmp 0x8273
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)