// File: /workspace/github_cpp_makefile_star2_O2/ridgelab[P]Kmer-SSR/src/Arguments.cpp
// Function: Arguments::split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char)
vector<string> Arguments::split(string str, char sep)
{
	vector<string> v;
	vector<uint32_t> starts = {0};
	vector<uint32_t> ends;

	for (uint32_t i = 0; i < str.size(); ++i)
	{
		if (str[i] == sep)
		{
			ends.push_back(i);

			if (starts[starts.size() - 1] == ends[ends.size() - 1])
			{
				starts.pop_back();
				ends.pop_back();
			}

			starts.push_back(i + 1);
		}
	}

	ends.push_back(str.size());

	if (starts[starts.size() - 1] >= str.size())
	{
		starts.pop_back();
		ends.pop_back();
	}

	if (starts.size() != ends.size())
	{
		throw "ERROR: You should never see this, but starts and ends had different lengths in Arguments::split.";
	}

	for (uint32_t i = 0; i < starts.size(); ++i)
	{
		v.push_back(str.substr(starts[i], ends[i] - starts[i]));
	}

	return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x48(%rsp), %rsi
andl $0x0, (%rsi)
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rdx
leaq 0x10(%rsp), %rcx
callq 0x8014
leaq 0x10(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
andq $0x0, 0x10(%r15)
xorl %eax, %eax
leaq 0x30(%rsp), %r13
leaq 0xc(%rsp), %r12
movl %eax, 0x48(%rsp)
movl %eax, %ecx
movq 0x8(%r14), %rdx
cmpq %rcx, %rdx
jbe 0xab9a
movq (%r14), %rdx
cmpb %bpl, (%rdx,%rcx)
jne 0xab96
movq %r15, %rdi
leaq 0x48(%rsp), %rsi
callq 0xada4
movq 0x38(%rsp), %rcx
movl -0x4(%rcx), %edx
movq 0x18(%rsp), %rax
cmpl -0x4(%rax), %edx
jne 0xab7d
addq $-0x4, %rcx
movq %rcx, 0x38(%rsp)
addq $-0x4, %rax
movq %rax, 0x18(%rsp)
movl 0x48(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x8508
movl 0x48(%rsp), %eax
incl %eax
jmp 0xab34
leaq 0x48(%rsp), %rsi
movl %edx, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x8508
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
movl -0x4(%rcx), %esi
movq 0x18(%rsp), %rdx
cmpq %rsi, 0x8(%r14)
ja 0xabd5
addq $-0x4, %rcx
movq %rcx, 0x38(%rsp)
addq $-0x4, %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, %rsi
subq %rax, %rsi
subq 0x10(%rsp), %rdx
cmpq %rdx, %rsi
jne 0xac5e
xorl %r12d, %r12d
leaq 0x48(%rsp), %r15
movl %r12d, %r12d
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r12, %rcx
jbe 0xac38
movl (%rax,%r12,4), %edx
movq 0x10(%rsp), %rax
movl (%rax,%r12,4), %ecx
subl %edx, %ecx
movq %r15, %rdi
movq %r14, %rsi
callq 0x3300
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb5da
movq %r15, %rdi
callq 0x35d8
incl %r12d
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
jmp 0xabed
leaq 0x10(%rsp), %rdi
callq 0x86f0
leaq 0x30(%rsp), %rdi
callq 0x86f0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x8
popq %rdi
callq 0x3160
leaq 0x28a9(%rip), %rcx      # 0xd516
movq %rcx, (%rax)
movq 0xa331(%rip), %rsi      # 0x14fa8
movq %rax, %rdi
xorl %edx, %edx
callq 0x3520
jmp 0xac9d
jmp 0xac9d
movq %rax, %r14
jmp 0xacb4
jmp 0xac9d
jmp 0xac9d
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x35d8
jmp 0xaca0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x86f0
leaq 0x30(%rsp), %rdi
callq 0x86f0
movq %rbx, %rdi
callq 0xadc2
movq %r14, %rdi
callq 0x3550