// File: readmapping[P]alfalfa/src/mapper.cpp
// Function: processLisIntervals(sparseSA const&, read_t&, align_opt const&, std::vector<lis_t, std::allocator<lis_t>> const&, int, int, int, int)
void processLisIntervals(const sparseSA& sa, read_t & read, const align_opt & alnOptions, 
        const vector<lis_t> & lisIntervals, int editDist, int maxAlnCount, int minCoverage, int minScore){
    //for every interval, try to align
    size_t lisIndex = 0;
    //trial parameter for performance reasons
    int trialF = 0;
    int trialR = 0;
    //////////////////////
    //MAIN ALIGNMENT LOOP
    //////////////////////
    //tree containing information for uniqueness option
    kbtree_t(qCov) *treeF;
    kbtree_t(qCov) *treeR;
    treeF = kb_init(qCov, KB_DEFAULT_SIZE);
    treeR = kb_init(qCov, KB_DEFAULT_SIZE);
    int maxAlnScore = 0;
    while((int)(read.alignments.size()) < maxAlnCount && lisIndex < lisIntervals.size()){
        bool unique = hasUnique(lisIntervals[lisIndex], lisIntervals[lisIndex].fw ? treeF : treeR);
        bool extend = unique;
        int trial = lisIntervals[lisIndex].fw ? trialF : trialR;
        bool extensionCriterium = (trial < alnOptions.maxTrial || extend) && (lisIntervals[lisIndex].matches.size() > 1 || lisIntervals[lisIndex].score >= minCoverage);
#ifndef NDEBUG
        if(alnOptions.debugFile != NULL){
            int Plength = read.sequence.length();
            printLisData(sa, lisIntervals[lisIndex], alnOptions, lisIndex, extensionCriterium, unique, trial < alnOptions.maxTrial, Plength, editDist);
        }
#endif
        if(alnOptions.print >=2 ){
            cerr << "#LISI " << lisIndex << endl;
            cerr << "#UNIQUE " << unique << endl;
            cerr << "#TRIAL " << trial << endl;
            cerr << "#EXTEND " << extensionCriterium << endl;
            cerr << "#LISMEMS " << lisIntervals[lisIndex].matches.size() << endl;
            cerr << "#LISSCORE " << lisIntervals[lisIndex].score << endl;
        }
        if(extensionCriterium){
            //sort matches in this interval according to query position
            const lis_t & cluster = lisIntervals[lisIndex];
            const vector<match_t> & matchVector = cluster.matches;
            long chrStart, chrEnd;
            sa.getChromBounds(matchVector[0].ref, chrStart, chrEnd);
            if(alnOptions.print >=5) cerr << "try cluster " << lisIndex << " with " << matchVector.size() << " seeds on " << (cluster.fw ? "forward" : "reverse complemented") << " strand." << endl;
            int returnedAlnScore = extendAlignmentChain(sa.S, cluster.fw ? read.sequence : read.rcSequence, matchVector, editDist, minScore, minCoverage, alnOptions, chrStart, chrEnd, read, cluster.fw);
            //deal with new alignments
            if(cluster.fw) trialF++;
            else trialR++;
            if(returnedAlnScore >= 0 && (!alnOptions.maxTrialBest || maxAlnScore < returnedAlnScore)){
                if(cluster.fw) trialF = 0;
                else trialR = 0;
            }
            maxAlnScore = max(maxAlnScore, returnedAlnScore);
        }
        lisIndex++;
    }
#ifndef NDEBUG
    if(alnOptions.debugFile != NULL){
        int Plength = read.sequence.length();
        fprintf(alnOptions.debugFile,"$E\n");
        size_t lisAfterIndex =  lisIndex;
        while( lisAfterIndex < lisIntervals.size()){
            printLisData(sa, lisIntervals[lisAfterIndex], alnOptions, lisAfterIndex, false, false, false, Plength, editDist);
            lisAfterIndex++;
        }
        fprintf(alnOptions.debugFile,"#END\n");
    }
#endif         
    kb_destroy(qCov, treeF);
    kb_destroy(qCov, treeR);
    if(alnOptions.print >=5){
        cerr << "stopped matching because: " << endl; 
        if((int)(read.alignments.size()) >= maxAlnCount) cerr << " enough alignments were found."<< endl;
        else if(lisIndex >= lisIntervals.size()) cerr << " no more clusters are available."<< endl;
        else if(lisIntervals[lisIndex].score <= minCoverage) cerr << " no new clusters reach minimum query coverage."<< endl;
        else if(min(trialF,trialR) >= alnOptions.maxTrial) cerr << " max number of extensions without result have been reached."<< endl;
        if(lisIndex < lisIntervals.size()){
            cerr << "remaining clusters map approx to:" << endl;
            for(size_t i = lisIndex; i < lisIntervals.size(); i++){
                //sort this candidate region by query position
                const lis_t & cluster = lisIntervals[i];
                const vector<match_t> & matchVector = cluster.matches;
                long chrStart, chrEnd;
                cerr << "cluster " << i << " with " << matchVector.size() << " seeds and " << cluster.score << " bases covered" << endl;
                sa.getChromBounds(matchVector[0].ref, chrStart, chrEnd);
            }
        }
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movl 0x1b8(%rsp), %eax
movl 0x1b0(%rsp), %eax
movq %rdi, 0x190(%rsp)
movq %rsi, 0x188(%rsp)
movq %rdx, 0x180(%rsp)
movq %rcx, 0x178(%rsp)
movl %r8d, 0x174(%rsp)
movl %r9d, 0x170(%rsp)
movq $0x0, 0x168(%rsp)
movl $0x0, 0x164(%rsp)
movl $0x0, 0x160(%rsp)
movl $0x200, %edi            # imm = 0x200
callq 0x41680
movq %rax, 0x158(%rsp)
movl $0x200, %edi            # imm = 0x200
callq 0x41680
movq %rax, 0x150(%rsp)
movl $0x0, 0x14c(%rsp)
movq 0x188(%rsp), %rdi
addq $0xb0, %rdi
callq 0xdac0
movl %eax, %ecx
xorl %eax, %eax
cmpl 0x170(%rsp), %ecx
movb %al, 0xaf(%rsp)
jge 0x41b56
movq 0x168(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x178(%rsp), %rdi
callq 0x4c4b0
movq %rax, %rcx
movq 0xa0(%rsp), %rax
cmpq %rcx, %rax
setb %al
movb %al, 0xaf(%rsp)
movb 0xaf(%rsp), %al
testb $0x1, %al
jne 0x41b66
jmp 0x42103
movq 0x178(%rsp), %rdi
movq 0x168(%rsp), %rsi
callq 0x4e190
movq %rax, 0x98(%rsp)
movq 0x178(%rsp), %rdi
movq 0x168(%rsp), %rsi
callq 0x4e190
testb $0x1, 0x4(%rax)
je 0x41bb0
movq 0x158(%rsp), %rax
movq %rax, 0x90(%rsp)
jmp 0x41bc0
movq 0x150(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x41790
andb $0x1, %al
movb %al, 0x14b(%rsp)
movb 0x14b(%rsp), %al
andb $0x1, %al
movb %al, 0x14a(%rsp)
movq 0x178(%rsp), %rdi
movq 0x168(%rsp), %rsi
callq 0x4e190
testb $0x1, 0x4(%rax)
je 0x41c19
movl 0x164(%rsp), %eax
movl %eax, 0x8c(%rsp)
jmp 0x41c27
movl 0x160(%rsp), %eax
movl %eax, 0x8c(%rsp)
movl 0x8c(%rsp), %eax
movl %eax, 0x144(%rsp)
movl 0x144(%rsp), %eax
movq 0x180(%rsp), %rcx
cmpl 0x54(%rcx), %eax
jl 0x41c5c
xorl %eax, %eax
testb $0x1, 0x14a(%rsp)
movb %al, 0x8b(%rsp)
je 0x41cc5
movq 0x178(%rsp), %rdi
movq 0x168(%rsp), %rsi
callq 0x4e190
movq %rax, %rdi
addq $0x20, %rdi
callq 0x23440
movq %rax, %rcx
movb $0x1, %al
cmpq $0x1, %rcx
movb %al, 0x8a(%rsp)
ja 0x41cb7
movq 0x178(%rsp), %rdi
movq 0x168(%rsp), %rsi
callq 0x4e190
movl (%rax), %eax
cmpl 0x1b0(%rsp), %eax
setge %al
movb %al, 0x8a(%rsp)
movb 0x8a(%rsp), %al
movb %al, 0x8b(%rsp)
movb 0x8b(%rsp), %al
andb $0x1, %al
movb %al, 0x143(%rsp)
movq 0x180(%rsp), %rax
cmpl $0x2, 0x78(%rax)
jl 0x41e59
movq 0x55302(%rip), %rdi     # 0x96ff0
leaq 0x3c20a(%rip), %rsi     # 0x7deff
callq 0x8360
movq %rax, %rdi
movq 0x168(%rsp), %rsi
callq 0x8100
movq %rax, %rdi
movq 0x5529c(%rip), %rsi     # 0x96fb0
callq 0x83b0
movq 0x552d0(%rip), %rdi     # 0x96ff0
leaq 0x3c1df(%rip), %rsi     # 0x7df06
callq 0x8360
movq %rax, %rdi
movb 0x14b(%rsp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x8760
movq %rax, %rdi
movq 0x55266(%rip), %rsi     # 0x96fb0
callq 0x83b0
movq 0x5529a(%rip), %rdi     # 0x96ff0
leaq 0x3c1b2(%rip), %rsi     # 0x7df0f
callq 0x8360
movq %rax, %rdi
movl 0x144(%rsp), %esi
callq 0x8710
movq %rax, %rdi
movq 0x55235(%rip), %rsi     # 0x96fb0
callq 0x83b0
movq 0x55269(%rip), %rdi     # 0x96ff0
leaq 0x3c189(%rip), %rsi     # 0x7df17
callq 0x8360
movq %rax, %rdi
movb 0x143(%rsp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x8760
movq %rax, %rdi
movq 0x551ff(%rip), %rsi     # 0x96fb0
callq 0x83b0
movq 0x55233(%rip), %rdi     # 0x96ff0
leaq 0x3c15c(%rip), %rsi     # 0x7df20
callq 0x8360
movq %rax, 0x78(%rsp)
movq 0x178(%rsp), %rdi
movq 0x168(%rsp), %rsi
callq 0x4e190
movq %rax, %rdi
addq $0x20, %rdi
callq 0x23440
movq 0x78(%rsp), %rdi
movq %rax, %rsi
callq 0x8100
movq %rax, %rdi
movq 0x551aa(%rip), %rsi     # 0x96fb0
callq 0x83b0
movq 0x551de(%rip), %rdi     # 0x96ff0
leaq 0x3c111(%rip), %rsi     # 0x7df2a
callq 0x8360
movq %rax, 0x80(%rsp)
movq 0x178(%rsp), %rdi
movq 0x168(%rsp), %rsi
callq 0x4e190
movq 0x80(%rsp), %rdi
movl (%rax), %esi
callq 0x8710
movq %rax, %rdi
movq 0x5515c(%rip), %rsi     # 0x96fb0
callq 0x83b0
testb $0x1, 0x143(%rsp)
je 0x420ea
movq 0x178(%rsp), %rdi
movq 0x168(%rsp), %rsi
callq 0x4e190
movq %rax, 0x138(%rsp)
movq 0x138(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x130(%rsp)
movq 0x190(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x130(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4c8f0
movq 0x70(%rsp), %rdi
movq (%rax), %rsi
leaq 0x128(%rsp), %rdx
leaq 0x120(%rsp), %rcx
callq 0x4e1b0
movq 0x180(%rsp), %rax
cmpl $0x5, 0x78(%rax)
jl 0x41f8b
movq 0x55104(%rip), %rdi     # 0x96ff0
leaq 0x3c042(%rip), %rsi     # 0x7df35
callq 0x8360
movq %rax, %rdi
movq 0x168(%rsp), %rsi
callq 0x8100
movq %rax, %rdi
leaq 0x3be6a(%rip), %rsi     # 0x7dd7c
callq 0x8360
movq %rax, 0x68(%rsp)
movq 0x130(%rsp), %rdi
callq 0x23440
movq 0x68(%rsp), %rdi
movq %rax, %rsi
callq 0x8100
movq %rax, %rdi
leaq 0x3c002(%rip), %rsi     # 0x7df42
callq 0x8360
movq %rax, %rdi
movq 0x138(%rsp), %rax
movb 0x4(%rax), %cl
leaq 0x3bff3(%rip), %rsi     # 0x7df4d
leaq 0x38f44(%rip), %rax     # 0x7aea5
testb $0x1, %cl
cmovneq %rax, %rsi
callq 0x8360
movq %rax, %rdi
leaq 0x38f6e(%rip), %rsi     # 0x7aee5
callq 0x8360
movq %rax, %rdi
movq 0x5502a(%rip), %rsi     # 0x96fb0
callq 0x83b0
movq 0x190(%rsp), %rax
addq $0x50, %rax
movq %rax, 0x60(%rsp)
movq 0x138(%rsp), %rax
testb $0x1, 0x4(%rax)
je 0x41fbd
movq 0x188(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x58(%rsp)
jmp 0x41fce
movq 0x188(%rsp), %rax
addq $0x60, %rax
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x130(%rsp), %rdx
movl 0x174(%rsp), %ecx
movl 0x1b8(%rsp), %r8d
movl 0x1b0(%rsp), %r9d
movq 0x180(%rsp), %r14
movq 0x128(%rsp), %rbx
movq 0x120(%rsp), %r11
movq 0x188(%rsp), %r10
movq 0x138(%rsp), %rax
movb 0x4(%rax), %al
andb $0x1, %al
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movzbl %al, %eax
movl %eax, 0x20(%rsp)
callq 0x3f5b0
movl %eax, 0x11c(%rsp)
movq 0x138(%rsp), %rax
testb $0x1, 0x4(%rax)
je 0x4206b
movl 0x164(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x164(%rsp)
jmp 0x4207c
movl 0x160(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x160(%rsp)
cmpl $0x0, 0x11c(%rsp)
jl 0x420cc
movq 0x180(%rsp), %rax
testb $0x1, 0x5c(%rax)
je 0x420a4
movl 0x14c(%rsp), %eax
cmpl 0x11c(%rsp), %eax
jge 0x420cc
movq 0x138(%rsp), %rax
testb $0x1, 0x4(%rax)
je 0x420bf
movl $0x0, 0x164(%rsp)
jmp 0x420ca
movl $0x0, 0x160(%rsp)
jmp 0x420cc
leaq 0x14c(%rsp), %rdi
leaq 0x11c(%rsp), %rsi
callq 0x14d40
movl (%rax), %eax
movl %eax, 0x14c(%rsp)
movq 0x168(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x168(%rsp)
jmp 0x41af9
jmp 0x42105
movl $0x8, 0x114(%rsp)
movq $0x0, 0xf8(%rsp)
cmpq $0x0, 0x158(%rsp)
je 0x42300
movslq 0x114(%rsp), %rdi
movl $0x8, %esi
callq 0x8220
movq %rax, 0xf8(%rsp)
movq %rax, 0x100(%rsp)
movq 0x158(%rsp), %rax
movq (%rax), %rcx
movq 0x100(%rsp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x100(%rsp)
movq %rcx, (%rax)
movq 0x100(%rsp), %rax
cmpq 0xf8(%rsp), %rax
je 0x422fe
movq 0x100(%rsp), %rax
movq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x100(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x108(%rsp)
movq 0x108(%rsp), %rax
movl (%rax), %eax
shll $0x1f, %eax
sarl $0x1f, %eax
cmpl $0x0, %eax
jne 0x421cf
movq 0x108(%rsp), %rdi
callq 0x8470
jmp 0x42172
movl $0x0, 0x118(%rsp)
movl 0x118(%rsp), %eax
movq 0x108(%rsp), %rcx
movl (%rcx), %ecx
sarl %ecx
cmpl %ecx, %eax
jg 0x422ec
movq 0x108(%rsp), %rax
movq 0x158(%rsp), %rcx
movslq 0xc(%rcx), %rcx
addq %rcx, %rax
movslq 0x118(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x422d4
movq 0x100(%rsp), %rax
movq 0xf8(%rsp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movslq 0x114(%rsp), %rcx
cmpq %rcx, %rax
jne 0x42297
movl 0x114(%rsp), %eax
shll %eax
movl %eax, 0x114(%rsp)
movq 0xf8(%rsp), %rdi
movslq 0x114(%rsp), %rsi
shlq $0x3, %rsi
callq 0x86d0
movq %rax, 0xf8(%rsp)
movq 0xf8(%rsp), %rax
movl 0x114(%rsp), %ecx
sarl %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x100(%rsp)
movq 0x108(%rsp), %rax
movq 0x158(%rsp), %rcx
movslq 0xc(%rcx), %rcx
addq %rcx, %rax
movslq 0x118(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x100(%rsp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x100(%rsp)
movq %rcx, (%rax)
jmp 0x422d6
movl 0x118(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x118(%rsp)
jmp 0x421da
movq 0x108(%rsp), %rdi
callq 0x8470
jmp 0x42172
jmp 0x42300
movq 0x158(%rsp), %rdi
callq 0x8470
movq 0xf8(%rsp), %rdi
callq 0x8470
jmp 0x4231c
movl $0x8, 0xf0(%rsp)
movq $0x0, 0xd8(%rsp)
cmpq $0x0, 0x150(%rsp)
je 0x42517
movslq 0xf0(%rsp), %rdi
movl $0x8, %esi
callq 0x8220
movq %rax, 0xd8(%rsp)
movq %rax, 0xe0(%rsp)
movq 0x150(%rsp), %rax
movq (%rax), %rcx
movq 0xe0(%rsp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0xe0(%rsp)
movq %rcx, (%rax)
movq 0xe0(%rsp), %rax
cmpq 0xd8(%rsp), %rax
je 0x42515
movq 0xe0(%rsp), %rax
movq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0xe0(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movl (%rax), %eax
shll $0x1f, %eax
sarl $0x1f, %eax
cmpl $0x0, %eax
jne 0x423e6
movq 0xe8(%rsp), %rdi
callq 0x8470
jmp 0x42389
movl $0x0, 0xf4(%rsp)
movl 0xf4(%rsp), %eax
movq 0xe8(%rsp), %rcx
movl (%rcx), %ecx
sarl %ecx
cmpl %ecx, %eax
jg 0x42503
movq 0xe8(%rsp), %rax
movq 0x150(%rsp), %rcx
movslq 0xc(%rcx), %rcx
addq %rcx, %rax
movslq 0xf4(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x424eb
movq 0xe0(%rsp), %rax
movq 0xd8(%rsp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movslq 0xf0(%rsp), %rcx
cmpq %rcx, %rax
jne 0x424ae
movl 0xf0(%rsp), %eax
shll %eax
movl %eax, 0xf0(%rsp)
movq 0xd8(%rsp), %rdi
movslq 0xf0(%rsp), %rsi
shlq $0x3, %rsi
callq 0x86d0
movq %rax, 0xd8(%rsp)
movq 0xd8(%rsp), %rax
movl 0xf0(%rsp), %ecx
sarl %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0xe0(%rsp)
movq 0xe8(%rsp), %rax
movq 0x150(%rsp), %rcx
movslq 0xc(%rcx), %rcx
addq %rcx, %rax
movslq 0xf4(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0xe0(%rsp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0xe0(%rsp)
movq %rcx, (%rax)
jmp 0x424ed
movl 0xf4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf4(%rsp)
jmp 0x423f1
movq 0xe8(%rsp), %rdi
callq 0x8470
jmp 0x42389
jmp 0x42517
movq 0x150(%rsp), %rdi
callq 0x8470
movq 0xd8(%rsp), %rdi
callq 0x8470
movq 0x180(%rsp), %rax
cmpl $0x5, 0x78(%rax)
jl 0x42828
movq 0x54aa6(%rip), %rdi     # 0x96ff0
leaq 0x3ba11(%rip), %rsi     # 0x7df62
callq 0x8360
movq %rax, %rdi
movq 0x54a50(%rip), %rsi     # 0x96fb0
callq 0x83b0
movq 0x188(%rsp), %rdi
addq $0xb0, %rdi
callq 0xdac0
cmpl 0x170(%rsp), %eax
jl 0x425a9
movq 0x54a67(%rip), %rdi     # 0x96ff0
leaq 0x3b9ed(%rip), %rsi     # 0x7df7d
callq 0x8360
movq %rax, %rdi
movq 0x54a11(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0x42687
movq 0x168(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x178(%rsp), %rdi
callq 0x4c4b0
movq %rax, %rcx
movq 0x50(%rsp), %rax
cmpq %rcx, %rax
jb 0x425f7
movq 0x54a19(%rip), %rdi     # 0x96ff0
leaq 0x3b9be(%rip), %rsi     # 0x7df9c
callq 0x8360
movq %rax, %rdi
movq 0x549c3(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0x42685
movq 0x178(%rsp), %rdi
movq 0x168(%rsp), %rsi
callq 0x4e190
movl (%rax), %eax
cmpl 0x1b0(%rsp), %eax
jg 0x4263b
movq 0x549d2(%rip), %rdi     # 0x96ff0
leaq 0x3b998(%rip), %rsi     # 0x7dfbd
callq 0x8360
movq %rax, %rdi
movq 0x5497c(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0x42683
leaq 0x164(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0xc080
movl (%rax), %eax
movq 0x180(%rsp), %rcx
cmpl 0x54(%rcx), %eax
jl 0x42681
movq 0x5498a(%rip), %rdi     # 0x96ff0
leaq 0x3b97f(%rip), %rsi     # 0x7dfec
callq 0x8360
movq %rax, %rdi
movq 0x54934(%rip), %rsi     # 0x96fb0
callq 0x83b0
jmp 0x42683
jmp 0x42685
jmp 0x42687
movq 0x168(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x178(%rsp), %rdi
callq 0x4c4b0
movq %rax, %rcx
movq 0x48(%rsp), %rax
cmpq %rcx, %rax
jae 0x42826
movq 0x54937(%rip), %rdi     # 0x96ff0
leaq 0x3b968(%rip), %rsi     # 0x7e028
callq 0x8360
movq %rax, %rdi
movq 0x548e1(%rip), %rsi     # 0x96fb0
callq 0x83b0
movq 0x168(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x178(%rsp), %rdi
callq 0x4c4b0
movq %rax, %rcx
movq 0x40(%rsp), %rax
cmpq %rcx, %rax
jae 0x42824
movq 0x178(%rsp), %rdi
movq 0xd0(%rsp), %rsi
callq 0x4e190
movq %rax, 0xc8(%rsp)
movq 0xc8(%rsp), %rax
addq $0x20, %rax
movq %rax, 0xc0(%rsp)
movq 0x548a9(%rip), %rdi     # 0x96ff0
leaq 0x3b7eb(%rip), %rsi     # 0x7df39
callq 0x8360
movq %rax, %rdi
movq 0xd0(%rsp), %rsi
callq 0x8100
movq %rax, %rdi
leaq 0x3b60f(%rip), %rsi     # 0x7dd7c
callq 0x8360
movq %rax, 0x30(%rsp)
movq 0xc0(%rsp), %rdi
callq 0x23440
movq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x8100
movq %rax, %rdi
leaq 0x3b8af(%rip), %rsi     # 0x7e04a
callq 0x8360
movq %rax, %rdi
movq 0xc8(%rsp), %rax
movl (%rax), %esi
callq 0x8710
movq %rax, %rdi
leaq 0x3b89a(%rip), %rsi     # 0x7e056
callq 0x8360
movq %rax, %rdi
movq 0x547e5(%rip), %rsi     # 0x96fb0
callq 0x83b0
movq 0x190(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xc0(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4c8f0
movq 0x38(%rsp), %rdi
movq (%rax), %rsi
leaq 0xb8(%rsp), %rdx
leaq 0xb0(%rsp), %rcx
callq 0x4e1b0
movq 0xd0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xd0(%rsp)
jmp 0x426e4
jmp 0x42826
jmp 0x42828
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r14
retq
nopw %cs:(%rax,%rax)