// File: icemiliang[P]vot/src/vot/ot.cc
// Function: vot::OT::read_dirac_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void OT::read_dirac_from_file(std::string pFilename) {
        std::string line, temp, tempNumP;
        std::ifstream measureFile(pFilename);
        getline(measureFile, line);
        std::stringstream pLine(line);
        pLine >> temp >> tempNumP;
        int numP = stoi(tempNumP);
        // x, y, z, Dirac, mass, h, fix
        std::string x, y, z, d, m, h, f;
        for (int i = 0; i < numP; i++) {
            getline(measureFile, line);
            std::stringstream pLine(line);
            pLine >> x >> y >> z >> d >> m >> h >> f;
            // Dirac measure must be non-negative
            assert(stod(d) >= 0.0);
            
            // Add the dirac to the mDiagram
            if (m.empty())
                mDiagram->add_dirac(stod(x), stod(y), stod(z), stod(d), 0.0, 1.0, 0.0); 
            else if (h.empty())
                mDiagram->add_dirac(stod(x), stod(y), stod(z), stod(d), stod(m), 1.0, 0.0);   
            else if (f.empty()) 
                mDiagram->add_dirac(stod(x), stod(y), stod(z), stod(d), stod(m), stod(h), 0.0);
            else
                mDiagram->add_dirac(stod(x), stod(y), stod(z), stod(d), stod(m), stod(h), stod(f));    
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x7c0, %rsp            # imm = 0x7C0
movq %rsi, -0x690(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x698(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xa700
leaq -0x50(%rbp), %rdi
callq 0xa700
leaq -0x70(%rbp), %rdi
callq 0xa700
movq -0x690(%rbp), %rsi
leaq -0x278(%rbp), %rdi
movl $0x8, %edx
callq 0xa880
jmp 0x409ba
leaq -0x278(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xa0e0
jmp 0x409cc
movl $0x10, %edi
movl $0x8, %esi
callq 0x41ab0
movl %eax, -0x69c(%rbp)
jmp 0x409e3
movl -0x69c(%rbp), %edx
leaq -0x410(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xa840
jmp 0x409fb
leaq -0x410(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xa630
movq %rax, -0x6a8(%rbp)
jmp 0x40a14
movq -0x6a8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xa630
jmp 0x40a26
xorl %eax, %eax
movl %eax, %esi
leaq -0x70(%rbp), %rdi
movl $0xa, %edx
callq 0x41ad0
movl %eax, -0x6ac(%rbp)
jmp 0x40a40
movl -0x6ac(%rbp), %eax
movl %eax, -0x414(%rbp)
leaq -0x438(%rbp), %rdi
callq 0xa700
leaq -0x458(%rbp), %rdi
callq 0xa700
leaq -0x478(%rbp), %rdi
callq 0xa700
leaq -0x498(%rbp), %rdi
callq 0xa700
leaq -0x4b8(%rbp), %rdi
callq 0xa700
leaq -0x4d8(%rbp), %rdi
callq 0xa700
leaq -0x4f8(%rbp), %rdi
callq 0xa700
movl $0x0, -0x4fc(%rbp)
movl -0x4fc(%rbp), %eax
cmpl -0x414(%rbp), %eax
jge 0x4108f
leaq -0x278(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xa0e0
jmp 0x40ace
movl $0x10, %edi
movl $0x8, %esi
callq 0x41ab0
movl %eax, -0x6b0(%rbp)
jmp 0x40ae5
movl -0x6b0(%rbp), %edx
leaq -0x688(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xa840
jmp 0x40afd
leaq -0x688(%rbp), %rdi
leaq -0x438(%rbp), %rsi
callq 0xa630
movq %rax, -0x6b8(%rbp)
jmp 0x40b19
movq -0x6b8(%rbp), %rdi
leaq -0x458(%rbp), %rsi
callq 0xa630
movq %rax, -0x6c0(%rbp)
jmp 0x40b35
movq -0x6c0(%rbp), %rdi
leaq -0x478(%rbp), %rsi
callq 0xa630
movq %rax, -0x6c8(%rbp)
jmp 0x40b51
movq -0x6c8(%rbp), %rdi
leaq -0x498(%rbp), %rsi
callq 0xa630
movq %rax, -0x6d0(%rbp)
jmp 0x40b6d
movq -0x6d0(%rbp), %rdi
leaq -0x4b8(%rbp), %rsi
callq 0xa630
movq %rax, -0x6d8(%rbp)
jmp 0x40b89
movq -0x6d8(%rbp), %rdi
leaq -0x4d8(%rbp), %rsi
callq 0xa630
movq %rax, -0x6e0(%rbp)
jmp 0x40ba5
movq -0x6e0(%rbp), %rdi
leaq -0x4f8(%rbp), %rsi
callq 0xa630
jmp 0x40bba
xorl %eax, %eax
movl %eax, %esi
leaq -0x498(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x6e8(%rbp)
jmp 0x40bd4
movsd -0x6e8(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x40bea
jmp 0x40c88
leaq 0x5332e(%rip), %rdi     # 0x93f1f
leaq 0x53336(%rip), %rsi     # 0x93f2e
movl $0x21, %edx
leaq 0x53330(%rip), %rcx     # 0x93f34
callq 0xa330
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
jmp 0x4118b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
jmp 0x4117f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
jmp 0x41173
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
jmp 0x4111f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
leaq -0x688(%rbp), %rdi
callq 0xa3a0
jmp 0x4111f
leaq -0x4b8(%rbp), %rdi
callq 0xa8c0
testb $0x1, %al
jne 0x40c9d
jmp 0x40d56
movq -0x698(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x6f8(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x438(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x6f0(%rbp)
jmp 0x40cc8
xorl %eax, %eax
movl %eax, %esi
leaq -0x458(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x700(%rbp)
jmp 0x40ce2
xorl %eax, %eax
movl %eax, %esi
leaq -0x478(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x708(%rbp)
jmp 0x40cfc
xorl %eax, %eax
movl %eax, %esi
leaq -0x498(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x710(%rbp)
jmp 0x40d16
movsd -0x710(%rbp), %xmm3
movsd -0x708(%rbp), %xmm2
movsd -0x700(%rbp), %xmm1
movsd -0x6f0(%rbp), %xmm0
movq -0x6f8(%rbp), %rdi
xorps %xmm4, %xmm4
movsd 0x4d070(%rip), %xmm5    # 0x8ddb8
xorl %esi, %esi
callq 0x1efc0
jmp 0x40d51
jmp 0x4106f
leaq -0x4d8(%rbp), %rdi
callq 0xa8c0
testb $0x1, %al
jne 0x40d6b
jmp 0x40e43
movq -0x698(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x720(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x438(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x718(%rbp)
jmp 0x40d96
xorl %eax, %eax
movl %eax, %esi
leaq -0x458(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x728(%rbp)
jmp 0x40db0
xorl %eax, %eax
movl %eax, %esi
leaq -0x478(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x730(%rbp)
jmp 0x40dca
xorl %eax, %eax
movl %eax, %esi
leaq -0x498(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x738(%rbp)
jmp 0x40de4
xorl %eax, %eax
movl %eax, %esi
leaq -0x4b8(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x740(%rbp)
jmp 0x40dfe
movsd -0x740(%rbp), %xmm4
movsd -0x738(%rbp), %xmm3
movsd -0x730(%rbp), %xmm2
movsd -0x728(%rbp), %xmm1
movsd -0x718(%rbp), %xmm0
movq -0x720(%rbp), %rdi
movsd 0x4cf83(%rip), %xmm5    # 0x8ddb8
xorl %esi, %esi
callq 0x1efc0
jmp 0x40e3e
jmp 0x4106d
leaq -0x4f8(%rbp), %rdi
callq 0xa8c0
testb $0x1, %al
jne 0x40e58
jmp 0x40f4a
movq -0x698(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x750(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x438(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x748(%rbp)
jmp 0x40e83
xorl %eax, %eax
movl %eax, %esi
leaq -0x458(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x758(%rbp)
jmp 0x40e9d
xorl %eax, %eax
movl %eax, %esi
leaq -0x478(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x760(%rbp)
jmp 0x40eb7
xorl %eax, %eax
movl %eax, %esi
leaq -0x498(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x768(%rbp)
jmp 0x40ed1
xorl %eax, %eax
movl %eax, %esi
leaq -0x4b8(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x770(%rbp)
jmp 0x40eeb
xorl %eax, %eax
movl %eax, %esi
leaq -0x4d8(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x778(%rbp)
jmp 0x40f05
movsd -0x778(%rbp), %xmm5
movsd -0x770(%rbp), %xmm4
movsd -0x768(%rbp), %xmm3
movsd -0x760(%rbp), %xmm2
movsd -0x758(%rbp), %xmm1
movsd -0x748(%rbp), %xmm0
movq -0x750(%rbp), %rdi
xorl %esi, %esi
callq 0x1efc0
jmp 0x40f45
jmp 0x4106b
movq -0x698(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x788(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x438(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x780(%rbp)
jmp 0x40f75
xorl %eax, %eax
movl %eax, %esi
leaq -0x458(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x790(%rbp)
jmp 0x40f8f
xorl %eax, %eax
movl %eax, %esi
leaq -0x478(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x798(%rbp)
jmp 0x40fa9
xorl %eax, %eax
movl %eax, %esi
leaq -0x498(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x7a0(%rbp)
jmp 0x40fc3
xorl %eax, %eax
movl %eax, %esi
leaq -0x4b8(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x7a8(%rbp)
jmp 0x40fdd
xorl %eax, %eax
movl %eax, %esi
leaq -0x4d8(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x7b0(%rbp)
jmp 0x40ff7
xorl %eax, %eax
movl %eax, %esi
leaq -0x4f8(%rbp), %rdi
callq 0x41b10
movsd %xmm0, -0x7b8(%rbp)
jmp 0x41011
movsd -0x7b0(%rbp), %xmm5
movsd -0x7a8(%rbp), %xmm4
movsd -0x7a0(%rbp), %xmm3
movsd -0x798(%rbp), %xmm2
movsd -0x790(%rbp), %xmm1
movsd -0x780(%rbp), %xmm0
movq -0x788(%rbp), %rdi
movsd -0x7b8(%rbp), %xmm6
xorps %xmm7, %xmm7
cmpneqsd %xmm7, %xmm6
movq %xmm6, %rax
movl %eax, %esi
andl $0x1, %esi
callq 0x1efc0
jmp 0x41069
jmp 0x4106b
jmp 0x4106d
jmp 0x4106f
leaq -0x688(%rbp), %rdi
callq 0xa3a0
movl -0x4fc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4fc(%rbp)
jmp 0x40aaa
leaq -0x4f8(%rbp), %rdi
callq 0xaaa8
leaq -0x4d8(%rbp), %rdi
callq 0xaaa8
leaq -0x4b8(%rbp), %rdi
callq 0xaaa8
leaq -0x498(%rbp), %rdi
callq 0xaaa8
leaq -0x478(%rbp), %rdi
callq 0xaaa8
leaq -0x458(%rbp), %rdi
callq 0xaaa8
leaq -0x438(%rbp), %rdi
callq 0xaaa8
leaq -0x410(%rbp), %rdi
callq 0xa3a0
leaq -0x278(%rbp), %rdi
callq 0xa140
leaq -0x70(%rbp), %rdi
callq 0xaaa8
leaq -0x50(%rbp), %rdi
callq 0xaaa8
leaq -0x30(%rbp), %rdi
callq 0xaaa8
addq $0x7c0, %rsp            # imm = 0x7C0
popq %rbp
retq
leaq -0x4f8(%rbp), %rdi
callq 0xaaa8
leaq -0x4d8(%rbp), %rdi
callq 0xaaa8
leaq -0x4b8(%rbp), %rdi
callq 0xaaa8
leaq -0x498(%rbp), %rdi
callq 0xaaa8
leaq -0x478(%rbp), %rdi
callq 0xaaa8
leaq -0x458(%rbp), %rdi
callq 0xaaa8
leaq -0x438(%rbp), %rdi
callq 0xaaa8
leaq -0x410(%rbp), %rdi
callq 0xa3a0
leaq -0x278(%rbp), %rdi
callq 0xa140
leaq -0x70(%rbp), %rdi
callq 0xaaa8
leaq -0x50(%rbp), %rdi
callq 0xaaa8
leaq -0x30(%rbp), %rdi
callq 0xaaa8
movq -0x280(%rbp), %rdi
callq 0xa950
nopw %cs:(%rax,%rax)