// File: Cicko[P]Ram-Machine/main.cpp
// Function: main
int main (int argc, char* argv[]) {

  if (argc < 5) {
    cout << endl << "Usage: \n ./RamMachine <inputTape.txt> <outputTape.txt> <program.ram> <Memory-size>" << endl << endl;
    return -1;
  }
  string inTape (argv[1]);
  string outTape (argv[2]);
  string fich (argv[3]);
  int size = atoi (argv[4]);

  RamMachine * myMachine = new RamMachine (inTape, outTape, fich, size);

  menu(myMachine);



  return 0;
}

// Assembly:
subq $0x148, %rsp            # imm = 0x148
movl $0x0, 0x144(%rsp)
movl %edi, 0x140(%rsp)
movq %rsi, 0x138(%rsp)
cmpl $0x5, 0x140(%rsp)
jge 0x734b
movq 0x48c96(%rip), %rdi     # 0x4ff98
movq 0x48c67(%rip), %rsi     # 0x4ff70
callq 0x6480
movq %rax, %rdi
leaq 0x32ec0(%rip), %rsi     # 0x3a1d8
callq 0x6430
movq %rax, %rdi
movq 0x48c49(%rip), %rsi     # 0x4ff70
callq 0x6480
movq %rax, %rdi
movq 0x48c3a(%rip), %rsi     # 0x4ff70
callq 0x6480
movl $0xffffffff, 0x144(%rsp) # imm = 0xFFFFFFFF
jmp 0x7672
movq 0x138(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x30(%rsp)
leaq 0x117(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x67c0
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x118(%rsp), %rdi
callq 0x6610
jmp 0x7387
leaq 0x117(%rsp), %rdi
callq 0x64a0
movq 0x138(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%rsp)
leaq 0xdf(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x67c0
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0xe0(%rsp), %rdi
callq 0x6610
jmp 0x73d0
leaq 0xdf(%rsp), %rdi
callq 0x64a0
movq 0x138(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
leaq 0xb7(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x67c0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0xb8(%rsp), %rdi
callq 0x6610
jmp 0x7419
leaq 0xb7(%rsp), %rdi
callq 0x64a0
movq 0x138(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x66b0
movl %eax, 0xb0(%rsp)
movl $0x28, %edi
callq 0x6440
movq %rax, 0x8(%rsp)
jmp 0x744f
movb $0x1, 0x47(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x61b0
jmp 0x746b
leaq 0x68(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x61b0
jmp 0x747f
leaq 0x48(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x61b0
jmp 0x7493
movq 0x8(%rsp), %rdi
movl 0xb0(%rsp), %r8d
leaq 0x88(%rsp), %rsi
leaq 0x68(%rsp), %rdx
leaq 0x48(%rsp), %rcx
callq 0x34ab0
jmp 0x74b9
movb $0x0, 0x47(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x62a0
leaq 0x68(%rsp), %rdi
callq 0x62a0
leaq 0x88(%rsp), %rdi
callq 0x62a0
movq 0x8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rdi
callq 0x6b40
jmp 0x74fb
movl $0x0, 0x144(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x62a0
leaq 0xe0(%rsp), %rdi
callq 0x62a0
leaq 0x118(%rsp), %rdi
callq 0x62a0
jmp 0x7672
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
leaq 0x117(%rsp), %rdi
callq 0x64a0
jmp 0x7681
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
leaq 0xdf(%rsp), %rdi
callq 0x64a0
jmp 0x7663
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
leaq 0xb7(%rsp), %rdi
callq 0x64a0
jmp 0x7656
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
jmp 0x7649
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
jmp 0x7634
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
jmp 0x7627
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
jmp 0x761d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x62a0
leaq 0x68(%rsp), %rdi
callq 0x62a0
leaq 0x88(%rsp), %rdi
callq 0x62a0
testb $0x1, 0x47(%rsp)
jne 0x763d
jmp 0x7647
movq 0x8(%rsp), %rdi
callq 0x6410
jmp 0x7649
leaq 0xb8(%rsp), %rdi
callq 0x62a0
leaq 0xe0(%rsp), %rdi
callq 0x62a0
leaq 0x118(%rsp), %rdi
callq 0x62a0
jmp 0x7681
movl 0x144(%rsp), %eax
addq $0x148, %rsp            # imm = 0x148
retq
movq 0x108(%rsp), %rdi
callq 0x67b0
nop