// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Correct.cpp
// Function: rphase_hc(overlap_region_alloc*, All_reads*, haplotype_evdience_alloc*, UC_Read*, UC_Read*, kv_ul_ov_t*, asg64_v*, asg64_v*, long, long, long, unsigned char, unsigned long, unsigned long, unsigned long, Chain_Data*, asg8_v*, asg8_v*, unsigned char)
void rphase_hc(overlap_region_alloc* ol, All_reads *rref, haplotype_evdience_alloc* hp, UC_Read* qu, UC_Read* tu, kv_ul_ov_t *c_idx, asg64_v* idx, asg64_v* buf, int64_t bd, int64_t wl, int64_t ql, uint8_t occ_thres/**, uint8_t is_dbg**/, uint64_t rid, uint64_t hpc_len, uint64_t std_bs, Chain_Data *dp, asg8_v *q8, asg8_v *t8, uint8_t lindel)
{   
    int64_t on = ol->length, k, i, zwn, q[2]; 
    uint64_t m, l0, wi, wl0, si, ei, fi; overlap_region *z; ul_ov_t *cp;
    kv_resize(uint64_t, *idx, (ol->length)); 
    kv_resize(ul_ov_t, *c_idx, ol->length);

    for (k = idx->n = c_idx->n = 0; k < on; k++) {
        z = &(ol->list[k]); zwn = z->w_list.n; 
        if(!zwn) continue;
        for (i = 0; i < zwn; i++) {
            if(is_ualn_win(z->w_list.a[i])) continue;
            q[0] = z->w_list.a[i].x_start; q[1] = z->w_list.a[i].x_end;
            q[0] += bd; q[1] -= bd;
            if(q[1] >= q[0]) {
                m = ((uint64_t)q[0]); m <<= 32; 
                m += c_idx->n; kv_push(uint64_t, *idx, m);

                kv_pushp(ul_ov_t, *c_idx, &cp);
                ovlp_id(*cp) = k; ///ovlp id
                ovlp_cur_wid(*cp) = i; ///cur id of windows
                ovlp_cur_xoff(*cp) = z->w_list.a[i].x_start; ///cur xpos
                ovlp_cur_yoff(*cp) = z->w_list.a[i].y_start; ///cur xpos
                ovlp_cur_ylen(*cp) = 0;
                ovlp_cur_coff(*cp) = 0; ///cur cigar off in cur window
                ovlp_bd(*cp) = bd;
            }
        }
    }

    int64_t srt_n = idx->n, s, e, t, os, oe, rm_n, rr; i = 0;
    radix_sort_bc64(idx->a, idx->a+idx->n);
    for (k = 1, i = 0; k <= srt_n; k++) {
        if (k == srt_n || (idx->a[k]>>32) != (idx->a[i]>>32)) {
            if(k - i > 1) {
                for (t = i; t < k; t++) {
                    cp = &(c_idx->a[(uint32_t)idx->a[t]]);
                    // s = ol->list[ovlp_id(*cp)].w_list.a[ovlp_cur_wid(*cp)].x_start+ovlp_bd(*cp);
                    // assert(s == (int64_t)(idx->a[i]>>32));
                    m = ol->list[ovlp_id(*cp)].w_list.a[ovlp_cur_wid(*cp)].x_end+1-ovlp_bd(*cp);
                    m <<= 32; m += ((uint32_t)idx->a[t]); idx->a[t] = m;
                    // fprintf(stderr, "[M::%s] s::%ld\tsi::%lu\n", __func__, s, (idx->a[i]>>32));
                }
                radix_sort_bc64(idx->a + i, idx->a + k);
            }
            i = k;
        }
    }
    
    ResizeInitHaplotypeEvdience(hp);
    i = 0; s = 0; e = wl; e = ((e<=ql)?e:ql); rr = 0;
    for (; s < ql; ) {
        if(rr) {
            // rr = 0;
            for (m = rm_n = srt_n; m < idx->n; m++) {
                cp = &(c_idx->a[idx->a[m]]);
                q[0] = ol->list[ovlp_id(*cp)].w_list.a[ovlp_cur_wid(*cp)].x_start+ovlp_bd(*cp);
                q[1] = ol->list[ovlp_id(*cp)].w_list.a[ovlp_cur_wid(*cp)].x_end+1-ovlp_bd(*cp);
                os = MAX(q[0], s); oe = MIN(q[1], e);
                if(oe > os) {
                    idx->a[rm_n++] = idx->a[m];
                    // if(q[1] <= e) rr = 1;
                }
            }
            idx->n = rm_n;
        }

        for (; i < srt_n; ++i) {
            cp = &(c_idx->a[(uint32_t)idx->a[i]]);
            q[0] = ol->list[ovlp_id(*cp)].w_list.a[ovlp_cur_wid(*cp)].x_start+ovlp_bd(*cp);
            q[1] = ol->list[ovlp_id(*cp)].w_list.a[ovlp_cur_wid(*cp)].x_end+1-ovlp_bd(*cp);
            if(q[0] >= e) break;
            os = MAX(q[0], s); oe = MIN(q[1], e);
            if(oe > os) {
                kv_push(uint64_t, *idx, ((uint32_t)idx->a[i]));
                // if(q[1] <= e) rr = 1;
            }
        }

        // fprintf(stderr, "[M::%s] s::%ld, e::%ld, srt_n::%ld, idx->n::%ld\n", __func__, s, e, srt_n, (int64_t)idx->n);
        // debug_inter(ol, c_idx, idx->a, srt_n, idx->a + srt_n, idx->n - srt_n, s, e);
        l0 = hp->length;
        // if(is_dbg) fprintf(stderr, "-1-[M::%s]\ts::%ld\te::%ld\n", __func__, s, e);
        rr = hc_phase_robust_rr(ol->list, rref, hp, qu->seq, qu->length, tu, idx->a + srt_n, idx->n - srt_n, s, e, c_idx->a, 1, occ_thres, hpc_len/**, is_dbg**/);
        for (wi = fi = ei = 0, si = ((uint64_t)-1), wl0 = e - s; wi < wl0; wi++) {
            if(hp->flag[wi] > 0) {
                if(hp->flag[wi] > occ_thres) {
                    fi = 1; hp->nn_snp++; hp->flag[wi] = 1;
                    if((hpc_len) && (hpc_mask_ff(qu->seq, qu->length, wi + s, hpc_len, HPC_RR, NULL, 0, 0, HPC_CC))) hp->flag[wi] = 3;
                    ei = wi + 1; if(si == ((uint64_t)-1)) si = wi;
                } else {
                    hp->flag[wi] = 0;
                }
            } 
        }

        if(fi) {
            // if(is_dbg) fprintf(stderr, "-2-[M::%s]\ts::%ld\te::%ld\n", __func__, s, e);
            rr = hc_phase_robust_rr(ol->list, rref, hp, qu->seq, qu->length, tu, idx->a + srt_n, idx->n - srt_n, s, e, c_idx->a, 0, occ_thres, hpc_len/**, is_dbg**/);
            if(hp->length > l0) radix_sort_haplotype_evdience_srt(hp->list + l0, hp->list + hp->length);
        }

        if(ei > si) memset(hp->flag + si, 0, (ei-si)*sizeof((*(hp->flag))));
        // if(is_dbg) fprintf(stderr, "-3-[M::%s]\ts::%ld\te::%ld\n", __func__, s, e);

        s += wl; e += wl; e = ((e<=ql)?e:ql);
    }

    // debug_snp_site(ol->list, rref, qu, hp->list, hp->length);


    SetSnpMatrix(hp, &(hp->nn_snp), &(ol->length), 0, NULL); 
    srt_n = hp->length; z = (((std_bs)||(t8))?(ol->list):(NULL));
    for (k = 1, i = t = 0; k <= srt_n; ++k) {  
        if (k == srt_n || hp->list[k].site != hp->list[i].site) {
            t += push_info(hp, hp->list+i, k-i, hp->list+t, z, t8, sc_wn);
            i = k;
        }
    }
    hp->length = t;

    if(!dp) {
        // generate_haplotypes_naive_advance(hap, overlap_list, NULL);
        generate_haplotypes_naive_HiFi(hp, ol, 0.04, qu, ((std_bs)?(0):(1)), ((std_bs)?(0.05):(0)), ((std_bs)?(2):((uint64_t)-1)));
        // generate_haplotypes_DP(hap, overlap_list, R_INF, g_read->length, force_repeat);
        // generate_haplotypes_naive(hap, overlap_list, R_INF, g_read->length, force_repeat);
    } else {
        gen_rphase_dp(hp, ol, qu, ((std_bs)?(0.05):(0)), ((std_bs)?(2):((uint64_t)-1)), dp, idx, buf, rid, q8);
        generate_haplotypes_naive_HiFi(hp, ol, 0.04, qu, ((std_bs)?(0):(1)), ((std_bs)?(0.05):(0)), ((std_bs)?(2):((uint64_t)-1)));
    }

    if(lindel) {
        if(rphase_lidel(ol, rref, hp, qu, tu, c_idx, idx, buf, bd, wl, ql, occ_thres, rid, hpc_len, std_bs)) {
            generate_haplotypes_sv(hp, ol, rid);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r8, 0x78(%rsp)
movq %rcx, 0x58(%rsp)
movq %rdx, %r15
movq %rsi, 0x70(%rsp)
movq %rdi, %rbp
movb 0x160(%rsp), %al
movb %al, 0x6(%rsp)
movq 0x158(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x150(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x148(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x140(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x138(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x130(%rsp), %rax
movq %rax, 0xa0(%rsp)
movb 0x128(%rsp), %al
movb %al, 0x7(%rsp)
movq 0x120(%rsp), %r14
movq 0x118(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x110(%rsp), %rbx
movq 0x108(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x100(%rsp), %r8
movq 0x10(%rdi), %rcx
movq %rcx, %rax
movq %rcx, 0x38(%rsp)
cmpq %rcx, 0x8(%r8)
movq %r9, 0x18(%rsp)
movq %r8, 0x10(%rsp)
jae 0x72b58
movq 0x38(%rsp), %rax
decq %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x10, %rcx
orq %rax, %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0x8(%r8)
movq 0x10(%r8), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %r9
movq %rax, 0x10(%r8)
movq 0x10(%rbp), %rax
cmpq %rax, 0x10(%r9)
jae 0x72bbe
decq %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x10, %rcx
orq %rax, %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0x10(%r9)
movq (%r9), %rdi
leaq (%rax,%rax,8), %rax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax), %rsi
incq %rsi
callq 0x2370
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %r9
movq %rax, (%r9)
xorl %eax, %eax
movq %rax, 0x8(%r9)
movq %rax, (%r8)
cmpq $0x0, 0x38(%rsp)
movq %r15, 0x20(%rsp)
movq %rbp, 0x28(%rsp)
movq %r14, 0x68(%rsp)
jle 0x72e6f
movl %ebx, %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, 0x30(%rsp)
xorl %edi, %edi
movq (%rbp), %rax
imulq $0xa8, %rdi, %rcx
movq 0x48(%rax,%rcx), %r12
testq %r12, %r12
jle 0x72d4c
leaq (%rax,%rcx), %r13
addq $0x48, %r13
xorl %r15d, %r15d
xorl %ebp, %ebp
movq %rdi, 0x8(%rsp)
movq 0x10(%r13), %rax
cmpw $0x7fff, 0x14(%rax,%r15) # imm = 0x7FFF
jne 0x72c3d
cmpl $0x0, 0x1c(%rax,%r15)
jne 0x72c3d
cmpw $0x0, 0x12(%rax,%r15)
js 0x72d3c
movslq (%rax,%r15), %r14
movslq 0x4(%rax,%r15), %rax
addq %rbx, %r14
subq %rbx, %rax
cmpq %r14, %rax
jl 0x72d3c
shlq $0x20, %r14
addq 0x8(%r9), %r14
movq (%r8), %rcx
movq 0x10(%r8), %rax
cmpq 0x8(%r8), %rcx
jne 0x72c9b
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r8)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %r9
movq %rax, 0x10(%r8)
movq (%r8), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%r8)
movq %r14, (%rax,%rcx,8)
movq (%r9), %rax
movq 0x8(%r9), %rcx
cmpq 0x10(%r9), %rcx
jne 0x72ceb
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rdx
movq %rdx, 0x10(%r9)
leaq (%rdx,%rdx,8), %rcx
leaq (%rcx,%rcx,2), %rsi
addq %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %r9
movq %rax, (%r9)
movq 0x8(%r9), %rcx
movq 0x8(%rsp), %rdi
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%r9)
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movl %edi, 0xc(%rax,%rdx)
movl %ebp, (%rax,%rdx)
movq 0x10(%r13), %rcx
movl (%rcx,%r15), %esi
movl %esi, 0x4(%rax,%rdx)
movl 0x8(%rcx,%r15), %ecx
movl %ecx, 0x10(%rax,%rdx)
xorl %ecx, %ecx
movl %ecx, 0x14(%rax,%rdx)
movl %ecx, 0x8(%rax,%rdx)
movl 0x18(%rax,%rdx), %ecx
movl $0xc0000000, %esi       # imm = 0xC0000000
andl %esi, %ecx
addl 0x30(%rsp), %ecx
movl %ecx, 0x18(%rax,%rdx)
incq %rbp
addq $0x20, %r15
cmpq %rbp, %r12
jne 0x72c1a
incq %rdi
cmpq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rbp
jne 0x72bef
movq (%r8), %rbx
movq 0x10(%r8), %rdi
leaq 0x10(%r8), %rax
movq %rax, 0x30(%rsp)
leaq (%rdi,%rbx,8), %rsi
callq 0x45373
testq %rbx, %rbx
movq %rbx, 0x8(%rsp)
jle 0x72e8e
movq %rbx, %rsi
movl $0x1, %ebx
xorl %eax, %eax
movl $0x3fffffff, %ebp       # imm = 0x3FFFFFFF
movq 0x20(%rsp), %r15
movq 0x68(%rsp), %r14
cmpq %rsi, %rbx
je 0x72dc2
movq 0x30(%rsp), %rcx
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rdx
xorq (%rcx,%rbx,8), %rdx
shrq $0x20, %rdx
jne 0x72dc2
movq %rax, %rcx
jmp 0x72e55
movq %rbx, %rdx
subq %rax, %rdx
movq %rbx, %rcx
cmpq $0x2, %rdx
jl 0x72e55
movq 0x30(%rsp), %rcx
movq (%rcx), %rcx
cmpq %rax, %rbx
jle 0x72e40
movq 0x18(%rsp), %rdx
movq (%rdx), %rdx
movq 0x28(%rsp), %rsi
movq (%rsi), %rsi
movq %rax, %rdi
movl (%rcx,%rdi,8), %r8d
leaq (%r8,%r8,8), %r9
leaq (%r9,%r9,2), %r9
addq %r8, %r9
movl (%rdx,%r9), %r8d
movl 0xc(%rdx,%r9), %r10d
imulq $0xa8, %r10, %r10
movq 0x58(%rsi,%r10), %r10
shlq $0x5, %r8
movl 0x4(%r10,%r8), %r8d
movl 0x18(%rdx,%r9), %r9d
andl %ebp, %r9d
negl %r9d
addl %r9d, %r8d
incl %r8d
movl %r8d, 0x4(%rcx,%rdi,8)
incq %rdi
cmpq %rdi, %rbx
jne 0x72df5
leaq (%rcx,%rax,8), %rdi
leaq (%rcx,%rbx,8), %rsi
callq 0x45373
movq %rbx, %rcx
movq 0x8(%rsp), %rsi
leaq 0x1(%rbx), %rdx
movq %rcx, %rax
cmpq %rsi, %rbx
movq %rdx, %rbx
jne 0x72d9f
movq 0x28(%rsp), %rbp
jmp 0x72e98
leaq 0x10(%r8), %rax
movq %rax, 0x30(%rsp)
movq (%rax), %rdi
movq %rdi, %rsi
callq 0x45373
movq $0x0, 0x8(%rsp)
jmp 0x72e98
movq 0x20(%rsp), %r15
movq 0x68(%rsp), %r14
xorl %eax, %eax
movl %eax, 0x230(%r15)
movq %rax, 0x220(%r15)
movl %eax, 0x10(%r15)
movq %rax, 0x8(%r15)
leaq 0x18(%r15), %r13
movl $0x1ac, %edx            # imm = 0x1AC
movq %r13, %rdi
xorl %esi, %esi
callq 0x20e0
testq %r14, %r14
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r9
jle 0x7339c
movq 0x98(%rsp), %rax
cmpq %r14, %rax
movq %r14, %rbx
cmovlq %rax, %rbx
movq $0x0, 0x38(%rsp)
xorl %esi, %esi
xorl %r14d, %r14d
xorl %r12d, %r12d
movq 0x8(%rsp), %r11
testq %rsi, %rsi
je 0x72fc7
movq (%r9), %rax
movq %r11, %rcx
cmpq %rax, %r11
jae 0x72fb0
movq 0x18(%rsp), %rcx
movq (%rcx), %rdx
movq 0x30(%rsp), %rcx
movq (%rcx), %rsi
movq 0x28(%rsp), %rcx
movq (%rcx), %rdi
movq 0x8(%rsp), %r8
movq %r8, %rcx
movq (%rsi,%r8,8), %r9
leaq (%r9,%r9,8), %r10
leaq (%r10,%r10,2), %r10
addq %r9, %r10
movl (%rdx,%r10), %r11d
movl 0xc(%rdx,%r10), %r15d
imulq $0xa8, %r15, %r15
movq 0x58(%rdi,%r15), %r15
shlq $0x5, %r11
movslq (%r15,%r11), %rbp
movl 0x18(%rdx,%r10), %r10d
andl $0x3fffffff, %r10d      # imm = 0x3FFFFFFF
addq %r10, %rbp
movl 0x4(%r15,%r11), %r11d
subl %r10d, %r11d
incl %r11d
movslq %r11d, %r10
cmpq %rbp, %r14
cmovgq %r14, %rbp
cmpq %r10, %rbx
cmovlq %rbx, %r10
cmpq %rbp, %r10
jle 0x72fa3
movq %r9, (%rsi,%rcx,8)
incq %rcx
movq 0x10(%rsp), %r9
movq (%r9), %rax
jmp 0x72fa8
movq 0x10(%rsp), %r9
incq %r8
cmpq %rax, %r8
jb 0x72f36
movq %rcx, (%r9)
movq 0x20(%rsp), %r15
movq 0x28(%rsp), %rbp
movq 0x18(%rsp), %r10
movq 0x8(%rsp), %r11
movq 0x30(%rsp), %rax
movq (%rax), %rax
cmpq %r11, %r12
jge 0x7309b
movq (%r10), %rdi
movl (%rax,%r12,8), %ecx
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %r8
addq %rcx, %r8
movq (%rbp), %rcx
movl (%rdi,%r8), %edx
movl 0xc(%rdi,%r8), %esi
imulq $0xa8, %rsi, %rsi
movq 0x58(%rcx,%rsi), %rsi
shlq $0x5, %rdx
movslq (%rsi,%rdx), %rcx
movl 0x18(%rdi,%r8), %edi
andl $0x3fffffff, %edi       # imm = 0x3FFFFFFF
addq %rdi, %rcx
cmpq %rcx, %rbx
jle 0x7309b
addq %rdx, %rsi
movl 0x4(%rsi), %edx
subl %edi, %edx
incl %edx
movslq %edx, %rdx
cmpq %rcx, %r14
cmovgq %r14, %rcx
cmpq %rdx, %rbx
cmovlq %rbx, %rdx
cmpq %rcx, %rdx
jle 0x7308c
movq (%r9), %rcx
cmpq 0x8(%r9), %rcx
jne 0x7307d
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r9)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq 0x8(%rsp), %r11
movq 0x10(%rsp), %r9
movq 0x18(%rsp), %r10
movq %rax, 0x10(%r9)
movq (%r9), %rcx
movl (%rax,%r12,8), %edx
leaq 0x1(%rcx), %rsi
movq %rsi, (%r9)
movq %rdx, (%rax,%rcx,8)
incq %r12
cmpq %r12, %r11
jne 0x72fd8
movq %r11, %r12
movl 0x10(%r15), %ecx
movq %rcx, 0xc0(%rsp)
movq (%rbp), %rdi
movq 0x58(%rsp), %rcx
movq (%rcx), %rcx
leaq (%rax,%r11,8), %rax
movq (%r9), %r8
subq %r11, %r8
movq 0x70(%rsp), %rsi
movq %r15, %rdx
movq 0x78(%rsp), %r9
pushq 0x40(%rsp)
pushq $0x0
pushq $0x1
pushq (%r10)
pushq %rbx
pushq %r14
pushq %r8
pushq %rax
callq 0x6e8bf
addq $0x40, %rsp
movq %rax, %rsi
cmpq %r14, %rbx
jne 0x73100
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r9
movq 0x8(%rsp), %r11
jmp 0x73301
movq 0x38(%rsp), %rcx
leaq (%rbx,%rcx), %rax
cmpq $0x1, %rax
movq %rbx, %r15
adcq %rcx, %r15
leaq -0x1(%r15), %rax
movq %rax, 0x48(%rsp)
negq %rcx
movq %rcx, 0xb8(%rsp)
movq $-0x1, %rdi
movb $0x1, %al
xorl %edx, %edx
movq 0x10(%rsp), %r9
movb 0x7(%rsp), %r8b
movq 0x8(%rsp), %r11
movq %rdx, %rbp
movq 0x18(%rsp), %r10
movb (%r13,%rbp), %cl
testb %cl, %cl
je 0x7315d
cmpb %r8b, %cl
ja 0x7316a
movb $0x0, (%r13,%rbp)
incq %rbp
cmpq %rbp, %r15
jne 0x73149
jmp 0x73228
movq 0x20(%rsp), %rax
incl 0x230(%rax)
movb $0x1, 0x18(%rax,%rbp)
cmpq $0x0, 0x40(%rsp)
je 0x731f8
movq 0x58(%rsp), %rax
movq %rdi, 0x50(%rsp)
movq (%rax), %rdi
movq %rsi, 0xb0(%rsp)
movq 0x8(%rax), %rsi
movq 0xb8(%rsp), %rax
leaq (%rax,%rbp), %rdx
subq $0x20, %rsp
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq $0x2, 0x10(%rsp)
movl $0x4, %r8d
movq 0x60(%rsp), %rcx
xorl %r9d, %r9d
callq 0x56a35
movq 0x70(%rsp), %rdi
movq 0xd0(%rsp), %rsi
movq 0x28(%rsp), %r11
movb 0x27(%rsp), %r8b
movq 0x30(%rsp), %r9
addq $0x20, %rsp
testb %al, %al
je 0x731f8
movb $0x3, (%r13,%rbp)
leaq 0x1(%rbp), %rdx
cmpq $-0x1, %rdi
cmoveq %rbp, %rdi
xorl %eax, %eax
cmpq %rbp, 0x48(%rsp)
jne 0x73141
incq %rbp
movq %rbp, %rdx
movq 0x20(%rsp), %r15
movq 0x28(%rsp), %rbp
movq 0x18(%rsp), %r10
jmp 0x7323a
testb $0x1, %al
movq 0x20(%rsp), %r15
movq 0x28(%rsp), %rbp
jne 0x732d8
movq %rdx, 0x48(%rsp)
movq %rdi, 0x50(%rsp)
movq (%rbp), %rdi
movq 0x58(%rsp), %rax
movq (%rax), %rcx
leaq (,%r11,8), %rax
addq 0x10(%r9), %rax
movq (%r9), %r8
subq %r11, %r8
movq 0x70(%rsp), %rsi
movq %r15, %rdx
movq 0x78(%rsp), %r9
pushq 0x40(%rsp)
pushq $0x0
pushq $0x0
pushq (%r10)
pushq %rbx
pushq %r14
pushq %r8
pushq %rax
callq 0x6e8bf
addq $0x40, %rsp
movq %rax, %rsi
movl 0x10(%r15), %eax
movq 0xc0(%rsp), %rdx
cmpl %edx, %eax
jbe 0x732bf
movq (%r15), %rcx
leaq (%rdx,%rdx,2), %rdx
leaq (%rcx,%rdx,8), %rdi
leaq (%rax,%rax,2), %rax
movq %rsi, %r15
leaq (%rcx,%rax,8), %rsi
callq 0x45630
movq %r15, %rsi
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r9
movq 0x8(%rsp), %r11
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rdx
subq %rdi, %rdx
jbe 0x73301
addq %r13, %rdi
movq %rsi, %r15
xorl %esi, %esi
callq 0x20e0
movq %r15, %rsi
movq 0x20(%rsp), %r15
movq 0x8(%rsp), %r11
movq 0x10(%rsp), %r9
movq 0x18(%rsp), %r10
movq 0x98(%rsp), %rcx
addq %rcx, %r14
addq %rcx, %rbx
movq 0x68(%rsp), %rax
cmpq %rax, %rbx
cmovgeq %rax, %rbx
subq %rcx, 0x38(%rsp)
cmpq %rax, %r14
jl 0x72efe
movl 0x230(%r15), %eax
cmpq %rax, 0x228(%r15)
jae 0x7339c
decq %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x10, %rcx
orq %rax, %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0x228(%r15)
movq 0x218(%r15), %rdi
leaq 0x8(,%rcx,8), %rax
leaq (%rax,%rax,4), %rsi
callq 0x2370
movq 0x10(%rsp), %r9
movq %rax, 0x218(%r15)
movq $0x0, 0x220(%r15)
movl 0x10(%rbp), %eax
movl %eax, 0x1c8(%r15)
movl $0x0, 0x1c4(%r15)
movl 0x10(%r15), %eax
xorl %r14d, %r14d
movq 0x60(%rsp), %rcx
orq 0x90(%rsp), %rcx
je 0x733d8
movq (%rbp), %rbx
jmp 0x733da
xorl %ebx, %ebx
testq %rax, %rax
je 0x73472
shlq $0x3, %rax
leaq (%rax,%rax,2), %r15
leaq (%rax,%rax,2), %r12
addq $-0x18, %r12
movl $0x1, %r13d
xorl %ebp, %ebp
xorl %r14d, %r14d
xorl %eax, %eax
movq 0x20(%rsp), %rcx
movq (%rcx), %rcx
cmpq %rbp, %r12
je 0x7341a
movl 0x18(%rcx,%rbp), %edx
leaq (%rax,%rax,2), %rsi
cmpl (%rcx,%rsi,8), %edx
je 0x7345c
leaq (%rax,%rax,2), %rdx
leaq (%rcx,%rdx,8), %rsi
movq %r13, %rdx
subq %rax, %rdx
leaq (%r14,%r14,2), %rax
leaq (%rcx,%rax,8), %rcx
subq $0x8, %rsp
movq 0x28(%rsp), %rdi
movq %rbx, %r8
movq 0x98(%rsp), %r9
pushq $0x5
callq 0x5716a
movq 0x20(%rsp), %r9
addq $0x10, %rsp
cltq
addq %rax, %r14
movq %r13, %rax
incq %r13
addq $0x18, %rbp
cmpq %rbp, %r15
jne 0x73400
movq 0x20(%rsp), %r15
movq 0x28(%rsp), %rbp
movl %r14d, 0x10(%r15)
cmpq $0x0, 0x88(%rsp)
je 0x73493
xorl %ebx, %ebx
cmpq $0x0, 0x60(%rsp)
sete %al
jne 0x734a5
xorps %xmm0, %xmm0
jmp 0x734ad
xorl %ecx, %ecx
cmpq $0x0, 0x60(%rsp)
sete %cl
jne 0x73517
xorps %xmm1, %xmm1
jmp 0x7351f
movsd 0x1be11b(%rip), %xmm0   # 0x2315c8
movb %al, %bl
movq %rbx, %r14
negq %r14
orq $0x2, %r14
subq $0x8, %rsp
movq %r15, %rdi
movq %rbp, %rsi
movsd %xmm0, 0x10(%rsp)
movq %r14, %rcx
movq 0x90(%rsp), %r8
pushq 0xb0(%rsp)
pushq 0xb0(%rsp)
pushq 0x98(%rsp)
callq 0x54462
addq $0x20, %rsp
movsd 0x1be0ee(%rip), %xmm0   # 0x2315e8
movq %r15, %rdi
movq %rbp, %rsi
movq %rbx, %rcx
movsd 0x8(%rsp), %xmm1
movq %r14, %r8
callq 0x51d63
movb 0x6(%rsp), %bl
jmp 0x73540
movsd 0x1be0a9(%rip), %xmm1   # 0x2315c8
movb 0x6(%rsp), %bl
movq %rcx, %r8
negq %r8
orq $0x2, %r8
movsd 0x1be0b3(%rip), %xmm0   # 0x2315e8
movq %r15, %rdi
movq %rbp, %rsi
callq 0x51d63
testb %bl, %bl
movq 0x18(%rsp), %r9
je 0x735c0
subq $0x50, %rsp
movq 0x90(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rax
movq %rax, (%rsp)
movl $0x0, 0x28(%rsp)
movq %rbp, %rdi
movq 0xc0(%rsp), %rsi
movq %r15, %rdx
movq 0xa8(%rsp), %rcx
movq 0xc8(%rsp), %r8
callq 0x72731
addq $0x50, %rsp
testq %rax, %rax
je 0x735c0
movq %r15, %rdi
movq %rbp, %rsi
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x52af8
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq