// File: /workspace/github_cpp_makefile_star2_O1/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 0x6195
testl %ecx, %ecx
jne 0x6198
jmp 0x619d
movb $0x5f, (%rax)
incq %rax
jmp 0x6187
cmpl $0x0, 0x28(%r12)
jne 0x6235
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x41c8
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 0x4258
leaq 0x8(%rsp), %rsi
leaq 0xa8(%rsp), %r13
movq %r12, %rdi
movq %r13, %rdx
movl %ebp, %ecx
movq %rbx, %r8
callq 0x66e0
movq (%r13), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x6221
callq 0x32f0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6235
callq 0x32f0
cmpq $0x0, 0x10(%r12)
je 0x62b1
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x41c8
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 0x4258
leaq 0x68(%rsp), %rdx
movq %r12, %rdi
movl %ebp, %ecx
movq %rbx, %r8
callq 0x67c6
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x629d
callq 0x32f0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x62b1
callq 0x32f0
cmpq $0x0, 0x18(%r12)
je 0x6333
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0x41c8
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 0x4258
leaq 0x48(%rsp), %rdx
movq %r12, %rdi
movl %ebp, %ecx
movq %rbx, %r8
callq 0x6f0a
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x6321
callq 0x32f0
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x6333
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 0x639b
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x636b
callq 0x32f0
jmp 0x636b
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
jne 0x63a0
jmp 0x63a5
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x6391
callq 0x32f0
jmp 0x6391
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x63a5
callq 0x32f0
movq %rbx, %rdi
callq 0x34b0
nop