// File: atfrank[P]PCASA/lib/Misc.cpp
// Function: void Misc::splitNum<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<int, std::allocator<int>>&, bool)
void Misc::splitNum (const std::string &str, const std::string &delim, std::vector<SplitVec> &out, const bool repeat){
  out.clear();
  out.reserve(500); //Still need resizing but reduces moving of data in memory
  size_t p0=0;
  size_t p1=std::string::npos;
  size_t plast=std::string::npos;
  SplitVec tmp;

  //Only use this if all columns are needed as a number!

  //"repeat" = true means that a blank string is added when there are
  //back-to-back delimiters. Otherwise, repeat=false ignores back-to-back delimiters.

  plast=str.find_last_not_of(delim);
  p1=str.find_first_of(delim,p0);

  while (p1 != std::string::npos){
    if (p1-p0 > 0){
      std::stringstream(str.substr(p0,p1-p0)) >> tmp;
      out.push_back(tmp);
    }
    else{
      if (repeat){
        std::stringstream(str.substr(p0,p1-p0)) >> tmp;
        out.push_back(tmp);
      }
    }
    p0=p1+1;
    p1=str.find_first_of(delim, p0);
  }
  //After last delimiter
  if (plast != std::string::npos && plast >= p0){
    std::stringstream(str.substr(p0,p1-p0)) >> tmp;
    out.push_back(tmp);
  }
  else{
    if (repeat){
      std::stringstream(str.substr(p0,p1-p0)) >> tmp;
      out.push_back(tmp);
    }
  }
  //std::cerr << out.size() << std::endl;
}

// Assembly:
subq $0x708, %rsp            # imm = 0x708
movb %cl, %al
movq %rdi, 0x700(%rsp)
movq %rsi, 0x6f8(%rsp)
movq %rdx, 0x6f0(%rsp)
andb $0x1, %al
movb %al, 0x6ef(%rsp)
movq 0x6f0(%rsp), %rdi
callq 0x3ec90
movq 0x6f0(%rsp), %rdi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x3ecb0
movq $0x0, 0x6e0(%rsp)
movq $-0x1, 0x6d8(%rsp)
movq $-0x1, 0x6d0(%rsp)
movq 0x700(%rsp), %rdi
movq 0x6f8(%rsp), %rsi
movq $-0x1, %rdx
callq 0x5770
movq %rax, 0x6d0(%rsp)
movq 0x700(%rsp), %rdi
movq 0x6f8(%rsp), %rsi
movq 0x6e0(%rsp), %rdx
callq 0x53a0
movq %rax, 0x6d8(%rsp)
cmpq $-0x1, 0x6d8(%rsp)
je 0x3ea82
movq 0x6d8(%rsp), %rax
subq 0x6e0(%rsp), %rax
cmpq $0x0, %rax
jbe 0x3e94b
movq 0x700(%rsp), %rsi
movq 0x6e0(%rsp), %rdx
movq 0x6d8(%rsp), %rcx
subq %rdx, %rcx
leaq 0x520(%rsp), %rdi
callq 0x5440
movl $0x10, %edi
movl $0x8, %esi
callq 0x7850
movl %eax, 0x14(%rsp)
jmp 0x3e89c
movl 0x14(%rsp), %edx
leaq 0x540(%rsp), %rdi
leaq 0x520(%rsp), %rsi
callq 0x5670
jmp 0x3e8b7
leaq 0x540(%rsp), %rdi
leaq 0x6cc(%rsp), %rsi
callq 0x7820
jmp 0x3e8ce
leaq 0x540(%rsp), %rdi
callq 0x52e0
leaq 0x520(%rsp), %rdi
callq 0x5250
movq 0x6f0(%rsp), %rdi
leaq 0x6cc(%rsp), %rsi
callq 0x3edc0
jmp 0x3ea44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x518(%rsp)
movl %eax, 0x514(%rsp)
jmp 0x3e939
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x518(%rsp)
movl %eax, 0x514(%rsp)
leaq 0x540(%rsp), %rdi
callq 0x52e0
leaq 0x520(%rsp), %rdi
callq 0x5250
jmp 0x3ec79
testb $0x1, 0x6ef(%rsp)
je 0x3ea42
movq 0x700(%rsp), %rsi
movq 0x6e0(%rsp), %rdx
movq 0x6d8(%rsp), %rcx
subq %rdx, %rcx
leaq 0x368(%rsp), %rdi
callq 0x5440
movl $0x10, %edi
movl $0x8, %esi
callq 0x7850
movl %eax, 0x10(%rsp)
jmp 0x3e996
movl 0x10(%rsp), %edx
leaq 0x388(%rsp), %rdi
leaq 0x368(%rsp), %rsi
callq 0x5670
jmp 0x3e9b1
leaq 0x388(%rsp), %rdi
leaq 0x6cc(%rsp), %rsi
callq 0x7820
jmp 0x3e9c8
leaq 0x388(%rsp), %rdi
callq 0x52e0
leaq 0x368(%rsp), %rdi
callq 0x5250
movq 0x6f0(%rsp), %rdi
leaq 0x6cc(%rsp), %rsi
callq 0x3edc0
jmp 0x3ea42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x518(%rsp)
movl %eax, 0x514(%rsp)
jmp 0x3ea30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x518(%rsp)
movl %eax, 0x514(%rsp)
leaq 0x388(%rsp), %rdi
callq 0x52e0
leaq 0x368(%rsp), %rdi
callq 0x5250
jmp 0x3ec79
jmp 0x3ea44
movq 0x6d8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x6e0(%rsp)
movq 0x700(%rsp), %rdi
movq 0x6f8(%rsp), %rsi
movq 0x6e0(%rsp), %rdx
callq 0x53a0
movq %rax, 0x6d8(%rsp)
jmp 0x3e836
cmpq $-0x1, 0x6d0(%rsp)
je 0x3eb93
movq 0x6d0(%rsp), %rax
cmpq 0x6e0(%rsp), %rax
jb 0x3eb93
movq 0x700(%rsp), %rsi
movq 0x6e0(%rsp), %rdx
movq 0x6d8(%rsp), %rcx
subq %rdx, %rcx
leaq 0x1c0(%rsp), %rdi
callq 0x5440
movl $0x10, %edi
movl $0x8, %esi
callq 0x7850
movl %eax, 0xc(%rsp)
jmp 0x3eae4
movl 0xc(%rsp), %edx
leaq 0x1e0(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
callq 0x5670
jmp 0x3eaff
leaq 0x1e0(%rsp), %rdi
leaq 0x6cc(%rsp), %rsi
callq 0x7820
jmp 0x3eb16
leaq 0x1e0(%rsp), %rdi
callq 0x52e0
leaq 0x1c0(%rsp), %rdi
callq 0x5250
movq 0x6f0(%rsp), %rdi
leaq 0x6cc(%rsp), %rsi
callq 0x3edc0
jmp 0x3ec71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x518(%rsp)
movl %eax, 0x514(%rsp)
jmp 0x3eb81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x518(%rsp)
movl %eax, 0x514(%rsp)
leaq 0x1e0(%rsp), %rdi
callq 0x52e0
leaq 0x1c0(%rsp), %rdi
callq 0x5250
jmp 0x3ec79
testb $0x1, 0x6ef(%rsp)
je 0x3ec6f
movq 0x700(%rsp), %rsi
movq 0x6e0(%rsp), %rdx
movq 0x6d8(%rsp), %rcx
subq %rdx, %rcx
leaq 0x18(%rsp), %rdi
callq 0x5440
movl $0x10, %edi
movl $0x8, %esi
callq 0x7850
movl %eax, 0x8(%rsp)
jmp 0x3ebdb
movl 0x8(%rsp), %edx
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x5670
jmp 0x3ebf0
leaq 0x38(%rsp), %rdi
leaq 0x6cc(%rsp), %rsi
callq 0x7820
jmp 0x3ec04
leaq 0x38(%rsp), %rdi
callq 0x52e0
leaq 0x18(%rsp), %rdi
callq 0x5250
movq 0x6f0(%rsp), %rdi
leaq 0x6cc(%rsp), %rsi
callq 0x3edc0
jmp 0x3ec6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x518(%rsp)
movl %eax, 0x514(%rsp)
jmp 0x3ec63
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x518(%rsp)
movl %eax, 0x514(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x52e0
leaq 0x18(%rsp), %rdi
callq 0x5250
jmp 0x3ec79
jmp 0x3ec71
addq $0x708, %rsp            # imm = 0x708
retq
movq 0x518(%rsp), %rdi
callq 0x5720
nopw %cs:(%rax,%rax)