// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/ecovlp.cpp
// Function: h_ec_lchain_fast_new(ha_abuf_s*, unsigned int, UC_Read*, UC_Read*, All_reads*, overlap_region_alloc*, Candidates_list*, bit_extz_t*, asg16_v*, asg64_v*, ma_hit_t_alloc*, ma_hit_t_alloc*, double)
void h_ec_lchain_fast_new(ha_abuf_t *ab, uint32_t rid, UC_Read *qu, UC_Read *tu, All_reads *rref, overlap_region_alloc *ol, Candidates_list *cl, bit_extz_t *exz, asg16_v *buf, asg64_v *srt_i, ma_hit_t_alloc *in0, ma_hit_t_alloc *in1, double sh)
{
    // fprintf(stderr, "-0-[M::%s]\tnew_n::%lu\told_n::%u\n", __func__, ol->length, in0->length + in1->length);
    // fprintf(stderr, "-mm-[M::%s]\tchain_cutoff::%u\n", __func__, chain_cutoff);
    uint64_t on = 0, k, i, l, m, m0, tid, trev, is_match, is_usrt = 0; ma_hit_t *oa = NULL, *p = NULL; overlap_region *z = NULL, t; 
    char* rs = qu->seq; uint64_t rl = qu->length; int64_t om; uint64_t aq[2], at[2], bq[2], bt[2], ovlp, os, oe;
    

    
    ///overlap idx
    srt_i->n = 0;
    oa = in0->buffer; on = in0->length; m0 = 0;
    for (k = 0; k < on; k++) {
        // if(oa[k].el) continue;
        m = oa[k].tn; m <<= 1; m |= ((uint64_t)oa[k].rev); m <<= 32; m |= (k<<1); m |= m0;
        kv_push(uint64_t, *srt_i, m);
    }
    oa = in1->buffer; on = in1->length; m0 = 1;
    for (k = 0; k < on; k++) {
        // if(oa[k].el) continue;
        m = oa[k].tn; m <<= 1; m |= ((uint64_t)oa[k].rev); m <<= 32; m |= (k<<1); m |= m0;
        kv_push(uint64_t, *srt_i, m);
    }
    radix_sort_ec64(srt_i->a, srt_i->a + srt_i->n);

    k = 0; i = 0; 
    for (k = m = 0; k < ol->length; k++) {
        z = &(ol->list[k]); tid = z->y_id; trev = z->y_pos_strand;
        z->non_homopolymer_errors = 0;
        for (; (i < srt_i->n) && ((srt_i->a[i]>>32) < ((tid<<1)|trev)); i++);
        if((i < srt_i->n) && ((srt_i->a[i]>>32) == ((tid<<1)|trev))) {
            om = 1; z->shared_seed = 0; z->is_match = 0;
            if(srt_i->a[i]&1) {
                p = &(in1->buffer[((uint32_t)srt_i->a[i])>>1]); is_match = 2;
            } else {
                p = &(in0->buffer[((uint32_t)srt_i->a[i])>>1]); is_match = 1;
            }
            z->strong = p->ml; z->without_large_indel = p->no_l_indel;
            
            aq[0] = (uint32_t)p->qns; aq[1] = p->qe; 
            at[0] = p->ts; at[1] = p->te;

            bq[0] = z->x_pos_s; bq[1] = z->x_pos_e + 1;
            bt[0] = z->y_pos_s; bt[1] = z->y_pos_e + 1;
            
            os = MAX(aq[0], bq[0]); oe = MIN(aq[1], bq[1]);
            ovlp = ((oe>os)? (oe-os):0);
            if(!((ovlp) && (ovlp >= ((aq[1] - aq[0])*sh)) && ((ovlp >= ((bq[1] - bq[0])*sh))))) om = 0;
            z->non_homopolymer_errors += ((aq[1] - aq[0]) - ovlp);

            os = MAX(at[0], bt[0]); oe = MIN(at[1], bt[1]);
            ovlp = ((oe>os)? (oe-os):0);
            if(!((ovlp) && (ovlp >= ((at[1] - at[0])*sh)) && ((ovlp >= ((bt[1] - bt[0])*sh))))) om = 0;
            z->non_homopolymer_errors += ((at[1] - at[0]) - ovlp);

            if(om) {
                if(is_match == 1 && p->el == 1) p->el = 0;
                resize_UC_Read(tu, bt[1] - bt[0]);
                recover_UC_Read_sub_region(tu->seq, bt[0], bt[1] - bt[0], trev, rref, tid);
                if(exact_ec_check(rs, rl, tu->seq, bt[1] - bt[0], bq[0], bq[1], 0, bt[1] - bt[0])) {
                    if(is_match == 2) {
                        z->strong = 0; z->without_large_indel = 1;
                    }
                    is_match = 1; z->shared_seed = 1;
                }
                z->is_match = is_match;
            }
        } else {
            om = 0;
            bq[0] = z->x_pos_s; bq[1] = z->x_pos_e + 1;
            bt[0] = z->y_pos_s; bt[1] = z->y_pos_e + 1;
            resize_UC_Read(tu, bt[1] - bt[0]);
            recover_UC_Read_sub_region(tu->seq, bt[0], bt[1] - bt[0], trev, rref, tid);
            if(exact_ec_check(rs, rl, tu->seq, bt[1] - bt[0], bq[0], bq[1], 0, bt[1] - bt[0])) {
                z->strong = 0; z->without_large_indel = 1;
                z->shared_seed = 1; z->is_match = 1; om = 1;
            }
        }

        if(om) {
            if(m != k) {
                t = ol->list[m];
                ol->list[m] = ol->list[k];
                ol->list[k] = t;
            }
            m++;
        }
    }
    ol->length = m;


    oa = in0->buffer; on = in0->length;
    for (k = 0; k < on; k++) {
        if(oa[k].el) {
            // z = &(ol->list[ol->length++]);
            kv_pushp_ol(overlap_region, (*ol), &z);
            clear_fake_cigar(&(z->f_cigar));
            clear_window_list_alloc(&(z->w_list));
            clear_window_list_alloc(&(z->boundary_cigars));
            
            z->x_id = rid; z->y_id = oa[k].tn;
            z->x_pos_strand = 0; z->y_pos_strand = oa[k].rev;
            z->x_pos_s = (uint32_t)oa[k].qns;
            z->x_pos_e = oa[k].qe - 1;
            z->y_pos_s = oa[k].ts;
            z->y_pos_e = oa[k].te - 1;

            z->align_length = z->overlapLen = z->x_pos_e + 1 - z->x_pos_s;
            z->non_homopolymer_errors = 0;

            z->is_match = 1; z->shared_seed = 1;
            z->strong = oa[k].ml; z->without_large_indel = oa[k].no_l_indel;

            set_exact_exz(exz, z->x_pos_s, z->x_pos_e + 1, z->y_pos_s, z->y_pos_e + 1); push_alnw(z, exz);

            is_usrt = 1;
            // if(oa[k].tn == 1945) fprintf(stderr, "-em-[M::%s]\tqn::%u\ttn::%u\terr::%u\n", __func__, rid, oa[k].tn, ol->list[ol->length-1].non_homopolymer_errors);
        }
    }

    if(is_usrt) overlap_region_sort_y_id(ol->list, ol->length);

    if(ol->length > 1) {///for duplicated chains
        uint64_t mm_k, s; int64_t mm_sc, sc;
        for (k = 1, l = m = 0; k <= ol->length; k++) {
            if(k == ol->length || ol->list[k].y_id != ol->list[l].y_id) {
                mm_k = l;
                if(k - l > 1) {
                    for (s = l, mm_sc = INT32_MIN, mm_k = ((uint64_t)-1); s < k; s++) {
                        z = &(ol->list[s]);
                        sc = z->non_homopolymer_errors; sc = - sc;
                        if((sc > mm_sc) || ((sc == mm_sc) && ((ol->list[mm_k].x_pos_e+1-ol->list[mm_k].x_pos_s) < (z->x_pos_e+1-z->x_pos_s)))) {
                            mm_sc = sc; mm_k = s;
                        }
                    }
                }
                if(mm_k != ((uint64_t)-1)) {
                    if(mm_k != m) {
                        t = ol->list[mm_k];
                        ol->list[mm_k] = ol->list[m];
                        ol->list[m] = t;
                    }
                    m++;
                }
                l = k;
            }
        }
        ol->length = m;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movsd %xmm0, 0x20(%rsp)
movq %r9, 0x8(%rsp)
movq %r8, 0x68(%rsp)
movq %rcx, 0x10(%rsp)
movl %esi, 0x54(%rsp)
movq 0x180(%rsp), %rax
movq 0x178(%rsp), %r8
movabsq $0x100000000, %rbx      # imm = 0x100000000
movq (%rdx), %rcx
movq %rcx, 0x60(%rsp)
movq $0x0, (%r8)
movl 0xc(%rax), %r14d
testq %r14, %r14
je 0x18e2ff
movq (%rax), %r15
movq 0x10(%r8), %rax
addq %r14, %r14
addq $0xc, %r15
xorl %r12d, %r12d
movl (%r15), %r13d
movq 0xc(%r15), %rbp
movq (%r8), %rcx
cmpq 0x8(%r8), %rcx
jne 0x18e2d7
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 0x178(%rsp), %r8
movq %rax, 0x10(%r8)
movq (%r8), %rcx
shlq $0x21, %r13
addq %rbp, %rbp
andq %rbx, %rbp
orq %r13, %rbp
orq %r12, %rbp
leaq 0x1(%rcx), %rdx
movq %rdx, (%r8)
movq %rbp, (%rax,%rcx,8)
addq $0x2, %r12
addq $0x28, %r15
cmpq %r12, %r14
jne 0x18e298
movq 0x188(%rsp), %rax
movl 0xc(%rax), %r14d
testq %r14, %r14
je 0x18e38e
movq (%rax), %r15
movq 0x10(%r8), %rdi
addq %r14, %r14
addq $0xc, %r15
xorl %r12d, %r12d
movl (%r15), %r13d
movq 0xc(%r15), %rbp
movq (%r8), %rax
cmpq 0x8(%r8), %rax
jne 0x18e360
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x8(%r8)
shlq $0x3, %rsi
callq 0x2370
movq 0x178(%rsp), %r8
movq %rax, %rdi
movq %rax, 0x10(%r8)
movq (%r8), %rax
shlq $0x21, %r13
addq %rbp, %rbp
andq %rbx, %rbp
orq %r13, %rbp
orq %r12, %rbp
orq $0x1, %rbp
leaq 0x1(%rax), %rcx
movq %rcx, (%r8)
movq %rbp, (%rdi,%rax,8)
addq $0x2, %r12
addq $0x28, %r15
cmpq %r12, %r14
jne 0x18e321
jmp 0x18e392
movq 0x10(%r8), %rdi
movq (%r8), %rax
leaq (%rdi,%rax,8), %rsi
callq 0x17fc92
movq 0x8(%rsp), %rbx
cmpq $0x0, 0x10(%rbx)
je 0x18e838
xorl %r13d, %r13d
xorl %r15d, %r15d
movq $0x0, 0x28(%rsp)
movq 0x178(%rsp), %rcx
movq (%rbx), %rax
imulq $0xa8, %r13, %rbp
leaq (%rax,%rbp), %r11
movl 0x10(%rax,%rbp), %r9d
movl 0x1c(%rax,%rbp), %r8d
movl $0x0, 0x30(%rax,%rbp)
movq (%rcx), %rax
cmpq %rax, %r15
movq %r11, 0x18(%rsp)
jae 0x18e5fb
movq 0x10(%rcx), %rcx
leaq (%r9,%r9), %rdx
orq %r8, %rdx
movq (%rcx,%r15,8), %rbx
movq %rbx, %rsi
shrq $0x20, %rsi
cmpq %rdx, %rsi
jae 0x18e426
incq %r15
cmpq %r15, %rax
jne 0x18e401
movq %rbp, 0x38(%rsp)
movq %rax, %r15
jmp 0x18e600
jne 0x18e5fb
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
movl $0x0, 0x24(%r11)
movl %ebx, %eax
andl $0x1, %eax
movl %ebx, %ecx
shrl %ecx
movq %rax, 0x70(%rsp)
testq %rax, %rax
movq 0x188(%rsp), %rax
cmoveq 0x180(%rsp), %rax
movb $0x0, 0x2c(%r11)
movq (%rax), %rax
leaq (%rcx,%rcx,4), %rcx
movl 0x18(%rax,%rcx,8), %edx
shrl $0x1e, %edx
andb $0x1, %dl
movb %dl, 0x2e(%r11)
movb 0x21(%rax,%rcx,8), %dl
movb %dl, 0x2d(%r11)
movq (%rax,%rcx,8), %r8
movl %r8d, %esi
movl 0x8(%rax,%rcx,8), %edx
movl 0x4(%r11), %edi
movl 0x8(%r11), %r14d
incl %r14d
cmpq %rdi, %rsi
movq %rdi, 0x30(%rsp)
cmovaq %rsi, %rdi
cmpq %r14, %rdx
movq %r14, %r9
cmovbq %rdx, %r9
movl $0x0, %r12d
subq %rdi, %r9
cmovaeq %r9, %r12
movq %r14, 0x78(%rsp)
jbe 0x18e533
cvtsi2sd %r12, %xmm0
movq %rdx, %rdi
subq %rsi, %rdi
movq %rdi, %xmm1
punpckldq 0xa2da6(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xa2dae(%rip), %xmm1    # 0x231290
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
mulsd 0x20(%rsp), %xmm2
ucomisd %xmm2, %xmm0
jb 0x18e533
movq %r14, %rsi
subq 0x30(%rsp), %rsi
movq %rsi, %xmm1
punpckldq 0xa2d71(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xa2d79(%rip), %xmm1    # 0x231290
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
mulsd 0x20(%rsp), %xmm2
ucomisd %xmm2, %xmm0
jae 0x18e74e
movb $0x1, %sil
movl 0x10(%rax,%rcx,8), %r9d
movl 0x14(%rax,%rcx,8), %edi
movl 0x14(%r11), %r10d
movl 0x18(%r11), %r14d
incl %r14d
addl %r8d, %r12d
subl %r12d, %edx
cmpq %r10, %r9
movq %r10, 0x58(%rsp)
cmovaq %r9, %r10
cmpq %r14, %rdi
movq %r14, %r11
cmovbq %rdi, %r11
movl $0x0, %r8d
subq %r10, %r11
cmovaeq %r11, %r8
jbe 0x18e5e6
xorps %xmm0, %xmm0
cvtsi2sd %r8, %xmm0
movq %rdi, %r10
subq %r9, %r10
movq %r10, %xmm1
punpckldq 0xa2cf0(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xa2cf8(%rip), %xmm1    # 0x231290
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
mulsd 0x20(%rsp), %xmm2
ucomisd %xmm2, %xmm0
jb 0x18e5e6
subq 0x58(%rsp), %r14
movq %r14, %xmm1
punpckldq 0xa2cbe(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xa2cc6(%rip), %xmm1    # 0x231290
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
mulsd 0x20(%rsp), %xmm2
ucomisd %xmm2, %xmm0
jae 0x18e755
addl %r9d, %r8d
subl %r8d, %edi
addl %edx, %edi
movq 0x18(%rsp), %rax
movl %edi, 0x30(%rax)
jmp 0x18e691
movq %rbp, 0x38(%rsp)
movq 0x10(%rsp), %rax
movl 0x4(%r11), %r14d
movl 0x8(%r11), %ebp
movl 0x14(%r11), %r12d
movl 0x18(%r11), %ebx
incl %ebx
subq %r12, %rbx
movq (%rax), %rdi
cmpq %rbx, 0x10(%rax)
jge 0x18e657
movq %rbx, %rsi
movq %r13, 0x30(%rsp)
movq %rax, %r13
movq %r9, 0x48(%rsp)
movq %r8, 0x40(%rsp)
callq 0x2370
movq 0x40(%rsp), %r8
movq 0x48(%rsp), %r9
movq %rax, %rdi
movq %rax, (%r13)
movq %rbx, 0x10(%r13)
movq 0x30(%rsp), %r13
incl %ebp
movzbl %r8b, %ecx
movq %r12, %rsi
movq %rbx, %rdx
movq 0x68(%rsp), %r8
callq 0x32ef8
subq %r14, %rbp
cmpq %rbx, %rbp
jne 0x18e691
movq 0x10(%rsp), %rax
movq (%rax), %rsi
addq 0x60(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0x21a0
testl %eax, %eax
je 0x18e6b0
movq 0x8(%rsp), %rbx
movq 0x178(%rsp), %rcx
incq %r13
cmpq 0x10(%rbx), %r13
jb 0x18e3c5
jmp 0x18e841
movq 0x18(%rsp), %rax
movb $0x0, 0x2e(%rax)
movl $0x1, 0x24(%rax)
movw $0x101, 0x2c(%rax)      # imm = 0x101
movq 0x8(%rsp), %rbx
movq 0x178(%rsp), %rcx
movq 0x28(%rsp), %r12
cmpq %r13, %r12
je 0x18e741
movq 0x8(%rsp), %rax
movq (%rax), %rbx
imulq $0xa8, %r12, %r14
addq %rbx, %r14
movl $0xa8, %edx
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
callq 0x2160
movq 0x38(%rsp), %rbp
addq %rbp, %rbx
movl $0xa8, %edx
movq %r14, %rdi
movq %rbx, %rsi
movq 0x8(%rsp), %rbx
callq 0x2160
addq (%rbx), %rbp
movl $0xa8, %edx
movq %rbp, %rdi
leaq 0x80(%rsp), %rsi
callq 0x2160
movq 0x178(%rsp), %rcx
incq %r12
movq %r12, 0x28(%rsp)
jmp 0x18e69e
xorl %esi, %esi
jmp 0x18e536
addl %r9d, %r8d
subl %r8d, %edi
addl %edx, %edi
movq 0x18(%rsp), %rdx
movl %edi, 0x30(%rdx)
testb %sil, %sil
jne 0x18e691
testb $0x1, %bl
jne 0x18e781
leaq (%rax,%rcx,8), %rax
cmpb $0x1, 0x20(%rax)
jne 0x18e781
movb $0x0, 0x20(%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rdi
cmpq %r14, 0x10(%rax)
movq 0x70(%rsp), %r12
movq %rbp, 0x38(%rsp)
jge 0x18e7af
movq %r14, %rsi
movq %rax, %rbp
callq 0x2370
movq %rax, %rdi
movq %rax, (%rbp)
movq %r14, 0x10(%rbp)
movq 0x48(%rsp), %r9
movq 0x40(%rsp), %rax
incb %r12b
movzbl %al, %ecx
movq 0x58(%rsp), %rsi
movq %r14, %rdx
movq 0x68(%rsp), %r8
callq 0x32ef8
movq 0x78(%rsp), %rdx
movq 0x30(%rsp), %rdi
subq %rdi, %rdx
cmpq %r14, %rdx
jne 0x18e81d
movq 0x10(%rsp), %rax
movq (%rax), %rsi
addq 0x60(%rsp), %rdi
callq 0x21a0
testl %eax, %eax
movq 0x178(%rsp), %rcx
movq 0x18(%rsp), %rax
jne 0x18e82a
testb $0x1, %bl
je 0x18e811
movw $0x1, 0x2d(%rax)
movl $0x1, 0x24(%rax)
movb $0x1, %r12b
jmp 0x18e82a
movq 0x178(%rsp), %rcx
movq 0x18(%rsp), %rax
movb %r12b, 0x2c(%rax)
movq 0x8(%rsp), %rbx
jmp 0x18e6d3
movq $0x0, 0x28(%rsp)
movq 0x28(%rsp), %rsi
movq %rsi, 0x10(%rbx)
movq 0x180(%rsp), %rax
movl 0xc(%rax), %r13d
testq %r13, %r13
je 0x18ea0d
movq (%rax), %rbp
negq %r13
addq $0x21, %rbp
movb $0x1, %r12b
xorl %r14d, %r14d
leaq (%r14,%r14,4), %rax
incq %r14
leaq (,%rax,8), %r15
addq %rbp, %r15
cmpb $0x0, -0x1(%r15)
jne 0x18e8a1
leaq (%r14,%r13), %rax
incq %rax
incq %r14
addq $0x28, %r15
cmpq $0x1, %rax
jne 0x18e881
jmp 0x18e9f7
movq (%rbx), %r12
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jne 0x18e913
imulq $0x150, %rax, %rsi      # imm = 0x150
testq %rax, %rax
movl $0x150, %eax            # imm = 0x150
cmoveq %rax, %rsi
movq %r12, %rdi
callq 0x2370
movq %rax, %r12
movq %rax, (%rbx)
movq 0x8(%rbx), %rax
imulq $0xa8, %rax, %rdi
addq %r12, %rdi
leaq (%rax,%rax), %rbx
testq %rax, %rax
movl $0x2, %ecx
cmoveq %rcx, %rbx
movq %rbx, %rcx
subq %rax, %rcx
imulq $0xa8, %rcx, %rdx
xorl %esi, %esi
callq 0x20e0
movq 0x8(%rsp), %rax
movq %rbx, 0x8(%rax)
movq 0x8(%rsp), %rbx
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%rbx)
imulq $0xa8, %rax, %rbx
leaq (%r12,%rbx), %rax
movq %rax, 0x10(%rsp)
leaq (%r12,%rbx), %rdi
addq $0x38, %rdi
callq 0x3d054
leaq (%r12,%rbx), %rdi
addq $0x48, %rdi
callq 0x3d05c
addq %r12, %rbx
addq $0x78, %rbx
movq %rbx, %rdi
callq 0x3d05c
movl 0x54(%rsp), %eax
movl %eax, -0x78(%rbx)
movl -0x15(%r15), %eax
movl %eax, -0x68(%rbx)
xorl %r12d, %r12d
movl %r12d, -0x6c(%rbx)
movl -0x9(%r15), %eax
shrl $0x1f, %eax
movl %eax, -0x5c(%rbx)
movq -0x21(%r15), %rax
movl %eax, %esi
movl %eax, -0x74(%rbx)
movl -0x19(%r15), %edx
leal -0x1(%rdx), %ecx
movl %ecx, -0x70(%rbx)
movl -0x11(%r15), %ecx
movl %ecx, -0x64(%rbx)
movl -0xd(%r15), %r8d
leal -0x1(%r8), %edi
movl %edi, -0x60(%rbx)
movl %edx, %edi
subl %eax, %edi
movl %edi, -0x58(%rbx)
movl %edi, -0x50(%rbx)
movl %r12d, -0x48(%rbx)
movb $0x1, -0x4c(%rbx)
movl $0x1, -0x54(%rbx)
movl -0x9(%r15), %eax
shrl $0x1e, %eax
andb $0x1, %al
movb %al, -0x4a(%rbx)
movb (%r15), %al
movb %al, -0x4b(%rbx)
movq 0x8(%rsp), %rbx
movq 0x168(%rsp), %r15
movq %r15, %rdi
callq 0x663fa
movq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x65a71
movq %r13, %rax
addq %r14, %rax
jne 0x18e86f
movq 0x10(%rbx), %rsi
jmp 0x18ea01
movq 0x10(%rbx), %rsi
testb $0x1, %r12b
jne 0x18ea0d
movq (%rbx), %rdi
callq 0x3cf83
movq 0x10(%rbx), %rsi
cmpq $0x2, %rsi
jb 0x18eb48
movl $0x1, %r13d
xorl %eax, %eax
leaq 0x80(%rsp), %r14
xorl %ebp, %ebp
cmpq %rsi, %r13
je 0x18ea4d
movq (%rbx), %rcx
imulq $0xa8, %r13, %rdx
movl 0x10(%rcx,%rdx), %edx
imulq $0xa8, %rax, %rdi
cmpl 0x10(%rcx,%rdi), %edx
je 0x18eb38
movq %r13, %rcx
subq %rax, %rcx
cmpq $0x2, %rcx
jb 0x18eacc
cmpq %rax, %r13
jbe 0x18eb35
movq (%rbx), %rdx
imulq $0xa8, %rax, %rcx
leaq (%rdx,%rcx), %r11
addq $0x4, %r11
movq $-0x1, %rcx
movq $-0x80000000, %rdi      # imm = 0x80000000
movl 0x2c(%r11), %r8d
negq %r8
cmpq %r8, %rdi
jge 0x18ea96
movq %rax, %rcx
movq %r8, %rdi
jmp 0x18eabb
jne 0x18eabb
imulq $0xa8, %rcx, %r9
movl 0x8(%rdx,%r9), %r10d
subl 0x4(%rdx,%r9), %r10d
incl %r10d
movl 0x4(%r11), %r9d
subl (%r11), %r9d
incl %r9d
cmpl %r9d, %r10d
jb 0x18ea8e
incq %rax
addq $0xa8, %r11
cmpq %rax, %r13
jne 0x18ea82
jmp 0x18eacf
movq %rax, %rcx
cmpq $-0x1, %rcx
je 0x18eb35
cmpq %rbp, %rcx
je 0x18eb32
movq 0x8(%rsp), %rax
movq (%rax), %rbx
imulq $0xa8, %rcx, %r15
addq %rbx, %r15
movl $0xa8, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2160
imulq $0xa8, %rbp, %r12
addq %r12, %rbx
movl $0xa8, %edx
movq %r15, %rdi
movq %rbx, %rsi
movq 0x8(%rsp), %rbx
callq 0x2160
addq (%rbx), %r12
movl $0xa8, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x2160
movq 0x10(%rbx), %rsi
incq %rbp
movq %r13, %rax
incq %r13
cmpq %rsi, %r13
jbe 0x18ea29
movq %rbp, 0x10(%rbx)
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq