// File: 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
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rsi, -0x128(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x120(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x128(%rbp), %rdi
movl -0x14(%rbp), %eax
movq %rax, -0x130(%rbp)
callq 0x4260
movq %rax, %rcx
movq -0x130(%rbp), %rax
cmpq %rcx, %rax
jae 0x1a8ac
movq -0x128(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x4770
cmpb $0x0, (%rax)
je 0x1a89c
movq -0x128(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x4770
movsbl (%rax), %edi
callq 0x4350
cmpl $0x0, %eax
jne 0x1a864
movq -0x128(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x4770
movsbl (%rax), %eax
cmpl $0x2c, %eax
je 0x1a864
movq -0x128(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x4770
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x1a864
movb $0x1, -0x6d(%rbp)
movl $0x20, %edi
callq 0x41a0
movq %rax, -0x140(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x4700
movq -0x138(%rbp), %rdx
leaq 0x7d16(%rip), %rsi      # 0x224a4
leaq -0x58(%rbp), %rdi
callq 0x6da0
jmp 0x1a799
movq -0x128(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x4770
movq %rax, -0x148(%rbp)
jmp 0x1a7b3
movq -0x148(%rbp), %rax
movsbl (%rax), %edx
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x1b980
jmp 0x1a7cc
movq -0x140(%rbp), %rdi
leaq 0x7d87(%rip), %rdx      # 0x22561
leaq -0x38(%rbp), %rsi
callq 0x16810
jmp 0x1a7e5
movq -0x140(%rbp), %rdi
movb $0x0, -0x6d(%rbp)
leaq 0x17571(%rip), %rsi     # 0x31d68
movq 0x177aa(%rip), %rdx     # 0x31fa8
callq 0x46a0
jmp 0x1abfb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x1a842
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x1a839
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4788
leaq -0x58(%rbp), %rdi
callq 0x4788
leaq -0x59(%rbp), %rdi
callq 0x4410
testb $0x1, -0x6d(%rbp)
jne 0x1a853
jmp 0x1a85f
movq -0x140(%rbp), %rdi
callq 0x42a0
jmp 0x1abf2
movq -0x128(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x4770
movsbl (%rax), %edi
callq 0x4730
movq -0x128(%rbp), %rdi
movb %al, -0x149(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x4770
movb -0x149(%rbp), %cl
movb %cl, (%rax)
jmp 0x1a89e
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1a6bc
movq -0x128(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x4170
movq -0x120(%rbp), %rsi
movq -0x158(%rbp), %rdx
leaq -0x88(%rbp), %rdi
movl $0x2c, %ecx
callq 0x1b150
jmp 0x1a8e7
leaq -0xa8(%rbp), %rdi
callq 0x4788
movl $0x0, -0xac(%rbp)
movl -0xac(%rbp), %eax
movq %rax, -0x160(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x5670
movq %rax, %rcx
movq -0x160(%rbp), %rax
cmpq %rcx, %rax
jae 0x1abd1
leaq -0x88(%rbp), %rdi
callq 0x1bb90
testb $0x1, %al
jne 0x1abbb
movl -0xac(%rbp), %eax
movl %eax, %esi
leaq -0x88(%rbp), %rdi
callq 0x1bb30
movq %rax, %rsi
leaq -0xe8(%rbp), %rdi
callq 0x4170
jmp 0x1a962
movq -0x120(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %rdx
movl $0x2d, %ecx
callq 0x1b150
jmp 0x1a983
leaq -0xe8(%rbp), %rdi
callq 0x4788
leaq -0xc8(%rbp), %rdi
callq 0x5670
cmpq $0x2, %rax
jne 0x1aae2
leaq -0xc8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1bb30
movq %rax, %rdi
callq 0x4160
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x4570
movl %eax, -0xec(%rbp)
movl -0xec(%rbp), %eax
movq %rax, -0x168(%rbp)
leaq -0xc8(%rbp), %rdi
movl $0x1, %esi
callq 0x1bb30
movq %rax, %rdi
callq 0x4160
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x4570
movq %rax, %rcx
movq -0x168(%rbp), %rax
cmpq %rcx, %rax
jg 0x1aadd
movq -0x120(%rbp), %rax
movq 0xa8(%rax), %rdi
leaq -0xec(%rbp), %rsi
callq 0x1bbd0
movb %dl, -0x171(%rbp)
movq %rax, -0x170(%rbp)
jmp 0x1aa47
movb -0x171(%rbp), %al
movq -0x170(%rbp), %rcx
movq %rcx, -0x100(%rbp)
movb %al, -0xf8(%rbp)
movl -0xec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xec(%rbp)
jmp 0x1a9d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x4788
jmp 0x1abf2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x1abe6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x4788
jmp 0x1abe6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x1bad0
jmp 0x1abe6
jmp 0x1abaf
leaq -0xc8(%rbp), %rdi
callq 0x5670
cmpq $0x1, %rax
jne 0x1ab84
movq -0x120(%rbp), %rax
movq 0xa8(%rax), %rax
movq %rax, -0x190(%rbp)
xorl %eax, %eax
movl %eax, %esi
movq %rsi, -0x198(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x1bb30
movq %rax, %rdi
callq 0x4160
movq -0x198(%rbp), %rsi
movq %rax, %rdi
movl $0xa, %edx
callq 0x4570
movq -0x190(%rbp), %rdi
movl %eax, -0x104(%rbp)
leaq -0x104(%rbp), %rsi
callq 0x1bc20
movb %dl, -0x181(%rbp)
movq %rax, -0x180(%rbp)
jmp 0x1ab68
movb -0x181(%rbp), %al
movq -0x180(%rbp), %rcx
movq %rcx, -0x118(%rbp)
movb %al, -0x110(%rbp)
jmp 0x1abad
movl $0x8, %edi
callq 0x41a0
movq %rax, %rdi
leaq 0x79f7(%rip), %rax      # 0x2258f
movq %rax, (%rdi)
movq 0x173fe(%rip), %rsi     # 0x31fa0
xorl %eax, %eax
movl %eax, %edx
callq 0x46a0
jmp 0x1abfb
jmp 0x1abaf
leaq -0xc8(%rbp), %rdi
callq 0x1bad0
jmp 0x1abbd
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0x1a8fd
leaq -0x88(%rbp), %rdi
callq 0x1bad0
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
leaq -0x88(%rbp), %rdi
callq 0x1bad0
movq -0x68(%rbp), %rdi
callq 0x46e0
nopl (%rax,%rax)