// File: /workspace/github_c_makefile_star2_O2/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
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x1f869
movl %eax, %r12d
leal -0x6e(%r12), %eax
cmpl $0xa, %eax
ja 0x1f985
leaq 0x13e1b(%rip), %rcx     # 0x33790
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq $0xa
jmp 0x1faa3
cmpl $0x22, %r12d
je 0x1faa5
cmpl $0x27, %r12d
je 0x1faa5
cmpl $0x30, %r12d
je 0x1fac8
cmpl $0x5c, %r12d
je 0x1faa5
cmpl $0x62, %r12d
jne 0x1fb89
pushq $0x8
jmp 0x1faa3
pushq $0x9
jmp 0x1faa3
callq 0x1f869
movl %eax, %ebp
callq 0x4390
movq %rax, %r13
movq (%rax), %rax
movslq %ebp, %rcx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x1fb77
callq 0x1f869
movl %eax, %r12d
movq (%r13), %rax
movslq %r12d, %rcx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x1fb77
movsbl %bpl, %edi
callq 0x1fc43
movl %eax, %ebp
shll $0x4, %ebp
movsbl %r12b, %edi
callq 0x1fc43
movl %eax, %r12d
orl %ebp, %r12d
jmp 0x1faa5
pushq $0xd
jmp 0x1faa3
callq 0x1f869
cmpl $0x7b, %eax
jne 0x1fba1
xorl %r12d, %r12d
movslq 0x3f77b(%rip), %rax     # 0x5f1b8
movb $-0x1, %r13b
cmpl 0x3f762(%rip), %eax     # 0x5f1a8
jge 0x1fa53
movq 0x3f751(%rip), %rcx     # 0x5f1a0
movb (%rcx,%rax), %r13b
leal -0x3a(%r13), %ebp
callq 0x1f869
cmpb $-0xb, %bpl
ja 0x1fa70
andb $-0x21, %r13b
addb $-0x47, %r13b
cmpb $-0x6, %r13b
jb 0x1facd
movl %r12d, %ebp
shll $0x4, %ebp
movsbl %al, %edi
callq 0x1fc43
orl %ebp, %eax
cmpl $0x11000, %r12d         # imm = 0x11000
movl %eax, %r12d
jb 0x1fa36
movq 0x3f71d(%rip), %rdi     # 0x5f1b0
leaq 0x13e90(%rip), %rsi     # 0x3392a
xorl %eax, %eax
callq 0x121e4
pushq $0xb
popq %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x1fbd7
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r12d, %r12d
jmp 0x1faa5
cmpl $0x7d, %eax
jne 0x1fbb4
andl $0x0, 0x4(%rsp)
cmpl $0x80, %r12d
jae 0x1fae8
pushq $0x1
jmp 0x1fb11
cmpl $0x800, %r12d           # imm = 0x800
jae 0x1faf5
pushq $0x2
jmp 0x1fb11
cmpl $0x10000, %r12d         # imm = 0x10000
jae 0x1fb02
pushq $0x3
jmp 0x1fb11
cmpl $0x200000, %r12d        # imm = 0x200000
jae 0x1fbc7
pushq $0x4
popq %r13
leaq -0x1(%r13), %rdx
movl %r12d, %eax
movq %rdx, %rcx
jmp 0x1fb34
movl %eax, %esi
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x3(%rsp,%rdx)
shrl $0x6, %eax
movq %rcx, %rdx
subq $0x1, %rcx
jae 0x1fb1f
movb $0x8, %cl
subb %r13b, %cl
pushq $-0x1
popq %rdx
shll %cl, %edx
xorl %ebp, %ebp
cmpl $0x80, %r12d
cmovbl %ebp, %edx
orl %edx, %eax
movb %al, 0x3(%rsp)
cmpq %rbp, %r13
je 0x1fab6
movsbl 0x3(%rsp,%rbp), %ecx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1fbd7
incq %rbp
jmp 0x1fb56
movq 0x3f632(%rip), %rdi     # 0x5f1b0
leaq 0x13d4b(%rip), %rsi     # 0x338d0
movl %ebp, %edx
jmp 0x1fb9a
movq 0x3f620(%rip), %rdi     # 0x5f1b0
leaq 0x13d54(%rip), %rsi     # 0x338eb
movl %r12d, %edx
xorl %eax, %eax
callq 0x121e4
movq 0x3f608(%rip), %rdi     # 0x5f1b0
leaq 0x13d54(%rip), %rsi     # 0x33903
jmp 0x1fa9a
movq 0x3f5f5(%rip), %rdi     # 0x5f1b0
leaq 0x13d91(%rip), %rsi     # 0x33953
jmp 0x1fa9a
movq 0x3f5e2(%rip), %rdi     # 0x5f1b0
leaq 0x13da4(%rip), %rsi     # 0x33979
jmp 0x1fb97