// File: /workspace/github_cpp_makefile_star2_O1/saumya-prakash[P]AssemblerEmulator/Emulator.cpp
// Function: Emulator::disassemble(std::ostream&) const
void Emulator::disassemble(ostream& os) const
{
    for(int i=0; i<text_size; ++i)
    {
        string tmp = reverse_decode(mempory_space[i]);

        os<<"PC = ";
        os<<setw(10)<<setfill('0')<<i<<setfill(' ')<<"   ";

        os<<"Memory Content = ";
        os<<"0x"<<setw(8)<<setfill('0')<<hex<<mempory_space[i]<<dec<<setfill(' ')<<"   ";

        cout<<" "<<tmp<<endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0x0, 0x48(%rdi)
je 0x5bb8
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x4654(%rip), %r12      # 0x9fd0
movq 0x30(%r14), %rax
movl (%rax,%r15,4), %edx
leaq 0x8(%rsp), %rdi
callq 0x57f8
movl $0x5, %edx
movq %rbx, %rdi
leaq 0x1b56(%rip), %rsi      # 0x74f3
callq 0x21b0
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movq $0xa, 0x10(%rbx,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r13
cmpb $0x0, 0xe1(%rbx,%rax)
jne 0x59e0
movq %r13, %rdi
movl $0x20, %esi
callq 0x2170
movb %al, 0xe0(%r13)
movb $0x1, 0xe1(%r13)
movb $0x30, 0xe0(%r13)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x2260
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rax
movq %rbp, %r13
addq %rax, %r13
cmpb $0x0, 0xe1(%rbp,%rax)
jne 0x5a29
movq %r13, %rdi
movl $0x20, %esi
callq 0x2170
movb %al, 0xe0(%r13)
movb $0x1, 0xe1(%r13)
movb $0x20, 0xe0(%r13)
movl $0x3, %edx
movq %rbp, %rdi
leaq 0x1ab9(%rip), %rsi      # 0x74f9
callq 0x21b0
movl $0x11, %edx
movq %rbx, %rdi
leaq 0x1aa9(%rip), %rsi      # 0x74fd
callq 0x21b0
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x1aa7(%rip), %rsi      # 0x750f
callq 0x21b0
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movq $0x8, 0x10(%rbx,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r13
cmpb $0x0, 0xe1(%rbx,%rax)
jne 0x5aab
movq %r13, %rdi
movl $0x20, %esi
callq 0x2170
movb %al, 0xe0(%r13)
movb $0x1, 0xe1(%r13)
movb $0x30, 0xe0(%r13)
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq 0x30(%r14), %rax
movl (%rax,%r15,4), %esi
movq %rbx, %rdi
callq 0x2260
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r13,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%r13,%rcx)
movq -0x18(%rax), %rax
movq %r13, %rbp
addq %rax, %rbp
cmpb $0x0, 0xe1(%r13,%rax)
jne 0x5b21
movq %rbp, %rdi
movl $0x20, %esi
callq 0x2170
movb %al, 0xe0(%rbp)
movb $0x1, 0xe1(%rbp)
movb $0x20, 0xe0(%rbp)
movl $0x3, %edx
movq %r13, %rdi
leaq 0x19c2(%rip), %rsi      # 0x74f9
callq 0x21b0
movl $0x1, %edx
movq %r12, %rdi
leaq 0x19b0(%rip), %rsi      # 0x74fb
callq 0x21b0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r12, %rdi
callq 0x21b0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r13, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5ba8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2190
incq %r15
movl 0x48(%r14), %eax
cmpq %rax, %r15
jb 0x597c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5be6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2190
movq %rbx, %rdi
callq 0x2270