// File: /workspace/github_cpp_makefile_star2_O1/Cell-veto[P]postlhc/paircorrel.cpp
// Function: Correlator<Monodisperse2D>::savetxt(std::ostream&)
virtual void savetxt (std::ostream &os)
    {
        const double exp_sample_dens = ndata_ * rho_;
        hist_[0] = 0;

        double rv1 = 0., rv2;
        for (unsigned i = 0; i != hist_.size (); ++i)
        {
            double r = (i+.5) * binwid_;
            rv2 = ball_volume (DIM, (i+1) * binwid_);
            double expected = exp_sample_dens * (rv2-rv1);
            double gofr = hist_[i] / expected;
            os << std::setprecision (3) << std::fixed
                << r << ' '
                << std::setprecision (12) << std::scientific
                << gofr << '\n';
            rv1 = rv2;
        }

        os << "# gofr_stat " << ndata_ << " fin\n";
        std::cerr << "gofr_stat " << ndata_ << " wrote histo\n";
        std::cerr << "gofr_walltime " << walltime_*1e-6 << " seconds\n";
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movsd 0xc48(%rdi), %xmm0
unpcklps 0x18c45c(%rip), %xmm0   # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
movq %rsi, %r14
subpd 0x18c461(%rip), %xmm0   # 0x5cb0c0
movapd %xmm0, %xmm5
unpckhpd %xmm0, %xmm5            # xmm5 = xmm5[1],xmm0[1]
addsd %xmm0, %xmm5
mulsd 0xc00(%rdi), %xmm5
movq 0xc30(%rdi), %rax
movq $0x0, (%rax)
cmpq %rax, 0xc38(%rdi)
je 0x43edd6
xorl %eax, %eax
xorpd %xmm1, %xmm1
movl $0xfffffefb, %ebp       # imm = 0xFFFFFEFB
leaq 0x6(%rsp), %r15
leaq 0x7(%rsp), %r12
xorl %r13d, %r13d
movapd %xmm5, 0x10(%rsp)
movl %r13d, %ecx
movsd 0xbf8(%rbx), %xmm2
incl %r13d
xorps %xmm3, %xmm3
cvtsi2sd %r13, %xmm3
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
mulsd %xmm2, %xmm3
mulsd %xmm3, %xmm3
mulsd 0x191fbe(%rip), %xmm3   # 0x5d0c98
movsd %xmm3, 0x8(%rsp)
movq 0xc30(%rbx), %rcx
movsd (%rcx,%rax,8), %xmm4
unpcklps 0x18c3bd(%rip), %xmm4   # xmm4 = xmm4[0],mem[0],xmm4[1],mem[1]
subsd %xmm1, %xmm3
subpd 0x18c3c1(%rip), %xmm4   # 0x5cb0c0
movapd %xmm4, %xmm1
unpckhpd %xmm4, %xmm1            # xmm1 = xmm1[1],xmm4[1]
addsd %xmm4, %xmm1
mulsd %xmm5, %xmm3
divsd %xmm3, %xmm1
movapd %xmm1, 0x20(%rsp)
movq (%r14), %rax
addsd 0x18c28c(%rip), %xmm0   # 0x5cafb0
movq -0x18(%rax), %rcx
movq $0x3, 0x8(%r14,%rcx)
movq -0x18(%rax), %rax
mulsd %xmm2, %xmm0
movl 0x18(%r14,%rax), %ecx
andl %ebp, %ecx
orl $0x4, %ecx
movl %ecx, 0x18(%r14,%rax)
movq %r14, %rdi
callq 0x4b2730
movb $0x20, 0x6(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x4b14d0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0xc, 0x8(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl %ebp, %edx
orl $0x100, %edx            # imm = 0x100
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movapd 0x20(%rsp), %xmm0
callq 0x4b2730
movb $0xa, 0x7(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x4b14d0
movapd 0x10(%rsp), %xmm5
movq 0xc38(%rbx), %rcx
subq 0xc30(%rbx), %rcx
sarq $0x3, %rcx
movq %r13, %rax
movsd 0x8(%rsp), %xmm1
cmpq %r13, %rcx
jne 0x43ecac
leaq 0x19200e(%rip), %rsi    # 0x5d0deb
movl $0xc, %edx
movq %r14, %rdi
callq 0x4b14d0
movq 0xc48(%rbx), %rsi
movq %r14, %rdi
callq 0x4b1dd0
leaq 0x191ff8(%rip), %rsi    # 0x5d0df8
movl $0x5, %edx
movq %rax, %rdi
callq 0x4b14d0
movq $0x656aa0, %r14         # imm = 0x656AA0
leaq 0x191fd2(%rip), %rsi    # 0x5d0ded
movl $0xa, %edx
movq %r14, %rdi
callq 0x4b14d0
movq 0xc48(%rbx), %rsi
movq %r14, %rdi
callq 0x4b1dd0
leaq 0x191fc0(%rip), %rsi    # 0x5d0dfe
movl $0xd, %edx
movq %rax, %rdi
callq 0x4b14d0
leaq 0x191fba(%rip), %rsi    # 0x5d0e0c
movl $0xe, %edx
movq %r14, %rdi
callq 0x4b14d0
movsd 0xc50(%rbx), %xmm1
unpcklps 0x18c242(%rip), %xmm1   # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x18c24a(%rip), %xmm1   # 0x5cb0c0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x18c106(%rip), %xmm0   # 0x5caf90
movq %r14, %rdi
callq 0x4b2730
leaq 0x18c3b6(%rip), %rsi    # 0x5cb24f
movl $0x9, %edx
movq %rax, %rdi
callq 0x4b14d0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop