// File: /workspace/github_cpp_makefile_star2_O1/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 0xcb93
movq %rdi, %r14
leaq 0x7700(%rip), %rcx      # 0x140cc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x7797(%rip), %rsi      # 0x14173
movl $0x9, %edx
jmp 0xca47
leaq 0x77b7(%rip), %rsi      # 0x141a1
jmp 0xca34
leaq 0x7796(%rip), %rsi      # 0x14189
movl $0xa, %edx
jmp 0xca47
leaq 0x7793(%rip), %rsi      # 0x14194
movl $0xc, %edx
jmp 0xca47
leaq 0x77bd(%rip), %rsi      # 0x141cc
movl $0xe, %edx
jmp 0xca47
leaq 0x7760(%rip), %rsi      # 0x1417d
movl $0xb, %edx
jmp 0xca47
leaq 0x777f(%rip), %rsi      # 0x141aa
jmp 0xca34
leaq 0x777f(%rip), %rsi      # 0x141b3
movl $0x8, %edx
jmp 0xca47
leaq 0x777a(%rip), %rsi      # 0x141bc
movl $0xf, %edx
movq %r14, %rdi
callq 0x3200
leaq 0x77b8(%rip), %rsi      # 0x1420e
movl $0x4, %edx
movq %r14, %rdi
callq 0x3200
movl 0x18(%rbx), %esi
movq %r14, %rdi
callq 0x3120
movq %rax, %r15
leaq 0x779b(%rip), %rsi      # 0x14213
movl $0x4, %edx
movq %rax, %rdi
callq 0x3200
movl 0x14(%rbx), %esi
movq %r15, %rdi
callq 0x3120
movq %rax, %r15
leaq 0x777e(%rip), %rsi      # 0x14218
movl $0x4, %edx
movq %rax, %rdi
callq 0x3200
movl 0x10(%rbx), %esi
movq %r15, %rdi
callq 0x3120
movq %rax, %r15
leaq 0x7761(%rip), %rsi      # 0x1421d
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 0x772f(%rip), %rsi      # 0x14224
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 0x76fd(%rip), %rsi      # 0x1422b
movl $0x5, %edx
movq %r15, %rdi
callq 0x3200
movl 0x24(%rbx), %esi
movq %r15, %rdi
callq 0x3120
movq %rax, %r15
leaq 0x741e(%rip), %rsi      # 0x13f6e
movl $0x2, %edx
movq %rax, %rdi
callq 0x3200
movzbl (%rbx), %eax
leaq 0x76ca(%rip), %rcx      # 0x14231
leaq 0x6a72(%rip), %rsi      # 0x135e0
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 0xc456(%rip), %r14      # 0x18ff0
leaq 0x65d7(%rip), %r15      # 0x13178
movq %r14, %rdi
movq %r15, %rsi
callq 0x31c0
leaq 0x757b(%rip), %r12      # 0x1412e
movq %rax, %rdi
movq %r12, %rsi
callq 0x31c0
leaq 0x655c(%rip), %r13      # 0x13121
movq %rax, %rdi
movq %r13, %rsi
callq 0x31c0
movq %rax, %rdi
movl $0x7f, %esi
callq 0x3330
leaq 0x65a5(%rip), %rbp      # 0x13189
movq %rax, %rdi
movq %rbp, %rsi
callq 0x31c0
leaq 0x75e5(%rip), %rsi      # 0x141db
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 0x75c0(%rip), %rsi      # 0x14206
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