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

	for (regExp = dfa; regExp != NULL; regExp = regExp->next) {
		if (regExp->transitions != NULL) {
			mState = NULL;
			transitions = NULL;
			tCount = CharSetSize();
			for (i = 0; i != tCount; 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) {
				if (tr->destination != mState && !SetMember(tr->destination, transitions)) {
					transitions = AddElement(tr->destination, transitions);
					for (tr2 = tr; tr2 != NULL; tr2 = tr2->next) {
						if (tr2->destination == tr->destination) {
							TREE node = FindNode(tokenSets, tr->destination->info, TokenSetCmp);
							if (node != NULL) {
								VerifyTokenOverlap(GetKey(node));
							}
						}
					}
				}
			}
			if (mState != NULL) {
				TREE node = FindNode(tokenSets, mState->info, TokenSetCmp);
				if (node != NULL) {
					VerifyTokenOverlap(GetKey(node));
				}
			}
			RemoveSet(transitions);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movq %rdi, -0x8(%rbp)
callq 0x11a70
movl %eax, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x240(%rbp)
cmpq $0x0, -0x240(%rbp)
je 0x7fa3
movq -0x240(%rbp), %rax
cmpq $0x0, (%rax)
je 0x7f8a
movq $0x0, -0x30(%rbp)
movq $0x0, -0x20(%rbp)
callq 0x11a70
movl %eax, -0x238(%rbp)
movl $0x0, -0x234(%rbp)
movl -0x234(%rbp), %eax
cmpl -0x238(%rbp), %eax
je 0x7d5e
movslq -0x234(%rbp), %rax
movw $0x0, -0x230(%rbp,%rax,2)
movl -0x234(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x234(%rbp)
jmp 0x7d2e
movq -0x240(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x7dbe
movq -0x10(%rbp), %rax
movslq (%rax), %rax
cmpw $0x0, -0x230(%rbp,%rax,2)
jne 0x7dae
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movslq (%rax), %rax
movw $0xffff, -0x230(%rbp,%rax,2) # imm = 0xFFFF
movl -0x238(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x238(%rbp)
jmp 0x7db0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x7d6c
movq -0x240(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x7e51
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x30(%rbp), %rax
je 0x7e3e
movl $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x7e22
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x7e12
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x7e14
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x7df0
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jle 0x7e3c
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x7e3e
jmp 0x7e40
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x7dcc
movq -0x240(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x7f38
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x30(%rbp), %rax
je 0x7f25
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x11e60
cmpw $0x0, %ax
jne 0x7f25
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x11cc0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x7f23
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x7f13
movq 0x18edc(%rip), %rdi     # 0x20db0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rsi
leaq 0xcc9(%rip), %rdx       # 0x8bb0
callq 0x10560
movq %rax, -0x248(%rbp)
cmpq $0x0, -0x248(%rbp)
je 0x7f11
movq -0x248(%rbp), %rdi
callq 0x10400
movq %rax, %rdi
callq 0x9200
jmp 0x7f13
jmp 0x7f15
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x7eb4
jmp 0x7f25
jmp 0x7f27
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x7e5f
cmpq $0x0, -0x30(%rbp)
je 0x7f81
movq 0x18e6a(%rip), %rdi     # 0x20db0
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0xc5b(%rip), %rdx       # 0x8bb0
callq 0x10560
movq %rax, -0x250(%rbp)
cmpq $0x0, -0x250(%rbp)
je 0x7f7f
movq -0x250(%rbp), %rdi
callq 0x10400
movq %rax, %rdi
callq 0x9200
jmp 0x7f81
movq -0x20(%rbp), %rdi
callq 0x11d90
jmp 0x7f8c
movq -0x240(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x240(%rbp)
jmp 0x7cea
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
nopl (%rax)