// File: /workspace/github_c_makefile_star2_O1/lucvoo[P]sparse-dev/tokenize.c
// Function: show_token
const char *show_token(const struct token *token)
{
	static char buffer[256];

	if (!token)
		return "<no token>";
	switch (token_type(token)) {
	case TOKEN_ERROR:
		return "syntax error";

	case TOKEN_EOF:
		return "end-of-input";

	case TOKEN_IDENT:
	case TOKEN_ZERO_IDENT:
		return show_ident(token->ident);

	case TOKEN_NUMBER:
		return token->number;

	case TOKEN_SPECIAL:
		return show_special(token->special);

	case TOKEN_CHAR: 
		return show_char(token->string->data,
			token->string->length - 1, 0, '\'');
	case TOKEN_CHAR_EMBEDDED_0 ... TOKEN_CHAR_EMBEDDED_3:
		return show_char(token->embedded,
			token_type(token) - TOKEN_CHAR, 0, '\'');
	case TOKEN_WIDE_CHAR: 
		return show_char(token->string->data,
			token->string->length - 1, 'L', '\'');
	case TOKEN_WIDE_CHAR_EMBEDDED_0 ... TOKEN_WIDE_CHAR_EMBEDDED_3:
		return show_char(token->embedded,
			token_type(token) - TOKEN_WIDE_CHAR, 'L', '\'');
	case TOKEN_STRING: 
		return show_char(token->string->data,
			token->string->length - 1, 0, '"');
	case TOKEN_WIDE_STRING: 
		return show_char(token->string->data,
			token->string->length - 1, 'L', '"');

	case TOKEN_STREAMBEGIN:
		sprintf(buffer, "<beginning of '%s'>", stream_name(token->pos.stream));
		return buffer;

	case TOKEN_STREAMEND:
		sprintf(buffer, "<end of '%s'>", stream_name(token->pos.stream));
		return buffer;

	case TOKEN_UNTAINT:
		sprintf(buffer, "<untaint>");
		return buffer;

	case TOKEN_ARG_COUNT:
		sprintf(buffer, "<argcnt>");
		return buffer;

	default:
		sprintf(buffer, "unhandled token type '%d' ", token_type(token));
		return buffer;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2e621
movq %rdi, %rsi
movq (%rdi), %r14
movl %r14d, %edx
andl $0x3f, %edx
cmpl $0x1b, %edx
ja 0x2e773
leaq 0x1ab1b(%rip), %rax     # 0x49100
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
addq $0x10, %rsi
andl $0x3f, %r14d
leaq -0x6(%r14), %rdx
movb $0x27, 0x58fff(%rip)    # 0x87600
leaq 0x58ff8(%rip), %rbx     # 0x87600
leaq 0x58ff2(%rip), %rdi     # 0x87601
callq 0xe1e0
movw $0x27, -0x5(%r14,%rbx)
jmp 0x2e8bd
leaq 0x1ae9c(%rip), %rbx     # 0x494c4
jmp 0x2e8bd
addq $0x10, %rsi
andl $0x3f, %r14d
leaq -0xb(%r14), %rdx
movw $0x274c, 0x58fbe(%rip)  # imm = 0x274C
leaq 0x58fb7(%rip), %rbx     # 0x87600
leaq 0x58fb2(%rip), %rdi     # 0x87602
callq 0xe1e0
movw $0x27, -0x9(%r14,%rbx)
jmp 0x2e8bd
movq 0x10(%rsi), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2e465
shrl $0x6, %r14d
andl $0x3fff, %r14d          # imm = 0x3FFF
cmpl %r14d, 0x4091c(%rip)    # 0x6efa0
jge 0x2e869
leaq 0x1ae0f(%rip), %rdx     # 0x494a0
jmp 0x2e87f
movabsq $0x3e746e636772613c, %rax # imm = 0x3E746E636772613C
movq %rax, 0x48d29(%rip)     # 0x773d0
movb $0x0, 0x48d2a(%rip)     # 0x773d8
jmp 0x2e860
movq 0x10(%rsi), %rsi
movl (%rsi), %r14d
addq $0x4, %rsi
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
leaq -0x1(%r14), %rdx
movw $0x274c, 0x58f2e(%rip)  # imm = 0x274C
leaq 0x58f27(%rip), %rbx     # 0x87600
leaq 0x58f22(%rip), %rdi     # 0x87602
callq 0xe1e0
movw $0x27, 0x1(%r14,%rbx)
jmp 0x2e8bd
movq 0x10(%rsi), %rsi
movl (%rsi), %r14d
addq $0x4, %rsi
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
leaq -0x1(%r14), %rdx
movb $0x27, 0x58ef1(%rip)    # 0x87600
leaq 0x58eea(%rip), %rbx     # 0x87600
leaq 0x58ee4(%rip), %rdi     # 0x87601
callq 0xe1e0
movw $0x27, (%r14,%rbx)
jmp 0x2e8bd
leaq 0x1ada7(%rip), %rbx     # 0x494dc
jmp 0x2e8bd
leaq 0x1ad8e(%rip), %rbx     # 0x494cf
jmp 0x2e8bd
shrl $0x6, %r14d
andl $0x3fff, %r14d          # imm = 0x3FFF
cmpl %r14d, 0x40848(%rip)    # 0x6efa0
jge 0x2e88f
leaq 0x1ad3b(%rip), %rdx     # 0x494a0
jmp 0x2e8a5
movq 0x10(%rsi), %rbx
jmp 0x2e8bd
leaq 0x48c56(%rip), %rbx     # 0x773d0
leaq 0x1ad9d(%rip), %rsi     # 0x4951e
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe2c0
jmp 0x2e8bd
movq 0x10(%rsi), %rsi
movl (%rsi), %r14d
addq $0x4, %rsi
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
leaq -0x1(%r14), %rdx
movb $0x22, 0x58e53(%rip)    # 0x87600
leaq 0x58e4c(%rip), %rbx     # 0x87600
leaq 0x58e46(%rip), %rdi     # 0x87601
callq 0xe1e0
movw $0x22, (%r14,%rbx)
jmp 0x2e8bd
movl 0x10(%rsi), %eax
movb %al, 0x407db(%rip)      # 0x6efb0
movb $0x0, 0x407d5(%rip)     # 0x6efb1
cmpl $0x100, %eax            # imm = 0x100
jl 0x2e8c8
addl $0xffffff00, %eax       # imm = 0xFFFFFF00
leaq 0x3706d(%rip), %rcx     # 0x65860
leaq (%rcx,%rax,4), %rsi
leaq 0x407b2(%rip), %rdi     # 0x6efb0
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe090
movq 0x10(%rsi), %rsi
movl (%rsi), %r14d
addq $0x4, %rsi
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
leaq -0x1(%r14), %rdx
movw $0x224c, 0x58dd7(%rip)  # imm = 0x224C
leaq 0x58dd0(%rip), %rbx     # 0x87600
leaq 0x58dcb(%rip), %rdi     # 0x87602
callq 0xe1e0
movw $0x22, 0x1(%r14,%rbx)
jmp 0x2e8bd
movabsq $0x746e6961746e753c, %rax # imm = 0x746E6961746E753C
movq %rax, 0x48b79(%rip)     # 0x773d0
movw $0x3e, 0x48b78(%rip)    # 0x773d8
leaq 0x48b69(%rip), %rax     # 0x773d0
jmp 0x2e8c0
movq 0x40738(%rip), %rax     # 0x6efa8
movl %r14d, %ecx
leaq (%rcx,%rcx,4), %rcx
shll $0x4, %ecx
movq 0x8(%rax,%rcx), %rdx
leaq 0x48b4a(%rip), %rbx     # 0x773d0
leaq 0x1ac5c(%rip), %rsi     # 0x494e9
jmp 0x2e8b3
movq 0x40712(%rip), %rax     # 0x6efa8
movl %r14d, %ecx
leaq (%rcx,%rcx,4), %rcx
shll $0x4, %ecx
movq 0x8(%rax,%rcx), %rdx
leaq 0x48b24(%rip), %rbx     # 0x773d0
leaq 0x1ac4a(%rip), %rsi     # 0x494fd
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe2c0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x406e1(%rip), %rbx     # 0x6efb0
jmp 0x2e8bd