// File: /workspace/github_c_makefile_star2_O1/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, %r12d
movq 0x87c1(%rip), %rax      # 0x9fc0
movq (%rax), %rax
leaq 0x89a7(%rip), %rbp      # 0xa1b0
movq %rax, (%rbp)
movq 0x87b4(%rip), %rax      # 0x9fc8
movq (%rax), %rax
movq %rax, 0x88ea(%rip)      # 0xa108
movl $0x1, 0x8948(%rip)      # 0xa170
leaq 0x38fe(%rip), %rax      # 0x512d
movq %rax, 0x8932(%rip)      # 0xa168
leaq 0x38f8(%rip), %r14      # 0x5135
movq 0x8794(%rip), %r13      # 0x9fd8
leaq 0x38f0(%rip), %r15      # 0x513b
movl %r12d, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1150
cmpl $0x6e, %eax
jle 0x1892
cmpl $0x6f, %eax
je 0x1878
cmpl $0x76, %eax
jne 0x1a57
movl $0x1, 0x889a(%rip)      # 0xa110
jmp 0x184b
movq (%r13), %rdi
movq %r15, %rsi
callq 0x1130
movq %rax, (%rbp)
testq %rax, %rax
jne 0x184b
callq 0x11c0
cmpl $-0x1, %eax
jne 0x1a22
movq 0x872e(%rip), %rax      # 0x9fd0
movslq (%rax), %rax
subl %eax, %r12d
je 0x195e
leaq (%rbx,%rax,8), %rbp
movl %r12d, %r15d
xorl %r13d, %r13d
leaq 0x3894(%rip), %rbx      # 0x5153
leaq 0x23b(%rip), %r14       # 0x1b01
movq (%rbp,%r13,8), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x10b0
testl %eax, %eax
je 0x18ff
movq %r12, %rdi
leaq 0x387c(%rip), %rsi      # 0x5160
callq 0x1130
movq %rax, 0x8818(%rip)      # 0xa108
movq (%rbp,%r13,8), %rdi
testq %rax, %rax
jne 0x1917
jmp 0x1a5f
movq 0x86c2(%rip), %rax      # 0x9fc8
movq (%rax), %rax
movq %rax, 0x87f8(%rip)      # 0xa108
leaq 0x3816(%rip), %rdi      # 0x512d
movq %rdi, 0x884a(%rip)      # 0xa168
movl $0x1, 0x8848(%rip)      # 0xa170
movq %r14, %rdi
callq 0x14fc
testl %eax, %eax
je 0x1a4b
movq 0x87c9(%rip), %rdi      # 0xa108
movq 0x8682(%rip), %rax      # 0x9fc8
cmpq (%rax), %rdi
je 0x1950
callq 0x1030
incq %r13
cmpl %r13d, %r15d
jne 0x18c6
jmp 0x1972
leaq 0x19c(%rip), %rdi       # 0x1b01
callq 0x14fc
testl %eax, %eax
je 0x1a4b
cmpl $0x0, 0x8797(%rip)      # 0xa110
sete %al
leaq 0x8815(%rip), %r14      # 0xa198
movq (%r14), %rbx
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x19a1
movq %rbx, %rdi
callq 0x3b18
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0x1990
callq 0x3b74
movq 0x87cb(%rip), %rax      # 0xa178
testq %rax, %rax
leaq 0x87f9(%rip), %r15      # 0xa1b0
je 0x19e7
leaq 0x5036(%rip), %rbx      # 0x69f6
movq (%r15), %rdi
movq (%rax), %rdx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10c0
movq 0x87a1(%rip), %rax      # 0xa178
movq 0x8(%rax), %rax
movq %rax, 0x8796(%rip)      # 0xa178
testq %rax, %rax
jne 0x19c0
movq (%r14), %rdi
testq %rdi, %rdi
je 0x19f4
callq 0x3c94
movq 0x8785(%rip), %rdx      # 0xa180
testq %rdx, %rdx
je 0x1a11
movq (%r15), %rdi
leaq 0x4fec(%rip), %rsi      # 0x69f6
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 0x1a34
cmpl $0x68, %eax
jne 0x1a57
movq %rbx, %rdi
callq 0x11d8
movq (%rbx), %rdi
callq 0x10f0
movq %rax, %rdi
callq 0x1a64
xorl %edi, %edi
callq 0x1170
leaq 0x3703(%rip), %rdi      # 0x5155
callq 0x167b
movq %rbx, %rdi
callq 0x12b6
callq 0x12a8