// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: run_compilation(char const*, char const*, SleighCompile&)
static int4 run_compilation(const char *filein,const char *fileout,SleighCompile &compiler)

{
  compiler.parseFromNewFile(filein);
  slgh = &compiler;		// Set global pointer up for parser
  yyin = fopen(filein,"r");	// Open the file for the lexer
  if (yyin == (FILE *)0) {
    cerr << "Unable to open specfile: " << filein << endl;
    return 2;
  }

  try {
    int4 parseres = yyparse();	// Try to parse
    fclose(yyin);
    if (parseres==0)
      compiler.process();	// Do all the post-processing
    if ((parseres==0)&&(compiler.numErrors()==0)) { // If no errors
      ofstream s(fileout);
      if (!s) {
	ostringstream errs;
	errs << "Unable to open output file: " << fileout;
	throw SleighError(errs.str());
      }
      compiler.saveXml(s);	// Dump output xml
      s.close();
    }
    else {
      cerr << "No output produced" <<endl;
      return 2;
    }
    yylex_destroy();		// Make sure lexer is reset so we can parse multiple files
  } catch(LowlevelError &err) {
    cerr << "Unrecoverable error: " << err.explain << endl;
    return 2;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x3a0, %rsp            # imm = 0x3A0
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x28(%rsp), %rdi
leaq 0x228(%rsp), %rdx
movq %r15, %rsi
callq 0x153e2
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x2f43c
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x33e46
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xf380
movq %r14, 0x59673(%rip)     # 0x8d4c0
leaq 0x35fee(%rip), %rsi     # 0x69e42
movq %r15, %rdi
callq 0xf440
leaq 0x59685(%rip), %r12     # 0x8d4e8
movq %rax, (%r12)
testq %rax, %rax
je 0x33ee3
callq 0x3737c
movl %eax, %ebp
movq (%r12), %rdi
callq 0xf360
testl %ebp, %ebp
jne 0x33e96
movq %r14, %rdi
callq 0x2efcc
cmpl $0x0, 0x358(%r14)
je 0x33f74
movq 0x5914b(%rip), %rbx     # 0x8cfe8
leaq 0x2ecd0(%rip), %rsi     # 0x62b74
movl $0x12, %edx
movq %rbx, %rdi
callq 0xf420
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0xf340
movsbl %al, %esi
movq 0x59119(%rip), %rdi     # 0x8cfe8
callq 0xf040
movl $0x2, %ebx
movq %rax, %rdi
callq 0xf260
jmp 0x33f62
movq 0x590fe(%rip), %rbx     # 0x8cfe8
leaq 0x2ec4c(%rip), %rsi     # 0x62b3d
movl $0x19, %edx
movq %rbx, %rdi
callq 0xf420
testq %r15, %r15
je 0x33f1f
movq %r15, %rdi
callq 0xf190
movq 0x590d6(%rip), %rdi     # 0x8cfe8
movq %r15, %rsi
movq %rax, %rdx
callq 0xf420
jmp 0x33f36
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0xf6c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xf340
movsbl %al, %esi
movq %rbx, %rdi
callq 0xf040
movq %rax, %rdi
callq 0xf260
movl $0x2, %ebx
movl %ebx, %eax
addq $0x3a0, %rsp            # imm = 0x3A0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movl $0x10, %edx
callq 0xf3f0
movq 0x28(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x48(%rsp,%rax)
jne 0x33feb
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x2852a
leaq 0x28(%rsp), %rdi
callq 0xf560
movq 0x58fec(%rip), %rax     # 0x8cfa0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x30(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x28(%rsp,%rcx)
callq 0xf2f0
leaq 0x120(%rsp), %rdi
callq 0xf150
xorl %ebx, %ebx
callq 0x476f1
jmp 0x33f62
leaq 0x228(%rsp), %rdi
callq 0xf530
leaq 0x2eb58(%rip), %rsi     # 0x62b57
leaq 0x228(%rsp), %rdi
movl $0x1c, %edx
callq 0xf420
leaq 0x228(%rsp), %rdi
movq %rbx, %rsi
callq 0xf350
movl $0x20, %edi
callq 0xf1b0
movq %rax, %r15
leaq 0x230(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0xf640
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x11796
xorl %ebp, %ebp
leaq 0x564f7(%rip), %rsi     # 0x8a550
leaq -0x22886(%rip), %rdx    # 0x117da
movq %r15, %rdi
callq 0xf6d0
movq %rdx, %r14
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34089
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xf380
testb %bpl, %bpl
jne 0x34096
jmp 0x340a6
movq %rdx, %r14
movq %rax, %rbx
movq %r15, %rdi
callq 0xf290
jmp 0x340a6
movq %rdx, %r14
movq %rax, %rbx
movq 0x58f0b(%rip), %rsi     # 0x8cfb8
leaq 0x228(%rsp), %rdi
callq 0xf1e0
leaq 0x298(%rsp), %rdi
callq 0xf150
jmp 0x340d3
jmp 0x340cd
jmp 0x3410a
movq %rdx, %r14
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xf5a0
jmp 0x34110
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34102
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xf380
jmp 0x34102
movq %rax, %rbx
movq %rbx, %rdi
callq 0xf730
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0x34102
movq %rbx, %rdi
callq 0xf180
movq %rax, %rbx
movq 0x58ec0(%rip), %rdi     # 0x8cfe8
leaq 0x2ea58(%rip), %rsi     # 0x62b87
movl $0x15, %edx
callq 0xf420
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x58ea1(%rip), %rdi     # 0x8cfe8
callq 0xf420
movq %rax, %rdi
callq 0xf1a0
callq 0xf680
jmp 0x33f5d
movq %rax, %rbx
callq 0xf680
jmp 0x34102
movq %rax, %rdi
callq 0x13a37