// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: ulg_bub_pop1(ul_resolve_t*, ma_ug_t*, unsigned int, unsigned long, buf_t*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, asg64_v*, asg64_v*, unsigned int*, unsigned int*)
uint64_t ulg_bub_pop1(ul_resolve_t *uidx, ma_ug_t *ug, uint32_t v0, uint64_t max_dist, buf_t *x, 
uint32_t max_ext, uint32_t max_ext_hifi, uint32_t check_bubble_only, uint32_t is_pop, uint32_t skip_hom, 
asg64_v *b, asg64_v *ub, uint32_t *r_w_c, uint32_t *r_w_m)
{
    asg_t *g = ug->g; uint32_t pb = b->n; uint64_t w_q, w_t, wc, wm, ww; (*r_w_c) = (*r_w_m) = (uint32_t)-1;
    uint32_t v, w, i, kv, nv, kw, cnt = 0, fail_b = 0, n_tips = 0, tip_end = (uint32_t)-1;
    uint32_t l, d, c, m, n_pending = 0, z, to_replace; asg_arc_t *av, *ve, *we; binfo_t *t;
    if(g->seq[v0>>1].del || get_arcs(g, v0, NULL, 0) < 2) return 0; // already deleted
    // fprintf(stderr, "sbsbsbsbsbsbsb[M::%s::(v0>>1)->%u::(v0&1)->%u] check_bubble_only::%u, is_pop::%u\n", 
    //             __func__, v0>>1, v0&1, check_bubble_only, is_pop);

    x->S.n = x->T.n = x->b.n = x->e.n = 0;
    x->a[v0].c = x->a[v0].d = x->a[v0].m = x->a[v0].nc = x->a[v0].np = 0;
    kv_push(uint32_t, x->S, v0);

    do {
        v = kv_pop(x->S); d = x->a[v].d; c = x->a[v].c; m = x->a[v].m;
        nv = asg_arc_n(g, v); av = asg_arc_a(g, v); kv = get_arcs(g, v, NULL, 0);
        for (i = 0; i < nv; ++i) {
            if (av[i].del) continue;
            w = av[i].v; t = &(x->a[w]); l = ((v == v0)?(0):((uint32_t)av[i].ul));
            if ((w>>1) == (v0>>1)) {
                fail_b = 1;
                break;
            }
            kv_push(uint32_t, x->e, (g->idx[v]>>32) + i); ///for backtracking
            if (d + l > max_dist) {
                fail_b = 1;
                break;
            }
            kw = get_arcs(g, w^1, NULL, 0);
            wc = 0; wm = get_ul_occ(uidx, w>>1);
            if(!check_bubble_only) {
                if(kv > 1) {
                    pb = b->n; ub->n = 0; ve = &(av[i]);
                    // fprintf(stderr, "[M::%s::] ve->v>>1::%lu, ve->v&1::%lu, ve->w>>1::%u, ve->w&1::%u\n", 
                    // __func__, ve->ul>>33, (ve->ul>>32)&1, ve->v>>1, ve->v&1);
                    get_ul_arc_supports(uidx, ve, b, ub, skip_hom, &w_q, &w_t);
                    b->n = pb; ub->n = 0;
                    if(w_q < w_t) {
                        if(w_q == 0) {
                            ww = 10;
                        } else {
                            if(w_t != 0) ww = ((w_t - w_q)*10)/w_t;
                            else ww = 0;
                        } 
                        if(ww > wc) wc = ww;
                    }
                }

                if(kw > 1) {
                    pb = b->n; ub->n = 0; we = get_specfic_edge(g, w^1, v^1); assert(we);
                    // fprintf(stderr, "[M::%s::] we->v>>1::%lu, we->v&1::%lu, we->w>>1::%u, we->w&1::%u\n", 
                    // __func__, we->ul>>33, (we->ul>>32)&1, we->v>>1, we->v&1);
                    get_ul_arc_supports(uidx, we, b, ub, skip_hom, &w_q, &w_t);
                    b->n = pb; ub->n = 0;
                    if(w_q < w_t) {
                        if(w_q == 0) {
                            ww = 10;
                        } else {
                            if(w_t != 0) ww = ((w_t - w_q)*10)/w_t;
                            else ww = 0;
                        } 
                        if(ww > wc) wc = ww;
                    }
                }
            }

            if (t->s == 0) {
                kv_push(uint32_t, x->b, w); 
                t->p = v, t->s = 1, t->d = d + l;
                t->c = c + wc; t->m = m + wm;
                t->r = kw;
				++n_pending;
            } else {
                to_replace = 0;
                if((c + wc) < t->c) {
                    to_replace = 1;
                } else if(((c + wc) == t->c) && (m + wm > t->m)) {
                    to_replace = 1;
                } else if(((c + wc) == t->c) && (m + wm == t->m) && (d + l > t->d)) {
                    to_replace = 1;
                }
                if(to_replace) {
                    t->p = v; t->c = c + wc; t->m = m + wm;
                }
                if (d + l < t->d) t->d = d + l; // update dist
            }

            if (--(t->r) == 0) {
                z = get_arcs(g, w, NULL, 0);
                if(z > 0) {
                    kv_push(uint32_t, x->S, w);
                }
                else {
                    ///at most one tip
                    if(n_tips != 0) {
                        fail_b = 1;
                        break;
                    }
                    n_tips++; tip_end = w;
                }
				--n_pending;
            }
        }
        if(fail_b) break;
        if(n_tips == 1) {
            if(tip_end != (uint32_t)-1 && n_pending == 0 && x->S.n == 0) {
                kv_push(uint32_t, x->S, tip_end);
                break;
            }
            fail_b = 1;
            break;
        }

        if (i < nv || x->S.n == 0) {
            fail_b = 1;
            break;
        }
    } while (x->S.n > 1 || n_pending);

    if(!fail_b) {//there is a bubble
        cnt = 1; (*r_w_c) = x->a[x->S.a[0]].c; (*r_w_m) = x->a[x->S.a[0]].m; 
        if(!check_bubble_only) {
            if(is_pop) {
                cnt = ulg_bub_pop_backtrack(ug, v0, x);
            } else {
                cnt = ulg_bub_pop_cut_aux(uidx, ug, v0, x, max_ext, max_ext_hifi, b, ub);
            }
        }
    }
    for (i = 0; i < x->b.n; ++i) { // clear the states of visited vertices
        // if(v0 == 119) {
        //     fprintf(stderr, "-[M::%s::(v0>>1)->%u::(v0&1)->%u] v[%u]>>1::%u, v[%u]&1::%u, cnt::%u, is_pop::%u\n", 
        //         __func__, v0>>1, v0&1, i, x->b.a[i]>>1, i, x->b.a[i]&1, cnt, is_pop);
        // }
		t = &x->a[x->b.a[i]];
		t->s = t->c = t->d = t->m = t->nc = t->np = 0;
	}
    if(!cnt) (*r_w_c) = (*r_w_m) = (uint32_t)-1;
    return cnt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, 0xa0(%rsp)
movl %edx, %r12d
movq %rdi, 0x50(%rsp)
movq 0x128(%rsp), %rdx
movq 0x120(%rsp), %rcx
movq 0x18(%rsi), %r10
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, (%rdx)
movl %eax, (%rcx)
movq 0x20(%r10), %rax
movl %r12d, %ecx
shrl %ecx
movq %rcx, 0xa8(%rsp)
cmpl $0x0, (%rax,%rcx,8)
js 0x211568
movq %rsi, %r15
movq 0x28(%r10), %rax
movl %r12d, %ecx
movq (%rax,%rcx,8), %rdx
xorl %eax, %eax
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
andq %rdx, %rsi
je 0x211d55
movl %r9d, %r14d
movq %r8, %rbp
movl 0x108(%rsp), %ebx
shrq $0x20, %rdx
movq 0x8(%r10), %rdi
movl %edx, %r8d
leaq (%r8,%r8,2), %r8
movl 0xc(%rdi,%r8,8), %r8d
notl %r8d
shrl $0x1f, %r8d
addl %r8d, %eax
incq %rdx
decq %rsi
jne 0x211545
cmpl $0x2, %eax
jae 0x21156f
xorl %eax, %eax
jmp 0x211d55
xorl %eax, %eax
movq %rax, 0x50(%rbp)
movq %rax, 0x38(%rbp)
movq %rax, 0x20(%rbp)
movq %rax, 0x8(%rbp)
movq (%rbp), %rdx
leaq (%rcx,%rcx,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %rcx, %rsi
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rdx,%rsi)
movl $0x0, 0x14(%rdx,%rsi)
cmpq %rax, 0x10(%rbp)
movq %r10, 0x20(%rsp)
je 0x2115b3
movq 0x18(%rbp), %rax
xorl %ecx, %ecx
jmp 0x2115d6
movq $0x2, 0x10(%rbp)
movq 0x18(%rbp), %rdi
movl $0x8, %esi
callq 0x2370
movq 0x20(%rsp), %r10
movq %rax, 0x18(%rbp)
movq 0x8(%rbp), %rcx
movq %r15, 0x98(%rsp)
movl %r14d, 0x80(%rsp)
movl %r12d, (%rax,%rcx,4)
incq %rcx
movl %ebx, %eax
movq %rax, 0x88(%rsp)
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
xorl %r14d, %r14d
movl %r12d, 0x1c(%rsp)
movq %rbp, 0x48(%rsp)
movq (%rbp), %rax
movq 0x18(%rbp), %rdx
leaq -0x1(%rcx), %rsi
movq %rsi, 0x8(%rbp)
movl -0x4(%rdx,%rcx,4), %r11d
movq 0x8(%r10), %rdx
movq 0x28(%r10), %rcx
movq (%rcx,%r11,8), %rcx
movq %rcx, %rsi
shrq $0x20, %rsi
xorl %r15d, %r15d
movq %rcx, %rdi
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
andq %r8, %rdi
je 0x21166e
movq %rsi, %r8
movl %r8d, %r9d
leaq (%r9,%r9,2), %r9
movl 0xc(%rdx,%r9,8), %r9d
notl %r9d
shrl $0x1f, %r9d
addl %r9d, %r15d
incq %r8
decq %rdi
jne 0x211648
cmpl $0x2, %r15d
setae %r15b
testl %ecx, %ecx
je 0x211c4b
leaq (%r11,%r11,8), %rdi
leaq (%rdi,%rdi,2), %rdi
addq %r11, %rdi
movl 0x4(%rax,%rdi), %r8d
movl %r8d, 0x84(%rsp)
movl 0x8(%rax,%rdi), %r8d
movq %r8, 0x90(%rsp)
movl 0xc(%rax,%rdi), %eax
movq %rax, 0x60(%rsp)
leaq (%rsi,%rsi,2), %rax
leaq (%rdx,%rax,8), %rbx
movl %ecx, %eax
movq %rax, 0xb0(%rsp)
xorl %r8d, %r8d
movl $0x0, 0x38(%rsp)
movq %r11, 0x30(%rsp)
movq %rbx, 0x68(%rsp)
leaq (%r8,%r8,2), %rax
cmpl $0x0, 0xc(%rbx,%rax,8)
js 0x211b54
movl %r14d, 0x3c(%rsp)
leaq (%rbx,%rax,8), %rdx
movq $0x0, 0x10(%rsp)
movl $0x0, %r14d
cmpl %r12d, %r11d
je 0x2116fa
movl (%rdx), %r14d
movl 0x8(%rdx), %r9d
movl %r9d, %r13d
shrl %r13d
cmpl 0xa8(%rsp), %r13d
je 0x211cee
leaq (%r9,%r9,8), %rax
leaq (%rax,%rax,2), %r12
addq %r9, %r12
addq (%rbp), %r12
movq 0x50(%rbp), %rcx
movq 0x60(%rbp), %rax
cmpq 0x58(%rbp), %rcx
movq %rdx, 0x40(%rsp)
jne 0x211788
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x58(%rbp)
shlq $0x2, %rsi
movq %rax, %rdi
movq %r8, %rbx
movq %r12, 0x28(%rsp)
movq %r14, %r12
movq %rbp, %r14
movq %r9, %rbp
callq 0x2370
movq %rbp, %r9
movq %r14, %rbp
movq %r12, %r14
movq 0x28(%rsp), %r12
movq %rbx, %r8
movq 0x30(%rsp), %r11
movq 0x20(%rsp), %r10
movq %rax, 0x60(%rbp)
movq 0x50(%rbp), %rcx
movq 0x28(%r10), %rdx
movl 0x4(%rdx,%r11,8), %esi
addl %r8d, %esi
leaq 0x1(%rcx), %rdi
movq %rdi, 0x50(%rbp)
movl %esi, (%rax,%rcx,4)
addl 0x84(%rsp), %r14d
cmpq 0xa0(%rsp), %r14
ja 0x211cee
movq %r9, %rbp
xorq $0x1, %rbp
movq (%rdx,%rbp,8), %rax
movq %rax, %rcx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
andq %rdx, %rcx
je 0x2117f2
shrq $0x20, %rax
movq 0x8(%r10), %rdx
xorl %ebx, %ebx
movl %eax, %esi
leaq (%rsi,%rsi,2), %rsi
movl 0xc(%rdx,%rsi,8), %esi
notl %esi
shrl $0x1f, %esi
addl %esi, %ebx
incq %rax
decq %rcx
jne 0x2117d7
jmp 0x2117f4
xorl %ebx, %ebx
movq 0x50(%rsp), %rax
movq 0x248(%rax), %rax
movl (%rax,%r13,4), %edi
cmpl $0x0, 0xf8(%rsp)
je 0x211815
xorl %esi, %esi
jmp 0x211946
testb %r15b, %r15b
movq %r8, 0x58(%rsp)
movq %rdi, 0x10(%rsp)
je 0x2118d4
movq 0x110(%rsp), %rax
movl (%rax), %ecx
movq %rcx, 0x28(%rsp)
movq %rax, %rdx
movq 0x118(%rsp), %rcx
xorl %eax, %eax
movq %rax, (%rcx)
leaq 0x70(%rsp), %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x88(%rsp), %r8
movq %r9, %r13
leaq 0x78(%rsp), %r9
callq 0x20fe1a
movq 0x10(%rsp), %rdi
movq %r13, %r9
movq 0x58(%rsp), %r8
movq 0x30(%rsp), %r11
movq 0x20(%rsp), %r10
movq 0x28(%rsp), %rax
movq 0x110(%rsp), %rcx
movq %rax, (%rcx)
xorl %eax, %eax
movq 0x118(%rsp), %rcx
movq %rax, (%rcx)
movq 0x78(%rsp), %rdx
movq 0x70(%rsp), %rcx
movq %rcx, %rax
movl $0x0, %esi
subq %rdx, %rax
jbe 0x2118d6
testq %rdx, %rdx
je 0x211c1b
addq %rax, %rax
leaq (%rax,%rax,4), %rax
xorl %edx, %edx
divq %rcx
movq %rax, %rsi
jmp 0x2118d6
xorl %esi, %esi
cmpl $0x2, %ebx
jb 0x211946
movq %rsi, 0x40(%rsp)
movq 0x110(%rsp), %rax
movl (%rax), %r13d
movq 0x118(%rsp), %rax
movq $0x0, (%rax)
movq 0x28(%r10), %rax
movq (%rax,%rbp,8), %rcx
movq %rcx, %rax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
andq %rdx, %rax
je 0x211e18
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %rsi
shlq $0x3, %rsi
addq 0x8(%r10), %rsi
cmpl $0x0, 0xc(%rsi)
js 0x211938
movl 0x8(%rsi), %ecx
xorl %r11d, %ecx
cmpl $0x1, %ecx
je 0x211b6a
addq $0x18, %rsi
decq %rax
jne 0x211923
jmp 0x211e18
movq 0x48(%rsp), %rbp
movl 0x18(%r12), %eax
testl %eax, %eax
js 0x211a12
movq 0x38(%rbp), %rcx
movq 0x48(%rbp), %rax
cmpq 0x40(%rbp), %rcx
jne 0x2119ce
movq %rsi, 0x40(%rsp)
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x40(%rbp)
shlq $0x2, %rsi
movq %rdi, 0x10(%rsp)
movq %rax, %rdi
movq %r8, %r13
movq %r12, 0x28(%rsp)
movq %r14, %r12
movq %rbp, %r14
movq %r9, %rbp
callq 0x2370
movq 0x40(%rsp), %rsi
movq 0x10(%rsp), %rdi
movq %rbp, %r9
movq %r14, %rbp
movq %r12, %r14
movq 0x28(%rsp), %r12
movq %r13, %r8
movq 0x30(%rsp), %r11
movq 0x20(%rsp), %r10
movq %rax, 0x48(%rbp)
movq 0x38(%rbp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x38(%rbp)
movl %r9d, (%rax,%rcx,4)
movl %r11d, (%r12)
movl %r14d, 0x4(%r12)
addl 0x90(%rsp), %esi
movl %esi, 0x8(%r12)
movq 0x60(%rsp), %rax
addl %edi, %eax
movl %eax, 0xc(%r12)
orl $0x80000000, %ebx       # imm = 0x80000000
movl 0x3c(%rsp), %r14d
incl %r14d
movl %ebx, %eax
movq 0x68(%rsp), %rbx
jmp 0x211a6b
addq 0x90(%rsp), %rsi
movl 0x8(%r12), %ecx
cmpq %rcx, %rsi
jae 0x211a38
movl %r11d, (%r12)
movl %esi, 0x8(%r12)
addl 0x60(%rsp), %edi
movl %edi, 0xc(%r12)
jmp 0x211a55
jne 0x211a55
movq 0x60(%rsp), %rcx
addq %rdi, %rcx
movl 0xc(%r12), %edx
cmpq %rdx, %rcx
ja 0x211a24
jne 0x211a55
cmpl 0x4(%r12), %r14d
ja 0x211a24
cmpl 0x4(%r12), %r14d
movq 0x68(%rsp), %rbx
jae 0x211a66
movl %r14d, 0x4(%r12)
movl 0x3c(%rsp), %r14d
addl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %ecx
orl $0x80000000, %ecx       # imm = 0x80000000
movl %ecx, 0x18(%r12)
testl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
je 0x211a8e
movl 0x1c(%rsp), %r12d
jmp 0x211b54
movq 0x28(%r10), %rax
movq (%rax,%r9,8), %rax
movq %rax, %rcx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
andq %rdx, %rcx
movl 0x1c(%rsp), %r12d
je 0x211b39
shrq $0x20, %rax
movq 0x8(%r10), %rsi
xorl %edx, %edx
movl %eax, %edi
leaq (%rdi,%rdi,2), %rdi
movl 0xc(%rsi,%rdi,8), %edi
notl %edi
shrl $0x1f, %edi
addl %edi, %edx
incq %rax
decq %rcx
jne 0x211ab6
testl %edx, %edx
je 0x211b39
movq 0x8(%rbp), %rcx
movq 0x18(%rbp), %rax
cmpq 0x10(%rbp), %rcx
jne 0x211b24
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x10(%rbp)
shlq $0x2, %rsi
movq %rax, %rdi
movq %r8, %rbx
movq %r9, %r13
callq 0x2370
movq %r13, %r9
movq %rbx, %r8
movq 0x68(%rsp), %rbx
movq 0x30(%rsp), %r11
movq 0x20(%rsp), %r10
movq %rax, 0x18(%rbp)
movq 0x8(%rbp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbp)
movl %r9d, (%rax,%rcx,4)
movl 0x18(%rsp), %eax
movl %eax, %r9d
jmp 0x211b4c
cmpl $0x0, 0x38(%rsp)
movl $0x1, 0x38(%rsp)
jne 0x211ce5
decl %r14d
movl %r9d, 0x18(%rsp)
incq %r8
cmpq 0xb0(%rsp), %r8
jne 0x2116cb
jmp 0x211c40
movq %r9, 0x28(%rsp)
leaq 0x70(%rsp), %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rdi
movq 0x110(%rsp), %rbp
movq %rbp, %rdx
movq 0x118(%rsp), %rcx
movq 0x88(%rsp), %r8
leaq 0x78(%rsp), %r9
callq 0x20fe1a
movq %r13, (%rbp)
movq 0x118(%rsp), %rax
movq $0x0, (%rax)
movq 0x78(%rsp), %rdx
movq 0x70(%rsp), %rcx
movq %rcx, %rax
subq %rdx, %rax
jbe 0x211bf3
testq %rdx, %rdx
movq 0x48(%rsp), %rbp
movq 0x58(%rsp), %r8
movq 0x28(%rsp), %r9
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rsi
je 0x211c25
addq %rax, %rax
leaq (%rax,%rax,4), %rax
xorl %edx, %edx
divq %rcx
jmp 0x211c2a
movq 0x48(%rsp), %rbp
movq 0x20(%rsp), %r10
movq 0x30(%rsp), %r11
movq 0x58(%rsp), %r8
movq 0x28(%rsp), %r9
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rsi
jmp 0x21194b
movl $0xa, %esi
jmp 0x2118d6
movl $0xa, %eax
movq 0x20(%rsp), %r10
movq 0x30(%rsp), %r11
cmpq %rsi, %rax
cmovaq %rax, %rsi
jmp 0x21194b
cmpl $0x1, 0x38(%rsp)
je 0x211d67
movq 0x8(%rbp), %rcx
testq %rcx, %rcx
je 0x211ce5
cmpq $0x1, %rcx
jne 0x21160c
testl %r14d, %r14d
jne 0x21160c
movq 0x18(%rbp), %rax
movq 0x120(%rsp), %rdi
movq 0x128(%rsp), %r8
movq (%rbp), %rcx
movl (%rax), %edx
leaq (%rdx,%rdx,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %rdx, %rsi
movl 0x8(%rcx,%rsi), %edx
movl %edx, (%rdi)
movl (%rax), %eax
leaq (%rax,%rax,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rax, %rdx
movl 0xc(%rcx,%rdx), %eax
movl %eax, (%r8)
movl $0x1, %eax
movq %rax, 0x10(%rsp)
cmpl $0x0, 0xf8(%rsp)
jne 0x211cee
cmpl $0x0, 0x100(%rsp)
je 0x211da3
movq 0x98(%rsp), %rdi
movl 0x1c(%rsp), %esi
movq %rbp, %rdx
callq 0x2111ac
jmp 0x211ddd
movq $0x0, 0x10(%rsp)
cmpq $0x0, 0x38(%rbp)
je 0x211d31
movl $0x1, %eax
xorl %ecx, %ecx
xorps %xmm0, %xmm0
movq (%rbp), %rdx
movq 0x48(%rbp), %rsi
movl (%rsi,%rcx,4), %ecx
leaq (%rcx,%rcx,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %rcx, %rsi
movups %xmm0, 0x4(%rdx,%rsi)
movl $0x0, 0x14(%rdx,%rsi)
andb $0x7f, 0x1b(%rdx,%rsi)
movl %eax, %ecx
incl %eax
cmpq %rcx, 0x38(%rbp)
ja 0x211cff
movq 0x10(%rsp), %rsi
testl %esi, %esi
movq 0x120(%rsp), %rcx
movq 0x128(%rsp), %rdx
jne 0x211d53
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, (%rdx)
movl %eax, (%rcx)
movl %esi, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $-0x1, 0x18(%rsp)
setne %al
testl %r14d, %r14d
sete %cl
andb %al, %cl
movq $0x0, 0x10(%rsp)
cmpb $0x1, %cl
jne 0x211cee
cmpq $0x0, 0x8(%rbp)
jne 0x211cee
cmpq $0x0, 0x10(%rbp)
movq 0x18(%rbp), %rax
je 0x211de7
xorl %ecx, %ecx
jmp 0x211e04
movq 0x118(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x110(%rsp), %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rdi
movl 0x1c(%rsp), %edx
movq %rbp, %rcx
movl 0x80(%rsp), %r8d
movl 0xf0(%rsp), %r9d
callq 0x21105f
movq %rax, 0x10(%rsp)
jmp 0x211cee
movq $0x2, 0x10(%rbp)
movl $0x8, %esi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x18(%rbp)
movq 0x8(%rbp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbp)
movl 0x18(%rsp), %edx
movl %edx, (%rax,%rcx,4)
jmp 0x211c6f
leaq 0x36472(%rip), %rdi     # 0x248291
leaq 0x337e3(%rip), %rsi     # 0x245609
leaq 0x36467(%rip), %rcx     # 0x248294
movl $0x2708, %edx           # imm = 0x2708
callq 0x2110