// File: /workspace/github_c_makefile_star2_O3/ArtifexSoftware[P]mujs/./regexp.c
// Function: nextrune
static int nextrune(struct cstate *g)
{
	if (!*g->source) {
		g->yychar = EOF;
		return 0;
	}
	g->source += chartorune(&g->yychar, g->source);
	if (g->yychar == '\\') {
		if (!*g->source)
			die(g, "unterminated escape sequence");
		g->source += chartorune(&g->yychar, g->source);
		switch (g->yychar) {
		case 'f': g->yychar = '\f'; return 0;
		case 'n': g->yychar = '\n'; return 0;
		case 'r': g->yychar = '\r'; return 0;
		case 't': g->yychar = '\t'; return 0;
		case 'v': g->yychar = '\v'; return 0;
		case 'c':
			if (!g->source[0])
				die(g, "unterminated escape sequence");
			g->yychar = (*g->source++) & 31;
			return 0;
		case 'x':
			if (!g->source[0] || !g->source[1])
				die(g, "unterminated escape sequence");
			g->yychar = hex(g, *g->source++) << 4;
			g->yychar += hex(g, *g->source++);
			if (g->yychar == 0) {
				g->yychar = '0';
				return 1;
			}
			return 1;
		case 'u':
			if (!g->source[0] || !g->source[1] || !g->source[2] || !g->source[3])
				die(g, "unterminated escape sequence");
			g->yychar = hex(g, *g->source++) << 12;
			g->yychar += hex(g, *g->source++) << 8;
			g->yychar += hex(g, *g->source++) << 4;
			g->yychar += hex(g, *g->source++);
			if (g->yychar == 0) {
				g->yychar = '0';
				return 1;
			}
			return 1;
		case 0:
			g->yychar = '0';
			return 1;
		}
		if (strchr(ESCAPES, g->yychar))
			return 1;
		if (isunicodeletter(g->yychar) || g->yychar == '_') /* check identity escape */
			die(g, "invalid escape character");
		return 0;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x18(%rdi), %rsi
leaq 0xac(%rdi), %r14
cmpb $0x0, (%rsi)
je 0x29c21
movq %rdi, %rbx
movq %r14, %rdi
callq 0x18239
movl %eax, %esi
addq 0x18(%rbx), %rsi
movq %rsi, 0x18(%rbx)
cmpl $0x5c, 0xac(%rbx)
jne 0x29c98
cmpb $0x0, (%rsi)
je 0x29dbd
movq %r14, %rdi
callq 0x18239
movl %eax, %ecx
addq 0x18(%rbx), %rcx
movq %rcx, 0x18(%rbx)
movl 0xac(%rbx), %r15d
xorl %eax, %eax
cmpl $0x6d, %r15d
jle 0x29c2d
leal -0x6e(%r15), %edx
cmpl $0xa, %edx
ja 0x29c4b
leaq 0x2237(%rip), %rsi      # 0x2be48
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movl $0xa, %ecx
jmp 0x29c28
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, (%r14)
jmp 0x29c9a
testl %r15d, %r15d
je 0x29d96
cmpl $0x63, %r15d
je 0x29da5
movl $0xc, %ecx
cmpl $0x66, %r15d
je 0x29c28
leaq 0xb625(%rip), %rdi      # 0x35277
movl $0x22, %edx
movl %r15d, %esi
callq 0x30c0
movq %rax, %rcx
movl $0x1, %eax
testq %rcx, %rcx
jne 0x29c9a
movl %r15d, %eax
andl $-0x21, %eax
addl $-0x41, %eax
cmpl $0x1a, %eax
jb 0x29ddf
movl %r15d, %edi
callq 0x1c579
cmpl $0x5f, %r15d
je 0x29ddf
testl %eax, %eax
jne 0x29ddf
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0xb, %ecx
jmp 0x29c28
movl $0x9, %ecx
jmp 0x29c28
cmpb $0x0, (%rcx)
je 0x29dbd
cmpb $0x0, 0x1(%rcx)
je 0x29dbd
cmpb $0x0, 0x2(%rcx)
je 0x29dbd
cmpb $0x0, 0x3(%rcx)
je 0x29dbd
leaq 0x1(%rcx), %rax
movq %rax, 0x18(%rbx)
movsbl (%rcx), %esi
movq %rbx, %rdi
callq 0x29ee8
shll $0xc, %eax
movl %eax, 0xac(%rbx)
movq 0x18(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x18(%rbx)
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x29ee8
shll $0x8, %eax
addl %eax, 0xac(%rbx)
movq 0x18(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x18(%rbx)
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x29ee8
shll $0x4, %eax
addl %eax, 0xac(%rbx)
jmp 0x29d67
movl $0xd, %ecx
jmp 0x29c28
cmpb $0x0, (%rcx)
je 0x29dbd
cmpb $0x0, 0x1(%rcx)
je 0x29dbd
leaq 0x1(%rcx), %rax
movq %rax, 0x18(%rbx)
movsbl (%rcx), %esi
movq %rbx, %rdi
callq 0x29ee8
shll $0x4, %eax
movl %eax, 0xac(%rbx)
movq 0x18(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x18(%rbx)
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x29ee8
addl 0xac(%rbx), %eax
movl $0x30, %ecx
cmovnel %eax, %ecx
movl $0x1, %eax
jmp 0x29c28
movl $0x1, %eax
movl $0x30, %ecx
jmp 0x29c28
cmpb $0x0, (%rcx)
je 0x29dbd
leaq 0x1(%rcx), %rdx
movq %rdx, 0x18(%rbx)
movzbl (%rcx), %ecx
andl $0x1f, %ecx
jmp 0x29c28
leaq 0xaaf5(%rip), %rax      # 0x348b9
movq %rax, 0xc0(%rbx)
addq $0xc8, %rbx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x3320
leaq 0xb4b3(%rip), %rax      # 0x35299
jmp 0x29dc4