// File: /workspace/github_c_makefile_star2_O2/theovosse[P]llgen/llgen.c
// Function: PrintAlternatives
static void PrintAlternatives(Name ruleName, NodeList pRules, Boolean emptyToEndOfRule, TREE follow, int indent, const char *errormsg, const char* errorargs, Boolean generateCode, TREE firstNext, Boolean *usesLA, int startLineNr) {
	int cnt = 0;
	TREE firsts = NULL;
	TREE common;
	TREE symbols = NULL;
	NodeList rules;
	Node rule;
	Boolean printError = true;

	if (pRules == NULL) {
		yyerror("error in grammar: %s not defined!\n", errormsg);
		return;
	}
	rule = pRules->first;
	if (pRules != NULL && pRules->rest == NULL) {
		GenerateRule(ruleName, rule, emptyToEndOfRule, follow, indent, generateCode, false, firstNext, usesLA);
	} else {
		Boolean empty = false, empty1;
		for (rules = pRules; rules != NULL; rules = rules->rest) {
			firsts = NULL;
			if (rules->rest != NULL || !(rules->first == NULL || rules->first->empty)) {
				empty1 = collectFirst(&firsts, follow, rules->first);
				if (empty1) {
					if (empty) {
						if (generateCode) {
							fputs("/* Not an LL(1)-grammar (more than one empty) */\n", outputFile);
						} else if (rules->first == NULL) {
							fprintf(stderr, "%s:%d: error: not an LL(1)-grammar:more than one empty\n", inputFileName, pRules->first->lineNr);
						} else {
							fprintf(stderr, "%s:%d: error: not an LL(1)-grammar: more than one empty\n", inputFileName, rules->first->lineNr);
						}
						notLLError = true;
					}
					empty = true;
				}
				if (generateCode) {
					if (bracesOnNewLine || cnt == 0) {
						doIndent(indent);
					} else if (!bracesOnNewLine) {
						fputs(" ", outputFile);
					}
				}
				PrintFirstSymbols(firsts, (cnt == 0? ifCondition: elseIfCondition), indent, true, generateCode, &symbols, (rules->first == NULL? startLineNr: rules->first->lineNr), empty1, usesLA);
				if (generateCode) {
					startBlock(indent);
				}
				common = NULL; // !!! Intersection(firsts, oneOf);
				GenerateRule(ruleName, rules->first, emptyToEndOfRule, follow, indent + 1,
							 generateCode, false, firstNext, usesLA);
				KillTree(firsts, NULL);
				KillTree(common, NULL);
				cnt++;
				if (generateCode) {
					terminateBlock(indent);
				}
			} else {
				// Don't generate a condition, but always take this path; if there
				// is a wrong symbol, it will be skipped by the elements.
				printError = false;
				if (generateCode) {
					if (cnt != 0) {
						if (bracesOnNewLine) {
							doIndent(indent);
						} else {
							fputs(" ", outputFile);
						}
						fputs("else", outputFile);
						startBlock(indent);
					}
					GenerateRule(ruleName, rules->first, emptyToEndOfRule, follow, (cnt == 0? indent: indent + 1), generateCode, false, firstNext, usesLA);
					if (cnt != 0) {
						terminateBlock(indent);
					}
				}
			}
		}
		if (generateCode && printError) {
			if (cnt == 0) {
				fprintf(stderr, "error in grammar: no alternatives for %s!\n", errormsg);
				doIndent(indent);
				fputs("/* NO ALTERNATIVES! */\n", outputFile);
			}
            if (bracesOnNewLine) {
                doIndent(indent);
            } else {
                fputs(" ", outputFile);
            }
            fputs("else", outputFile);
			startBlock(indent);
			doIndent(indent + 1);
            fprintf(outputFile, "%s(%s\"%s\"%s)%s", targetLanguage->errorReporter, targetLanguage->errorReporterArg, errormsg, errorargs, targetLanguage->terminateStatement);
			terminateBlock(indent);
		}
		KillTree(symbols, NULL);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, 0x20(%rsp)
movl 0xc0(%rsp), %eax
movl %eax, 0x44(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x30(%rsp)
movzwl 0xa8(%rsp), %ebp
movq 0xa0(%rsp), %rax
andq $0x0, 0x38(%rsp)
andq $0x0, 0x48(%rsp)
testq %rsi, %rsi
je 0x74c7
movl %r8d, %ebx
movq %rcx, %r12
cmpq $0x0, 0x8(%rsi)
movswl %dx, %edx
movswl %bp, %r14d
je 0x74e6
movl %edx, 0x14(%rsp)
movq %rax, 0x58(%rsp)
movq %r9, 0x60(%rsp)
leal 0x1(%rbx), %eax
movl %eax, 0x10(%rsp)
movw $0xffff, %ax            # imm = 0xFFFF
movl %eax, 0xc(%rsp)
movq %rsi, 0x50(%rsp)
movq %rsi, %r15
movq $0x0, 0x18(%rsp)
xorl %r13d, %r13d
movw %bp, 0xa(%rsp)
testq %r15, %r15
je 0x7487
andq $0x0, 0x38(%rsp)
cmpq $0x0, 0x8(%r15)
movq (%r15), %rdx
je 0x7261
leaq 0x38(%rsp), %rdi
movq %r12, %rsi
callq 0x6378
testw %ax, %ax
je 0x729e
cmpw $0x0, 0x18(%rsp)
je 0x7295
testw %bp, %bp
je 0x738f
movq 0x1189e(%rip), %rsi     # 0x18ae8
leaq 0x95df(%rip), %rdi      # 0x10830
callq 0x3110
movw $0xffff, %ax            # imm = 0xFFFF
movq %rax, 0x18(%rsp)
jmp 0x72a7
testq %rdx, %rdx
je 0x726d
cmpw $0x0, 0x22(%rdx)
je 0x7220
testw %bp, %bp
je 0x7382
testl %r13d, %r13d
je 0x72e2
cmpw $0x0, 0x11889(%rip)     # 0x18b0c
je 0x731f
movl %ebx, %edi
callq 0x39c6
jmp 0x7332
movw $0xffff, %ax            # imm = 0xFFFF
movq %rax, 0x18(%rsp)
testw %bp, %bp
je 0x73d6
cmpw $0x0, 0x1185d(%rip)     # 0x18b0c
setne %al
testl %r13d, %r13d
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x72c8
movl %ebx, %edi
callq 0x39c6
jmp 0x72db
movq 0x11819(%rip), %rsi     # 0x18ae8
leaq 0x93cc(%rip), %rdi      # 0x106a2
callq 0x3110
xorl %ebp, %ebp
jmp 0x73d9
subq $0x8, %rsp
movq 0x28(%rsp), %rdi
movq %rdx, %rsi
movl 0x1c(%rsp), %edx
movq %r12, %rcx
movl %ebx, %r8d
pushq $-0x1
popq %r9
pushq 0x30(%rsp)
pushq 0x40(%rsp)
pushq $0x0
callq 0x75df
addq $0x20, %rsp
movl $0x0, 0xc(%rsp)
xorl %r13d, %r13d
jmp 0x747e
movq 0x117c2(%rip), %rsi     # 0x18ae8
leaq 0x9375(%rip), %rdi      # 0x106a2
callq 0x3110
movq 0x117af(%rip), %rsi     # 0x18ae8
leaq 0x9593(%rip), %rdi      # 0x108d3
callq 0x3110
movl %ebx, %edi
callq 0x3a00
movq (%r15), %rsi
subq $0x8, %rsp
movq 0x28(%rsp), %rdi
movl 0x1c(%rsp), %edx
movq %r12, %rcx
movl 0x18(%rsp), %r8d
pushq $-0x1
popq %r9
pushq 0x30(%rsp)
pushq 0x40(%rsp)
pushq $0x0
callq 0x75df
addq $0x20, %rsp
movl %ebx, %edi
callq 0x3a30
movl $0x0, 0xc(%rsp)
jmp 0x747e
movq (%r15), %rax
movq 0x10c5f(%rip), %rcx     # 0x17ff8
movq (%rcx), %rdi
movq 0x10de5(%rip), %rdx     # 0x18188
testq %rax, %rax
jne 0x73bc
movq 0x50(%rsp), %rax
movq (%rax), %rax
movswl (%rax), %ecx
leaq 0x94a8(%rip), %rsi      # 0x10862
jmp 0x73c6
movswl (%rax), %ecx
leaq 0x94d4(%rip), %rsi      # 0x1089a
xorl %eax, %eax
callq 0x3150
movw $0xffff, %ax            # imm = 0xFFFF
movq %rax, 0x18(%rsp)
movb $0x1, %bpl
testl %r13d, %r13d
leaq 0x1891(%rip), %rsi      # 0x8c74
leaq 0x1867(%rip), %rax      # 0x8c51
cmoveq %rax, %rsi
movq 0x38(%rsp), %rdi
movq (%r15), %rcx
movl 0x44(%rsp), %eax
testq %rcx, %rcx
je 0x7402
movswl (%rcx), %eax
subq $0x8, %rsp
movl %ebx, %edx
pushq $-0x1
popq %rcx
movl %r14d, %r8d
leaq 0x50(%rsp), %r9
pushq %rax
callq 0x8a79
popq %rax
popq %rcx
testb %bpl, %bpl
jne 0x7427
movl %ebx, %edi
callq 0x3a00
movq (%r15), %rsi
subq $0x8, %rsp
movq 0x28(%rsp), %rdi
movl 0x1c(%rsp), %edx
movq %r12, %rcx
movl 0x18(%rsp), %r8d
movl %r14d, %r9d
pushq 0x30(%rsp)
pushq 0x40(%rsp)
pushq $0x0
callq 0x75df
addq $0x20, %rsp
movq 0x38(%rsp), %rdi
xorl %esi, %esi
callq 0xb397
xorl %edi, %edi
xorl %esi, %esi
callq 0xb397
incl %r13d
testb %bpl, %bpl
jne 0x7479
movl %ebx, %edi
callq 0x3a30
movzwl 0xa(%rsp), %ebp
movq 0x8(%r15), %r15
jmp 0x7207
testw %bp, %bp
setne %al
cmpw $0x0, 0xc(%rsp)
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x758a
testl %r13d, %r13d
movq 0x60(%rsp), %r14
je 0x75a5
cmpw $0x0, 0x11655(%rip)     # 0x18b0c
movq 0x58(%rsp), %r15
je 0x7516
movl %ebx, %edi
callq 0x39c6
jmp 0x7529
leaq 0x933f(%rip), %rdi      # 0x1080d
movq %r9, %rsi
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x358b
movq (%rsi), %rsi
subq $0x8, %rsp
movq 0x28(%rsp), %rdi
movq %r12, %rcx
movl %ebx, %r8d
movl %r14d, %r9d
pushq 0x30(%rsp)
pushq 0x40(%rsp)
pushq $0x0
callq 0x75df
addq $0x88, %rsp
jmp 0x759a
movq 0x115cb(%rip), %rsi     # 0x18ae8
leaq 0x917e(%rip), %rdi      # 0x106a2
callq 0x3110
movq 0x115b8(%rip), %rsi     # 0x18ae8
leaq 0x939c(%rip), %rdi      # 0x108d3
callq 0x3110
movl %ebx, %edi
callq 0x3a00
movl 0x10(%rsp), %edi
callq 0x39c6
movq 0x11595(%rip), %rdi     # 0x18ae8
movq 0x10c26(%rip), %r10     # 0x18180
movq 0x18(%r10), %rdx
movq 0x20(%r10), %rcx
subq $0x8, %rsp
leaq 0x93ae(%rip), %rsi      # 0x1091b
movq %r14, %r8
movq %r15, %r9
xorl %eax, %eax
pushq 0x80(%r10)
callq 0x3150
popq %rcx
popq %rdx
movl %ebx, %edi
callq 0x3a30
movq 0x48(%rsp), %rdi
xorl %esi, %esi
callq 0xb397
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10a4c(%rip), %rax     # 0x17ff8
movq (%rax), %rdi
leaq 0x9322(%rip), %rsi      # 0x108d8
movq %r14, %rdx
xorl %eax, %eax
callq 0x3150
movl %ebx, %edi
callq 0x39c6
movq 0x1151a(%rip), %rsi     # 0x18ae8
leaq 0x932e(%rip), %rdi      # 0x10903
callq 0x3110
jmp 0x74af