// File: /workspace/github_cpp_makefile_star2_O3/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 $0xe8, %rsp
movl %edx, %r12d
movq %rsi, 0xa0(%rsp)
movq %rdi, 0x80(%rsp)
movq %r8, 0x30(%rsp)
movq %r8, %rax
shlq $0x20, %rax
movl %ecx, 0x10(%rsp)
movl %ecx, %ebx
orq %rax, %rbx
movl $0x8, %edi
callq 0x2190
movq %rax, 0x50(%rsp)
leaq 0x8(%rax), %rcx
movq %rcx, 0x60(%rsp)
movq %rbx, (%rax)
movq %rcx, 0x58(%rsp)
testl %r12d, %r12d
jle 0x31e2
movq 0x30(%rsp), %rax
movl %eax, %edx
movl 0x10(%rsp), %ecx
subl %ecx, %edx
leal 0x2(%rdx), %esi
movq %rsi, 0xb8(%rsp)
movslq %esi, %rsi
movq %rsi, 0x98(%rsp)
leal 0x1(%r12), %ebx
movl %r12d, %esi
movq %rsi, 0x40(%rsp)
movslq %edx, %rsi
movq %rsi, 0x20(%rsp)
movslq %ecx, %rcx
movq %rcx, 0x38(%rsp)
movslq %eax, %r14
xorl %ebp, %ebp
leaq 0x68(%rsp), %r15
leaq 0xd0(%rsp), %r12
movq %rdx, 0x90(%rsp)
movq %r14, 0x88(%rsp)
cmpq 0x38(%rsp), %rbp
setge %al
cmpq %r14, %rbp
setle %cl
testb %cl, %al
jne 0x31d2
movl %edx, 0x14(%rsp)
movslq 0x5296(%rip), %rax      # 0x8198
leaq 0x1(,%rax,2), %rsi
incl %eax
movl %eax, 0x2c(%rsp)
movq %r15, %rdi
leaq 0x2c(%rsp), %rdx
leaq 0xf(%rsp), %rcx
callq 0x39da
movq %r12, %rdi
movq 0x98(%rsp), %rsi
movq %r15, %rdx
leaq 0xe(%rsp), %rcx
callq 0x3b56
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x2f51
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq 0xd0(%rsp), %rdx
movslq 0x5238(%rip), %rax      # 0x8198
movq (%rdx), %rcx
movl $0x0, (%rcx,%rax,4)
movl 0x5228(%rip), %eax      # 0x8198
cmpl $-0x1, 0x90(%rsp)
jl 0x3115
movq %rdx, 0xb0(%rsp)
leaq 0x18(%rdx), %rcx
movq %rcx, 0xa8(%rsp)
movq %rbp, %rsi
xorl %edi, %edi
testl %eax, %eax
js 0x3101
leaq (,%rdi,8), %rcx
leaq (%rcx,%rcx,2), %rdx
movq 0xb0(%rsp), %rcx
leaq (%rcx,%rdx), %r9
addq 0xa8(%rsp), %rdx
movq %rdx, 0x48(%rsp)
movq 0xa0(%rsp), %rcx
movq (%rcx), %rcx
leaq (%rcx,%rdi), %rdx
movq %rdx, 0xc0(%rsp)
movslq %eax, %rdx
notq %rdx
addq %rsi, %rcx
movq %rcx, 0xc8(%rsp)
movq %rdx, %r14
incq %rdx
leaq (%r14,%rsi), %r13
incq %r13
cmpq %rbp, %r13
setl %cl
cmpq %rbx, %r13
setg %r10b
orb %cl, %r10b
jne 0x30f5
movslq %eax, %r12
leaq (%r14,%r12), %r11
movq (%r9), %r15
movl 0x4(%r15,%r11,4), %ecx
cmpl %r12d, %ecx
jg 0x30f5
cmpq 0x20(%rsp), %rdi
jg 0x30a0
cmpq 0x40(%rsp), %r13
jge 0x30a0
movq 0x48(%rsp), %r8
movq (%r8), %r13
movq 0x38(%rsp), %r8
movq 0xc0(%rsp), %r10
movb (%r10,%r8), %r8b
xorl %r10d, %r10d
movl %eax, 0x18(%rsp)
movq %rsi, %rax
movq %rdi, %rsi
movq %r9, %rdi
movq %rbp, %r9
movq %rbx, %rbp
movq 0xc8(%rsp), %rbx
cmpb 0x1(%rbx,%r14), %r8b
movq %rbp, %rbx
movq %r9, %rbp
movq %rdi, %r9
movq %rsi, %rdi
movq %rax, %rsi
movl 0x18(%rsp), %eax
setne %r10b
addl %ecx, %r10d
cmpl %r10d, 0x4(%r13,%r11,4)
jle 0x30a0
movl %r10d, 0x4(%r13,%r11,4)
movl 0x50fb(%rip), %eax      # 0x8198
movslq %eax, %r12
cmpq %r12, %rdx
jge 0x30bf
leaq (%r15,%r12,4), %r10
leal 0x1(%rcx), %r11d
cmpl %r11d, 0x8(%r10,%r14,4)
jle 0x30bf
movl %r11d, 0x8(%r10,%r14,4)
movl 0x50d9(%rip), %eax      # 0x8198
cmpq 0x20(%rsp), %rdi
jg 0x30f5
movl %eax, %r8d
negl %r8d
movslq %r8d, %r8
cmpq %r8, %rdx
jle 0x30f5
movslq %eax, %r10
shlq $0x2, %r10
movq 0x48(%rsp), %r8
addq (%r8), %r10
incl %ecx
cmpl %ecx, (%r10,%r14,4)
jle 0x30f5
movl %ecx, (%r10,%r14,4)
movl 0x50a3(%rip), %eax      # 0x8198
movslq %eax, %rcx
cmpq %rcx, %rdx
jl 0x2fec
incq %rdi
incq %rsi
cmpq 0xb8(%rsp), %rdi
jne 0x2f97
testl %eax, %eax
js 0x31b1
movl %eax, %ecx
negl %ecx
movl 0x10(%rsp), %r14d
cmpl %r14d, %ebp
cmovgl %ebp, %r14d
movl %eax, %r11d
notl %r11d
movslq %ecx, %r15
movl 0x14(%rsp), %ecx
movl %ecx, %r13d
subl %eax, %r13d
xorl %r12d, %r12d
movq %r11, 0x18(%rsp)
movq 0xd0(%rsp), %rcx
movq 0x20(%rsp), %rdx
leaq (%rdx,%rdx,2), %rdx
movslq %eax, %rsi
leaq (%r15,%r12), %rdi
addq %rsi, %rdi
movq 0x18(%rcx,%rdx,8), %rcx
cmpl %esi, (%rcx,%rdi,4)
jg 0x31a6
leaq (%r12,%r13), %rcx
movq 0x30(%rsp), %rdx
cmpl %edx, %ecx
cmovll %ecx, %edx
cmpl %edx, %r14d
jle 0x31a6
shlq $0x20, %rcx
orq %rbp, %rcx
movq %rcx, 0x68(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x481a
movl 0x4ff7(%rip), %eax      # 0x8198
movq 0x18(%rsp), %r11
incq %r12
leal (%r11,%r12), %ecx
cmpl %eax, %ecx
jl 0x3148
leaq 0xd0(%rsp), %r12
movq %r12, %rdi
callq 0x3bee
movq 0x88(%rsp), %r14
leaq 0x68(%rsp), %r15
movl 0x14(%rsp), %edx
incq %rbp
incl %edx
cmpq 0x40(%rsp), %rbp
jne 0x2ee1
leaq 0x50(%rsp), %rsi
movq 0x80(%rsp), %rbx
movq %rbx, %rdi
callq 0x25f5
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x320e
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3241
movq %rax, %rbx
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x3256
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
jmp 0x3256
movq %rax, %rbx
jmp 0x3256
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x3bee
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x326d
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x22c0