// File: 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
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x58(%rbp)
movq 0xc48(%rdi), %xmm0
movaps 0x192156(%rip), %xmm1   # 0x5fc3a0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x19215a(%rip), %xmm1   # 0x5fc3b0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
mulsd 0xc00(%rdi), %xmm0
movsd %xmm0, -0x18(%rbp)
addq $0xc30, %rdi            # imm = 0xC30
xorl %eax, %eax
movl %eax, %esi
callq 0x423c90
movq $0x0, (%rax)
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x58(%rbp), %rdi
movl -0x2c(%rbp), %eax
movq %rax, -0x60(%rbp)
addq $0xc30, %rdi            # imm = 0xC30
callq 0x423cb0
movq %rax, %rcx
movq -0x60(%rbp), %rax
cmpq %rcx, %rax
je 0x46a416
movq -0x58(%rbp), %rax
movl -0x2c(%rbp), %ecx
cvtsi2sd %rcx, %xmm0
movsd 0x191fcd(%rip), %xmm1   # 0x5fc2a0
addsd %xmm1, %xmm0
movsd 0xbf8(%rax), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movl -0x2c(%rbp), %ecx
incl %ecx
cvtsi2sd %rcx, %xmm0
movsd 0xbf8(%rax), %xmm1
mulsd %xmm1, %xmm0
movl $0x2, %edi
callq 0x41c4c0
movq -0x58(%rbp), %rdi
movsd %xmm0, -0x28(%rbp)
movsd -0x18(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
movsd -0x20(%rbp), %xmm2
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
addq $0xc30, %rdi            # imm = 0xC30
movl -0x2c(%rbp), %eax
movl %eax, %esi
callq 0x423c90
movq (%rax), %xmm0
movaps 0x192057(%rip), %xmm1   # 0x5fc3a0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x19205b(%rip), %xmm1   # 0x5fc3b0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
divsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movl $0x3, %edi
callq 0x46b870
movq -0x70(%rbp), %rdi
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %esi
callq 0x4e15f0
movq %rax, %rdi
leaq 0x14f7(%rip), %rsi      # 0x46b890
callq 0x4e0680
movq %rax, %rdi
movsd -0x38(%rbp), %xmm0
callq 0x4e2ad0
movq %rax, %rdi
movl $0x20, %esi
callq 0x4e1a90
movq %rax, -0x68(%rbp)
movl $0xc, %edi
callq 0x46b870
movq -0x68(%rbp), %rdi
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %esi
callq 0x4e15f0
movq %rax, %rdi
leaq -0x46bff(%rip), %rsi    # 0x4237e0
callq 0x4e0680
movq %rax, %rdi
movsd -0x48(%rbp), %xmm0
callq 0x4e2ad0
movq %rax, %rdi
movl $0xa, %esi
callq 0x4e1a90
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x46a298
movq -0x10(%rbp), %rdi
leaq 0x1991d9(%rip), %rsi    # 0x6035fa
callq 0x4e1b60
movq %rax, %rdi
movq -0x58(%rbp), %rax
movq 0xc48(%rax), %rsi
callq 0x4e2170
movq %rax, %rdi
leaq 0x1991c4(%rip), %rsi    # 0x603607
callq 0x4e1b60
movq $0x698ac0, %rdi         # imm = 0x698AC0
movq %rdi, -0x78(%rbp)
leaq 0x1991a2(%rip), %rsi    # 0x6035fc
callq 0x4e1b60
movq %rax, %rdi
movq -0x58(%rbp), %rax
movq 0xc48(%rax), %rsi
callq 0x4e2170
movq %rax, %rdi
leaq 0x199191(%rip), %rsi    # 0x60360d
callq 0x4e1b60
movq -0x78(%rbp), %rdi
leaq 0x19918f(%rip), %rsi    # 0x60361b
callq 0x4e1b60
movq %rax, %rdi
movq -0x58(%rbp), %rax
movq 0xc50(%rax), %xmm0
movaps 0x191ef9(%rip), %xmm1   # 0x5fc3a0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x191efd(%rip), %xmm1   # 0x5fc3b0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x191dbe(%rip), %xmm1   # 0x5fc288
mulsd %xmm1, %xmm0
callq 0x4e2ad0
movq %rax, %rdi
leaq 0x192077(%rip), %rsi    # 0x5fc554
callq 0x4e1b60
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)