// File: Ziang95[P]Tomasulo_simulator/output.cpp
// Function: instr_timeline_output(ROBEntry*)
void instr_timeline_output(ROBEntry *R)
{
    output_QEntry t;
    t.iss_cyc = R->output.issue;
    t.name = R->name;
    if (t.name.size()/8 < 1)
        t.name += "\t\t";
    else if (t.name.size()/8 < 2)
        t.name += "\t";
    t.name += "\t" + to_string(R->output.issue);
    t.name += "\t" + (R->output.exe > 0? to_string(R->output.exe):" ");
    t.name += "\t" + (R->output.mem > 0? to_string(R->output.mem):" ");
    t.name += "\t" + (R->output.wBack > 0? to_string(R->output.wBack):" ");
    t.name += "\t" + (R->output.commit > 0? to_string(R->output.commit):" ");
    CPU_output_Q.push_back(t);
    sort(CPU_output_Q.begin(), CPU_output_Q.end(), [](output_QEntry a, output_QEntry b){return a.iss_cyc < b.iss_cyc;});
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x8(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x1f500
movq -0x8(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
leaq -0x28(%rbp), %rdi
callq 0x4050
jmp 0x1d005
leaq -0x30(%rbp), %rdi
addq $0x8, %rdi
callq 0x4270
shrq $0x3, %rax
cmpq $0x1, %rax
jae 0x1d041
leaq -0x28(%rbp), %rdi
leaq 0x5979(%rip), %rsi      # 0x229a0
callq 0x4360
jmp 0x1d02e
jmp 0x1d06e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1d5b4
leaq -0x30(%rbp), %rdi
addq $0x8, %rdi
callq 0x4270
shrq $0x3, %rax
cmpq $0x2, %rax
jae 0x1d06c
leaq -0x28(%rbp), %rdi
leaq 0x593e(%rip), %rsi      # 0x229a1
callq 0x4360
jmp 0x1d06a
jmp 0x1d06c
jmp 0x1d06e
movq -0x8(%rbp), %rax
movl 0x50(%rax), %esi
leaq -0x80(%rbp), %rdi
callq 0x8410
jmp 0x1d080
leaq 0x591a(%rip), %rsi      # 0x229a1
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rdx
callq 0x83c0
jmp 0x1d096
leaq -0x28(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x4460
jmp 0x1d0a5
leaq -0x60(%rbp), %rdi
callq 0x4240
leaq -0x80(%rbp), %rdi
callq 0x4240
movq -0x8(%rbp), %rax
movl 0x54(%rax), %eax
movb $0x0, -0xc2(%rbp)
cmpl $0x0, %eax
jle 0x1d0e1
movq -0x8(%rbp), %rax
movl 0x54(%rax), %esi
leaq -0xc0(%rbp), %rdi
callq 0x8410
jmp 0x1d0df
jmp 0x1d119
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x4600
movq -0x1c0(%rbp), %rdx
movb $0x1, -0xc2(%rbp)
leaq 0x4f4d(%rip), %rsi      # 0x22056
leaq -0xc0(%rbp), %rdi
callq 0x44c0
jmp 0x1d117
jmp 0x1d119
leaq 0x5881(%rip), %rsi      # 0x229a1
leaq -0xa0(%rbp), %rdi
leaq -0xc0(%rbp), %rdx
callq 0x83c0
jmp 0x1d135
leaq -0x28(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x4460
jmp 0x1d147
leaq -0xa0(%rbp), %rdi
callq 0x4240
leaq -0xc0(%rbp), %rdi
callq 0x4240
testb $0x1, -0xc2(%rbp)
jne 0x1d16a
jmp 0x1d176
leaq -0xc1(%rbp), %rdi
callq 0x43d0
movq -0x8(%rbp), %rax
movl 0x58(%rax), %eax
movb $0x0, -0x10a(%rbp)
cmpl $0x0, %eax
jle 0x1d1a0
movq -0x8(%rbp), %rax
movl 0x58(%rax), %esi
leaq -0x108(%rbp), %rdi
callq 0x8410
jmp 0x1d19e
jmp 0x1d1d8
leaq -0x109(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x4600
movq -0x1c8(%rbp), %rdx
movb $0x1, -0x10a(%rbp)
leaq 0x4e8e(%rip), %rsi      # 0x22056
leaq -0x108(%rbp), %rdi
callq 0x44c0
jmp 0x1d1d6
jmp 0x1d1d8
leaq 0x57c2(%rip), %rsi      # 0x229a1
leaq -0xe8(%rbp), %rdi
leaq -0x108(%rbp), %rdx
callq 0x83c0
jmp 0x1d1f4
leaq -0x28(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x4460
jmp 0x1d206
leaq -0xe8(%rbp), %rdi
callq 0x4240
leaq -0x108(%rbp), %rdi
callq 0x4240
testb $0x1, -0x10a(%rbp)
jne 0x1d229
jmp 0x1d235
leaq -0x109(%rbp), %rdi
callq 0x43d0
movq -0x8(%rbp), %rax
movl 0x5c(%rax), %eax
movb $0x0, -0x152(%rbp)
cmpl $0x0, %eax
jle 0x1d25f
movq -0x8(%rbp), %rax
movl 0x5c(%rax), %esi
leaq -0x150(%rbp), %rdi
callq 0x8410
jmp 0x1d25d
jmp 0x1d297
leaq -0x151(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x4600
movq -0x1d0(%rbp), %rdx
movb $0x1, -0x152(%rbp)
leaq 0x4dcf(%rip), %rsi      # 0x22056
leaq -0x150(%rbp), %rdi
callq 0x44c0
jmp 0x1d295
jmp 0x1d297
leaq 0x5703(%rip), %rsi      # 0x229a1
leaq -0x130(%rbp), %rdi
leaq -0x150(%rbp), %rdx
callq 0x83c0
jmp 0x1d2b3
leaq -0x28(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x4460
jmp 0x1d2c5
leaq -0x130(%rbp), %rdi
callq 0x4240
leaq -0x150(%rbp), %rdi
callq 0x4240
testb $0x1, -0x152(%rbp)
jne 0x1d2e8
jmp 0x1d2f4
leaq -0x151(%rbp), %rdi
callq 0x43d0
movq -0x8(%rbp), %rax
movl 0x60(%rax), %eax
movb $0x0, -0x19a(%rbp)
cmpl $0x0, %eax
jle 0x1d31e
movq -0x8(%rbp), %rax
movl 0x60(%rax), %esi
leaq -0x198(%rbp), %rdi
callq 0x8410
jmp 0x1d31c
jmp 0x1d356
leaq -0x199(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x4600
movq -0x1d8(%rbp), %rdx
movb $0x1, -0x19a(%rbp)
leaq 0x4d10(%rip), %rsi      # 0x22056
leaq -0x198(%rbp), %rdi
callq 0x44c0
jmp 0x1d354
jmp 0x1d356
leaq 0x5644(%rip), %rsi      # 0x229a1
leaq -0x178(%rbp), %rdi
leaq -0x198(%rbp), %rdx
callq 0x83c0
jmp 0x1d372
leaq -0x28(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x4460
jmp 0x1d384
leaq -0x178(%rbp), %rdi
callq 0x4240
leaq -0x198(%rbp), %rdi
callq 0x4240
testb $0x1, -0x19a(%rbp)
jne 0x1d3a7
jmp 0x1d3b3
leaq -0x199(%rbp), %rdi
callq 0x43d0
leaq 0x15afe(%rip), %rdi     # 0x32eb8
leaq -0x30(%rbp), %rsi
callq 0x1f520
jmp 0x1d3c5
leaq 0x15aec(%rip), %rdi     # 0x32eb8
movq %rdi, -0x1e0(%rbp)
callq 0x1f590
movq -0x1e0(%rbp), %rdi
movq %rax, -0x1a8(%rbp)
callq 0x1f5c0
movq %rax, -0x1b0(%rbp)
movq -0x1a8(%rbp), %rdi
movq -0x1b0(%rbp), %rsi
callq 0x1d5d0
jmp 0x1d407
leaq -0x30(%rbp), %rdi
callq 0x1cec0
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1d43c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x4240
leaq -0x80(%rbp), %rdi
callq 0x4240
jmp 0x1d5b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1d48a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1d47e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x4240
leaq -0xc0(%rbp), %rdi
callq 0x4240
testb $0x1, -0xc2(%rbp)
jne 0x1d495
jmp 0x1d4a1
leaq -0xc1(%rbp), %rdi
callq 0x43d0
jmp 0x1d5b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1d4e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1d4da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x4240
leaq -0x108(%rbp), %rdi
callq 0x4240
testb $0x1, -0x10a(%rbp)
jne 0x1d4f1
jmp 0x1d4fd
leaq -0x109(%rbp), %rdi
callq 0x43d0
jmp 0x1d5b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1d542
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1d536
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x4240
leaq -0x150(%rbp), %rdi
callq 0x4240
testb $0x1, -0x152(%rbp)
jne 0x1d54d
jmp 0x1d559
leaq -0x151(%rbp), %rdi
callq 0x43d0
jmp 0x1d5b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1d59b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1d58f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x4240
leaq -0x198(%rbp), %rdi
callq 0x4240
testb $0x1, -0x19a(%rbp)
jne 0x1d5a6
jmp 0x1d5b2
leaq -0x199(%rbp), %rdi
callq 0x43d0
jmp 0x1d5b4
leaq -0x30(%rbp), %rdi
callq 0x1cec0
movq -0x38(%rbp), %rdi
callq 0x45f0
nopw %cs:(%rax,%rax)