// File: /workspace/github_cpp_makefile_star2_O2/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, %r15d
movq %rsi, 0x60(%rsp)
movq %rdi, 0x38(%rsp)
movq %rbx, %rax
shlq $0x20, %rax
movl %ecx, %ecx
orq %rax, %rcx
leaq 0x90(%rsp), %rdx
movq %rcx, (%rdx)
leaq 0xc0(%rsp), %rdi
pushq $0x1
popq %rsi
leaq 0xa8(%rsp), %r14
movq %r14, %rcx
callq 0x33b8
movl %ebx, %edx
subl %ebp, %edx
leal 0x2(%rdx), %eax
cltq
movq %rax, 0x50(%rsp)
leal 0x1(%rdx), %eax
leal 0x1(%r15), %ecx
cltq
movq %rax, 0x18(%rsp)
movslq %ecx, %r13
movslq %r15d, %rax
movl %ebp, 0x10(%rsp)
movslq %ebp, %rcx
movq %rcx, 0x20(%rsp)
movslq %edx, %rcx
movq %rcx, 0x30(%rsp)
xorl %r15d, %r15d
testl %eax, %eax
movl $0x0, %r12d
movq %rax, 0x88(%rsp)
cmovgl %eax, %r12d
movq %rbx, 0x58(%rsp)
movslq %ebx, %rbx
movq %r12, 0x48(%rsp)
movq %rbx, 0x40(%rsp)
cmpq %r12, %r15
je 0x2e37
cmpq 0x20(%rsp), %r15
setge %al
cmpq %rbx, %r15
setle %cl
testb %cl, %al
jne 0x2e2d
movq %rdx, 0x8(%rsp)
movslq 0x55aa(%rip), %rax      # 0x8198
leaq 0x1(,%rax,2), %rsi
incl %eax
movl %eax, 0x14(%rsp)
movq %r14, %rdi
leaq 0x14(%rsp), %rdx
leaq 0x7(%rsp), %rcx
callq 0x340e
leaq 0x90(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq %r14, %rdx
leaq 0x6(%rsp), %rcx
callq 0x3464
movq %r14, %rdi
callq 0x40d6
movq 0x90(%rsp), %rdx
movslq 0x5559(%rip), %rax      # 0x8198
movq (%rdx), %rcx
andl $0x0, (%rcx,%rax,4)
movq %rdx, 0x70(%rsp)
leaq 0x18(%rdx), %rax
movq %rax, 0x68(%rsp)
movq %r15, %rsi
xorl %edi, %edi
movl 0x5539(%rip), %eax      # 0x8198
movl %eax, %ebp
negl %ebp
cmpq 0x18(%rsp), %rdi
jg 0x2d92
imulq $0x18, %rdi, %rdx
movq 0x70(%rsp), %rcx
leaq (%rcx,%rdx), %r9
addq 0x68(%rsp), %rdx
movq %rdx, 0x28(%rsp)
movq 0x60(%rsp), %rcx
movq (%rcx), %rcx
leaq (%rcx,%rdi), %rdx
movq %rdx, 0x78(%rsp)
movslq %ebp, %rdx
addq %rsi, %rcx
movq %rcx, 0x80(%rsp)
movslq %eax, %rbp
cmpq %rbp, %rdx
jg 0x2d87
leaq (%rsi,%rdx), %r11
cmpq %r15, %r11
jl 0x2d7f
cmpq %r13, %r11
jg 0x2d7f
leaq (%rdx,%rbp), %rbx
movq (%r9), %r12
movl (%r12,%rbx,4), %ecx
cmpl %ebp, %ecx
jg 0x2d7f
cmpq 0x30(%rsp), %rdi
jg 0x2d29
cmpq 0x88(%rsp), %r11
jge 0x2d29
movq 0x28(%rsp), %r8
movq (%r8), %r11
movq 0x20(%rsp), %r10
movq 0x78(%rsp), %r8
movb (%r8,%r10), %r10b
xorl %r14d, %r14d
movq 0x80(%rsp), %r8
cmpb (%r8,%rdx), %r10b
setne %r14b
addl %ecx, %r14d
cmpl %r14d, (%r11,%rbx,4)
jle 0x2d29
movl %r14d, (%r11,%rbx,4)
movl 0x5472(%rip), %eax      # 0x8198
movslq %eax, %rbp
cmpq %rbp, %rdx
jge 0x2d47
leaq (%r12,%rbp,4), %r11
leal 0x1(%rcx), %ebx
cmpl %ebx, 0x4(%r11,%rdx,4)
jle 0x2d47
movl %ebx, 0x4(%r11,%rdx,4)
movl 0x5451(%rip), %eax      # 0x8198
cmpq 0x30(%rsp), %rdi
jg 0x2d7f
movl %eax, %r10d
negl %r10d
movslq %r10d, %r10
cmpq %r10, %rdx
jle 0x2d7f
movslq %eax, %r11
shlq $0x2, %r11
movq 0x28(%rsp), %r8
addq (%r8), %r11
incl %ecx
cmpl %ecx, -0x4(%r11,%rdx,4)
jle 0x2d7f
movl %ecx, -0x4(%r11,%rdx,4)
movl 0x5419(%rip), %eax      # 0x8198
incq %rdx
jmp 0x2ca4
incq %rdi
incq %rsi
jmp 0x2c59
movl 0x10(%rsp), %ecx
cmpl %ecx, %r15d
movl %ecx, %ebx
cmovgl %r15d, %ebx
movq 0x8(%rsp), %rdi
cmpl %eax, %ebp
jg 0x2e09
movq 0x90(%rsp), %rcx
imulq $0x18, 0x18(%rsp), %rdx
leal (%rax,%rbp), %esi
movslq %esi, %rsi
movq (%rcx,%rdx), %rcx
cmpl %eax, (%rcx,%rsi,4)
jg 0x2e05
leal (%rdi,%rbp), %ecx
movq 0x58(%rsp), %rdx
cmpl %edx, %ecx
cmovll %ecx, %edx
cmpl %edx, %ebx
jle 0x2e05
shlq $0x20, %rcx
orq %r15, %rcx
movq %rcx, 0xa8(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x4350
movl 0x5398(%rip), %eax      # 0x8198
movq 0x8(%rsp), %rdi
incl %ebp
jmp 0x2da4
leaq 0x90(%rsp), %rdi
callq 0x34ba
movq 0x8(%rsp), %rdx
leaq 0xa8(%rsp), %r14
movq 0x48(%rsp), %r12
movq 0x40(%rsp), %rbx
incq %r15
incl %edx
jmp 0x2bc3
leaq 0xc0(%rsp), %rsi
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x24d5
leaq 0xc0(%rsp), %rdi
callq 0x3bfe
movq %rbx, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2e70
movq %rax, %rbx
jmp 0x2e97
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x40d6
jmp 0x2e97
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x34ba
leaq 0xc0(%rsp), %rdi
callq 0x3bfe
movq %rbx, %rdi
callq 0x22a0