// File: sopanpatra160[P]OOO_Superscalar_Processor_Simulator/main.cc
// Function: FakeRetire()
void FakeRetire()
{
	  //printf ("Checkpoint:1\n");
			//printf("Here4 ! \n");
	  if (fake_rob.empty() != 1) {
		  while(fake_rob.begin()->state==WB && fake_rob.empty() !=1)
		  {
			   //printf ("Checkpoint:2\n");
			   printf ("%d", fake_rob.begin()->tag);
			   printf (" fu{%d}", fake_rob.begin()->operation_type);
			   printf (" src{%d,%d}", fake_rob.begin()->src1_regno, fake_rob.begin()->src2_regno);
			   printf (" dst{%d}", fake_rob.begin()->dest_regno);
			   printf (" IF{%d,%d}", fake_rob.begin()->if_begin_cycle, fake_rob.begin()->if_duration);
			   printf (" ID{%d,%d}", fake_rob.begin()->id_begin_cycle, fake_rob.begin()->id_duration);
			   printf (" IS{%d,%d}", fake_rob.begin()->is_begin_cycle, fake_rob.begin()->is_duration);
			   printf (" EX{%d,%d}", fake_rob.begin()->ex_begin_cycle, fake_rob.begin()->ex_duration);
			   printf (" WB{%d,%d}\n", fake_rob.begin()->wb_begin_cycle, fake_rob.begin()->wb_duration);

			   fake_rob.erase(fake_rob.begin());
		  }
	  }


	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
leaq 0x5f3e(%rip), %rdi      # 0xa390
callq 0x5000
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
je 0x476d
jmp 0x4467
leaq 0x5f22(%rip), %rdi      # 0xa390
callq 0x4cc0
movq %rax, -0x8(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x4d60
movq %rax, %rcx
xorl %eax, %eax
cmpl $0x4, 0x4c(%rcx)
movb %al, -0x99(%rbp)
jne 0x44ae
leaq 0x5ef8(%rip), %rdi      # 0xa390
callq 0x5000
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
setne %al
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0x44bd
jmp 0x476b
leaq 0x5ecc(%rip), %rdi      # 0xa390
callq 0x4cc0
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x4d60
movl 0x50(%rax), %esi
leaq 0x2d45(%rip), %rdi      # 0x7225
movb $0x0, %al
callq 0x1040
leaq 0x5ea2(%rip), %rdi      # 0xa390
callq 0x4cc0
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x4d60
movl (%rax), %esi
leaq 0x2d1f(%rip), %rdi      # 0x7228
movb $0x0, %al
callq 0x1040
leaq 0x5e79(%rip), %rdi      # 0xa390
callq 0x4cc0
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x4d60
movl 0xc(%rax), %eax
movl %eax, -0xb4(%rbp)
leaq 0x5e57(%rip), %rdi      # 0xa390
callq 0x4cc0
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4d60
movl -0xb4(%rbp), %esi
movl 0x10(%rax), %edx
leaq 0x2cd5(%rip), %rdi      # 0x7230
movb $0x0, %al
callq 0x1040
leaq 0x5e27(%rip), %rdi      # 0xa390
callq 0x4cc0
movq %rax, -0x30(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x4d60
movl 0x8(%rax), %esi
leaq 0x2cb7(%rip), %rdi      # 0x723c
movb $0x0, %al
callq 0x1040
leaq 0x5dfd(%rip), %rdi      # 0xa390
callq 0x4cc0
movq %rax, -0x38(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4d60
movl 0x1c(%rax), %eax
movl %eax, -0xb0(%rbp)
leaq 0x5ddb(%rip), %rdi      # 0xa390
callq 0x4cc0
movq %rax, -0x40(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x4d60
movl -0xb0(%rbp), %esi
movl 0x20(%rax), %edx
leaq 0x2c6e(%rip), %rdi      # 0x7245
movb $0x0, %al
callq 0x1040
leaq 0x5dab(%rip), %rdi      # 0xa390
callq 0x4cc0
movq %rax, -0x48(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4d60
movl 0x24(%rax), %eax
movl %eax, -0xac(%rbp)
leaq 0x5d89(%rip), %rdi      # 0xa390
callq 0x4cc0
movq %rax, -0x50(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x4d60
movl -0xac(%rbp), %esi
movl 0x28(%rax), %edx
leaq 0x2c27(%rip), %rdi      # 0x7250
movb $0x0, %al
callq 0x1040
leaq 0x5d59(%rip), %rdi      # 0xa390
callq 0x4cc0
movq %rax, -0x58(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x4d60
movl 0x2c(%rax), %eax
movl %eax, -0xa8(%rbp)
leaq 0x5d37(%rip), %rdi      # 0xa390
callq 0x4cc0
movq %rax, -0x60(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x4d60
movl -0xa8(%rbp), %esi
movl 0x30(%rax), %edx
leaq 0x2be0(%rip), %rdi      # 0x725b
movb $0x0, %al
callq 0x1040
leaq 0x5d07(%rip), %rdi      # 0xa390
callq 0x4cc0
movq %rax, -0x68(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x4d60
movl 0x34(%rax), %eax
movl %eax, -0xa4(%rbp)
leaq 0x5ce5(%rip), %rdi      # 0xa390
callq 0x4cc0
movq %rax, -0x70(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x4d60
movl -0xa4(%rbp), %esi
movl 0x38(%rax), %edx
leaq 0x2b99(%rip), %rdi      # 0x7266
movb $0x0, %al
callq 0x1040
leaq 0x5cb5(%rip), %rdi      # 0xa390
callq 0x4cc0
movq %rax, -0x78(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x4d60
movl 0x3c(%rax), %eax
movl %eax, -0xa0(%rbp)
leaq 0x5c93(%rip), %rdi      # 0xa390
callq 0x4cc0
movq %rax, -0x80(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x4d60
movl -0xa0(%rbp), %esi
movl 0x40(%rax), %edx
leaq 0x2b52(%rip), %rdi      # 0x7271
movb $0x0, %al
callq 0x1040
leaq 0x5c63(%rip), %rdi      # 0xa390
callq 0x4cc0
movq %rax, -0x90(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x4e30
movq -0x88(%rbp), %rsi
leaq 0x5c36(%rip), %rdi      # 0xa390
callq 0x4dc0
movq %rax, -0x98(%rbp)
jmp 0x4467
jmp 0x476d
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)