// File: /workspace/github_cpp_makefile_star2_O1/saeefahmad[P]MIPS-pipeline-simulator/pipeline.cpp
// Function: initialize(int)
void initialize(int choice) {
  int i;
  pc = 0;
  for (i = 0; i < TOTAL_REGISTER_TYPE; i++)
    registers[i] = 0;
  imem = new Instruction*[IMEMSIZE];
  assert(imem != NULL);
  for (i = 0; i < IMEMSIZE; i++)
    imem[i] = NULL;
  for (i = 0; i < DMEMSIZE ; i++)
    dmem[i] = 0;
  continueSimulation = true;
  clockCycle = 1;
  AbstractStage::setPtrGetPc(&getPc);
  AbstractStage::setPtrSetPc(&setPc);
  AbstractStage::setPtrResolveDependence(&resolveDependence);
  AbstractStage::setPtrGetInstrCount(&getInstrCount);
  AbstractStage::setPtrSetInstrCount(&setInstrCount);
  AbstractStage::setPtrGetNextIns(&getNextIns);
  AbstractStage::setPtrGetCurrentIns(&getCurrentIns);
  AbstractStage::setPtrGetReg(&getReg);
  AbstractStage::setPtrSetReg(&setReg);
  AbstractStage::setPtrGetData(&getData);
  AbstractStage::setPtrSetData(&setData);
  AbstractStage::setPtrStopSimulation(&stopSimulation);
  AbstractStage::setPtrGetCycle(&getCycle);
  AbstractStage::setPtrIncStatistics(&incStatistics);

  // Load program
  switch (choice) {
  // Program 1
  case 1:
    i = 0;
    imem[i] = new Instruction(ADDI, R1, R0, 10, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R5, R0, 2, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R2, R0, 196, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R3, R0, 396, i);
    i+=4;
    imem[i/4] = new Instruction(ST, R1, R2, 0, i);
    i+=4;
    imem[i/4] = new Instruction(MUL, R4, R1, R5, i);
    i+=4;
    imem[i/4] = new Instruction(ST, R4, R3, 0, i);
    i+=4;
    imem[i/4] = new Instruction(SUBI, R2, R2, 4, i);
    i+=4;
    imem[i/4] = new Instruction(SUBI, R3, R3, 4, i);
    i+=4;
    imem[i/4] = new Instruction(SUBI, R1, R1, 1, i);
    i+=4;
    imem[i/4] = new Instruction(BNEQZ, R1, -7, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R1, R0, 10, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R2, R0, 196, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R3, R0, 396, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R4, R0, 596, i);
    i+=4;
    imem[i/4] = new Instruction(LD, R5, R2, 0, i);
    i+=4;
    imem[i/4] = new Instruction(LD, R6, R3, 0, i);
    i+=4;
    imem[i/4] = new Instruction(ADD, R5, R5, R6, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R7, R0, 4, i);
    i+=4;
    imem[i/4] = new Instruction(DIV, R5, R5, R7, i);
    i+=4;
    imem[i/4] = new Instruction(ST, R5, R4, 0, i);
    i+=4;
    imem[i/4] = new Instruction(SUBI, R2, R2, 4, i);
    i+=4;
    imem[i/4] = new Instruction(SUBI, R3, R3, 4, i);
    i+=4;
    imem[i/4] = new Instruction(SUBI, R4, R4, 4, i);
    i+=4;
    imem[i/4] = new Instruction(SUBI, R1, R1, 1, i);
    i+=4;
    imem[i/4] = new Instruction(BNEQZ, R1, -11, i);
    i+=4;
    imem[i/4] = new Instruction(HLT, i);
    setInstrCount(i/4+1);
    break; 
  
  // Program 2
  case 2:
    i = 0;
    imem[i] = new Instruction(ADDI, R7, R0, 0, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R1, R0, 1, i);
    i+=4;
    imem[i/4] = new Instruction(SUBI, R2, R1, 10, i);
    i+=4;
    imem[i/4] = new Instruction(BEQZ, R2, 12, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R3, R0, 1, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R4, R0, 1, i);
    i+=4;
    imem[i/4] = new Instruction(SUB, R2, R4, R1, i);
    i+=4;
    imem[i/4] = new Instruction(SUBI, R2, R2, 1, i);
    i+=4;
    imem[i/4] = new Instruction(BEQZ, R2, 3, i);
    i+=4;
    imem[i/4] = new Instruction(MUL, R3, R3, R4, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R4, R4, 1, i);
    i+=4;
    imem[i/4] = new Instruction(BEQZ, R0, -6, i);
    i+=4;
    imem[i/4] = new Instruction(ST, R3, R7, 0, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R7, R7, 4, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R1, R1, 1, i);
    i+=4;
    imem[i/4] = new Instruction(BEQZ, R0, -14, i);
    i+=4;
    imem[i/4] = new Instruction(HLT, i);
    setInstrCount(i/4+1);
    break;
  
  // Program 3
  case 3:
    i = 0;
    imem[i] = new Instruction(ADDI, R1, R0, 10, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R1, R0, 8, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R1, R0, 16, i);
    i+=4;
    imem[i/4] = new Instruction(ST, R1, R1, 4, i);
    i+=4;
    imem[i/4] = new Instruction(HLT, i);
    setInstrCount(i/4 + 1);
    break; 
   
  // Program 4
  case 4:
    i = 0;
    imem[i] = new Instruction(ADDI, R4, R0, 0, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R1, R0, 0, i);
    i+=4;
    imem[i/4] = new Instruction(SUBI, R5, R1, 10, i);
    i+=4;
    imem[i/4] = new Instruction(BEQZ, R5, 13, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R2, R0, 0, i);
    i+=4;
    imem[i/4] = new Instruction(SUBI, R5, R2, 10, i);
    i+=4;
    imem[i/4] = new Instruction(BEQZ, R5, 8, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R3, R0, 0, i);
    i+=4;
    imem[i/4] = new Instruction(SUBI, R5, R3, 5, i);
    i+=4;
    imem[i/4] = new Instruction(BEQZ, R5, 3, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R4, R4, 1, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R3, R3, 1, i);
    i+=4;
    imem[i/4] = new Instruction(BEQZ, R0, -5, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R2, R2, 1, i);
    i+=4;
    imem[i/4] = new Instruction(BEQZ, R0, -10, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R1, R1, 1, i);
    i+=4;
    imem[i/4] = new Instruction(BEQZ, R0, -15, i);
    i+=4;
    imem[i/4] = new Instruction(HLT, i);
    setInstrCount(i/4+1);
    break;
  
  // Program 5
  case 5:
    i = 0;
    imem[i] = new Instruction(ADDI, R1, R0, 0, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R2, R0, 1023, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R3, R0, 1, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R7, R0, 2, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R4, R0, 0, i);
    i+=4;
    imem[i/4] = new Instruction(SUBI, R5, R4, 32, i);
    i+=4;
    imem[i/4] = new Instruction(BEQZ, R5, 6, i);
    i+=4;
    imem[i/4] = new Instruction(AND, R6, R2, R3, i);
    i+=4;
    imem[i/4] = new Instruction(BEQZ, R6, 1, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R1, R1, 1, i);
    i+=4;
    imem[i/4] = new Instruction(MUL, R3, R3, R7, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R4, R4, 1, i);
    i+=4;
    imem[i/4] = new Instruction(BEQZ, R0, -8, i);
    i+=4;
    imem[i/4] = new Instruction(HLT, i);
    setInstrCount(i/4+1);
    break;

  //Program 6
  case 6:
    i = 0;
    imem[i] = new Instruction(ADDI, R1, R0, 0, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R2, R0, 1, i);
    i+=4;
    imem[i/4] = new Instruction(ADDI, R5, R0, 10, i);
    i+=4;
    imem[i/4] = new Instruction(ADD, R3, R1, R2, i);
    i+=4;
    imem[i/4] = new Instruction(ADD, R1, R2, R0, i);
    i+=4;
    imem[i/4] = new Instruction(ADD, R2, R3, R0, i);
    i+=4;
    imem[i/4] = new Instruction(SUBI, R5, R5, 1, i);
    i+=4;
    imem[i/4] = new Instruction(BNEQZ, R5, -5, i);
    i+=4;
    imem[i/4] = new Instruction(ST, R3, R0, 0, i);
    i+=4;
    imem[i/4] = new Instruction(HLT, i);
    setInstrCount(i/4+1);
    break;

  default:
    cout << "No program exists!!!"<< endl;
    assert(0);
    break;
  }
  
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
movl $0x0, 0x5809(%rip)      # 0x8104
xorps %xmm0, %xmm0
movaps %xmm0, 0x580b(%rip)     # 0x8110
movaps %xmm0, 0x5814(%rip)     # 0x8120
movl $0x800, %edi            # imm = 0x800
callq 0x2030
movq %rax, 0x5813(%rip)      # 0x8130
xorl %eax, %eax
movq 0x580a(%rip), %rcx      # 0x8130
movq $0x0, (%rcx,%rax,8)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x291f
leaq 0x5800(%rip), %rdi      # 0x8140
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x2080
movb $0x1, 0x5bed(%rip)      # 0x8540
movl $0x1, 0x5be7(%rip)      # 0x8544
leaq 0x1686(%rip), %rax      # 0x3fea
leaq 0x5d7d(%rip), %rcx      # 0x86e8
movq %rax, (%rcx)
leaq 0x167c(%rip), %rax      # 0x3ff1
leaq 0x5d74(%rip), %rcx      # 0x86f0
movq %rax, (%rcx)
leaq 0x1672(%rip), %rax      # 0x3ff8
leaq 0x5d73(%rip), %rcx      # 0x8700
movq %rax, (%rcx)
leaq 0x1721(%rip), %rax      # 0x40b8
leaq 0x5d5a(%rip), %rcx      # 0x86f8
movq %rax, (%rcx)
leaq 0x1717(%rip), %rax      # 0x40bf
leaq 0x5d59(%rip), %rcx      # 0x8708
movq %rax, (%rcx)
leaq 0x170d(%rip), %rax      # 0x40c6
leaq 0x5d50(%rip), %rcx      # 0x8710
movq %rax, (%rcx)
leaq 0x1739(%rip), %rax      # 0x4103
leaq 0x5d47(%rip), %rcx      # 0x8718
movq %rax, (%rcx)
leaq 0x15ae(%rip), %rax      # 0x3f89
leaq 0x5d3e(%rip), %rcx      # 0x8720
movq %rax, (%rcx)
leaq 0x1732(%rip), %rax      # 0x411e
leaq 0x5d35(%rip), %rcx      # 0x8728
movq %rax, (%rcx)
leaq 0x172e(%rip), %rax      # 0x412b
leaq 0x5d2c(%rip), %rcx      # 0x8730
movq %rax, (%rcx)
leaq 0x172e(%rip), %rax      # 0x413c
leaq 0x5d23(%rip), %rcx      # 0x8738
movq %rax, (%rcx)
leaq 0x172e(%rip), %rax      # 0x414d
leaq 0x5d1a(%rip), %rcx      # 0x8740
movq %rax, (%rcx)
leaq 0x1725(%rip), %rax      # 0x4155
leaq 0x5d11(%rip), %rcx      # 0x8748
movq %rax, (%rcx)
leaq 0x171b(%rip), %rax      # 0x415c
leaq 0x5d08(%rip), %rcx      # 0x8750
movq %rax, (%rcx)
decl %ebx
cmpl $0x5, %ebx
ja 0x3e35
leaq 0x25a7(%rip), %rax      # 0x5004
movslq (%rax,%rbx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x1, %edx
xorl %ecx, %ecx
movl $0xa, %r8d
xorl %r9d, %r9d
callq 0x4a08
movq 0x5699(%rip), %rax      # 0x8130
movq %rbx, (%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x5, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
movl $0x4, %r9d
callq 0x4a08
movq 0x5662(%rip), %rax      # 0x8130
movq %rbx, 0x8(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x2, %edx
xorl %ecx, %ecx
movl $0xc4, %r8d
movl $0x8, %r9d
callq 0x4a08
movq 0x562a(%rip), %rax      # 0x8130
movq %rbx, 0x10(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x18c, %r8d            # imm = 0x18C
movl $0xc, %r9d
callq 0x4a08
movq 0x55f2(%rip), %rax      # 0x8130
movq %rbx, 0x18(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xb, %esi
movl $0x1, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
movl $0x10, %r9d
callq 0x4a08
movq 0x55ba(%rip), %rax      # 0x8130
movq %rbx, 0x20(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x3, %esi
movl $0x4, %edx
movl $0x1, %ecx
movl $0x5, %r8d
movl $0x14, %r9d
callq 0x4a2c
movq 0x557f(%rip), %rax      # 0x8130
movq %rbx, 0x28(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xb, %esi
movl $0x4, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
movl $0x18, %r9d
callq 0x4a08
movq 0x5547(%rip), %rax      # 0x8130
movq %rbx, 0x30(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x9, %esi
movl $0x2, %edx
movl $0x2, %ecx
movl $0x4, %r8d
movl $0x1c, %r9d
callq 0x4a08
movq 0x550c(%rip), %rax      # 0x8130
movq %rbx, 0x38(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x9, %esi
movl $0x3, %edx
movl $0x3, %ecx
movl $0x4, %r8d
movl $0x20, %r9d
callq 0x4a08
movq 0x54d1(%rip), %rax      # 0x8130
movq %rbx, 0x40(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x9, %esi
movl $0x1, %edx
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x24, %r9d
callq 0x4a08
movq 0x5496(%rip), %rax      # 0x8130
movq %rbx, 0x48(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xd, %esi
movl $0x1, %edx
movl $0xfffffff9, %ecx       # imm = 0xFFFFFFF9
movl $0x28, %r8d
callq 0x49e0
movq 0x5461(%rip), %rax      # 0x8130
movq %rbx, 0x50(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x1, %edx
xorl %ecx, %ecx
movl $0xa, %r8d
movl $0x2c, %r9d
callq 0x4a08
movq 0x5429(%rip), %rax      # 0x8130
movq %rbx, 0x58(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x2, %edx
xorl %ecx, %ecx
movl $0xc4, %r8d
movl $0x30, %r9d
callq 0x4a08
movq 0x53f1(%rip), %rax      # 0x8130
movq %rbx, 0x60(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x18c, %r8d            # imm = 0x18C
movl $0x34, %r9d
callq 0x4a08
movq 0x53b9(%rip), %rax      # 0x8130
movq %rbx, 0x68(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x4, %edx
xorl %ecx, %ecx
movl $0x254, %r8d            # imm = 0x254
movl $0x38, %r9d
callq 0x4a08
movq 0x5381(%rip), %rax      # 0x8130
movq %rbx, 0x70(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xa, %esi
movl $0x5, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
movl $0x3c, %r9d
callq 0x4a08
movq 0x5349(%rip), %rax      # 0x8130
movq %rbx, 0x78(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xa, %esi
movl $0x6, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
movl $0x40, %r9d
callq 0x4a08
movq 0x5311(%rip), %rax      # 0x8130
movq %rbx, 0x80(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x1, %esi
movl $0x5, %edx
movl $0x5, %ecx
movl $0x6, %r8d
movl $0x44, %r9d
callq 0x4a2c
movq 0x52d3(%rip), %rax      # 0x8130
movq %rbx, 0x88(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x7, %edx
xorl %ecx, %ecx
movl $0x4, %r8d
movl $0x48, %r9d
callq 0x4a08
movq 0x5298(%rip), %rax      # 0x8130
movq %rbx, 0x90(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x4, %esi
movl $0x5, %edx
movl $0x5, %ecx
movl $0x7, %r8d
movl $0x4c, %r9d
callq 0x4a2c
movq 0x525a(%rip), %rax      # 0x8130
movq %rbx, 0x98(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xb, %esi
movl $0x5, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
movl $0x50, %r9d
callq 0x4a08
movq 0x521f(%rip), %rax      # 0x8130
movq %rbx, 0xa0(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x9, %esi
movl $0x2, %edx
movl $0x2, %ecx
movl $0x4, %r8d
movl $0x54, %r9d
callq 0x4a08
movq 0x51e1(%rip), %rax      # 0x8130
movq %rbx, 0xa8(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x9, %esi
movl $0x3, %edx
movl $0x3, %ecx
movl $0x4, %r8d
movl $0x58, %r9d
callq 0x4a08
movq 0x51a3(%rip), %rax      # 0x8130
movq %rbx, 0xb0(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x9, %esi
movl $0x4, %edx
movl $0x4, %ecx
movl $0x4, %r8d
movl $0x5c, %r9d
callq 0x4a08
movq 0x5165(%rip), %rax      # 0x8130
movq %rbx, 0xb8(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x9, %esi
movl $0x1, %edx
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x60, %r9d
callq 0x4a08
movq 0x5127(%rip), %rax      # 0x8130
movq %rbx, 0xc0(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xd, %esi
movl $0x1, %edx
movl $0xfffffff5, %ecx       # imm = 0xFFFFFFF5
movl $0x64, %r8d
callq 0x49e0
movq 0x50ef(%rip), %rax      # 0x8130
movq %rbx, 0xc8(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xe, %esi
movl $0x68, %edx
callq 0x49c4
movl $0x1b, %ebp
movl $0xd0, %r14d
jmp 0x3e1f
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x4a08
movq 0x508b(%rip), %rax      # 0x8130
movq %rbx, (%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x2, %edx
xorl %ecx, %ecx
movl $0x3ff, %r8d            # imm = 0x3FF
movl $0x4, %r9d
callq 0x4a08
movq 0x5054(%rip), %rax      # 0x8130
movq %rbx, 0x8(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
movl $0x8, %r9d
callq 0x4a08
movq 0x501c(%rip), %rax      # 0x8130
movq %rbx, 0x10(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x7, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
movl $0xc, %r9d
callq 0x4a08
movq 0x4fe4(%rip), %rax      # 0x8130
movq %rbx, 0x18(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x4, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x10, %r9d
callq 0x4a08
movq 0x4faf(%rip), %rax      # 0x8130
movq %rbx, 0x20(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x9, %esi
movl $0x5, %edx
movl $0x4, %ecx
movl $0x20, %r8d
movl $0x14, %r9d
callq 0x4a08
movq 0x4f74(%rip), %rax      # 0x8130
movq %rbx, 0x28(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xc, %esi
movl $0x5, %edx
movl $0x6, %ecx
movl $0x18, %r8d
callq 0x49e0
movq 0x4f3f(%rip), %rax      # 0x8130
movq %rbx, 0x30(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x6, %esi
movl $0x6, %edx
movl $0x2, %ecx
movl $0x3, %r8d
movl $0x1c, %r9d
callq 0x4a2c
movq 0x4f04(%rip), %rax      # 0x8130
movq %rbx, 0x38(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xc, %esi
movl $0x6, %edx
movl $0x1, %ecx
movl $0x20, %r8d
callq 0x49e0
movq 0x4ecf(%rip), %rax      # 0x8130
movq %rbx, 0x40(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x1, %edx
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x24, %r9d
callq 0x4a08
movq 0x4e94(%rip), %rax      # 0x8130
movq %rbx, 0x48(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x3, %esi
movl $0x3, %edx
movl $0x3, %ecx
movl $0x7, %r8d
movl $0x28, %r9d
callq 0x4a2c
movq 0x4e59(%rip), %rax      # 0x8130
movq %rbx, 0x50(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x4, %edx
movl $0x4, %ecx
movl $0x1, %r8d
movl $0x2c, %r9d
callq 0x4a08
movq 0x4e1e(%rip), %rax      # 0x8130
movq %rbx, 0x58(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xc, %esi
xorl %edx, %edx
movl $0xfffffff8, %ecx       # imm = 0xFFFFFFF8
movl $0x30, %r8d
callq 0x49e0
movq 0x4dec(%rip), %rax      # 0x8130
movq %rbx, 0x60(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movl $0xe, %ebp
movl $0x68, %r14d
movq %rax, %rdi
movl $0xe, %esi
movl $0x34, %edx
callq 0x49c4
jmp 0x3e1f
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x1, %edx
xorl %ecx, %ecx
movl $0xa, %r8d
xorl %r9d, %r9d
callq 0x4a08
movq 0x4d88(%rip), %rax      # 0x8130
movq %rbx, (%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x1, %edx
xorl %ecx, %ecx
movl $0x8, %r8d
movl $0x4, %r9d
callq 0x4a08
movq 0x4d51(%rip), %rax      # 0x8130
movq %rbx, 0x8(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x1, %edx
xorl %ecx, %ecx
movl $0x10, %r8d
movl $0x8, %r9d
callq 0x4a08
movq 0x4d19(%rip), %rax      # 0x8130
movq %rbx, 0x10(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xb, %esi
movl $0x1, %edx
movl $0x1, %ecx
movl $0x4, %r8d
movl $0xc, %r9d
callq 0x4a08
movq 0x4cde(%rip), %rax      # 0x8130
movq %rbx, 0x18(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xe, %esi
movl $0x10, %edx
callq 0x49c4
movl $0x5, %ebp
movl $0x20, %r14d
jmp 0x3e1f
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x4, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x4a08
movq 0x4c7d(%rip), %rax      # 0x8130
movq %rbx, (%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x4, %r9d
callq 0x4a08
movq 0x4c49(%rip), %rax      # 0x8130
movq %rbx, 0x8(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x9, %esi
movl $0x5, %edx
movl $0x1, %ecx
movl $0xa, %r8d
movl $0x8, %r9d
callq 0x4a08
movq 0x4c0e(%rip), %rax      # 0x8130
movq %rbx, 0x10(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xc, %esi
movl $0x5, %edx
movl $0xd, %ecx
movl $0xc, %r8d
callq 0x49e0
movq 0x4bd9(%rip), %rax      # 0x8130
movq %rbx, 0x18(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x2, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x10, %r9d
callq 0x4a08
movq 0x4ba4(%rip), %rax      # 0x8130
movq %rbx, 0x20(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x9, %esi
movl $0x5, %edx
movl $0x2, %ecx
movl $0xa, %r8d
movl $0x14, %r9d
callq 0x4a08
movq 0x4b69(%rip), %rax      # 0x8130
movq %rbx, 0x28(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xc, %esi
movl $0x5, %edx
movl $0x8, %ecx
movl $0x18, %r8d
callq 0x49e0
movq 0x4b34(%rip), %rax      # 0x8130
movq %rbx, 0x30(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x3, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1c, %r9d
callq 0x4a08
movq 0x4aff(%rip), %rax      # 0x8130
movq %rbx, 0x38(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x9, %esi
movl $0x5, %edx
movl $0x3, %ecx
movl $0x5, %r8d
movl $0x20, %r9d
callq 0x4a08
movq 0x4ac4(%rip), %rax      # 0x8130
movq %rbx, 0x40(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xc, %esi
movl $0x5, %edx
movl $0x3, %ecx
movl $0x24, %r8d
callq 0x49e0
movq 0x4a8f(%rip), %rax      # 0x8130
movq %rbx, 0x48(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x4, %edx
movl $0x4, %ecx
movl $0x1, %r8d
movl $0x28, %r9d
callq 0x4a08
movq 0x4a54(%rip), %rax      # 0x8130
movq %rbx, 0x50(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x3, %edx
movl $0x3, %ecx
movl $0x1, %r8d
movl $0x2c, %r9d
callq 0x4a08
movq 0x4a19(%rip), %rax      # 0x8130
movq %rbx, 0x58(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xc, %esi
xorl %edx, %edx
movl $0xfffffffb, %ecx       # imm = 0xFFFFFFFB
movl $0x30, %r8d
callq 0x49e0
movq 0x49e7(%rip), %rax      # 0x8130
movq %rbx, 0x60(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x2, %edx
movl $0x2, %ecx
movl $0x1, %r8d
movl $0x34, %r9d
callq 0x4a08
movq 0x49ac(%rip), %rax      # 0x8130
movq %rbx, 0x68(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xc, %esi
xorl %edx, %edx
movl $0xfffffff6, %ecx       # imm = 0xFFFFFFF6
movl $0x38, %r8d
callq 0x49e0
movq 0x497a(%rip), %rax      # 0x8130
movq %rbx, 0x70(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x1, %edx
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x3c, %r9d
callq 0x4a08
movq 0x493f(%rip), %rax      # 0x8130
movq %rbx, 0x78(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xc, %esi
xorl %edx, %edx
movl $0xfffffff1, %ecx       # imm = 0xFFFFFFF1
movl $0x40, %r8d
callq 0x49e0
movq 0x490d(%rip), %rax      # 0x8130
movq %rbx, 0x80(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xe, %esi
movl $0x44, %edx
callq 0x49c4
movl $0x12, %ebp
movl $0x88, %r14d
jmp 0x3e1f
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x7, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x4a08
movq 0x48a9(%rip), %rax      # 0x8130
movq %rbx, (%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x1, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
movl $0x4, %r9d
callq 0x4a08
movq 0x4872(%rip), %rax      # 0x8130
movq %rbx, 0x8(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x9, %esi
movl $0x2, %edx
movl $0x1, %ecx
movl $0xa, %r8d
movl $0x8, %r9d
callq 0x4a08
movq 0x4837(%rip), %rax      # 0x8130
movq %rbx, 0x10(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xc, %esi
movl $0x2, %edx
movl $0xc, %ecx
movl $0xc, %r8d
callq 0x49e0
movq 0x4802(%rip), %rax      # 0x8130
movq %rbx, 0x18(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
movl $0x10, %r9d
callq 0x4a08
movq 0x47ca(%rip), %rax      # 0x8130
movq %rbx, 0x20(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x4, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
movl $0x14, %r9d
callq 0x4a08
movq 0x4792(%rip), %rax      # 0x8130
movq %rbx, 0x28(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x2, %esi
movl $0x2, %edx
movl $0x4, %ecx
movl $0x1, %r8d
movl $0x18, %r9d
callq 0x4a2c
movq 0x4757(%rip), %rax      # 0x8130
movq %rbx, 0x30(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x9, %esi
movl $0x2, %edx
movl $0x2, %ecx
movl $0x1, %r8d
movl $0x1c, %r9d
callq 0x4a08
movq 0x471c(%rip), %rax      # 0x8130
movq %rbx, 0x38(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xc, %esi
movl $0x2, %edx
movl $0x3, %ecx
movl $0x20, %r8d
callq 0x49e0
movq 0x46e7(%rip), %rax      # 0x8130
movq %rbx, 0x40(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x3, %esi
movl $0x3, %edx
movl $0x3, %ecx
movl $0x4, %r8d
movl $0x24, %r9d
callq 0x4a2c
movq 0x46ac(%rip), %rax      # 0x8130
movq %rbx, 0x48(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x4, %edx
movl $0x4, %ecx
movl $0x1, %r8d
movl $0x28, %r9d
callq 0x4a08
movq 0x4671(%rip), %rax      # 0x8130
movq %rbx, 0x50(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xc, %esi
xorl %edx, %edx
movl $0xfffffffa, %ecx       # imm = 0xFFFFFFFA
movl $0x2c, %r8d
callq 0x49e0
movq 0x463f(%rip), %rax      # 0x8130
movq %rbx, 0x58(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xb, %esi
movl $0x3, %edx
movl $0x7, %ecx
xorl %r8d, %r8d
movl $0x30, %r9d
callq 0x4a08
movq 0x4607(%rip), %rax      # 0x8130
movq %rbx, 0x60(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x7, %edx
movl $0x7, %ecx
movl $0x4, %r8d
movl $0x34, %r9d
callq 0x4a08
movq 0x45cc(%rip), %rax      # 0x8130
movq %rbx, 0x68(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x1, %edx
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x38, %r9d
callq 0x4a08
movq 0x4591(%rip), %rax      # 0x8130
movq %rbx, 0x70(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xc, %esi
xorl %edx, %edx
movl $0xfffffff2, %ecx       # imm = 0xFFFFFFF2
movl $0x3c, %r8d
callq 0x49e0
movq 0x455f(%rip), %rax      # 0x8130
movq %rbx, 0x78(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xe, %esi
movl $0x40, %edx
callq 0x49c4
movl $0x11, %ebp
movl $0x80, %r14d
jmp 0x3e1f
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x4a08
movq 0x44fe(%rip), %rax      # 0x8130
movq %rbx, (%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x2, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
movl $0x4, %r9d
callq 0x4a08
movq 0x44c7(%rip), %rax      # 0x8130
movq %rbx, 0x8(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x8, %esi
movl $0x5, %edx
xorl %ecx, %ecx
movl $0xa, %r8d
movl $0x8, %r9d
callq 0x4a08
movq 0x448f(%rip), %rax      # 0x8130
movq %rbx, 0x10(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x1, %esi
movl $0x3, %edx
movl $0x1, %ecx
movl $0x2, %r8d
movl $0xc, %r9d
callq 0x4a2c
movq 0x4454(%rip), %rax      # 0x8130
movq %rbx, 0x18(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x1, %esi
movl $0x1, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
movl $0x10, %r9d
callq 0x4a2c
movq 0x441c(%rip), %rax      # 0x8130
movq %rbx, 0x20(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x1, %esi
movl $0x2, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
movl $0x14, %r9d
callq 0x4a2c
movq 0x43e4(%rip), %rax      # 0x8130
movq %rbx, 0x28(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0x9, %esi
movl $0x5, %edx
movl $0x5, %ecx
movl $0x1, %r8d
movl $0x18, %r9d
callq 0x4a08
movq 0x43a9(%rip), %rax      # 0x8130
movq %rbx, 0x30(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xd, %esi
movl $0x5, %edx
movl $0xfffffffb, %ecx       # imm = 0xFFFFFFFB
movl $0x1c, %r8d
callq 0x49e0
movq 0x4374(%rip), %rax      # 0x8130
movq %rbx, 0x38(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xb, %esi
movl $0x3, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x20, %r9d
callq 0x4a08
movq 0x433f(%rip), %rax      # 0x8130
movq %rbx, 0x40(%rax)
movl $0x5c, %edi
callq 0x2100
movq %rax, %rbx
movq %rax, %rdi
movl $0xe, %esi
movl $0x24, %edx
callq 0x49c4
movl $0xa, %ebp
movl $0x48, %r14d
movq 0x430a(%rip), %rax      # 0x8130
movq %rbx, (%rax,%r14)
movl %ebp, 0x4830(%rip)      # 0x8660
popq %rbx
popq %r14
popq %rbp
retq
movq 0x419c(%rip), %rdi      # 0x7fd8
leaq 0x1288(%rip), %rsi      # 0x50cb
callq 0x20f0
movq %rax, %rdi
callq 0x2070
leaq 0x1289(%rip), %rdi      # 0x50e0
leaq 0x124b(%rip), %rsi      # 0x50a9
leaq 0x1251(%rip), %rcx      # 0x50b6
movl $0x15a, %edx            # imm = 0x15A
callq 0x2090
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
jmp 0x3f71
movq %rax, %r14
movl $0x5c, %esi
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2180