// File: /workspace/github_cpp_makefile_star2_O2/dramninjasUMD[P]BOBSim/Transaction.cpp
// Function: BOBSim::operator<<(std::ostream&, BOBSim::Transaction const&)
ostream& operator<<(ostream &out, const Transaction &t)
{
	if(t.transactionType == DATA_READ)
	{
		out <<"T"<<t.transactionID<<" [Read] [0x" << hex << setw(8)<<setfill('0')<<t.address << dec << "] port["<<t.portID<<"] core["<<t.coreID<<"] "<<((t.originatedFromLogicOp)?"[FromLogic]":"");
	}
	else if(t.transactionType == DATA_WRITE)
	{
		out <<"T"<<t.transactionID<<" [Write] [0x" << hex << setw(8)<<setfill('0')<<t.address << dec << "] port["<<t.portID<<"] core["<<t.coreID<<"] "<<((t.originatedFromLogicOp)?"[FromLogic]":"");
	}
	else if(t.transactionType == RETURN_DATA)
	{
		out << "T"<<t.transactionID<<" [Data] [0x" << hex << setw(8)<<setfill('0')<<t.address << dec << "] port["<<t.portID<<"] core["<<t.coreID<<"]";
	}
	else if(t.transactionType == LOGIC_OPERATION)
	{
		out << "T" << t.transactionID << " [LogicOp] [0x" << hex << setw(8) << setfill('0') << t.address << dec << "]";
	}
	else if(t.transactionType == LOGIC_RESPONSE)
	{
		out << "T" << t.transactionID << " [LogicResponse] [0x" << hex << setw(8) << setfill('0') << t.address << dec<<"]";
	}
	else
	{
		out << "T" << t.transactionID << " [?"<<t.transactionType<<"?] [0x" << hex << setw(8) << setfill('0') << t.address << dec<<"]";
		out << "unknown transaction type"<<endl;;
		exit(0);
	}

	return out;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %r15d
leaq 0x235f(%rip), %rsi      # 0x10a9c
callq 0x2180
movl 0x18(%r14), %esi
cmpq $0x4, %r15
ja 0xe968
leaq 0x2331(%rip), %rcx      # 0x10a88
movslq (%rcx,%r15,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movq %rax, %rdi
callq 0x2100
leaq 0x232f(%rip), %rsi      # 0x10a9e
jmp 0xe8a5
movq %rax, %rdi
callq 0x2100
leaq 0x236b(%rip), %rsi      # 0x10aee
jmp 0xe834
movq %rax, %rdi
callq 0x2100
leaq 0x233c(%rip), %rsi      # 0x10ad3
movq %rax, %rdi
callq 0x2180
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
andl $-0x4b, %esi
orl $0x8, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x8, 0x10(%rax,%rcx)
pushq $0x30
popq %rsi
movq %rax, %rdi
callq 0x2270
movq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x2100
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x22b6(%rip), %rsi      # 0x10aaa
movq %rax, %rdi
callq 0x2180
movl 0x1c(%r14), %esi
movq %rax, %rdi
callq 0x2100
leaq 0x22a3(%rip), %rsi      # 0x10ab2
movq %rax, %rdi
callq 0x2180
movl 0x20(%r14), %esi
movq %rax, %rdi
callq 0x2100
jmp 0xe88a
movq %rax, %rdi
callq 0x2100
leaq 0x22ab(%rip), %rsi      # 0x10adf
movq %rax, %rdi
callq 0x2180
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
andl $-0x4b, %esi
orl $0x8, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x8, 0x10(%rax,%rcx)
pushq $0x30
popq %rsi
movq %rax, %rdi
callq 0x2270
movq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x2100
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x1958(%rip), %rsi      # 0x101e9
jmp 0xe957
movq %rax, %rdi
callq 0x2100
leaq 0x2221(%rip), %rsi      # 0x10ac6
movq %rax, %rdi
callq 0x2180
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
andl $-0x4b, %esi
orl $0x8, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x8, 0x10(%rax,%rcx)
pushq $0x30
popq %rsi
movq %rax, %rdi
callq 0x2270
movq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x2100
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x21a8(%rip), %rsi      # 0x10aaa
movq %rax, %rdi
callq 0x2180
movl 0x1c(%r14), %esi
movq %rax, %rdi
callq 0x2100
leaq 0x2195(%rip), %rsi      # 0x10ab2
movq %rax, %rdi
callq 0x2180
movl 0x20(%r14), %esi
movq %rax, %rdi
callq 0x2100
leaq 0x1646(%rip), %rsi      # 0xff7e
movq %rax, %rdi
callq 0x2180
leaq 0x2173(%rip), %rcx      # 0x10aba
leaq 0xc9a(%rip), %rsi       # 0xf5e8
cmpb $0x0, 0x30(%r14)
cmovneq %rcx, %rsi
movq %rax, %rdi
callq 0x2180
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x2210
leaq 0x218c(%rip), %rsi      # 0x10b03
movq %rax, %rdi
callq 0x2180
movl (%r14), %esi
movq %rax, %rdi
callq 0x22e0
leaq 0x2176(%rip), %rsi      # 0x10b07
movq %rax, %rdi
callq 0x2180
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
andl $-0x4b, %esi
orl $0x8, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x8, 0x10(%rax,%rcx)
pushq $0x30
popq %rsi
movq %rax, %rdi
callq 0x2270
movq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x2050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x17fb(%rip), %rsi      # 0x101e9
movq %rax, %rdi
callq 0x2180
leaq 0x2111(%rip), %rsi      # 0x10b0e
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20b0
xorl %edi, %edi
callq 0x21d0