// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: ulg_arc_cut_z(ul_resolve_t*, ma_ug_t*, unsigned int, unsigned int, float, float, unsigned int, float, unsigned int, unsigned int, unsigned int*, asg64_v*, asg64_v*)
uint32_t ulg_arc_cut_z(ul_resolve_t *uidx, ma_ug_t *ug, uint32_t max_ext, uint32_t max_ext_hifi, 
float len_rat, float small_occ_rate, uint32_t raw_ug_occ, float raw_match_rate, uint32_t is_trio, 
uint32_t skip_hom, uint32_t *max_drop_len, asg64_v *in, asg64_v *ib)
{
    asg64_v tx = {0,0,0}, tb = {0,0,0}, *b = NULL, *ub = NULL; asg_t *g = ug->g; 
    uint32_t v, w, wt, z, i, k, kv, nv, kw, kwt, nw, cnt = 0, n_vtx = g->n_seq<<1, ul, vp[2], wp[2];
    asg_arc_t *av, *aw, *ve, *we, *wte; uint64_t w_q, w_t, pb, raw_ul, raw_hifi;

    b = (in?(in):(&tx)); ub = (ib?(ib):(&tb));
    for (v = b->n = 0; v < n_vtx; ++v) {
        if (g->seq[v>>1].del) continue;
        av = asg_arc_a(g, v); nv = asg_arc_n(g, v);
        if (nv < 2) continue;
        for (i = kv = 0; i < nv && kv <= 2; ++i) {
            if(av[i].del) continue; kv++;
        }
        if(kv != 2) continue;
        for (i = 0; i < nv; ++i) {
            if(av[i].del) continue; 
            kw = get_arcs(ug->g, av[i].v^1, NULL, 0);
            // if((v>>1) == 16783) {
            //     fprintf(stderr, "sss[M::%s::] v>>1::%u, v&1::%u, av[i].v>>1::%u, av[i].v&1::%u, kw::%u\n", 
            //     __func__, v>>1, v&1, av[i].v>>1, av[i].v&1, kw);
            // }
            if(kw == 2) {
                kv_push(uint64_t, *b, ((uint64_t)(av-g->arc+i)));
            } else if(kw == 1) {
                ub->n = 0;
                if(get_ul_path_info(uidx, ug, av[i].v, NULL, NULL, NULL, NULL, NULL, ub)==TWO_INPUT) {
                    for (z = raw_ul = 0; z < ub->n; z++) {
                        get_iug_u_raw_occ(uidx, ub->a[z]>>1, &ul, NULL); raw_ul += ul;
                    }
                    kv_push(uint64_t, *b, ((raw_ul<<32)|((uint64_t)(av-g->arc+i))));
                }
            }
        }
    }

    radix_sort_srt64(b->a, b->a + b->n);
    for (k = 0; k < b->n; k++) {
        if(g->arc[(uint32_t)b->a[k]].del) continue;
        v = g->arc[(uint32_t)b->a[k]].ul>>32; w = g->arc[(uint32_t)b->a[k]].v^1;
        if(g->seq[v>>1].del || g->seq[w>>1].del) continue;
        nv = asg_arc_n(g, v); av = asg_arc_a(g, v); 
        nw = asg_arc_n(g, w); aw = asg_arc_a(g, w); 
        if(nv <= 1 && nw <= 1) continue;

        vp[0] = v^1; vp[1] = (uint32_t)-1;
        ve = &(g->arc[(uint32_t)b->a[k]]);
        for (i = kv = 0; i < nv; ++i) {
            if(av[i].del) continue; 
            if(av[i].v != (w^1)) vp[1] = av[i].v;
            kv++;
        }

        wp[0] = w^1; wp[1] = (uint32_t)-1;
        for (i = kw = 0, we = NULL; i < nw; ++i) {
            if (aw[i].del) continue;
            if (aw[i].v == (v^1)) we = &(aw[i]);
            else wp[1] = aw[i].v;
            kw++;
        }
        if(kv <= 1 && kw <= 1) continue;
        if(kv != 2 || kw > 2) continue;
        // if((v>>1) == 16783) {
        //     fprintf(stderr, "bbb[M::%s::] v>>1::%u, v&1::%u, w>>1::%u, w&1::%u, kv::%u, kw::%u\n", 
        //     __func__, v>>1, v&1, w>>1, w&1, kv, kw);
        // }
        raw_ul = 0; wt = w; wte = we; kwt = kw; pb = b->n; ub->n = 0;
        if(kw == 1) {
            if(get_ul_path_info(uidx, ug, w^1, &wt, NULL, NULL, NULL, NULL, b)==TWO_INPUT) {
                for (z = pb, raw_ul = 0; z < b->n; z++) {
                    get_iug_u_raw_occ(uidx, b->a[z]>>1, &ul, NULL); raw_ul += ul;
                }
                ul = wt; get_arcs(ug->g, wt, &wt, 1); wt = ug->g->arc[wt].v^1;
                wp[0] = wt^1; wp[1] = (uint32_t)-1;
                nw = asg_arc_n(g, wt); aw = asg_arc_a(g, wt); 
                for (i = kwt = 0; i < nw; ++i) {
                    if (aw[i].del) continue;
                    if (aw[i].v == (ul^1)) wte = &(aw[i]);
                    else wp[1] = aw[i].v;
                    kwt++;
                }
                // if((v>>1) == 16783) {
                //     fprintf(stderr, "bbb[M::%s::] v>>1::%u, v&1::%u, w>>1::%u, w&1::%u, wt>>1::%u, wt&1::%u, kwt::%u\n", 
                //     __func__, v>>1, v&1, w>>1, w&1, wt>>1, wt&1, kwt);
                // }
                nw = asg_arc_n(g, w); aw = asg_arc_a(g, w); 
            } else {
                b->n = pb;
                continue;
            }
        }
        // if((v>>1) == 16783) {
        //     fprintf(stderr, "bbb[M::%s::] v>>1::%u, v&1::%u, raw_ul::%lu, max_ext::%u, ***1***\n", 
        //     __func__, v>>1, v&1, raw_ul, max_ext);
        // }
        assert(kv == 2 && kwt == 2);
        if(raw_ul <= max_ext && get_remove_hifi_occ(uidx, max_ext_hifi, b->a + pb, b->n - pb, ub, NULL)) {
            raw_hifi = get_ug_integer_seq_occ(uidx, b->a + pb, b->n - pb, ub);
            // if((v>>1) == 16783) {
            //     fprintf(stderr, "bbb[M::%s::] v>>1::%u, v&1::%u, ***2***\n", 
            //     __func__, v>>1, v&1);
            // }

            b->n = pb;
            if(raw_ul > 0) {
                if(!ul_occ_check(uidx, ug, raw_ul, raw_hifi, vp[0], small_occ_rate, b, ub)) continue;
                if(!ul_occ_check(uidx, ug, raw_ul, raw_hifi, vp[1], small_occ_rate, b, ub)) continue;
                if(!ul_occ_check(uidx, ug, raw_ul, raw_hifi, wp[0], small_occ_rate, b, ub)) continue;
                if(!ul_occ_check(uidx, ug, raw_ul, raw_hifi, wp[1], small_occ_rate, b, ub)) continue;
            }
            
            // if((v>>1) == 16783) {
            //     fprintf(stderr, "bbb[M::%s::] v>>1::%u, v&1::%u, ***3***\n", 
            //     __func__, v>>1, v&1);
            // }
            pb = b->n; ub->n = 0;
            get_ul_arc_supports(uidx, ve, b, ub, skip_hom, &w_q, &w_t);
            b->n = pb; ub->n = 0;
            if((w_q == (uint64_t)-1) || (w_q > w_t*len_rat)) continue;

            // if((v>>1) == 16783) {
            //     fprintf(stderr, "bbb[M::%s::] v>>1::%u, v&1::%u, ***4***\n", 
            //     __func__, v>>1, v&1);
            // }

            pb = b->n; ub->n = 0;
            get_ul_arc_supports(uidx, wte, b, ub, skip_hom, &w_q, &w_t);
            b->n = pb; ub->n = 0;
            if((w_q == (uint64_t)-1) || (w_q > w_t*len_rat)) continue;

            // if((v>>1) == 16783) {
            //     fprintf(stderr, "bbb[M::%s::] v>>1::%u, v&1::%u, ***5***\n", 
            //     __func__, v>>1, v&1);
            // }

            if(!ul_homo_path_check(uidx, ug, vp[0], wp[1], raw_ug_occ, raw_match_rate, b, ub)) continue;


            // if((v>>1) == 16783) {
            //     fprintf(stderr, "bbb[M::%s::] v>>1::%u, v&1::%u, ***6***\n", 
            //     __func__, v>>1, v&1);
            // }
            if(!ul_homo_path_check(uidx, ug, wp[0], vp[1], raw_ug_occ, raw_match_rate, b, ub)) continue;

            // if((v>>1) == 16783) {
            //     fprintf(stderr, "bbb[M::%s::] v>>1::%u, v&1::%u, ***7***\n", 
            //     __func__, v>>1, v&1);
            // }

            if(kw == 1) {
                get_ul_path_info(uidx, ug, w^1, &wt, NULL, NULL, NULL, NULL, b);
                for (z = pb; z < b->n; z++) ulg_seq_del(ug, (b->a[z]>>1));
            }
            ve->del = we->del = 1; cnt++;
        }

        b->n = pb;
    }



    if(!in) free(tx.a); if(!ib) free(tb.a);
    if (cnt > 0) asg_cleanup(g);
    // fprintf(stderr, "[M::%s::] cnt::%u\n", __func__, cnt);
    return cnt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movss %xmm2, 0x6c(%rsp)
movl %r8d, 0x68(%rsp)
movss %xmm1, 0x44(%rsp)
movss %xmm0, 0x70(%rsp)
movl %ecx, 0x50(%rsp)
movl %edx, 0x58(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movq 0x140(%rsp), %rax
xorps %xmm0, %xmm0
leaq 0xe0(%rsp), %r8
andq $0x0, 0x10(%r8)
leaq 0xc0(%rsp), %r13
andq $0x0, 0x10(%r13)
movaps %xmm0, (%r8)
movaps %xmm0, (%r13)
movq 0x18(%rsi), %r12
movl 0x14(%r12), %ecx
addl %ecx, %ecx
movq %rcx, 0x20(%rsp)
testq %rax, %rax
cmovneq %rax, %r8
movq 0x148(%rsp), %rax
testq %rax, %rax
cmovneq %rax, %r13
andq $0x0, (%r8)
xorl %ecx, %ecx
movq %rsi, 0x28(%rsp)
movq %r8, 0x18(%rsp)
movq %r12, 0x60(%rsp)
cmpq 0x20(%rsp), %rcx
je 0x1c5462
movq 0x20(%r12), %rax
movq %rcx, 0x38(%rsp)
shrl %ecx
cmpl $0x0, (%rax,%rcx,8)
js 0x1c5450
movq 0x60(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x38(%rsp), %rcx
movq (%rax,%rcx,8), %rax
testl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
je 0x1c5450
movq 0x60(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq %rax, %rdx
shrq $0x20, %rdx
imulq $0x18, %rdx, %rdx
leaq (%rcx,%rdx), %rbx
movl %eax, %r12d
leaq (%rcx,%rdx), %rax
addq $0xc, %rax
xorl %ecx, %ecx
xorl %edx, %edx
cmpq %r12, %rcx
jae 0x1c52c0
cmpl $0x2, %edx
ja 0x1c52c0
movl (%rax), %esi
notl %esi
shrl $0x1f, %esi
addl %esi, %edx
incq %rcx
addq $0x18, %rax
jmp 0x1c52a4
cmpl $0x2, %edx
jne 0x1c5450
xorl %ebp, %ebp
cmpq %r12, %rbp
je 0x1c5450
imulq $0x18, %rbp, %rax
cmpl $0x0, 0xc(%rbx,%rax)
js 0x1c5448
addq %rbx, %rax
movq 0x18(%r14), %rdi
movl 0x8(%rax), %r14d
movl %r14d, %esi
xorl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1a5422
cmpl $0x1, %eax
je 0x1c5373
cmpl $0x2, %eax
movq 0x28(%rsp), %r14
movq 0x18(%rsp), %r8
jne 0x1c5448
movq (%r8), %rcx
movq 0x10(%r8), %rdi
cmpq 0x8(%r8), %rcx
jne 0x1c534c
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rax
cmoveq %rax, %rsi
movq %rsi, 0x8(%r8)
shlq $0x3, %rsi
callq 0x2370
movq 0x18(%rsp), %r8
movq %rax, %rdi
movq %rax, 0x10(%r8)
movq (%r8), %rcx
movq %rbx, %rax
movq 0x60(%rsp), %rdx
subq 0x8(%rdx), %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
addq %rbp, %rax
leaq 0x1(%rcx), %rdx
movq %rdx, (%r8)
movq %rax, (%rdi,%rcx,8)
jmp 0x1c5448
andq $0x0, (%r13)
movq %r13, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
movq 0x28(%rsp), %rsi
movl %r14d, %edx
movq %rsi, %r14
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1c0c77
cmpl $0x1, %eax
movq 0x18(%rsp), %r8
movabsq $0x1fffffffe, %rdi      # imm = 0x1FFFFFFFE
jne 0x1c5448
movq (%r13), %rax
xorl %ecx, %ecx
xorl %r14d, %r14d
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x1c53e3
movq 0x10(%r13), %rdx
movq 0x258(%r15), %rsi
movq (%rdx,%rcx,8), %rdx
andq %rdi, %rdx
movl (%rsi,%rdx,2), %edx
addq %rdx, %r14
incl %ecx
jmp 0x1c53c0
movq (%r8), %rcx
movq 0x10(%r8), %rdi
cmpq 0x8(%r8), %rcx
jne 0x1c541a
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
pushq $0x2
popq %rax
cmoveq %rax, %rsi
movq %rsi, 0x8(%r8)
shlq $0x3, %rsi
callq 0x2370
movq 0x18(%rsp), %r8
movq %rax, %rdi
movq %rax, 0x10(%r8)
movq (%r8), %rcx
shlq $0x20, %r14
movq %rbx, %rax
movq 0x60(%rsp), %rdx
subq 0x8(%rdx), %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
addq %rbp, %rax
orq %r14, %rax
leaq 0x1(%rcx), %rdx
movq %rdx, (%r8)
movq %rax, (%rdi,%rcx,8)
movq 0x28(%rsp), %r14
incq %rbp
jmp 0x1c52cb
movq 0x38(%rsp), %rcx
incq %rcx
movq 0x60(%rsp), %r12
jmp 0x1c523f
movq 0x10(%r8), %rdi
movq (%r8), %rax
leaq (%rdi,%rax,8), %rsi
callq 0x1a3def
movq 0x18(%rsp), %r11
movl 0x58(%rsp), %eax
movq %rax, 0xb8(%rsp)
movl 0x50(%rsp), %eax
movq %rax, 0xb0(%rsp)
movl 0x130(%rsp), %eax
movq %rax, 0x98(%rsp)
xorl %r14d, %r14d
movl $0x0, 0x74(%rsp)
movl %r14d, %r14d
movq (%r11), %r10
cmpq %r14, %r10
jbe 0x1c5b36
movq 0x8(%r12), %rdx
movq 0x10(%r11), %rax
movl (%rax,%r14,8), %eax
imulq $0x18, %rax, %r8
cmpl $0x0, 0xc(%rdx,%r8)
js 0x1c593e
addq %rdx, %r8
movq (%r8), %r9
movq 0x20(%r12), %rax
movq %r9, %rcx
shrq $0x21, %rcx
cmpl $0x0, (%rax,%rcx,8)
js 0x1c593e
movl 0x8(%r8), %ebx
movl %ebx, %ecx
shrl %ecx
cmpl $0x0, (%rax,%rcx,8)
js 0x1c593e
shrq $0x20, %r9
movq %rbx, %rax
xorq $0x1, %rax
movq 0x28(%r12), %rcx
movq (%rcx,%r9,8), %rdi
movq (%rcx,%rax,8), %rsi
movl %esi, %ecx
orl %edi, %ecx
testl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
je 0x1c593e
movq %r10, 0x20(%rsp)
movq %r9, 0x38(%rsp)
movq %r8, 0xa0(%rsp)
movq %rdi, %r8
shrq $0x20, %r8
movq %rsi, %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rdx, %rcx
movl %edi, %edi
imulq $0x18, %rdi, %rdi
imulq $0x18, %r8, %r8
addq %rdx, %r8
addq $0xc, %r8
xorl %r9d, %r9d
xorl %edx, %edx
pushq $-0x1
popq %r10
cmpq %r9, %rdi
je 0x1c558b
cmpl $0x0, (%r8,%r9)
js 0x1c5585
movl -0x4(%r8,%r9), %ebp
cmpl %ebx, %ebp
cmovnel %ebp, %r10d
incl %edx
addq $0x18, %r9
jmp 0x1c556c
movq %rbx, 0x58(%rsp)
movq 0x38(%rsp), %r8
xorl $0x1, %r8d
movl %esi, %esi
xorl %ebx, %ebx
pushq $-0x1
popq %rbp
xorl %r9d, %r9d
subq $0x1, %rsi
jb 0x1c55c4
cmpl $0x0, 0xc(%rcx)
js 0x1c55be
movl 0x8(%rcx), %edi
cmpl %r8d, %edi
cmovnel %edi, %ebp
cmoveq %rcx, %r9
incl %ebx
addq $0x18, %rcx
jmp 0x1c55a3
cmpl $0x2, %edx
setb %cl
cmpl $0x2, %ebx
setb %sil
testb %sil, %cl
jne 0x1c593e
cmpl $0x2, %edx
setne %cl
cmpl $0x3, %ebx
setae %dl
orb %cl, %dl
jne 0x1c593e
movl %eax, 0x34(%rsp)
andq $0x0, (%r13)
cmpl $0x1, %ebx
jne 0x1c567b
movl %r10d, 0x40(%rsp)
movq %r9, 0x80(%rsp)
movq %r8, 0x38(%rsp)
movq %r11, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
movq 0x28(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x34(%rsp), %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
movq %r11, %rbp
callq 0x1c0c77
cmpl $0x1, %eax
jne 0x1c569a
movq (%rbp), %rax
movq 0x20(%rsp), %rcx
xorl %r9d, %r9d
movq %rbp, %rdi
movabsq $0x1fffffffe, %r8       # imm = 0x1FFFFFFFE
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x1c56a2
movq 0x10(%rdi), %rdx
movq 0x258(%r15), %rsi
movq (%rdx,%rcx,8), %rdx
andq %r8, %rdx
movl (%rsi,%rdx,2), %edx
addq %rdx, %r9
incl %ecx
jmp 0x1c5658
movl %ebx, %eax
movq 0x58(%rsp), %rcx
movq %rcx, 0x78(%rsp)
movq %r9, 0x50(%rsp)
movq $0x0, 0x48(%rsp)
jmp 0x1c574b
movq %rbp, %r11
jmp 0x1c5936
movq %r9, 0x48(%rsp)
movl 0x34(%rsp), %esi
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rbp
movq %rbp, %rdi
movl %esi, 0x50(%rsp)
leaq 0x34(%rsp), %rdx
pushq $0x1
popq %rcx
callq 0x1a5422
movq 0x8(%rbp), %rax
movl 0x34(%rsp), %ecx
imulq $0x18, %rcx, %rcx
movl 0x8(%rax,%rcx), %eax
movq %rax, 0x78(%rsp)
xorq $0x1, %rax
movl %eax, 0x34(%rsp)
movq 0x28(%r12), %rcx
movq (%rcx,%rax,8), %rax
movq %rax, %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq 0x8(%r12), %rcx
movl %eax, %edx
xorl %eax, %eax
pushq $-0x1
popq %rbp
movq 0x80(%rsp), %r9
movq %r9, %r11
movq 0x38(%rsp), %r8
movl 0x40(%rsp), %r10d
subq $0x1, %rdx
jb 0x1c5741
cmpl $0x0, 0xc(%rcx)
js 0x1c573b
movl 0x8(%rcx), %esi
movl %esi, %edi
xorl 0x50(%rsp), %edi
cmpl $0x1, %edi
cmovnel %esi, %ebp
cmoveq %rcx, %r11
incl %eax
addq $0x18, %rcx
jmp 0x1c571a
movq %r11, 0x50(%rsp)
movq 0x18(%rsp), %r11
cmpl $0x2, %eax
jne 0x1c5b8a
movq 0x48(%rsp), %rax
cmpq 0xb8(%rsp), %rax
ja 0x1c5936
movl %r10d, 0x40(%rsp)
movq %r9, 0x80(%rsp)
movq %r8, 0x38(%rsp)
movq 0x20(%rsp), %rax
leaq (,%rax,8), %rcx
movq 0x10(%r11), %rdx
movq %rcx, 0xa8(%rsp)
addq %rcx, %rdx
movq (%r11), %rcx
subq %rax, %rcx
movq %r15, %rdi
movq 0xb0(%rsp), %rsi
movq %r13, %r8
xorl %r9d, %r9d
callq 0x1de65f
testq %rax, %rax
je 0x1c5931
movq 0xa8(%rsp), %rsi
movq 0x18(%rsp), %rax
addq 0x10(%rax), %rsi
movq (%rax), %rdx
subq 0x20(%rsp), %rdx
movq %r15, %rdi
movq %r13, %rcx
callq 0x1c4a9d
movq 0x18(%rsp), %r9
movq 0x20(%rsp), %rcx
movq %rcx, (%r9)
movq 0x48(%rsp), %rdx
testq %rdx, %rdx
je 0x1c58ce
movq %r13, (%rsp)
movq %r15, %rdi
movq 0x28(%rsp), %rsi
movq %rax, 0x20(%rsp)
movq %rax, %rcx
movq 0x38(%rsp), %r8
movss 0x44(%rsp), %xmm0
movq %rdx, 0x48(%rsp)
callq 0x1c4af2
testl %eax, %eax
je 0x1c5b03
movq %r13, (%rsp)
movq %r15, %rdi
movq 0x28(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x20(%rsp), %rcx
movl 0x40(%rsp), %r8d
movss 0x44(%rsp), %xmm0
movq 0x18(%rsp), %r9
callq 0x1c4af2
testl %eax, %eax
je 0x1c5b03
movq %r13, (%rsp)
movq %r15, %rdi
movq 0x28(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x78(%rsp), %r8
movss 0x44(%rsp), %xmm0
movq 0x18(%rsp), %r9
callq 0x1c4af2
testl %eax, %eax
je 0x1c5b03
movq %r13, (%rsp)
movq %r15, %rdi
movq 0x28(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x20(%rsp), %rcx
movl %ebp, %r8d
movss 0x44(%rsp), %xmm0
movq 0x18(%rsp), %r9
callq 0x1c4af2
testl %eax, %eax
je 0x1c5b03
movq 0x18(%rsp), %r9
movq (%r9), %rax
movq %rax, 0x20(%rsp)
andq $0x0, (%r13)
leaq 0x88(%rsp), %rax
movq %rax, (%rsp)
movq %r15, %rdi
movq 0xa0(%rsp), %rsi
movq %r9, %rdx
movq %r13, %rcx
movq 0x98(%rsp), %r8
leaq 0x90(%rsp), %r9
callq 0x1c2c0a
movq 0x18(%rsp), %r11
movq 0x20(%rsp), %rax
movq %rax, (%r11)
andq $0x0, (%r13)
movq 0x90(%rsp), %rax
cmpq $-0x1, %rax
je 0x1c593e
testq %rax, %rax
js 0x1c5946
cvtsi2ss %rax, %xmm0
jmp 0x1c595b
movq 0x18(%rsp), %r11
movq 0x20(%rsp), %rax
movq %rax, (%r11)
incl %r14d
jmp 0x1c54a9
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
movq 0x88(%rsp), %rax
testq %rax, %rax
js 0x1c596f
cvtsi2ss %rax, %xmm1
jmp 0x1c5984
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
mulss 0x70(%rsp), %xmm1
ucomiss %xmm1, %xmm0
ja 0x1c593e
movq (%r11), %rax
movq %rax, 0x20(%rsp)
leaq 0x88(%rsp), %rax
movq %rax, (%rsp)
movq %r15, %rdi
movq 0x50(%rsp), %rsi
movq %r11, %rdx
movq %r13, %rcx
movq 0x98(%rsp), %r8
leaq 0x90(%rsp), %r9
callq 0x1c2c0a
movq 0x18(%rsp), %r11
movq 0x20(%rsp), %rax
movq %rax, (%r11)
andq $0x0, (%r13)
movq 0x90(%rsp), %rax
cmpq $-0x1, %rax
je 0x1c593e
testq %rax, %rax
movss 0x6c(%rsp), %xmm0
js 0x1c59fc
cvtsi2ss %rax, %xmm2
jmp 0x1c5a11
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm2
addss %xmm2, %xmm2
movq 0x38(%rsp), %rdx
movq 0x88(%rsp), %rax
testq %rax, %rax
js 0x1c5a2a
cvtsi2ss %rax, %xmm1
jmp 0x1c5a3f
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
mulss 0x70(%rsp), %xmm1
ucomiss %xmm1, %xmm2
movl 0x68(%rsp), %r8d
ja 0x1c593e
movq %r13, (%rsp)
movq %r15, %rdi
movq 0x28(%rsp), %rsi
movl %ebp, %ecx
movq %r11, %r9
movq %r11, %rbp
callq 0x1c4d79
testl %eax, %eax
je 0x1c5b2e
movq %r13, (%rsp)
movq %r15, %rdi
movq 0x28(%rsp), %rsi
movq 0x78(%rsp), %rdx
movl 0x40(%rsp), %ecx
movl 0x68(%rsp), %r8d
movss 0x6c(%rsp), %xmm0
movq %rbp, %r9
callq 0x1c4d79
testl %eax, %eax
je 0x1c5b03
cmpl $0x1, %ebx
movq 0x18(%rsp), %r11
jne 0x1c5b0d
movq %r11, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
movq 0x28(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x34(%rsp), %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
movq %r11, %rbp
callq 0x1c0c77
movq 0x20(%rsp), %rax
movl %eax, %ebx
cmpq %rbx, (%rbp)
movq %rbp, %r11
jbe 0x1c5b0d
movq 0x10(%r11), %rax
movq (%rax,%rbx,8), %rsi
shrq %rsi
movq 0x28(%rsp), %rdi
movq %r11, %rbp
callq 0x1bfe8f
leal 0x1(%rbx), %eax
jmp 0x1c5adb
movq 0x18(%rsp), %r11
jmp 0x1c593e
movq 0x80(%rsp), %rax
orb $-0x80, 0xf(%rax)
movq 0xa0(%rsp), %rax
orb $-0x80, 0xf(%rax)
incl 0x74(%rsp)
jmp 0x1c5936
movq %rbp, %r11
jmp 0x1c593e
cmpq $0x0, 0x140(%rsp)
jne 0x1c5b4e
movq 0xf0(%rsp), %rdi
callq 0x2220
cmpq $0x0, 0x148(%rsp)
movl 0x74(%rsp), %ebx
jne 0x1c5b6a
movq 0xd0(%rsp), %rdi
callq 0x2220
testl %ebx, %ebx
je 0x1c5b76
movq %r12, %rdi
callq 0x694eb
movl %ebx, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x34859(%rip), %rdi     # 0x1fa3ea
leaq 0x31941(%rip), %rsi     # 0x1f74d9
leaq 0x3485f(%rip), %rcx     # 0x1fa3fe
movl $0x28c2, %edx           # imm = 0x28C2
callq 0x2110