// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/char.c
// Function: parse_escape
static const char *parse_escape(const char *p, unsigned *val, const char *end, int bits, struct position pos)
{
	unsigned c = *p++;
	unsigned d;
	if (c != '\\') {
		*val = c;
		return p;
	}

	c = *p++;
	switch (c) {
	case 'a': c = '\a'; break;
	case 'b': c = '\b'; break;
	case 't': c = '\t'; break;
	case 'n': c = '\n'; break;
	case 'v': c = '\v'; break;
	case 'f': c = '\f'; break;
	case 'r': c = '\r'; break;
	case 'e': c = '\e'; break;
	case 'x': {
		unsigned mask = -(1U << (bits - 4));
		for (c = 0; p < end; c = (c << 4) + d) {
			d = hexval(*p);
			if (d > 16)
				break;
			p++;
			if (c & mask) {
				warning(pos,
					"hex escape sequence out of range");
				mask = 0;
			}
		}
		break;
	}
	case '0'...'7': {
		if (p + 2 < end)
			end = p + 2;
		c -= '0';
		while (p < end && (d = *p - '0') < 8) {
			c = (c << 3) + d;
			p++;
		}
		if ((c & 0400) && bits < 9)
			warning(pos,
				"octal escape sequence out of range");
		break;
	}
	default:	/* everything else is left as is */
		warning(pos, "unknown escape sequence: '\\%c'", c);
		break;
	case '\\':
	case '\'':
	case '"':
	case '?':
		break;	/* those are legal, so no warnings */
	}
	*val = c & ~((~0U << (bits - 1)) << 1);
	return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movsbl (%rdi), %eax
cmpl $0x5c, %eax
jne 0x3827c
movl %ecx, %r15d
movq %rdx, %rbp
leaq 0x2(%rdi), %r14
movzbl 0x1(%rdi), %eax
movsbl %al, %r12d
cmpq $0x3f, %rax
ja 0x382c9
movabsq $0xff000000000000, %rcx # imm = 0xFF000000000000
btq %rax, %rcx
jae 0x382b5
addq $0x4, %rdi
cmpq %rbp, %rdi
cmovaeq %rbp, %rdi
addl $-0x30, %r12d
cmpq %rdi, %r14
jae 0x38287
movsbl (%r14), %eax
addl $-0x30, %eax
cmpl $0x7, %eax
ja 0x38287
leal (%rax,%r12,8), %r12d
incq %r14
jmp 0x38262
incq %rdi
movq %rdi, %r14
jmp 0x3838b
cmpl $0x8, %r15d
jg 0x3837b
movl %r12d, %eax
andl $0x100, %eax            # imm = 0x100
je 0x3837b
leaq 0xc7a0(%rip), %rsi      # 0x44a46
movq %r8, %rdi
xorl %eax, %eax
callq 0x1108a
jmp 0x3837b
movabsq $-0x7fffff7c00000000, %rcx # imm = 0x8000008400000000
btq %rax, %rcx
jb 0x3837b
leal -0x5c(%rax), %ecx
cmpl $0xa, %ecx
jbe 0x382f4
addl $-0x6e, %eax
cmpl $0xa, %eax
ja 0x3839f
leaq 0xc6a0(%rip), %rcx      # 0x44984
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq $0xa
jmp 0x38379
leaq 0xc65d(%rip), %rax      # 0x44958
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
pushq $0x7
jmp 0x38379
pushq $0xc
jmp 0x38379
pushq $0x1b
jmp 0x38379
pushq $0x8
jmp 0x38379
movq %r8, 0x10(%rsp)
movq %rbx, 0x8(%rsp)
leal -0x4(%r15), %ecx
pushq $-0x1
popq %r13
shll %cl, %r13d
xorl %r12d, %r12d
cmpq %rbp, %r14
jae 0x38368
movsbl (%r14), %edi
callq 0x2a5b8
cmpl $0x10, %eax
ja 0x38368
movl %eax, %ebx
testl %r12d, %r13d
je 0x3835c
xorl %r13d, %r13d
movq 0x10(%rsp), %rdi
leaq 0xc6d0(%rip), %rsi      # 0x44a25
xorl %eax, %eax
callq 0x1108a
incq %r14
shll $0x4, %r12d
addl %ebx, %r12d
jmp 0x3832c
movq 0x8(%rsp), %rbx
jmp 0x3837b
pushq $0xd
jmp 0x38379
pushq $0xb
jmp 0x38379
pushq $0x9
popq %r12
decb %r15b
pushq $-0x2
popq %rax
movl %r15d, %ecx
shll %cl, %eax
notl %eax
andl %r12d, %eax
movl %eax, (%rbx)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc6c3(%rip), %rsi      # 0x44a69
movq %r8, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0x1108a
jmp 0x3837b