// File: 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
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0xe7ae0
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movl %eax, -0x48(%rbp)
movsd 0x280369(%rip), %xmm0   # 0x37f018
movsd %xmm0, -0x70(%rbp)
movq $0x0, -0x78(%rbp)
movq -0x8(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq 0x2c5b29(%rip), %rax    # 0x3c47f8
movl 0x1bc(%rax), %r8d
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x2, %r8d
cmovgl %ecx, %eax
leaq -0x78(%rbp), %rcx
movzbl %al, %r8d
callq 0x322770
movq %rax, -0x80(%rbp)
leaq -0x108(%rbp), %rdi
xorl %esi, %esi
movl $0x68, %edx
callq 0x2100
movl -0x48(%rbp), %eax
movl %eax, %edi
movl $0x1c, %esi
callq 0x2140
movq %rax, -0x108(%rbp)
movq -0x78(%rbp), %rdi
movl -0x48(%rbp), %eax
movl %eax, %esi
shlq $0x0, %rsi
callq 0x2360
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
movl -0x48(%rbp), %eax
movl %eax, %edx
shlq $0x0, %rdx
xorl %esi, %esi
callq 0x2100
movq $0x0, -0x118(%rbp)
movq $0x0, -0x120(%rbp)
movq $0x0, -0x110(%rbp)
movl $0x0, -0x58(%rbp)
movl $0x0, -0x54(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x68(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0xfedd1
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0xfedb2
jmp 0xfedc6
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
movb $0x0, 0x4(%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xfed7e
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x80(%rbp), %rcx
movq 0xc0(%rcx), %rcx
cmpq (%rcx), %rax
jae 0xffa04
movq -0x80(%rbp), %rax
movq 0xc0(%rax), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0xfee1b
jmp 0xff9f6
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0xff9f4
movq -0x80(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
shrq $0x21, %rsi
leaq -0x4c(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq -0x40(%rbp), %r8
leaq -0x44(%rbp), %r9
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x1c4b20
movq $0x0, -0x88(%rbp)
movq $0x0, -0x90(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jae 0xfef7f
movq -0x78(%rbp), %rax
movq -0x40(%rbp), %rcx
movl -0x1c(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
movb $0x1, (%rax,%rcx)
movq -0x78(%rbp), %rax
movq -0x40(%rbp), %rcx
movl -0x1c(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
movb $0x1, (%rax,%rcx)
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x40(%rbp), %rcx
movl -0x1c(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
addq -0x88(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq -0x40(%rbp), %rcx
movl -0x1c(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movq -0x80(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jbe 0xfef1c
jmp 0xfef71
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq -0x40(%rbp), %rcx
movl -0x1c(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0xfef43
jmp 0xfef71
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x40(%rbp), %rcx
movl -0x1c(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
addq -0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xfee85
cmpl $-0x1, -0x4c(%rbp)
je 0xfefb2
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
addq -0x88(%rbp), %rax
movq %rax, -0x88(%rbp)
cmpl $-0x1, -0x50(%rbp)
je 0xfefe5
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
addq -0x88(%rbp), %rax
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x90(%rbp)
je 0xff9a1
movq $0x0, -0x120(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jae 0xff4a0
movq -0x40(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x24(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0xff041
jmp 0xff492
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
cmpl $0x2, %eax
jae 0xff05e
jmp 0xff492
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x24(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x2, %eax
jge 0xff07c
jmp 0xff492
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x24(%rbp), %edx
movq -0x88(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
leaq -0x108(%rbp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
callq 0xfe040
cmpq $0x0, %rax
je 0xff264
movq $0x0, -0x98(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpq -0xd0(%rbp), %rax
jae 0xff1b7
movq -0xc0(%rbp), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0x24(%rbp), %eax
je 0xff13f
movq -0xc0(%rbp), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0xf0(%rbp), %rcx
cmpl (%rcx), %eax
jne 0xff141
jmp 0xff1a9
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
addq -0x98(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x78(%rbp), %rax
movq -0xc0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
cmpb $0x0, (%rax,%rcx)
jne 0xff1a7
movq -0x78(%rbp), %rax
movq -0xc0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
cmpb $0x0, (%rax,%rcx)
jne 0xff1a7
jmp 0xff1b7
jmp 0xff1a9
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xff105
movl -0x20(%rbp), %eax
cmpq -0xd0(%rbp), %rax
jae 0xff1c8
jmp 0xff492
jmp 0xff1ca
movq -0x120(%rbp), %rax
cmpq -0x118(%rbp), %rax
jne 0xff231
cmpq $0x0, -0x118(%rbp)
je 0xff1f7
movq -0x118(%rbp), %rax
shlq %rax
movq %rax, -0x150(%rbp)
jmp 0xff205
movl $0x2, %eax
movq %rax, -0x150(%rbp)
jmp 0xff205
movq -0x150(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x110(%rbp), %rdi
movq -0x118(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0x110(%rbp)
movq -0x98(%rbp), %rdx
shlq $0x20, %rdx
movl -0x24(%rbp), %eax
orq %rax, %rdx
movq -0x110(%rbp), %rax
movq -0x120(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x120(%rbp)
movq %rdx, (%rax,%rcx,8)
jmp 0xff264
movl -0x24(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
cmpl $0x2, %eax
jae 0xff28a
jmp 0xff492
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x24(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x2, %eax
jge 0xff2a8
jmp 0xff492
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x24(%rbp), %edx
movq -0x88(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
leaq -0x108(%rbp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
callq 0xfe040
cmpq $0x0, %rax
je 0xff490
movq $0x0, -0x98(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpq -0xd0(%rbp), %rax
jae 0xff3e3
movq -0xc0(%rbp), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0x24(%rbp), %eax
je 0xff36b
movq -0xc0(%rbp), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0xf0(%rbp), %rcx
cmpl (%rcx), %eax
jne 0xff36d
jmp 0xff3d5
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
addq -0x98(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x78(%rbp), %rax
movq -0xc0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
cmpb $0x0, (%rax,%rcx)
jne 0xff3d3
movq -0x78(%rbp), %rax
movq -0xc0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
cmpb $0x0, (%rax,%rcx)
jne 0xff3d3
jmp 0xff3e3
jmp 0xff3d5
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xff331
movl -0x20(%rbp), %eax
cmpq -0xd0(%rbp), %rax
jae 0xff3f4
jmp 0xff492
jmp 0xff3f6
movq -0x120(%rbp), %rax
cmpq -0x118(%rbp), %rax
jne 0xff45d
cmpq $0x0, -0x118(%rbp)
je 0xff423
movq -0x118(%rbp), %rax
shlq %rax
movq %rax, -0x158(%rbp)
jmp 0xff431
movl $0x2, %eax
movq %rax, -0x158(%rbp)
jmp 0xff431
movq -0x158(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x110(%rbp), %rdi
movq -0x118(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0x110(%rbp)
movq -0x98(%rbp), %rdx
shlq $0x20, %rdx
movl -0x24(%rbp), %eax
orq %rax, %rdx
movq -0x110(%rbp), %rax
movq -0x120(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x120(%rbp)
movq %rdx, (%rax,%rcx,8)
jmp 0xff490
jmp 0xff492
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xff005
movq -0x110(%rbp), %rdi
movq -0x110(%rbp), %rsi
movq -0x120(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0xc90e0
movq $0x0, -0xa0(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpq -0x120(%rbp), %rax
jae 0xff99f
movq -0x110(%rbp), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x24(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x24(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0xff517
jmp 0xff991
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
cmpl $0x2, %eax
jae 0xff534
jmp 0xff991
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x24(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x2, %eax
jge 0xff552
jmp 0xff991
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x24(%rbp), %edx
movq -0x88(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
leaq -0x108(%rbp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
callq 0xfe040
cmpq $0x0, %rax
je 0xff98f
movq $0x0, -0x98(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpq -0xd0(%rbp), %rax
jae 0xff68d
movq -0xc0(%rbp), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0x24(%rbp), %eax
je 0xff615
movq -0xc0(%rbp), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0xf0(%rbp), %rcx
cmpl (%rcx), %eax
jne 0xff617
jmp 0xff67f
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
addq -0x98(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x78(%rbp), %rax
movq -0xc0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
cmpb $0x0, (%rax,%rcx)
jne 0xff67d
movq -0x78(%rbp), %rax
movq -0xc0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
cmpb $0x0, (%rax,%rcx)
jne 0xff67d
jmp 0xff68d
jmp 0xff67f
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xff5db
movl -0x20(%rbp), %eax
cmpq -0xd0(%rbp), %rax
jae 0xff69e
jmp 0xff991
movq -0xa0(%rbp), %rax
movq -0x98(%rbp), %rcx
addq %rcx, %rax
movq %rax, %xmm0
movaps 0x282955(%rip), %xmm3   # 0x382010
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x282959(%rip), %xmm2   # 0x382020
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq -0x90(%rbp), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
mulsd -0x70(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jb 0xff701
jmp 0xff991
movq -0x98(%rbp), %rax
addq -0xa0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x24(%rbp), %edx
movq -0x88(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
leaq -0x108(%rbp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl $0x1, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
callq 0xfe040
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpq -0xd0(%rbp), %rax
jae 0xff986
movq -0xc0(%rbp), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0x24(%rbp), %eax
je 0xff7c4
movq -0xc0(%rbp), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0xf0(%rbp), %rcx
cmpl (%rcx), %eax
jne 0xff7c9
jmp 0xff978
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0xff7f6
jmp 0xff978
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
movzbl 0x4(%rax,%rcx,8), %eax
cmpl $0x1, %eax
je 0xff822
jmp 0xff978
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0xff855
jmp 0xff978
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x60(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0xff891
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x2c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
movl %eax, %esi
callq 0xd9510
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xff85c
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0xc0(%rbp), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %esi
shrl %esi
callq 0xd9510
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xc(%rax)
je 0xff976
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x10(%rax)
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0xc(%rax)
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdi
callq 0x2210
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x20(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x18(%rax)
jmp 0xff978
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xff78a
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0xff991
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xff4d3
jmp 0xff9a1
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jae 0xff9e4
movq -0x78(%rbp), %rax
movq -0x40(%rbp), %rcx
movl -0x1c(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
movq -0x78(%rbp), %rax
movq -0x40(%rbp), %rcx
movl -0x1c(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
movb $0x0, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xff9a8
jmp 0xff9e6
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xfee22
jmp 0xff9f6
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xfedd8
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x68(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0xffb64
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x24(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0xffa46
jmp 0xffb56
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x24(%rbp), %ecx
movzbl 0x4(%rax,%rcx,8), %eax
cmpl $0x1, %eax
je 0xffa64
jmp 0xffb56
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0xffa89
jmp 0xffb56
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x60(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0xffac5
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
movl %eax, %esi
callq 0xd9510
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xffa90
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x24(%rbp), %esi
callq 0xd9510
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xc(%rax)
je 0xffb54
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x10(%rax)
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0xc(%rax)
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdi
callq 0x2210
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x18(%rax)
jmp 0xffb56
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xffa0b
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0xcdd10
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x108(%rbp), %rsi
callq 0xfde50
movq %rax, -0x88(%rbp)
movq $0x0, -0x120(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x48(%rbp), %eax
jae 0xffdc1
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x24(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0xffbcd
jmp 0xffdb3
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
cmpl $0x2, %eax
jae 0xffbea
jmp 0xffdb3
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x24(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x2, %eax
jge 0xffc08
jmp 0xffdb3
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x24(%rbp), %edx
movq -0x88(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
leaq -0x108(%rbp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
callq 0xfe040
cmpq $0x0, %rax
je 0xffdb1
movq $0x0, -0x98(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpq -0xd0(%rbp), %rax
jae 0xffd05
movq -0xc0(%rbp), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0x24(%rbp), %eax
je 0xffcc7
movq -0xc0(%rbp), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0xf0(%rbp), %rcx
cmpl (%rcx), %eax
jne 0xffcc9
jmp 0xffcfa
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x14(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
addq -0x98(%rbp), %rax
movq %rax, -0x98(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xffc91
cmpq $0x10, -0x98(%rbp)
ja 0xffdaf
jmp 0xffd15
movq -0x120(%rbp), %rax
cmpq -0x118(%rbp), %rax
jne 0xffd7c
cmpq $0x0, -0x118(%rbp)
je 0xffd42
movq -0x118(%rbp), %rax
shlq %rax
movq %rax, -0x160(%rbp)
jmp 0xffd50
movl $0x2, %eax
movq %rax, -0x160(%rbp)
jmp 0xffd50
movq -0x160(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x110(%rbp), %rdi
movq -0x118(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0x110(%rbp)
movq -0x98(%rbp), %rdx
shlq $0x20, %rdx
movl -0x24(%rbp), %eax
orq %rax, %rdx
movq -0x110(%rbp), %rax
movq -0x120(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x120(%rbp)
movq %rdx, (%rax,%rcx,8)
jmp 0xffdaf
jmp 0xffdb1
jmp 0xffdb3
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xffb9e
movq -0x110(%rbp), %rdi
movq -0x110(%rbp), %rsi
movq -0x120(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0xc90e0
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpq -0x120(%rbp), %rax
jae 0x100491
movq -0x110(%rbp), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x24(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x24(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0xffe2d
jmp 0x100483
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
cmpl $0x2, %eax
jae 0xffe4a
jmp 0x100483
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x24(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x2, %eax
jge 0xffe68
jmp 0x100483
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x24(%rbp), %edx
movq -0x88(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
leaq -0x108(%rbp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
callq 0xfe040
cmpq $0x0, %rax
je 0x100481
movq -0xf0(%rbp), %rax
movl (%rax), %eax
xorl $0x1, %eax
movl %eax, -0x28(%rbp)
movq $0x0, -0x98(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpq -0xd0(%rbp), %rax
jae 0xfff74
movq -0xc0(%rbp), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0x24(%rbp), %eax
je 0xfff36
movq -0xc0(%rbp), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0xf0(%rbp), %rcx
cmpl (%rcx), %eax
jne 0xfff38
jmp 0xfff69
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x14(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
addq -0x98(%rbp), %rax
movq %rax, -0x98(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xfff00
cmpq $0x10, -0x98(%rbp)
ja 0x10047f
movq $0x0, -0xd0(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x24(%rbp), %edx
xorl $0x1, %edx
xorl %eax, %eax
movl %eax, %esi
leaq -0x124(%rbp), %rcx
leaq -0x130(%rbp), %r8
leaq -0x138(%rbp), %r9
leaq -0x140(%rbp), %r11
leaq -0x148(%rbp), %r10
leaq -0x108(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x166c30
movq $0x0, -0x90(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpq -0xd0(%rbp), %rax
jae 0x10006f
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x18(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movq -0x80(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jbe 0x100033
jmp 0x10006f
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x18(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
addq -0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xffff6
movq -0x98(%rbp), %xmm0
movaps 0x281f92(%rip), %xmm3   # 0x382010
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x281f96(%rip), %xmm2   # 0x382020
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq -0x90(%rbp), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
mulsd -0x70(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jb 0x1000c4
jmp 0x100483
movq $0x0, -0xd0(%rbp)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x28(%rbp), %edx
xorl $0x1, %edx
xorl %eax, %eax
movl %eax, %esi
leaq -0x124(%rbp), %rcx
leaq -0x130(%rbp), %r8
leaq -0x138(%rbp), %r9
leaq -0x140(%rbp), %r11
leaq -0x148(%rbp), %r10
leaq -0x108(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x166c30
movq $0x0, -0x90(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpq -0xd0(%rbp), %rax
jae 0x1001b1
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x18(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movq -0x80(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jbe 0x100175
jmp 0x1001b1
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x18(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
addq -0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x100138
movq -0x98(%rbp), %xmm0
movaps 0x281e50(%rip), %xmm3   # 0x382010
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x281e54(%rip), %xmm2   # 0x382020
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq -0x90(%rbp), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
mulsd -0x70(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jb 0x100206
jmp 0x100483
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x24(%rbp), %edx
movq -0x88(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
leaq -0x108(%rbp), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl $0x1, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
callq 0xfe040
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpq -0xd0(%rbp), %rax
jae 0x100476
movq -0xc0(%rbp), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0x24(%rbp), %eax
je 0x1002b4
movq -0xc0(%rbp), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0xf0(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x1002b9
jmp 0x100468
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x14(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1002e6
jmp 0x100468
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x14(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
movzbl 0x4(%rax,%rcx,8), %eax
cmpl $0x1, %eax
je 0x100312
jmp 0x100468
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x14(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x100345
jmp 0x100468
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x60(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x100381
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x2c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
movl %eax, %esi
callq 0xd9510
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x10034c
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0xc0(%rbp), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,4), %esi
shrl %esi
callq 0xd9510
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x14(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xc(%rax)
je 0x100466
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x14(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x10(%rax)
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x14(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0xc(%rax)
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x14(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdi
callq 0x2210
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc0(%rbp), %rcx
movl -0x14(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x18(%rax)
jmp 0x100468
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x10027a
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x100481
jmp 0x100483
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xffde9
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x68(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x1005f1
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x24(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1004d3
jmp 0x1005e3
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x24(%rbp), %ecx
movzbl 0x4(%rax,%rcx,8), %eax
cmpl $0x1, %eax
je 0x1004f1
jmp 0x1005e3
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x100516
jmp 0x1005e3
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x60(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x100552
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
movl %eax, %esi
callq 0xd9510
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x10051d
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x24(%rbp), %esi
callq 0xd9510
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xc(%rax)
je 0x1005e1
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x10(%rax)
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0xc(%rax)
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdi
callq 0x2210
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x18(%rax)
jmp 0x1005e3
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x100498
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0xcdd10
movq -0x8(%rbp), %rdi
callq 0xcdd10
movq -0x108(%rbp), %rdi
callq 0x2210
movq -0xf0(%rbp), %rdi
callq 0x2210
movq -0xd8(%rbp), %rdi
callq 0x2210
movq -0xc0(%rbp), %rdi
callq 0x2210
movq -0xa8(%rbp), %rdi
callq 0x2210
movq -0x68(%rbp), %rdi
callq 0xcd6f0
movq -0x78(%rbp), %rdi
callq 0x2210
movq -0x110(%rbp), %rdi
callq 0x2210
movq -0x80(%rbp), %rdi
callq 0x1c4a90
movq -0x80(%rbp), %rdi
callq 0x2210
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
nopl (%rax)