// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/llgen.c
// Function: PrintRule2
void PrintRule2(FILE *f, Node rule) {
	NodeList rules;

	while (rule != NULL) {
		switch (rule->nodeType) {
			case single:
				switch (rule->element.name->nameType) {
					case code: fprintf(f, " { %s }", rule->element.name->name); break;
					default: fprintf(f, " %s", rule->element.name->name); break;
				}
				break;
			case option:
				fputs("(", f);
				PrintRule2(f, rule->element.sub);
				fputs(") OPTION", f);
				break;
			case sequence:
				fputs("(", f);
				PrintRule2(f, rule->element.sub);
				fputs(") SEQUENCE", f);
				break;
			case chain:
				fputs("(", f);
				PrintRule2(f, rule->element.sub->element.sub);
				fputs(") CHAIN (", f);
				PrintRule2(f, rule->element.sub->next->element.sub);
				fputs(")", f);
				break;
			case alternative: /* Try each one... */
				fputs("(", f);
				for (rules = rule->element.alternatives; rules != NULL; rules = rules->rest) {
					fputs("(", f);
					PrintRule2(f, rules->first);
					fputs(")", f);
					if (rules->rest != NULL) {
						fputs(";", f);
					}
				}
				fputs(")", f);
				break;
			case breakToken:
				fprintf(f, "ON %s BREAK", rule->element.name->name);
				break;
			case errorMessage:
				fprintf(f, "ON %s BREAK %s", rule->element.sub->element.name->name, rule->element.sub->next->element.name->name);
				break;
			default:
				fprintf(stderr, "DetermineFollowRule: unknown nodetype %d", rule->nodeType);
				return;
		}
		rule = rule->next;
		if (rule != NULL) {
			fputs(",", f);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x4459
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xcd69(%rip), %r13      # 0x11020
leaq 0xf389(%rip), %r15      # 0x13647
leaq 0xcf18(%rip), %rbp      # 0x111dd
leaq 0xebb3(%rip), %r12      # 0x12e7f
movl 0x4(%rbx), %edx
cmpq $0x6, %rdx
ja 0x4468
movslq (%r13,%rdx,4), %rax
addq %r13, %rax
jmpq *%rax
movq 0x18(%rbx), %rax
cmpl $0x3, 0x38(%rax)
movq (%rax), %rdx
movq %r14, %rdi
jne 0x4432
leaq 0xcebb(%rip), %rsi      # 0x111b9
jmp 0x4439
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3110
movq 0x18(%rbx), %r15
testq %r15, %r15
je 0x4354
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3110
movq (%r15), %rsi
movq %r14, %rdi
callq 0x4296
movq %r12, %rdi
movq %r14, %rsi
callq 0x3110
cmpq $0x0, 0x8(%r15)
je 0x4354
leaq 0xd8b8(%rip), %rdi      # 0x11bfe
movq %r14, %rsi
callq 0x3110
movq 0x8(%r15), %r15
jmp 0x4312
movq %r12, %rdi
movq %r14, %rsi
callq 0x3110
leaq 0xf2e1(%rip), %r15      # 0x13647
jmp 0x4440
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3110
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x4296
leaq 0xce41(%rip), %rdi      # 0x111ca
jmp 0x43ec
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3110
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rsi
movq %r14, %rdi
callq 0x4296
leaq 0xce28(%rip), %rdi      # 0x111d5
movq %r14, %rsi
callq 0x3110
movq 0x18(%rbx), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rsi
movq %r14, %rdi
callq 0x4296
movq %r12, %rdi
jmp 0x43ec
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3110
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x4296
leaq 0xcdd5(%rip), %rdi      # 0x111c1
movq %r14, %rsi
callq 0x3110
jmp 0x4440
movq 0x18(%rbx), %rax
movq (%rax), %rdx
movq %r14, %rdi
leaq 0xcdd8(%rip), %rsi      # 0x111df
jmp 0x4439
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rcx
movq 0x28(%rax), %rax
movq (%rcx), %rdx
movq 0x18(%rax), %rax
movq (%rax), %rcx
movq %r14, %rdi
leaq 0xcdc2(%rip), %rsi      # 0x111eb
xorl %eax, %eax
callq 0x3160
jmp 0x4440
leaq 0xf31f(%rip), %rsi      # 0x13758
xorl %eax, %eax
callq 0x3160
movq 0x28(%rbx), %rbx
testq %rbx, %rbx
je 0x4459
movq %r15, %rdi
movq %r14, %rsi
callq 0x3110
jmp 0x42cc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x14b89(%rip), %rax     # 0x18ff8
movq (%rax), %rdi
leaq 0xcd81(%rip), %rsi      # 0x111fa
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3160