// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Correct.cpp
// Function: rcall_lidel_variant(kv_ul_ov_t*, overlap_region_alloc*, haplotype_evdience_alloc*, asg64_v*, asg64_v*, unsigned long)
uint64_t rcall_lidel_variant(kv_ul_ov_t *cz, overlap_region_alloc *ol, haplotype_evdience_alloc *hp, asg64_v *idx, asg64_v *idz, uint64_t rid)
{
    // fprintf(stderr, "-0-[M::%s] %.*s\tis_match::%u\n", __func__, (int)Get_NAME_LENGTH(R_INF, ol->list[48].y_id), Get_NAME(R_INF, ol->list[48].y_id), ol->list[48].is_match); 

    uint64_t i, k, zi, zk, nec[2], p, pmm, pmn, bn0 = 0, *ia, in, sv_n = cz->n, svi_n = 0, ovn = 0, m, rm_n; /**overlap_region *z;**/ ul_ov_t ez, *cp;
    hp->length = hp->snp_stat.n = idx->n = idz->n = 0; 
    ///for debug indel
    // fprintf(stderr, "+[M::%s] sv_n::%lu\n", __func__, sv_n);
    for (k = 1, i = 0; k <= sv_n; k++) {
        // fprintf(stderr, "+[M::%s] i::%ld, k::%ld\n", __func__, i, k);
        if (k == sv_n || (cz->a[k].ts) != (cz->a[i].ts)) {
            ///calculate pos
            for (zi = i, nec[0] = nec[1] = 0, idx->n = bn0, pmm = ((uint64_t)-1), pmn = 0; zi < k; zi++) {
                // z = &(ol->list[cz->a[zi].tn]); 
                nec[cz->a[zi].el]++;
                p = cz->a[zi].qs; p <<= 32; p |= ((uint64_t)cz->a[zi].qe);
                kv_push(uint64_t, *idx, p);
                if(pmm == ((uint64_t)-1)) pmm = p;
                if(pmm == p) pmn++;
                // fprintf(stderr, "[M::%s] cid::%u\trid::%u\t%.*s\tq::[%u,%u)\terr::%u\n", __func__, cz->a[zi].ts, z->y_id, (int)Get_NAME_LENGTH(R_INF, z->y_id), Get_NAME(R_INF, z->y_id), cz->a[zi].qs, cz->a[zi].qe, cz->a[zi].qn);
            }
            if(nec[0] < nec[1]) {
                ///calculate pos
                if((pmn <= 0) || (pmn < (idx->n - bn0 - pmn))) {
                    ia = idx->a + bn0; in = idx->n - bn0;
                    if(k - i > 1) radix_sort_bc64(ia, ia + in);
                    for (zk = 1, zi = 0, pmm = ((uint64_t)-1), pmn = 0; zk <= in; zk++) {
                        if((zk == in) || (ia[zi] != ia[zk])) {
                            if((zk - zi) > pmn) {
                                pmn = zk - zi; pmm = ia[zi];
                            }
                            zi = zk;
                        }
                    }
                }

                ez.qs = pmm>>32; ez.qe = (uint32_t)pmm; ez.ts = i; ez.te = k; ez.qn = 0; ez.tn = cz->a[i].ts;
                ///calculate error
                for (zi = i, idx->n = bn0, pmm = ((uint64_t)-1), pmn = 0; zi < k; zi++) {
                    if((cz->a[zi].qs != ez.qs) || (cz->a[zi].qe != ez.qe)) continue;
                    kv_push(uint64_t, *idx, cz->a[zi].qn);
                    if(pmm == ((uint64_t)-1)) pmm = cz->a[zi].qn;
                    if(pmm == cz->a[zi].qn) pmn++;
                }
                if((pmn <= 0) || (pmn < (idx->n - bn0 - pmn))) {
                    ia = idx->a + bn0; in = idx->n - bn0;
                    if(k - i > 1) radix_sort_bc64(ia, ia + in);
                    for (zk = 1, zi = 0, pmm = ((uint64_t)-1), pmn = 0; zk <= in; zk++) {
                        if((zk == in) || (ia[zi] != ia[zk])) {
                            if((zk - zi) > pmn) {
                                pmn = zk - zi; pmm = ia[zi];
                            }
                            zi = zk;
                        }
                    }
                }
                ez.qn = pmm; kv_push(ul_ov_t, *cz, ez);
                
                // fprintf(stderr, "-[M::%s] nec[0]::%ld, nec[1]::%ld, pa::[%u, %u), err::%u\n\n", __func__, nec[0], nec[1], ez.qs, ez.qe, ez.qn);
            }
            
            i = k;
        }
    }
    // fprintf(stderr, "-1-[M::%s] %.*s\tis_match::%u\n", __func__, (int)Get_NAME_LENGTH(R_INF, ol->list[48].y_id), Get_NAME(R_INF, ol->list[48].y_id), ol->list[48].is_match); 

    svi_n = cz->n - sv_n; idx->n = 0;
    gen_ov_lidel_variant(cz, ol, idx, 0); 
    ovn = cz->n - sv_n - svi_n;
    // fprintf(stderr, "-2-[M::%s] %.*s\tis_match::%u\n", __func__, (int)Get_NAME_LENGTH(R_INF, ol->list[48].y_id), Get_NAME(R_INF, ol->list[48].y_id), ol->list[48].is_match); 
    // fprintf(stderr, "+[M::%s] sv_n::%lu, svi_n::%lu, ovn::%lu\n", __func__, sv_n, svi_n, ovn);

    ul_ov_t *sv = cz->a, *svi = cz->a + sv_n, *ov = cz->a + sv_n + svi_n; int64_t s, e, os, oe, q[2];
    radix_sort_ul_ov_srt_qs1(svi, svi + svi_n); 
    for (k = i = 0; k < svi_n; k++) {
        // fprintf(stderr, "\n-3-[M::%s] %.*s\tis_match::%u\n", __func__, (int)Get_NAME_LENGTH(R_INF, ol->list[48].y_id), Get_NAME(R_INF, ol->list[48].y_id), ol->list[48].is_match); 
        ///label matched overlaps
        s = svi[k].qs; e = svi[k].qe;
        for (p = svi[k].ts; p < svi[k].te; p++) {
            // z = &(ol->list[sv[p].tn]);
            // fprintf(stderr, "+++[M::%s] cid::%lu\tccid::%lu\trid::%u\t%.*s\tq::[%ld,%ld)\terr::%u\n", __func__, k, p - svi[k].ts, z->y_id, (int)Get_NAME_LENGTH(R_INF, z->y_id), Get_NAME(R_INF, z->y_id), s, e, sv[p].qn);
            assert(sv[p].ts == svi[k].tn);
            // if(!(ol->list[sv[p].tn].is_match == 1)) {
            //     fprintf(stderr, "+[M::%s] rid::%lu\toid::%u\tis_match::%u\n", __func__, rid, sv[p].tn, ol->list[sv[p].tn].is_match); 
            //     fprintf(stderr, "[M::%s] cid::%lu\tccid::%lu\trid::%u\t%.*s\tq::[%ld,%ld)\terr::%u\n", __func__, k, p - svi[k].ts, z->y_id, (int)Get_NAME_LENGTH(R_INF, z->y_id), Get_NAME(R_INF, z->y_id), s, e, sv[p].qn);
            // }
            assert(ol->list[sv[p].tn].is_match == 1);
            ol->list[sv[p].tn].is_match = 2;
        }

        ///filter out passed overlaps
        for (m = rm_n = ovn; m < idx->n; m++) {
            cp = &(ov[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);
            if(q[1] <= s) continue;
            idx->a[rm_n++] = idx->a[m];
        }
        idx->n = rm_n;

        ///push new overlaps
        for (; i < ovn; ++i) {
            cp = &(ov[(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]));
            }
        }

        push_idel_info(hp, s, e, svi[k].qn, ov, ovn, sv + svi[k].ts, svi[k].te - svi[k].ts, ol->list, idx->a + ovn, idx->n - ovn, rid, asm_opt.het_cov, asm_opt.hom_cov, asm_opt.polyploidy, 0.333333, 5);

        ///relabel matched overlaps
        for (p = svi[k].ts; p < svi[k].te; p++) {
            assert(ol->list[sv[p].tn].is_match == 2);
            ol->list[sv[p].tn].is_match = 1;
        }
        // fprintf(stderr, "-4-[M::%s] %.*s\tis_match::%u\n", __func__, (int)Get_NAME_LENGTH(R_INF, ol->list[48].y_id), Get_NAME(R_INF, ol->list[48].y_id), ol->list[48].is_match); 
    }

    return hp->length;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, %r9
movq %rsi, %r14
movq 0x8(%rdi), %r13
xorl %eax, %eax
movq %rax, (%r8)
movq %rax, (%rcx)
movq %rax, 0x220(%rdx)
movq %rdx, 0x98(%rsp)
movl $0x0, 0x10(%rdx)
testq %r13, %r13
movq %rcx, 0x60(%rsp)
movq %rsi, 0x80(%rsp)
je 0x72922
movl $0x1, %r11d
xorl %r12d, %r12d
movq %rdi, 0x58(%rsp)
movq %r13, 0x78(%rsp)
cmpq %r13, %r11
je 0x72542
movq (%rdi), %rax
leaq (%r11,%r11,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %r11, %rcx
movl 0x10(%rax,%rcx), %ecx
leaq (%r12,%r12,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %r12, %rdx
cmpl 0x10(%rax,%rdx), %ecx
je 0x72916
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movq $0x0, (%r9)
movq %r11, %rax
subq %r12, %rax
movq %rax, 0x68(%rsp)
movq %r11, 0x50(%rsp)
movq %r12, 0x70(%rsp)
jbe 0x72622
leaq (%r12,%r12,8), %rax
leaq (%rax,%rax,2), %rax
leaq (%r12,%rax), %r15
addq $0x4, %r15
movq $-0x1, %rbp
xorl %ebx, %ebx
movq (%rdi), %rax
movl 0x14(%rax,%r15), %ecx
shrl $0x1b, %ecx
andl $0x8, %ecx
incq 0xa0(%rsp,%rcx)
movl (%rax,%r15), %r14d
movl 0x4(%rax,%r15), %r13d
movq 0x8(%r9), %rax
cmpq %rax, (%r9)
jne 0x725e4
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x8(%r9)
movq 0x10(%r9), %rdi
shlq $0x3, %rsi
callq 0x2370
movq 0x50(%rsp), %r11
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %r9
movq %rax, 0x10(%r9)
shlq $0x20, %r14
orq %r14, %r13
movq (%r9), %rax
movq 0x10(%r9), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r9)
cmpq $-0x1, %rbp
cmoveq %r13, %rbp
movq %r13, (%rcx,%rax,8)
xorl %eax, %eax
cmpq %r13, %rbp
sete %al
addq %rax, %rbx
incq %r12
addq $0x1c, %r15
cmpq %r12, %r11
jne 0x72588
jmp 0x7262b
movq $-0x1, %rbp
xorl %ebx, %ebx
movq 0xa0(%rsp), %rcx
movq %r11, %r12
cmpq 0xa8(%rsp), %rcx
movq 0x80(%rsp), %r14
movq 0x78(%rsp), %r13
jae 0x72916
testq %rbx, %rbx
movq 0x70(%rsp), %r12
je 0x7266a
movq (%r9), %rax
subq %rbx, %rax
cmpq %rax, %rbx
jae 0x726fa
movq (%r9), %r15
movq 0x10(%r9), %rbx
cmpq $0x2, 0x68(%rsp)
jb 0x72694
leaq (%rbx,%r15,8), %rsi
movq %rbx, %rdi
callq 0x45d47
movq 0x50(%rsp), %r11
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %r9
testq %r15, %r15
je 0x726f3
leaq 0x1(%r15), %rax
cmpq $0x3, %rax
movl $0x2, %ecx
cmovbq %rcx, %rax
movq $-0x1, %rbp
movl $0x1, %ecx
xorl %esi, %esi
xorl %edx, %edx
cmpq %rcx, %r15
je 0x726ce
movq (%rbx,%rsi,8), %r8
cmpq (%rbx,%rcx,8), %r8
jne 0x726ce
movq %rsi, %r10
jmp 0x726e6
movq %rcx, %r8
subq %rsi, %r8
movq %rcx, %r10
cmpq %rdx, %r8
jbe 0x726e6
movq (%rbx,%rsi,8), %rbp
movq %r8, %rdx
movq %rcx, %r10
incq %rcx
movq %r10, %rsi
cmpq %rcx, %rax
jne 0x726ba
jmp 0x726fa
movq $-0x1, %rbp
movq %rbp, %r8
shrq $0x20, %r8
movq (%rdi), %rax
leaq (%r12,%r12,8), %rcx
leaq (%rcx,%rcx,2), %rbx
addq %r12, %rbx
movl 0x10(%rax,%rbx), %eax
movl %eax, 0x90(%rsp)
movq $0x0, (%r9)
movq %r11, %rax
subq %r12, %rax
movq %rax, 0x88(%rsp)
movq %r8, 0x68(%rsp)
jbe 0x727d6
movq %r12, %r15
movq $-0x1, %r12
xorl %r13d, %r13d
movq (%rdi), %rax
cmpl %r8d, 0x4(%rax,%rbx)
jne 0x727c4
cmpl %ebp, 0x8(%rax,%rbx)
jne 0x727c4
movq 0x8(%r9), %rax
cmpq %rax, (%r9)
jne 0x72799
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x8(%r9)
movq 0x10(%r9), %rdi
shlq $0x3, %rsi
callq 0x2370
movq 0x68(%rsp), %r8
movq 0x50(%rsp), %r11
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %r9
movq %rax, 0x10(%r9)
movq (%rdi), %rax
movl (%rax,%rbx), %eax
movq (%r9), %rcx
movq 0x10(%r9), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%r9)
movq %rax, (%rdx,%rcx,8)
cmpq $-0x1, %r12
cmoveq %rax, %r12
xorl %ecx, %ecx
cmpq %rax, %r12
sete %cl
addq %rcx, %r13
incq %r15
addq $0x1c, %rbx
cmpq %r15, %r11
jne 0x72747
jmp 0x727e0
movq $-0x1, %r12
xorl %r13d, %r13d
testq %r13, %r13
je 0x727f4
movq (%r9), %rax
subq %r13, %rax
cmpq %rax, %r13
jae 0x72887
movq (%r9), %r15
movq 0x10(%r9), %rbx
cmpq $0x2, 0x88(%rsp)
jb 0x72821
leaq (%rbx,%r15,8), %rsi
movq %rbx, %rdi
callq 0x45d47
movq 0x50(%rsp), %r11
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %r9
testq %r15, %r15
je 0x72880
leaq 0x1(%r15), %rax
cmpq $0x3, %rax
movl $0x2, %ecx
cmovbq %rcx, %rax
movq $-0x1, %r12
movl $0x1, %ecx
xorl %esi, %esi
xorl %edx, %edx
cmpq %rcx, %r15
je 0x7285b
movq (%rbx,%rsi,8), %r8
cmpq (%rbx,%rcx,8), %r8
jne 0x7285b
movq %rsi, %r10
jmp 0x72873
movq %rcx, %r8
subq %rsi, %r8
movq %rcx, %r10
cmpq %rdx, %r8
jbe 0x72873
movq (%rbx,%rsi,8), %r12
movq %r8, %rdx
movq %rcx, %r10
incq %rcx
movq %r10, %rsi
cmpq %rcx, %rax
jne 0x72847
jmp 0x72887
movq $-0x1, %r12
movq 0x10(%rdi), %rax
cmpq %rax, 0x8(%rdi)
jne 0x728ca
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x10(%rdi)
movq (%rdi), %rdi
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rsi
addq %rcx, %rsi
callq 0x2370
movq 0x50(%rsp), %r11
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %r9
movq %rax, (%rdi)
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rdi)
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movl %r12d, (%rax,%rdx)
movq 0x68(%rsp), %rcx
movl %ecx, 0x4(%rax,%rdx)
movl %ebp, 0x8(%rax,%rdx)
movl 0x90(%rsp), %ecx
movl %ecx, 0xc(%rax,%rdx)
movq 0x70(%rsp), %rcx
movl %ecx, 0x10(%rax,%rdx)
movl %r11d, 0x14(%rax,%rdx)
movq %r11, %r12
movq 0x78(%rsp), %r13
incq %r11
cmpq %r13, %r11
jbe 0x72516
movq 0x8(%rdi), %rbx
movq $0x0, (%r9)
movq %r14, %rsi
movq %r9, %rdx
xorl %ecx, %ecx
movq %rdi, %r15
callq 0x721f3
movq (%r15), %rcx
movq 0x8(%r15), %r12
leaq (,%r13,8), %rax
addq %r13, %rax
leaq (%rax,%rax,2), %rdi
addq %rcx, %rdi
addq %r13, %rdi
leaq (%rbx,%rbx,8), %rax
movq %r13, %r15
leaq (%rax,%rax,2), %r13
movq %rcx, 0x70(%rsp)
addq %rcx, %r13
addq %rbx, %r13
movq %rdi, 0x68(%rsp)
movq %r13, %rsi
callq 0x4751b
movq %rbx, %rax
subq %r15, %rax
movq %rax, 0x78(%rsp)
je 0x72c9b
subq %rbx, %r12
movq 0x70(%rsp), %rax
leaq 0x10(%rax), %rcx
movq %rcx, 0x88(%rsp)
addq $0xc, %rax
movq %rax, 0xb0(%rsp)
xorl %r15d, %r15d
xorl %r8d, %r8d
movq %r12, 0x90(%rsp)
leaq (%r8,%r8,8), %rax
leaq (%rax,%rax,2), %rcx
addq %r8, %rcx
movq 0x68(%rsp), %rdx
leaq (%rdx,%rcx), %rax
movq %rax, 0x50(%rsp)
movl 0x4(%rdx,%rcx), %ebp
movl 0x8(%rdx,%rcx), %ebx
movl 0x10(%rdx,%rcx), %eax
movl 0x14(%rdx,%rcx), %ecx
cmpl %ecx, %eax
movq 0x60(%rsp), %r11
jae 0x72a3e
movq 0x50(%rsp), %rdx
movl 0xc(%rdx), %edx
subq %rax, %rcx
leaq (%rax,%rax,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq 0x88(%rsp), %rax
addq %rsi, %rax
cmpl %edx, (%rax)
jne 0x72cf6
movq (%r14), %rsi
movl -0x4(%rax), %edi
imulq $0xa8, %rdi, %rdi
cmpb $0x1, 0x2c(%rsi,%rdi)
jne 0x72cb8
addq %rdi, %rsi
addq $0x2c, %rsi
movb $0x2, (%rsi)
addq $0x1c, %rax
decq %rcx
jne 0x72a0b
movq %r8, 0x58(%rsp)
movq %r12, %rax
cmpq (%r11), %r12
jae 0x72ab9
movq 0x10(%r11), %rcx
movq 0x80(%rsp), %rax
movq (%rax), %rdx
movq %r12, %rsi
movq %r12, %rax
movq (%rcx,%rsi,8), %rdi
leaq (%rdi,%rdi,8), %r8
leaq (%r8,%r8,2), %r8
addq %rdi, %r8
movl (%r13,%r8), %r9d
movl 0xc(%r13,%r8), %r10d
imulq $0xa8, %r10, %r10
movq 0x58(%rdx,%r10), %r10
movl 0x18(%r13,%r8), %r8d
movl $0x3fffffff, %r14d      # imm = 0x3FFFFFFF
andl %r14d, %r8d
shlq $0x5, %r9
movl 0x4(%r10,%r9), %r9d
subl %r8d, %r9d
incl %r9d
movslq %r9d, %r8
cmpq %rbp, %r8
jle 0x72ab1
movq %rdi, (%rcx,%rax,8)
incq %rax
incq %rsi
cmpq (%r11), %rsi
jb 0x72a60
movq %rax, (%r11)
cmpq %r12, %r15
jae 0x72b87
movq 0x80(%rsp), %r14
movq 0x10(%r11), %rdi
movl (%rdi,%r15,8), %eax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rsi
addq %rax, %rsi
movq (%r14), %rax
movl (%r13,%rsi), %ecx
movl 0xc(%r13,%rsi), %edx
imulq $0xa8, %rdx, %rdx
movq 0x58(%rax,%rdx), %rdx
shlq $0x5, %rcx
movslq (%rdx,%rcx), %rax
movl 0x18(%r13,%rsi), %esi
andl $0x3fffffff, %esi       # imm = 0x3FFFFFFF
addq %rsi, %rax
cmpq %rbx, %rax
jge 0x72b8f
addq %rcx, %rdx
movl 0x4(%rdx), %ecx
subl %esi, %ecx
incl %ecx
movslq %ecx, %rcx
cmpq %rbp, %rax
cmovleq %rbp, %rax
cmpq %rbx, %rcx
cmovgeq %rbx, %rcx
cmpq %rax, %rcx
jle 0x72b79
movq 0x8(%r11), %rax
cmpq %rax, (%r11)
jne 0x72b63
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x8(%r11)
shlq $0x3, %rsi
callq 0x2370
movq 0x60(%rsp), %r11
movq %rax, 0x10(%r11)
movq (%r11), %rax
movq 0x10(%r11), %rcx
movl (%rcx,%r15,8), %edx
leaq 0x1(%rax), %rsi
movq %rsi, (%r11)
movq %rdx, (%rcx,%rax,8)
incq %r15
cmpq %r12, %r15
jb 0x72acd
jmp 0x72b8f
movq 0x80(%rsp), %r14
movq %r12, %r9
movq 0x50(%rsp), %r12
movl (%r12), %ecx
movl 0x10(%r12), %eax
leaq (%rax,%rax,8), %rdx
leaq (%rdx,%rdx,2), %rdx
movl 0x14(%r12), %esi
subl %eax, %esi
addq 0x70(%rsp), %rax
addq %rdx, %rax
movq (%r14), %rdx
leaq (,%r9,8), %rdi
addq 0x10(%r11), %rdi
movq (%r11), %r8
subq %r9, %r8
leaq 0x217b85(%rip), %r11    # 0x28a758
movslq 0xd4(%r11), %r9
movslq 0xd0(%r11), %r10
movslq 0x1bc(%r11), %r11
movq %r11, 0x40(%rsp)
movq %r10, 0x38(%rsp)
movq %r9, 0x30(%rsp)
movq %r8, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rax, (%rsp)
movq $0x5, 0x48(%rsp)
movq 0x98(%rsp), %rdi
movq %rbp, %rsi
movq %rbx, %rdx
movq %r13, %r8
movsd 0x1b2927(%rip), %xmm0   # 0x225558
callq 0x71e52
movl 0x10(%r12), %eax
movl 0x14(%r12), %ecx
cmpl %ecx, %eax
movq 0x58(%rsp), %r8
jae 0x72c85
movq (%r14), %rdx
subq %rax, %rcx
leaq (%rax,%rax,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq 0xb0(%rsp), %rax
addq %rsi, %rax
movl (%rax), %esi
imulq $0xa8, %rsi, %rsi
cmpb $0x2, 0x2c(%rdx,%rsi)
jne 0x72cd7
addq %rdx, %rsi
addq $0x2c, %rsi
movb $0x1, (%rsi)
addq $0x1c, %rax
decq %rcx
jne 0x72c62
incq %r8
cmpq 0x78(%rsp), %r8
movq 0x90(%rsp), %r12
jne 0x729bb
movq 0x98(%rsp), %rax
movl 0x10(%rax), %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b56c0(%rip), %rdi    # 0x22837f
leaq 0x1b297d(%rip), %rsi    # 0x225643
leaq 0x1b5633(%rip), %rcx    # 0x228300
movl $0x4e94, %edx           # imm = 0x4E94
callq 0x2110
leaq 0x1b56c2(%rip), %rdi    # 0x2283a0
leaq 0x1b295e(%rip), %rsi    # 0x225643
leaq 0x1b5614(%rip), %rcx    # 0x228300
movl $0x4eb2, %edx           # imm = 0x4EB2
callq 0x2110
leaq 0x1b55ed(%rip), %rdi    # 0x2282ea
leaq 0x1b293f(%rip), %rsi    # 0x225643
leaq 0x1b55f5(%rip), %rcx    # 0x228300
movl $0x4e8f, %edx           # imm = 0x4E8F
callq 0x2110