// File: /workspace/github_cpp_makefile_star2_O1/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, %rbp
leaq 0x88(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x5eac(%rip), %rdx      # 0xa101
leaq 0x5e9b(%rip), %rsi      # 0xa0f7
movq %rax, 0x48(%rsp)
movl %ecx, 0x4(%rsp)
subl %ecx, %eax
incl %eax
xorl %r15d, %r15d
movl %eax, 0xc(%rsp)
cmpl 0x9f5e(%rip), %eax      # 0xe1d4
setge %r15b
leaq 0x78(%rsp), %r12
movq %r12, %rdi
callq 0x809c
movl %r15d, %edi
movq %r12, %rsi
callq 0x28d7
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
je 0x42ac
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x21f0
movl 0x9f1e(%rip), %ebx      # 0xe1d0
leal 0x1(%rbx), %ecx
movl 0xc(%rsp), %esi
movl %esi, %eax
cltd
idivl %ecx
movl %eax, %ecx
movl %eax, 0x5f6813e(%rip)   # 0x5f6c404
movl %esi, %eax
cltd
idivl %ecx
movl %eax, %r12d
leaq 0x68(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x5e24(%rip), %rsi      # 0xa102
leaq 0x5e2f(%rip), %rdx      # 0xa114
leaq 0x58(%rsp), %r15
movq %r15, %rdi
callq 0x809c
xorl %edi, %edi
movl %r12d, 0x8(%rsp)
cmpl %ebx, %r12d
setg %dil
movq %r15, %rsi
callq 0x28d7
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x431f
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x5f680e2(%rip), %rdi   # 0x5f6c408
callq 0x600e
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x8, %edi
callq 0x21e0
movq 0x48(%rsp), %rcx
shlq $0x20, %rcx
movl 0x4(%rsp), %edx
orq %rcx, %rdx
movq %rax, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x20(%rsp)
movq %rdx, (%rax)
movq %rcx, 0x18(%rsp)
cmpl $0x0, 0x8(%rsp)
jle 0x447c
xorl %esi, %esi
movl 0x4(%rsp), %eax
movl %eax, %r12d
movq %rbp, 0x50(%rsp)
movl 0x5f68071(%rip), %ecx   # 0x5f6c404
leal (%rcx,%r12), %r13d
movl 0xc(%rsp), %eax
cltd
idivl %ecx
xorl %r14d, %r14d
movl %esi, 0x2c(%rsp)
cmpl %edx, %esi
setl %r14b
leal (%r14,%r13), %r15d
decl %r15d
leaq 0x30(%rsp), %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x2fe7
movq 0x30(%rsp), %rbp
cmpq 0x38(%rsp), %rbp
je 0x4410
movl %r15d, %ebx
subl %r12d, %ebx
movl (%rbp), %edx
cmpl %r12d, %edx
je 0x4405
leal (%rbx,%rdx), %ecx
movl 0x9deb(%rip), %eax      # 0xe1d0
movl 0x4(%rsp), %edi
movq 0x48(%rsp), %rsi
movl %r12d, %r8d
movl %r15d, %r9d
leaq 0x10(%rsp), %r10
pushq %r10
pushq %rax
callq 0x3f8b
addq $0x10, %rsp
addq $0x4, %rbp
cmpq 0x38(%rsp), %rbp
jne 0x43d4
movq 0x50(%rsp), %rbp
movq %rbp, %rdi
leaq 0x10(%rsp), %rsi
callq 0x27d5
addl %r14d, %r13d
movq (%rbp), %rdi
movq 0x8(%rbp), %rax
subq %rdi, %rax
sarq $0x3, %rax
movslq 0x9d91(%rip), %rcx      # 0xe1cc
cmpq %rcx, %rax
cmovbl %r13d, %r12d
jae 0x448b
testq %rdi, %rdi
je 0x4455
movq 0x10(%rbp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x446c
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movl 0x2c(%rsp), %esi
incl %esi
cmpl 0x8(%rsp), %esi
jne 0x438d
leaq 0x10(%rsp), %rsi
movq %rbp, %rdi
callq 0x27d5
jmp 0x44a2
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x44a2
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x44b9
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq %rbp, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4503
movq %rax, %rbx
jmp 0x453b
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x453b
movq 0x68(%rsp), %rsi
jmp 0x44fe
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
je 0x453b
movq 0x88(%rsp), %rsi
incq %rsi
jmp 0x4536
movq %rax, %rbx
jmp 0x4524
jmp 0x450a
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x4524
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x453b
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2330