// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Overlaps.cpp
// Function: hic_clean_adv(asg_t*, ug_opt_t*)
void hic_clean_adv(asg_t *sg, ug_opt_t *uopt)
{
    uint32_t i, k, m, z, v, w, mk; ma_utg_t *u = NULL; uint32_t *ba, bn, n_vtx, beg, end, n0, n1; ma_utg_t *mz = NULL;
    ma_ug_t *ug = ma_ug_gen_primary(sg, PRIMARY_LABLE); n_vtx = ug->g->n_seq<<1; double bub_rate = 0.1;
    uint8_t *bf = NULL; bubble_type *bub = gen_bubble_chain(sg, ug, uopt, &bf, ((asm_opt.polyploidy>2)?1:0)); 
    uint64_t tLen, vocc, socc, pocc; buf_t b; memset(&b, 0, sizeof(buf_t)); CALLOC(b.a, n_vtx);
    REALLOC(bf, n_vtx); memset(bf, 0, sizeof((*bf))*n_vtx);
    kvec_t(uint64_t) buf; kv_init(buf); n0 = n1 = 0;
    for (i = 0; i < ug->g->n_seq; ++i) {
        if(ug->g->seq[i].del) continue;
        ug->g->seq[i].c = PRIMARY_LABLE;
    }

    for (i = 0; i < bub->b_ug->u.n; i++) {
        u = &(bub->b_ug->u.a[i]);
        if(u->n == 0) continue;
        for (k = 0; k < u->n; k++) {///bubble chain
            get_bubbles(bub, u->a[k]>>33, &beg, &end, &ba, &bn, NULL);///bubble
			for (m = vocc = tLen = 0; m < bn; m++) {
                bf[ba[m]] = bf[ba[m]^1] = 1; 
                tLen += ug->u.a[ba[m]>>1].len;
                if(IF_HOM((ba[m]>>1), *bub)) continue;
                if(ug->g->seq[ba[m]>>1].del) continue;
                vocc += ug->u.a[ba[m]>>1].n;
            }
            if(beg != (uint32_t)-1) tLen += ug->u.a[beg>>1].len;
            if(end != (uint32_t)-1) tLen += ug->u.a[end>>1].len;

            if(vocc) {
                for (m = buf.n = 0; m < bn; m++) {
                    v = ba[m];
                    if(ug->g->seq[v>>1].del) continue;
                    if(asg_arc_n(ug->g, v) < 2) continue;
                    if(get_real_length(ug->g, v, NULL) < 2) continue;
                    if(asg_bub_pop1_primary_trio(ug->g, NULL, v, tLen, &b, (uint32_t)-1, (uint32_t)-1, 0, NULL, NULL, NULL, 0, 0, NULL)) {
                        //beg is v, end is b.S.a[0]
                        //note b.b include end, does not include beg
                        for (z = socc = 0; z < b.b.n; z++) {
                            if(b.b.a[z]==v || b.b.a[z]==b.S.a[0]) continue;
                            socc += ug->u.a[b.b.a[z]>>1].n;
                            if((!bf[b.b.a[z]])&&(!bf[b.b.a[z]^1])) break;
                        }
                        if(z < b.b.n) continue;
                        kv_push(uint64_t, buf, ((socc<<32)|v));
                    }

                    v ^= 1;
                    if(asg_arc_n(ug->g, v) < 2) continue;
                    if(get_real_length(ug->g, v, NULL) < 2) continue;
                    if(asg_bub_pop1_primary_trio(ug->g, NULL, v, tLen, &b, (uint32_t)-1, (uint32_t)-1, 0, NULL, NULL, NULL, 0, 0, NULL)) {
                        //beg is v, end is b.S.a[0]
                        //note b.b include end, does not include beg
                        for (z = socc = 0; z < b.b.n; z++) {
                            if(b.b.a[z]==v || b.b.a[z]==b.S.a[0]) continue;
                            socc += ug->u.a[b.b.a[z]>>1].n;
                            if((!bf[b.b.a[z]])&&(!bf[b.b.a[z]^1])) break;
                        }
                        if(z < b.b.n) continue;
                        kv_push(uint64_t, buf, ((socc<<32)|v));
                    }
                }

                radix_sort_arch64(buf.a, buf.a + buf.n); 
                for (m = pocc = 0; m < buf.n; m++) {
                    v = (uint32_t)buf.a[m];
                    if(ug->g->seq[v>>1].del) continue;
                    if(asg_arc_n(ug->g, v) < 2) continue;
                    if(get_real_length(ug->g, v, NULL) < 2) continue;
                    if(asg_bub_pop1_primary_trio(ug->g, NULL, v, tLen, &b, (uint32_t)-1, (uint32_t)-1, 0, NULL, NULL, NULL, 0, 0, NULL)) {
                        //beg is v, end is b.S.a[0]
                        //note b.b include end, does not include beg
                        for (z = socc = 0; z < b.b.n; z++) {
                            if(b.b.a[z]==v || b.b.a[z]==b.S.a[0]) continue;
                            socc += ug->u.a[b.b.a[z]>>1].n;
                            if((!bf[b.b.a[z]])&&(!bf[b.b.a[z]^1])) break;
                        }
                        if(z < b.b.n) continue;
                        if((pocc+socc) >= (vocc*bub_rate)) continue;
                        pocc += socc;
                        asg_bub_pop1_primary_trio(ug->g, NULL, v, tLen, &b, (uint32_t)-1, (uint32_t)-1, 1, NULL, NULL, NULL, 0, 0, NULL);
                        for (z = 0; z < b.b.n; z++) {
                            if(b.b.a[z]==v || b.b.a[z]==b.S.a[0]) continue;
                            // socc += ug->u.a[b.b.a[i]>>1].n;
                            if(ug->g->seq[b.b.a[z]>>1].del) continue;
                            if(ug->g->seq[b.b.a[z]>>1].c != ALTER_LABLE) continue;
                            mz = &(ug->u.a[b.b.a[z]>>1]);
                            if(mz->m == 0) continue;
                            for (mk = 0; mk < mz->n; mk++) asg_seq_del(sg, mz->a[mk]>>33);
                            asg_seq_del(ug->g, b.b.a[z]>>1);
                            if(ug->u.a[b.b.a[z]>>1].m) {
                                ug->u.a[b.b.a[z]>>1].m = ug->u.a[b.b.a[z]>>1].n = 0;
                                free(ug->u.a[b.b.a[z]>>1].a); ug->u.a[b.b.a[z]>>1].a = NULL;
                            }
                        }
                        // fprintf(stderr, "+utg%.6dl\tutg%.6dl\n", (int32_t)(v>>1)+1, (int32_t)(b.S.a[0]>>1)+1);
                        n0++;
                    }
                }
            }
            for (m = 0; m < bn; m++) {
                bf[ba[m]] = bf[ba[m]^1] = 0; 
            }
        }
    }

    for (v = 0; v < ug->g->n_seq; ++v) {
        if(ug->g->seq[v].del) continue;
        if(ug->g->seq[v].c != ALTER_LABLE) continue;
        mz = &(ug->u.a[v]);
        if(mz->m == 0) continue;
        for (k = 0; k < mz->n; k++) asg_seq_del(sg, mz->a[k]>>33);
        asg_seq_del(ug->g, v);
        if(ug->u.a[v].m) {
            ug->u.a[v].m = ug->u.a[v].n = 0;
            free(ug->u.a[v].a); ug->u.a[v].a = NULL;
        }
    }
    asg_cleanup(ug->g);



    tLen = get_bub_pop_max_dist_advance(ug->g, &b);
    for (v = buf.n = 0; v < n_vtx; ++v) {
        if(ug->g->seq[v>>1].del) continue;
        if(asg_arc_n(ug->g, v) < 2) continue;
        if(get_real_length(ug->g, v, NULL) < 2) continue;
        if(asg_bub_pop1_primary_trio(ug->g, NULL, v, tLen, &b, (uint32_t)-1, (uint32_t)-1, 0, NULL, NULL, NULL, 0, 0, NULL)) {
            //beg is v, end is b.S.a[0]
            //note b.b include end, does not include beg
            for (i = socc = 0; i < b.b.n; i++) {
                if(b.b.a[i]==v || b.b.a[i]==b.S.a[0]) continue;
                socc += ug->u.a[b.b.a[i]>>1].n;
            }
            if(socc <= 16) kv_push(uint64_t, buf, ((socc<<32)|v));
        }
    }

    uint32_t convex; long long ll, tmp, max_stop_nodeLen, max_stop_baseLen;
    radix_sort_arch64(buf.a, buf.a + buf.n); 
    for (m = 0; m < buf.n; m++) {
        v = (uint32_t)buf.a[m];
        if(ug->g->seq[v>>1].del) continue;
        if(asg_arc_n(ug->g, v) < 2) continue;
        if(get_real_length(ug->g, v, NULL) < 2) continue;
        if(asg_bub_pop1_primary_trio(ug->g, NULL, v, tLen, &b, (uint32_t)-1, (uint32_t)-1, 0, NULL, NULL, NULL, 0, 0, NULL)) {
            w = b.S.a[0]^1;
            for (i = socc = 0; i < b.b.n; i++) {
                if(b.b.a[i]==v || b.b.a[i]==b.S.a[0]) continue;
                socc += ug->u.a[b.b.a[i]>>1].n;
            }
            if(socc <= 16) {
                b.b.n = 0;
                get_unitig(ug->g, NULL, v^1, &convex, &ll, &tmp, &max_stop_nodeLen, &max_stop_baseLen, 1, &b);
                for (k = vocc = 0; k < b.b.n; k++) {
                    if(IF_HOM((b.b.a[k]>>1), *bub)) break;
                    vocc += ug->u.a[b.b.a[k]>>1].n;
                }
                if((socc) >= (vocc*bub_rate)) continue;

                b.b.n = 0;
                get_unitig(ug->g, NULL, w^1, &convex, &ll, &tmp, &max_stop_nodeLen, &max_stop_baseLen, 1, &b);
                for (k = vocc = 0; k < b.b.n; k++) {
                    if(IF_HOM((b.b.a[k]>>1), *bub)) break;
                    vocc += ug->u.a[b.b.a[k]>>1].n;
                }
                if((socc) >= (vocc*bub_rate)) continue;

                asg_bub_pop1_primary_trio(ug->g, NULL, v, tLen, &b, (uint32_t)-1, (uint32_t)-1, 1, NULL, NULL, NULL, 0, 0, NULL);
                for (i = 0; i < b.b.n; i++) {
                    if(b.b.a[i]==v || b.b.a[i]==b.S.a[0]) continue;
                    // socc += ug->u.a[b.b.a[i]>>1].n;
                    if(ug->g->seq[b.b.a[i]>>1].del) continue;
                    if(ug->g->seq[b.b.a[i]>>1].c != ALTER_LABLE) continue;
                    mz = &(ug->u.a[b.b.a[i]>>1]);
                    if(mz->m == 0) continue;
                    for (mk = 0; mk < mz->n; mk++) asg_seq_del(sg, mz->a[mk]>>33);
                    asg_seq_del(ug->g, b.b.a[i]>>1);
                    if(ug->u.a[b.b.a[i]>>1].m) {
                        ug->u.a[b.b.a[i]>>1].m = ug->u.a[b.b.a[i]>>1].n = 0;
                        free(ug->u.a[b.b.a[i]>>1].a); ug->u.a[b.b.a[i]>>1].a = NULL;
                    }
                }
                // fprintf(stderr, "-utg%.6dl\tutg%.6dl\n", (int32_t)(v>>1)+1, (int32_t)(b.S.a[0]>>1)+1);
                n1++;
            }
        }
    }
    // filter_sg_by_ug(sg, ug, uopt);
    for (v = 0; v < ug->g->n_seq; ++v) {
        if(ug->g->seq[v].del) continue;
        if(ug->g->seq[v].c != ALTER_LABLE) continue;
        mz = &(ug->u.a[v]);
        if(mz->m == 0) continue;
        for (k = 0; k < mz->n; k++) asg_seq_del(sg, mz->a[k]>>33);
        asg_seq_del(ug->g, v);
        if(ug->u.a[v].m) {
            ug->u.a[v].m = ug->u.a[v].n = 0;
            free(ug->u.a[v].a); ug->u.a[v].a = NULL;
        }
    }
    asg_cleanup(ug->g);

    asg_cleanup(sg);
    free(b.a); free(b.S.a); free(b.T.a); free(b.b.a); free(b.e.a); 
    ma_ug_destroy(ug); free(bf); kv_destroy(buf);
    destory_bubbles(bub); free(bub);
    // fprintf(stderr, "[M::%s::] # type0::%u, # type1::%u\n", __func__, n0, n1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xb1a83
movq %rax, %r13
movq 0x18(%rax), %rax
movl 0x14(%rax), %ebp
addl %ebp, %ebp
leaq 0x70(%rsp), %r12
movq %rbx, (%r12)
leaq 0x1ca26a(%rip), %rax    # 0x28a758
xorl %r8d, %r8d
cmpl $0x3, 0x1bc(%rax)
setge %r8b
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x1f04d1
movq %rax, 0x88(%rsp)
movq %rbx, 0x100(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0xf0(%rsp)
movapd %xmm0, 0xe0(%rsp)
movapd %xmm0, 0xd0(%rsp)
movapd %xmm0, 0xc0(%rsp)
movapd %xmm0, 0xb0(%rsp)
movapd %xmm0, 0xa0(%rsp)
movl $0x1c, %esi
movq %rbp, %rdi
callq 0x2120
movq %rax, 0xa0(%rsp)
movq (%r12), %rdi
movq %rbp, %rsi
callq 0x2370
movq %rax, (%r12)
movq %rax, %rdi
xorl %esi, %esi
movq %rbp, 0x120(%rsp)
movq %rbp, %rdx
callq 0x20e0
movq 0x18(%r13), %rax
testl $0x7fffffff, 0x14(%rax) # imm = 0x7FFFFFFF
je 0xc05c0
movq 0x20(%rax), %rcx
xorl %edx, %edx
cmpl $0x0, (%rcx,%rdx,8)
js 0xc05af
movb $0x0, 0x4(%rcx,%rdx,8)
incq %rdx
movl 0x14(%rax), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
cmpq %rsi, %rdx
jb 0xc05a4
movq 0x88(%rsp), %rbx
movq 0xc0(%rbx), %rax
xorl %ebp, %ebp
cmpq $0x0, (%rax)
movq %r13, 0x50(%rsp)
je 0xc10eb
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movq $0x0, 0x78(%rsp)
xorl %r12d, %r12d
xorl %edx, %edx
movq 0x10(%rax), %rax
leaq (%rcx,%rcx,4), %rcx
cmpl $0x0, 0x10(%rax,%rcx,8)
movq %rdx, 0x128(%rsp)
je 0xc10cc
leaq (%rax,%rcx,8), %rcx
cmpl $0x0, 0x10(%rcx)
je 0xc10cc
xorl %edx, %edx
movq %rcx, 0x130(%rsp)
movq 0x18(%rcx), %rax
movq %rdx, 0x138(%rsp)
movq (%rax,%rdx,8), %rsi
shrq $0x21, %rsi
movq $0x0, (%rsp)
movq %rbx, %rdi
leaq 0x11c(%rsp), %rdx
leaq 0x118(%rsp), %rcx
leaq 0x90(%rsp), %r8
leaq 0x64(%rsp), %r9
callq 0x13812e
cmpl $0x0, 0x64(%rsp)
je 0xc0717
xorl %eax, %eax
movq $0x0, 0x58(%rsp)
movq %r12, %r9
xorl %r11d, %r11d
movb $0x1, %r10b
movq 0x70(%rsp), %rcx
movq 0x90(%rsp), %rdx
movl (%rdx,%rax,4), %edx
xorq $0x1, %rdx
movb %r10b, (%rcx,%rdx)
movq 0x70(%rsp), %rcx
movq 0x90(%rsp), %rdx
movl (%rdx,%rax,4), %edx
movb %r10b, (%rcx,%rdx)
movq 0x10(%r13), %rcx
movq 0x90(%rsp), %rdx
movl (%rdx,%rax,4), %esi
shrl %esi
leaq (%rsi,%rsi,4), %rdx
movq (%rbx), %rdi
movq 0x80(%rbx), %r8
movl (%rdi,%rsi,4), %edi
incq %r8
cmpq %rdi, %r8
jb 0xc06f9
movq 0x18(%r13), %rdi
movq 0x20(%rdi), %rdi
cmpl $0x0, (%rdi,%rsi,8)
js 0xc06f9
leaq (%rcx,%rdx,8), %rsi
movl 0x10(%rsi), %esi
addq %rsi, 0x58(%rsp)
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
addq %rcx, %r11
incq %rax
movl 0x64(%rsp), %ecx
cmpq %rcx, %rax
jb 0xc0689
jmp 0xc0726
movq $0x0, 0x58(%rsp)
movq %r12, %r9
xorl %r11d, %r11d
movl 0x11c(%rsp), %eax
cmpq %r14, %rax
je 0xc0747
movq 0x10(%r13), %rcx
shrl %eax
leaq (%rax,%rax,4), %rax
movl (%rcx,%rax,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
addq %rax, %r11
movl 0x118(%rsp), %eax
cmpq %r14, %rax
je 0xc0768
movq 0x10(%r13), %rcx
shrl %eax
leaq (%rax,%rax,4), %rax
movl (%rcx,%rax,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
addq %rax, %r11
cmpq $0x0, 0x58(%rsp)
je 0xc1069
movq %r11, 0x80(%rsp)
cmpl $0x0, 0x64(%rsp)
je 0xc0af1
xorl %r12d, %r12d
xorl %edx, %edx
movq 0x90(%rsp), %rax
movl (%rax,%r12,4), %ebp
movq 0x18(%r13), %rdi
movq 0x20(%rdi), %rax
movl %ebp, %ecx
shrl %ecx
cmpl $0x0, (%rax,%rcx,8)
js 0xc0adf
movq 0x28(%rdi), %rax
movq (%rax,%rbp,8), %rax
testl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
je 0xc0adf
movq %rax, %rcx
andq %r14, %rcx
je 0xc0adf
movq %rdx, 0x48(%rsp)
movq 0x8(%rdi), %rdx
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
leaq (%rdx,%rax,8), %rax
addq $0xc, %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
xorl %esi, %esi
movl (%rax,%rdx), %r8d
notl %r8d
shrl $0x1f, %r8d
addl %r8d, %esi
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0xc07f2
cmpl $0x2, %esi
jge 0xc0818
movq 0x48(%rsp), %rdx
jmp 0xc0adf
movq %r9, 0x40(%rsp)
xorl %eax, %eax
movq %rax, 0x38(%rsp)
movl %eax, 0x30(%rsp)
movl %eax, 0x28(%rsp)
movq %rax, 0x20(%rsp)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rsp)
movl %eax, 0x8(%rsp)
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
xorl %esi, %esi
movl %ebp, %edx
movq 0x80(%rsp), %rcx
leaq 0xa0(%rsp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0xbf39f
testq %rax, %rax
je 0xc08e2
movq 0xd8(%rsp), %rax
testq %rax, %rax
setne %cl
je 0xc08ee
movq 0xb8(%rsp), %rdx
movq 0xe8(%rsp), %rsi
movl $0x1, %edi
movq 0x70(%rsp), %r8
xorl %r9d, %r9d
xorl %ebx, %ebx
movl (%rsi,%r9,4), %r9d
cmpl %ebp, %r9d
je 0xc08cf
cmpl (%rdx), %r9d
je 0xc08cf
movq 0x10(%r13), %r10
movl %r9d, %r11d
shrl %r11d
leaq (%r11,%r11,4), %r11
movl 0x10(%r10,%r11,8), %r10d
addq %r10, %rbx
cmpb $0x0, (%r8,%r9)
jne 0xc08cf
xorq $0x1, %r9
cmpb $0x0, (%r8,%r9)
je 0xc08dc
movl %edi, %r9d
incl %edi
cmpq %r9, %rax
seta %cl
ja 0xc0899
shlq $0x20, %rbx
jmp 0xc08f0
movq 0x40(%rsp), %r9
movq 0x48(%rsp), %rdx
jmp 0xc0949
xorl %ebx, %ebx
movq 0x40(%rsp), %r9
testb $0x1, %cl
movq 0x48(%rsp), %rdx
jne 0xc0adf
movq 0x78(%rsp), %rax
cmpq %rax, %rdx
jne 0xc093f
leaq (%rax,%rax), %r13
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r13
leaq (,%r13,8), %rsi
movq %r9, %rdi
callq 0x2370
movq 0x48(%rsp), %rdx
movq %rax, %r9
movq %r13, 0x78(%rsp)
movq 0x50(%rsp), %r13
orq %rbp, %rbx
movq %rbx, (%r9,%rdx,8)
incq %rdx
xorl $0x1, %ebp
movq 0x18(%r13), %rdi
movq 0x28(%rdi), %rax
movq (%rax,%rbp,8), %rax
testl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
je 0xc0adf
movq %rax, %rcx
andq %r14, %rcx
je 0xc0adf
movq %rdx, 0x48(%rsp)
movq 0x8(%rdi), %rdx
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
leaq (%rdx,%rax,8), %rax
addq $0xc, %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
xorl %esi, %esi
movl (%rax,%rdx), %r8d
notl %r8d
shrl $0x1f, %r8d
addl %r8d, %esi
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0xc0994
cmpl $0x2, %esi
jl 0xc080e
movq %r9, 0x40(%rsp)
xorl %eax, %eax
movq %rax, 0x38(%rsp)
movl %eax, 0x30(%rsp)
movl %eax, 0x28(%rsp)
movq %rax, 0x20(%rsp)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rsp)
movl %eax, 0x8(%rsp)
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
xorl %esi, %esi
movl %ebp, %edx
movq 0x80(%rsp), %rcx
leaq 0xa0(%rsp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0xbf39f
testq %rax, %rax
je 0xc0a7e
movq 0xd8(%rsp), %rax
testq %rax, %rax
setne %cl
je 0xc0a88
movq 0xb8(%rsp), %rdx
movq 0xe8(%rsp), %rsi
movl $0x1, %edi
movq 0x70(%rsp), %r8
xorl %r9d, %r9d
xorl %ebx, %ebx
movl (%rsi,%r9,4), %r9d
cmpl %ebp, %r9d
je 0xc0a6b
cmpl (%rdx), %r9d
je 0xc0a6b
movq 0x10(%r13), %r10
movl %r9d, %r11d
shrl %r11d
leaq (%r11,%r11,4), %r11
movl 0x10(%r10,%r11,8), %r10d
addq %r10, %rbx
cmpb $0x0, (%r8,%r9)
jne 0xc0a6b
xorq $0x1, %r9
cmpb $0x0, (%r8,%r9)
je 0xc0a78
movl %edi, %r9d
incl %edi
cmpq %r9, %rax
seta %cl
ja 0xc0a35
shlq $0x20, %rbx
jmp 0xc0a8a
movq 0x40(%rsp), %r9
jmp 0xc080e
xorl %ebx, %ebx
movq 0x40(%rsp), %r9
testb $0x1, %cl
movq 0x48(%rsp), %rdx
jne 0xc0adf
movq 0x78(%rsp), %rax
cmpq %rax, %rdx
jne 0xc0ad5
leaq (%rax,%rax), %r13
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r13
leaq (,%r13,8), %rsi
movq %r9, %rdi
callq 0x2370
movq 0x48(%rsp), %rdx
movq %rax, %r9
movq %r13, 0x78(%rsp)
movq 0x50(%rsp), %r13
orq %rbp, %rbx
movq %rbx, (%r9,%rdx,8)
incq %rdx
incq %r12
movl 0x64(%rsp), %eax
cmpq %rax, %r12
jb 0xc078c
jmp 0xc0af3
xorl %edx, %edx
movq %rdx, 0x48(%rsp)
leaq (%r9,%rdx,8), %rsi
movq %r9, 0x40(%rsp)
movq %r9, %rdi
callq 0x9d53f
movq 0x48(%rsp), %rsi
testq %rsi, %rsi
je 0xc105a
movsd 0x58(%rsp), %xmm0
unpcklps 0x16471c(%rip), %xmm0   # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x164724(%rip), %xmm0   # 0x225250
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x164090(%rip), %xmm1   # 0x224bd0
movapd %xmm1, 0x160(%rsp)
xorl %r12d, %r12d
movq $0x0, 0x68(%rsp)
movq 0x40(%rsp), %r9
xorl %ebp, %ebp
movq (%r9,%r12,8), %rdx
movq 0x18(%r13), %rdi
movq 0x20(%rdi), %rax
movl %edx, %ecx
shrl %ecx
cmpl $0x0, (%rax,%rcx,8)
js 0xc0cd4
movq 0x28(%rdi), %rax
movl %edx, %ecx
testl $0xfffffffe, (%rax,%rcx,8) # imm = 0xFFFFFFFE
je 0xc0cd4
movl %edx, %ecx
movq (%rax,%rcx,8), %rax
movq %rax, %rcx
andq %r14, %rcx
je 0xc0cd4
movq 0x8(%rdi), %rsi
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
leaq (%rsi,%rax,8), %rax
addq $0xc, %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %r10d, %r10d
xorl %esi, %esi
movl (%rax,%r10), %r8d
notl %r8d
shrl $0x1f, %r8d
addl %r8d, %esi
addq $0x18, %r10
cmpq %r10, %rcx
jne 0xc0bbc
cmpl $0x2, %esi
jl 0xc0ccf
movq %rbp, 0x38(%rsp)
movl %ebp, 0x30(%rsp)
movl %ebp, 0x28(%rsp)
movq %rbp, 0x20(%rsp)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rsp)
movl %ebp, 0x8(%rsp)
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
xorl %esi, %esi
movq %rdx, 0x58(%rsp)
movq 0x80(%rsp), %rcx
leaq 0xa0(%rsp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0xbf39f
testq %rax, %rax
je 0xc0cca
movq 0xd8(%rsp), %rax
testq %rax, %rax
setne %r8b
je 0xc0cbc
movq 0xb8(%rsp), %rcx
movq 0xe8(%rsp), %rbx
movl $0x1, %esi
movq 0x70(%rsp), %rdi
xorl %r9d, %r9d
xorl %r10d, %r10d
movq 0x58(%rsp), %rdx
movl (%rbx,%r9,4), %r9d
cmpl %edx, %r9d
je 0xc0cac
cmpl (%rcx), %r9d
je 0xc0cac
movq %r10, %rdx
movq 0x10(%r13), %r10
movl %r9d, %r11d
shrl %r11d
leaq (%r11,%r11,4), %r11
movl 0x10(%r10,%r11,8), %r10d
addq %r10, %rdx
movq %rdx, %r10
cmpb $0x0, (%rdi,%r9)
je 0xc0c9c
movq 0x58(%rsp), %rdx
jmp 0xc0cac
xorq $0x1, %r9
cmpb $0x0, (%rdi,%r9)
movq 0x58(%rsp), %rdx
je 0xc0cc4
movl %esi, %r9d
incl %esi
cmpq %r9, %rax
seta %r8b
ja 0xc0c64
jmp 0xc0cc4
xorl %r10d, %r10d
movq 0x58(%rsp), %rdx
testb $0x1, %r8b
je 0xc0ce5
movq 0x40(%rsp), %r9
movq 0x48(%rsp), %rsi
incl %r12d
cmpq %r12, %rsi
ja 0xc0b5c
jmp 0xc1050
addq 0x68(%rsp), %r10
movq %r10, %xmm0
punpckldq 0x164549(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x164551(%rip), %xmm0   # 0x225250
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
ucomisd 0x160(%rsp), %xmm1
movq 0x40(%rsp), %r9
movq 0x48(%rsp), %rsi
jae 0xc0cd4
movq %r10, 0x98(%rsp)
movq 0x18(%r13), %rdi
movq %rbp, 0x38(%rsp)
movl %ebp, 0x30(%rsp)
movl %ebp, 0x28(%rsp)
movq %rbp, 0x20(%rsp)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rsp)
movl $0x1, 0x8(%rsp)
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
xorl %esi, %esi
movq 0x80(%rsp), %rcx
leaq 0xa0(%rsp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0xbf39f
cmpq %rbp, 0xd8(%rsp)
je 0xc103e
xorl %ebx, %ebx
movq 0x40(%rsp), %r9
movq 0x58(%rsp), %rsi
movq 0x98(%rsp), %rdi
movq 0xe8(%rsp), %rax
movl (%rax,%rbx,4), %eax
cmpl %esi, %eax
je 0xc1024
movq 0xb8(%rsp), %rcx
cmpl (%rcx), %eax
je 0xc1024
movq 0x18(%r13), %rcx
movq 0x20(%rcx), %rcx
shrl %eax
cmpl $0x0, (%rcx,%rax,8)
js 0xc1024
cmpb $0x1, 0x4(%rcx,%rax,8)
jne 0xc1024
movq 0x10(%r13), %rcx
leaq (%rax,%rax,4), %rax
cmpl $0x0, 0xc(%rcx,%rax,8)
je 0xc1024
leaq (%rcx,%rax,8), %rdx
cmpl $0x0, 0x10(%rdx)
je 0xc0ece
xorl %ecx, %ecx
movq %rdx, 0x68(%rsp)
movq 0x18(%rdx), %rax
movq (%rax,%rcx,8), %rdx
shrq $0x21, %rdx
movq 0x20(%r15), %rax
orl $0x80000000, (%rax,%rdx,8) # imm = 0x80000000
addl %edx, %edx
xorl %esi, %esi
leaq (%rsi,%rdx), %rdi
movq 0x28(%r15), %rax
movq (%rax,%rdi,8), %rax
movq %rax, %r8
andq %r14, %r8
je 0xc0eaa
shrq $0x20, %rax
leaq (%rax,%rax,2), %r9
shlq $0x3, %r9
addq 0x8(%r15), %r9
xorl %r10d, %r10d
leaq (%r10,%r10,2), %rax
orb $-0x80, 0xf(%r9,%rax,8)
movl 0x8(%r9,%rax,8), %eax
xorq $0x1, %rax
movq 0x28(%r15), %r11
movq (%r11,%rax,8), %rax
movq %rax, %r11
andq %r14, %r11
je 0xc0ea2
movq 0x8(%r15), %r13
shrq $0x20, %rax
shlq $0x3, %r11
leaq (%r11,%r11,2), %r11
leaq (%rax,%rax,2), %rax
leaq 0xc(,%rax,8), %rax
addq %r13, %rax
xorl %r13d, %r13d
movl -0x4(%rax,%r13), %ebp
xorl %edi, %ebp
cmpl $0x1, %ebp
jne 0xc0e99
orb $-0x80, 0x3(%rax,%r13)
addq $0x18, %r13
cmpq %r13, %r11
jne 0xc0e87
incq %r10
cmpq %r8, %r10
jne 0xc0e42
leaq 0x1(%rsi), %rax
testq %rsi, %rsi
movq %rax, %rsi
je 0xc0e1b
incq %rcx
movq 0x68(%rsp), %rdx
movl 0x10(%rdx), %eax
cmpq %rax, %rcx
jb 0xc0e00
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rax
movq 0xe8(%rsp), %rcx
movl (%rcx,%rbx,4), %ecx
movl %ecx, %edx
shrl %edx
movq 0x20(%rax), %rsi
orl $0x80000000, (%rsi,%rdx,8) # imm = 0x80000000
andl $-0x2, %ecx
xorl %edx, %edx
leaq (%rdx,%rcx), %rsi
movq 0x28(%rax), %rdi
movq (%rdi,%rsi,8), %r8
movq %r8, %rdi
andq %r14, %rdi
je 0xc0f85
shrq $0x20, %r8
leaq (%r8,%r8,2), %r8
shlq $0x3, %r8
addq 0x8(%rax), %r8
xorl %r9d, %r9d
leaq (%r9,%r9,2), %r10
orb $-0x80, 0xf(%r8,%r10,8)
movl 0x8(%r8,%r10,8), %r10d
xorq $0x1, %r10
movq 0x28(%rax), %r11
movq (%r11,%r10,8), %r11
movq %r11, %r10
andq %r14, %r10
je 0xc0f7d
movq 0x8(%rax), %r13
shrq $0x20, %r11
shlq $0x3, %r10
leaq (%r10,%r10,2), %r10
leaq (%r11,%r11,2), %r11
leaq 0xc(,%r11,8), %r11
addq %r13, %r11
xorl %r13d, %r13d
movl -0x4(%r11,%r13), %ebp
xorl %esi, %ebp
cmpl $0x1, %ebp
jne 0xc0f74
orb $-0x80, 0x3(%r11,%r13)
addq $0x18, %r13
cmpq %r13, %r10
jne 0xc0f62
incq %r9
cmpq %rdi, %r9
jne 0xc0f1d
leaq 0x1(%rdx), %rsi
testq %rdx, %rdx
movq %rsi, %rdx
je 0xc0ef6
movq 0x50(%rsp), %r13
movq 0x10(%r13), %rax
movq 0xe8(%rsp), %rcx
movl (%rcx,%rbx,4), %edx
shrl %edx
leaq (%rdx,%rdx,4), %rdx
cmpl $0x0, 0xc(%rax,%rdx,8)
movq 0x40(%rsp), %r9
movl $0x0, %ebp
movq 0x58(%rsp), %rsi
movq 0x98(%rsp), %rdi
je 0xc1024
leaq (%rax,%rdx,8), %rdx
movl %ebp, 0x10(%rdx)
movl (%rcx,%rbx,4), %edx
shrl %edx
leaq (%rdx,%rdx,4), %rdx
movl %ebp, 0xc(%rax,%rdx,8)
movl (%rcx,%rbx,4), %ecx
shrl %ecx
leaq (%rcx,%rcx,4), %rcx
movq 0x18(%rax,%rcx,8), %rdi
callq 0x2220
movq 0x98(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x40(%rsp), %r9
movq 0x10(%r13), %rax
movq 0xe8(%rsp), %rcx
movl (%rcx,%rbx,4), %ecx
shrl %ecx
leaq (%rcx,%rcx,4), %rcx
movq $0x0, 0x18(%rax,%rcx,8)
incl %ebx
cmpq %rbx, 0xd8(%rsp)
ja 0xc0d96
movq %rdi, 0x68(%rsp)
jmp 0xc0ccf
movq 0x98(%rsp), %rax
movq %rax, 0x68(%rsp)
jmp 0xc0cca
movq 0x88(%rsp), %rbx
jmp 0xc1069
movq 0x88(%rsp), %rbx
movq 0x40(%rsp), %r9
xorl %ebp, %ebp
movq %r9, %r12
cmpl $0x0, 0x64(%rsp)
je 0xc10ad
xorl %eax, %eax
movq 0x70(%rsp), %rcx
movq 0x90(%rsp), %rdx
movl (%rdx,%rax,4), %edx
xorq $0x1, %rdx
movb %bpl, (%rcx,%rdx)
movq 0x70(%rsp), %rcx
movq 0x90(%rsp), %rdx
movl (%rdx,%rax,4), %edx
movb %bpl, (%rcx,%rdx)
incq %rax
movl 0x64(%rsp), %ecx
cmpq %rcx, %rax
jb 0xc1075
movq 0x138(%rsp), %rdx
incq %rdx
movq 0x130(%rsp), %rcx
movl 0x10(%rcx), %eax
cmpq %rax, %rdx
jb 0xc0629
movq 0x128(%rsp), %rdx
incl %edx
movq 0xc0(%rbx), %rax
movq %rdx, %rcx
cmpq %rdx, (%rax)
ja 0xc05f6
jmp 0xc10f7
xorl %r12d, %r12d
movq $0x0, 0x78(%rsp)
movq 0x18(%r13), %rdi
testl $0x7fffffff, 0x14(%rdi) # imm = 0x7FFFFFFF
movq %r12, 0x40(%rsp)
je 0xc132f
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
xorl %r12d, %r12d
movq 0x20(%rdi), %rax
cmpl $0x0, (%rax,%r12,8)
js 0xc1317
cmpb $0x1, 0x4(%rax,%r12,8)
jne 0xc1317
movq 0x10(%r13), %rcx
leaq (%r12,%r12,4), %rax
cmpl $0x0, 0xc(%rcx,%rax,8)
je 0xc1317
movq %rax, 0x48(%rsp)
leaq (%rcx,%rax,8), %rcx
cmpl $0x0, 0x10(%rcx)
je 0xc121c
xorl %edx, %edx
movq 0x18(%rcx), %rsi
movq (%rsi,%rdx,8), %rsi
shrq $0x21, %rsi
movq 0x20(%r15), %rdi
orl $0x80000000, (%rdi,%rsi,8) # imm = 0x80000000
addl %esi, %esi
xorl %edi, %edi
leaq (%rdi,%rsi), %r8
movq 0x28(%r15), %r9
movq (%r9,%r8,8), %r10
movq %r10, %r9
andq %r14, %r9
je 0xc11fd
shrq $0x20, %r10
leaq (%r10,%r10,2), %r10
shlq $0x3, %r10
addq 0x8(%r15), %r10
xorl %r11d, %r11d
leaq (%r11,%r11,2), %rbx
orb $-0x80, 0xf(%r10,%rbx,8)
movl 0x8(%r10,%rbx,8), %ebx
xorq $0x1, %rbx
movq 0x28(%r15), %r13
movq (%r13,%rbx,8), %rbx
movq %rbx, %r13
andq %r14, %r13
je 0xc11f5
movq 0x8(%r15), %rbp
shrq $0x20, %rbx
shlq $0x3, %r13
leaq (%r13,%r13,2), %r13
leaq (%rbx,%rbx,2), %rbx
leaq 0xc(%rbp,%rbx,8), %rbp
xorl %ebx, %ebx
movl -0x4(%rbp,%rbx), %eax
xorl %r8d, %eax
cmpl $0x1, %eax
jne 0xc11ec
orb $-0x80, 0x3(%rbp,%rbx)
addq $0x18, %rbx
cmpq %rbx, %r13
jne 0xc11db
incq %r11
cmpq %r9, %r11
jne 0xc119b
leaq 0x1(%rdi), %rax
testq %rdi, %rdi
movq %rax, %rdi
je 0xc1174
incq %rdx
movl 0x10(%rcx), %eax
cmpq %rax, %rdx
jb 0xc1159
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x20(%rcx), %rax
orl $0x80000000, (%rax,%r12,8) # imm = 0x80000000
leaq (%r12,%r12), %rdx
xorl %esi, %esi
leaq (%rsi,%rdx), %rdi
movq 0x28(%rcx), %rax
movq (%rax,%rdi,8), %r9
movq %r9, %r8
andq %r14, %r8
je 0xc12c2
shrq $0x20, %r9
leaq (%r9,%r9,2), %r9
shlq $0x3, %r9
addq 0x8(%rcx), %r9
xorl %r10d, %r10d
leaq (%r10,%r10,2), %rax
orb $-0x80, 0xf(%r9,%rax,8)
movl 0x8(%r9,%rax,8), %eax
xorq $0x1, %rax
movq 0x28(%rcx), %r11
movq (%r11,%rax,8), %rbx
movq %rbx, %r11
andq %r14, %r11
je 0xc12ba
movq 0x8(%rcx), %rax
shrq $0x20, %rbx
shlq $0x3, %r11
leaq (%r11,%r11,2), %r11
leaq (%rbx,%rbx,2), %rbx
leaq (%rax,%rbx,8), %r13
addq $0xc, %r13
xorl %ebx, %ebx
movl -0x4(%r13,%rbx), %eax
xorl %edi, %eax
cmpl $0x1, %eax
jne 0xc12b1
orb $-0x80, 0x3(%r13,%rbx)
addq $0x18, %rbx
cmpq %rbx, %r11
jne 0xc129f
incq %r10
cmpq %r8, %r10
jne 0xc125e
leaq 0x1(%rsi), %rax
testq %rsi, %rsi
movq %rax, %rsi
je 0xc1237
movq 0x50(%rsp), %r13
movq 0x10(%r13), %rcx
movq 0x48(%rsp), %rax
cmpl $0x0, 0xc(%rcx,%rax,8)
je 0xc1317
leaq (%rcx,%rax,8), %rax
xorl %edx, %edx
movl %edx, 0x10(%rax)
leaq (,%r12,8), %rax
leaq (%rax,%rax,4), %rbx
movl %edx, 0xc(%rcx,%rbx)
movq 0x18(%rcx,%rbx), %rdi
callq 0x2220
movq 0x10(%r13), %rax
movq $0x0, 0x18(%rax,%rbx)
incq %r12
movq 0x18(%r13), %rdi
movl 0x14(%rdi), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %r12
jb 0xc1116
callq 0xa02fa
movq 0x18(%r13), %rdi
leaq 0xa0(%rsp), %rsi
callq 0xbf22d
movq %rax, 0x58(%rsp)
xorl %ebp, %ebp
movq 0x120(%rsp), %rax
testl %eax, %eax
je 0xc1503
movl %eax, %r14d
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
xorl %r13d, %r13d
xorl %r10d, %r10d
movq 0x40(%rsp), %r9
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x20(%rdi), %rax
movl %r13d, %ecx
shrl %ecx
cmpl $0x0, (%rax,%rcx,8)
js 0xc14f5
movq 0x28(%rdi), %rax
movq (%rax,%r13,8), %rax
testl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
je 0xc14f5
movq %rax, %rcx
andq %r11, %rcx
je 0xc14f5
movq 0x8(%rdi), %rdx
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
leaq (%rdx,%rax,8), %rax
addq $0xc, %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
xorl %esi, %esi
movl (%rax,%rdx), %r8d
notl %r8d
shrl $0x1f, %r8d
addl %r8d, %esi
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0xc13cb
cmpl $0x2, %esi
jl 0xc14f5
movq %r10, %rbx
movq %r9, %r12
movq %rbp, 0x38(%rsp)
movl %ebp, 0x30(%rsp)
movl %ebp, 0x28(%rsp)
movq %rbp, 0x20(%rsp)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rsp)
movl %ebp, 0x8(%rsp)
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
xorl %esi, %esi
movl %r13d, %edx
movq 0x58(%rsp), %rcx
leaq 0xa0(%rsp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0xbf39f
testq %rax, %rax
je 0xc1490
movq 0xd8(%rsp), %rax
testq %rax, %rax
movq %r12, %r9
movq %rbx, %r10
je 0xc1498
movq 0xb8(%rsp), %rcx
movq 0xe8(%rsp), %rdx
xorl %esi, %esi
xorl %ebp, %ebp
movl (%rdx,%rsi,4), %edi
cmpq %rdi, %r13
je 0xc1484
cmpl (%rcx), %edi
je 0xc1484
movq 0x50(%rsp), %r8
movq 0x10(%r8), %r8
shrl %edi
leaq (%rdi,%rdi,4), %rdi
movl 0x10(%r8,%rdi,8), %edi
addq %rdi, %rbp
incq %rsi
movl %esi, %edi
cmpq %rdi, %rax
ja 0xc1461
jmp 0xc149a
movq %r12, %r9
movq %rbx, %r10
jmp 0xc14ef
xorl %ebp, %ebp
cmpq $0x10, %rbp
ja 0xc14ed
movq 0x78(%rsp), %rax
cmpq %rax, %r10
jne 0xc14d5
leaq (%rax,%rax), %r12
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %r12
leaq (,%r12,8), %rsi
movq %r9, %rdi
callq 0x2370
movq %rbx, %r10
movq %rax, %r9
movq %r12, 0x78(%rsp)
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
shlq $0x20, %rbp
orq %r13, %rbp
movq %rbp, (%r9,%r10,8)
incq %r10
xorl %ebp, %ebp
jmp 0xc14f5
xorl %ebp, %ebp
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
incq %r13
cmpq %r14, %r13
jne 0xc1370
jmp 0xc150b
xorl %r10d, %r10d
movq 0x40(%rsp), %r9
movq %r10, 0x48(%rsp)
movq %r9, 0x40(%rsp)
leaq (%r9,%r10,8), %rsi
movq %r9, %rdi
callq 0x9d53f
movq 0x48(%rsp), %r10
movq 0x40(%rsp), %r9
testq %r10, %r10
je 0xc1be1
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
xorl %eax, %eax
xorl %r14d, %r14d
movq (%r9,%rax,8), %r13
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x20(%rdi), %rax
movl %r13d, %ecx
shrl %ecx
cmpl $0x0, (%rax,%rcx,8)
js 0xc1bd2
movq 0x28(%rdi), %rax
movl %r13d, %ecx
testl $0xfffffffe, (%rax,%rcx,8) # imm = 0xFFFFFFFE
je 0xc1bd2
movl %r13d, %ecx
movq (%rax,%rcx,8), %rax
movq %rax, %rcx
andq %r12, %rcx
je 0xc1bd2
movq 0x8(%rdi), %rdx
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
leaq (%rdx,%rax,8), %rax
addq $0xc, %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
xorl %esi, %esi
movl (%rax,%rdx), %r8d
notl %r8d
shrl $0x1f, %r8d
addl %r8d, %esi
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0xc15a6
cmpl $0x2, %esi
jl 0xc1bd2
xorl %eax, %eax
movq %rax, 0x38(%rsp)
movl %eax, 0x30(%rsp)
movl %eax, 0x28(%rsp)
movq %rax, 0x20(%rsp)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rsp)
movl %eax, 0x8(%rsp)
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
xorl %esi, %esi
movl %r13d, %edx
movq 0x58(%rsp), %rcx
leaq 0xa0(%rsp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0xbf39f
movq 0x48(%rsp), %r10
movq 0x40(%rsp), %r9
testq %rax, %rax
je 0xc1bd2
movq 0xb8(%rsp), %rcx
movq 0xd8(%rsp), %rax
movl (%rcx), %ebp
testq %rax, %rax
je 0xc167b
movq 0xe8(%rsp), %rcx
xorl %edx, %edx
xorl %ebx, %ebx
movl (%rcx,%rdx,4), %esi
cmpl %r13d, %esi
sete %dil
cmpl %ebp, %esi
sete %r8b
orb %dil, %r8b
jne 0xc166f
movl %esi, %esi
movq 0x50(%rsp), %rdi
movq 0x10(%rdi), %rdi
shrl %esi
leaq (%rsi,%rsi,4), %rsi
movl 0x10(%rdi,%rsi,8), %esi
addq %rsi, %rbx
incq %rdx
movl %edx, %esi
cmpq %rsi, %rax
ja 0xc1642
jmp 0xc167d
xorl %ebx, %ebx
cmpq $0x10, %rbx
ja 0xc1bd2
movq $0x0, 0xd8(%rsp)
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rdi
movl %r13d, %edx
xorl $0x1, %edx
leaq 0xa0(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x140(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x148(%rsp), %rax
movq %rax, (%rsp)
movl $0x1, 0x10(%rsp)
xorl %esi, %esi
leaq 0x114(%rsp), %rcx
leaq 0x158(%rsp), %r8
leaq 0x150(%rsp), %r9
callq 0x10109f
movq 0xd8(%rsp), %rax
testq %rax, %rax
je 0xc1783
movq 0x88(%rsp), %rdx
movq (%rdx), %rcx
movq 0x80(%rdx), %rdx
movq 0xe8(%rsp), %rsi
incq %rdx
movl $0x1, %r8d
xorl %r9d, %r9d
xorl %edi, %edi
movl (%rsi,%r9,4), %r9d
shrl %r9d
movl (%rcx,%r9,4), %r10d
cmpq %r10, %rdx
jb 0xc1758
movq 0x50(%rsp), %r10
movq 0x10(%r10), %r10
leaq (%r9,%r9,4), %r9
movl 0x10(%r10,%r9,8), %r9d
addq %r9, %rdi
movl %r8d, %r9d
incl %r8d
cmpq %r9, %rax
ja 0xc1728
movq %rdi, %xmm1
punpckldq 0x163adb(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x163ae3(%rip), %xmm1   # 0x225250
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x16344f(%rip), %xmm0   # 0x224bd0
jmp 0xc1787
xorpd %xmm0, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %rbx, %xmm1
ucomisd %xmm0, %xmm1
movq 0x40(%rsp), %r9
movq 0x48(%rsp), %r10
jae 0xc1bd2
movsd %xmm1, 0x68(%rsp)
movq $0x0, 0xd8(%rsp)
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rdi
leaq 0xa0(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x140(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x148(%rsp), %rax
movq %rax, (%rsp)
movl $0x1, 0x10(%rsp)
xorl %esi, %esi
movl %ebp, %edx
leaq 0x114(%rsp), %rcx
leaq 0x158(%rsp), %r8
leaq 0x150(%rsp), %r9
callq 0x10109f
movq 0xd8(%rsp), %rax
testq %rax, %rax
je 0xc18a1
movq 0x88(%rsp), %rdx
movq (%rdx), %rcx
movq 0x80(%rdx), %rdx
movq 0xe8(%rsp), %rsi
incq %rdx
movl $0x1, %r8d
xorl %r9d, %r9d
xorl %edi, %edi
movl (%rsi,%r9,4), %r9d
shrl %r9d
movl (%rcx,%r9,4), %r10d
cmpq %r10, %rdx
jb 0xc1876
movq 0x50(%rsp), %r10
movq 0x10(%r10), %r10
leaq (%r9,%r9,4), %r9
movl 0x10(%r10,%r9,8), %r9d
addq %r9, %rdi
movl %r8d, %r9d
incl %r8d
cmpq %r9, %rax
ja 0xc1846
movq %rdi, %xmm1
punpckldq 0x1639bd(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1639c5(%rip), %xmm1   # 0x225250
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x163331(%rip), %xmm0   # 0x224bd0
jmp 0xc18a5
xorpd %xmm0, %xmm0
movsd 0x68(%rsp), %xmm1
ucomisd %xmm0, %xmm1
movq 0x40(%rsp), %r9
movq 0x48(%rsp), %r10
jae 0xc1bd2
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rdi
xorl %ebx, %ebx
movq %rbx, 0x38(%rsp)
movl %ebx, 0x30(%rsp)
movl %ebx, 0x28(%rsp)
movq %rbx, 0x20(%rsp)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rsp)
movl $0x1, 0x8(%rsp)
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
xorl %esi, %esi
movl %r13d, %edx
movq 0x58(%rsp), %rcx
leaq 0xa0(%rsp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0xbf39f
movq 0x48(%rsp), %r10
movq 0x40(%rsp), %r9
cmpq %rbx, 0xd8(%rsp)
je 0xc1bd2
xorl %ebx, %ebx
movq 0xe8(%rsp), %rax
movl (%rax,%rbx,4), %eax
cmpl %r13d, %eax
je 0xc1bc2
movq 0xb8(%rsp), %rcx
cmpl (%rcx), %eax
je 0xc1bc2
movq 0x50(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
shrl %eax
cmpl $0x0, (%rcx,%rax,8)
js 0xc1bc2
cmpb $0x1, 0x4(%rcx,%rax,8)
jne 0xc1bc2
movq 0x50(%rsp), %rcx
movq 0x10(%rcx), %rcx
leaq (%rax,%rax,4), %rax
cmpl $0x0, 0xc(%rcx,%rax,8)
je 0xc1bc2
movq %rbx, 0x80(%rsp)
leaq (%rcx,%rax,8), %rdx
cmpl $0x0, 0x10(%rdx)
je 0xc1a6e
xorl %ecx, %ecx
movq %rdx, 0x68(%rsp)
movq 0x18(%rdx), %rax
movq (%rax,%rcx,8), %rdx
shrq $0x21, %rdx
movq 0x20(%r15), %rax
orl $0x80000000, (%rax,%rdx,8) # imm = 0x80000000
addl %edx, %edx
xorl %esi, %esi
leaq (%rsi,%rdx), %rdi
movq 0x28(%r15), %rax
movq (%rax,%rdi,8), %rax
movq %rax, %r8
andq %r12, %r8
je 0xc1a4a
shrq $0x20, %rax
leaq (%rax,%rax,2), %r9
shlq $0x3, %r9
addq 0x8(%r15), %r9
xorl %r10d, %r10d
leaq (%r10,%r10,2), %rax
orb $-0x80, 0xf(%r9,%rax,8)
movl 0x8(%r9,%rax,8), %eax
xorq $0x1, %rax
movq 0x28(%r15), %r11
movq (%r11,%rax,8), %rax
movq %rax, %r11
andq %r12, %r11
je 0xc1a42
movq 0x8(%r15), %rbp
shrq $0x20, %rax
shlq $0x3, %r11
leaq (%r11,%r11,2), %r11
leaq (%rax,%rax,2), %rax
leaq 0xc(%rbp,%rax,8), %rbp
xorl %eax, %eax
movl -0x4(%rbp,%rax), %ebx
xorl %edi, %ebx
cmpl $0x1, %ebx
jne 0xc1a39
orb $-0x80, 0x3(%rbp,%rax)
addq $0x18, %rax
cmpq %rax, %r11
jne 0xc1a29
incq %r10
cmpq %r8, %r10
jne 0xc19eb
leaq 0x1(%rsi), %rax
testq %rsi, %rsi
movq %rax, %rsi
je 0xc19c4
incq %rcx
movq 0x68(%rsp), %rdx
movl 0x10(%rdx), %eax
cmpq %rax, %rcx
jb 0xc19a9
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rax
movq 0xe8(%rsp), %rcx
movq 0x80(%rsp), %rdx
movl (%rcx,%rdx,4), %ecx
movl %ecx, %edx
shrl %edx
movq 0x20(%rax), %rsi
orl $0x80000000, (%rsi,%rdx,8) # imm = 0x80000000
andl $-0x2, %ecx
xorl %edx, %edx
leaq (%rdx,%rcx), %rsi
movq 0x28(%rax), %rdi
movq (%rdi,%rsi,8), %r8
movq %r8, %rdi
andq %r12, %rdi
je 0xc1b29
shrq $0x20, %r8
leaq (%r8,%r8,2), %r8
shlq $0x3, %r8
addq 0x8(%rax), %r8
xorl %r9d, %r9d
leaq (%r9,%r9,2), %r10
orb $-0x80, 0xf(%r8,%r10,8)
movl 0x8(%r8,%r10,8), %r10d
xorq $0x1, %r10
movq 0x28(%rax), %r11
movq (%r11,%r10,8), %r11
movq %r11, %r10
andq %r12, %r10
je 0xc1b21
movq 0x8(%rax), %rbx
shrq $0x20, %r11
shlq $0x3, %r10
leaq (%r10,%r10,2), %r10
leaq (%r11,%r11,2), %r11
leaq (%rbx,%r11,8), %r11
addq $0xc, %r11
xorl %ebp, %ebp
movl -0x4(%r11,%rbp), %ebx
xorl %esi, %ebx
cmpl $0x1, %ebx
jne 0xc1b18
orb $-0x80, 0x3(%r11,%rbp)
addq $0x18, %rbp
cmpq %rbp, %r10
jne 0xc1b06
incq %r9
cmpq %rdi, %r9
jne 0xc1ac5
leaq 0x1(%rdx), %rsi
testq %rdx, %rdx
movq %rsi, %rdx
je 0xc1a9e
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xe8(%rsp), %rcx
movq 0x80(%rsp), %rbx
movl (%rcx,%rbx,4), %edx
shrl %edx
leaq (%rdx,%rdx,4), %rdx
cmpl $0x0, 0xc(%rax,%rdx,8)
movq 0x40(%rsp), %r9
movq 0x48(%rsp), %r10
je 0xc1bc2
leaq (%rax,%rdx,8), %rdx
xorl %esi, %esi
movl %esi, 0x10(%rdx)
movl (%rcx,%rbx,4), %edx
shrl %edx
leaq (%rdx,%rdx,4), %rdx
movl %esi, 0xc(%rax,%rdx,8)
movl (%rcx,%rbx,4), %ecx
shrl %ecx
leaq (%rcx,%rcx,4), %rcx
movq 0x18(%rax,%rcx,8), %rdi
callq 0x2220
movq 0x48(%rsp), %r10
movq 0x40(%rsp), %r9
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xe8(%rsp), %rcx
movl (%rcx,%rbx,4), %ecx
shrl %ecx
leaq (%rcx,%rcx,4), %rcx
movq $0x0, 0x18(%rax,%rcx,8)
incl %ebx
cmpq %rbx, 0xd8(%rsp)
ja 0xc192c
incl %r14d
movq %r14, %rax
cmpq %r14, %r10
ja 0xc153f
movq 0x50(%rsp), %r13
movq 0x18(%r13), %rdi
testl $0x7fffffff, 0x14(%rdi) # imm = 0x7FFFFFFF
je 0xc1e19
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
xorl %r12d, %r12d
movq 0x20(%rdi), %rax
cmpl $0x0, (%rax,%r12,8)
js 0xc1e01
cmpb $0x1, 0x4(%rax,%r12,8)
jne 0xc1e01
movq 0x10(%r13), %rcx
leaq (%r12,%r12,4), %rax
cmpl $0x0, 0xc(%rcx,%rax,8)
je 0xc1e01
movq %rax, 0x48(%rsp)
leaq (%rcx,%rax,8), %rcx
cmpl $0x0, 0x10(%rcx)
je 0xc1d06
xorl %edx, %edx
movq 0x18(%rcx), %rsi
movq (%rsi,%rdx,8), %rsi
shrq $0x21, %rsi
movq 0x20(%r15), %rdi
orl $0x80000000, (%rdi,%rsi,8) # imm = 0x80000000
addl %esi, %esi
xorl %edi, %edi
leaq (%rdi,%rsi), %r8
movq 0x28(%r15), %r9
movq (%r9,%r8,8), %r10
movq %r10, %r9
andq %r14, %r9
je 0xc1ce7
shrq $0x20, %r10
leaq (%r10,%r10,2), %r10
shlq $0x3, %r10
addq 0x8(%r15), %r10
xorl %r11d, %r11d
leaq (%r11,%r11,2), %rbx
orb $-0x80, 0xf(%r10,%rbx,8)
movl 0x8(%r10,%rbx,8), %ebx
xorq $0x1, %rbx
movq 0x28(%r15), %r13
movq (%r13,%rbx,8), %rbx
movq %rbx, %r13
andq %r14, %r13
je 0xc1cdf
movq 0x8(%r15), %rbp
shrq $0x20, %rbx
shlq $0x3, %r13
leaq (%r13,%r13,2), %r13
leaq (%rbx,%rbx,2), %rbx
leaq 0xc(%rbp,%rbx,8), %rbp
xorl %ebx, %ebx
movl -0x4(%rbp,%rbx), %eax
xorl %r8d, %eax
cmpl $0x1, %eax
jne 0xc1cd6
orb $-0x80, 0x3(%rbp,%rbx)
addq $0x18, %rbx
cmpq %rbx, %r13
jne 0xc1cc5
incq %r11
cmpq %r9, %r11
jne 0xc1c85
leaq 0x1(%rdi), %rax
testq %rdi, %rdi
movq %rax, %rdi
je 0xc1c5e
incq %rdx
movl 0x10(%rcx), %eax
cmpq %rax, %rdx
jb 0xc1c43
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x20(%rcx), %rax
orl $0x80000000, (%rax,%r12,8) # imm = 0x80000000
leaq (%r12,%r12), %rdx
xorl %esi, %esi
leaq (%rsi,%rdx), %rdi
movq 0x28(%rcx), %rax
movq (%rax,%rdi,8), %r9
movq %r9, %r8
andq %r14, %r8
je 0xc1dac
shrq $0x20, %r9
leaq (%r9,%r9,2), %r9
shlq $0x3, %r9
addq 0x8(%rcx), %r9
xorl %r10d, %r10d
leaq (%r10,%r10,2), %rax
orb $-0x80, 0xf(%r9,%rax,8)
movl 0x8(%r9,%rax,8), %eax
xorq $0x1, %rax
movq 0x28(%rcx), %r11
movq (%r11,%rax,8), %rbx
movq %rbx, %r11
andq %r14, %r11
je 0xc1da4
movq 0x8(%rcx), %rax
shrq $0x20, %rbx
shlq $0x3, %r11
leaq (%r11,%r11,2), %r11
leaq (%rbx,%rbx,2), %rbx
leaq (%rax,%rbx,8), %r13
addq $0xc, %r13
xorl %ebx, %ebx
movl -0x4(%r13,%rbx), %eax
xorl %edi, %eax
cmpl $0x1, %eax
jne 0xc1d9b
orb $-0x80, 0x3(%r13,%rbx)
addq $0x18, %rbx
cmpq %rbx, %r11
jne 0xc1d89
incq %r10
cmpq %r8, %r10
jne 0xc1d48
leaq 0x1(%rsi), %rax
testq %rsi, %rsi
movq %rax, %rsi
je 0xc1d21
movq 0x50(%rsp), %r13
movq 0x10(%r13), %rcx
movq 0x48(%rsp), %rax
cmpl $0x0, 0xc(%rcx,%rax,8)
je 0xc1e01
leaq (%rcx,%rax,8), %rax
xorl %edx, %edx
movl %edx, 0x10(%rax)
leaq (,%r12,8), %rax
leaq (%rax,%rax,4), %rbx
movl %edx, 0xc(%rcx,%rbx)
movq 0x18(%rcx,%rbx), %rdi
callq 0x2220
movq 0x10(%r13), %rax
movq $0x0, 0x18(%rax,%rbx)
incq %r12
movq 0x18(%r13), %rdi
movl 0x14(%rdi), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %r12
jb 0xc1c00
callq 0xa02fa
movq %r15, %rdi
callq 0xa02fa
movq 0xa0(%rsp), %rdi
callq 0x2220
movq 0xb8(%rsp), %rdi
callq 0x2220
movq 0xd0(%rsp), %rdi
callq 0x2220
movq 0xe8(%rsp), %rdi
callq 0x2220
movq 0x100(%rsp), %rdi
callq 0x2220
movq %r13, %rdi
callq 0xa0004
movq 0x70(%rsp), %rdi
callq 0x2220
movq 0x40(%rsp), %rdi
callq 0x2220
movq 0x88(%rsp), %rbx
movq %rbx, %rdi
callq 0x1380d4
movq %rbx, %rdi
callq 0x2220
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq