// File: /workspace/github_c_makefile_star2_O1/oridb[P]mc/parse/tok.c
// Function: decode
static int
decode(char **buf, size_t *len, size_t *sz)
{
	char c, c1, c2;
	int32_t v;

	c = next();
	/* we've already seen the '\' */
	switch (c) {
	case 'u':
		v = unichar();
		appendc(buf, len, sz, v);
		return v;
	case 'x': /* arbitrary hex */
		c1 = next();
		if (!isxdigit(c1))
			lfatal(curloc, "expected hex digit, got %c", c1);
		c2 = next();
		if (!isxdigit(c2))
			lfatal(curloc, "expected hex digit, got %c", c1);
		v = 16 * hexval(c1) + hexval(c2);
		break;
	case 'n': v = '\n'; break;
	case 'r': v = '\r'; break;
	case 't': v = '\t'; break;
	case 'b': v = '\b'; break;
	case '"': v = '\"'; break;
	case '\'': v = '\''; break;
	case 'v': v = '\v'; break;
	case '\\': v = '\\'; break;
	case '0': v = '\0'; break;
	default: lfatal(curloc, "unknown escape code \\%c", c);
	}
	append(buf, len, sz, v);
	return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movslq 0x3fe47(%rip), %r13     # 0x621b8
movl 0x3fe31(%rip), %ebp     # 0x621a8
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
cmpl %ebp, %r13d
jge 0x2238e
movq 0x3fe17(%rip), %rax     # 0x621a0
movsbl (%rax,%r13), %r12d
leaq 0x1(%r13), %rax
movl %eax, 0x3fe20(%rip)     # 0x621b8
cmpl $0x5b, %r12d
jle 0x223c3
leal -0x6e(%r12), %ecx
cmpl $0xa, %ecx
ja 0x223e9
leaq 0x15401(%rip), %rdx     # 0x377b0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0xa, %r12d
jmp 0x22550
cmpl $0x22, %r12d
je 0x22550
cmpl $0x27, %r12d
je 0x22550
cmpl $0x30, %r12d
jne 0x22652
xorl %r12d, %r12d
jmp 0x22550
cmpl $0x5c, %r12d
je 0x22550
cmpl $0x62, %r12d
jne 0x22652
movl $0x8, %r12d
jmp 0x22550
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl %ebp, %eax
jge 0x2241c
movq 0x3fd88(%rip), %rcx     # 0x621a0
movsbl (%rcx,%rax), %ecx
movl %ecx, 0x14(%rsp)
leaq 0x2(%r13), %r12
movl %r12d, 0x3fd8d(%rip)    # 0x621b8
callq 0x4390
movl 0x14(%rsp), %edx
movq (%rax), %rax
movslq %edx, %rcx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x22642
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl %ebp, %r12d
jge 0x2245b
movq 0x3fd4a(%rip), %rcx     # 0x621a0
movsbl (%rcx,%r12), %ecx
addl $0x3, %r13d
movl %r13d, 0x3fd52(%rip)    # 0x621b8
movl %ecx, %r12d
movslq %ecx, %rcx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x22642
movsbl %dl, %edi
callq 0x22718
movl %eax, %ebp
shll $0x4, %ebp
movl %r12d, %edi
callq 0x22718
movl %eax, %r12d
orl %ebp, %r12d
jmp 0x22550
movl $0xb, %r12d
jmp 0x22550
cmpl %ebp, %eax
jge 0x2266a
movq 0x3fcef(%rip), %rcx     # 0x621a0
leal 0x2(%r13), %edx
cmpb $0x7b, (%rcx,%rax)
movl %edx, 0x3fcf9(%rip)     # 0x621b8
jne 0x22675
xorl %r12d, %r12d
movslq 0x3fce9(%rip), %rax     # 0x621b8
movl 0x3fcd3(%rip), %ecx     # 0x621a8
movb $-0x1, %dl
cmpl %ecx, %eax
jge 0x224e5
movq 0x3fcbe(%rip), %rdx     # 0x621a0
movb (%rdx,%rax), %dl
leal -0x3a(%rdx), %esi
cmpb $-0xb, %sil
ja 0x224f9
andb $-0x21, %dl
addb $-0x47, %dl
cmpb $-0x6, %dl
jb 0x22573
movb $-0x1, %dl
cmpl %ecx, %eax
jge 0x22509
movq 0x3fc9a(%rip), %rcx     # 0x621a0
movb (%rcx,%rax), %dl
incl %eax
movl %eax, 0x3fca7(%rip)     # 0x621b8
movl %r12d, %ebp
shll $0x4, %ebp
movsbl %dl, %edi
callq 0x22718
orl %ebp, %eax
cmpl $0x11000, %r12d         # imm = 0x11000
movl %eax, %r12d
jb 0x224c8
movq 0x3fc7c(%rip), %rdi     # 0x621b0
leaq 0x1540f(%rip), %rsi     # 0x3794a
xorl %eax, %eax
callq 0x13b8e
movl $0xd, %r12d
jmp 0x22550
movl $0x9, %r12d
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x226b3
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl %ecx, %eax
jge 0x22688
movq 0x3fc1e(%rip), %rcx     # 0x621a0
leal 0x1(%rax), %edx
cmpb $0x7d, (%rcx,%rax)
movl %edx, 0x3fc29(%rip)     # 0x621b8
jne 0x22690
movb $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x1, %r13d
cmpl $0x80, %r12d
jb 0x225e2
movl $0x2, %r13d
cmpl $0x800, %r12d           # imm = 0x800
jb 0x225e2
movl $0x3, %r13d
cmpl $0x10000, %r12d         # imm = 0x10000
jb 0x225e2
movl $0x4, %r13d
cmpl $0x200000, %r12d        # imm = 0x200000
jae 0x226a3
movq %r13, %rcx
movl %r12d, %eax
decq %rcx
je 0x22604
movl %r12d, %eax
movl %eax, %edx
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0xc(%rsp,%rcx)
shrl $0x6, %eax
decq %rcx
jne 0x225f0
movb $0x8, %cl
subb %r13b, %cl
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
shll %cl, %edx
xorl %ebp, %ebp
cmpl $0x80, %r12d
cmovbl %ebp, %edx
orl %eax, %edx
movb %dl, 0xc(%rsp)
movsbl 0xc(%rsp,%rbp), %ecx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x226b3
incq %rbp
cmpq %rbp, %r13
jne 0x22622
jmp 0x22561
movq 0x3fb67(%rip), %rdi     # 0x621b0
leaq 0x152a0(%rip), %rsi     # 0x378f0
jmp 0x22663
movq 0x3fb57(%rip), %rdi     # 0x621b0
leaq 0x152ab(%rip), %rsi     # 0x3790b
movl %r12d, %edx
xorl %eax, %eax
callq 0x13b8e
addl $0x2, %r13d
movl %r13d, 0x3fb43(%rip)    # 0x621b8
movq 0x3fb34(%rip), %rdi     # 0x621b0
leaq 0x152a0(%rip), %rsi     # 0x37923
jmp 0x2253b
incl %eax
movl %eax, 0x3fb28(%rip)     # 0x621b8
movq 0x3fb19(%rip), %rdi     # 0x621b0
leaq 0x152d5(%rip), %rsi     # 0x37973
jmp 0x2253b
movq 0x3fb06(%rip), %rdi     # 0x621b0
leaq 0x152e8(%rip), %rsi     # 0x37999
jmp 0x22660