// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %r8, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movl %ecx, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movsbl (%rax), %eax
movl %eax, -0x30(%rbp)
cmpl $0x5c, -0x30(%rbp)
je 0x60c7c
movl -0x30(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x60e72
movq -0x18(%rbp), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, -0x18(%rbp)
movsbl (%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
addl $-0x22, %eax
movl %eax, %ecx
movq %rcx, -0x40(%rbp)
subl $0x56, %eax
ja 0x60e2e
movq -0x40(%rbp), %rax
leaq 0xc7b8(%rip), %rcx      # 0x6d468
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x7, -0x30(%rbp)
jmp 0x60e47
movl $0x8, -0x30(%rbp)
jmp 0x60e47
movl $0x9, -0x30(%rbp)
jmp 0x60e47
movl $0xa, -0x30(%rbp)
jmp 0x60e47
movl $0xb, -0x30(%rbp)
jmp 0x60e47
movl $0xc, -0x30(%rbp)
jmp 0x60e47
movl $0xd, -0x30(%rbp)
jmp 0x60e47
movl $0x1b, -0x30(%rbp)
jmp 0x60e47
movl -0x2c(%rbp), %ecx
subl $0x4, %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x38(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x60d97
movq -0x18(%rbp), %rax
movsbl (%rax), %edi
callq 0x462a0
movl %eax, -0x34(%rbp)
cmpl $0x10, -0x34(%rbp)
jbe 0x60d57
jmp 0x60d97
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movl -0x30(%rbp), %eax
andl -0x38(%rbp), %eax
cmpl $0x0, %eax
je 0x60d87
movq -0x10(%rbp), %rdi
leaq 0xc8c0(%rip), %rsi      # 0x6d639
movb $0x0, %al
callq 0x16d80
movl $0x0, -0x38(%rbp)
jmp 0x60d89
movl -0x30(%rbp), %eax
shll $0x4, %eax
addl -0x34(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x60d36
jmp 0x60e47
movq -0x18(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jae 0x60db6
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movl -0x30(%rbp), %eax
subl $0x30, %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x41(%rbp)
jae 0x60de4
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
subl $0x30, %eax
movl %eax, -0x34(%rbp)
cmpl $0x8, %eax
setb %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x60ded
jmp 0x60e07
movl -0x30(%rbp), %eax
shll $0x3, %eax
addl -0x34(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x60dbf
movl -0x30(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x60e2c
cmpl $0x9, -0x2c(%rbp)
jge 0x60e2c
movq -0x10(%rbp), %rdi
leaq 0xc835(%rip), %rsi      # 0x6d65a
movb $0x0, %al
callq 0x16d80
jmp 0x60e47
movl -0x30(%rbp), %edx
movq -0x10(%rbp), %rdi
leaq 0xc841(%rip), %rsi      # 0x6d67d
movb $0x0, %al
callq 0x16d80
jmp 0x60e47
jmp 0x60e47
movl -0x30(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
movl -0x48(%rbp), %ecx
shll %eax
xorl $-0x1, %eax
andl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)