// File: /workspace/github_c_makefile_star2_O0/michaelforney[P]cproc/token.c
// Function: tokendesc
static void
tokendesc(char *buf, size_t len, enum tokenkind kind, const char *lit)
{
	const char *class;
	bool quote = true;

	switch (kind) {
	case TEOF:       class = "EOF";                       break;
	case TIDENT:     class = "identifier"; quote = true;  break;
	case TNUMBER:    class = "number";     quote = true;  break;
	case TCHARCONST: class = "character";  quote = false; break;
	case TSTRINGLIT: class = "string";     quote = false; break;
	case TNEWLINE:   class = "newline";                   break;
	case TOTHER:     class = NULL;                        break;
	default:
		class = NULL;
		lit = kind < LEN(tokstr) ? tokstr[kind] : NULL;
	}
	if (class && lit)
		snprintf(buf, len, quote ? "%s '%s'" : "%s %s", class, lit);
	else if (class)
		snprintf(buf, len, "%s", class);
	else if (kind == TOTHER && !isprint(*(unsigned char *)lit))
		snprintf(buf, len, "<U+%04x>", *(unsigned char *)lit);
	else if (lit)
		snprintf(buf, len, "'%s'", lit);
	else
		snprintf(buf, len, "<unknown>");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movb $0x1, -0x29(%rbp)
movl -0x14(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x6, %eax
ja 0x11061
movq -0x38(%rbp), %rax
leaq 0xa9c2(%rip), %rcx      # 0x1b9ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xaa72(%rip), %rax      # 0x1ba6c
movq %rax, -0x28(%rbp)
jmp 0x11098
leaq 0x7ecc(%rip), %rax      # 0x18ed6
movq %rax, -0x28(%rbp)
movb $0x1, -0x29(%rbp)
jmp 0x11098
leaq 0xaa52(%rip), %rax      # 0x1ba70
movq %rax, -0x28(%rbp)
movb $0x1, -0x29(%rbp)
jmp 0x11098
leaq 0xaa48(%rip), %rax      # 0x1ba77
movq %rax, -0x28(%rbp)
movb $0x0, -0x29(%rbp)
jmp 0x11098
leaq 0x7687(%rip), %rax      # 0x186c7
movq %rax, -0x28(%rbp)
movb $0x0, -0x29(%rbp)
jmp 0x11098
leaq 0xaa30(%rip), %rax      # 0x1ba81
movq %rax, -0x28(%rbp)
jmp 0x11098
movq $0x0, -0x28(%rbp)
jmp 0x11098
movq $0x0, -0x28(%rbp)
movl -0x14(%rbp), %eax
cmpq $0x71, %rax
jae 0x11088
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x10632(%rip), %rax     # 0x216b0
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
jmp 0x11090
xorl %eax, %eax
movq %rax, -0x40(%rbp)
jmp 0x11090
movq -0x40(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x110da
cmpq $0x0, -0x20(%rbp)
je 0x110da
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movb -0x29(%rbp), %cl
leaq 0xa9d9(%rip), %rdx      # 0x1ba91
leaq 0xa9ca(%rip), %rax      # 0x1ba89
testb $0x1, %cl
cmovneq %rax, %rdx
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %r8
movb $0x0, %al
callq 0x30d0
jmp 0x11184
cmpq $0x0, -0x28(%rbp)
je 0x11100
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq 0x8d2a(%rip), %rdx      # 0x19e1e
movb $0x0, %al
callq 0x30d0
jmp 0x11182
cmpl $0x3, -0x14(%rbp)
jne 0x11145
callq 0x3250
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
jne 0x11145
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
movzbl (%rax), %ecx
leaq 0xa95b(%rip), %rdx      # 0x1ba97
movb $0x0, %al
callq 0x30d0
jmp 0x11180
cmpq $0x0, -0x20(%rbp)
je 0x11168
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rcx
leaq 0x8ca3(%rip), %rdx      # 0x19e02
movb $0x0, %al
callq 0x30d0
jmp 0x1117e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0xa929(%rip), %rdx      # 0x1baa0
movb $0x0, %al
callq 0x30d0
jmp 0x11180
jmp 0x11182
jmp 0x11184
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)