// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: print_rough_inconsistent_sites(ma_utg_t*, unsigned int, unsigned int, asg_t*, All_reads*, ma_hit_t_alloc*, ma_sub_t*, kvec_asg_arc_t_warp*, UC_Read*, UC_Read*, int, int, unsigned int, unsigned int, kvec_t_u32_warp*, kvec_t_u32_warp*, char const*, int, _IO_FILE*, bed_in*)
void print_rough_inconsistent_sites(ma_utg_t* collection, uint32_t cur_i, uint32_t next_i, 
asg_t* read_g, All_reads *RNF, ma_hit_t_alloc* sources, ma_sub_t *coverage_cut, 
kvec_asg_arc_t_warp* edge, UC_Read* r_read, UC_Read* q_read, int max_hang, int min_ovlp,
uint32_t c_beg, uint32_t rate_thre, kvec_t_u32_warp* exact_count, kvec_t_u32_warp* total_count, 
const char* prefix, int uID, FILE* fp, bed_in* interval)
{
    uint32_t v, w, i, rate;
    int v_beg, v_end, v_sub_beg, v_sub_end, w_beg, w_end, w_sub_beg, w_sub_end, i_beg, i_end, j;
    asg_arc_t t;
    bed_interval* p = NULL;
    v = (uint64_t)(collection->a[cur_i])>>32;
    ///last element
    if(cur_i == collection->n-1 && next_i == collection->n)
    {
        if(!collection->circ)
        {
            next_i = (uint32_t)-1;
        }
        else
        {
            next_i = 0;
        }
    }


    if(next_i != ((uint32_t)-1))
    {
        w = (uint64_t)(collection->a[next_i])>>32;

        get_specific_edge(sources, coverage_cut, NULL, edge, read_g, max_hang, min_ovlp, v, w, &t);
        v_beg = 0; v_end = asg_arc_len(t) - 1; 
        if(v&1)
        {
            v_beg = Get_READ_LENGTH((*RNF), (v>>1)) - v_beg - 1;
            v_end = Get_READ_LENGTH((*RNF), (v>>1)) - v_end - 1;
            w = v_beg; v_beg = v_end; v_end = w;
        }
    }
    else
    {
        v_beg = 0; v_end = Get_READ_LENGTH((*RNF), (v>>1)) - 1;
    }

    kv_resize(uint32_t, exact_count->a, (uint32_t)(v_end - v_beg + 1)); 
    memset(exact_count->a.a, 0, (v_end-v_beg+1)*sizeof(uint32_t));
    kv_resize(uint32_t, total_count->a, (uint32_t)(v_end - v_beg + 1)); 
    memset(total_count->a.a, 0, (v_end-v_beg+1)*sizeof(uint32_t));
    exact_count->a.n = total_count->a.n = (v_end-v_beg+1);
    
    recover_UC_sub_Read(r_read, v_beg, v_end - v_beg + 1, 0, RNF, v>>1);
    ma_hit_t_alloc* x = &(sources[v>>1]);
    ma_hit_t *h = NULL;
    ///[v_beg, v_end] must be the end of read, which means v_beg = 0 or v_end = Get_READ_LENGTH((*RNF), (v>>1)) - 1

    for (i = 0; i < x->length; i++)
    {
        h = &(x->buffer[i]);
        if(inter_interval(v_beg, v_end, Get_qs((*h)), Get_qe((*h)) - 1, 
                                                &v_sub_beg, &v_sub_end) == 0)
        {
            continue;
        }

        if(h->el)
        {
            for (j = v_sub_beg; j <= v_sub_end; j++)
            {
                exact_count->a.a[j-v_beg]++;
                total_count->a.a[j-v_beg]++;
            }            
            continue;
        }

        w_beg = Get_ts((*h)); w_end = Get_te((*h)) - 1;
        if(h->rev)
        {
            w_beg = Get_READ_LENGTH((*RNF), Get_tn((*h))) - w_beg - 1;
            w_end = Get_READ_LENGTH((*RNF), Get_tn((*h))) - w_end - 1;
            w = w_beg; w_beg = w_end; w_end = w;
        }



        w_sub_beg = w_beg + (v_sub_beg - Get_qs((*h)));
        if(w_sub_beg >= (int)(Get_READ_LENGTH((*RNF), Get_tn((*h)))))
        {
            w_sub_beg = Get_READ_LENGTH((*RNF), Get_tn((*h))) - 1;
        }


        w_sub_end = w_end - ((int)(Get_qe((*h))) - 1 - v_sub_end);
        if(w_sub_end < 0) w_sub_end = 0;
        if(w_sub_beg > w_sub_end || (v_sub_end-v_sub_beg) != (w_sub_end-w_sub_beg))
        {
            for (j = v_sub_beg; j <= v_sub_end; j++)
            {
                total_count->a.a[j-v_beg]++;
            }  
            continue;
        } 

        recover_UC_sub_Read(q_read, w_sub_beg, w_sub_end-w_sub_beg +1, h->rev, RNF, Get_tn((*h)));
        if(if_exact_match(r_read->seq, r_read->length, q_read->seq, q_read->length, 
        v_sub_beg-v_beg, v_sub_end-v_beg, 0, q_read->length-1))
        {
            for (j = v_sub_beg; j <= v_sub_end; j++)
            {
                exact_count->a.a[j-v_beg]++;
                total_count->a.a[j-v_beg]++;
            }  
        }
        else
        {
            for (j = v_sub_beg; j <= v_sub_end; j++)
            {
                total_count->a.a[j-v_beg]++;
            } 
        }
    }
    
    i_beg = i_end = -1;
    v = (uint64_t)(collection->a[cur_i])>>32;
    uint32_t inexact = 0, total = 0; 
    for (i = 0; i < total_count->a.n; i++)
    {
        if(total_count->a.a[i] == 0)
        {
            rate = 100;
        }
        else
        {
            rate = ((total_count->a.a[i] - exact_count->a.a[i])*100)/total_count->a.a[i];
        }
         
        if(rate >= rate_thre)   ///inexact rate
        {
            ///start a new interval
            if(i_beg == -1 && i_end == -1)
            {
                i_beg = i_end = i;
            }
            else///extend current interval
            {
                i_end++;
            }
            total = total + total_count->a.a[i];
            inexact = inexact + (total_count->a.a[i] - exact_count->a.a[i]);
        }
        else///end an interval
        {
            if(i_beg != -1 && i_end != -1)
            {
                ///i_beg and i_end are the offsets in comparsion to v_beg
                v_sub_beg = i_beg + v_beg;
                v_sub_end = i_end + v_beg;
                if(v&1)
                {
                    i_beg = (v_end - v_beg + 1) - i_beg - 1;
                    i_end = (v_end - v_beg + 1) - i_end - 1;
                    w = i_beg; i_beg = i_end; i_end = w;
                }
                i_end++;
                rate = (total == 0)? 100 : (inexact*100)/total;

                if(prefix != NULL && fp != NULL)
                {
                    fprintf(fp,"%s%.6d%c\t%u\t%u\t%u\t", prefix, uID, "lc"[collection->circ], 
                    (uint32_t)(i_beg + c_beg), (uint32_t)(i_end + c_beg), rate);
                    fprintf(fp,"%.*s", (int)Get_NAME_LENGTH((*RNF), (v>>1)), Get_NAME((*RNF), (v>>1)));
                    for (j = 0; j < (int)x->length; j++)
                    {
                        h = &(x->buffer[j]);
                        if(inter_interval(v_sub_beg, v_sub_end, Get_qs((*h)), Get_qe((*h)) - 1, 
                                                                &w_sub_beg, &w_sub_end) == 0)
                        {
                            continue;
                        }
                        fprintf(fp,",%.*s", (int)Get_NAME_LENGTH((*RNF), Get_tn((*h))), Get_NAME((*RNF), Get_tn((*h))));
                    }
                    fprintf(fp,"\n");
                }
                else if(interval != NULL)
                {
                    kv_pushp(bed_interval, *interval, &p);
                    p->beg = (uint32_t)(i_beg + c_beg);
                    p->end = (uint32_t)(i_end + c_beg);
                }
                
            }

            i_beg = i_end = -1;
            inexact = total = 0;
        }
    }

    if(i_beg != -1 && i_end != -1)
    {
        ///i_beg and i_end are the offsets in comparsion to v_beg
        v_sub_beg = i_beg + v_beg;
        v_sub_end = i_end + v_beg;
        if(v&1)
        {
            i_beg = (v_end - v_beg + 1) - i_beg - 1;
            i_end = (v_end - v_beg + 1) - i_end - 1;
            w = i_beg; i_beg = i_end; i_end = w;
        }
        i_end++;
        rate = (total == 0)? 100 : (inexact*100)/total;

        if(prefix != NULL && fp != NULL)
        {
            fprintf(fp,"%s%.6d%c\t%u\t%u\t%u\t", prefix, uID, "lc"[collection->circ], 
            (uint32_t)(i_beg + c_beg), (uint32_t)(i_end + c_beg), rate);
            fprintf(fp,"%.*s", (int)Get_NAME_LENGTH((*RNF), (v>>1)), Get_NAME((*RNF), (v>>1)));
            for (j = 0; j < (int)x->length; j++)
            {
                h = &(x->buffer[j]);
                if(inter_interval(v_sub_beg, v_sub_end, Get_qs((*h)), Get_qe((*h)) - 1, 
                                                        &w_sub_beg, &w_sub_end) == 0)
                {
                    continue;
                }
                fprintf(fp,",%.*s", (int)Get_NAME_LENGTH((*RNF), Get_tn((*h))), Get_NAME((*RNF), Get_tn((*h))));
            }
            fprintf(fp,"\n");
        }
        else if(interval != NULL)
        {
            kv_pushp(bed_interval, *interval, &p);
            p->beg = (uint32_t)(i_beg + c_beg);
            p->end = (uint32_t)(i_end + c_beg);
        }
    }
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r9, %r10
movq %r8, 0x8(%rsp)
movq %rcx, %r8
movq 0x148(%rsp), %r13
movq 0x140(%rsp), %rax
movq %rax, 0x28(%rsp)
movl 0x138(%rsp), %eax
movl %eax, 0x54(%rsp)
movq 0x130(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x128(%rsp), %r15
movq 0x120(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x118(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x10(%rdi), %eax
leal -0x1(%rax), %ecx
xorl %esi, %ecx
xorl %edx, %eax
orl %ecx, %eax
movl 0x110(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x108(%rsp), %eax
movl %esi, %ebx
movl 0x100(%rsp), %r9d
movq 0xf8(%rsp), %rcx
movq %rcx, 0x78(%rsp)
movq 0xf0(%rsp), %rcx
movq %rcx, 0x70(%rsp)
movq 0xe8(%rsp), %rcx
movq 0xe0(%rsp), %rsi
movq 0x18(%rdi), %r11
movq %rbx, 0x88(%rsp)
movq (%r11,%rbx,8), %r12
movq %r10, 0x20(%rsp)
movq %rdi, 0x60(%rsp)
jne 0x7a615
cmpl $0x0, (%rdi)
jns 0x7a668
xorl %edx, %edx
jmp 0x7a61a
cmpl $-0x1, %edx
je 0x7a668
movq %r12, %rbx
shrq $0x20, %rbx
movl %edx, %edx
movl 0x4(%r11,%rdx,8), %edx
leaq 0x90(%rsp), %r14
movq %r10, %rdi
pushq %r14
pushq %rdx
pushq %rbx
pushq %rax
callq 0x79db6
addq $0x20, %rsp
movq (%r14), %rsi
xorl %ecx, %ecx
testb $0x1, %bl
je 0x7a67e
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq %r12, %rcx
shrq $0x21, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
subl %esi, %ecx
movq %rax, %rsi
jmp 0x7a67e
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq %r12, %rcx
shrq $0x21, %rcx
movq (%rax,%rcx,8), %rsi
xorl %ecx, %ecx
movq 0x18(%rsp), %rdx
movl %ecx, (%rsp)
decl %esi
movq %rsi, 0x30(%rsp)
movl %esi, %eax
subl %ecx, %eax
movq %rax, 0x80(%rsp)
leal 0x1(%rax), %ebx
cmpq %rbx, 0x8(%rdx)
movq %r13, 0x58(%rsp)
jae 0x7a701
leaq -0x1(%rbx), %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(%rdx)
movq 0x10(%rdx), %rdi
leaq 0x4(,%rcx,4), %rsi
movq %rdx, %r14
callq 0x2370
movq %rax, %rdi
movq %rax, 0x10(%r14)
jmp 0x7a705
movq 0x10(%rdx), %rdi
movslq %ebx, %r14
leaq (,%r14,4), %r13
xorl %esi, %esi
movq %r13, %rdx
callq 0x20e0
cmpq %rbx, 0x8(%r15)
jae 0x7a776
decq %rbx
movq %rbx, %rax
shrq %rax
orq %rbx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x10, %rax
orq %rcx, %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%r15)
movq 0x10(%r15), %rdi
leaq 0x4(,%rax,4), %rsi
callq 0x2370
movq %rax, %rdi
movq %rax, 0x10(%r15)
jmp 0x7a77a
movq 0x10(%r15), %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x20e0
movq %r14, (%r15)
movq 0x18(%rsp), %rbx
movq %r14, (%rbx)
movl (%rsp), %ebp
movq %r14, %rdx
movslq %ebp, %r14
shrq $0x21, %r12
movq 0x70(%rsp), %rdi
movq %r14, %rsi
xorl %ecx, %ecx
movq 0x8(%rsp), %r8
movq %r12, %r9
callq 0x6f2f
movq %r14, %r8
movl %ebp, %r9d
movq %rbx, %r11
imulq $0x18, %r12, %rax
movq 0x20(%rsp), %r10
addq %rax, %r10
movq %r14, %rax
negq %rax
movq %rax, 0x48(%rsp)
leaq (,%r14,4), %rbx
negq %rbx
xorl %r14d, %r14d
movq %r10, 0x20(%rsp)
movq 0x30(%rsp), %rdi
movq %r8, 0x40(%rsp)
movl 0xc(%r10), %eax
cmpq %rax, %r14
jae 0x7a9f4
movq (%r10), %rsi
imulq $0x28, %r14, %rcx
movq (%rsi,%rcx), %rbp
cmpl %ebp, %edi
jl 0x7a9ec
movl 0x8(%rsi,%rcx), %eax
leal -0x1(%rax), %r12d
cmpl %r12d, %r9d
jg 0x7a9ec
movq %r14, 0x38(%rsp)
addq %rcx, %rsi
cmpl %ebp, %r9d
movl %ebp, %r14d
cmovgl %r9d, %r14d
cmpl %r12d, %edi
cmovll %edi, %r12d
cmpb $0x0, 0x20(%rsi)
movslq %r12d, %r13
je 0x7a879
movslq %ebp, %rax
cmpq %rax, %r8
cmovgq %r8, %rax
movq 0x48(%rsp), %rcx
addq %rax, %rcx
movq 0x38(%rsp), %r14
cmpq %r13, %rax
jg 0x7a9ec
movq 0x10(%r11), %rdx
incl (%rdx,%rcx,4)
movq 0x10(%r15), %rdx
incl (%rdx,%rcx,4)
incq %rax
incq %rcx
jmp 0x7a85a
movl 0x10(%rsi), %edi
movl 0x14(%rsi), %edx
movq 0x18(%rsi), %rcx
movq 0x8(%rsp), %r8
movq 0x18(%r8), %r8
testl %ecx, %ecx
js 0x7a89c
decl %edx
movl 0xc(%rsi), %r9d
movl (%r8,%r9,8), %esi
jmp 0x7a8b3
movl 0xc(%rsi), %r9d
movl (%r8,%r9,8), %esi
notl %edi
movl %edi, %r8d
addl %esi, %r8d
movl %esi, %edi
subl %edx, %edi
movl %r8d, %edx
movl %r14d, %r8d
subl %ebp, %r8d
addl %edi, %r8d
leal -0x1(%rsi), %edi
cmpl %esi, %r8d
cmovll %r8d, %edi
movl %r12d, %esi
subl %eax, %esi
leal (%rsi,%rdx), %eax
incl %eax
testl %eax, %eax
movl $0x0, %edx
cmovlel %edx, %eax
subl %edi, %eax
jl 0x7a98f
movl %r12d, %edx
subl %r14d, %edx
cmpl %eax, %edx
jne 0x7a98f
movslq %edi, %rsi
incl %edx
movslq %edx, %rdx
shrl $0x1f, %ecx
movq 0x78(%rsp), %rdi
movq 0x8(%rsp), %r8
callq 0x6f2f
movq 0x70(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movq 0x78(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
movl (%rsp), %eax
subl %eax, %r14d
movslq %r14d, %r8
subl %eax, %r12d
movslq %r12d, %r9
leaq -0x1(%rcx), %rax
pushq %rax
pushq $0x0
callq 0x1097d
addq $0x10, %rsp
movslq %ebp, %rcx
movq 0x40(%rsp), %r8
cmpq %rcx, %r8
cmovgq %r8, %rcx
testl %eax, %eax
je 0x7a9c0
movq 0x48(%rsp), %rax
addq %rcx, %rax
movq 0x20(%rsp), %r10
movq 0x18(%rsp), %r11
movl (%rsp), %r9d
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %r14
cmpq %r13, %rcx
jg 0x7a9ec
movq 0x10(%r11), %rdx
incl (%rdx,%rax,4)
movq 0x10(%r15), %rdx
incl (%rdx,%rax,4)
incq %rcx
incq %rax
jmp 0x7a974
movslq %ebp, %rax
movq 0x40(%rsp), %r8
cmpq %rax, %r8
cmovgq %r8, %rax
movl (%rsp), %r9d
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %r14
cmpq %r13, %rax
jg 0x7a9ec
movq 0x10(%r15), %rcx
addq %rbx, %rcx
incl (%rcx,%rax,4)
incq %rax
jmp 0x7a9ac
movq 0x20(%rsp), %r10
movq 0x18(%rsp), %r11
movl (%rsp), %r9d
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %r14
cmpq %r13, %rcx
jg 0x7a9ec
movq 0x10(%r15), %rax
addq %rbx, %rax
incl (%rax,%rcx,4)
incq %rcx
jmp 0x7a9d8
incq %r14
jmp 0x7a7f0
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x88(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
movq %rcx, %rax
shrq $0x20, %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x68(%rsp)
setne %al
cmpq $0x0, 0x28(%rsp)
setne %dl
andb %al, %dl
movb %dl, 0x38(%rsp)
shrq $0x21, %rcx
movq %rcx, 0x30(%rsp)
leal 0x1(%rcx), %eax
movq %rax, 0x40(%rsp)
pushq $-0x1
popq %r10
pushq $0x64
popq %rbp
xorl %ebx, %ebx
movl %r10d, %r13d
movl %r10d, %r14d
xorl %esi, %esi
xorl %ecx, %ecx
movl 0x4(%rsp), %r8d
movl %ebx, %ebx
cmpq %rbx, (%r15)
jbe 0x7acc1
movq 0x10(%r15), %rax
movl (%rax,%rbx,4), %edi
movl %ebp, %eax
testl %edi, %edi
je 0x7aa7e
movq 0x10(%r11), %rax
movl %edi, %edx
subl (%rax,%rbx,4), %edx
imull $0x64, %edx, %eax
xorl %edx, %edx
divl %edi
cmpl %r8d, %eax
jae 0x7abc5
xorl %edi, %edi
cmpl $-0x1, %r13d
je 0x7abee
cmpl $-0x1, %r14d
je 0x7abee
movl %ebp, %eax
movq 0x80(%rsp), %rbp
movl %ebp, %r12d
subl %r13d, %r12d
subl %r14d, %ebp
testb $0x1, 0x48(%rsp)
cmovel %r13d, %ebp
cmovel %r14d, %r12d
movl %eax, %r10d
testl %ecx, %ecx
je 0x7aace
imull $0x64, %esi, %eax
xorl %edx, %edx
divl %ecx
movl %eax, %r10d
incl %r12d
cmpb $0x0, 0x38(%rsp)
je 0x7abfb
addl %r9d, %r13d
addl %r9d, %r14d
movq 0x60(%rsp), %rax
movl (%rax), %eax
shrl $0x1f, %eax
leaq 0x16bb98(%rip), %rcx    # 0x1e668b
movsbl (%rax,%rcx), %r8d
movl 0x14(%rsp), %eax
addl %eax, %ebp
addl %eax, %r12d
movq 0x28(%rsp), %rdi
leaq 0x16d7b4(%rip), %rsi    # 0x1e82c1
movq 0x68(%rsp), %rdx
movl 0x54(%rsp), %ecx
movl %ebp, %r9d
xorl %eax, %eax
pushq %r10
pushq %r12
callq 0x22b0
popq %rcx
popq %rdx
movq 0x8(%rsp), %rsi
movq 0x40(%rsi), %rax
movq 0x40(%rsp), %rcx
movl (%rax,%rcx,8), %edx
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
subl %ecx, %edx
addq 0x8(%rsi), %rcx
movq 0x28(%rsp), %rdi
leaq 0x16d783(%rip), %rsi    # 0x1e82d5
xorl %eax, %eax
callq 0x22b0
movq 0x20(%rsp), %rdx
pushq $0xc
popq %r12
xorl %ebp, %ebp
movslq 0xc(%rdx), %rax
cmpq %rax, %rbp
jge 0x7ac76
movq (%rdx), %rax
cmpl -0xc(%rax,%r12), %r14d
jl 0x7abbc
movl -0x4(%rax,%r12), %ecx
decl %ecx
cmpl %ecx, %r13d
jg 0x7abbc
movq 0x8(%rsp), %rsi
movq 0x40(%rsi), %rcx
movl (%rax,%r12), %eax
leal 0x1(%rax), %edx
movl (%rcx,%rdx,8), %edx
movq (%rcx,%rax,8), %rcx
subl %ecx, %edx
addq 0x8(%rsi), %rcx
movq 0x28(%rsp), %rdi
leaq 0x16d724(%rip), %rsi    # 0x1e82d4
xorl %eax, %eax
callq 0x22b0
movq 0x20(%rsp), %rdx
incq %rbp
addq $0x28, %r12
jmp 0x7ab64
cmpl $-0x1, %r13d
sete %al
incl %r14d
sete %dl
testb %dl, %al
cmovnel %ebx, %r13d
cmovnel %ebx, %r14d
addl %edi, %ecx
movq 0x10(%r11), %rax
addl %edi, %esi
subl (%rax,%rbx,4), %esi
movl %esi, %edi
jmp 0x7acb8
movl %r10d, %r13d
movl %r10d, %r14d
xorl %ecx, %ecx
jmp 0x7acb8
movq 0x58(%rsp), %r14
testq %r14, %r14
je 0x7aca4
movq (%r14), %rcx
movq 0x10(%r14), %rax
cmpq 0x8(%r14), %rcx
jne 0x7ac46
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x2370
xorl %edi, %edi
movl (%rsp), %r9d
movq 0x18(%rsp), %r11
movq %rax, 0x10(%r14)
movq (%r14), %rcx
movl 0x4(%rsp), %r8d
pushq $-0x1
popq %r10
leaq 0x1(%rcx), %rdx
movq %rdx, (%r14)
shlq $0x4, %rcx
movl 0x14(%rsp), %edx
addl %edx, %ebp
movq %rbp, (%rax,%rcx)
addl %edx, %r12d
movq %r12, 0x8(%rax,%rcx)
movl %r10d, %r13d
movl %r10d, %r14d
xorl %ecx, %ecx
jmp 0x7acb5
pushq $0xa
popq %rdi
movq 0x28(%rsp), %rsi
callq 0x2270
pushq $-0x1
popq %r10
movl %r10d, %r13d
movl %r10d, %r14d
xorl %ecx, %ecx
movq 0x18(%rsp), %r11
movl 0x4(%rsp), %r8d
movl (%rsp), %r9d
pushq $0x64
popq %rbp
xorl %edi, %edi
jmp 0x7acb8
pushq $-0x1
popq %r10
movl %r10d, %r13d
movl %r10d, %r14d
xorl %ecx, %ecx
movl 0x4(%rsp), %r8d
pushq $0x64
popq %rbp
incl %ebx
movl %edi, %esi
jmp 0x7aa56
cmpl $-0x1, %r13d
je 0x7ae5c
cmpl $-0x1, %r14d
je 0x7ae5c
movq 0x80(%rsp), %rax
movl %eax, %ebx
subl %r13d, %ebx
subl %r14d, %eax
testb $0x1, 0x48(%rsp)
cmovel %r13d, %eax
movq %rax, %r15
cmovel %r14d, %ebx
testl %ecx, %ecx
je 0x7ad05
imull $0x64, %esi, %eax
xorl %edx, %edx
divl %ecx
movl %eax, %r10d
jmp 0x7ad09
pushq $0x64
popq %r10
incl %ebx
cmpb $0x0, 0x38(%rsp)
je 0x7ae00
addl %r9d, %r13d
addl %r9d, %r14d
movq 0x60(%rsp), %rax
movl (%rax), %eax
shrl $0x1f, %eax
leaq 0x16b95e(%rip), %rcx    # 0x1e668b
movsbl (%rax,%rcx), %r8d
movl 0x14(%rsp), %eax
movq %r15, %r9
addl %eax, %r9d
addl %eax, %ebx
leaq 0x16d57c(%rip), %rsi    # 0x1e82c1
movq 0x28(%rsp), %r15
movq %r15, %rdi
movq 0x68(%rsp), %rdx
movl 0x54(%rsp), %ecx
xorl %eax, %eax
pushq %r10
pushq %rbx
callq 0x22b0
popq %rcx
popq %rdx
movq 0x8(%rsp), %rsi
movq 0x40(%rsi), %rax
movq 0x40(%rsp), %rcx
movl (%rax,%rcx,8), %edx
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
subl %ecx, %edx
addq 0x8(%rsi), %rcx
leaq 0x16d54c(%rip), %rsi    # 0x1e82d5
movq %r15, %rdi
xorl %eax, %eax
callq 0x22b0
movq 0x20(%rsp), %rdx
pushq $0xc
popq %rbx
leaq 0x16d532(%rip), %r12    # 0x1e82d4
xorl %r15d, %r15d
movslq 0xc(%rdx), %rax
cmpq %rax, %r15
jge 0x7ae6e
movq (%rdx), %rax
cmpl -0xc(%rax,%rbx), %r14d
jl 0x7adf7
movl -0x4(%rax,%rbx), %ecx
decl %ecx
cmpl %ecx, %r13d
jg 0x7adf7
movq 0x8(%rsp), %rsi
movq 0x40(%rsi), %rcx
movl (%rax,%rbx), %eax
leal 0x1(%rax), %edx
movl (%rcx,%rdx,8), %edx
movq (%rcx,%rax,8), %rcx
subl %ecx, %edx
addq 0x8(%rsi), %rcx
movq 0x28(%rsp), %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x22b0
movq 0x20(%rsp), %rdx
incq %r15
addq $0x28, %rbx
jmp 0x7ada5
cmpq $0x0, 0x58(%rsp)
je 0x7ae5c
movq 0x58(%rsp), %r14
movq (%r14), %rcx
movq 0x10(%r14), %rax
cmpq 0x8(%r14), %rcx
jne 0x7ae3f
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%r14)
movq (%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%r14)
shlq $0x4, %rcx
movl 0x14(%rsp), %edx
addl %edx, %r15d
movq %r15, (%rax,%rcx)
addl %edx, %ebx
movq %rbx, 0x8(%rax,%rcx)
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0xa
popq %rdi
movq 0x28(%rsp), %rsi
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2270