// File: /workspace/github_cpp_makefile_star2_O3/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, %eax
movl %esi, %ecx
movq %rdi, %r13
leaq 0x88(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x5e6a(%rip), %rdx      # 0xa139
leaq 0x5e59(%rip), %rsi      # 0xa12f
movq %rax, 0x40(%rsp)
movl %ecx, 0x4(%rsp)
subl %ecx, %eax
incl %eax
xorl %r15d, %r15d
movl %eax, 0xc(%rsp)
cmpl 0x9ee4(%rip), %eax      # 0xe1d4
setge %r15b
leaq 0x78(%rsp), %r12
movq %r12, %rdi
callq 0x87ec
movl %r15d, %edi
movq %r12, %rsi
callq 0x2920
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
je 0x4326
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x21f0
movl 0x9ea4(%rip), %ebx      # 0xe1d0
leal 0x1(%rbx), %ecx
movl 0xc(%rsp), %esi
movl %esi, %eax
cltd
idivl %ecx
movl %eax, %ecx
movl %eax, 0x5f680c4(%rip)   # 0x5f6c404
movl %esi, %eax
cltd
idivl %ecx
movl %eax, %ebp
leaq 0x68(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x5de3(%rip), %rsi      # 0xa13a
leaq 0x5dee(%rip), %rdx      # 0xa14c
leaq 0x58(%rsp), %r15
movq %r15, %rdi
callq 0x87ec
xorl %edi, %edi
movl %ebp, 0x8(%rsp)
cmpl %ebx, %ebp
setg %dil
movq %r15, %rsi
callq 0x2920
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x4396
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x5f6806b(%rip), %rdi   # 0x5f6c408
callq 0x615c
movl $0x8, %edi
callq 0x21e0
movq 0x40(%rsp), %rcx
shlq $0x20, %rcx
movl 0x4(%rsp), %edx
orq %rcx, %rdx
movq %rax, 0x28(%rsp)
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x38(%rsp)
movq %rdx, (%rax)
movq %rcx, 0x30(%rsp)
cmpl $0x0, 0x8(%rsp)
jle 0x44e0
xorl %ebx, %ebx
movl 0x4(%rsp), %eax
movl %eax, %r12d
movq %r13, 0x48(%rsp)
movl 0x5f68010(%rip), %ecx   # 0x5f6c404
leal (%rcx,%r12), %esi
movl 0xc(%rsp), %eax
cltd
idivl %ecx
xorl %r14d, %r14d
cmpl %edx, %ebx
setl %r14b
movq %rsi, 0x50(%rsp)
leal -0x1(%r14,%rsi), %r15d
leaq 0x10(%rsp), %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x3036
movq 0x10(%rsp), %rbp
movq 0x18(%rsp), %rax
cmpq %rax, %rbp
je 0x4477
movl %r15d, %r13d
subl %r12d, %r13d
movl (%rbp), %edx
cmpl %r12d, %edx
je 0x446e
leal (%rdx,%r13), %ecx
movl 0x9d87(%rip), %eax      # 0xe1d0
movl 0x4(%rsp), %edi
movq 0x40(%rsp), %rsi
movl %r12d, %r8d
movl %r15d, %r9d
leaq 0x28(%rsp), %r10
pushq %r10
pushq %rax
callq 0x400b
addq $0x10, %rsp
movq 0x18(%rsp), %rax
addq $0x4, %rbp
cmpq %rax, %rbp
jne 0x4437
movq 0x48(%rsp), %r13
movq %r13, %rdi
leaq 0x28(%rsp), %rsi
callq 0x2815
movq (%r13), %rdi
movq 0x8(%r13), %rax
subq %rdi, %rax
sarq $0x3, %rax
movslq 0x9d2d(%rip), %rcx      # 0xe1cc
cmpq %rcx, %rax
jae 0x44ef
testq %rdi, %rdi
je 0x44b5
movq 0x10(%r13), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x44cc
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x50(%rsp), %r12
addl %r14d, %r12d
incl %ebx
cmpl 0x8(%rsp), %ebx
jne 0x43ee
leaq 0x28(%rsp), %rsi
movq %r13, %rdi
callq 0x2815
jmp 0x4506
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4506
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x451d
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq %r13, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4567
movq %rax, %rbx
jmp 0x459f
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x459f
movq 0x68(%rsp), %rsi
jmp 0x4562
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
je 0x459f
movq 0x88(%rsp), %rsi
incq %rsi
jmp 0x459a
movq %rax, %rbx
jmp 0x4588
jmp 0x456e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4588
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x459f
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2330