// File: icemiliang[P]vot/src/votx/otx.cc
// Function: votx::OTX::check_total_mass()
void OTX::check_total_mass() {
        double totaldirac = 0, totalmass = 0;
        for (auto d : vDiracXs) totaldirac += d->dirac();
        for (auto e : vEmpiricalXs) totalmass += e->mass();

        if (vFlagVerb) {
            std::cout << "--> Checking total measures... " << std::endl;
            std::cout << "       Total Dirac measure: " << totaldirac << std::endl;
            std::cout << "       Total Empirical measure: " << totalmass << std::endl;
            std::cout << "       Diff: " << fabs(totaldirac - totalmass) << std::endl;
            std::cout << std::endl;
        }
        ASSERT_VOT(fabs(totaldirac - totalmass) / totaldirac < OTX_TOLERANCE*vNumEmpiricalXs,
               "Total Dirac measure: " << totaldirac << 
               " not equal to total Empirical measure: " << totalmass);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x10(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rbp)
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x205c0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x205f0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x20620
testb $0x1, %al
jne 0x1e965
jmp 0x1e993
leaq -0x28(%rbp), %rdi
callq 0x20660
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x20680
addsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x206a0
jmp 0x1e952
movq -0x60(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x206c0
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x206f0
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x20720
testb $0x1, %al
jne 0x1e9cc
jmp 0x1e9fa
leaq -0x48(%rbp), %rdi
callq 0x20760
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x20780
addsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x207a0
jmp 0x1e9b9
movq -0x60(%rbp), %rax
testb $0x1, 0x70(%rax)
je 0x1eada
movq 0x18599(%rip), %rdi     # 0x36fa8
leaq 0x7418(%rip), %rsi      # 0x25e2e
callq 0x9480
movq %rax, %rdi
movq 0x18523(%rip), %rsi     # 0x36f48
callq 0x94d0
movq 0x18577(%rip), %rdi     # 0x36fa8
leaq 0x7416(%rip), %rsi      # 0x25e4e
callq 0x9480
movq %rax, %rdi
movsd -0x10(%rbp), %xmm0
callq 0x9960
movq %rax, %rdi
movq 0x184f4(%rip), %rsi     # 0x36f48
callq 0x94d0
movq 0x18548(%rip), %rdi     # 0x36fa8
leaq 0x7404(%rip), %rsi      # 0x25e6b
callq 0x9480
movq %rax, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x9960
movq %rax, %rdi
movq 0x184c5(%rip), %rsi     # 0x36f48
callq 0x94d0
movq 0x18519(%rip), %rdi     # 0x36fa8
leaq 0x73f6(%rip), %rsi      # 0x25e8c
callq 0x9480
movq %rax, %rdi
movsd -0x10(%rbp), %xmm0
subsd -0x18(%rbp), %xmm0
movaps 0x72f1(%rip), %xmm1     # 0x25da0
pand %xmm1, %xmm0
callq 0x9960
movq %rax, %rdi
movq 0x18486(%rip), %rsi     # 0x36f48
callq 0x94d0
movq 0x184da(%rip), %rdi     # 0x36fa8
movq 0x18473(%rip), %rsi     # 0x36f48
callq 0x94d0
jmp 0x1eadc
movq -0x60(%rbp), %rax
movsd -0x10(%rbp), %xmm1
subsd -0x18(%rbp), %xmm1
movaps 0x72af(%rip), %xmm0     # 0x25da0
pand %xmm0, %xmm1
divsd -0x10(%rbp), %xmm1
cvtsi2sdl 0x80(%rax), %xmm2
movsd 0x72a6(%rip), %xmm0     # 0x25db0
mulsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
ja 0x1ebb1
movq 0x184c1(%rip), %rdi     # 0x36fe0
leaq 0x7374(%rip), %rsi      # 0x25e9a
callq 0x9480
movq %rax, %rdi
leaq 0x72ce(%rip), %rsi      # 0x25e03
callq 0x9480
movq %rax, %rdi
leaq 0x72c6(%rip), %rsi      # 0x25e0a
callq 0x9480
movq %rax, %rdi
movl $0x67, %esi
callq 0x9890
movq %rax, %rdi
leaq 0x68cb(%rip), %rsi      # 0x2542b
callq 0x9480
movq %rax, %rdi
leaq 0x72e6(%rip), %rsi      # 0x25e55
callq 0x9480
movq %rax, %rdi
movsd -0x10(%rbp), %xmm0
callq 0x9960
movq %rax, %rdi
leaq 0x7374(%rip), %rsi      # 0x25eff
callq 0x9480
movq %rax, %rdi
movsd -0x18(%rbp), %xmm0
callq 0x9960
movq %rax, %rdi
movq 0x183a1(%rip), %rsi     # 0x36f48
callq 0x94d0
callq 0x9160
jmp 0x1ebb3
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)