// File: hanhwi[P]SimPoint/analysiscode/Simpoint.cpp
// Function: Simpoint::~Simpoint()
Simpoint::~Simpoint() {
    if (wholeDataset && (wholeDataset == sampledDataset)) {
        delete wholeDataset;
    } else {
        if (wholeDataset) { delete wholeDataset; }
        if (sampledDataset) { delete sampledDataset; }
    }
    wholeDataset = sampledDataset = NULL;

    for (unsigned int i = 0; i < initialCenters.size(); i++) {
        if (initialCenters[i]) { delete initialCenters[i]; initialCenters[i] = NULL; }
    }

    for (unsigned int i = 0; i < finalCenters.size(); i++) {
        if (finalCenters[i]) { delete finalCenters[i]; finalCenters[i] = NULL; }
    }
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, (%rax)
je 0x19de5
movq 0x40(%rsp), %rcx
movq (%rcx), %rax
cmpq 0x8(%rcx), %rax
jne 0x19de5
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
je 0x19de3
movq 0x38(%rsp), %rdi
callq 0x10da0
movq 0x38(%rsp), %rdi
movl $0x30, %esi
callq 0x5390
jmp 0x19e5b
movq 0x40(%rsp), %rax
cmpq $0x0, (%rax)
je 0x19e1e
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, %rax
je 0x19e1c
movq 0x30(%rsp), %rdi
callq 0x10da0
movq 0x30(%rsp), %rdi
movl $0x30, %esi
callq 0x5390
jmp 0x19e1e
movq 0x40(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x19e59
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
je 0x19e57
movq 0x28(%rsp), %rdi
callq 0x10da0
movq 0x28(%rsp), %rdi
movl $0x30, %esi
callq 0x5390
jmp 0x19e59
jmp 0x19e5b
movq 0x40(%rsp), %rax
movq $0x0, 0x8(%rax)
movq $0x0, (%rax)
movl $0x0, 0x4c(%rsp)
movq 0x40(%rsp), %rdi
movl 0x4c(%rsp), %eax
movq %rax, 0x20(%rsp)
addq $0x10, %rdi
callq 0x1b020
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jae 0x19f21
movq 0x40(%rsp), %rdi
addq $0x10, %rdi
movl 0x4c(%rsp), %eax
movl %eax, %esi
callq 0x1aa70
cmpq $0x0, (%rax)
je 0x19f0f
movq 0x40(%rsp), %rdi
addq $0x10, %rdi
movl 0x4c(%rsp), %eax
movl %eax, %esi
callq 0x1aa70
movq (%rax), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x19ef4
movq 0x18(%rsp), %rdi
callq 0x10da0
movq 0x18(%rsp), %rdi
movl $0x30, %esi
callq 0x5390
movq 0x40(%rsp), %rdi
addq $0x10, %rdi
movl 0x4c(%rsp), %eax
movl %eax, %esi
callq 0x1aa70
movq $0x0, (%rax)
jmp 0x19f11
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x19e77
movl $0x0, 0x48(%rsp)
movq 0x40(%rsp), %rdi
movl 0x48(%rsp), %eax
movq %rax, 0x10(%rsp)
addq $0x28, %rdi
callq 0x1b020
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x19fd3
movq 0x40(%rsp), %rdi
addq $0x28, %rdi
movl 0x48(%rsp), %eax
movl %eax, %esi
callq 0x1aa70
cmpq $0x0, (%rax)
je 0x19fc1
movq 0x40(%rsp), %rdi
addq $0x28, %rdi
movl 0x48(%rsp), %eax
movl %eax, %esi
callq 0x1aa70
movq (%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x19fa6
movq 0x8(%rsp), %rdi
callq 0x10da0
movq 0x8(%rsp), %rdi
movl $0x30, %esi
callq 0x5390
movq 0x40(%rsp), %rdi
addq $0x28, %rdi
movl 0x48(%rsp), %eax
movl %eax, %esi
callq 0x1aa70
movq $0x0, (%rax)
jmp 0x19fc3
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0x19f29
movq 0x40(%rsp), %rdi
addq $0x58, %rdi
callq 0x1b040
movq 0x40(%rsp), %rdi
addq $0x40, %rdi
callq 0x9960
movq 0x40(%rsp), %rdi
addq $0x28, %rdi
callq 0x1afc0
movq 0x40(%rsp), %rdi
addq $0x10, %rdi
callq 0x1afc0
addq $0x58, %rsp
retq