// File: czmccrory[P]ManchesterBaby/baby.cpp
// Function: ManchesterBaby::output()
void ManchesterBaby::output() {

	clrscr();
  cout<< "Store:" <<endl;
  for (size_t i = 0; i < store.size(); ++i)
  {
    //Print line
    cout << i << '\t';// << flush;
    store.at(i).print();
  }

  cout <<""<<endl;
  cout<< "Present Instruction" << "\n\t";
  presentInstruction.printNoEndl();//print the mnemonic for the present instrcution
  cout << '\t' << presentMnemonic << endl; 


  cout << "" <<endl;
  cout << "Control Instruction" <<"\n\t";
  Line ci; // create a new line
  ci.setDecVector(instructionCounter);  //set the value at this line to the instruction counter
  ci.printNoEndl();
  cout << '\t' <<  ci.getDecVector() <<endl; //print the decimal value too

  cout << "" <<endl;
  cout << "Accumulator" <<"\n\t";
  accumulator.printNoEndl();
  cout << '\t' <<  accumulator.getDecVector() <<endl;
  cout << "\nPress enter to see the next cycle, or input any other key to exit." <<endl;

  if (!stopLamp){
  	cout << "Stop Lamp: " << "\033[1;34mOFF\033[0m\n"<<endl; //blue OFF
  }else{
  	cout << "Stop Lamp: " << "\033[1;31mON\033[0m\n"<<endl; //red ON
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x4770
movq 0xb32d(%rip), %rdi      # 0xffc0
leaq 0x644f(%rip), %rsi      # 0xb0e9
callq 0x3210
movq %rax, %rdi
movq 0xb307(%rip), %rsi      # 0xffb0
callq 0x3240
movq $0x0, -0x10(%rbp)
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0x5d10
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jae 0x4d13
movq -0x10(%rbp), %rsi
movq 0xb2e2(%rip), %rdi      # 0xffc0
callq 0x3070
movq %rax, %rdi
movl $0x9, %esi
callq 0x32b0
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5b60
movq %rax, %rdi
callq 0x7890
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x4cb6
movq 0xb2a6(%rip), %rdi      # 0xffc0
movq %rdi, -0x50(%rbp)
leaq 0x63e1(%rip), %rsi      # 0xb106
movq %rsi, -0x60(%rbp)
callq 0x3210
movq %rax, %rdi
movq 0xb278(%rip), %rsi      # 0xffb0
movq %rsi, -0x58(%rbp)
callq 0x3240
movq -0x50(%rbp), %rdi
leaq 0x63a4(%rip), %rsi      # 0xb0f0
callq 0x3210
movq %rax, %rdi
leaq 0x63a9(%rip), %rsi      # 0xb104
movq %rsi, -0x48(%rbp)
callq 0x3210
movq -0x30(%rbp), %rdi
addq $0x18, %rdi
callq 0x7870
movq -0x50(%rbp), %rdi
movl $0x9, %esi
callq 0x32b0
movq -0x30(%rbp), %rsi
movq %rax, %rdi
addq $0x38, %rsi
callq 0x3200
movq -0x58(%rbp), %rsi
movq %rax, %rdi
callq 0x3240
movq -0x60(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x3210
movq -0x58(%rbp), %rsi
movq %rax, %rdi
callq 0x3240
movq -0x50(%rbp), %rdi
leaq 0x6348(%rip), %rsi      # 0xb107
callq 0x3210
movq -0x48(%rbp), %rsi
movq %rax, %rdi
callq 0x3210
leaq -0x18(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x78d0
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rdi
movl 0x30(%rax), %esi
callq 0x7fe0
jmp 0x4def
leaq -0x18(%rbp), %rdi
callq 0x7870
jmp 0x4dfa
movq 0xb1bf(%rip), %rdi      # 0xffc0
movl $0x9, %esi
callq 0x32b0
movq %rax, -0x68(%rbp)
jmp 0x4e11
leaq -0x18(%rbp), %rdi
callq 0x7f70
movl %eax, -0x6c(%rbp)
jmp 0x4e1f
movl -0x6c(%rbp), %esi
movq -0x68(%rbp), %rdi
callq 0x33c0
movq %rax, -0x78(%rbp)
jmp 0x4e31
movq -0x78(%rbp), %rdi
movq 0xb174(%rip), %rsi      # 0xffb0
callq 0x3240
jmp 0x4e43
movq 0xb176(%rip), %rdi      # 0xffc0
leaq 0x62b5(%rip), %rsi      # 0xb106
callq 0x3210
movq %rax, -0x80(%rbp)
jmp 0x4e5c
movq -0x80(%rbp), %rdi
movq 0xb149(%rip), %rsi      # 0xffb0
callq 0x3240
jmp 0x4e6e
movq 0xb14b(%rip), %rdi      # 0xffc0
leaq 0x629f(%rip), %rsi      # 0xb11b
callq 0x3210
movq %rax, -0x88(%rbp)
jmp 0x4e8a
movq -0x88(%rbp), %rdi
leaq 0x626c(%rip), %rsi      # 0xb104
callq 0x3210
jmp 0x4e9f
movq -0x30(%rbp), %rdi
addq $0x28, %rdi
callq 0x7870
jmp 0x4eae
movq 0xb10b(%rip), %rdi      # 0xffc0
movl $0x9, %esi
callq 0x32b0
movq %rax, -0x90(%rbp)
jmp 0x4ec8
movq -0x30(%rbp), %rdi
addq $0x28, %rdi
callq 0x7f70
movl %eax, -0x94(%rbp)
jmp 0x4edd
movl -0x94(%rbp), %esi
movq -0x90(%rbp), %rdi
callq 0x33c0
movq %rax, -0xa0(%rbp)
jmp 0x4ef8
movq -0xa0(%rbp), %rdi
movq 0xb0aa(%rip), %rsi      # 0xffb0
callq 0x3240
jmp 0x4f0d
movq 0xb0ac(%rip), %rdi      # 0xffc0
leaq 0x620c(%rip), %rsi      # 0xb127
callq 0x3210
movq %rax, -0xa8(%rbp)
jmp 0x4f29
movq -0xa8(%rbp), %rdi
movq 0xb079(%rip), %rsi      # 0xffb0
callq 0x3240
jmp 0x4f3e
movq -0x30(%rbp), %rax
testb $0x1, 0x79(%rax)
jne 0x4fae
movq 0xb071(%rip), %rdi      # 0xffc0
leaq 0x6215(%rip), %rsi      # 0xb16b
callq 0x3210
movq %rax, -0xb0(%rbp)
jmp 0x4f64
movq -0xb0(%rbp), %rdi
leaq 0x6205(%rip), %rsi      # 0xb177
callq 0x3210
movq %rax, -0xb8(%rbp)
jmp 0x4f80
movq -0xb8(%rbp), %rdi
movq 0xb022(%rip), %rsi      # 0xffb0
callq 0x3240
jmp 0x4f95
jmp 0x4ffd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x7ac0
jmp 0x500f
movq 0xb00b(%rip), %rdi      # 0xffc0
leaq 0x61af(%rip), %rsi      # 0xb16b
callq 0x3210
movq %rax, -0xc0(%rbp)
jmp 0x4fca
movq -0xc0(%rbp), %rdi
leaq 0x61af(%rip), %rsi      # 0xb187
callq 0x3210
movq %rax, -0xc8(%rbp)
jmp 0x4fe6
movq -0xc8(%rbp), %rdi
movq 0xafbc(%rip), %rsi      # 0xffb0
callq 0x3240
jmp 0x4ffb
jmp 0x4ffd
leaq -0x18(%rbp), %rdi
callq 0x7ac0
addq $0xd0, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x33e0
nopl (%rax,%rax)