// File: hanhwi[P]SimPoint/analysiscode/Simpoint.cpp
// Function: Simpoint::savePreClusteringData()
void Simpoint::savePreClusteringData() {
    if (options.saveVectorsTxtFmtName != "") {
        Logger::log() << "  Saving Simpoint-format vector data to text file '" 
            << options.saveVectorsTxtFmtName << "'\n";
        ofstream output(options.saveVectorsTxtFmtName.c_str());
        Utilities::check(output.is_open(), "Simpoint::savePreClusteringData(): could not open file " +
                                options.saveVectorsTxtFmtName);
        wholeDataset->write(output);
        output.close();
    }

    if (options.saveVectorsBinFmtName != "") {
        Logger::log() << "  Saving Simpoint-format vector data to binary file '" 
            << options.saveVectorsBinFmtName << "'\n";
        ofstream output(options.saveVectorsBinFmtName.c_str());
        Utilities::check(output.is_open(), "Simpoint::savePreClusteringData(): could not open file " +
                                options.saveVectorsBinFmtName);
        wholeDataset->writeBinary(output);
        output.close();
    }

    if (options.saveVectorWeightsName != "") {
        Logger::log() << "  Saving weights of each input vector to file '" 
            << options.saveVectorWeightsName << "'\n";

        ofstream output(options.saveVectorWeightsName.c_str());
        Utilities::check(output.is_open(), "Simpoint::saveVectorWeights(): could not open file " +
                                options.saveVectorWeightsName);
        output.precision(20);
        for (unsigned int i = 0; i < wholeDataset->numRows(); i++) {
            output << wholeDataset->getWeight(i) << endl;
        }
        output.close();
    }
}

// Assembly:
subq $0x6e8, %rsp            # imm = 0x6E8
movq %rdi, 0x6e0(%rsp)
movq 0x6e0(%rsp), %rdi
movq %rdi, 0x60(%rsp)
addq $0x58, %rdi
addq $0x188, %rdi            # imm = 0x188
leaq 0x1d401(%rip), %rsi     # 0x331ff
callq 0x7b70
testb $0x1, %al
jne 0x15e0c
jmp 0x15f44
xorl %edi, %edi
callq 0x7ba0
movq %rax, %rdi
leaq 0x1dbeb(%rip), %rsi     # 0x33a08
callq 0x5360
movq 0x60(%rsp), %rsi
movq %rax, %rdi
addq $0x1e0, %rsi            # imm = 0x1E0
movq %rsi, 0x48(%rsp)
callq 0x5320
movq %rax, %rdi
leaq 0x1d7e2(%rip), %rsi     # 0x33627
callq 0x5360
movq 0x48(%rsp), %rdi
callq 0x5190
movq %rax, %rsi
leaq 0x4e0(%rsp), %rdi
movq %rdi, 0x50(%rsp)
movl $0x10, %edx
callq 0x53f0
movq 0x50(%rsp), %rdi
callq 0x5290
movb %al, 0x5f(%rsp)
jmp 0x15e7e
movq 0x60(%rsp), %rdx
addq $0x1e0, %rdx            # imm = 0x1E0
leaq 0x1dbab(%rip), %rsi     # 0x33a3c
leaq 0x4b0(%rsp), %rdi
callq 0x7880
jmp 0x15ea0
movb 0x5f(%rsp), %al
movzbl %al, %edi
andl $0x1, %edi
leaq 0x4b0(%rsp), %rsi
callq 0x7480
jmp 0x15eb9
leaq 0x4b0(%rsp), %rdi
callq 0x5788
movq 0x60(%rsp), %rax
movq (%rax), %rdi
leaq 0x4e0(%rsp), %rsi
callq 0xb250
jmp 0x15edd
leaq 0x4e0(%rsp), %rdi
callq 0x5560
jmp 0x15eec
leaq 0x4e0(%rsp), %rdi
callq 0x55a0
jmp 0x15f44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d8(%rsp)
movl %eax, 0x4d4(%rsp)
jmp 0x15f32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d8(%rsp)
movl %eax, 0x4d4(%rsp)
leaq 0x4b0(%rsp), %rdi
callq 0x5788
leaq 0x4e0(%rsp), %rdi
callq 0x55a0
jmp 0x16288
movq 0x60(%rsp), %rdi
addq $0x58, %rdi
addq $0x1a8, %rdi            # imm = 0x1A8
leaq 0x1d2a4(%rip), %rsi     # 0x331ff
callq 0x7b70
testb $0x1, %al
jne 0x15f69
jmp 0x160a1
xorl %edi, %edi
callq 0x7ba0
movq %rax, %rdi
leaq 0x1dafa(%rip), %rsi     # 0x33a74
callq 0x5360
movq 0x60(%rsp), %rsi
movq %rax, %rdi
addq $0x200, %rsi            # imm = 0x200
movq %rsi, 0x30(%rsp)
callq 0x5320
movq %rax, %rdi
leaq 0x1d685(%rip), %rsi     # 0x33627
callq 0x5360
movq 0x30(%rsp), %rdi
callq 0x5190
movq %rax, %rsi
leaq 0x2b0(%rsp), %rdi
movq %rdi, 0x38(%rsp)
movl $0x10, %edx
callq 0x53f0
movq 0x38(%rsp), %rdi
callq 0x5290
movb %al, 0x47(%rsp)
jmp 0x15fdb
movq 0x60(%rsp), %rdx
addq $0x200, %rdx            # imm = 0x200
leaq 0x1da4e(%rip), %rsi     # 0x33a3c
leaq 0x290(%rsp), %rdi
callq 0x7880
jmp 0x15ffd
movb 0x47(%rsp), %al
movzbl %al, %edi
andl $0x1, %edi
leaq 0x290(%rsp), %rsi
callq 0x7480
jmp 0x16016
leaq 0x290(%rsp), %rdi
callq 0x5788
movq 0x60(%rsp), %rax
movq (%rax), %rdi
leaq 0x2b0(%rsp), %rsi
callq 0xb970
jmp 0x1603a
leaq 0x2b0(%rsp), %rdi
callq 0x5560
jmp 0x16049
leaq 0x2b0(%rsp), %rdi
callq 0x55a0
jmp 0x160a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d8(%rsp)
movl %eax, 0x4d4(%rsp)
jmp 0x1608f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d8(%rsp)
movl %eax, 0x4d4(%rsp)
leaq 0x290(%rsp), %rdi
callq 0x5788
leaq 0x2b0(%rsp), %rdi
callq 0x55a0
jmp 0x16288
movq 0x60(%rsp), %rdi
addq $0x58, %rdi
addq $0x108, %rdi            # imm = 0x108
leaq 0x1d147(%rip), %rsi     # 0x331ff
callq 0x7b70
testb $0x1, %al
jne 0x160c6
jmp 0x16280
xorl %edi, %edi
callq 0x7ba0
movq %rax, %rdi
leaq 0x1d9d3(%rip), %rsi     # 0x33aaa
callq 0x5360
movq 0x60(%rsp), %rsi
movq %rax, %rdi
addq $0x160, %rsi            # imm = 0x160
movq %rsi, 0x18(%rsp)
callq 0x5320
movq %rax, %rdi
leaq 0x1d528(%rip), %rsi     # 0x33627
callq 0x5360
movq 0x18(%rsp), %rdi
callq 0x5190
movq %rax, %rsi
leaq 0x90(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movl $0x10, %edx
callq 0x53f0
movq 0x20(%rsp), %rdi
callq 0x5290
movb %al, 0x2f(%rsp)
jmp 0x16138
movq 0x60(%rsp), %rdx
addq $0x160, %rdx            # imm = 0x160
leaq 0x1d98f(%rip), %rsi     # 0x33ada
leaq 0x70(%rsp), %rdi
callq 0x7880
jmp 0x16157
movb 0x2f(%rsp), %al
movzbl %al, %edi
andl $0x1, %edi
leaq 0x70(%rsp), %rsi
callq 0x7480
jmp 0x1616d
leaq 0x70(%rsp), %rdi
callq 0x5788
movq 0x90(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x90(%rsp,%rax), %rdi
movl $0x14, %esi
callq 0x9cf0
jmp 0x16197
movl $0x0, 0x6c(%rsp)
movq 0x60(%rsp), %rax
movl 0x6c(%rsp), %ecx
movl %ecx, 0x10(%rsp)
movq (%rax), %rdi
callq 0xc0c0
movl %eax, 0x14(%rsp)
jmp 0x161ba
movl 0x10(%rsp), %eax
movl 0x14(%rsp), %ecx
cmpl %ecx, %eax
jae 0x16253
movq 0x60(%rsp), %rax
movq (%rax), %rdi
movl 0x6c(%rsp), %esi
callq 0x10d30
movsd %xmm0, 0x8(%rsp)
jmp 0x161e3
movsd 0x8(%rsp), %xmm0
leaq 0x90(%rsp), %rdi
callq 0x5700
movq %rax, (%rsp)
jmp 0x161fc
movq (%rsp), %rdi
movq 0x2ddb9(%rip), %rsi     # 0x43fc0
callq 0x53c0
jmp 0x1620e
jmp 0x16210
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x1619f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d8(%rsp)
movl %eax, 0x4d4(%rsp)
jmp 0x16271
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4d8(%rsp)
movl %eax, 0x4d4(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x5788
jmp 0x16271
leaq 0x90(%rsp), %rdi
callq 0x5560
jmp 0x16262
leaq 0x90(%rsp), %rdi
callq 0x55a0
jmp 0x16280
leaq 0x90(%rsp), %rdi
callq 0x55a0
jmp 0x16288
addq $0x6e8, %rsp            # imm = 0x6E8
retq
movq 0x4d8(%rsp), %rdi
callq 0x5690
nopw %cs:(%rax,%rax)