// File: /workspace/github_cpp_makefile_star2_O3/dramninjasUMD[P]BOBSim/BusPacket.cpp
// Function: BOBSim::operator<<(std::ostream&, BOBSim::BusPacket const&)
ostream& operator<<(ostream &out, const BusPacket &bp)
{

	switch(bp.busPacketType)
	{
	case READ:
		out<<"BP [READ]";
		break;
	case READ_P:
		out<<"BP [READ_P]";
		break;
	case WRITE:
		out<<"BP [WRITE]";
		break;
	case WRITE_P:
		out<<"BP [WRITE_P]";
		break;
	case ACTIVATE:
		out<<"BP [ACT]";
		break;
	case REFRESH:
		out<<"BP [REF]";
		break;
	case PRECHARGE:
		out<<"BP [PRE]";
		break;
	case WRITE_DATA:
		out<<"BP [WRITE_DATA]";
		break;
	case READ_DATA:
		out<<"BP [READ_DATA]";
		break;
	default:
		ERROR("Trying to print unknown kind of bus packet");
		ERROR("Type : "<<bp.busPacketType);
		exit(-1);
	}


	out << " id[" <<bp.transactionID<<"] r["<<bp.rank<<"] b["<<bp.bank<<"] row["<<hex<<bp.row<<"] col["<<bp.column<<dec<<"] bl["<<bp.burstLength<<"] "<<((bp.fromLogicOp)?"fromLogic":"");
	//reset format back to decimal
	return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl 0x4(%rsi), %eax
cmpq $0x8, %rax
ja 0xc9a7
movq %rdi, %r14
leaq 0x798c(%rip), %rcx      # 0x1416c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x7a23(%rip), %rsi      # 0x14213
movl $0x9, %edx
jmp 0xc85b
leaq 0x7a43(%rip), %rsi      # 0x14241
jmp 0xc848
leaq 0x7a22(%rip), %rsi      # 0x14229
movl $0xa, %edx
jmp 0xc85b
leaq 0x7a1f(%rip), %rsi      # 0x14234
movl $0xc, %edx
jmp 0xc85b
leaq 0x7a49(%rip), %rsi      # 0x1426c
movl $0xe, %edx
jmp 0xc85b
leaq 0x79ec(%rip), %rsi      # 0x1421d
movl $0xb, %edx
jmp 0xc85b
leaq 0x7a0b(%rip), %rsi      # 0x1424a
jmp 0xc848
leaq 0x7a0b(%rip), %rsi      # 0x14253
movl $0x8, %edx
jmp 0xc85b
leaq 0x7a06(%rip), %rsi      # 0x1425c
movl $0xf, %edx
movq %r14, %rdi
callq 0x3200
leaq 0x7a44(%rip), %rsi      # 0x142ae
movl $0x4, %edx
movq %r14, %rdi
callq 0x3200
movl 0x18(%rbx), %esi
movq %r14, %rdi
callq 0x3120
movq %rax, %r15
leaq 0x7a27(%rip), %rsi      # 0x142b3
movl $0x4, %edx
movq %rax, %rdi
callq 0x3200
movl 0x14(%rbx), %esi
movq %r15, %rdi
callq 0x3120
movq %rax, %r15
leaq 0x7a0a(%rip), %rsi      # 0x142b8
movl $0x4, %edx
movq %rax, %rdi
callq 0x3200
movl 0x10(%rbx), %esi
movq %r15, %rdi
callq 0x3120
movq %rax, %r15
leaq 0x79ed(%rip), %rsi      # 0x142bd
movl $0x6, %edx
movq %rax, %rdi
callq 0x3200
movq (%r15), %rax
movq -0x18(%rax), %rax
movl 0x18(%r15,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r15,%rax)
movl 0xc(%rbx), %esi
movq %r15, %rdi
callq 0x3120
movq %rax, %r15
leaq 0x79bb(%rip), %rsi      # 0x142c4
movl $0x6, %edx
movq %rax, %rdi
callq 0x3200
movl 0x8(%rbx), %esi
movq %r15, %rdi
callq 0x3120
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rax
movl 0x18(%r15,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%r15,%rax)
leaq 0x7989(%rip), %rsi      # 0x142cb
movl $0x5, %edx
movq %r15, %rdi
callq 0x3200
movl 0x24(%rbx), %esi
movq %r15, %rdi
callq 0x3120
movq %rax, %r15
leaq 0x76aa(%rip), %rsi      # 0x1400e
movl $0x2, %edx
movq %rax, %rdi
callq 0x3200
movzbl (%rbx), %eax
leaq 0x7956(%rip), %rcx      # 0x142d1
leaq 0x6cae(%rip), %rsi      # 0x13630
testq %rax, %rax
cmovneq %rcx, %rsi
leaq (%rax,%rax,8), %rdx
movq %r15, %rdi
callq 0x3200
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xc642(%rip), %r14      # 0x18ff0
leaq 0x6813(%rip), %r15      # 0x131c8
movq %r14, %rdi
movq %r15, %rsi
callq 0x31c0
leaq 0x7807(%rip), %r12      # 0x141ce
movq %rax, %rdi
movq %r12, %rsi
callq 0x31c0
leaq 0x6798(%rip), %r13      # 0x13171
movq %rax, %rdi
movq %r13, %rsi
callq 0x31c0
movq %rax, %rdi
movl $0x7f, %esi
callq 0x3330
leaq 0x67e1(%rip), %rbp      # 0x131d9
movq %rax, %rdi
movq %rbp, %rsi
callq 0x31c0
leaq 0x7871(%rip), %rsi      # 0x1427b
movq %rax, %rdi
callq 0x31c0
movq %rax, %rdi
callq 0x30d0
movq %r14, %rdi
movq %r15, %rsi
callq 0x31c0
movq %rax, %rdi
movq %r12, %rsi
callq 0x31c0
movq %rax, %rdi
movq %r13, %rsi
callq 0x31c0
movq %rax, %rdi
movl $0x80, %esi
callq 0x3330
movq %rax, %rdi
movq %rbp, %rsi
callq 0x31c0
leaq 0x784c(%rip), %rsi      # 0x142a6
movq %rax, %rdi
callq 0x31c0
movl 0x4(%rbx), %esi
movq %rax, %rdi
callq 0x3330
movq %rax, %rdi
callq 0x30d0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3220
nop