// File: /workspace/github_c_makefile_star2_O3/macournoyer[P]peg/leg.c
// Function: main
int main(int argc, char **argv)
{
  Node *n;
  int   c;

  output= stdout;
  input= stdin;
  lineNumber= 1;
  fileName= "<stdin>";

  while (-1 != (c= getopt(argc, argv, "Vho:v")))
    {
      switch (c)
	{
	case 'V':
	  version(basename(argv[0]));
	  exit(0);

	case 'h':
	  usage(basename(argv[0]));
	  break;

	case 'o':
	  if (!(output= fopen(optarg, "w")))
	    {
	      perror(optarg);
	      exit(1);
	    }
	  break;

	case 'v':
	  verboseFlag= 1;
	  break;

	default:
	  fprintf(stderr, "for usage try: %s -h\n", argv[0]);
	  exit(1);
	}
    }
  argc -= optind;
  argv += optind;

  if (argc)
    {
      for (;  argc;  --argc, ++argv)
	{
	  if (!strcmp(*argv, "-"))
	    {
	      input= stdin;
	      fileName= "<stdin>";
	    }
	  else
	    {
	      if (!(input= fopen(*argv, "r")))
		{
		  perror(*argv);
		  exit(1);
		}
	      fileName= *argv;
	    }
	  lineNumber= 1;
	  if (!yyparse())
	    yyerror("syntax error");
	  if (input != stdin)
	    fclose(input);
	}
    }
  else
    if (!yyparse())
      yyerror("syntax error");

  if (verboseFlag)
    for (n= rules;  n;  n= n->any.next)
      Rule_print(n);

  Rule_compile_c_header();

  for (; headers;  headers= headers->next)
    fprintf(output, "%s\n", headers->text);

  if (rules)
    Rule_compile_c(rules);

  if (trailer)
    fprintf(output, "%s\n", trailer);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movq 0x87fb(%rip), %rax      # 0x9fc0
movq (%rax), %rax
leaq 0x89e1(%rip), %r12      # 0xa1b0
movq %rax, (%r12)
movq 0x87ee(%rip), %r13      # 0x9fc8
movq (%r13), %rax
movq %rax, 0x8923(%rip)      # 0xa108
movl $0x1, 0x8981(%rip)      # 0xa170
leaq 0x3838(%rip), %rax      # 0x502e
movq %rax, 0x896b(%rip)      # 0xa168
leaq 0x3832(%rip), %r14      # 0x5036
movq 0x87cd(%rip), %r15      # 0x9fd8
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1150
cmpl $0x6e, %eax
jle 0x1854
cmpl $0x6f, %eax
je 0x1837
cmpl $0x76, %eax
jne 0x1a00
movl $0x1, 0x88db(%rip)      # 0xa110
jmp 0x180b
movq (%r15), %rdi
leaq 0x37fb(%rip), %rsi      # 0x503c
callq 0x1130
movq %rax, (%r12)
testq %rax, %rax
jne 0x180b
callq 0x11c0
cmpl $-0x1, %eax
jne 0x19c6
movq 0x876c(%rip), %rax      # 0x9fd0
movslq (%rax), %rax
subl %eax, %ebp
je 0x1902
leaq (%rbx,%rax,8), %r15
movl %ebp, %ebp
xorl %r12d, %r12d
leaq 0x22f(%rip), %rbx       # 0x1aae
leaq 0x37d9(%rip), %r14      # 0x505f
movq (%r15,%r12,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x1895
cmpb $0x0, 0x1(%rdi)
je 0x18ee
movq %r14, %rsi
callq 0x1130
movq %rax, 0x8864(%rip)      # 0xa108
movq (%r15,%r12,8), %rdi
testq %rax, %rax
je 0x19fb
movq %rdi, 0x88b0(%rip)      # 0xa168
movl $0x1, 0x88ae(%rip)      # 0xa170
movq %rbx, %rdi
callq 0x14dc
testl %eax, %eax
je 0x19ef
movq 0x882f(%rip), %rdi      # 0xa108
cmpq (%r13), %rdi
je 0x18e4
callq 0x1030
incq %r12
cmpl %r12d, %ebp
jne 0x1886
jmp 0x1916
movq (%r13), %rax
movq %rax, 0x880f(%rip)      # 0xa108
leaq 0x372e(%rip), %rdi      # 0x502e
jmp 0x18b1
leaq 0x1a5(%rip), %rdi       # 0x1aae
callq 0x14dc
testl %eax, %eax
je 0x19ef
cmpl $0x0, 0x87f3(%rip)      # 0xa110
sete %al
leaq 0x8871(%rip), %r14      # 0xa198
movq (%r14), %rbx
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x1945
movq %rbx, %rdi
callq 0x385a
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0x1934
callq 0x38b4
movq 0x8827(%rip), %rax      # 0xa178
testq %rax, %rax
leaq 0x8855(%rip), %r15      # 0xa1b0
je 0x198b
leaq 0x507a(%rip), %rbx      # 0x69de
movq (%r15), %rdi
movq (%rax), %rdx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10c0
movq 0x87fd(%rip), %rax      # 0xa178
movq 0x8(%rax), %rax
movq %rax, 0x87f2(%rip)      # 0xa178
testq %rax, %rax
jne 0x1964
movq (%r14), %rdi
testq %rdi, %rdi
je 0x1998
callq 0x39ce
movq 0x87e1(%rip), %rdx      # 0xa180
testq %rdx, %rdx
je 0x19b5
movq (%r15), %rdi
leaq 0x5030(%rip), %rsi      # 0x69de
xorl %eax, %eax
callq 0x10c0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x56, %eax
je 0x19d8
cmpl $0x68, %eax
jne 0x1a00
movq %rbx, %rdi
callq 0x11d8
movq (%rbx), %rdi
callq 0x10f0
movq %rax, %rdi
callq 0x1a08
xorl %edi, %edi
callq 0x1170
leaq 0x365e(%rip), %rdi      # 0x5054
callq 0x1641
callq 0x12a8
movq %rbx, %rdi
callq 0x12b6