// File: /workspace/github_cpp_makefile_star2_O3/navrajsaini[P]PL_Compiler_design_project/interp.cpp
// Function: Interpreter::run_program()
void Interpreter::run_program()
{
  OperationCode  opcode;
  program_register = 0; 
  running = true;
  
  while (running)
  {
//
    opcode = (OperationCode) store[program_register];
//
 //   cout << "Opcode = " << opcode << endl;
    if ( stepping )
    {
      cout << endl << " press < enter > to execute "
                   << opcode_name[opcode] << " operation" << endl;
      cin.get();
    }
    switch (opcode)
    {
      case OP_ADD:
         add();
         break;
      case OP_AND:
         pland();
         break;
      case OP_ARROW:
         arrow(store[program_register + 1]);
         break;
      case OP_ASSIGN:
         assign( store[program_register + 1]);
         break;
      case OP_BAR:
         bar(store[program_register + 1]);
         break;
      case OP_CALL:
         call(store[program_register + 1], store[program_register + 2]);
         break;
      case OP_CONSTANT:
         constant(store[program_register + 1]);
         break;
      case OP_DIVIDE:
         divide();
         break;
      case OP_ENDPROC:
         endproc();
         break;
      case OP_ENDPROG:
         endprog();
         break;
      case OP_EQUAL:
         equal();
         break;
      case OP_FI:
         fi( store[program_register + 1]);
         break;
      case OP_GREATER:
         greater();
         break;
      case OP_INDEX:
         index( store[program_register + 1], store[program_register + 2]);
         break;
      case OP_LESS:
         less();
         break;
      case OP_MINUS:
         minus();
         break;
      case OP_MODULO:
         modulo();
         break;
      case OP_MULTIPLY:
         multiply();
         break;
      case OP_NOT:
         plnot();
         break;
      case OP_OR:
         plor();
         break;
      case OP_PROC:
         proc(store[program_register + 1], store[program_register + 2]);
         break;
      case OP_PROG:
         prog(store[program_register + 1], store[program_register + 2]);
         break;
      case OP_READ:
         read(store[program_register + 1]);
         break;
      case OP_SUBTRACT:
         subtract();
         break;
      case OP_VALUE:
         value();
         break;
      case OP_VARIABLE:
         variable(store[program_register + 1], store[program_register + 2]);
         break;
      case OP_WRITE:
         write(store[program_register + 1]);
         break;
      default:
         runtime_error(" FATAL! Damaged Program File!");
         break;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl $0x0, 0xfb0(%rdi)
movb $0x1, 0xfb4(%rdi)
leaq -0x38(%rbp), %r15
movq 0x703a(%rip), %r14      # 0x18fc8
leaq 0x19f7(%rip), %r13      # 0x1398c
movslq 0xfb0(%rbx), %rax
movl (%rbx,%rax,4), %r12d
cmpb $0x1, 0xfb5(%rbx)
jne 0x12058
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
movq %rax, %r15
movl $0x1c, %edx
movq %rax, %rdi
leaq 0x1ac8(%rip), %rsi      # 0x13aae
callq 0x2210
movq %r12, %rax
shlq $0x5, %rax
leaq 0x7c77(%rip), %rcx      # 0x19c70
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq %r15, %rdi
callq 0x2210
movq %rax, %r15
movl $0xa, %edx
movq %rax, %rdi
leaq 0x1aaf(%rip), %rsi      # 0x13acb
callq 0x2210
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r15, %rdi
leaq -0x38(%rbp), %r15
callq 0x2030
movq %rax, %rdi
callq 0x2140
movq 0x6f85(%rip), %rdi      # 0x18fd8
callq 0x2220
cmpl $0x1a, %r12d
ja 0x123d3
movslq (%r13,%r12,4), %rax
addq %r13, %rax
jmpq *%rax
incl 0xfb0(%rbx)
movslq 0xfa8(%rbx), %rax
leaq -0x1(%rax), %rcx
movl %ecx, 0xfa8(%rbx)
movl (%rbx,%rax,4), %ecx
addl %ecx, -0x4(%rbx,%rax,4)
jmp 0x12422
incl 0xfb0(%rbx)
movslq 0xfa8(%rbx), %rcx
leaq -0x1(%rcx), %rax
movl %eax, 0xfa8(%rbx)
movl -0x4(%rbx,%rcx,4), %eax
cltd
idivl (%rbx,%rcx,4)
movl %edx, -0x4(%rbx,%rcx,4)
jmp 0x12422
incl 0xfb0(%rbx)
movslq 0xfa8(%rbx), %rax
leaq -0x1(%rax), %rcx
movl %ecx, 0xfa8(%rbx)
movl -0x4(%rbx,%rax,4), %ecx
xorl %edx, %edx
cmpl (%rbx,%rax,4), %ecx
setl %dl
jmp 0x12326
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movq %rbx, %rdi
callq 0x12b0a
jmp 0x12422
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %eax
movl %eax, 0xfb0(%rbx)
jmp 0x12422
incl 0xfb0(%rbx)
movslq 0xfa8(%rbx), %rax
leaq -0x1(%rax), %rcx
movl %ecx, 0xfa8(%rbx)
movl -0x4(%rbx,%rax,4), %ecx
xorl %edx, %edx
cmpl (%rbx,%rax,4), %ecx
setg %dl
jmp 0x12326
movb $0x0, 0xfb4(%rbx)
jmp 0x12422
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movl 0x8(%rbx,%rax,4), %edx
movq %rbx, %rdi
callq 0x12588
jmp 0x12422
movslq 0xfa8(%rbx), %rax
movslq (%rbx,%rax,4), %rcx
movl (%rbx,%rcx,4), %ecx
jmp 0x122f5
movslq 0xfb0(%rbx), %rcx
movslq 0xfa8(%rbx), %rax
cmpl $0x1, (%rbx,%rax,4)
je 0x12411
movl 0x4(%rbx,%rcx,4), %ecx
jmp 0x12414
movslq 0xfa8(%rbx), %rax
negl (%rbx,%rax,4)
jmp 0x122f8
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movq %rbx, %rdi
callq 0x129ec
jmp 0x12422
incl 0xfb0(%rbx)
movslq 0xfa8(%rbx), %rcx
leaq -0x1(%rcx), %rax
movl %eax, 0xfa8(%rbx)
movl -0x4(%rbx,%rcx,4), %eax
cltd
idivl (%rbx,%rcx,4)
movl %eax, -0x4(%rbx,%rcx,4)
jmp 0x12422
incl 0xfb0(%rbx)
movslq 0xfa8(%rbx), %rax
leaq -0x1(%rax), %rcx
movl %ecx, 0xfa8(%rbx)
cmpl $0x1, -0x4(%rbx,%rax,4)
je 0x12392
jmp 0x12422
incl 0xfb0(%rbx)
movslq 0xfa8(%rbx), %rax
leaq -0x1(%rax), %rcx
movl %ecx, 0xfa8(%rbx)
movl (%rbx,%rax,4), %ecx
imull -0x4(%rbx,%rax,4), %ecx
jmp 0x12395
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movl 0x8(%rbx,%rax,4), %r15d
jmp 0x1227e
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movl 0x8(%rbx,%rax,4), %edx
movq %rbx, %rdi
callq 0x12a40
jmp 0x12422
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movl 0x8(%rbx,%rax,4), %r15d
movl 0xfa4(%rbx), %eax
movl %eax, 0xfac(%rbx)
movl %eax, 0xfa8(%rbx)
addl $0x2, %esi
movq %rbx, %rdi
callq 0x12500
movl %r15d, 0xfb0(%rbx)
leaq -0x38(%rbp), %r15
jmp 0x12422
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movl 0x8(%rbx,%rax,4), %edx
movq %rbx, %rdi
callq 0x125e0
jmp 0x12422
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %r15d
movq %rbx, %rdi
movl $0x1, %esi
callq 0x12500
movslq 0xfa8(%rbx), %rax
movl %r15d, (%rbx,%rax,4)
leaq -0x38(%rbp), %r15
addl $0x2, 0xfb0(%rbx)
jmp 0x12422
movslq 0xfa8(%rbx), %rax
movl $0x1, %ecx
subl (%rbx,%rax,4), %ecx
movl %ecx, (%rbx,%rax,4)
incl 0xfb0(%rbx)
jmp 0x12422
incl 0xfb0(%rbx)
movslq 0xfa8(%rbx), %rax
leaq -0x1(%rax), %rcx
movl %ecx, 0xfa8(%rbx)
movl -0x4(%rbx,%rax,4), %ecx
xorl %edx, %edx
cmpl (%rbx,%rax,4), %ecx
sete %dl
movl %edx, -0x4(%rbx,%rax,4)
jmp 0x12422
movslq 0xfac(%rbx), %rax
leal -0x1(%rax), %ecx
movl %ecx, 0xfa8(%rbx)
movl 0x8(%rbx,%rax,4), %ecx
movl %ecx, 0xfb0(%rbx)
movl 0x4(%rbx,%rax,4), %eax
movl %eax, 0xfac(%rbx)
jmp 0x12422
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movq %rbx, %rdi
callq 0x128ba
jmp 0x12422
incl 0xfb0(%rbx)
movslq 0xfa8(%rbx), %rax
leaq -0x1(%rax), %rcx
movl %ecx, 0xfa8(%rbx)
cmpl $0x0, -0x4(%rbx,%rax,4)
jne 0x12422
movl (%rbx,%rax,4), %ecx
movl %ecx, -0x4(%rbx,%rax,4)
jmp 0x12422
incl 0xfb0(%rbx)
movslq 0xfa8(%rbx), %rax
leaq -0x1(%rax), %rcx
movl %ecx, 0xfa8(%rbx)
movl (%rbx,%rax,4), %ecx
subl %ecx, -0x4(%rbx,%rax,4)
jmp 0x12422
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movq %rbx, %rdi
callq 0x12940
jmp 0x12422
movq %r15, -0x48(%rbp)
leaq -0x48(%rbp), %r12
movq %r12, %rdi
leaq 0x16f1(%rip), %rsi      # 0x13ad6
leaq 0x1707(%rip), %rdx      # 0x13af3
callq 0x42ea
movq %rbx, %rdi
movq %r12, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x12458
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x12422
callq 0x21b0
jmp 0x12422
addl $0x2, %ecx
movl %ecx, 0xfb0(%rbx)
decl %eax
movl %eax, 0xfa8(%rbx)
cmpb $0x0, 0xfb4(%rbx)
jne 0x11f95
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x1244f
callq 0x21b0
movq %rbx, %rdi
callq 0x2310
nop