// File: /workspace/github_cpp_makefile_star2_O3/yahoo[P]UDPing/src/statswriter.cc
// Function: StatsWriter::writeStats(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, Stats*)
void StatsWriter::writeStats (string guid, string peer, int port, Stats *stats) {
    int n = peer.length();
    char* peerCopy = new char[n + 1];
    strncpy(peerCopy, peer.c_str(), n);
    peerCopy[n] = 0;
    char* c = peerCopy;
    while (*c) {
        if (*c == '.') {
            *c = '_';
        }
        c++;
    }

    if (!this->quiet) {
        writeConsoleStats(guid, peerCopy, port, stats);
    }
    if (this->statsd_sa) {
        writeStatsdStats(guid, peerCopy, port, stats);
    }
    if (this->tags_sa) {
        writeTagsStats(guid, peerCopy, port, stats);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r8, %r15
movl %ecx, %ebp
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r12
movq 0x8(%rdx), %rbx
leal 0x1(%rbx), %eax
cltq
testq %rax, %rax
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x3030
movq (%r13), %rsi
movslq %ebx, %r13
movq %r15, %rbx
movq %rax, %r15
movq %rax, %rdi
movq %r13, %rdx
callq 0x3190
movb $0x0, (%r15,%r13)
movq %r15, %rax
movzbl (%rax), %ecx
cmpl $0x2e, %ecx
je 0x619d
testl %ecx, %ecx
jne 0x61a0
jmp 0x61a5
movb $0x5f, (%rax)
incq %rax
jmp 0x618f
cmpl $0x0, 0x28(%r12)
jne 0x623d
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x41c4
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r15, %rdi
callq 0x3150
leaq (%rax,%r15), %rdx
leaq 0xa8(%rsp), %rdi
movq %r15, %rsi
callq 0x425a
leaq 0x8(%rsp), %rsi
leaq 0xa8(%rsp), %r13
movq %r12, %rdi
movq %r13, %rdx
movl %ebp, %ecx
movq %rbx, %r8
callq 0x66e8
movq (%r13), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x6229
callq 0x32f0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x623d
callq 0x32f0
cmpq $0x0, 0x10(%r12)
je 0x62b9
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x41c4
leaq 0x78(%rsp), %r13
movq %r13, -0x10(%r13)
movq %r15, %rdi
callq 0x3150
leaq (%rax,%r15), %rdx
leaq 0x68(%rsp), %rdi
movq %r15, %rsi
callq 0x425a
leaq 0x68(%rsp), %rdx
movq %r12, %rdi
movl %ebp, %ecx
movq %rbx, %r8
callq 0x67ce
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x62a5
callq 0x32f0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x62b9
callq 0x32f0
cmpq $0x0, 0x18(%r12)
je 0x633b
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0x41c4
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
movq %r15, %rdi
callq 0x3150
movq %r15, %rdx
addq %rax, %rdx
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
callq 0x425a
leaq 0x48(%rsp), %rdx
movq %r12, %rdi
movl %ebp, %ecx
movq %rbx, %r8
callq 0x6f12
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x6329
callq 0x32f0
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x633b
callq 0x32f0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
jmp 0x63a3
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x6373
callq 0x32f0
jmp 0x6373
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
jne 0x63a8
jmp 0x63ad
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x6399
callq 0x32f0
jmp 0x6399
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x63ad
callq 0x32f0
movq %rbx, %rdi
callq 0x34b0
nop