// File: /workspace/github_cpp_makefile_star2_O1/shangjingbo1226[P]MACFP/src/methods/TDP.cpp
// Function: getSup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int, int, int)
vector< pair<int, int> > getSup(string &dna, int n, int l, int r)
{
    vector< pair<int, int> > Q(1, make_pair(l, r));
    for (int i = 0; i < n; ++ i) {
        if (l <= i && i <= r) {
            continue;
        }
        vector< vector<int> > f(r - l + 2, vector<int>(EDIT_DIS_THRES * 2 + 1, EDIT_DIS_THRES + 1));
        f[0][0 + EDIT_DIS_THRES] = 0;
        for (int x = 0; x <= r - l + 1; ++ x) {
            for (int delta = -EDIT_DIS_THRES; delta <= EDIT_DIS_THRES; ++ delta) {
                int j = i + x + delta;
                if (j < i || j > n + 1) {
                    continue;
                }
                int dist = f[x][delta + EDIT_DIS_THRES];
                if (dist > EDIT_DIS_THRES) {
                    continue;
                }

                if (x < r - l + 1 && j < n) {
                    update(f[x + 1][EDIT_DIS_THRES + delta], dist + (dna[l + x] != dna[j]));
                }
                if (delta + 1 <= EDIT_DIS_THRES) {
                    update(f[x][EDIT_DIS_THRES + delta + 1], dist + 1);
                }
                if (x < r - l + 1 && delta - 1 >= -EDIT_DIS_THRES) {
                    update(f[x + 1][EDIT_DIS_THRES + delta - 1], dist + 1);
                }
            }
        }
        for (int delta = -EDIT_DIS_THRES; delta <= EDIT_DIS_THRES; ++ delta) {
            int j = i + r - l + 1 + delta;
            if (f[r - l + 1][delta + EDIT_DIS_THRES] <= EDIT_DIS_THRES) {
                if (max(l, i) <= min(j - 1, r)) {
                    continue;
                }
                Q.push_back(make_pair(i, j - 1));
            }
        }
    }
    return makeMaximal(Q);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r12d
movq %rsi, 0xa0(%rsp)
movq %rdi, 0x80(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movl $0x8, %edi
callq 0x2190
movq %rax, 0x20(%rsp)
movq %rax, 0x28(%rsp)
leaq 0x8(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq %rbx, 0x48(%rsp)
shlq $0x20, %rbx
movl %ebp, 0x10(%rsp)
movl %ebp, %esi
orq %rbx, %rsi
movq %rsi, (%rax)
movq %rcx, 0x28(%rsp)
testl %r12d, %r12d
jle 0x31c6
movq 0x48(%rsp), %rax
movl %eax, %edx
movl 0x10(%rsp), %ecx
subl %ecx, %edx
leal 0x2(%rdx), %esi
movq %rsi, 0xb0(%rsp)
movslq %esi, %rsi
movq %rsi, 0x98(%rsp)
leal 0x1(%r12), %ebx
movl %r12d, %esi
movq %rsi, 0x60(%rsp)
movslq %edx, %r13
movslq %ecx, %rcx
movq %rcx, 0x58(%rsp)
movslq %eax, %r14
xorl %ebp, %ebp
leaq 0x68(%rsp), %r15
leaq 0xc0(%rsp), %r12
movq %rdx, 0x90(%rsp)
movq %r14, 0x88(%rsp)
cmpq 0x58(%rsp), %rbp
setge %al
cmpq %r14, %rbp
setle %cl
testb %cl, %al
jne 0x31b6
movl %edx, 0x14(%rsp)
movslq 0x5292(%rip), %rax      # 0x8198
leaq 0x1(,%rax,2), %rsi
incl %eax
movl %eax, 0x44(%rsp)
movq %r15, %rdi
leaq 0x44(%rsp), %rdx
leaq 0xf(%rsp), %rcx
callq 0x39cc
movq %r12, %rdi
movq 0x98(%rsp), %rsi
movq %r15, %rdx
leaq 0xe(%rsp), %rcx
callq 0x3a4a
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x2f55
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq 0xc0(%rsp), %rcx
movslq 0x5234(%rip), %rax      # 0x8198
movq %rcx, 0x50(%rsp)
movq (%rcx), %rcx
movl $0x0, (%rcx,%rax,4)
cmpl $-0x1, 0x90(%rsp)
jl 0x30e8
movq 0x50(%rsp), %rax
addq $0x18, %rax
movq %rax, 0xa8(%rsp)
movq %rbp, %rdx
xorl %esi, %esi
movslq 0x51fa(%rip), %rcx      # 0x8198
testq %rcx, %rcx
js 0x30d4
leaq (,%rsi,8), %rax
leaq (%rax,%rax,2), %rdi
movq 0x50(%rsp), %rax
leaq (%rax,%rdi), %r8
addq 0xa8(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movq 0xa0(%rsp), %rax
movq (%rax), %rax
leaq (%rax,%rsi), %rdi
movq %rdi, 0xb8(%rsp)
movq %rcx, %r14
notq %r14
addq %rdx, %rax
movq %rax, 0x38(%rsp)
movq %r14, %r11
incq %r14
leaq (%r11,%rdx), %rax
incq %rax
cmpq %rbp, %rax
setl %r10b
cmpq %rbx, %rax
setg %r15b
orb %r10b, %r15b
jne 0x30c4
movslq %ecx, %r10
leaq (%r11,%r10), %r12
movq (%r8), %r15
movl 0x4(%r15,%r12,4), %ecx
cmpl %r10d, %ecx
jg 0x30c4
cmpq %r13, %rsi
jg 0x3075
cmpq 0x60(%rsp), %rax
jge 0x3075
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq %r13, %r9
movq 0x58(%rsp), %r10
movq 0xb8(%rsp), %rdi
movb (%rdi,%r10), %r13b
xorl %r10d, %r10d
movq 0x38(%rsp), %rdi
cmpb 0x1(%rdi,%r11), %r13b
movq %r9, %r13
setne %r10b
addl %ecx, %r10d
cmpl %r10d, 0x4(%rax,%r12,4)
jle 0x3075
movl %r10d, 0x4(%rax,%r12,4)
movslq 0x511c(%rip), %rax      # 0x8198
cmpq %rax, %r14
jge 0x3095
leaq (%r15,%rax,4), %rax
leal 0x1(%rcx), %r10d
cmpl %r10d, 0x8(%rax,%r11,4)
jle 0x3095
movl %r10d, 0x8(%rax,%r11,4)
cmpq %r13, %rsi
jg 0x30c4
movslq 0x50f7(%rip), %rax      # 0x8198
movq %rax, %r10
negq %r10
cmpq %r10, %r14
jle 0x30c4
shlq $0x2, %rax
movq 0x18(%rsp), %rdi
addq (%rdi), %rax
incl %ecx
cmpl %ecx, (%rax,%r11,4)
jle 0x30c4
movl %ecx, (%rax,%r11,4)
movslq 0x50cd(%rip), %rcx      # 0x8198
cmpq %rcx, %r14
jl 0x2fee
incq %rsi
incq %rdx
cmpq 0xb0(%rsp), %rsi
jne 0x2f97
movl 0x50aa(%rip), %eax      # 0x8198
testl %eax, %eax
js 0x3195
movl %eax, %ecx
negl %ecx
movl 0x10(%rsp), %r14d
cmpl %r14d, %ebp
cmovgl %ebp, %r14d
movl %eax, %r9d
notl %r9d
movslq %ecx, %r15
movl 0x14(%rsp), %ecx
movl %ecx, %r10d
subl %eax, %r10d
xorl %r12d, %r12d
movq %r9, 0x18(%rsp)
movq %r10, 0x38(%rsp)
movq 0xc0(%rsp), %rcx
leaq (,%r13,2), %rdx
addq %r13, %rdx
cltq
leaq (%r15,%r12), %rsi
addq %rax, %rsi
movq 0x18(%rcx,%rdx,8), %rcx
cmpl %eax, (%rcx,%rsi,4)
jg 0x3184
leaq (%r10,%r12), %rax
movq 0x48(%rsp), %rcx
cmpl %ecx, %eax
cmovll %eax, %ecx
cmpl %ecx, %r14d
jle 0x3184
shlq $0x20, %rax
orq %rbp, %rax
movq %rax, 0x68(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x474e
movq 0x18(%rsp), %r9
movq 0x38(%rsp), %r10
movl 0x500e(%rip), %eax      # 0x8198
incq %r12
leal (%r9,%r12), %ecx
cmpl %eax, %ecx
jl 0x3126
leaq 0xc0(%rsp), %r12
movq %r12, %rdi
callq 0x3ae2
movq 0x88(%rsp), %r14
leaq 0x68(%rsp), %r15
movl 0x14(%rsp), %edx
incq %rbp
incl %edx
cmpq 0x60(%rsp), %rbp
jne 0x2ee5
leaq 0x20(%rsp), %rsi
movq 0x80(%rsp), %rbx
movq %rbx, %rdi
callq 0x25f5
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x31f2
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq %rbx, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3225
movq %rax, %rbx
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x323a
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
jmp 0x323a
movq %rax, %rbx
jmp 0x323a
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x3ae2
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x3251
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x22c0