// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/regexp.c
// Function: MatchNFA2
ESet MatchNFA2(RegExp regExp, char *line) {
	Boolean *sptr;
	Boolean *optr;
	RegExp *stptr;
	ESet answers = NULL;
	Transition tr;
	int i;
	Boolean changes;

	for (sptr = stateState, i = 0; i != globStateNr; i++) {
		*sptr++ = false;
	}
	/* Take eTransitions */
	memcpy(oStates, stateState, globStateNr * sizeof(Boolean));
	stateState[0] = true;
	do {
		changes = false;
		for (i = 0, sptr = stateState, optr = oStates, stptr = state; i != globStateNr; i++, sptr++, optr++, stptr++) {
			if (*sptr && !*optr) {
				*optr = true;
				for (tr = (*stptr)->eTransitions; tr != NULL; tr = tr->next) {
					if (!stateState[tr->destination->state.number]) {
						changes = true;
						stateState[tr->destination->state.number] = true;
					}
				}
			}
		}
	}
	while (changes);
	while (*line != '\0') {
		/* Take transitions */
		changes = false;
		memcpy(oStates, stateState, globStateNr * sizeof(Boolean));
		for (sptr = stateState, i = 0; i != globStateNr; i++) *sptr++ = false;
		for (i = 0, optr = oStates, stptr = state; i != globStateNr; i++, optr++, stptr++) {
			if (*optr) {
				for (tr = (*stptr)->transitions; tr != NULL; tr = tr->next) {
					if (tr->transitionChar == ((int) *line & 0xFF)) {
						changes = true;
						stateState[tr->destination->state.number] = true;
					}
				}
			}
		}
		if (!changes) {
			return (NULL);
		}
		/* Take eTransitions */
		memcpy(oStates, stateState, globStateNr * sizeof(Boolean));
		stateState[0] = true;
		do {
			changes = false;
			for (i = 0, sptr = stateState, optr = oStates, stptr = state; i != globStateNr; i++, sptr++, optr++, stptr++) {
				if (*sptr && !*optr) {
					*optr = true;
					for (tr = (*stptr)->eTransitions; tr != NULL; tr = tr->next) {
						if (!stateState[tr->destination->state.number]) {
							changes = true;
							stateState[tr->destination->state.number] = true;
						}
					}
				}
			}
		}
		while (changes);
		line++;
	}
	for (sptr = stateState, stptr = state, i = 0; i != globStateNr; i++, stptr++) {
		if (*sptr++ && (*stptr)->info != NULL) {
			((ESet) ((*stptr)->info))->next = answers;
			answers = (ESet) ((*stptr)->info);
		}
	}
	return (answers);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq 0xed38(%rip), %rbx      # 0x1bd08
movslq 0xed21(%rip), %r12      # 0x1bcf8
movl %r12d, %ebp
testq %r12, %r12
je 0xcff1
leaq (,%rbp,2), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3120
movq 0xed18(%rip), %r15      # 0x1bd10
leaq (%r12,%r12), %rdx
movq %r15, %rdi
movq %rbx, %rsi
movq %rdx, (%rsp)
callq 0x3170
movw $0xffff, (%rbx)         # imm = 0xFFFF
movq 0xecd9(%rip), %r13      # 0x1bcf0
testq %rbp, %rbp
je 0xd095
xorl %eax, %eax
xorl %ecx, %ecx
movq %r13, %rdx
movq %r15, %rsi
movq %rbx, %rdi
cmpw $0x0, (%rdi)
je 0xd035
cmpw $0x0, (%rsi)
je 0xd063
incl %ecx
addq $0x2, %rdi
addq $0x2, %rsi
addq $0x8, %rdx
cmpl %r12d, %ecx
jne 0xd029
testw %ax, %ax
je 0xd095
xorl %eax, %eax
movl $0x0, %ecx
movq %r13, %rdx
movq %r15, %rsi
movq %rbx, %rdi
testl %ebp, %ebp
jne 0xd029
jmp 0xd095
movw $0xffff, (%rsi)         # imm = 0xFFFF
movq (%rdx), %r8
movq 0x8(%r8), %r8
testq %r8, %r8
je 0xd035
movq 0x8(%r8), %r9
movq 0x28(%r9), %r9
cmpw $0x0, (%rbx,%r9,2)
jne 0xd08f
movw $0xffff, (%rbx,%r9,2)   # imm = 0xFFFF
movw $0xffff, %ax            # imm = 0xFFFF
movq 0x10(%r8), %r8
jmp 0xd06f
cmpb $0x0, (%r14)
je 0xd1c9
leaq (,%rbp,2), %rax
movq %rax, 0x10(%rsp)
movq %r12, 0x8(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movq (%rsp), %rdx
callq 0x3170
testl %r12d, %r12d
je 0xd1fd
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
movq 0x10(%rsp), %rdx
callq 0x3120
xorl %eax, %eax
movq %r13, %rcx
movq %r15, %rdx
cmpw $0x0, (%rdx)
je 0xd115
movq (%rcx), %rsi
movq (%rsi), %rsi
testq %rsi, %rsi
je 0xd115
movzbl (%r14), %edi
cmpl %edi, (%rsi)
jne 0xd10f
movq 0x8(%rsi), %rdi
movq 0x28(%rdi), %rdi
movw $0xffff, (%rbx,%rdi,2)  # imm = 0xFFFF
movw $0xffff, %r12w          # imm = 0xFFFF
movq 0x10(%rsi), %rsi
jmp 0xd0ef
incl %eax
addq $0x2, %rdx
addq $0x8, %rcx
cmpl %ebp, %eax
jne 0xd0e3
testw %r12w, %r12w
je 0xd1fd
movq %r15, %rdi
movq %rbx, %rsi
movq (%rsp), %rdx
callq 0x3170
movw $0xffff, (%rbx)         # imm = 0xFFFF
xorl %eax, %eax
xorl %ecx, %ecx
movq %r13, %rdx
movq %r15, %rsi
movq %rbx, %rdi
movq 0x8(%rsp), %r12
cmpw $0x0, (%rdi)
je 0xd15f
cmpw $0x0, (%rsi)
je 0xd188
incl %ecx
addq $0x2, %rdi
addq $0x2, %rsi
addq $0x8, %rdx
cmpl %ebp, %ecx
jne 0xd153
xorl %ecx, %ecx
movq %r13, %rdx
movq %r15, %rsi
movq %rbx, %rdi
testw %ax, %ax
movl $0x0, %eax
jne 0xd153
jmp 0xd1ba
movw $0xffff, (%rsi)         # imm = 0xFFFF
movq (%rdx), %r8
movq 0x8(%r8), %r8
testq %r8, %r8
je 0xd15f
movq 0x8(%r8), %r9
movq 0x28(%r9), %r9
cmpw $0x0, (%rbx,%r9,2)
jne 0xd1b4
movw $0xffff, (%rbx,%r9,2)   # imm = 0xFFFF
movw $0xffff, %ax            # imm = 0xFFFF
movq 0x10(%r8), %r8
jmp 0xd194
cmpb $0x0, 0x1(%r14)
leaq 0x1(%r14), %r14
jne 0xd0b1
testq %rbp, %rbp
je 0xd1fd
xorl %edx, %edx
xorl %eax, %eax
cmpw $0x0, (%rbx,%rdx,2)
je 0xd1f4
movq (%r13,%rdx,8), %rcx
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
je 0xd1f4
movq %rax, 0x8(%rcx)
movq (%r13,%rdx,8), %rcx
movq 0x10(%rcx), %rax
incq %rdx
cmpl %edx, %ebp
jne 0xd1d2
jmp 0xd1ff
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq