// File: gvaumour[P]cache-simulator/src/common.cc
// Function: splitAddr_Bytes[abi:cxx11](unsigned long)
vector<string> splitAddr_Bytes(uint64_t a)
{
	stringstream ss;
	ss << std::hex << a;
   	string addr = ss.str();
	while(addr.size() < 16)
		addr = string(1,'0') + addr;

	vector<string> result;
	for(unsigned i = 0 ; i < addr.size(); i+=2)
	{
		stringstream ss1;
		ss1 << addr.at(i);
		ss1 << addr.at(i+1);
		result.push_back(ss1.str());
	}
	return result;
}

// Assembly:
subq $0x408, %rsp            # imm = 0x408
movq %rdi, 0x38(%rsp)
movq %rdi, %rax
movq %rax, 0x40(%rsp)
movq %rdi, 0x400(%rsp)
movq %rsi, 0x3f8(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x52a0
leaq 0x280(%rsp), %rdi
leaq -0x561b0(%rip), %rsi    # 0xf800
callq 0x5160
movq %rax, 0x48(%rsp)
jmp 0x659bc
movq 0x48(%rsp), %rdi
movq 0x3f8(%rsp), %rsi
callq 0x50f0
jmp 0x659d0
leaq 0x240(%rsp), %rdi
leaq 0x270(%rsp), %rsi
callq 0x5370
jmp 0x659e7
jmp 0x659e9
leaq 0x240(%rsp), %rdi
callq 0x5290
cmpq $0x10, %rax
jae 0x65af2
leaq 0x1ff(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x56a0
movq 0x30(%rsp), %rcx
leaq 0x200(%rsp), %rdi
movl $0x1, %esi
movl $0x30, %edx
callq 0x5270
jmp 0x65a30
leaq 0x220(%rsp), %rdi
leaq 0x200(%rsp), %rsi
leaq 0x240(%rsp), %rdx
callq 0x3da00
jmp 0x65a4f
leaq 0x240(%rsp), %rdi
leaq 0x220(%rsp), %rsi
callq 0x54a0
leaq 0x220(%rsp), %rdi
callq 0x5768
leaq 0x200(%rsp), %rdi
callq 0x5768
leaq 0x1ff(%rsp), %rdi
callq 0x53e0
jmp 0x659e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x268(%rsp)
movl %eax, 0x264(%rsp)
jmp 0x65cc2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x268(%rsp)
movl %eax, 0x264(%rsp)
jmp 0x65ae0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x268(%rsp)
movl %eax, 0x264(%rsp)
leaq 0x200(%rsp), %rdi
callq 0x5768
leaq 0x1ff(%rsp), %rdi
callq 0x53e0
jmp 0x65cb5
movq 0x38(%rsp), %rdi
movb $0x0, 0x1fe(%rsp)
callq 0xe850
movl $0x0, 0x1f8(%rsp)
movl 0x1f8(%rsp), %eax
movq %rax, 0x28(%rsp)
leaq 0x240(%rsp), %rdi
callq 0x5290
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
jae 0x65c68
leaq 0x70(%rsp), %rdi
callq 0x52a0
jmp 0x65b45
leaq 0x80(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x1f8(%rsp), %eax
movl %eax, %esi
leaq 0x240(%rsp), %rdi
callq 0x5710
movq %rax, 0x20(%rsp)
jmp 0x65b6f
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rax
movsbl (%rax), %esi
callq 0x5440
jmp 0x65b83
leaq 0x80(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x1f8(%rsp), %eax
incl %eax
movl %eax, %esi
leaq 0x240(%rsp), %rdi
callq 0x5710
movq %rax, 0x10(%rsp)
jmp 0x65baf
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
movsbl (%rax), %esi
callq 0x5440
jmp 0x65bc3
leaq 0x50(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x5370
jmp 0x65bd4
movq 0x38(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x67860
jmp 0x65be5
leaq 0x50(%rsp), %rdi
callq 0x5768
leaq 0x70(%rsp), %rdi
callq 0x52c0
movl 0x1f8(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x1f8(%rsp)
jmp 0x65b0f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x268(%rsp)
movl %eax, 0x264(%rsp)
jmp 0x65cab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x268(%rsp)
movl %eax, 0x264(%rsp)
jmp 0x65c5c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x268(%rsp)
movl %eax, 0x264(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x5768
leaq 0x70(%rsp), %rdi
callq 0x52c0
jmp 0x65cab
movb $0x1, 0x1fe(%rsp)
testb $0x1, 0x1fe(%rsp)
jne 0x65c84
movq 0x38(%rsp), %rdi
callq 0xf560
leaq 0x240(%rsp), %rdi
callq 0x5768
leaq 0x270(%rsp), %rdi
callq 0x52c0
movq 0x40(%rsp), %rax
addq $0x408, %rsp            # imm = 0x408
retq
movq 0x38(%rsp), %rdi
callq 0xf560
leaq 0x240(%rsp), %rdi
callq 0x5768
leaq 0x270(%rsp), %rdi
callq 0x52c0
movq 0x268(%rsp), %rdi
callq 0x5690
nopl (%rax)