// File: icemiliang[P]vot/src/vot/diagram.cc
// Function: vot::Diagram::write_results(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Diagram::write_results(int const iterD, int const iterH, std::string pFilePrefix) {
        std::cout << "File prefix: " << pFilePrefix << std::endl;
        std::string diagramFileName = pFilePrefix + "_diagram_" + std::to_string(iterD) 
                                                  + "_" + std::to_string(iterH)+ ".gnu";
        std::string pFileName = pFilePrefix + "_" + std::to_string(iterD) 
                                            + "_" + std::to_string(iterH) + ".vot";
        std::string pFileNameInput = pFilePrefix + "_" + std::to_string(iterD) 
                                                 + "_" + std::to_string(iterH) + "_input.vot";

        // Reconstruct the diagram in case the data stored in the voro++ object is not updated.
        mDiagram->clear();
        for (int i = 0; i < mNumDiracs; i++) {
            mDiagram->put(i, mDiracs[i].x(), mDiracs[i].y(), mDiracs[i].z(), sqrt(mHs[i]));
        }
        
        draw_diagram(diagramFileName);
        write_dirac(pFileName);
        write_dirac_as_input(pFileNameInput);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x370, %rsp            # imm = 0x370
movq %rcx, -0x338(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x340(%rbp)
movq 0x9f686(%rip), %rdi     # 0xbef98
leaq 0x6e534(%rip), %rsi     # 0x8de4d
callq 0xa4a0
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0xa460
movq %rax, %rdi
movq 0x9f5f1(%rip), %rsi     # 0xbef28
callq 0xa500
movq -0x338(%rbp), %rsi
leaq 0x6e511(%rip), %rdx     # 0x8de5b
leaq -0xb8(%rbp), %rdi
callq 0xd8e0
movl -0xc(%rbp), %esi
leaq -0xd8(%rbp), %rdi
callq 0x21990
jmp 0x1f967
leaq -0x98(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
callq 0xd720
jmp 0x1f983
leaq 0x6e4d9(%rip), %rdx     # 0x8de63
leaq -0x78(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0xd7f0
jmp 0x1f99c
movl -0x10(%rbp), %esi
leaq -0x108(%rbp), %rdi
callq 0x21990
jmp 0x1f9ad
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x108(%rbp), %rdx
callq 0xd720
jmp 0x1f9c3
leaq 0x6e49b(%rip), %rdx     # 0x8de65
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xd7f0
jmp 0x1f9d9
leaq -0x58(%rbp), %rdi
callq 0xaaa8
leaq -0x108(%rbp), %rdi
callq 0xaaa8
leaq -0x78(%rbp), %rdi
callq 0xaaa8
leaq -0x98(%rbp), %rdi
callq 0xaaa8
leaq -0xd8(%rbp), %rdi
callq 0xaaa8
leaq -0xb8(%rbp), %rdi
callq 0xaaa8
movq -0x338(%rbp), %rsi
leaq 0x6e43a(%rip), %rdx     # 0x8de63
leaq -0x1a8(%rbp), %rdi
callq 0xd8e0
jmp 0x1fa37
movl -0xc(%rbp), %esi
leaq -0x1c8(%rbp), %rdi
callq 0x21990
jmp 0x1fa48
leaq -0x188(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
leaq -0x1c8(%rbp), %rdx
callq 0xd720
jmp 0x1fa64
leaq 0x6e3f8(%rip), %rdx     # 0x8de63
leaq -0x168(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0xd7f0
jmp 0x1fa80
movl -0x10(%rbp), %esi
leaq -0x1e8(%rbp), %rdi
callq 0x21990
jmp 0x1fa91
leaq -0x148(%rbp), %rdi
leaq -0x168(%rbp), %rsi
leaq -0x1e8(%rbp), %rdx
callq 0xd720
jmp 0x1faad
leaq 0x6e3bc(%rip), %rdx     # 0x8de70
leaq -0x128(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0xd7f0
jmp 0x1fac9
leaq -0x148(%rbp), %rdi
callq 0xaaa8
leaq -0x1e8(%rbp), %rdi
callq 0xaaa8
leaq -0x168(%rbp), %rdi
callq 0xaaa8
leaq -0x188(%rbp), %rdi
callq 0xaaa8
leaq -0x1c8(%rbp), %rdi
callq 0xaaa8
leaq -0x1a8(%rbp), %rdi
callq 0xaaa8
movq -0x338(%rbp), %rsi
leaq 0x6e344(%rip), %rdx     # 0x8de63
leaq -0x288(%rbp), %rdi
callq 0xd8e0
jmp 0x1fb2d
movl -0xc(%rbp), %esi
leaq -0x2a8(%rbp), %rdi
callq 0x21990
jmp 0x1fb3e
leaq -0x268(%rbp), %rdi
leaq -0x288(%rbp), %rsi
leaq -0x2a8(%rbp), %rdx
callq 0xd720
jmp 0x1fb5a
leaq 0x6e302(%rip), %rdx     # 0x8de63
leaq -0x248(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0xd7f0
jmp 0x1fb76
movl -0x10(%rbp), %esi
leaq -0x2c8(%rbp), %rdi
callq 0x21990
jmp 0x1fb87
leaq -0x228(%rbp), %rdi
leaq -0x248(%rbp), %rsi
leaq -0x2c8(%rbp), %rdx
callq 0xd720
jmp 0x1fba3
leaq 0x6e2c0(%rip), %rdx     # 0x8de6a
leaq -0x208(%rbp), %rdi
leaq -0x228(%rbp), %rsi
callq 0xd7f0
jmp 0x1fbbf
leaq -0x228(%rbp), %rdi
callq 0xaaa8
leaq -0x2c8(%rbp), %rdi
callq 0xaaa8
leaq -0x248(%rbp), %rdi
callq 0xaaa8
leaq -0x268(%rbp), %rdi
callq 0xaaa8
leaq -0x2a8(%rbp), %rdi
callq 0xaaa8
leaq -0x288(%rbp), %rdi
callq 0xaaa8
movq -0x340(%rbp), %rax
movq (%rax), %rdi
callq 0x57810
jmp 0x1fc18
movl $0x0, -0x2cc(%rbp)
movq -0x340(%rbp), %rcx
movl -0x2cc(%rbp), %eax
cmpl 0x38(%rcx), %eax
jge 0x1ffbb
movq -0x340(%rbp), %rdi
movq (%rdi), %rax
movq %rax, -0x358(%rbp)
movl -0x2cc(%rbp), %eax
movl %eax, -0x34c(%rbp)
addq $0x20, %rdi
movslq %eax, %rsi
callq 0x218b0
movq %rax, %rdi
callq 0x218d0
movsd %xmm0, -0x348(%rbp)
jmp 0x1fc73
movq -0x340(%rbp), %rdi
addq $0x20, %rdi
movslq -0x2cc(%rbp), %rsi
callq 0x218b0
movq %rax, %rdi
callq 0x218f0
movsd %xmm0, -0x360(%rbp)
jmp 0x1fc9c
movq -0x340(%rbp), %rdi
addq $0x20, %rdi
movslq -0x2cc(%rbp), %rsi
callq 0x218b0
movq %rax, %rdi
callq 0x21910
movsd %xmm0, -0x368(%rbp)
jmp 0x1fcc5
movq -0x340(%rbp), %rdi
addq $0x50, %rdi
movslq -0x2cc(%rbp), %rsi
callq 0x21950
movsd (%rax), %xmm0
callq 0xa3d0
movq -0x358(%rbp), %rdi
movl -0x34c(%rbp), %esi
movsd -0x360(%rbp), %xmm1
movsd -0x368(%rbp), %xmm2
movaps %xmm0, %xmm3
movsd -0x348(%rbp), %xmm0
callq 0x56650
jmp 0x1fd14
jmp 0x1fd16
movl -0x2cc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2cc(%rbp)
jmp 0x1fc22
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x1fdd9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x1fdcd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x1fdc1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x1fdb8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x1fdac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xaaa8
leaq -0x108(%rbp), %rdi
callq 0xaaa8
leaq -0x78(%rbp), %rdi
callq 0xaaa8
leaq -0x98(%rbp), %rdi
callq 0xaaa8
leaq -0xd8(%rbp), %rdi
callq 0xaaa8
leaq -0xb8(%rbp), %rdi
callq 0xaaa8
jmp 0x20103
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x200fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x1feb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x1feaa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x1fe9e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x1fe92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x1fe86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x148(%rbp), %rdi
callq 0xaaa8
leaq -0x1e8(%rbp), %rdi
callq 0xaaa8
leaq -0x168(%rbp), %rdi
callq 0xaaa8
leaq -0x188(%rbp), %rdi
callq 0xaaa8
leaq -0x1c8(%rbp), %rdi
callq 0xaaa8
leaq -0x1a8(%rbp), %rdi
callq 0xaaa8
jmp 0x200fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x200ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x1ff93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x1ff87
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x1ff7b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x1ff6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x1ff63
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x228(%rbp), %rdi
callq 0xaaa8
leaq -0x2c8(%rbp), %rdi
callq 0xaaa8
leaq -0x248(%rbp), %rdi
callq 0xaaa8
leaq -0x268(%rbp), %rdi
callq 0xaaa8
leaq -0x2a8(%rbp), %rdi
callq 0xaaa8
leaq -0x288(%rbp), %rdi
callq 0xaaa8
jmp 0x200ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x200e2
leaq -0x2f0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xa200
jmp 0x1ffcd
movq -0x340(%rbp), %rdi
leaq -0x2f0(%rbp), %rsi
callq 0x1f1d0
jmp 0x1ffe2
leaq -0x2f0(%rbp), %rdi
callq 0xaaa8
leaq -0x310(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0xa200
jmp 0x20003
movq -0x340(%rbp), %rdi
leaq -0x310(%rbp), %rsi
callq 0x1f5b0
jmp 0x20018
leaq -0x310(%rbp), %rdi
callq 0xaaa8
leaq -0x330(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0xa200
jmp 0x20039
movq -0x340(%rbp), %rdi
leaq -0x330(%rbp), %rsi
callq 0x1f240
jmp 0x2004e
leaq -0x330(%rbp), %rdi
callq 0xaaa8
leaq -0x208(%rbp), %rdi
callq 0xaaa8
leaq -0x128(%rbp), %rdi
callq 0xaaa8
leaq -0x38(%rbp), %rdi
callq 0xaaa8
addq $0x370, %rsp            # imm = 0x370
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x2f0(%rbp), %rdi
callq 0xaaa8
jmp 0x200e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x310(%rbp), %rdi
callq 0xaaa8
jmp 0x200e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x330(%rbp), %rdi
callq 0xaaa8
leaq -0x208(%rbp), %rdi
callq 0xaaa8
leaq -0x128(%rbp), %rdi
callq 0xaaa8
leaq -0x38(%rbp), %rdi
callq 0xaaa8
movq -0xe0(%rbp), %rdi
callq 0xa950
nop