// File: /workspace/github_c_makefile_star2_O0/ccxvii[P]mujs/./regexp.c
// Function: lexclass
static int lexclass(struct cstate *g)
{
	int type = L_CCLASS;
	int quoted, havesave, havedash;
	Rune save = 0;

	newcclass(g);

	quoted = nextrune(g);
	if (!quoted && g->yychar == '^') {
		type = L_NCCLASS;
		quoted = nextrune(g);
	}

	havesave = havedash = 0;
	for (;;) {
		if (g->yychar == EOF)
			die(g, "unterminated character class");
		if (!quoted && g->yychar == ']')
			break;

		if (!quoted && g->yychar == '-') {
			if (havesave) {
				if (havedash) {
					addrange(g, save, '-');
					havesave = havedash = 0;
				} else {
					havedash = 1;
				}
			} else {
				save = '-';
				havesave = 1;
			}
		} else if (quoted && strchr("DSWdsw", g->yychar)) {
			if (havesave) {
				addrange(g, save, save);
				if (havedash)
					addrange(g, '-', '-');
			}
			switch (g->yychar) {
			case 'd': addranges_d(g); break;
			case 's': addranges_s(g); break;
			case 'w': addranges_w(g); break;
			case 'D': addranges_D(g); break;
			case 'S': addranges_S(g); break;
			case 'W': addranges_W(g); break;
			}
			havesave = havedash = 0;
		} else {
			if (quoted) {
				if (g->yychar == 'b')
					g->yychar = '\b';
				else if (g->yychar == '0')
					g->yychar = 0;
				/* else identity escape */
			}
			if (havesave) {
				if (havedash) {
					addrange(g, save, g->yychar);
					havesave = havedash = 0;
				} else {
					addrange(g, save, save);
					save = g->yychar;
				}
			} else {
				save = g->yychar;
				havesave = 1;
			}
		}

		quoted = nextrune(g);
	}

	if (havesave) {
		addrange(g, save, save);
		if (havedash)
			addrange(g, '-', '-');
	}

	return type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x101, -0xc(%rbp)      # imm = 0x101
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x31370
movq -0x8(%rbp), %rdi
callq 0x30ef0
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jne 0x31785
movq -0x8(%rbp), %rax
cmpl $0x5e, 0xac(%rax)
jne 0x31785
movl $0x102, -0xc(%rbp)      # imm = 0x102
movq -0x8(%rbp), %rdi
callq 0x30ef0
movl %eax, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
cmpl $-0x1, 0xac(%rax)
jne 0x317b0
movq -0x8(%rbp), %rdi
leaq 0xc22c(%rip), %rsi      # 0x3d9d7
callq 0x1c7b0
cmpl $0x0, -0x10(%rbp)
jne 0x317c8
movq -0x8(%rbp), %rax
cmpl $0x5d, 0xac(%rax)
jne 0x317c8
jmp 0x319b5
cmpl $0x0, -0x10(%rbp)
jne 0x31824
movq -0x8(%rbp), %rax
cmpl $0x2d, 0xac(%rax)
jne 0x31824
cmpl $0x0, -0x14(%rbp)
je 0x31811
cmpl $0x0, -0x18(%rbp)
je 0x31808
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl $0x2d, %edx
callq 0x31ac0
movl $0x0, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
jmp 0x3180f
movl $0x1, -0x18(%rbp)
jmp 0x3181f
movl $0x2d, -0x1c(%rbp)
movl $0x1, -0x14(%rbp)
jmp 0x319a4
cmpl $0x0, -0x10(%rbp)
je 0x318fa
movq -0x8(%rbp), %rax
movl 0xac(%rax), %esi
leaq 0xc1b5(%rip), %rdi      # 0x3d9f4
callq 0x3280
cmpq $0x0, %rax
je 0x318fa
cmpl $0x0, -0x14(%rbp)
je 0x3187b
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x31ac0
cmpl $0x0, -0x18(%rbp)
je 0x31879
movq -0x8(%rbp), %rdi
movl $0x2d, %edx
movl %edx, %esi
callq 0x31ac0
jmp 0x3187b
movq -0x8(%rbp), %rax
movl 0xac(%rax), %eax
addl $-0x44, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x33, %eax
ja 0x318e7
movq -0x28(%rbp), %rax
leaq 0x2b82(%rip), %rcx      # 0x34420
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
callq 0x313f0
jmp 0x318e7
movq -0x8(%rbp), %rdi
callq 0x31420
jmp 0x318e7
movq -0x8(%rbp), %rdi
callq 0x31490
jmp 0x318e7
movq -0x8(%rbp), %rdi
callq 0x31c90
jmp 0x318e7
movq -0x8(%rbp), %rdi
callq 0x31cd0
jmp 0x318e7
movq -0x8(%rbp), %rdi
callq 0x31d60
movl $0x0, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
jmp 0x319a2
cmpl $0x0, -0x10(%rbp)
je 0x3193c
movq -0x8(%rbp), %rax
cmpl $0x62, 0xac(%rax)
jne 0x3191d
movq -0x8(%rbp), %rax
movl $0x8, 0xac(%rax)
jmp 0x3193a
movq -0x8(%rbp), %rax
cmpl $0x30, 0xac(%rax)
jne 0x31938
movq -0x8(%rbp), %rax
movl $0x0, 0xac(%rax)
jmp 0x3193a
jmp 0x3193c
cmpl $0x0, -0x14(%rbp)
je 0x3198c
cmpl $0x0, -0x18(%rbp)
je 0x3196e
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x8(%rbp), %rax
movl 0xac(%rax), %edx
callq 0x31ac0
movl $0x0, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
jmp 0x3198a
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x31ac0
movq -0x8(%rbp), %rax
movl 0xac(%rax), %eax
movl %eax, -0x1c(%rbp)
jmp 0x319a0
movq -0x8(%rbp), %rax
movl 0xac(%rax), %eax
movl %eax, -0x1c(%rbp)
movl $0x1, -0x14(%rbp)
jmp 0x319a2
jmp 0x319a4
movq -0x8(%rbp), %rdi
callq 0x30ef0
movl %eax, -0x10(%rbp)
jmp 0x31793
cmpl $0x0, -0x14(%rbp)
je 0x319e2
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x31ac0
cmpl $0x0, -0x18(%rbp)
je 0x319e0
movq -0x8(%rbp), %rdi
movl $0x2d, %edx
movl %edx, %esi
callq 0x31ac0
jmp 0x319e2
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)