// File: /workspace/github_c_makefile_star2_O0/haxlang[P]hax/haxRegexp.c
// Function: RegPiece
static char *
RegPiece(
Hax_Interp *interp,
int *flagp)
{
	Interp *iPtr = (Interp *) interp;
	char *ret;
	char op;
	char *next;
	int flags;

	ret = RegAtom(interp, &flags);
	if (ret == NULL)
		return(NULL);

	op = *iPtr->regparse;
	if (!ISMULT(op)) {
		*flagp = flags;
		return(ret);
	}

	if (!(flags&HASWIDTH) && op != '?')
		FAIL((char *) "*+ operand could be empty");
	*flagp = (op != '+') ? (WORST|SPSTART) : (WORST|HASWIDTH);

	if (op == '*' && (flags&SIMPLE))
		RegInsert(interp, STAR, ret);
	else if (op == '*') {
		/* Emit x* as (x&|), where & means "self". */
		RegInsert(interp, BRANCH, ret);			/* Either x */
		RegOpTail(interp, ret, RegNode(interp, BACK));		/* and loop */
		RegOpTail(interp, ret, ret);			/* back */
		RegTail(interp, ret, RegNode(interp, BRANCH));		/* or */
		RegTail(interp, ret, RegNode(interp, NOTHING));		/* null. */
	} else if (op == '+' && (flags&SIMPLE))
		RegInsert(interp, PLUS, ret);
	else if (op == '+') {
		/* Emit x+ as x(&|), where & means "self". */
		next = RegNode(interp, BRANCH);			/* Either */
		RegTail(interp, ret, next);
		RegTail(interp, RegNode(interp, BACK), ret);		/* loop back */
		RegTail(interp, next, RegNode(interp, BRANCH));		/* or */
		RegTail(interp, ret, RegNode(interp, NOTHING));		/* null. */
	} else if (op == '?') {
		/* Emit x? as (x|) */
		RegInsert(interp, BRANCH, ret);			/* Either x */
		RegTail(interp, ret, RegNode(interp, BRANCH));		/* or */
		next = RegNode(interp, NOTHING);		/* null. */
		RegTail(interp, ret, next);
		RegOpTail(interp, ret, next);
	}
	iPtr->regparse++;
	if (ISMULT(*iPtr->regparse))
		FAIL((char *) "nested *?+");

	return(ret);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0x57c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x5430
movq $0x0, -0x8(%rbp)
jmp 0x57a4
movq -0x20(%rbp), %rax
movq 0x298(%rax), %rax
movb (%rax), %al
movb %al, -0x29(%rbp)
movsbl -0x29(%rbp), %eax
cmpl $0x2a, %eax
je 0x5471
movsbl -0x29(%rbp), %eax
cmpl $0x2b, %eax
je 0x5471
movsbl -0x29(%rbp), %eax
cmpl $0x3f, %eax
je 0x5471
movl -0x3c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x57a4
movl -0x3c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x54a4
movsbl -0x29(%rbp), %eax
cmpl $0x3f, %eax
je 0x54a4
jmp 0x5487
movq -0x10(%rbp), %rdi
leaq 0x17ca2(%rip), %rsi     # 0x1d134
callq 0x4200
movq $0x0, -0x8(%rbp)
jmp 0x57a4
movsbl -0x29(%rbp), %edx
movl $0x1, %ecx
movl $0x4, %eax
cmpl $0x2b, %edx
cmovnel %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movsbl -0x29(%rbp), %eax
cmpl $0x2a, %eax
jne 0x54e9
movl -0x3c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x54e9
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl $0xa, %esi
callq 0x5d50
jmp 0x5731
movsbl -0x29(%rbp), %eax
cmpl $0x2a, %eax
jne 0x55a8
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl $0x6, %esi
callq 0x5d50
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
movl $0x7, %esi
callq 0x50f0
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq %rax, %rdx
callq 0x5390
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x5390
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
movl $0x6, %esi
callq 0x50f0
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq %rax, %rdx
callq 0x52d0
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movl $0x9, %esi
callq 0x50f0
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq %rax, %rdx
callq 0x52d0
jmp 0x572f
movsbl -0x29(%rbp), %eax
cmpl $0x2b, %eax
jne 0x55d3
movl -0x3c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x55d3
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl $0xb, %esi
callq 0x5d50
jmp 0x572d
movsbl -0x29(%rbp), %eax
cmpl $0x2b, %eax
jne 0x569c
movq -0x10(%rbp), %rdi
movl $0x6, %esi
callq 0x50f0
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x52d0
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rdi
movl $0x7, %esi
callq 0x50f0
movq -0x98(%rbp), %rdi
movq %rax, %rsi
movq -0x28(%rbp), %rdx
callq 0x52d0
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rdi
movl $0x6, %esi
callq 0x50f0
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq %rax, %rdx
callq 0x52d0
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
movl $0x9, %esi
callq 0x50f0
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq %rax, %rdx
callq 0x52d0
jmp 0x572b
movsbl -0x29(%rbp), %eax
cmpl $0x3f, %eax
jne 0x5729
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl $0x6, %esi
callq 0x5d50
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rdi
movl $0x6, %esi
callq 0x50f0
movq -0xa8(%rbp), %rdi
movq -0xa0(%rbp), %rsi
movq %rax, %rdx
callq 0x52d0
movq -0x10(%rbp), %rdi
movl $0x9, %esi
callq 0x50f0
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x52d0
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x5390
jmp 0x572b
jmp 0x572d
jmp 0x572f
jmp 0x5731
movq -0x20(%rbp), %rax
movq 0x298(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x298(%rax)
movq -0x20(%rbp), %rax
movq 0x298(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
je 0x5780
movq -0x20(%rbp), %rax
movq 0x298(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
je 0x5780
movq -0x20(%rbp), %rax
movq 0x298(%rax), %rax
movsbl (%rax), %eax
cmpl $0x3f, %eax
jne 0x579c
jmp 0x5782
movq -0x10(%rbp), %rdi
leaq 0x179c1(%rip), %rsi     # 0x1d14e
callq 0x4200
movq $0x0, -0x8(%rbp)
jmp 0x57a4
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)