// File: 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
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdx, -0x150(%rbp)
movq %rdi, %rax
movq -0x150(%rbp), %rdi
movq %rsi, -0x148(%rbp)
movq %rdi, -0x138(%rbp)
movq %rax, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x140(%rbp)
callq 0x2430
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
movq $-0x1, %rax
cmpq $0x0, %rdi
cmovlq %rax, %rdi
callq 0x2030
movq -0x138(%rbp), %rdi
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x130(%rbp)
callq 0x2150
movq -0x130(%rbp), %rdi
movq %rax, %rsi
movslq -0x2c(%rbp), %rdx
callq 0x21a0
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpb $0x0, (%rax)
je 0x8b89
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x8b7b
movq -0x40(%rbp), %rax
movb $0x5f, (%rax)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x8b5f
movq -0x140(%rbp), %rax
cmpl $0x0, 0x28(%rax)
jne 0x8c67
movq -0x148(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x2160
movq -0x38(%rbp), %rax
movq %rax, -0x160(%rbp)
leaq -0x81(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x24c0
movq -0x160(%rbp), %rsi
movq -0x158(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x23e0
jmp 0x8be1
movq -0x140(%rbp), %rdi
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %r8
leaq -0x60(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x93f0
jmp 0x8bfe
leaq -0x80(%rbp), %rdi
callq 0x21e0
leaq -0x81(%rbp), %rdi
callq 0x2350
leaq -0x60(%rbp), %rdi
callq 0x21e0
jmp 0x8c67
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x8c4d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x21e0
leaq -0x81(%rbp), %rdi
callq 0x2350
leaq -0x60(%rbp), %rdi
callq 0x21e0
jmp 0x8e5b
movq -0x140(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x8d5e
movq -0x148(%rbp), %rsi
leaq -0xb8(%rbp), %rdi
callq 0x2160
movq -0x38(%rbp), %rax
movq %rax, -0x170(%rbp)
leaq -0xd9(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x24c0
movq -0x170(%rbp), %rsi
movq -0x168(%rbp), %rdx
leaq -0xd8(%rbp), %rdi
callq 0x23e0
jmp 0x8cc6
movq -0x140(%rbp), %rdi
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %r8
leaq -0xb8(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
callq 0x9530
jmp 0x8ce9
leaq -0xd8(%rbp), %rdi
callq 0x21e0
leaq -0xd9(%rbp), %rdi
callq 0x2350
leaq -0xb8(%rbp), %rdi
callq 0x21e0
jmp 0x8d5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x8d41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x21e0
leaq -0xd9(%rbp), %rdi
callq 0x2350
leaq -0xb8(%rbp), %rdi
callq 0x21e0
jmp 0x8e5b
movq -0x140(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x8e52
movq -0x148(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0x2160
movq -0x38(%rbp), %rax
movq %rax, -0x180(%rbp)
leaq -0x121(%rbp), %rdi
movq %rdi, -0x178(%rbp)
callq 0x24c0
movq -0x180(%rbp), %rsi
movq -0x178(%rbp), %rdx
leaq -0x120(%rbp), %rdi
callq 0x23e0
jmp 0x8dbd
movq -0x140(%rbp), %rdi
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %r8
leaq -0x100(%rbp), %rsi
leaq -0x120(%rbp), %rdx
callq 0x9ea0
jmp 0x8de0
leaq -0x120(%rbp), %rdi
callq 0x21e0
leaq -0x121(%rbp), %rdi
callq 0x2350
leaq -0x100(%rbp), %rdi
callq 0x21e0
jmp 0x8e52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x8e38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x21e0
leaq -0x121(%rbp), %rdi
callq 0x2350
leaq -0x100(%rbp), %rdi
callq 0x21e0
jmp 0x8e5b
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
movq -0x90(%rbp), %rdi
callq 0x24b0
nopw (%rax,%rax)