// File: /workspace/github_cpp_makefile_star2_O3/readmapping[P]alfalfa/src/mapper.cpp
// Function: read_t::postprocess(sparseSA const&, align_opt const&, bool)
void read_t::postprocess(const sparseSA& sa, const align_opt & alnOptions, bool paired){
    //mapq independent from match/mismatch
    if(alnOptions.print >= 3) cerr << "postprocessing read ... " << endl;
    if(!alignments.empty()){
        //FIRST SORT
        if(!paired)
            sort(alignments.begin(),alignments.end(), compAlignments);
        else
            sort(alignments.begin(),alignments.end(), compPairedAlignments);
        int chainCount = 0;
        int maxDP = min((int)alignments.size(),alnOptions.alignmentCount);
        if(alnOptions.fullDP)
            maxDP = min((int)alignments.size(),max(4,alnOptions.alignmentCount));//TODO set parameter
        for(int j = 0; j < maxDP; j++){
            alignments[j]->setLocalPos(sa);
            if(!alignments[j]->chain.empty() && !alnOptions.fullDP){
                chainCount++;
                alignments[j]->constructCIGAR(sa.S, alignments[j]->flag.test(4) ? rcReadP : readP, 
                    sequence.length(), alnOptions.fixedBandSize, alnOptions.mat, 
                    alnOptions.match, alnOptions.openGap, alnOptions.extendGap, alnOptions.print);
            }
            else{
                //full dp version
                fullDP(sa.S, alignments[j]->flag.test(4) ? rcReadP : readP, sequence.size(), 
             alignments[j], alnOptions.fixedBandSize, alnOptions.mat, 
             alnOptions.match, alnOptions.openGap, alnOptions.extendGap, alnOptions.print);
            }
            if(alnOptions.print >= 3) cerr << "edit dist: " << alignments[j]->editDist << " and cigar " << alignments[j]->cigar << endl;
        }
        if(alnOptions.print >= 2){ 
            cerr << "#POSTPROCCHAIN " << chainCount << endl;
            cerr << "#POSTPROCFULL " << (min((int)alignments.size(),alnOptions.alignmentCount)-chainCount) << endl;
        }
        //SECOND SORT
        if(!paired)
            sort(alignments.begin(),alignments.end(), compAlignments);
        else
            sort(alignments.begin(),alignments.end(), compPairedAlignments);
        int maxScore = alignments[0]->alignmentScore + alignments[0]->mate.alignmentScore;
        int secBestScore = alignments.size() > 1 ? alignments[1]->alignmentScore + alignments[1]->mate.alignmentScore : alnOptions.mismatch*sequence.length();
        int mapq = (secBestScore == (int)(alnOptions.mismatch*sequence.length())) ? MAX_MAPQ :
            (int)(250*((double)(maxScore-secBestScore) / maxScore) + 0.499);
        mapq = maxScore == secBestScore ? 0 : mapq;
        mapq = min(max(0,mapq),MAX_MAPQ);
        if(alnOptions.print >= 2){ 
            cerr << "#MAPQ " << mapq << endl;
            cerr << "#POSTPROC " << min((int)alignments.size(),alnOptions.alignmentCount) << endl;
        }
        for(int j = 0; j < min((int)alignments.size(),alnOptions.alignmentCount); j++){
            if(alnOptions.print >= 3) cerr << "constructing cigar for alignment on " << alignments[j]->rname << " and pos " << alignments[j]->pos << endl;
            if(alignments[j]->alignmentScore + alignments[j]->mate.alignmentScore == maxScore)
                alignments[j]->mapq = mapq;
            else
                alignments[j]->flag.set(8,true);
        }
        
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
cmpl $0x3, 0x78(%rdx)
movq %rdi, 0x8(%rsp)
jl 0x20619
movq 0x33a0f(%rip), %r15     # 0x53fe8
leaq 0x247da(%rip), %rsi     # 0x44dba
movl $0x18, %edx
movq %r15, %rdi
callq 0x7340
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r15, %rdi
movq 0x8(%rsp), %rbx
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0xb0(%rbx), %r12
movq 0xb8(%rbx), %r15
cmpq %r15, %r12
je 0x21169
movq %r15, %rbx
subq %r12, %rbx
movq %rbx, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
leaq 0x8(%r12), %r13
testb %bpl, %bpl
movq %r14, 0x20(%rsp)
movl %ebp, 0x34(%rsp)
je 0x20766
leaq -0x2c9(%rip), %rcx      # 0x2039f
movq %r12, %rdi
movq %r15, %rsi
callq 0x2f69f
cmpq $0x81, %rbx
movq %r15, %rbx
jl 0x20834
movq %rbx, 0x28(%rsp)
movl $0x8, %r15d
movq %r13, %rbp
movq %r12, %r14
movq %r14, %rcx
leaq (%r12,%r15), %r14
movq (%r12,%r15), %rbx
movq (%r12), %rdx
movl 0xe0(%rbx), %eax
addl 0x70(%rbx), %eax
movl 0xe0(%rdx), %esi
addl 0x70(%rdx), %esi
cmpl %esi, %eax
jle 0x206cc
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x7570
movq %r12, %rdx
jmp 0x206fa
movq (%rcx), %rcx
movl 0xe0(%rcx), %esi
addl 0x70(%rcx), %esi
movq %r14, %rdx
cmpl %esi, %eax
jle 0x206fa
movq %rbp, %rdx
movq %rcx, (%rdx)
movq -0x10(%rdx), %rcx
movl 0xe0(%rcx), %esi
addl 0x70(%rcx), %esi
addq $-0x8, %rdx
cmpl %esi, %eax
jg 0x206e2
movq %rbx, (%rdx)
addq $0x8, %r15
addq $0x8, %rbp
cmpq $0x80, %r15
jne 0x20694
subq $-0x80, %r12
movq 0x28(%rsp), %r8
cmpq %r8, %r12
je 0x2091e
movq -0x8(%r12), %rcx
movq (%r12), %rax
movl 0xe0(%rax), %edx
addl 0x70(%rax), %edx
movl 0xe0(%rcx), %edi
addl 0x70(%rcx), %edi
movq %r12, %rsi
cmpl %edi, %edx
jle 0x2075d
movq %r12, %rsi
movq %rcx, (%rsi)
movq -0x10(%rsi), %rcx
movl 0xe0(%rcx), %edi
addl 0x70(%rcx), %edi
addq $-0x8, %rsi
cmpl %edi, %edx
jg 0x20745
movq %rax, (%rsi)
addq $0x8, %r12
jmp 0x20717
leaq -0x3d8(%rip), %rcx      # 0x20395
movq %r12, %rdi
movq %r15, %rsi
callq 0x2f69f
cmpq $0x81, %rbx
jl 0x208bc
movq %r15, 0x28(%rsp)
movl $0x8, %r15d
movq %r13, %r14
movq %r12, %rbp
movq %rbp, %rcx
leaq (%r12,%r15), %rbp
movq (%r12,%r15), %rbx
movq (%r12), %rdx
movl 0x70(%rbx), %eax
cmpl 0x70(%rdx), %eax
jle 0x207c0
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x7570
movq %r12, %rcx
jmp 0x207de
movq (%rcx), %rdx
movq %rbp, %rcx
cmpl 0x70(%rdx), %eax
jle 0x207de
movq %r14, %rcx
movq %rdx, (%rcx)
movq -0x10(%rcx), %rdx
addq $-0x8, %rcx
cmpl 0x70(%rdx), %eax
jg 0x207ce
movq %rbx, (%rcx)
addq $0x8, %r15
addq $0x8, %r14
cmpq $0x80, %r15
jne 0x20796
subq $-0x80, %r12
movq 0x28(%rsp), %rdi
cmpq %rdi, %r12
je 0x2091e
movq -0x8(%r12), %rcx
movq (%r12), %rax
movl 0x70(%rax), %edx
movq %r12, %rsi
cmpl 0x70(%rcx), %edx
jle 0x2082b
movq %r12, %rsi
movq %rcx, (%rsi)
movq -0x10(%rsi), %rcx
addq $-0x8, %rsi
cmpl 0x70(%rcx), %edx
jg 0x2081b
movq %rax, (%rsi)
addq $0x8, %r12
jmp 0x207fb
cmpq %rbx, %r13
je 0x2091e
movq %r12, %r15
movq %r15, %rdi
movq %r13, %r15
movq (%r13), %r14
movq (%r12), %rcx
movl 0xe0(%r14), %eax
addl 0x70(%r14), %eax
movl 0xe0(%rcx), %edx
addl 0x70(%rcx), %edx
cmpl %edx, %eax
jle 0x20880
movq %r15, %rdx
subq %r12, %rdx
subq %rdx, %rdi
addq $0x10, %rdi
movq %r12, %rsi
callq 0x7570
movq %r12, %rdx
jmp 0x208ae
movq (%rdi), %rcx
movl 0xe0(%rcx), %esi
addl 0x70(%rcx), %esi
movq %r15, %rdx
cmpl %esi, %eax
jle 0x208ae
movq %r15, %rdx
movq %rcx, (%rdx)
movq -0x10(%rdx), %rcx
movl 0xe0(%rcx), %esi
addl 0x70(%rcx), %esi
addq $-0x8, %rdx
cmpl %esi, %eax
jg 0x20896
movq %r14, (%rdx)
leaq 0x8(%r15), %r13
cmpq %rbx, %r13
jne 0x20840
jmp 0x2091e
cmpq %r15, %r13
je 0x2091e
movq %r12, %r14
movq %r14, %rdi
movq %r13, %r14
movq (%r13), %rbx
movq (%r12), %rcx
movl 0x70(%rbx), %eax
cmpl 0x70(%rcx), %eax
jle 0x208f4
movq %r14, %rdx
subq %r12, %rdx
subq %rdx, %rdi
addq $0x10, %rdi
movq %r12, %rsi
callq 0x7570
movq %r12, %rcx
jmp 0x20912
movq (%rdi), %rdx
movq %r14, %rcx
cmpl 0x70(%rdx), %eax
jle 0x20912
movq %r14, %rcx
movq %rdx, (%rcx)
movq -0x10(%rcx), %rdx
addq $-0x8, %rcx
cmpl 0x70(%rdx), %eax
jg 0x20902
movq %rbx, (%rcx)
leaq 0x8(%r14), %r13
cmpq %r15, %r13
jne 0x208c4
movq 0x8(%rsp), %r15
movq 0xb8(%r15), %rax
subq 0xb0(%r15), %rax
shrq $0x3, %rax
movq 0x20(%rsp), %r14
movl 0x50(%r14), %edx
cmpl %eax, %edx
movl %eax, %ecx
cmovll %edx, %ecx
cmpb $0x1, 0x73(%r14)
jne 0x2095c
cmpl $0x5, %edx
movl $0x4, %ecx
cmovgel %edx, %ecx
cmpl %eax, %ecx
cmovgel %eax, %ecx
testl %ecx, %ecx
jle 0x20afc
movq 0x10(%rsp), %rax
leaq 0x50(%rax), %r13
leaq 0x10(%r14), %rbp
movl %ecx, %eax
movq %rax, 0x28(%rsp)
xorl %r12d, %r12d
movl $0x0, 0x1c(%rsp)
movq 0xb0(%r15), %rax
movq (%rax,%r12,8), %rdi
movq 0x10(%rsp), %rsi
callq 0x2b7b8
movq 0xb0(%r15), %rax
movq (%rax,%r12,8), %rcx
movq 0xe8(%rcx), %rax
cmpq 0xf0(%rcx), %rax
je 0x209ba
cmpb $0x0, 0x73(%r14)
je 0x209f7
movl 0x40(%rcx), %eax
andl $0x10, %eax
shrl %eax
movq 0xa0(%r15,%rax), %rsi
movl 0x28(%r15), %edx
movl 0x90(%r14), %r8d
movl (%r14), %eax
movl 0x8(%r14), %r10d
movl 0xc(%r14), %r11d
movl 0x78(%r14), %ebx
movq %r13, %rdi
movq %rbp, %r9
pushq %rbx
pushq %r11
pushq %r10
pushq %rax
callq 0x203b7
jmp 0x20a46
incl 0x1c(%rsp)
movl 0x40(%rcx), %eax
andl $0x10, %eax
shrl %eax
movq 0xa0(%r15,%rax), %rdx
movl 0x28(%r15), %eax
movl 0x90(%r14), %r8d
movl (%r14), %r10d
movl 0x8(%r14), %r11d
movl 0xc(%r14), %ebx
movq 0x20(%rsp), %rsi
movl 0x78(%rsi), %r14d
movq %rcx, %rdi
movq %r13, %rsi
movl %eax, %ecx
movq %rbp, %r9
pushq %r14
movq 0x28(%rsp), %r14
pushq %rbx
pushq %r11
pushq %r10
callq 0x1f386
addq $0x20, %rsp
cmpl $0x3, 0x78(%r14)
jl 0x20aec
movl $0xb, %edx
movq 0x33587(%rip), %rbx     # 0x53fe8
movq %rbx, %rdi
leaq 0x24368(%rip), %rsi     # 0x44dd3
callq 0x7340
movq 0xb0(%r15), %rax
movq (%rax,%r12,8), %rax
movl 0x6c(%rax), %esi
movq %rbx, %rdi
callq 0x75d0
movq %rax, %r15
movl $0xb, %edx
movq %rax, %rdi
leaq 0x24347(%rip), %rsi     # 0x44ddf
callq 0x7340
movq 0x8(%rsp), %rax
movq 0xb0(%rax), %rax
movq (%rax,%r12,8), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
movq %r15, %rdi
callq 0x7340
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r15, %rdi
movq 0x8(%rsp), %r15
callq 0x7040
movq %rax, %rdi
callq 0x71d0
incq %r12
cmpq %r12, 0x28(%rsp)
jne 0x20983
jmp 0x20b04
movl $0x0, 0x1c(%rsp)
cmpl $0x1, 0x78(%r14)
jle 0x20bd4
movq 0x334d2(%rip), %r15     # 0x53fe8
leaq 0x242ce(%rip), %rsi     # 0x44deb
movl $0xf, %edx
movq %r15, %rdi
callq 0x7340
movq %r15, %rdi
movl 0x1c(%rsp), %ebx
movl %ebx, %esi
callq 0x75d0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r13, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
leaq 0x24292(%rip), %rsi     # 0x44dfb
movl $0xe, %edx
movq %r15, %rdi
callq 0x7340
movq 0x8(%rsp), %rax
movq 0xb8(%rax), %rsi
movq 0x8(%rsp), %rax
subq 0xb0(%rax), %rsi
shrq $0x3, %rsi
movl 0x50(%r14), %eax
cmpl %esi, %eax
cmovll %eax, %esi
subl %ebx, %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
movq 0x8(%rsp), %r15
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq %r15, %rax
movq 0xb0(%r15), %r15
movq 0xb8(%rax), %rbp
cmpb $0x0, 0x34(%rsp)
je 0x20d15
cmpq %rbp, %r15
je 0x20eee
movq %rbp, %rbx
subq %r15, %rbx
movq %rbx, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
leaq -0x87b(%rip), %rcx      # 0x2039f
movq %r15, %rdi
movq %rbp, %rsi
callq 0x2f69f
leaq 0x8(%r15), %r12
cmpq $0x81, %rbx
jl 0x20e06
movq %rbp, 0x10(%rsp)
movl $0x8, %ebp
movq %r12, %r13
movq %r15, %r14
movq %r14, %rcx
leaq (%r15,%rbp), %r14
movq (%r15,%rbp), %rbx
movq (%r15), %rdx
movl 0xe0(%rbx), %eax
addl 0x70(%rbx), %eax
movl 0xe0(%rdx), %esi
addl 0x70(%rdx), %esi
cmpl %esi, %eax
jle 0x20c7d
movq %r12, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x7570
movq %r15, %rdx
jmp 0x20cab
movq (%rcx), %rcx
movl 0xe0(%rcx), %esi
addl 0x70(%rcx), %esi
movq %r14, %rdx
cmpl %esi, %eax
jle 0x20cab
movq %r13, %rdx
movq %rcx, (%rdx)
movq -0x10(%rdx), %rcx
movl 0xe0(%rcx), %esi
addl 0x70(%rcx), %esi
addq $-0x8, %rdx
cmpl %esi, %eax
jg 0x20c93
movq %rbx, (%rdx)
addq $0x8, %rbp
addq $0x8, %r13
cmpq $0x80, %rbp
jne 0x20c46
subq $-0x80, %r15
movq 0x10(%rsp), %r8
cmpq %r8, %r15
je 0x20eee
movq -0x8(%r15), %rcx
movq (%r15), %rax
movl 0xe0(%rax), %edx
addl 0x70(%rax), %edx
movl 0xe0(%rcx), %edi
addl 0x70(%rcx), %edi
movq %r15, %rsi
cmpl %edi, %edx
jle 0x20d0c
movq %r15, %rsi
movq %rcx, (%rsi)
movq -0x10(%rsi), %rcx
movl 0xe0(%rcx), %edi
addl 0x70(%rcx), %edi
addq $-0x8, %rsi
cmpl %edi, %edx
jg 0x20cf4
movq %rax, (%rsi)
addq $0x8, %r15
jmp 0x20cc8
cmpq %rbp, %r15
je 0x20eee
movq %rbp, %rbx
subq %r15, %rbx
movq %rbx, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
leaq -0x9aa(%rip), %rcx      # 0x20395
movq %r15, %rdi
movq %rbp, %rsi
callq 0x2f69f
leaq 0x8(%r15), %r13
cmpq $0x81, %rbx
jl 0x20e8d
movq %rbp, 0x10(%rsp)
movl $0x8, %ebp
movq %r13, %r14
movq %r15, %r12
movq %r12, %rcx
leaq (%r15,%rbp), %r12
movq (%r15,%rbp), %rbx
movq (%r15), %rdx
movl 0x70(%rbx), %eax
cmpl 0x70(%rdx), %eax
jle 0x20d94
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x7570
movq %r15, %rcx
jmp 0x20db2
movq (%rcx), %rdx
movq %r12, %rcx
cmpl 0x70(%rdx), %eax
jle 0x20db2
movq %r14, %rcx
movq %rdx, (%rcx)
movq -0x10(%rcx), %rdx
addq $-0x8, %rcx
cmpl 0x70(%rdx), %eax
jg 0x20da2
movq %rbx, (%rcx)
addq $0x8, %rbp
addq $0x8, %r14
cmpq $0x80, %rbp
jne 0x20d6b
subq $-0x80, %r15
movq 0x10(%rsp), %rdi
cmpq %rdi, %r15
je 0x20eee
movq -0x8(%r15), %rcx
movq (%r15), %rax
movl 0x70(%rax), %edx
movq %r15, %rsi
cmpl 0x70(%rcx), %edx
jle 0x20dfd
movq %r15, %rsi
movq %rcx, (%rsi)
movq -0x10(%rsi), %rcx
addq $-0x8, %rsi
cmpl 0x70(%rcx), %edx
jg 0x20ded
movq %rax, (%rsi)
addq $0x8, %r15
jmp 0x20dcf
cmpq %rbp, %r12
je 0x20eee
movq %r15, %r13
movq %r13, %rdi
movq %r12, %r13
movq (%r12), %r14
movq (%r15), %rcx
movl 0xe0(%r14), %eax
addl 0x70(%r14), %eax
movl 0xe0(%rcx), %edx
addl 0x70(%rcx), %edx
cmpl %edx, %eax
jle 0x20e51
movq %r13, %rdx
subq %r15, %rdx
subq %rdx, %rdi
addq $0x10, %rdi
movq %r15, %rsi
callq 0x7570
movq %r15, %rdx
jmp 0x20e7f
movq (%rdi), %rcx
movl 0xe0(%rcx), %esi
addl 0x70(%rcx), %esi
movq %r13, %rdx
cmpl %esi, %eax
jle 0x20e7f
movq %r13, %rdx
movq %rcx, (%rdx)
movq -0x10(%rdx), %rcx
movl 0xe0(%rcx), %esi
addl 0x70(%rcx), %esi
addq $-0x8, %rdx
cmpl %esi, %eax
jg 0x20e67
movq %r14, (%rdx)
leaq 0x8(%r13), %r12
cmpq %rbp, %r12
jne 0x20e12
jmp 0x20eee
cmpq %rbp, %r13
je 0x20eee
movq %r15, %r14
movq %r14, %rdi
movq %r13, %r14
movq (%r13), %rbx
movq (%r15), %rcx
movl 0x70(%rbx), %eax
cmpl 0x70(%rcx), %eax
jle 0x20ec4
movq %r14, %rdx
subq %r15, %rdx
subq %rdx, %rdi
addq $0x10, %rdi
movq %r15, %rsi
callq 0x7570
movq %r15, %rcx
jmp 0x20ee2
movq (%rdi), %rdx
movq %r14, %rcx
cmpl 0x70(%rdx), %eax
jle 0x20ee2
movq %r14, %rcx
movq %rdx, (%rcx)
movq -0x10(%rcx), %rdx
addq $-0x8, %rcx
cmpl 0x70(%rdx), %eax
jg 0x20ed2
movq %rbx, (%rcx)
leaq 0x8(%r14), %r13
cmpq %rbp, %r13
jne 0x20e95
movq 0x8(%rsp), %r8
movq 0xb0(%r8), %rax
movq 0xb8(%r8), %rcx
movq (%rax), %rdx
movl 0xe0(%rdx), %r13d
addl 0x70(%rdx), %r13d
subq %rax, %rcx
cmpq $0x8, %rcx
jbe 0x20f63
movq 0x8(%rax), %rsi
movl 0xe0(%rsi), %edx
addl 0x70(%rsi), %edx
movq 0x20(%rsp), %rbx
movl 0x4(%rbx), %edi
imull 0x28(%r8), %edi
movl $0x3c, %esi
cmpl %edi, %edx
je 0x20f75
movl %r13d, %esi
subl %edx, %esi
cvtsi2sd %esi, %xmm0
cvtsi2sd %r13d, %xmm1
divsd %xmm1, %xmm0
mulsd 0x23c1b(%rip), %xmm0    # 0x44b70
addsd 0x23c1b(%rip), %xmm0    # 0x44b78
cvttsd2si %xmm0, %esi
jmp 0x20f75
movq 0x20(%rsp), %rbx
movl 0x4(%rbx), %edx
imull 0x28(%r8), %edx
movl $0x3c, %esi
xorl %edi, %edi
testl %esi, %esi
cmovlel %edi, %esi
cmpl $0x3c, %esi
movl $0x3c, %r8d
cmovll %esi, %r8d
cmpl %edx, %r13d
cmovel %edi, %r8d
movl %r8d, 0x10(%rsp)
cmpl $0x2, 0x78(%rbx)
jl 0x21066
movq 0x33042(%rip), %r15     # 0x53fe8
leaq 0x23e5d(%rip), %rsi     # 0x44e0a
movl $0x6, %edx
movq %r15, %rdi
callq 0x7340
movq %r15, %rdi
movl 0x10(%rsp), %esi
callq 0x75d0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
leaq 0x23e1a(%rip), %rsi     # 0x44e11
movl $0xa, %edx
movq %r15, %rdi
callq 0x7340
movq 0x8(%rsp), %r14
movq 0xb8(%r14), %rsi
subq 0xb0(%r14), %rsi
shrq $0x3, %rsi
movl 0x50(%rbx), %eax
cmpl %esi, %eax
cmovll %eax, %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
movq 0xb0(%r14), %rax
movq 0xb8(%r14), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
movl 0x50(%rbx), %edx
cmpl %ecx, %edx
cmovll %edx, %ecx
testl %ecx, %ecx
jle 0x21169
xorl %ebp, %ebp
movq 0x32f65(%rip), %r15     # 0x53fe8
movq 0x8(%rsp), %r14
cmpl $0x3, 0x78(%rbx)
jl 0x21120
movl $0x24, %edx
movq %r15, %rdi
leaq 0x23d7b(%rip), %rsi     # 0x44e1c
callq 0x7340
movq 0xb0(%r14), %rax
movq (%rax,%rbp,8), %rax
movq 0x48(%rax), %rsi
movq 0x50(%rax), %rdx
movq %r15, %rdi
callq 0x7340
movq %rax, %r12
movl $0x9, %edx
movq %rax, %rdi
leaq 0x23d6e(%rip), %rsi     # 0x44e41
callq 0x7340
movq 0xb0(%r14), %rax
movq (%rax,%rbp,8), %rax
movq 0x18(%rax), %rsi
movq %r12, %rdi
callq 0x72a0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
movq 0xb0(%r14), %rax
movq (%rax,%rbp,8), %rcx
movl 0xe0(%rcx), %edx
addl 0x70(%rcx), %edx
cmpl %r13d, %edx
jne 0x2113b
movl 0x10(%rsp), %edx
movl %edx, 0x68(%rcx)
jmp 0x2113f
orb $0x1, 0x41(%rcx)
incq %rbp
movq 0x8(%rsp), %rcx
movq 0xb8(%rcx), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
movl 0x50(%rbx), %edx
cmpl %ecx, %edx
cmovll %edx, %ecx
movslq %ecx, %rcx
cmpq %rcx, %rbp
jl 0x21088
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq