// File: /workspace/github_c_makefile_star2_O1/ejunjsh[P]mycc/scan.c
// Function: scanch
static int scanch(void) {
  int i, c, c2;

  // 获取下个字符，并解释那些有反斜杠开头的字符
  c = next();
  if (c == '\\') {
    switch (c = next()) {
      case 'a':
	    return ('\a');
      case 'b':
	    return ('\b');
      case 'f':
	    return ('\f');
      case 'n':
	    return ('\n');
      case 'r':
	    return ('\r');
      case 't':
	    return ('\t');
      case 'v':
	    return ('\v');
      case '\\':
	    return ('\\');
      case '"':
	    return ('"');
      case '\'':
	    return ('\'');

    // 处理8进制，直到碰到不是8进制数字为止
    // 值放在c2，位数放在i，只允许3位8进制数字
      case '0':
      case '1':
      case '2':
      case '3':
      case '4':
      case '5':
      case '6':
      case '7':
        for (i = c2 = 0; isdigit(c) && c < '8'; c = next()) {
            if (++i > 3)
                break;
            c2 = c2 * 8 + (c - '0');
        }

	    putback(c);		// 返回非8进制字符
	    return (c2);
      case 'x':
	    return (hexchar());
      default:
	    fatalc("unknown escape sequence", c);
    }
  }
  return (c);			// 返回普通的字符（没有反斜杠转义的）
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x6ee7
movl %eax, %ebx
cmpl $0x5c, %eax
jne 0x71e4
callq 0x6ee7
movl %eax, %r14d
cmpl $0x5b, %eax
jg 0x7173
leal -0x30(%r14), %eax
cmpl $0x8, %eax
jae 0x71b7
callq 0x21a0
xorl %ebx, %ebx
cmpl $0x37, %r14d
jg 0x7167
movq %rax, %r15
movq (%rax), %rax
movslq %r14d, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
je 0x7167
xorl %ebx, %ebx
xorl %r12d, %r12d
leal (%r14,%rbx,8), %ebx
addl $-0x30, %ebx
callq 0x6ee7
movl %eax, %r14d
cmpl $0x37, %eax
jg 0x7167
movq (%r15), %rax
movslq %r14d, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
je 0x7167
leal 0x1(%r12), %eax
cmpl $0x2, %r12d
movl %eax, %r12d
jb 0x7134
leaq 0x8202(%rip), %rax      # 0xf370
movl %r14d, (%rax)
jmp 0x71e4
cmpl $0x65, %r14d
jle 0x7199
leal -0x6e(%r14), %eax
cmpl $0xa, %eax
ja 0x71c5
leaq 0x4573(%rip), %rcx      # 0xb6fc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xa, %ebx
jmp 0x71e4
cmpl $0x5c, %r14d
je 0x71e1
movl $0x7, %ebx
cmpl $0x61, %r14d
je 0x71e4
cmpl $0x62, %r14d
jne 0x71d2
movl $0x8, %ebx
jmp 0x71e4
cmpl $0x22, %r14d
je 0x71e1
cmpl $0x27, %r14d
je 0x71e1
jmp 0x71d2
cmpl $0x66, %r14d
jne 0x71d2
movl $0xc, %ebx
jmp 0x71e4
leaq 0x46f4(%rip), %rdi      # 0xb8cd
movl %r14d, %esi
callq 0x6946
movl %r14d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x21a0
movq %rax, %r14
movq (%rax), %rbx
callq 0x6ee7
movslq %eax, %rcx
movzwl (%rbx,%rcx,2), %r15d
xorl %ebx, %ebx
btl $0xc, %r15d
jae 0x725f
xorl %ebx, %ebx
leaq 0x467c(%rip), %r12      # 0xb89b
movl %eax, %edi
callq 0x2110
movsbl %al, %ecx
movb $0x30, %dl
xorl %eax, %eax
movsbl %dl, %edx
cmpl %edx, %ecx
je 0x7247
movb 0x1(%rax,%r12), %dl
incq %rax
cmpq $0x10, %rax
jne 0x722d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll $0x4, %ebx
addl %eax, %ebx
movq (%r14), %r13
callq 0x6ee7
movslq %eax, %rcx
testb $0x10, 0x1(%r13,%rcx,2)
jne 0x721f
btl $0xc, %r15d
leaq 0x8105(%rip), %rcx      # 0xf370
movl %eax, (%rcx)
jb 0x727b
leaq 0x466f(%rip), %rdi      # 0xb8e5
callq 0x688f
cmpl $0x100, %ebx            # imm = 0x100
jl 0x71e4
leaq 0x4671(%rip), %rdi      # 0xb8ff
callq 0x688f
jmp 0x71e4
movl $0x9, %ebx
jmp 0x71e4
movl $0xb, %ebx
jmp 0x71e4
movl $0xd, %ebx
jmp 0x71e4