// File: /workspace/github_c_makefile_star2_O0/theovosse[P]llgen/llgen.c
// Function: InterpretLine
static void InterpretLine(char *str) {
	while (*str != '\0') {
		switch (*str) {
			case '%':
				str++;
                switch (*str) {
                    case 'S':
                        str++;
                        fputs(startSymbol->name, outputFile);
                        break;
                    case 'N':
                        str++;
                        fprintf(outputFile, "%d", nodeNumber + 1);
                        break;
                    case 't':
                        str++;
                        fprintf(outputFile, "%d", (nodeNumber + nrBitsInElement) / nrBitsInElement);
                        break;
                    case 'B': // Base file name
                        str++;
                        fputs(baseName, outputFile);
                        break;
                    case 'P': // Package name
                        str++;
                        fputs(packageName, outputFile);
                        break;
                    case 'E': {
                            int pos = nodeNumber + 1;
                            str++;
                            while (pos >= nrBitsInElement) {
                                fputs("0, ", outputFile);
                                pos -= nrBitsInElement;
                            }
                            fprintf(outputFile, "0x%0*lX", (nrBitsInElement + 3) / 4, (1L << pos));
                        }
                        break;
                    case 'F': {
                            str++;
                            fputs(targetLanguage->startOfArrayLiteral, outputFile);
							printTokenSet(outputFile, startSymbol->first);
						}
						break;
                    default:
                        fprintf(stderr, "Illegal code in skeleton file: %s\n", str - 1);
                        break;
				}
				break;
			case '#': // #S = argument for start function call
				str++;
				if (*str == 'S') {
                    int level = 0;
                    Boolean paramName = true;
                    str++;
                    targetLanguage->resetFunctionCall(outputFile);
                    if (startSymbol->arglist != NULL) {
                        for (Node nPtr = startSymbol->arglist; nPtr != NULL; nPtr = nPtr->next) {
                            const char *str = (const char *) nPtr->element.name;
                            if (strcmp(str, ",") == 0 && level == 0) {
                                targetLanguage->nextCallParameter(outputFile);
                                paramName = true;
                            } else {
                                if (paramName) {
                                    /* Spaces from the input */
                                    for (int i = nPtr->lineNr; i != 0; i--) {
                                        fputc(' ', outputFile);
                                    }
                                    targetLanguage->nextCallParameterSymbol(outputFile, str);
                                    paramName = false;
                                }
                                if (strcmp(str, "{") == 0 || strcmp(str, "(") == 0 || strcmp(str, "[") == 0) {
                                    level++;
                                } else if (strcmp(str, "}") == 0 || strcmp(str, ")") == 0 || strcmp(str, "]") == 0) {
                                    level--;
                                }
                            }
                        }
                        targetLanguage->nextCallParameter(outputFile);
                    }
                    targetLanguage->nextCallParameterSymbol(outputFile, "");
                    targetLanguage->pointerToArray(outputFile, "endOfInputSet", -1);
				} else {
					fprintf(stderr, "Illegal code in skeleton file: %s\n", str - 1);
				}
				break;
			case '*': // *S = argument for start function declaration
				str++;
				if (*str == 'S') {
                    int level = 0;
                    Boolean paramName = true;
					str++;
					targetLanguage->resetFunctionCall(outputFile);
                    if (startSymbol->arglist != NULL) {
                        for (Node nPtr = startSymbol->arglist; nPtr != NULL; nPtr = nPtr->next) {
                            const char *str = (const char *) nPtr->element.name;
                            if (strcmp(str, ",") == 0 && level == 0) {
                                targetLanguage->nextCallParameter(outputFile);
                                paramName = true;
                            } else {
                                if (paramName) {
                                    targetLanguage->parameterDeclarationName(outputFile, str, nPtr->lineNr);
                                    paramName = false;
                                } else {
                                    targetLanguage->nextDeclarationParameterSymbol(outputFile, str, nPtr->lineNr);
                                }
                                if (strcmp(str, "{") == 0 || strcmp(str, "(") == 0 || strcmp(str, "[") == 0) {
                                    level++;
                                } else if (strcmp(str, "}") == 0 || strcmp(str, ")") == 0 || strcmp(str, "]") == 0) {
                                    level--;
                                }
                            }
                        }
                    }
				} else {
					fprintf(stderr, "Illegal code in skeleton file: %s\n", str - 1);
				}
				break;
			case '\\':
				str++;
				if (*str != '\0') {
					fputc(*str++, outputFile);
				}
				break;
			default:
				fputc(*str++, outputFile);
				break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x67d9
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x4c(%rbp)
subl $0x23, %eax
je 0x635c
jmp 0x6141
movl -0x4c(%rbp), %eax
subl $0x25, %eax
je 0x616a
jmp 0x614b
movl -0x4c(%rbp), %eax
subl $0x2a, %eax
je 0x659b
jmp 0x6159
movl -0x4c(%rbp), %eax
subl $0x5c, %eax
je 0x677e
jmp 0x67b6
movq -0x8(%rbp), %rax
incq %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
addl $-0x42, %eax
movl %eax, %ecx
movq %rcx, -0x58(%rbp)
subl $0x32, %eax
ja 0x6337
movq -0x58(%rbp), %rax
leaq 0x12f13(%rip), %rcx     # 0x190ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq 0x1ab7b(%rip), %rax     # 0x20d30
movq (%rax), %rdi
movq 0x1ab79(%rip), %rsi     # 0x20d38
callq 0x3100
jmp 0x6357
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq 0x1ab5c(%rip), %rdi     # 0x20d38
movl 0x1ab76(%rip), %edx     # 0x20d58
addl $0x1, %edx
leaq 0x14bfa(%rip), %rsi     # 0x1ade6
movb $0x0, %al
callq 0x3140
jmp 0x6357
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq 0x1ab2d(%rip), %rdi     # 0x20d38
movl 0x1ab47(%rip), %eax     # 0x20d58
addl 0x19f49(%rip), %eax     # 0x20160
cltd
idivl 0x19f42(%rip)           # 0x20160
movl %eax, %edx
leaq 0x14bbf(%rip), %rsi     # 0x1ade6
movb $0x0, %al
callq 0x3140
jmp 0x6357
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq 0x19f42(%rip), %rdi     # 0x20188
movq 0x1aaeb(%rip), %rsi     # 0x20d38
callq 0x3100
jmp 0x6357
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq 0x19efe(%rip), %rdi     # 0x20168
movq 0x1aac7(%rip), %rsi     # 0x20d38
callq 0x3100
jmp 0x6357
movl 0x1aad7(%rip), %eax     # 0x20d58
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x19ec4(%rip), %eax     # 0x20160
jl 0x62c1
movq 0x1aa93(%rip), %rsi     # 0x20d38
leaq 0x132c6(%rip), %rdi     # 0x19572
callq 0x3100
movl 0x19ea9(%rip), %ecx     # 0x20160
movl -0xc(%rbp), %eax
subl %ecx, %eax
movl %eax, -0xc(%rbp)
jmp 0x6293
movq 0x1aa70(%rip), %rdi     # 0x20d38
movl 0x19e92(%rip), %eax     # 0x20160
addl $0x3, %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %edx
movl -0xc(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
leaq 0x13284(%rip), %rsi     # 0x19576
movb $0x0, %al
callq 0x3140
jmp 0x6357
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq 0x19e62(%rip), %rax     # 0x20170
movq 0x68(%rax), %rdi
movq 0x1aa1f(%rip), %rsi     # 0x20d38
callq 0x3100
movq 0x1aa13(%rip), %rdi     # 0x20d38
movq 0x1aa04(%rip), %rax     # 0x20d30
movq 0x8(%rax), %rsi
callq 0x8550
jmp 0x6357
movq 0x19cba(%rip), %rax     # 0x1fff8
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
addq $-0x1, %rdx
leaq 0x1322e(%rip), %rsi     # 0x1957e
movb $0x0, %al
callq 0x3140
jmp 0x67d4
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x53, %eax
jne 0x6576
movl $0x0, -0x10(%rbp)
movw $0xffff, -0x12(%rbp)    # imm = 0xFFFF
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq 0x19dd8(%rip), %rax     # 0x20170
movq 0x150(%rax), %rax
movq 0x1a992(%rip), %rdi     # 0x20d38
callq *%rax
movq 0x1a981(%rip), %rax     # 0x20d30
cmpq $0x0, 0x40(%rax)
je 0x6531
movq 0x1a96f(%rip), %rax     # 0x20d30
movq 0x40(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x651a
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x15278(%rip), %rsi     # 0x1b663
callq 0x3220
cmpl $0x0, %eax
jne 0x641d
cmpl $0x0, -0x10(%rbp)
jne 0x641d
movq 0x19d6e(%rip), %rax     # 0x20170
movq 0x138(%rax), %rax
movq 0x1a928(%rip), %rdi     # 0x20d38
callq *%rax
movw $0xffff, -0x12(%rbp)    # imm = 0xFFFF
jmp 0x6507
cmpw $0x0, -0x12(%rbp)
je 0x6471
movq -0x20(%rbp), %rax
movswl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x6450
movq 0x1a8fd(%rip), %rsi     # 0x20d38
movl $0x20, %edi
callq 0x3120
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x642e
movq 0x19d19(%rip), %rax     # 0x20170
movq 0x140(%rax), %rax
movq 0x1a8d3(%rip), %rdi     # 0x20d38
movq -0x28(%rbp), %rsi
callq *%rax
movw $0x0, -0x12(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x15257(%rip), %rsi     # 0x1b6d3
callq 0x3220
cmpl $0x0, %eax
je 0x64b0
movq -0x28(%rbp), %rdi
leaq 0x12dd0(%rip), %rsi     # 0x19261
callq 0x3220
cmpl $0x0, %eax
je 0x64b0
movq -0x28(%rbp), %rdi
leaq 0x152af(%rip), %rsi     # 0x1b755
callq 0x3220
cmpl $0x0, %eax
jne 0x64bb
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x6505
movq -0x28(%rbp), %rdi
leaq 0x12d7d(%rip), %rsi     # 0x19243
callq 0x3220
cmpl $0x0, %eax
je 0x64fa
movq -0x28(%rbp), %rdi
leaq 0x14b23(%rip), %rsi     # 0x1affe
callq 0x3220
cmpl $0x0, %eax
je 0x64fa
movq -0x28(%rbp), %rdi
leaq 0x14ecc(%rip), %rsi     # 0x1b3bc
callq 0x3220
cmpl $0x0, %eax
jne 0x6503
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x6505
jmp 0x6507
jmp 0x6509
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x63c9
movq 0x19c4f(%rip), %rax     # 0x20170
movq 0x138(%rax), %rax
movq 0x1a809(%rip), %rdi     # 0x20d38
callq *%rax
movq 0x19c38(%rip), %rax     # 0x20170
movq 0x140(%rax), %rax
movq 0x1a7f2(%rip), %rdi     # 0x20d38
leaq 0x12cef(%rip), %rsi     # 0x1923c
callq *%rax
movq 0x19c1a(%rip), %rax     # 0x20170
movq 0x100(%rax), %rax
movq 0x1a7d4(%rip), %rdi     # 0x20d38
leaq 0x13036(%rip), %rsi     # 0x195a1
movq $-0x1, %rdx
callq *%rax
jmp 0x6596
movq 0x19a7b(%rip), %rax     # 0x1fff8
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
addq $-0x1, %rdx
leaq 0x12fef(%rip), %rsi     # 0x1957e
movb $0x0, %al
callq 0x3140
jmp 0x67d4
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x53, %eax
jne 0x675c
movl $0x0, -0x30(%rbp)
movw $0xffff, -0x32(%rbp)    # imm = 0xFFFF
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq 0x19b99(%rip), %rax     # 0x20170
movq 0x150(%rax), %rax
movq 0x1a753(%rip), %rdi     # 0x20d38
callq *%rax
movq 0x1a742(%rip), %rax     # 0x20d30
cmpq $0x0, 0x40(%rax)
je 0x675a
movq 0x1a730(%rip), %rax     # 0x20d30
movq 0x40(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x6758
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
leaq 0x15039(%rip), %rsi     # 0x1b663
callq 0x3220
cmpl $0x0, %eax
jne 0x665c
cmpl $0x0, -0x30(%rbp)
jne 0x665c
movq 0x19b2f(%rip), %rax     # 0x20170
movq 0x138(%rax), %rax
movq 0x1a6e9(%rip), %rdi     # 0x20d38
callq *%rax
movw $0xffff, -0x32(%rbp)    # imm = 0xFFFF
jmp 0x6745
cmpw $0x0, -0x32(%rbp)
je 0x668d
movq 0x19b06(%rip), %rax     # 0x20170
movq 0x118(%rax), %rax
movq 0x1a6c0(%rip), %rdi     # 0x20d38
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rcx
movswl (%rcx), %edx
callq *%rax
movw $0x0, -0x32(%rbp)
jmp 0x66af
movq 0x19adc(%rip), %rax     # 0x20170
movq 0x120(%rax), %rax
movq 0x1a696(%rip), %rdi     # 0x20d38
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rcx
movswl (%rcx), %edx
callq *%rax
movq -0x48(%rbp), %rdi
leaq 0x15019(%rip), %rsi     # 0x1b6d3
callq 0x3220
cmpl $0x0, %eax
je 0x66ee
movq -0x48(%rbp), %rdi
leaq 0x12b92(%rip), %rsi     # 0x19261
callq 0x3220
cmpl $0x0, %eax
je 0x66ee
movq -0x48(%rbp), %rdi
leaq 0x15071(%rip), %rsi     # 0x1b755
callq 0x3220
cmpl $0x0, %eax
jne 0x66f9
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x6743
movq -0x48(%rbp), %rdi
leaq 0x12b3f(%rip), %rsi     # 0x19243
callq 0x3220
cmpl $0x0, %eax
je 0x6738
movq -0x48(%rbp), %rdi
leaq 0x148e5(%rip), %rsi     # 0x1affe
callq 0x3220
cmpl $0x0, %eax
je 0x6738
movq -0x48(%rbp), %rdi
leaq 0x14c8e(%rip), %rsi     # 0x1b3bc
callq 0x3220
cmpl $0x0, %eax
jne 0x6741
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x6743
jmp 0x6745
jmp 0x6747
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x6608
jmp 0x675a
jmp 0x677c
movq 0x19895(%rip), %rax     # 0x1fff8
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
addq $-0x1, %rdx
leaq 0x12e09(%rip), %rsi     # 0x1957e
movb $0x0, %al
callq 0x3140
jmp 0x67d4
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x67b4
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movsbl (%rax), %edi
movq 0x1a589(%rip), %rsi     # 0x20d38
callq 0x3120
jmp 0x67d4
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movsbl (%rax), %edi
movq 0x1a569(%rip), %rsi     # 0x20d38
callq 0x3120
jmp 0x611c
addq $0x60, %rsp
popq %rbp
retq
nop