// File: /workspace/github_cpp_makefile_star2_O2/shangjingbo1226[P]MACFP/src/methods/MACFP.cpp
// Function: getSup(int, int)
vector<PII> getSup(int l, int r)
{
    int length = r - l + 1;
    myAssert(length >= LEN_THRES, "Length OK!");

    CHUNK_SIZE = (r - l + 1) / (EDIT_DIS_THRES + 1);
    //CHUNK_SIZE = LEN_THRES / (EDIT_DIS_THRES + 1);
    int chunkN = (r - l + 1) / CHUNK_SIZE;

    myAssert(chunkN >= EDIT_DIS_THRES + 1, "Not Enough Chunks!");

    explored.clear();
    vector<PII> ret(1, make_pair(l, r));
    for (int i = 0, start = l; i < chunkN; ++ i) {
        int end = start + CHUNK_SIZE + (i < (r - l + 1) % CHUNK_SIZE) - 1;
        vector<int> positions = getOccurrence(start, end);
        FOR (match, positions) {
            if ((*match) == start) {
                continue;
            }
            dfs(l, r, (*match), (*match) + end - start, start, end, EDIT_DIS_THRES, ret);
        }
        vector<PII> temp = makeMaximal(ret);
        if (temp.size() >= MIN_SUP) {
            return temp;
        }
        start = end + 1;
    }
    return makeMaximal(ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %r15
movl 0xa6d6(%rip), %ebx      # 0xe1d4
leaq 0x55f7(%rip), %rsi      # 0x90fc
leaq 0x78(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x48da
movl %r14d, %r13d
subl %ebp, %r13d
incl %r13d
xorl %edi, %edi
cmpl %ebx, %r13d
setge %dil
leaq 0x78(%rsp), %rsi
callq 0x272c
leaq 0x78(%rsp), %rdi
callq 0x2378
movl 0xa690(%rip), %ebx      # 0xe1d0
leal 0x1(%rbx), %ecx
movl %r13d, %eax
cltd
idivl %ecx
movl %eax, %ecx
movl %eax, 0x5f688b3(%rip)   # 0x5f6c404
movl %r13d, %eax
cltd
idivl %ecx
movl %eax, %r12d
leaq 0x55a6(%rip), %rsi      # 0x9107
leaq 0x58(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x48da
xorl %edi, %edi
cmpl %ebx, %r12d
setg %dil
leaq 0x58(%rsp), %rsi
callq 0x272c
movl %r12d, %ebx
leaq 0x58(%rsp), %rdi
callq 0x2378
leaq 0x5f68871(%rip), %rdi   # 0x5f6c408
callq 0x52c0
movq %r14, %rax
shlq $0x20, %rax
movl %ebp, %ecx
orq %rax, %rcx
leaq 0x30(%rsp), %rdx
movq %rcx, (%rdx)
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rsi
leaq 0xb(%rsp), %rcx
callq 0x4b94
xorl %esi, %esi
testl %ebx, %ebx
cmovlel %esi, %ebx
movl %ebp, %r12d
movq %r15, 0x48(%rsp)
movl %r13d, 0x10(%rsp)
movl %ebx, 0xc(%rsp)
cmpl %ebx, %esi
je 0x3cb7
movl 0x5f6881c(%rip), %ecx   # 0x5f6c404
leal (%rcx,%r12), %edx
movl %r13d, %eax
movq %rdx, %r13
cltd
idivl %ecx
xorl %ebx, %ebx
movl %esi, 0x14(%rsp)
cmpl %edx, %esi
setl %bl
leal (%rbx,%r13), %r15d
decl %r15d
leaq 0x30(%rsp), %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x2cb8
addl %ebx, %r13d
movq %r13, 0x50(%rsp)
movq 0x30(%rsp), %r13
movl %r15d, %ebx
subl %r12d, %ebx
cmpq 0x38(%rsp), %r13
je 0x3c63
movl (%r13), %edx
cmpl %r12d, %edx
je 0x3c5d
leal (%rbx,%rdx), %ecx
movl 0xa58d(%rip), %eax      # 0xe1d0
movl %ebp, %edi
movl %r14d, %esi
movl %r12d, %r8d
movl %r15d, %r9d
leaq 0x18(%rsp), %r10
pushq %r10
pushq %rax
callq 0x38aa
popq %rax
popq %rcx
addq $0x4, %r13
jmp 0x3c2a
movq 0x48(%rsp), %r15
movq %r15, %rdi
leaq 0x18(%rsp), %rsi
callq 0x2685
movq 0x8(%r15), %rax
subq (%r15), %rax
sarq $0x3, %rax
movslq 0xa545(%rip), %rcx      # 0xe1cc
cmpq %rcx, %rax
movl 0x10(%rsp), %r13d
movl 0xc(%rsp), %ebx
jae 0x3cc6
movq %r15, %rdi
callq 0x733a
leaq 0x30(%rsp), %rdi
callq 0x66a2
movl 0x14(%rsp), %esi
incl %esi
movq 0x50(%rsp), %r12
jmp 0x3bda
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x2685
jmp 0x3cd0
leaq 0x30(%rsp), %rdi
callq 0x66a2
leaq 0x18(%rsp), %rdi
callq 0x733a
movq %r15, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3d13
jmp 0x3d0e
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
jmp 0x3d07
jmp 0x3d0e
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x2378
jmp 0x3d31
movq %rax, %rbx
jmp 0x3d31
movq %rax, %rbx
jmp 0x3d27
jmp 0x3d1a
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x66a2
leaq 0x18(%rsp), %rdi
callq 0x733a
movq %rbx, %rdi
callq 0x2310