// File: /workspace/github_cpp_makefile_star2_O2/MiWitt[P]HLAbaits/main.cpp
// Function: tile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int, int)
map<string,string>  tile(string ID, string seq, int start, int end, int step_size = TILING_STEP_SIZE)
{
    map<string,string> mapRet;
    cerr << "tiling: " << setw(20) << right << ID << ", uncovered bases:" << setw(10) << right << end-start+1 << endl;
    while( (end-start)+1 < PROBE_SIZE)
    {
        if(rand() % 2 == 0)
        {
            if(start > 0)
                start--;
            if((end-start)+1 < PROBE_SIZE && end < seq.size()-1)
                end++;
        }
        else
        {
            if(end < seq.size()-1)
                end++;
            if((end-start)+1 < PROBE_SIZE && start > 0)
                start--;

        }
    }
    if((end-start)+1 == PROBE_SIZE)
    {
        ostringstream osr("");
        osr << ID << '_' << start << '_' << end;
        mapRet[osr.str()]=seq.substr(start,(end-start)+1);
    }
    else
    {
        if(rand() % 2 == 1)
        {
            ostringstream osr("");
            osr << ID << '_' << start << '_' << start+PROBE_SIZE-1;
            mapRet[osr.str()]=seq.substr(start,PROBE_SIZE);
            map<string,string> mapTmp = tile(ID,seq,start+step_size,end);
            mapRet.insert(mapTmp.begin(),mapTmp.end());
        }
        else
        {
            ostringstream osr("");
            osr << ID << '_' << (end-PROBE_SIZE)+1 << '_' << end;
            mapRet[osr.str()]=seq.substr((end-PROBE_SIZE)+1,PROBE_SIZE);
            map<string,string> mapTmp = tile(ID,seq,start,end-step_size);
            mapRet.insert(mapTmp.begin(),mapTmp.end());
        }
    }
    return mapRet;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movl %r9d, 0xc(%rsp)
movl %r8d, %r15d
movl %ecx, %r14d
movq %rdx, %r12
movq %rsi, (%rsp)
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
andl $0x0, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
movq 0x74e7(%rip), %rdi      # 0xaff0
leaq 0x352b(%rip), %rsi      # 0x703b
callq 0x3220
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x14, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl $0xffffff4f, %edx       # imm = 0xFFFFFF4F
andl 0x18(%rax,%rcx), %edx
orl $0x80, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movq (%rsp), %rsi
callq 0x3200
leaq 0x34f5(%rip), %rsi      # 0x7044
movq %rax, %rdi
callq 0x3220
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0xa, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl $0xffffff4f, %edx       # imm = 0xFFFFFF4F
andl 0x18(%rax,%rcx), %edx
orl $0x80, %edx
movl %edx, 0x18(%rax,%rcx)
movl %r15d, %esi
subl %r14d, %esi
incl %esi
movq %rax, %rdi
callq 0x33e0
movq %rax, %rdi
callq 0x3130
movl 0x76ab(%rip), %r13d     # 0xb248
leal 0x1(%r15), %ebp
movl %r15d, %eax
subl %r14d, %eax
incl %eax
cmpl %r13d, %eax
jge 0x3c1b
callq 0x30b0
movslq %r15d, %rcx
testb $0x1, %al
jne 0x3be7
xorl %eax, %eax
testl %r14d, %r14d
setg %al
subl %eax, %r14d
movl %ebp, %eax
subl %r14d, %eax
movl 0x7677(%rip), %r13d     # 0xb248
cmpl %r13d, %eax
jge 0x3ba1
movq 0x8(%r12), %rax
decq %rax
cmpq %rax, %rcx
adcl $0x0, %r15d
jmp 0x3b9d
movq 0x8(%r12), %rax
decq %rax
cmpq %rax, %rcx
adcl $0x0, %r15d
movl %r15d, %eax
subl %r14d, %eax
incl %eax
movl 0x7643(%rip), %r13d     # 0xb248
cmpl %r13d, %eax
setl %al
testl %r14d, %r14d
setg %cl
andb %al, %cl
movzbl %cl, %eax
subl %eax, %r14d
jmp 0x3b9d
jne 0x3cec
leaq 0x33fe(%rip), %rsi      # 0x7026
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x4e06
leaq 0xe0(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x10
popq %rdx
callq 0x3300
leaq 0x10(%rsp), %rdi
callq 0x3478
leaq 0xe0(%rsp), %rdi
movq (%rsp), %rsi
callq 0x3200
pushq $0x5f
popq %rsi
movq %rax, %rdi
callq 0x3290
movq %rax, %rdi
movl %r14d, %esi
callq 0x33e0
pushq $0x5f
popq %rsi
movq %rax, %rdi
callq 0x3290
movq %rax, %rdi
movl %r15d, %esi
callq 0x33e0
movslq %r14d, %rdx
movslq %r13d, %rcx
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x3250
leaq 0xe8(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x33b0
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x4e6e
leaq 0x10(%rsp), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x32b0
leaq 0x40(%rsp), %rdi
callq 0x3478
movq %r14, %rdi
callq 0x3478
jmp 0x3f99
callq 0x30b0
andl $0x80000001, %eax       # imm = 0x80000001
cmpl $0x1, %eax
jne 0x3e4f
leaq 0x3320(%rip), %rsi      # 0x7026
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x4e06
leaq 0xe0(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x10
popq %rdx
callq 0x3300
leaq 0x10(%rsp), %rdi
callq 0x3478
leaq 0xe0(%rsp), %rdi
movq (%rsp), %rsi
callq 0x3200
pushq $0x5f
popq %rsi
movq %rax, %rdi
callq 0x3290
movq %rax, %rdi
movl %r14d, %esi
callq 0x33e0
pushq $0x5f
popq %rsi
movq %rax, %rdi
callq 0x3290
movl 0x74dc(%rip), %ecx      # 0xb248
leal (%r14,%rcx), %esi
decl %esi
movq %rax, %rdi
callq 0x33e0
movslq %r14d, %rdx
movslq 0x74c4(%rip), %rcx      # 0xb248
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x3250
leaq 0xe8(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x33b0
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x4e6e
leaq 0x10(%rsp), %rbp
movq %rax, %rdi
movq %rbp, %rsi
callq 0x32b0
leaq 0x40(%rsp), %rdi
callq 0x3478
movq %rbp, %rdi
callq 0x3478
leaq 0xc0(%rsp), %rdi
movq (%rsp), %rsi
callq 0x32f0
leaq 0xa0(%rsp), %rdi
movq %r12, %rsi
callq 0x32f0
addl 0xc(%rsp), %r14d
movl 0x7451(%rip), %r9d      # 0xb250
leaq 0x10(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
movl %r14d, %ecx
movl %r15d, %r8d
callq 0x3ac2
leaq 0xa0(%rsp), %rdi
callq 0x3478
leaq 0xc0(%rsp), %rdi
callq 0x3478
leaq 0x18(%rsp), %rdx
movq 0x10(%rdx), %rsi
movq %rbx, %rdi
callq 0x589e
jmp 0x3f8f
leaq 0x31d0(%rip), %rsi      # 0x7026
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x4e06
leaq 0xe0(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x10
popq %rdx
callq 0x3300
leaq 0x10(%rsp), %rdi
callq 0x3478
leaq 0xe0(%rsp), %rdi
movq (%rsp), %rsi
callq 0x3200
pushq $0x5f
popq %rsi
movq %rax, %rdi
callq 0x3290
movl %ebp, %esi
subl 0x73a0(%rip), %esi      # 0xb248
movq %rax, %rdi
callq 0x33e0
pushq $0x5f
popq %rsi
movq %rax, %rdi
callq 0x3290
movq %rax, %rdi
movl %r15d, %esi
callq 0x33e0
movslq 0x737b(%rip), %rcx      # 0xb248
subl %ecx, %ebp
movslq %ebp, %rdx
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x3250
leaq 0xe8(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x33b0
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x4e6e
leaq 0x10(%rsp), %rbp
movq %rax, %rdi
movq %rbp, %rsi
callq 0x32b0
leaq 0x40(%rsp), %rdi
callq 0x3478
movq %rbp, %rdi
callq 0x3478
leaq 0x80(%rsp), %rdi
movq (%rsp), %rsi
callq 0x32f0
leaq 0x60(%rsp), %rdi
movq %r12, %rsi
callq 0x32f0
subl 0xc(%rsp), %r15d
movl 0x7306(%rip), %r9d      # 0xb250
leaq 0x10(%rsp), %rdi
leaq 0x80(%rsp), %rsi
leaq 0x60(%rsp), %rdx
movl %r14d, %ecx
movl %r15d, %r8d
callq 0x3ac2
leaq 0x60(%rsp), %rdi
callq 0x3478
leaq 0x80(%rsp), %rdi
callq 0x3478
leaq 0x18(%rsp), %rdx
movq 0x10(%rdx), %rsi
movq %rbx, %rdi
callq 0x589e
leaq 0x10(%rsp), %rdi
callq 0x4fe8
leaq 0xe0(%rsp), %rdi
callq 0x3090
movq %rbx, %rax
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3fbd
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4fe8
jmp 0x405a
movq %rax, %r14
leaq 0x60(%rsp), %rdi
callq 0x3478
jmp 0x3ff3
movq %rax, %r14
leaq 0xa0(%rsp), %rdi
callq 0x3478
jmp 0x4000
movq %rax, %r14
leaq 0x80(%rsp), %rdi
jmp 0x4039
movq %rax, %r14
leaq 0xc0(%rsp), %rdi
jmp 0x4039
jmp 0x4057
jmp 0x4057
jmp 0x4022
jmp 0x4022
jmp 0x4031
jmp 0x4031
jmp 0x4057
jmp 0x4057
jmp 0x4042
jmp 0x4042
jmp 0x4069
jmp 0x4069
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x3478
jmp 0x4034
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x3478
jmp 0x405a
jmp 0x4057
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x3478
jmp 0x406c
jmp 0x4069
jmp 0x4057
jmp 0x4057
movq %rax, %r14
leaq 0xe0(%rsp), %rdi
callq 0x3090
jmp 0x406c
movq %rax, %r14
movq %rbx, %rdi
callq 0x4fe8
movq %r14, %rdi
callq 0x33f0