// File: /workspace/github_cpp_makefile_star2_O3/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, 0x3c(%rsp)
movl %r8d, %r15d
movl %ecx, %r14d
movq %rdx, %r12
movq %rsi, %r13
leaq 0x8(%rdi), %rax
movl $0x0, 0x8(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rdi, 0x30(%rsp)
movq %rcx, 0x28(%rdi)
movq 0x732c(%rip), %rbx      # 0xaff0
leaq 0x4370(%rip), %rsi      # 0x803b
movl $0x8, %edx
movq %rbx, %rdi
callq 0x3290
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movq $0x14, 0x10(%rbx,%rcx)
movq -0x18(%rax), %rax
movl $0xffffff4f, %ecx       # imm = 0xFFFFFF4F
andl 0x18(%rbx,%rax), %ecx
orl $0x80, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %rbx, %rdi
callq 0x3290
movq %rax, %rbx
leaq 0x432b(%rip), %rsi      # 0x8044
movl $0x12, %edx
movq %rax, %rdi
callq 0x3290
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movq $0xa, 0x10(%rbx,%rcx)
movq -0x18(%rax), %rax
movl $0xffffff4f, %ecx       # imm = 0xFFFFFF4F
andl 0x18(%rbx,%rax), %ecx
orl $0x80, %ecx
movl %ecx, 0x18(%rbx,%rax)
movl %r15d, %ebp
subl %r14d, %ebp
incl %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3400
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3190
movl 0x74c1(%rip), %eax      # 0xb250
cmpl %eax, %ebp
jge 0x3e0a
callq 0x30a0
testb $0x1, %al
jne 0x3dcd
xorl %eax, %eax
testl %r14d, %r14d
setg %al
subl %eax, %r14d
movl %r15d, %ecx
subl %r14d, %ecx
incl %ecx
movl 0x749b(%rip), %eax      # 0xb250
cmpl %eax, %ecx
jge 0x3e00
movslq %r15d, %rcx
movq 0x8(%r12), %rdx
decq %rdx
cmpq %rdx, %rcx
adcl $0x0, %r15d
jmp 0x3e00
movslq %r15d, %r15
movq 0x8(%r12), %rax
decq %rax
cmpq %rax, %r15
adcl $0x0, %r15d
movl %r15d, %ecx
subl %r14d, %ecx
incl %ecx
movl 0x7463(%rip), %eax      # 0xb250
cmpl %eax, %ecx
setl %cl
testl %r14d, %r14d
setg %dl
andb %cl, %dl
movzbl %dl, %ecx
subl %ecx, %r14d
movl %r15d, %ebp
subl %r14d, %ebp
incl %ebp
jmp 0x3d8f
leaq 0x10(%rsp), %rbx
cmpl %eax, %ebp
jne 0x3f22
movq %rsp, %rdi
movq %rbx, (%rdi)
leaq 0x4202(%rip), %rdx      # 0x8026
movq %rdx, %rsi
callq 0x5d26
leaq 0xe0(%rsp), %rdi
movq %rsp, %rsi
movl $0x10, %edx
callq 0x32f0
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x3e57
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3240
movq (%r13), %rsi
movq 0x8(%r13), %rdx
leaq 0xe0(%rsp), %rdi
callq 0x3290
movq %rsp, %rsi
movb $0x5f, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x3290
movq %rax, %rdi
movl %r14d, %esi
callq 0x3400
movq %rsp, %rsi
movb $0x5f, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x3290
movq %rax, %rdi
movl %r15d, %esi
callq 0x3400
movslq %r14d, %rdx
movslq %ebp, %rcx
movq %rsp, %rdi
movq %r12, %rsi
callq 0x3260
leaq 0xe8(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movq 0x30(%rsp), %r14
callq 0x33c0
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x5ac8
movq %rsp, %rsi
movq %rax, %rdi
callq 0x32c0
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f03
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3240
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x42d0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3240
jmp 0x42d0
callq 0x30a0
andl $0x80000001, %eax       # imm = 0x80000001
movq %rsp, %rdi
cmpl $0x1, %eax
jne 0x4109
movq %rbx, (%rdi)
leaq 0x40e4(%rip), %rdx      # 0x8026
movq %rdx, %rsi
callq 0x5d26
leaq 0xe0(%rsp), %rdi
movq %rsp, %rsi
movl $0x10, %edx
callq 0x32f0
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x3f75
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3240
movq (%r13), %rsi
movq 0x8(%r13), %rdx
leaq 0xe0(%rsp), %rdi
callq 0x3290
movq %rsp, %rsi
movb $0x5f, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x3290
movq %rax, %rdi
movl %r14d, %esi
callq 0x3400
movq %rsp, %rsi
movb $0x5f, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x3290
movl 0x728f(%rip), %ecx      # 0xb250
leal (%r14,%rcx), %esi
decl %esi
movq %rax, %rdi
callq 0x3400
movslq %r14d, %rdx
movslq 0x7277(%rip), %rcx      # 0xb250
movq %rsp, %rdi
movq %r12, %rsi
callq 0x3260
leaq 0xe8(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x33c0
leaq 0x40(%rsp), %rsi
movq 0x30(%rsp), %rdi
callq 0x5ac8
movq %rsp, %rsi
movq %rax, %rdi
callq 0x32c0
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x402b
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3240
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x4041
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3240
leaq 0xd0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0xc0(%rsp), %rdi
callq 0x5c90
leaq 0xb0(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0xa0(%rsp), %rdi
callq 0x5c90
addl 0x3c(%rsp), %r14d
movl 0x71c2(%rip), %r9d      # 0xb258
movq %rsp, %rdi
leaq 0xc0(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
movl %r14d, %ecx
movl %r15d, %r8d
movq 0x30(%rsp), %r14
callq 0x3c79
movq 0xa0(%rsp), %rdi
cmpq %r13, %rdi
je 0x40d6
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x3240
movq 0xc0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x40f3
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x3240
leaq 0x8(%rsp), %rdx
movq 0x10(%rdx), %rsi
movq %r14, %rdi
callq 0x6500
jmp 0x42c8
movq %rbx, (%rdi)
leaq 0x3f13(%rip), %rdx      # 0x8026
movq %rdx, %rsi
callq 0x5d26
leaq 0xe0(%rsp), %rdi
movq %rsp, %rsi
movl $0x10, %edx
callq 0x32f0
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x4146
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3240
movq (%r13), %rsi
movq 0x8(%r13), %rdx
leaq 0xe0(%rsp), %rdi
callq 0x3290
movq %rsp, %rsi
movb $0x5f, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x3290
leal 0x1(%r15), %ebp
movl %ebp, %esi
subl 0x70d6(%rip), %esi      # 0xb250
movq %rax, %rdi
callq 0x3400
movq %rsp, %rsi
movb $0x5f, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x3290
movq %rax, %rdi
movl %r15d, %esi
callq 0x3400
movslq 0x70a9(%rip), %rcx      # 0xb250
subl %ecx, %ebp
movslq %ebp, %rdx
movq %rsp, %rdi
movq %r12, %rsi
callq 0x3260
leaq 0xe8(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x33c0
leaq 0x40(%rsp), %rsi
movq 0x30(%rsp), %rdi
callq 0x5ac8
movq %rsp, %rsi
movq %rax, %rdi
callq 0x32c0
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x41fe
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3240
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x4214
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3240
leaq 0x90(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0x80(%rsp), %rdi
callq 0x5c90
leaq 0x70(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x60(%rsp), %rdi
callq 0x5c90
subl 0x3c(%rsp), %r15d
movl 0x6ff5(%rip), %r9d      # 0xb258
movq %rsp, %rdi
leaq 0x80(%rsp), %rsi
leaq 0x60(%rsp), %rdx
movl %r14d, %ecx
movl %r15d, %r8d
movq 0x30(%rsp), %r14
callq 0x3c79
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x429a
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3240
movq 0x80(%rsp), %rdi
cmpq %rbx, %rdi
je 0x42b7
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x3240
leaq 0x8(%rsp), %rdx
movq 0x10(%rdx), %rsi
movq %r14, %rdi
callq 0x6500
movq %rsp, %rdi
callq 0x5bfe
movq 0x6ce9(%rip), %rsi      # 0xafc0
leaq 0xe0(%rsp), %rdi
callq 0x3160
leaq 0x150(%rsp), %rdi
callq 0x30f0
movq %r14, %rax
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4308
movq %rax, %r14
movq %rsp, %rdi
callq 0x5bfe
jmp 0x4411
movq %rax, %r14
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x4359
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3240
jmp 0x4359
movq %rax, %r14
movq 0xa0(%rsp), %rdi
cmpq %r13, %rdi
je 0x4377
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x3240
jmp 0x4377
movq %rax, %r14
movq 0x80(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4411
movq 0x90(%rsp), %rsi
jmp 0x43e1
movq %rax, %r14
movq 0xc0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4411
movq 0xd0(%rsp), %rsi
jmp 0x43e1
jmp 0x440e
jmp 0x440e
jmp 0x43b0
jmp 0x43b0
jmp 0x43d0
jmp 0x43d0
jmp 0x440e
jmp 0x440e
jmp 0x43ed
jmp 0x43ed
jmp 0x4434
jmp 0x4434
movq %rax, %r14
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x43d3
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3240
jmp 0x43d3
movq %rax, %r14
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x4411
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3240
jmp 0x4411
jmp 0x440e
movq %rax, %r14
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x4437
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3240
jmp 0x4437
jmp 0x4434
jmp 0x440e
jmp 0x440e
movq %rax, %r14
movq 0x6ba8(%rip), %rsi      # 0xafc0
leaq 0xe0(%rsp), %rdi
callq 0x3160
leaq 0x150(%rsp), %rdi
callq 0x30f0
jmp 0x4437
movq %rax, %r14
movq 0x30(%rsp), %rdi
callq 0x5bfe
movq %r14, %rdi
callq 0x3410