// File: /workspace/github_c_makefile_star2_O2/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 0x2951c
movq %rdi, %rsi
movq (%rdi), %r14
movl %r14d, %edx
andl $0x3f, %edx
cmpl $0x1b, %edx
ja 0x2967f
leaq 0x17d50(%rip), %rax     # 0x41230
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
addq $0x10, %rsi
andl $0x3f, %r14d
leaq -0x6(%r14), %rdx
movb $0x27, 0x57104(%rip)    # 0x80600
leaq 0x570fd(%rip), %rbx     # 0x80600
leaq 0x570f7(%rip), %rdi     # 0x80601
callq 0xe1e0
movw $0x27, -0x5(%r14,%rbx)
jmp 0x29720
leaq 0x180c1(%rip), %rbx     # 0x415e4
jmp 0x29720
addq $0x10, %rsi
andl $0x3f, %r14d
leaq -0xb(%r14), %rdx
movw $0x274c, 0x570c3(%rip)  # imm = 0x274C
leaq 0x570bc(%rip), %rbx     # 0x80600
leaq 0x570b7(%rip), %rdi     # 0x80602
callq 0xe1e0
movw $0x27, -0x9(%r14,%rbx)
jmp 0x29720
movq 0x10(%rsi), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2936d
shrl $0x6, %r14d
andl $0x3fff, %r14d          # imm = 0x3FFF
movl %r14d, %edi
callq 0x292d8
leaq 0x46e49(%rip), %rbx     # 0x703d0
leaq 0x1807b(%rip), %rsi     # 0x41609
jmp 0x29664
movabsq $0x3e746e636772613c, %rax # imm = 0x3E746E636772613C
movq %rax, 0x46e2c(%rip)     # 0x703d0
movb $0x0, 0x46e2d(%rip)     # 0x703d8
jmp 0x29745
movq 0x10(%rsi), %rsi
movl (%rsi), %r14d
addq $0x4, %rsi
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
leaq -0x1(%r14), %rdx
movw $0x274c, 0x57031(%rip)  # imm = 0x274C
leaq 0x5702a(%rip), %rbx     # 0x80600
leaq 0x57025(%rip), %rdi     # 0x80602
callq 0xe1e0
movw $0x27, 0x1(%r14,%rbx)
jmp 0x29720
movq 0x10(%rsi), %rsi
movl (%rsi), %r14d
addq $0x4, %rsi
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
leaq -0x1(%r14), %rdx
movb $0x27, 0x56ff4(%rip)    # 0x80600
leaq 0x56fed(%rip), %rbx     # 0x80600
leaq 0x56fe7(%rip), %rdi     # 0x80601
callq 0xe1e0
movw $0x27, (%r14,%rbx)
jmp 0x29720
leaq 0x17fca(%rip), %rbx     # 0x415fc
jmp 0x29720
leaq 0x17fb1(%rip), %rbx     # 0x415ef
jmp 0x29720
shrl $0x6, %r14d
andl $0x3fff, %r14d          # imm = 0x3FFF
movl %r14d, %edi
callq 0x292d8
leaq 0x46d73(%rip), %rbx     # 0x703d0
leaq 0x17fb9(%rip), %rsi     # 0x4161d
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe2d0
jmp 0x29720
movq 0x10(%rsi), %rbx
jmp 0x29720
leaq 0x46d4a(%rip), %rbx     # 0x703d0
leaq 0x17fb1(%rip), %rsi     # 0x4163e
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe2d0
jmp 0x29720
movq 0x10(%rsi), %rsi
movl (%rsi), %r14d
addq $0x4, %rsi
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
leaq -0x1(%r14), %rdx
movb $0x22, 0x56f47(%rip)    # 0x80600
leaq 0x56f40(%rip), %rbx     # 0x80600
leaq 0x56f3a(%rip), %rdi     # 0x80601
callq 0xe1e0
movw $0x22, (%r14,%rbx)
jmp 0x29720
movl 0x10(%rsi), %edi
callq 0x29332
leaq 0x3e8cc(%rip), %rbx     # 0x67fb0
jmp 0x29720
movq 0x10(%rsi), %rsi
movl (%rsi), %r14d
addq $0x4, %rsi
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
leaq -0x1(%r14), %rdx
movw $0x224c, 0x56efb(%rip)  # imm = 0x224C
leaq 0x56ef4(%rip), %rbx     # 0x80600
leaq 0x56eef(%rip), %rdi     # 0x80602
callq 0xe1e0
movw $0x22, 0x1(%r14,%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movabsq $0x746e6961746e753c, %rax # imm = 0x746E6961746E753C
movq %rax, 0x46c94(%rip)     # 0x703d0
movw $0x3e, 0x46c93(%rip)    # 0x703d8
leaq 0x46c84(%rip), %rax     # 0x703d0
jmp 0x29723