// File: /workspace/github_c_makefile_star2_O1/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 0x44ce
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xccf4(%rip), %r13      # 0x11020
leaq 0xf314(%rip), %r15      # 0x13647
leaq 0xcea3(%rip), %rbp      # 0x111dd
leaq 0xeb3e(%rip), %r12      # 0x12e7f
movl 0x4(%rbx), %edx
cmpq $0x6, %rdx
ja 0x44dd
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 0x44a7
leaq 0xce46(%rip), %rsi      # 0x111b9
jmp 0x44ae
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3110
movq 0x18(%rbx), %r15
testq %r15, %r15
je 0x43c9
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3110
movq (%r15), %rsi
movq %r14, %rdi
callq 0x430b
movq %r12, %rdi
movq %r14, %rsi
callq 0x3110
cmpq $0x0, 0x8(%r15)
je 0x43c3
leaq 0xd84b(%rip), %rdi      # 0x11c06
movq %r14, %rsi
callq 0x3110
movq 0x8(%r15), %r15
jmp 0x4387
movq %r12, %rdi
movq %r14, %rsi
callq 0x3110
leaq 0xf26c(%rip), %r15      # 0x13647
jmp 0x44b5
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3110
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x430b
leaq 0xcdcc(%rip), %rdi      # 0x111ca
jmp 0x4461
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3110
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rsi
movq %r14, %rdi
callq 0x430b
leaq 0xcdb3(%rip), %rdi      # 0x111d5
movq %r14, %rsi
callq 0x3110
movq 0x18(%rbx), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rsi
movq %r14, %rdi
callq 0x430b
movq %r12, %rdi
jmp 0x4461
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3110
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x430b
leaq 0xcd60(%rip), %rdi      # 0x111c1
movq %r14, %rsi
callq 0x3110
jmp 0x44b5
movq 0x18(%rbx), %rax
movq (%rax), %rdx
movq %r14, %rdi
leaq 0xcd63(%rip), %rsi      # 0x111df
jmp 0x44ae
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 0xcd4d(%rip), %rsi      # 0x111eb
xorl %eax, %eax
callq 0x3160
jmp 0x44b5
leaq 0xf2aa(%rip), %rsi      # 0x13758
xorl %eax, %eax
callq 0x3160
movq 0x28(%rbx), %rbx
testq %rbx, %rbx
je 0x44ce
movq %r15, %rdi
movq %r14, %rsi
callq 0x3110
jmp 0x4341
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x14b14(%rip), %rax     # 0x18ff8
movq (%rax), %rdi
leaq 0xcd0c(%rip), %rsi      # 0x111fa
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3160