// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/regexp.c
// Function: DumpRegExp2
static void DumpRegExp2(RegExp regExp) {
	Transition tr, tr2;
	ESet transitions;
	int mCount = charSetSize, count;
	RegExp mState = NULL;
	Boolean cSet[256];
	int i, tCount;

	if (regExp->lastVisit != lastVisit) {
		regExp->lastVisit = lastVisit;
		printf("%lx: ", regExp->state.number);
		if (regExp->transitions != NULL) {
			transitions = NULL;
			tCount = charSetSize;
			for (i = 0; i != charSetSize; i++) cSet[i] = false;
			for (tr = regExp->transitions; tr != NULL; tr = tr->next) {
				if (!cSet[tr->transitionChar]) {
					mCount--;
					cSet[tr->transitionChar] = true;
					tCount--;
				}
			}
			/* mCount is nr. of fails, mState == NULL, the fail state */
			for (tr = regExp->transitions; tr != NULL; tr = tr->next) {
				if (tr->destination != mState) /* not the most efficient check, but ok */ {
					for (count = 0, tr2 = tr; tr2 != NULL; tr2 = tr2->next)
						if (tr2->destination == tr->destination) count++;
					if (count > mCount) {
						mCount = count;
						mState = tr->destination;
					}
				}
			}
			/* mCount is max. nr. of transitions to the same state, mState is that state */
			for (tr = regExp->transitions; tr != NULL; tr = tr->next) {
				/* Suppresses \0...\037 en \177...\377 */
				if (' ' <= tr->transitionChar && tr->transitionChar <= '~') {
					if (tr->destination != mState && !SetMember(tr->destination, transitions)) {
						transitions = AddElement(tr->destination, transitions);
						printf("{");
						for (tr2 = tr; tr2 != NULL; tr2 = tr2->next)
							if (tr2->destination == tr->destination && tr2->transitionChar >= ' ')
								fputc(tr2->transitionChar, stdout);
						printf("}->%lx ", tr->destination->state.number);
					}
				}
			}
			if (mState == NULL) {
				printf("otherwise fail ");
			} else {
				if (tCount != 0) {
					printf("{");
					for (i = 0; i != charSetSize; i++) {
						if (!cSet[i]) fputc(i, stdout);
					}
					printf("}->fail ");
				}
				printf("otherwise->%lx ", mState->state.number);
			}
			RemoveSet(transitions);
		}
		if (regExp->eTransitions != NULL) {
			printf("Eps:{");
			for (tr = regExp->eTransitions; tr != NULL; tr = tr->next) {
				printf("%lx", tr->destination->state.number);
				if (tr->next != NULL) putchar(',');
			}
			printf("}");
		}
		if (regExp->info != NULL) {
			ESet set = regExp->info;
			Answer first = set->element;
			while (set != NULL) {
				if (singleAnswer) {
					if (first->number > ((Answer) set->element)->number) {
						first = set->element;
					}
				} else {
					printf(" res='%d.%s'", ((Answer) set->element)->number, (const char*) ((Answer) set->element)->info);
				}
				set = set->next;
			}
			if (singleAnswer) {
				printf(" res='%s'", (const char*) first->info);
			}
		}
		putchar('\n');
		for (tr = regExp->transitions; tr != NULL; tr = tr->next) {
			DumpRegExp2(tr->destination);
		}
		for (tr = regExp->eTransitions; tr != NULL; tr = tr->next) {
			DumpRegExp2(tr->destination);
		}
	}
}

// Assembly:
movq 0xea69(%rip), %rax      # 0x1bce8
cmpq %rax, 0x20(%rdi)
je 0xd5b2
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rdi, %r12
movl 0xbfb9(%rip), %ebx      # 0x1925c
movq %rax, 0x20(%rdi)
movq 0x28(%rdi), %rsi
leaq 0x5e21(%rip), %rdi      # 0x130d3
xorl %eax, %eax
callq 0x30f0
movq (%r12), %r15
testq %r15, %r15
je 0xd4a2
movl 0xbf8f(%rip), %r13d     # 0x1925c
testq %r13, %r13
je 0xd2e6
leaq (,%r13,2), %rdx
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x3120
movq %r15, %rax
movslq (%rax), %rcx
cmpw $0x0, 0x10(%rsp,%rcx,2)
jne 0xd300
decl %ebx
movw $0xffff, 0x10(%rsp,%rcx,2) # imm = 0xFFFF
decl %r13d
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0xd2e9
movq %r12, 0x8(%rsp)
xorl %r12d, %r12d
movq %r15, %rax
movq 0x8(%rax), %rcx
cmpq %r12, %rcx
je 0xd343
xorl %edx, %edx
movq %rax, %rsi
xorl %edi, %edi
cmpq %rcx, 0x8(%rsi)
movq 0x10(%rsi), %r8
sete %dil
addl %edi, %edx
movq %r8, %rsi
testq %r8, %r8
jne 0xd322
cmpl %ebx, %edx
cmovgl %edx, %ebx
cmovgq %rcx, %r12
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0xd314
movq 0xbc55(%rip), %rbx      # 0x18fa8
xorl %r14d, %r14d
movl (%r15), %eax
addl $-0x20, %eax
cmpl $0x5e, %eax
ja 0xd3d1
movq 0x8(%r15), %rdi
cmpq %r12, %rdi
je 0xd3d1
testq %r14, %r14
je 0xd380
movq %r14, %rax
cmpq %rdi, (%rax)
je 0xd3d1
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0xd372
movq %r14, %rsi
callq 0xc874
movq %rax, %r14
movl $0x7b, %edi
callq 0x3040
movq %r15, %rbp
movq 0x8(%rbp), %rax
cmpq 0x8(%r15), %rax
jne 0xd3b2
movl (%rbp), %edi
cmpl $0x20, %edi
jl 0xd3b2
movq (%rbx), %rsi
callq 0x3130
movq 0x10(%rbp), %rbp
testq %rbp, %rbp
jne 0xd398
movq 0x8(%r15), %rax
movq 0x28(%rax), %rsi
leaq 0x5d0f(%rip), %rdi      # 0x130d9
xorl %eax, %eax
callq 0x30f0
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0xd356
testq %r12, %r12
je 0xd446
testl %r13d, %r13d
je 0xd431
movl $0x7b, %edi
callq 0x3040
movl 0xbe64(%rip), %eax      # 0x1925c
testl %eax, %eax
je 0xd423
xorl %r15d, %r15d
cmpw $0x0, 0x10(%rsp,%r15,2)
jne 0xd419
movq (%rbx), %rsi
movl %r15d, %edi
callq 0x3130
movl 0xbe43(%rip), %eax      # 0x1925c
incq %r15
movl %eax, %ecx
cmpq %rcx, %r15
jne 0xd3ff
leaq 0x5cc7(%rip), %rdi      # 0x130f1
xorl %eax, %eax
callq 0x30f0
movq 0x28(%r12), %rsi
leaq 0x5cbd(%rip), %rdi      # 0x130fa
xorl %eax, %eax
callq 0x30f0
jmp 0xd454
leaq 0x5c94(%rip), %rdi      # 0x130e1
xorl %eax, %eax
callq 0x30f0
testq %r14, %r14
movq 0x8(%rsp), %r12
je 0xd4a2
movq 0xe833(%rip), %rax      # 0x1bc98
movq 0xe83c(%rip), %rcx      # 0x1bca8
movq 0xe855(%rip), %rdx      # 0x1bcc8
movq %rdx, %rsi
movq %r14, %rdx
movq 0x8(%r14), %r14
movq %rsi, 0x8(%rdx)
incq %rcx
addq $0x10, %rax
testq %r14, %r14
jne 0xd473
movq %rdx, 0xe834(%rip)      # 0x1bcc8
movq %rcx, 0xe80d(%rip)      # 0x1bca8
movq %rax, 0xe7f6(%rip)      # 0x1bc98
cmpq $0x0, 0x8(%r12)
je 0xd4ff
leaq 0x5c59(%rip), %rdi      # 0x1310a
xorl %eax, %eax
callq 0x30f0
movq 0x8(%r12), %rbx
testq %rbx, %rbx
je 0xd4f5
leaq 0x5c47(%rip), %r14      # 0x13110
movq 0x8(%rbx), %rax
movq 0x28(%rax), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x30f0
cmpq $0x0, 0x10(%rbx)
je 0xd4f5
movl $0x2c, %edi
callq 0x3040
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
jne 0xd4c9
movl $0x7d, %edi
callq 0x3040
movq 0x10(%r12), %r15
testq %r15, %r15
je 0xd566
movq (%r15), %rbx
movzwl 0xe7c5(%rip), %eax      # 0x1bcd8
leaq 0x5bfa(%rip), %r14      # 0x13114
testw %ax, %ax
je 0xd52c
movl (%rbx), %ecx
movq (%r15), %rdx
cmpl (%rdx), %ecx
cmovgq %rdx, %rbx
jmp 0xd546
movq (%r15), %rax
movl (%rax), %esi
movq 0x8(%rax), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x30f0
movzwl 0xe792(%rip), %eax      # 0x1bcd8
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0xd51a
testw %ax, %ax
je 0xd566
movq 0x8(%rbx), %rsi
leaq 0x5bc2(%rip), %rdi      # 0x13121
xorl %eax, %eax
callq 0x30f0
movl $0xa, %edi
callq 0x3040
movq (%r12), %rbx
testq %rbx, %rbx
je 0xd588
movq 0x8(%rbx), %rdi
callq 0xd278
movq 0x10(%rbx), %rbx
jmp 0xd574
movq 0x8(%r12), %rbx
testq %rbx, %rbx
je 0xd5a1
movq 0x8(%rbx), %rdi
callq 0xd278
movq 0x10(%rbx), %rbx
jmp 0xd58d
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq