// File: /workspace/github_cpp_makefile_star2_O2/hugosantos[P]dbeacon/dbeacon.cpp
// Function: getSource(address const&, char const*, unsigned long, unsigned long, bool)
beaconSource &getSource(const address &baddr, const char *name, uint64_t now, uint64_t recvdts, bool rx_local) {
	Sources::iterator i = sources.find(baddr);
	if (i != sources.end()) {
		i->second.lastevent = now;
		if (rx_local)
			i->second.lastlocalevent = now;
		return i->second;
	}

	beaconSource &src = sources[baddr];

	if (verbose) {
		char tmp[64];

		if (name)
			info("Adding source %s [%s]", baddr.to_string(tmp, sizeof(tmp)), name);
		else
			info("Adding source %s", baddr.to_string(tmp, sizeof(tmp)));
	}

	if (name)
		src.setName(name);

	src.creation = now;
	src.lastevent = now;
	if (rx_local)
		src.lastlocalevent = now;

	if (IsSSMEnabled())
		CountSSMJoin(ssmProbeAddr, baddr);

	return src;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movl %r8d, %ebp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq 0xcd42(%rip), %rdi      # 0x12458
movq %r14, %rsi
callq 0x8d96
movq %rax, %rbx
leaq 0xcd38(%rip), %rax      # 0x12460
cmpq %rax, %rbx
je 0x575c
movq %r15, 0x130(%rbx)
testb %bpl, %bpl
je 0x5740
movq %r15, 0x138(%rbx)
addq $0xa0, %rbx
movq %rbx, %rax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xccf5(%rip), %rdi      # 0x12458
movq %r14, %rsi
callq 0x723e
movq %rax, %rbx
cmpl $0x0, 0xcdc3(%rip)      # 0x12538
je 0x57b6
leaq 0x40(%rsp), %rsi
pushq $0x40
popq %rdx
pushq $0x1
popq %rcx
movq %r14, %rdi
callq 0x9e40
testq %r12, %r12
je 0x57a5
leaq 0x65bd(%rip), %rdi      # 0xbd53
movq %rax, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x3f31
jmp 0x57b6
leaq 0x65bd(%rip), %rdi      # 0xbd69
movq %rax, %rsi
xorl %eax, %eax
callq 0x3f31
testq %r12, %r12
je 0x57e7
leaq 0x40(%rsp), %rdi
leaq 0xf0(%rsp), %rdx
movq %r12, %rsi
callq 0x72a8
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x6012
leaq 0x40(%rsp), %rdi
callq 0x3688
movq %r15, 0x80(%rbx)
movq %r15, 0x90(%rbx)
testb %bpl, %bpl
je 0x5801
movq %r15, 0x98(%rbx)
cmpl $0x0, 0xd050(%rip)      # 0x12858
je 0x5747
leaq 0xf0(%rsp), %r15
movq %r15, %rdi
callq 0x9c00
movq %r14, %rdi
callq 0x9686
movq %r15, %rdi
movl %eax, %esi
callq 0x9b06
movq %r15, %rdi
movq %r14, %rsi
callq 0x9f5e
movq %r15, %rdi
xorl %esi, %esi
callq 0x9e08
leaq 0xd044(%rip), %rdi      # 0x12890
leaq 0xcdb5(%rip), %rsi      # 0x12608
callq 0x7cc2
movq %rax, %r12
leaq 0xd036(%rip), %rax      # 0x12898
cmpq %rax, %r12
jne 0x58fe
cmpl $0x0, 0xccc6(%rip)      # 0x12538
je 0x589f
leaq 0xcd8d(%rip), %rdi      # 0x12608
leaq 0x170(%rsp), %rsi
pushq $0x40
popq %rdx
pushq $0x1
popq %rcx
callq 0x9e40
leaq 0x6b30(%rip), %rdi      # 0xc3c5
movq %rax, %rsi
xorl %eax, %eax
callq 0x3f31
leaq 0x18(%rsp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0xcd44(%rip), %rsi      # 0x12608
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x7fde
leaq 0xcfb6(%rip), %rdi      # 0x12890
leaq 0x40(%rsp), %rsi
callq 0x7d44
movq %rax, %r12
leaq 0xc0(%rsp), %rdi
callq 0x7c0e
leaq 0x10(%rsp), %rdi
callq 0x7c0e
leaq 0xa0(%r12), %r15
leaq 0xf0(%rsp), %rsi
movq %r15, %rdi
callq 0x800a
movq %rax, %r13
addq $0xa8, %r12
cmpq %r12, %rax
jne 0x5a01
cmpl $0x0, 0xcc08(%rip)      # 0x12538
je 0x5983
leaq 0xf0(%rsp), %rdi
leaq 0x170(%rsp), %rsi
pushq $0x40
popq %r12
pushq $0x1
popq %rbp
movq %r12, %rdx
movl %ebp, %ecx
callq 0x9e40
movq %rax, %r13
leaq 0xccab(%rip), %rdi      # 0x12608
leaq 0x1b0(%rsp), %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x9e40
leaq 0x6a68(%rip), %rdi      # 0xc3de
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3f31
movl 0xcecf(%rip), %edi      # 0x12858
leaq 0xcc78(%rip), %rsi      # 0x12608
leaq 0xf0(%rsp), %rdx
callq 0x969b
testl %eax, %eax
js 0x5aac
leaq 0x18(%rsp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x40(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x82c4
leaq 0x40(%rsp), %rsi
movq %r15, %rdi
callq 0x8080
movq %rax, %r13
leaq 0xc0(%rsp), %rdi
callq 0x7c76
leaq 0x10(%rsp), %rdi
callq 0x7c76
leaq 0xa0(%r13), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x82f0
addq $0xa8, %r13
cmpq %r13, %rax
jne 0x5747
cmpl $0x0, 0xcb0e(%rip)      # 0x12538
je 0x5a9c
leaq 0x170(%rsp), %rsi
pushq $0x40
popq %r12
pushq $0x1
popq %rbp
movq %r14, %rdi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x9e40
movq %rax, 0x8(%rsp)
leaq 0xf0(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x9e40
movq %rax, %r13
leaq 0xcb97(%rip), %rdi      # 0x12608
leaq 0x1f0(%rsp), %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x9e40
leaq 0x697d(%rip), %rdi      # 0xc407
movq 0x8(%rsp), %rsi
movq %r13, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x3f31
movq %r15, %rdi
movq %r14, %rsi
callq 0x8366
jmp 0x5747
cmpl $0x0, 0xca85(%rip)      # 0x12538
je 0x5747
callq 0x3030
movl (%rax), %edi
callq 0x3140
leaq 0x6923(%rip), %rdi      # 0xc3ef
movq %rax, %rsi
xorl %eax, %eax
callq 0x3f31
jmp 0x5747
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x7c76
jmp 0x5af0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x7c76
jmp 0x5b2f
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x7c0e
jmp 0x5b11
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x7c0e
jmp 0x5b2f
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x3688
jmp 0x5b2f
movq %rax, %rbx
movq %rbx, %rdi
callq 0x35d0