// File: /workspace/github_c_makefile_star2_O0/theovosse[P]llgen/llgen.c
// Function: main
int main(int argc, char *argv[]) {
	char* argv0;

	argv0 = argv[0];
	argv++;
	while (argc > 1 && ((**argv == '-' || **argv == '+') || strchr(*argv, '='))) {
        if (**argv == '-') {
            RetractProperty(*argv + 1);
        } else if (**argv == '+') {
            AddProperty(*argv + 1);
        } else {
            const char* eq = strchr(*argv, '=');
            if (strncmp(*argv, "packageName", eq - *argv) == 0) {
                packageName = eq + 1;
            } else {
                fprintf(stderr, "unknown option: %s", *argv);
            }
        }
		argc--;
		argv++;
	}
    if (HasProperty("cpp")) {
        targetLanguage = &cppLanguage;
    } else if (HasProperty("js")) {
        targetLanguage = &jsLanguage;
    } else if (HasProperty("ts")) {
        targetLanguage = &tsLanguage;
    } else if (HasProperty("go")) {
        targetLanguage = &goLanguage;
    } else if (HasProperty("rust")) {
        targetLanguage = &rustLanguage;
    } else {
        targetLanguage = &cLanguage;
        AddProperty("c");
    }
    targetLanguage->initialize();
	argv--;
	if (argc >= 2) {
		if (strcmp(argv[1], "-") == 0) {
			yyin = stdin;
		} else {
			if ((yyin = fopen(argv[1], "r")) == NULL) {
				perror(argv[1]);
				exit(1);
			}
			inputFileName = argv[1];
            determineBaseName(inputFileName);
		}
		if (argc >= 3) {
			if (strcmp(argv[2], "-") != 0) {
				if ((outputFile = fopen(argv[2], "w")) == NULL) {
					perror(argv[2]);
					exit(1);
				}
			} else {
				outputFile = stdout;
			}
		} else {
			char outName[256];
			char *suffix;
			const char* extension = targetLanguage->extension;
			strcpy(outName, argv[1]);
			suffix = strrchr(outName, '.');
			if (suffix != NULL && (strcmp(suffix, ".l") == 0 || strcmp(suffix, ".L") == 0 || strcmp(suffix, ".ll") == 0 || strcmp(suffix, ".LL") == 0)) {
				strcpy(suffix + 1, extension);
			} else {
				strcat(outName, ".");
				strcat(outName, extension);
			}
			if ((outputFile = fopen(outName, "w")) == NULL) {
				perror(outName);
				exit(1);
			}
		}
	}
	errorOccurred = false;
	yyparse();
	if (errorOccurred) {
		exit(1);
	}
	if (HasEnums() != 0) {
		AddProperty("enumid");
	}
	ComputeEmptyFirstFollow();
    if (HasProperty("showallrules")) {
        ShowAllRules();
    } else {
        OpenSkeleton(argv0);
        CopySkeleton(argv0);
    }
    if (HasProperty("tab8")) {
        tabWidth = 8;
    }
    if (HasProperty("newlineBeforeBrace")) {
        bracesOnNewLine = true;
    }
	if (yyin != stdin) {
		fclose(yyin);
	}
	if (outputFile != stdout) {
		fclose(outputFile);
	}
	if (skeletonFile != NULL) {
		fclose(skeletonFile);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpl $0x1, -0x8(%rbp)
movb %al, -0x131(%rbp)
jle 0x4456
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x2d, %ecx
movb %al, -0x132(%rbp)
je 0x444a
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x2b, %ecx
movb %al, -0x132(%rbp)
je 0x444a
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x3d, %esi
callq 0x30d0
cmpq $0x0, %rax
setne %al
movb %al, -0x132(%rbp)
movb -0x132(%rbp), %al
movb %al, -0x131(%rbp)
movb -0x131(%rbp), %al
testb $0x1, %al
jne 0x4465
jmp 0x4533
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x4489
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x1, %rdi
callq 0x33c0
jmp 0x4519
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x44aa
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x1, %rdi
callq 0x3360
jmp 0x4517
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x3d, %esi
callq 0x30d0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rax
subq %rax, %rdx
leaq 0x14dd3(%rip), %rsi     # 0x192ae
callq 0x3070
cmpl $0x0, %eax
jne 0x44f6
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, 0x1bc74(%rip)     # 0x20168
jmp 0x4515
movq 0x1bafb(%rip), %rax     # 0x1fff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x14dac(%rip), %rsi     # 0x192ba
movb $0x0, %al
callq 0x3140
jmp 0x4517
jmp 0x4519
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
jmp 0x43f0
leaq 0x14d93(%rip), %rdi     # 0x192cd
callq 0x4940
cmpw $0x0, %ax
je 0x4558
leaq 0x1c0cc(%rip), %rax     # 0x20618
movq %rax, 0x1bc1d(%rip)     # 0x20170
jmp 0x4605
leaq 0x14d72(%rip), %rdi     # 0x192d1
callq 0x4940
cmpw $0x0, %ax
je 0x457d
leaq 0x1c20f(%rip), %rax     # 0x20780
movq %rax, 0x1bbf8(%rip)     # 0x20170
jmp 0x4603
leaq 0x14fbb(%rip), %rdi     # 0x1953f
callq 0x4940
cmpw $0x0, %ax
je 0x459f
leaq 0x1c352(%rip), %rax     # 0x208e8
movq %rax, 0x1bbd3(%rip)     # 0x20170
jmp 0x4601
leaq 0x14d2e(%rip), %rdi     # 0x192d4
callq 0x4940
cmpw $0x0, %ax
je 0x45c1
leaq 0x1c498(%rip), %rax     # 0x20a50
movq %rax, 0x1bbb1(%rip)     # 0x20170
jmp 0x45ff
leaq 0x14d0f(%rip), %rdi     # 0x192d7
callq 0x4940
cmpw $0x0, %ax
je 0x45e3
leaq 0x1c5de(%rip), %rax     # 0x20bb8
movq %rax, 0x1bb8f(%rip)     # 0x20170
jmp 0x45fd
leaq 0x1bec6(%rip), %rax     # 0x204b0
movq %rax, 0x1bb7f(%rip)     # 0x20170
leaq 0x1682a(%rip), %rdi     # 0x1ae22
callq 0x3360
jmp 0x45ff
jmp 0x4601
jmp 0x4603
jmp 0x4605
movq 0x1bb64(%rip), %rcx     # 0x20170
movb $0x0, %al
callq *0x8(%rcx)
movq -0x10(%rbp), %rax
addq $-0x8, %rax
movq %rax, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jl 0x483b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x14ca6(%rip), %rsi     # 0x192dc
callq 0x3220
cmpl $0x0, %eax
jne 0x4656
movq 0x1b989(%rip), %rax     # 0x1ffd0
movq (%rax), %rcx
leaq 0x1c7af(%rip), %rax     # 0x20e00
movq %rcx, (%rax)
jmp 0x46ac
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x16ec7(%rip), %rsi     # 0x1b52c
callq 0x3190
leaq 0x1c78f(%rip), %rcx     # 0x20e00
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x4691
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x31a0
movl $0x1, %edi
callq 0x31e0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x1bad8(%rip)     # 0x20178
movq 0x1bad1(%rip), %rdi     # 0x20178
callq 0x49c0
cmpl $0x3, -0x8(%rbp)
jl 0x471b
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x14c1b(%rip), %rsi     # 0x192dc
callq 0x3220
cmpl $0x0, %eax
je 0x4705
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x168a6(%rip), %rsi     # 0x1af80
callq 0x3190
movq %rax, 0x1c652(%rip)     # 0x20d38
cmpq $0x0, %rax
jne 0x4703
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x31a0
movl $0x1, %edi
callq 0x31e0
jmp 0x4716
movq 0x1b8bc(%rip), %rax     # 0x1ffc8
movq (%rax), %rax
movq %rax, 0x1c622(%rip)     # 0x20d38
jmp 0x4839
movq 0x1ba4e(%rip), %rax     # 0x20170
movq (%rax), %rax
movq %rax, -0x130(%rbp)
leaq -0x120(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x3080
leaq -0x120(%rbp), %rdi
movl $0x2e, %esi
callq 0x30f0
movq %rax, -0x128(%rbp)
cmpq $0x0, -0x128(%rbp)
je 0x47db
movq -0x128(%rbp), %rdi
leaq 0x14b6e(%rip), %rsi     # 0x192de
callq 0x3220
cmpl $0x0, %eax
je 0x47c2
movq -0x128(%rbp), %rdi
leaq 0x14b59(%rip), %rsi     # 0x192e1
callq 0x3220
cmpl $0x0, %eax
je 0x47c2
movq -0x128(%rbp), %rdi
leaq 0x14b44(%rip), %rsi     # 0x192e4
callq 0x3220
cmpl $0x0, %eax
je 0x47c2
movq -0x128(%rbp), %rdi
leaq 0x14b30(%rip), %rsi     # 0x192e8
callq 0x3220
cmpl $0x0, %eax
jne 0x47db
movq -0x128(%rbp), %rdi
addq $0x1, %rdi
movq -0x130(%rbp), %rsi
callq 0x3080
jmp 0x4801
leaq -0x120(%rbp), %rdi
leaq 0x16bcf(%rip), %rsi     # 0x1b3b8
callq 0x31c0
leaq -0x120(%rbp), %rdi
movq -0x130(%rbp), %rsi
callq 0x31c0
leaq -0x120(%rbp), %rdi
leaq 0x16771(%rip), %rsi     # 0x1af80
callq 0x3190
movq %rax, 0x1c51d(%rip)     # 0x20d38
cmpq $0x0, %rax
jne 0x4837
leaq -0x120(%rbp), %rdi
callq 0x31a0
movl $0x1, %edi
callq 0x31e0
jmp 0x4839
jmp 0x483b
movw $0x0, 0x1c526(%rip)     # 0x20d6a
callq 0xc190
cmpw $0x0, 0x1c519(%rip)     # 0x20d6a
je 0x485d
movl $0x1, %edi
callq 0x31e0
callq 0x4a80
cwtl
cmpl $0x0, %eax
je 0x4874
leaq 0x14a7d(%rip), %rdi     # 0x192ec
callq 0x3360
callq 0x4af0
leaq 0x14a73(%rip), %rdi     # 0x192f3
callq 0x4940
cmpw $0x0, %ax
je 0x4892
callq 0x4c00
jmp 0x48a4
movq -0x18(%rbp), %rdi
callq 0x4c90
movq -0x18(%rbp), %rdi
callq 0x4d80
leaq 0x14a55(%rip), %rdi     # 0x19300
callq 0x4940
cmpw $0x0, %ax
je 0x48c0
movl $0x8, 0x1b8c0(%rip)     # 0x20180
leaq 0x14a3e(%rip), %rdi     # 0x19305
callq 0x4940
cmpw $0x0, %ax
je 0x48db
movw $0xffff, 0x1c48d(%rip)  # imm = 0xFFFF
leaq 0x1c51e(%rip), %rax     # 0x20e00
movq (%rax), %rax
movq 0x1b6e4(%rip), %rcx     # 0x1ffd0
cmpq (%rcx), %rax
je 0x4900
leaq 0x1c508(%rip), %rax     # 0x20e00
movq (%rax), %rdi
callq 0x30b0
movq 0x1c431(%rip), %rax     # 0x20d38
movq 0x1b6ba(%rip), %rcx     # 0x1ffc8
cmpq (%rcx), %rax
je 0x491f
movq 0x1c41e(%rip), %rdi     # 0x20d38
callq 0x30b0
cmpq $0x0, 0x1c449(%rip)     # 0x20d70
je 0x4935
movq 0x1c440(%rip), %rdi     # 0x20d70
callq 0x30b0
xorl %eax, %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq