// File: /workspace/github_cpp_makefile_star2_O1/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 0x4dbf
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 0x4ec0
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x4ecc
testl %ecx, %ecx
jne 0x4d78
movl %r14d, (%rbx)
movsd %xmm0, 0x40(%rsp)
cmpq 0x28(%rsp), %rax
jb 0x4df1
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x4dff
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x4dad
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x4d15
movq %rsp, %rdi
leaq 0x40(%rsp), %rdx
callq 0x58b2
jmp 0x4d15
movq (%rsp), %rax
movq 0x18(%rsp), %r14
movq %rax, (%r14)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%r14)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%r14)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
jmp 0x4e5b
movl $0x17, %edx
leaq 0x22bc(%rip), %rsi      # 0x70b9
jmp 0x4e0b
movl $0x20, %edx
leaq 0x22c6(%rip), %rsi      # 0x70d1
movq 0x51be(%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 0x5193(%rip), %rdi      # 0x9fd0
callq 0x3040
movq %rax, %rdi
callq 0x3170
xorpd %xmm0, %xmm0
movupd %xmm0, (%r14)
movq $0x0, 0x10(%r14)
movq 0x5156(%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 0x4e95
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3280
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4eab
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 0x228f(%rip), %rdi      # 0x7156
callq 0x3150
leaq 0x2283(%rip), %rdi      # 0x7156
callq 0x3350
movq %rax, %r15
jmp 0x4f0f
jmp 0x4ee1
jmp 0x4ee1
movq %rax, %r15
jmp 0x4ef1
movq %rax, %r15
cmpl $0x0, (%rbx)
jne 0x4ef1
movl %r14d, (%rbx)
movq 0x50c0(%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 0x4f2b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3280
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4f41
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3280
movq %r15, %rdi
callq 0x3460