// File: /workspace/github_cpp_makefile_star2_O2/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
andl $0x0, 0xfb0(%rdi)
movb $0x1, 0xfb4(%rdi)
movb $0x1, %al
movq 0x7447(%rip), %r13      # 0x14fd8
leaq -0x50(%rbp), %r12
leaq 0x1de0(%rip), %r14      # 0xf97c
testb $0x1, %al
je 0xde4f
movslq 0xfb0(%rbx), %rax
movl (%rbx,%rax,4), %r15d
cmpb $0x1, 0xfb5(%rbx)
jne 0xdc0b
movq 0x7409(%rip), %rdi      # 0x14fc8
callq 0x20f0
movq %rax, %rdi
leaq 0x1ed0(%rip), %rsi      # 0xfa9e
callq 0x21a0
movq %r15, %rsi
shlq $0x5, %rsi
leaq 0x806f(%rip), %rcx      # 0x15c50
addq %rcx, %rsi
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
leaq 0x1ec5(%rip), %rsi      # 0xfabb
callq 0x21a0
movq %rax, %rdi
callq 0x20f0
movq %r13, %rdi
callq 0x21f0
cmpl $0x1a, %r15d
ja 0xde1b
movslq (%r14,%r15,4), %rax
addq %r14, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0xe13a
jmp 0xde44
movq %rbx, %rdi
callq 0xe0fa
jmp 0xde44
movq %rbx, %rdi
callq 0xe182
jmp 0xde44
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movq %rbx, %rdi
callq 0xe472
jmp 0xde44
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %eax
movl %eax, 0xfb0(%rbx)
jmp 0xde44
movq %rbx, %rdi
callq 0xe1de
jmp 0xde44
movb $0x0, 0xfb4(%rbx)
jmp 0xde44
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movl 0x8(%rbx,%rax,4), %edx
movq %rbx, %rdi
callq 0xdf54
jmp 0xde44
movslq 0xfa8(%rbx), %rax
movslq (%rbx,%rax,4), %rcx
movl (%rbx,%rcx,4), %ecx
jmp 0xddbe
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movq %rbx, %rdi
callq 0xe43a
jmp 0xde44
movslq 0xfa8(%rbx), %rax
negl (%rbx,%rax,4)
jmp 0xddc1
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movq %rbx, %rdi
callq 0xe364
jmp 0xde44
movq %rbx, %rdi
callq 0xe0d0
jmp 0xde44
movq %rbx, %rdi
callq 0xe20c
jmp 0xde44
movq %rbx, %rdi
callq 0xe0a6
jmp 0xde44
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movl 0x8(%rbx,%rax,4), %r15d
movq %rbx, %rdi
callq 0xdee6
movl %r15d, 0xfb0(%rbx)
jmp 0xde44
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movl 0x8(%rbx,%rax,4), %edx
movq %rbx, %rdi
callq 0xe3b0
jmp 0xde44
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movl 0x8(%rbx,%rax,4), %edx
movq %rbx, %rdi
callq 0xe518
jmp 0xde44
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movl 0x8(%rbx,%rax,4), %edx
movq %rbx, %rdi
callq 0xdfa6
jmp 0xde44
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movq %rbx, %rdi
callq 0xe03e
jmp 0xde44
movslq 0xfa8(%rbx), %rax
pushq $0x1
popq %rcx
subl (%rbx,%rax,4), %ecx
movl %ecx, (%rbx,%rax,4)
incl 0xfb0(%rbx)
jmp 0xde44
movq %rbx, %rdi
callq 0xe1b0
jmp 0xde44
movq %rbx, %rdi
callq 0xe4ee
jmp 0xde44
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movq %rbx, %rdi
callq 0xe264
jmp 0xde44
movq %rbx, %rdi
callq 0xe238
jmp 0xde44
movq %rbx, %rdi
callq 0xe15e
jmp 0xde44
movslq 0xfb0(%rbx), %rax
movl 0x4(%rbx,%rax,4), %esi
movq %rbx, %rdi
callq 0xe2e4
jmp 0xde44
movq %r12, %rdi
leaq 0x1ca1(%rip), %rsi      # 0xfac6
leaq -0x29(%rbp), %rdx
callq 0x20a0
movq %rbx, %rdi
movq %r12, %rsi
pushq $-0x1
popq %rdx
callq 0xde72
movq %r12, %rdi
callq 0x20d0
movb 0xfb4(%rbx), %al
jmp 0xdb9c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x22e0