// File: /workspace/github_cpp_makefile_star2_O3/ChristalC[P]Online-Outlier-Detection/p2_helper.cpp
// Function: splitCsv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
vector<double> splitCsv(string ip) {
  vector<double> out;
  // Split the string by comma
  string buf;
  stringstream ss(ip);

  vector<double> empty_vector;
  
  while (getline(ss, buf, ',')) {
    size_t idx = 0;
    double d = stod(buf, &idx);
    if (idx < buf.size()) {
      cout << "Detect invalid number. " << endl;
      return empty_vector;
    }
    if (d < 0) {
      cout << "Detect negative point, invalid. " << endl;
      return empty_vector;
    }
    out.push_back(d);
  }
  return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdi, 0x18(%rsp)
xorl %eax, %eax
movq %rax, 0x10(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
leaq 0x30(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb $0x0, (%rcx)
leaq 0x50(%rsp), %rdi
movl $0x18, %edx
callq 0x33e0
leaq 0x50(%rsp), %r15
leaq 0x20(%rsp), %r12
leaq 0x48(%rsp), %r13
movq %r15, %rdi
movq %r12, %rsi
movl $0x2c, %edx
callq 0x34a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4d81
movq 0x20(%rsp), %rbp
callq 0x3050
movq %rax, %rbx
movl (%rax), %r14d
movl $0x0, (%rax)
movq %rbp, %rdi
movq %r13, %rsi
callq 0x31d0
movq 0x48(%rsp), %rax
subq %rbp, %rax
je 0x4e78
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x4e84
testl %ecx, %ecx
jne 0x4d3a
movl %r14d, (%rbx)
movsd %xmm0, 0x40(%rsp)
cmpq 0x28(%rsp), %rax
jb 0x4da9
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x4db7
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x4d6f
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x4cd7
movq %rsp, %rdi
leaq 0x40(%rsp), %rdx
callq 0x5826
jmp 0x4cd7
movaps (%rsp), %xmm0
movq 0x18(%rsp), %r14
movups %xmm0, (%r14)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
jmp 0x4e13
movl $0x17, %edx
leaq 0x2304(%rip), %rsi      # 0x70b9
jmp 0x4dc3
movl $0x20, %edx
leaq 0x230e(%rip), %rsi      # 0x70d1
movq 0x5206(%rip), %rbx      # 0x9fd0
movq %rbx, %rdi
callq 0x32b0
movq 0x18(%rsp), %r14
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq 0x51db(%rip), %rdi      # 0x9fd0
callq 0x3040
movq %rax, %rdi
callq 0x3170
xorpd %xmm0, %xmm0
movupd %xmm0, (%r14)
movq $0x0, 0x10(%r14)
movq 0x519e(%rip), %rsi      # 0x9fb8
leaq 0x50(%rsp), %rdi
callq 0x31a0
leaq 0xd0(%rsp), %rdi
callq 0x30b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x4e4d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3280
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4e63
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3280
movq %r14, %rax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x22d7(%rip), %rdi      # 0x7156
callq 0x3150
leaq 0x22cb(%rip), %rdi      # 0x7156
callq 0x3350
movq %rax, %r15
jmp 0x4ec7
jmp 0x4e99
jmp 0x4e99
movq %rax, %r15
jmp 0x4ea9
movq %rax, %r15
cmpl $0x0, (%rbx)
jne 0x4ea9
movl %r14d, (%rbx)
movq 0x5108(%rip), %rsi      # 0x9fb8
leaq 0x50(%rsp), %rdi
callq 0x31a0
leaq 0xd0(%rsp), %rdi
callq 0x30b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x4ee3
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3280
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4ef9
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3280
movq %r15, %rdi
callq 0x3460