// File: icemiliang[P]vot/src/votx/otx.cc
// Function: votx::OTX::read_empiricalX_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void OTX::read_empiricalX_from_file(std::string pFilename) {
        std::string line, tmp, sNum, sDim, sMass;
        std::ifstream file(pFilename);
        do {getline(file, line);} while (line[0] == '#'); 
        std::stringstream pLine(line);
        pLine >> tmp >> sNum >> sDim;
        int num = stoi(sNum);
        int dim = stoi(sDim);

        // Read samples line by line
        for (int i = 0; i < num; i++) {
            do {getline(file, line);} while (line[0] == '#');
            std::stringstream pline(line);
            pline >> sMass;
            double* coors = new double[dim];
            for (int j = 0; j < dim; j++) {
                ASSERT_VOT(pline >> tmp, "# coor elements != dimension");
                coors[j] = stod(tmp);
            }
            EmpiricalX *tmpempiricalx = new EmpiricalX(dim, *coors, stod(sMass));
            vEmpiricalXs.push_back(tmpempiricalx);
        }
        vNumEmpiricalXs = vEmpiricalXs.size();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x6c0, %rsp            # imm = 0x6C0
movq %rsi, -0x608(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x610(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x9690
leaq -0x50(%rbp), %rdi
callq 0x9690
leaq -0x70(%rbp), %rdi
callq 0x9690
leaq -0x90(%rbp), %rdi
callq 0x9690
leaq -0xb0(%rbp), %rdi
callq 0x9690
movq -0x608(%rbp), %rsi
leaq -0x2b8(%rbp), %rdi
movl $0x8, %edx
callq 0x97f0
jmp 0x1e3c2
jmp 0x1e3c4
leaq -0x2b8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x90d0
jmp 0x1e3d6
jmp 0x1e3d8
xorl %eax, %eax
movl %eax, %esi
leaq -0x30(%rbp), %rdi
callq 0x99d0
movq %rax, -0x618(%rbp)
jmp 0x1e3ee
movq -0x618(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
je 0x1e3c4
movl $0x10, %edi
movl $0x8, %esi
callq 0x20370
movl %eax, -0x61c(%rbp)
jmp 0x1e414
movl -0x61c(%rbp), %edx
leaq -0x450(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x97b0
jmp 0x1e42c
leaq -0x450(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x95c0
movq %rax, -0x628(%rbp)
jmp 0x1e445
movq -0x628(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x95c0
movq %rax, -0x630(%rbp)
jmp 0x1e45e
movq -0x630(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x95c0
jmp 0x1e473
xorl %eax, %eax
movl %eax, %esi
leaq -0x70(%rbp), %rdi
movl $0xa, %edx
callq 0x20390
movl %eax, -0x634(%rbp)
jmp 0x1e48d
movl -0x634(%rbp), %eax
movl %eax, -0x454(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x90(%rbp), %rdi
movl $0xa, %edx
callq 0x20390
movl %eax, -0x638(%rbp)
jmp 0x1e4b6
movl -0x638(%rbp), %eax
movl %eax, -0x458(%rbp)
movl $0x0, -0x45c(%rbp)
movl -0x45c(%rbp), %eax
cmpl -0x454(%rbp), %eax
jge 0x1e842
jmp 0x1e4e0
leaq -0x2b8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x90d0
jmp 0x1e4f2
jmp 0x1e4f4
xorl %eax, %eax
movl %eax, %esi
leaq -0x30(%rbp), %rdi
callq 0x99d0
movq %rax, -0x640(%rbp)
jmp 0x1e50a
movq -0x640(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
je 0x1e4e0
movl $0x10, %edi
movl $0x8, %esi
callq 0x20370
movl %eax, -0x644(%rbp)
jmp 0x1e530
movl -0x644(%rbp), %edx
leaq -0x5e8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x97b0
jmp 0x1e548
leaq -0x5e8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x95c0
jmp 0x1e55d
movslq -0x458(%rbp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x9030
movq %rax, -0x650(%rbp)
jmp 0x1e588
movq -0x650(%rbp), %rax
movq %rax, -0x5f0(%rbp)
movl $0x0, -0x5f4(%rbp)
movl -0x5f4(%rbp), %eax
cmpl -0x458(%rbp), %eax
jge 0x1e760
jmp 0x1e5b4
leaq -0x5e8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x95c0
movq %rax, -0x658(%rbp)
jmp 0x1e5cd
movq -0x658(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x9220
movb %al, -0x659(%rbp)
jmp 0x1e5eb
movb -0x659(%rbp), %al
testb $0x1, %al
jne 0x1e5fa
jmp 0x1e716
movq 0x189df(%rip), %rdi     # 0x36fe0
leaq 0x77d3(%rip), %rsi      # 0x25ddb
callq 0x9480
movq %rax, -0x668(%rbp)
jmp 0x1e616
movq -0x668(%rbp), %rdi
leaq 0x77df(%rip), %rsi      # 0x25e03
callq 0x9480
movq %rax, -0x670(%rbp)
jmp 0x1e632
movq -0x670(%rbp), %rdi
leaq 0x77ca(%rip), %rsi      # 0x25e0a
callq 0x9480
movq %rax, -0x678(%rbp)
jmp 0x1e64e
movq -0x678(%rbp), %rdi
movl $0x4f, %esi
callq 0x9890
movq %rax, -0x680(%rbp)
jmp 0x1e668
movq -0x680(%rbp), %rdi
leaq 0x6db5(%rip), %rsi      # 0x2542b
callq 0x9480
movq %rax, -0x688(%rbp)
jmp 0x1e684
movq -0x688(%rbp), %rdi
leaq 0x777f(%rip), %rsi      # 0x25e11
callq 0x9480
movq %rax, -0x690(%rbp)
jmp 0x1e6a0
movq -0x690(%rbp), %rdi
movq 0x1889a(%rip), %rsi     # 0x36f48
callq 0x94d0
jmp 0x1e6b5
callq 0x9160
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2c0(%rbp)
movl %eax, -0x2c4(%rbp)
jmp 0x1e8ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2c0(%rbp)
movl %eax, -0x2c4(%rbp)
jmp 0x1e8c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2c0(%rbp)
movl %eax, -0x2c4(%rbp)
jmp 0x1e8b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2c0(%rbp)
movl %eax, -0x2c4(%rbp)
jmp 0x1e834
jmp 0x1e718
jmp 0x1e71a
xorl %eax, %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdi
callq 0x203d0
movsd %xmm0, -0x698(%rbp)
jmp 0x1e731
movsd -0x698(%rbp), %xmm0
movq -0x5f0(%rbp), %rax
movslq -0x5f4(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x5f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5f4(%rbp)
jmp 0x1e5a0
movl $0x18, %edi
callq 0x9490
movq %rax, -0x6a0(%rbp)
jmp 0x1e773
movl -0x458(%rbp), %eax
movl %eax, -0x6b4(%rbp)
movq -0x5f0(%rbp), %rax
movq %rax, -0x6b0(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0xb0(%rbp), %rdi
callq 0x203d0
movsd %xmm0, -0x6a8(%rbp)
jmp 0x1e7a7
movsd -0x6a8(%rbp), %xmm0
movq -0x6b0(%rbp), %rdx
movl -0x6b4(%rbp), %esi
movq -0x6a0(%rbp), %rdi
callq 0x204f0
jmp 0x1e7ca
movq -0x610(%rbp), %rdi
movq -0x6a0(%rbp), %rax
movq %rax, -0x600(%rbp)
addq $0x18, %rdi
leaq -0x600(%rbp), %rsi
callq 0x20550
jmp 0x1e7f1
leaq -0x5e8(%rbp), %rdi
callq 0x9390
movl -0x45c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x45c(%rbp)
jmp 0x1e4cc
movq -0x6a0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2c0(%rbp)
movl %eax, -0x2c4(%rbp)
movl $0x18, %esi
callq 0x94a0
leaq -0x5e8(%rbp), %rdi
callq 0x9390
jmp 0x1e8b6
movq -0x610(%rbp), %rdi
addq $0x18, %rdi
callq 0x20220
movq %rax, %rcx
movq -0x610(%rbp), %rax
movl %ecx, 0x80(%rax)
leaq -0x450(%rbp), %rdi
callq 0x9390
leaq -0x2b8(%rbp), %rdi
callq 0x9130
leaq -0xb0(%rbp), %rdi
callq 0x9a08
leaq -0x90(%rbp), %rdi
callq 0x9a08
leaq -0x70(%rbp), %rdi
callq 0x9a08
leaq -0x50(%rbp), %rdi
callq 0x9a08
leaq -0x30(%rbp), %rdi
callq 0x9a08
addq $0x6c0, %rsp            # imm = 0x6C0
popq %rbp
retq
leaq -0x450(%rbp), %rdi
callq 0x9390
leaq -0x2b8(%rbp), %rdi
callq 0x9130
leaq -0xb0(%rbp), %rdi
callq 0x9a08
leaq -0x90(%rbp), %rdi
callq 0x9a08
leaq -0x70(%rbp), %rdi
callq 0x9a08
leaq -0x50(%rbp), %rdi
callq 0x9a08
leaq -0x30(%rbp), %rdi
callq 0x9a08
movq -0x2c0(%rbp), %rdi
callq 0x98c0
nopl (%rax)