// File: /workspace/github_cpp_makefile_star2_O2/ridgelab[P]Kmer-SSR/src/Arguments.cpp
// Function: Arguments::addToPeriods(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Arguments::addToPeriods(string period_s)
{
	for (uint32_t i = 0; i < period_s.size(); ++i)
	{
		if (period_s[i])
		{
			if ( !(isdigit(period_s[i]) or period_s[i] == ',' or period_s[i] == '-') )
			{
				throw string("ERROR: '") + period_s[i] + "' is not a valid character for the -p option.";
			}

			period_s[i] = toupper(period_s[i]);
		}
	}

	vector<string> pers = split(period_s, ',');

	for (uint32_t i = 0; i < pers.size(); ++i)
	{
		if (!pers.empty())
		{
			vector<string> per = split(pers[i], '-');

			if (per.size() == 2)
			{
				for (uint32_t j = strtol(per[0].c_str(), NULL, 10); j <= strtol(per[1].c_str(), NULL, 10); ++j)
				{
					this->periods->insert(j);
				}
			}
			else if (per.size() == 1)
			{
				this->periods->insert(strtol(per[0].c_str(), NULL, 10));
			}
			else
			{
				throw "ERROR: A range can only contain 2 numbers separated by a hyphen.";
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movl %r15d, %r15d
cmpq %r15, 0x8(%r14)
jbe 0xa643
movq (%r14), %r12
movb (%r12,%r15), %al
testb %al, %al
je 0xa63e
movsbl %al, %edi
leal -0x30(%rdi), %ecx
cmpl $0xa, %ecx
setb %cl
andb $-0x2, %al
cmpb $0x2c, %al
sete %al
orb %cl, %al
je 0xa78b
callq 0x3590
movb %al, (%r12,%r15)
incl %r15d
jmp 0xa606
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x33f0
leaq 0x28(%rsp), %rdi
pushq $0x2c
popq %rcx
movq %r15, %rdx
callq 0xaadc
leaq 0x48(%rsp), %rdi
callq 0x35d8
xorl %r15d, %r15d
leaq 0x68(%rsp), %r14
leaq 0x8(%rsp), %rbp
pushq $0xa
popq %r12
leaq 0x4(%rsp), %r13
movl %r15d, %r15d
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rax
movq %rax, %rcx
subq %rsi, %rcx
sarq $0x5, %rcx
cmpq %r15, %rcx
jbe 0xa76f
cmpq %rax, %rsi
je 0xa767
movq %r15, %rax
shlq $0x5, %rax
addq %rax, %rsi
movq %r14, %rdi
callq 0x33f0
movq %rbp, %rdi
movq %r14, %rdx
pushq $0x2d
popq %rcx
callq 0xaadc
movq %r14, %rdi
callq 0x35d8
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq $0x1, %rcx
je 0xa737
cmpq $0x2, %rcx
jne 0xa7f4
movq (%rax), %rdi
xorl %esi, %esi
movl %r12d, %edx
callq 0x3400
movl %eax, 0x4(%rsp)
movl %eax, %ebp
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
movl %r12d, %edx
callq 0x3400
cmpq %rbp, %rax
jl 0xa75a
movq 0xa8(%rbx), %rdi
movq %r13, %rsi
callq 0xbaee
movl 0x4(%rsp), %eax
incl %eax
jmp 0xa702
movq 0xa8(%rbx), %rbp
movq (%rax), %rdi
xorl %esi, %esi
movl %r12d, %edx
callq 0x3400
movl %eax, 0x4(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
callq 0xbc76
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0xadc2
incl %r15d
jmp 0xa683
leaq 0x28(%rsp), %rdi
callq 0xadc2
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x3160
movq %rax, %rbx
leaq 0x2d4b(%rip), %rsi      # 0xd4e8
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x47b0
movq (%r14), %rax
movsbl (%rax,%r15), %edx
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xad82
movb $0x1, %bpl
leaq 0x2dd8(%rip), %rdx      # 0xd5a5
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x8b26
xorl %ebp, %ebp
leaq 0xa58d(%rip), %rsi      # 0x14d70
movq 0xa7ae(%rip), %rdx      # 0x14f98
movq %rbx, %rdi
callq 0x3520
jmp 0xa817
pushq $0x8
popq %rdi
callq 0x3160
leaq 0x2dd0(%rip), %rcx      # 0xd5d3
movq %rcx, (%rax)
movq 0xa79b(%rip), %rsi      # 0x14fa8
movq %rax, %rdi
xorl %edx, %edx
callq 0x3520
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x35d8
jmp 0xa888
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x35d8
jmp 0xa83b
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x35d8
testb %bpl, %bpl
jne 0xa853
jmp 0xa888
jmp 0xa871
jmp 0xa871
movq %rax, %r14
movq %rbx, %rdi
callq 0x3230
jmp 0xa888
movq %rax, %r14
jmp 0xa87e
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x35d8
jmp 0xa87e
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0xadc2
leaq 0x28(%rsp), %rdi
callq 0xadc2
movq %r14, %rdi
callq 0x3550