// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/mapper.cpp
// Function: extendAlignmentChain(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<match_t, std::allocator<match_t>> const&, int, int, int, align_opt const&, long, long, read_t&, bool)
int extendAlignmentChain(const string& S, const string& P, 
        const vector<match_t>& matches, int editDist, int minScore, int minCoverage, 
        const align_opt & alnOptions, long chrStart, long chrEnd, read_t & read, bool fw){
    int maxAlnScore = min(-1, minScore-10);
    if(alnOptions.print >= 5){
        cerr << "min Score is " << minScore << endl;
        cerr << "seeds are: " << endl;
        for(size_t i = 0; i < matches.size(); i++)
            cerr << matches[i].query << "," << matches[i].ref << "," << matches[i].len << endl;
    }
    list<size_t> chain;
    //seeds in order of 
    vector<long> seedOrder;
    seedOrder.reserve(matches.size());
    vector<bool> used;
    used.assign(matches.size(),false);
    for(size_t i = 0; i < matches.size(); i++)
        seedOrder.push_back((long)matches[i].len<<32 | i);
    sort(seedOrder.begin(), seedOrder.end());
    //for all seeds:
    vector<boundaries> alnBounds;
    vector<int> alnScores;
    vector<long> alnBegins;
    for(int i = seedOrder.size()-1; i >=0; i--){
        size_t anchorPos = (uint32_t)seedOrder[i];
        match_t anchor = matches[anchorPos];
        if(alnOptions.print >= 5) cerr << "anchor " << anchor.query << "," << anchor.ref << "," << anchor.len << endl;
        //check if current anchor is not already in alignment
        bool extend = !used[anchorPos];
        size_t j = 0;
        while(j < alnBounds.size() && extend){
            bool notContained = anchor.query < alnBounds[j].queryB || anchor.query+anchor.len >= alnBounds[j].queryE || anchor.ref < alnBounds[j].refB || anchor.ref+anchor.len >= alnBounds[j].refE;
            if(!notContained){
                int qDist = anchor.query - alnBounds[j].queryB;
                int refDist = anchor.ref - alnBounds[j].refB;
                int max_gapL = min(alnOptions.fixedBandSize, (int)((min(qDist,refDist)*alnOptions.match + alnOptions.openGap)/alnOptions.extendGap + 1.));
                extend = max(qDist,refDist) >= max_gapL;
                if(extend){
                    qDist = alnBounds[j].queryE - (anchor.query+anchor.len);
                    refDist = alnBounds[j].refE - (anchor.ref+anchor.len);
                    max_gapL = min(alnOptions.fixedBandSize, (int)((min(qDist,refDist)*alnOptions.match + alnOptions.openGap)/alnOptions.extendGap + 1.));
                    extend = max(qDist,refDist) >= max_gapL;
                }
            }
            j++;
        }
        if(extend){
            //CREATE CHAIN AROUND THIS ANCHOR
            int curScore = 0;
            int minEdit = nextChain(matches, chain, anchorPos, alnOptions.errorPercent, used, P.length(), curScore);
            int chainScore = curScore;//for debug purpose
            if(alnOptions.print >= 2){
                cerr << "#CHAIN " << chain.size() << endl;
                cerr << "#CHAINSCORE " << curScore << endl;
                cerr << "#CHAINSKEW " << minEdit << endl;
                cerr << "#CHAINMINSCORE " << minCoverage << endl;
                if(alnOptions.print >= 5)
                        cerr << "extend chain of size " << chain.size() << " elements and minEdit,curScore =  " << minEdit << "," << curScore << endl;
            }
            //ITERATE THROUGH CHAIN
            if(minEdit <= editDist && (chain.size() > 1 || anchor.len >= minCoverage )){
                std::list<size_t>::const_iterator iterator = chain.begin(), itEnd = chain.end();
                int bandSize = min(alnOptions.fixedBandSize, (int)(editDist-minEdit+1));
                anchor = matches[*iterator];
                iterator++;
                int tmpQB = anchor.query;
                int tmpQE = anchor.query+anchor.len-1;
                long tmpRB = anchor.ref;
                long tmpRE = anchor.ref + anchor.len-1L;
                if(alnOptions.print >= 7) cerr << "first seed (q/r/l): " << tmpQB << "," << tmpRB << "," << anchor.len << endl;
                //INSIDE CHAIN
                while(iterator != itEnd){
                    match_t seed = matches[*iterator];
                    if(alnOptions.print >= 6) cerr << "current seed (q/r/l): " << seed.query << "," << seed.ref << "," << seed.len << endl;
                    long qDist = seed.query - tmpQE;
                    long refDist = seed.ref - tmpRE;
                    if (qDist < 0 || refDist < 0) {
                        if (qDist >= refDist)
                            qDist -= refDist; //qDist insertions
                        else
                            refDist -= qDist;
                    }
                    if (qDist <= 0) {//minRefDist deletions
                        //1+|qDist| matches lost of next mem
                        curScore += alnOptions.openGap + alnOptions.extendGap*refDist;
                        if(alnOptions.print >= 7) cerr << "added deletion of size " << refDist << endl;
                    } else if (refDist <= 0) {
                        curScore += alnOptions.openGap + alnOptions.extendGap*qDist;
                        if(alnOptions.print >= 7) cerr << "added insertion of size " << qDist << endl;
                    } else if (qDist == 1) {
                        curScore += alnOptions.openGap + alnOptions.extendGap*(refDist-1);
                        if(alnOptions.print >= 7) cerr << "added deletion of size " << refDist-1 << endl;
                    } else if (refDist == 1) {
                        curScore += alnOptions.openGap + alnOptions.extendGap*(qDist-1);
                        if(alnOptions.print >= 7) cerr << "added insertion of size " << qDist-1 << endl;
                    } else if (refDist == 2 && qDist==2) {
                        curScore += alnOptions.mismatch;
                        if(alnOptions.print >= 7) cerr << "added mutation" << endl;
                    } else {//both distances are positive and not equal to (1,1), otherwise seeds would not be maximal!
                        uint8_t *target;
                        int tLen = seed.ref - tmpRE - 1;
                        target = (uint8_t *)malloc(tLen);
                        for (int j = 0; j < tLen; ++j) // convert to the nt4 encoding
                            target[j] = Utils::ORDVALUE[(size_t)S[tmpRE+1+j]];
                        uint8_t *query;
                        int qLen = seed.query - tmpQE - 1;
                        query = (uint8_t *)malloc(qLen);
                        for (int j = 0; j < qLen; ++j)
                            query[j] = Utils::ORDVALUE[(size_t)P[tmpQE+1+j]];
                        int innerBand = min(alnOptions.fixedBandSize, (int)(editDist-minEdit+abs(qLen-tLen)+3));
                        innerBand = max(innerBand,abs(qLen-tLen)+(int)(abs(qLen-tLen)*alnOptions.errorPercent));
                        if(alnOptions.print >= 2) cerr << "#DP " << (tLen*innerBand) << endl;
                        if(alnOptions.print >= 7) cerr << "dp called with dimension " << (seed.query-tmpQE+1) << "x" << (seed.ref-tmpRE+1) << " and band " << innerBand << endl;
                        curScore += ksw_nw(qLen, query, tLen, target, 5, alnOptions.mat, 
                                -1*alnOptions.openGap, -1*alnOptions.extendGap, innerBand);
                        free(query);
                        free(target);
                    }
                    if(alnOptions.print >= 6) cerr << "curScore is " << curScore << endl;
                    //update bounds
                    tmpRE = seed.ref + seed.len - 1L;
                    tmpQE = seed.query + seed.len - 1;            
                    ++iterator;
                }
                //lef-right extensions
                if(tmpQB <= (int)(P.length()-1)-tmpQE){
                    leftExtension(S, P, tmpQB, tmpRB, chrStart, alnOptions, curScore, bandSize, editDist-minEdit+1);
                    rightExtension(S, P, tmpQE, tmpRE, chrEnd, alnOptions, curScore, bandSize, editDist);
                }
                else{
                    rightExtension(S, P, tmpQE, tmpRE, chrEnd, alnOptions, curScore, bandSize, editDist);
                    leftExtension(S, P, tmpQB, tmpRB, chrStart, alnOptions, curScore, bandSize, editDist-minEdit+1);
                }
                if(alnOptions.print >= 5) cerr << "current alignments startpos would be " << tmpRB << endl;
                maxAlnScore = max(maxAlnScore, curScore);
                if(curScore >= minScore){
                    if(alnOptions.print >= 2) cerr << "#SUCCES " << curScore << endl;
                    bool equal = false;
                    for(size_t i = 0; i < alnScores.size(); i++){
                        if(alnScores[i]>= curScore && abs(alnBegins[i]-tmpRB) < editDist)
                            equal = true;
                    }
                    if(!equal){
                        alignment_t * alignmentFound = new alignment_t();
                        alignmentFound->refB = tmpRB;
                        alignmentFound->refE = tmpRE;
                        alignmentFound->qB = tmpQB;
                        alignmentFound->qE = tmpQE;
                        alignmentFound->alignmentScore = curScore;
                        if(!fw){
                            alignmentFound->flag.set(4,true);
                        }
                        alignmentFound->refLength = (tmpRE-tmpRB+1);
                        for(std::list<size_t>::const_iterator iterator = chain.begin(); iterator != chain.end(); iterator++){
                            match_t seed = matches[*iterator];
                            alignmentFound->chain.push_back(seed);
                        }
                        read.alignments.push_back(alignmentFound);
                        alnScores.push_back(curScore);
                        alnBegins.push_back(tmpRB);
                    }
                }
                else if(alnOptions.print >= 2)
                    cerr << "#FAIL " << curScore << endl;
                if(alnOptions.print >= 5) cerr << "final score is " << curScore << endl;
                alnBounds.push_back(boundaries(tmpRB, tmpRE, tmpQB, tmpQE));
#ifndef NDEBUG
                if(alnOptions.debugFile != NULL){
                    //print alignment
                    fprintf(alnOptions.debugFile,"@CHA %lu %d %d\n", chain.size(), chainScore, anchor.len);
                    for( list<size_t>::const_iterator iterator = chain.begin(); iterator != chain.end(); iterator++){
                        fprintf(alnOptions.debugFile,"%d %ld %d\n", matches[*iterator].query, matches[*iterator].ref, matches[*iterator].len);
                    }
                    if(curScore >= (int) (P.length()*alnOptions.match + (alnOptions.mismatch-alnOptions.match)*editDist)){
                        alignment_t * alignmentFound = new alignment_t();
                        alignmentFound->refB = tmpRB;
                        alignmentFound->refE = tmpRE;
                        alignmentFound->qB = tmpQB;
                        alignmentFound->qE = tmpQE;
                        alignmentFound->alignmentScore = curScore;
                        for(std::list<size_t>::const_iterator iterator = chain.begin(); iterator != chain.end(); iterator++){
                            match_t seed = matches[*iterator];
                            alignmentFound->chain.push_back(seed);
                        }
                        uint8_t *query;
                        query = (uint8_t *)malloc(P.length());
                        for (size_t i = 0; i < P.length(); ++i) // convert to the nt4 encoding
                            query[i] = Utils::ORDVALUE[(size_t)P[i]];
                        alignmentFound->constructCIGAR(S, query, P.length(), alnOptions.fixedBandSize, alnOptions.mat, 
                                alnOptions.match, alnOptions.openGap, alnOptions.extendGap, 0);
                        free(query);
                        fprintf(alnOptions.debugFile,"@SUC %d %ld %s %d\n", alignmentFound->editDist, tmpRB, alignmentFound->NMtag.c_str(), curScore);
                        delete alignmentFound;
                    }
                    else{//print fail reason
                        fprintf(alnOptions.debugFile,"@ERR %ld %d\n", tmpRB, curScore);
                    }
                    //print best possible alignment
                    long refB = matches[chain.front()].ref - matches[chain.front()].query - 3*editDist;
                    long refE = refB+P.length() + 6*editDist;
                    dp_output output = dpInRegion(S, P, refB, refE, 0, P.length());
                    string cigarstring = createCigar(output.cigarChars, output.cigarLengths);
                    fprintf(alnOptions.debugFile,"@BEST %d %ld %s %d\n", output.editDist, refB, cigarstring.c_str(), output.dpScore);
                }
#endif
            }
        }
    }
    int scoreReturned = -1;
    if(maxAlnScore >= minScore)
        scoreReturned = maxAlnScore;
    return scoreReturned;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movl %r9d, 0x74(%rsp)
movq %rcx, 0x90(%rsp)
movq %rdx, %rbp
movq %rsi, 0x60(%rsp)
movq %rdi, 0x58(%rsp)
movq 0x1d0(%rsp), %rcx
cmpl $0x9, %r8d
movl $0x9, %eax
movl %r8d, 0x3c(%rsp)
cmovll %r8d, %eax
movl %eax, 0x24(%rsp)
cmpl $0x5, 0x78(%rcx)
jl 0x22c01
movq 0x3152b(%rip), %rbx     # 0x53fe8
leaq 0x2248b(%rip), %rsi     # 0x44f4f
movl $0xd, %edx
movq %rbx, %rdi
callq 0x7340
movq %rbx, %rdi
movl 0x3c(%rsp), %esi
callq 0x75d0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
leaq 0x2244f(%rip), %rsi     # 0x44f5d
movl $0xb, %edx
movq %rbx, %rdi
callq 0x7340
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq (%rbp), %rax
cmpq %rax, 0x8(%rbp)
je 0x22c01
xorl %r12d, %r12d
movq 0x3148e(%rip), %rbx     # 0x53fe8
leaq 0x2232f(%rip), %r14     # 0x44e90
xorl %r13d, %r13d
movl 0x8(%rax,%r12), %esi
movq %rbx, %rdi
callq 0x75d0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x7340
movq (%rbp), %rax
movq (%rax,%r12), %rsi
movq %r15, %rdi
callq 0x72a0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x7340
movq (%rbp), %rax
movl 0xc(%rax,%r12), %esi
movq %r15, %rdi
callq 0x75d0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
incq %r13
movq (%rbp), %rax
movq 0x8(%rbp), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
addq $0x10, %r12
cmpq %rcx, %r13
jb 0x22b64
leaq 0x78(%rsp), %r13
movq %r13, 0x8(%r13)
movq %r13, (%r13)
xorl %ebx, %ebx
movq %rbx, 0x10(%r13)
leaq 0xc0(%rsp), %rdi
movq %rbx, 0x10(%rdi)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rdi)
movq 0x8(%rbp), %rsi
subq (%rbp), %rsi
sarq $0x4, %rsi
callq 0x2bb08
leaq 0x128(%rsp), %rdi
movq %rbx, (%rdi)
movl %ebx, 0x8(%rdi)
movq %rbx, 0x10(%rdi)
movl %ebx, 0x18(%rdi)
movq %rbx, 0x20(%rdi)
movq 0x8(%rbp), %rsi
subq (%rbp), %rsi
sarq $0x4, %rsi
xorl %edx, %edx
callq 0x2ffa4
movq (%rbp), %rax
movq %rbp, 0x10(%rsp)
cmpq %rax, 0x8(%rbp)
movq 0x1d0(%rsp), %rbp
je 0x22cf3
movl $0xc, %ebx
xorl %r12d, %r12d
leaq 0xc0(%rsp), %r14
leaq 0xa0(%rsp), %r15
movl (%rax,%rbx), %eax
shlq $0x20, %rax
orq %r12, %rax
movq %rax, 0xa0(%rsp)
movq 0xc8(%rsp), %rsi
cmpq 0xd0(%rsp), %rsi
je 0x22cc9
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xc8(%rsp)
jmp 0x22cd4
movq %r14, %rdi
movq %r15, %rdx
callq 0x173e4
incq %r12
movq 0x10(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
addq $0x10, %rbx
cmpq %rcx, %r12
jb 0x22c94
movq 0xc0(%rsp), %r14
movq 0xc8(%rsp), %r15
cmpq %r15, %r14
je 0x22d35
movq %r15, %rax
subq %r14, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3063a
movq %r14, %rdi
movq %r15, %rsi
callq 0x30723
addl $-0xa, 0x24(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0xa0(%rsp)
xorl %eax, %eax
movq %rax, 0xb0(%rsp)
movq %rax, 0xf0(%rsp)
movapd %xmm0, 0xe0(%rsp)
movq %rax, 0x120(%rsp)
movapd %xmm0, 0x110(%rsp)
movq 0xc8(%rsp), %rax
subq 0xc0(%rsp), %rax
shrq $0x3, %rax
decl %eax
js 0x23ef1
movq 0x1e8(%rsp), %rcx
movq %rbp, %rsi
leaq 0x10(%rbp), %rdx
movq %rdx, 0x188(%rsp)
movslq 0x90(%rsp), %rdx
movq %rdx, 0x190(%rsp)
addq $0xb0, %rcx
movq %rcx, 0x180(%rsp)
movl %eax, %ecx
movq 0xc0(%rsp), %rax
movq %rcx, 0x68(%rsp)
movl (%rax,%rcx,8), %r14d
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %r14, %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %r15
movl 0x8(%rax,%rcx), %r12d
movslq 0xc(%rax,%rcx), %rcx
movq %rcx, 0x48(%rsp)
movl %ecx, %ebp
cmpl $0x5, 0x78(%rsi)
jl 0x22e9a
movl $0x7, %edx
movq 0x311d6(%rip), %rdi     # 0x53fe8
leaq 0x22150(%rip), %rsi     # 0x44f69
callq 0x7340
movq 0x311c3(%rip), %rdi     # 0x53fe8
movl %r12d, %esi
callq 0x75d0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x22051(%rip), %rsi     # 0x44e90
callq 0x7340
movq %rbx, %rdi
movq %r15, %rsi
callq 0x72a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x2202f(%rip), %rsi     # 0x44e90
callq 0x7340
movq %rbx, %rdi
movl %ebp, %esi
callq 0x75d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0x128(%rsp), %rax
movl $0x1, %edx
movl %r14d, %ecx
shlq %cl, %rdx
movl %r14d, %ecx
shrl $0x6, %ecx
andq (%rax,%rcx,8), %rdx
sete %al
movq 0xa0(%rsp), %rcx
movq 0xa8(%rsp), %rsi
subq %rcx, %rsi
je 0x22feb
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %rdi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdi, %rsi
testq %rdx, %rdx
jne 0x22feb
sete %al
leal (%rbp,%r12), %edi
movq 0x48(%rsp), %rdx
leaq (%r15,%rdx), %r8
movq 0x1d0(%rsp), %rdx
movl (%rdx), %r9d
movl %r9d, 0x28(%rsp)
movl 0x8(%rdx), %r9d
movl %r9d, 0x50(%rsp)
movl 0xc(%rdx), %r9d
movl %r9d, 0x98(%rsp)
movl 0x90(%rdx), %ebx
addq %r15, %rbp
movq %rbp, 0x40(%rsp)
addq $0x14, %rcx
movl $0x1, %ebp
movl %r12d, %edx
subl -0x4(%rcx), %edx
jl 0x22fcb
movl (%rcx), %r9d
subl %edi, %r9d
jle 0x22fcb
movq -0x14(%rcx), %r11
cmpq %r11, %r15
jl 0x22fcb
movq -0xc(%rcx), %r13
cmpq %r13, %r8
jge 0x22fcb
movl %r15d, %r10d
subl %r11d, %r10d
cmpl %r10d, %edx
movl %r10d, %eax
cmovll %edx, %eax
cmovgl %edx, %r10d
imull 0x28(%rsp), %eax
addl 0x50(%rsp), %eax
cltd
idivl 0x98(%rsp)
incl %eax
movl %ebx, %edx
cmpl %eax, %ebx
jl 0x22f8f
movl %eax, %edx
cmpl %edx, %r10d
setge %al
jl 0x22fcb
subl 0x40(%rsp), %r13d
cmpl %r13d, %r9d
movl %r13d, %eax
cmovll %r9d, %eax
cmovgl %r9d, %r13d
imull 0x28(%rsp), %eax
addl 0x50(%rsp), %eax
cltd
idivl 0x98(%rsp)
incl %eax
movl %ebx, %edx
cmpl %eax, %ebx
jl 0x22fc5
movl %eax, %edx
cmpl %edx, %r13d
setge %al
cmpq %rsi, %rbp
jae 0x22fe6
incq %rbp
addq $0x18, %rcx
testb $0x1, %al
leaq 0x78(%rsp), %r13
jne 0x22f3b
jmp 0x22feb
leaq 0x78(%rsp), %r13
testb $0x1, %al
je 0x239e3
movl $0x0, 0x4(%rsp)
movq 0x1d0(%rsp), %rbp
movsd 0x30(%rbp), %xmm0
movq 0x60(%rsp), %rax
movq 0x8(%rax), %r8
movq 0x10(%rsp), %rdi
movq %r13, %rsi
movq %r14, %rdx
leaq 0x128(%rsp), %rcx
leaq 0x4(%rsp), %r9
callq 0x226aa
movl %eax, %r14d
cmpl $0x2, 0x78(%rbp)
jl 0x2322b
movl $0x7, %edx
movq 0x30fa1(%rip), %rdi     # 0x53fe8
leaq 0x21f23(%rip), %rsi     # 0x44f71
callq 0x7340
movq 0x88(%rsp), %rsi
movq 0x30f86(%rip), %rdi     # 0x53fe8
callq 0x71c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movl $0xc, %edx
movq 0x30f4b(%rip), %rdi     # 0x53fe8
leaq 0x21ed5(%rip), %rsi     # 0x44f79
callq 0x7340
movl 0x4(%rsp), %esi
movq 0x30f34(%rip), %rdi     # 0x53fe8
callq 0x75d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movl $0xb, %edx
movq 0x30ef9(%rip), %rdi     # 0x53fe8
leaq 0x21e90(%rip), %rsi     # 0x44f86
callq 0x7340
movq 0x30ee6(%rip), %rdi     # 0x53fe8
movl %r14d, %esi
callq 0x75d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movl $0xf, %edx
movq 0x30ea8(%rip), %rdi     # 0x53fe8
leaq 0x21e4b(%rip), %rsi     # 0x44f92
callq 0x7340
movq 0x30e95(%rip), %rdi     # 0x53fe8
movl 0x74(%rsp), %esi
callq 0x75d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
cmpl $0x5, 0x78(%rbp)
jl 0x2322b
movl $0x15, %edx
movq 0x30e4c(%rip), %rdi     # 0x53fe8
leaq 0x21dff(%rip), %rsi     # 0x44fa2
callq 0x7340
movq 0x88(%rsp), %rsi
movq 0x30e31(%rip), %rdi     # 0x53fe8
callq 0x71c0
movq %rax, %rbx
movl $0x22, %edx
movq %rax, %rdi
leaq 0x21dea(%rip), %rsi     # 0x44fb8
callq 0x7340
movq %rbx, %rdi
movl %r14d, %esi
callq 0x75d0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x21ca0(%rip), %rsi     # 0x44e90
callq 0x7340
movl 0x4(%rsp), %esi
movq %rbx, %rdi
callq 0x75d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0x90(%rsp), %rax
subl %r14d, %eax
jl 0x23ebb
cmpq $0x1, 0x88(%rsp)
ja 0x23256
movq 0x48(%rsp), %rcx
cmpl 0x74(%rsp), %ecx
jl 0x23ebb
movq %rax, 0x48(%rsp)
leal 0x1(%rax), %ecx
movl 0x90(%rbp), %eax
cmpl %eax, %ecx
movq %rcx, 0x168(%rsp)
cmovll %ecx, %eax
movq %rax, 0x40(%rsp)
movq 0x78(%rsp), %rax
movq (%rax), %r15
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movq (%rcx), %rcx
shlq $0x4, %rax
movq (%rcx,%rax), %rdx
movl 0x8(%rcx,%rax), %esi
movslq 0xc(%rcx,%rax), %r14
movl %esi, 0xc(%rsp)
leal -0x1(%rsi,%r14), %eax
movl %eax, 0x8(%rsp)
movq %rdx, 0x18(%rsp)
leaq (%rdx,%r14), %rax
decq %rax
movq %rax, 0x30(%rsp)
cmpl $0x7, 0x78(%rbp)
jl 0x2335b
movl $0x14, %edx
movq 0x30d19(%rip), %rdi     # 0x53fe8
leaq 0x21d05(%rip), %rsi     # 0x44fdb
callq 0x7340
movl 0xc(%rsp), %esi
movq 0x30d02(%rip), %rdi     # 0x53fe8
callq 0x75d0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x21b93(%rip), %rsi     # 0x44e90
callq 0x7340
movq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x72a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x21b6f(%rip), %rsi     # 0x44e90
callq 0x7340
movq %rbx, %rdi
movl %r14d, %esi
callq 0x75d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
cmpq %r13, %r15
movq 0x10(%rsp), %r14
je 0x239f5
movq 0x48(%rsp), %rax
addl $0x3, %eax
movq %rax, 0x48(%rsp)
movq 0x10(%r15), %rax
movq (%r14), %rcx
shlq $0x4, %rax
movq (%rcx,%rax), %rdx
movq %rdx, 0x28(%rsp)
movslq 0x8(%rcx,%rax), %r12
movslq 0xc(%rcx,%rax), %r14
cmpl $0x6, 0x78(%rbp)
jl 0x23435
movl $0x16, %edx
movq 0x30c3e(%rip), %rdi     # 0x53fe8
leaq 0x21c3f(%rip), %rsi     # 0x44ff0
callq 0x7340
movq 0x30c2b(%rip), %rdi     # 0x53fe8
movl %r12d, %esi
callq 0x75d0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x21ab9(%rip), %rsi     # 0x44e90
callq 0x7340
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
callq 0x72a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x21a95(%rip), %rsi     # 0x44e90
callq 0x7340
movq %rbx, %rdi
movl %r14d, %esi
callq 0x75d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq %r14, 0x98(%rsp)
movslq 0x8(%rsp), %r13
movq %r12, 0x50(%rsp)
subq %r13, %r12
movq 0x30(%rsp), %r14
movq 0x28(%rsp), %rbp
subq %r14, %rbp
testl %r12d, %r12d
js 0x23461
testq %rbp, %rbp
jns 0x23471
movq %rbp, %rax
subq %r12, %rax
jle 0x2346e
movq %rax, %rbp
jmp 0x23471
subq %rbp, %r12
testq %r12, %r12
jle 0x234fc
testq %rbp, %rbp
jle 0x23568
cmpq $0x1, %r12
jne 0x235d5
decq %rbp
movq 0x1d0(%rsp), %rcx
movl 0xc(%rcx), %eax
imull %ebp, %eax
addl 0x8(%rcx), %eax
addl %eax, 0x4(%rsp)
cmpl $0x7, 0x78(%rcx)
leaq 0x78(%rsp), %r13
movq 0x10(%rsp), %r14
jl 0x236c8
movl $0x17, %edx
movq 0x30b23(%rip), %rdi     # 0x53fe8
leaq 0x21b3b(%rip), %rsi     # 0x45007
callq 0x7340
movq 0x30b10(%rip), %rdi     # 0x53fe8
movq %rbp, %rsi
callq 0x72a0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x72b0
jmp 0x236b5
movq 0x1d0(%rsp), %rcx
movl 0xc(%rcx), %eax
imull %ebp, %eax
addl 0x8(%rcx), %eax
addl %eax, 0x4(%rsp)
cmpl $0x7, 0x78(%rcx)
leaq 0x78(%rsp), %r13
movq 0x10(%rsp), %r14
jl 0x236c8
movl $0x17, %edx
movq 0x30ab7(%rip), %rdi     # 0x53fe8
leaq 0x21acf(%rip), %rsi     # 0x45007
callq 0x7340
movq 0x30aa4(%rip), %rdi     # 0x53fe8
movq %rbp, %rsi
callq 0x72a0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x72b0
jmp 0x236b5
movq 0x1d0(%rsp), %rcx
movl 0xc(%rcx), %eax
imull %r12d, %eax
addl 0x8(%rcx), %eax
addl %eax, 0x4(%rsp)
cmpl $0x7, 0x78(%rcx)
leaq 0x78(%rsp), %r13
movq 0x10(%rsp), %r14
jl 0x236c8
movl $0x18, %edx
movq 0x30a4a(%rip), %rdi     # 0x53fe8
leaq 0x21a7a(%rip), %rsi     # 0x4501f
callq 0x7340
movq 0x30a37(%rip), %rdi     # 0x53fe8
movq %r12, %rsi
callq 0x72a0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x72b0
jmp 0x236b5
cmpq $0x1, %rbp
jne 0x23648
decq %r12
movq 0x1d0(%rsp), %rcx
movl 0xc(%rcx), %eax
imull %r12d, %eax
addl 0x8(%rcx), %eax
addl %eax, 0x4(%rsp)
cmpl $0x7, 0x78(%rcx)
leaq 0x78(%rsp), %r13
movq 0x10(%rsp), %r14
jl 0x236c8
movl $0x18, %edx
movq 0x309d4(%rip), %rdi     # 0x53fe8
leaq 0x21a04(%rip), %rsi     # 0x4501f
callq 0x7340
movq 0x309c1(%rip), %rdi     # 0x53fe8
movq %r12, %rsi
callq 0x72a0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x72b0
jmp 0x236b5
cmpq $0x2, %r12
jne 0x23766
cmpq $0x2, %rbp
jne 0x23766
movq 0x1d0(%rsp), %rcx
movl 0x4(%rcx), %eax
addl %eax, 0x4(%rsp)
cmpl $0x7, 0x78(%rcx)
leaq 0x78(%rsp), %r13
movq 0x10(%rsp), %r14
jl 0x236c8
movl $0xe, %edx
movq 0x30961(%rip), %rdi     # 0x53fe8
leaq 0x219aa(%rip), %rsi     # 0x45038
callq 0x7340
movq 0x3094e(%rip), %rcx     # 0x53fe8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x72b0
movq 0x30933(%rip), %r12     # 0x53fe8
movsbl %al, %esi
movq %r12, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0x1d0(%rsp), %rax
cmpl $0x6, 0x78(%rax)
jl 0x23728
movl $0xc, %edx
movq 0x30906(%rip), %rdi     # 0x53fe8
leaq 0x21963(%rip), %rsi     # 0x4504c
callq 0x7340
movl 0x4(%rsp), %esi
movq 0x308ef(%rip), %rdi     # 0x53fe8
callq 0x75d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0x98(%rsp), %rcx
movq 0x28(%rsp), %rax
addq %rcx, %rax
decq %rax
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rax
addl %ecx, %eax
decl %eax
movl %eax, 0x8(%rsp)
movq (%r15), %r15
cmpq %r13, %r15
movq 0x1d0(%rsp), %rbp
jne 0x23376
jmp 0x239f5
movq %r14, %rax
notq %rax
addq 0x28(%rsp), %rax
movq %rax, 0x170(%rsp)
movslq %eax, %rbx
movq %rbx, %rdi
callq 0x7430
movq %rax, %rdi
testl %ebx, %ebx
leaq 0x21470(%rip), %rbp     # 0x44c00
jle 0x237c5
movq 0x58(%rsp), %rax
movq (%rax), %rax
addq %r14, %rax
incq %rax
movq 0x170(%rsp), %rcx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
xorl %edx, %edx
movsbq (%rax,%rdx), %rsi
movb (%rsi,%rbp), %sil
movb %sil, (%rdi,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x237b0
movq %rdi, 0x178(%rsp)
movl %r13d, %r14d
notl %r14d
addl 0x50(%rsp), %r14d
movslq %r14d, %rbx
movq %rbx, %rdi
callq 0x7430
movq %rax, %r12
testl %ebx, %ebx
jle 0x23812
movq 0x60(%rsp), %rax
movq (%rax), %rcx
movl %r14d, %eax
addq %r13, %rcx
incq %rcx
xorl %edx, %edx
movsbq (%rcx,%rdx), %rsi
movb (%rsi,%rbp), %sil
movb %sil, (%r12,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0x237fd
movl %r14d, 0x10c(%rsp)
movl %r14d, %eax
movq 0x170(%rsp), %r13
subl %r13d, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movq 0x48(%rsp), %rax
addl %ecx, %eax
movq 0x1d0(%rsp), %rsi
movl 0x90(%rsi), %edx
cmpl %edx, %eax
cmovll %eax, %edx
cvtsi2sd %ecx, %xmm0
mulsd 0x30(%rsi), %xmm0
cvttsd2si %xmm0, %ebp
addl %ecx, %ebp
cmpl %ebp, %edx
cmovgl %edx, %ebp
cmpl $0x1, 0x78(%rsi)
movq 0x10(%rsp), %r14
jle 0x238bc
movl $0x4, %edx
movq 0x30774(%rip), %rdi     # 0x53fe8
leaq 0x217cc(%rip), %rsi     # 0x45047
callq 0x7340
movl %ebp, %esi
imull %r13d, %esi
movq 0x3075b(%rip), %rdi     # 0x53fe8
callq 0x75d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0x1d0(%rsp), %rax
cmpl $0x7, 0x78(%rax)
jl 0x23978
movl $0x19, %edx
movq 0x3070e(%rip), %rdi     # 0x53fe8
leaq 0x21477(%rip), %rsi     # 0x44d58
callq 0x7340
movl 0x8(%rsp), %eax
movq 0x50(%rsp), %rcx
movl %ecx, %esi
subl %eax, %esi
incl %esi
movq 0x306ec(%rip), %rdi     # 0x53fe8
callq 0x75d0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x1d528(%rip), %rsi     # 0x40e3b
callq 0x7340
movq 0x28(%rsp), %rsi
subq 0x30(%rsp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x72a0
movq %rax, %rbx
movl $0xa, %edx
movq %rax, %rdi
leaq 0x21433(%rip), %rsi     # 0x44d72
callq 0x7340
movq %rbx, %rdi
movl %ebp, %esi
callq 0x75d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
xorl %eax, %eax
movq 0x1d0(%rsp), %rcx
subl 0x8(%rcx), %eax
xorl %r10d, %r10d
subl 0xc(%rcx), %r10d
subq $0x8, %rsp
movl 0x114(%rsp), %edi
movq %r12, %rsi
movl %r13d, %edx
movq 0x180(%rsp), %rcx
movl $0x5, %r8d
movq 0x190(%rsp), %r9
pushq %rbp
pushq %r10
pushq %rax
callq 0x8649
addq $0x20, %rsp
addl %eax, 0x4(%rsp)
movq %r12, %rdi
callq 0x7380
movq 0x178(%rsp), %rdi
callq 0x7380
leaq 0x78(%rsp), %r13
jmp 0x236c8
movq 0x1d0(%rsp), %rsi
movq 0x68(%rsp), %rcx
jmp 0x23ec3
movl 0x8(%rsp), %eax
notl %eax
movq 0x60(%rsp), %rsi
addl 0x8(%rsi), %eax
cmpl %eax, 0xc(%rsp)
jle 0x23a80
subq $0x8, %rsp
movq 0x60(%rsp), %rdi
leaq 0x10(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq 0x1e8(%rsp), %r8
movq %rbp, %r9
pushq 0x98(%rsp)
pushq 0x50(%rsp)
leaq 0x1c(%rsp), %rax
pushq %rax
callq 0x2c087
addq $0x20, %rsp
subq $0x8, %rsp
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
leaq 0x14(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq 0x1e0(%rsp), %r8
movq %rbp, %r9
pushq 0x170(%rsp)
pushq 0x50(%rsp)
leaq 0x1c(%rsp), %rax
pushq %rax
callq 0x2bb9d
addq $0x20, %rsp
jmp 0x23af5
subq $0x8, %rsp
movq 0x60(%rsp), %rdi
leaq 0x14(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq 0x1e0(%rsp), %r8
movq %rbp, %r9
pushq 0x170(%rsp)
pushq 0x50(%rsp)
leaq 0x1c(%rsp), %rax
pushq %rax
callq 0x2bb9d
addq $0x20, %rsp
subq $0x8, %rsp
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq 0x1e8(%rsp), %r8
movq %rbp, %r9
pushq 0x98(%rsp)
pushq 0x50(%rsp)
leaq 0x1c(%rsp), %rax
pushq %rax
callq 0x2c087
addq $0x20, %rsp
cmpl $0x5, 0x78(%rbp)
jl 0x23b4e
movl $0x25, %edx
movq 0x304e1(%rip), %rdi     # 0x53fe8
leaq 0x2154b(%rip), %rsi     # 0x45059
callq 0x7340
movq 0x18(%rsp), %rsi
movq 0x304c9(%rip), %rdi     # 0x53fe8
callq 0x72a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movl 0x4(%rsp), %ecx
movl 0x24(%rsp), %eax
cmpl %ecx, %eax
cmovlel %ecx, %eax
movl %eax, 0x24(%rsp)
movl 0x78(%rbp), %eax
cmpl 0x3c(%rsp), %ecx
jge 0x23bc8
cmpl $0x2, %eax
jl 0x23dff
movl $0x6, %edx
movq 0x3046b(%rip), %rdi     # 0x53fe8
leaq 0x21504(%rip), %rsi     # 0x45088
callq 0x7340
movl 0x4(%rsp), %esi
movq 0x30454(%rip), %rdi     # 0x53fe8
callq 0x75d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
jmp 0x23dff
cmpl $0x2, %eax
jl 0x23c1f
movl $0x8, %edx
movq 0x3040f(%rip), %rdi     # 0x53fe8
leaq 0x2149f(%rip), %rsi     # 0x4507f
callq 0x7340
movl 0x4(%rsp), %esi
movq 0x303f8(%rip), %rdi     # 0x53fe8
callq 0x75d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0xe0(%rsp), %rax
movq 0xe8(%rsp), %rcx
subq %rax, %rcx
je 0x23c96
sarq $0x2, %rcx
movl 0x4(%rsp), %edx
movq 0x110(%rsp), %rsi
movq 0x18(%rsp), %rdi
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
cmpl %edx, (%rax,%r8,4)
jl 0x23c84
movq (%rsi,%r8,8), %r10
subq %rdi, %r10
movq %r10, %r11
negq %r11
cmovsq %r10, %r11
cmpq 0x190(%rsp), %r11
movzbl %r9b, %r9d
movl $0x1, %r10d
cmovll %r10d, %r9d
incq %r8
cmpq %r8, %rcx
jne 0x23c57
testb $0x1, %r9b
jne 0x23dff
movl $0x100, %edi            # imm = 0x100
callq 0x72e0
movq 0x10(%rsp), %r14
movq %rax, %r15
movq %rax, %rdi
callq 0x2c5b6
movq %r15, 0x100(%rsp)
movq 0x18(%rsp), %rcx
movq %rcx, (%r15)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%r15)
movl 0xc(%rsp), %edx
movl %edx, 0x10(%r15)
movl 0x8(%rsp), %edx
movl %edx, 0x14(%r15)
movl 0x4(%rsp), %edx
movl %edx, 0x70(%r15)
cmpb $0x0, 0x1f0(%rsp)
jne 0x23cf0
orb $0x10, 0x40(%r15)
subl %ecx, %eax
incl %eax
movl %eax, 0x98(%r15)
movq 0x78(%rsp), %rbx
cmpq %r13, %rbx
je 0x23d4b
movq 0x10(%rbx), %rax
movq (%r14), %rcx
shlq $0x4, %rax
movq (%rcx,%rax), %rdx
movq %rdx, 0x150(%rsp)
movq 0x8(%rcx,%rax), %rax
movq %rax, 0x158(%rsp)
movq 0x100(%rsp), %rdi
movl $0xe8, %eax
addq %rax, %rdi
leaq 0x150(%rsp), %rsi
callq 0x2ba28
movq (%rbx), %rbx
jmp 0x23d00
movq 0x1e8(%rsp), %rcx
movq 0xb8(%rcx), %rsi
cmpq 0xc0(%rcx), %rsi
je 0x23d78
movq 0x100(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0xb8(%rcx)
jmp 0x23d8d
movq 0x180(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0x309b8
movq 0xe8(%rsp), %rsi
cmpq 0xf0(%rsp), %rsi
je 0x23db3
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xe8(%rsp)
jmp 0x23dc5
leaq 0xe0(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x30ad8
movq 0x118(%rsp), %rsi
cmpq 0x120(%rsp), %rsi
je 0x23ded
movq 0x18(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x118(%rsp)
jmp 0x23dff
leaq 0x110(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x17764
cmpl $0x5, 0x78(%rbp)
jl 0x23e57
movl $0xf, %edx
movq 0x301d7(%rip), %rdi     # 0x53fe8
leaq 0x21277(%rip), %rsi     # 0x4508f
callq 0x7340
movl 0x4(%rsp), %esi
movq 0x301c0(%rip), %rdi     # 0x53fe8
callq 0x75d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
movl 0xc(%rsp), %edx
movl 0x8(%rsp), %esi
movq %rax, 0x150(%rsp)
movq %rcx, 0x158(%rsp)
movl %edx, 0x160(%rsp)
movl %esi, 0x164(%rsp)
movq 0xa8(%rsp), %rsi
cmpq 0xb0(%rsp), %rsi
je 0x23ed5
movq 0x160(%rsp), %rax
movq %rax, 0x10(%rsi)
movupd 0x150(%rsp), %xmm0
movupd %xmm0, (%rsi)
addq $0x18, 0xa8(%rsp)
movq 0x68(%rsp), %rcx
movq %rbp, %rsi
leaq -0x1(%rcx), %rax
testq %rcx, %rcx
movq %rax, %rcx
jg 0x22dc7
jmp 0x23ef1
leaq 0xa0(%rsp), %rdi
leaq 0x150(%rsp), %rdx
callq 0x30bb4
movq 0x68(%rsp), %rcx
jmp 0x23ec0
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x23f0e
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0x23f2b
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x23f48
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x23f8d
movq 0x148(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
xorl %eax, %eax
movq %rax, 0x128(%rsp)
movl %eax, 0x130(%rsp)
movq %rax, 0x138(%rsp)
movl %eax, 0x140(%rsp)
movq %rax, 0x148(%rsp)
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x23faa
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x23fc9
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x72f0
movq %rbx, %rdi
cmpq %r13, %rbx
jne 0x23fb4
movl 0x24(%rsp), %ecx
cmpl 0x3c(%rsp), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovgel %ecx, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
callq 0x72f0
jmp 0x2402b
jmp 0x24028
jmp 0x2400d
movq %rax, %r14
jmp 0x240c7
jmp 0x2400d
jmp 0x24028
movq %rax, %r14
jmp 0x24082
jmp 0x24028
jmp 0x24028
movq %rax, %r14
leaq 0x78(%rsp), %r13
jmp 0x2402b
jmp 0x24028
jmp 0x24028
jmp 0x24028
jmp 0x24028
movq %rax, %r14
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x24048
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0x24065
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x24082
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x240c7
movq 0x148(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
xorl %eax, %eax
movq %rax, 0x128(%rsp)
movl %eax, 0x130(%rsp)
movq %rax, 0x138(%rsp)
movl %eax, 0x140(%rsp)
movq %rax, 0x148(%rsp)
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x240e4
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x72f0
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x24103
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x72f0
movq %rbx, %rdi
cmpq %r13, %rbx
jne 0x240ee
movq %r14, %rdi
callq 0x7600