// File: /workspace/github_cpp_makefile_star2_O1/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 $0xd8, %rsp
movl %r9d, 0x90(%rsp)
movq %rcx, 0xc0(%rsp)
movl %edx, %r15d
movq %rdi, 0x68(%rsp)
movq 0x148(%rsp), %rdx
movq 0x140(%rsp), %rcx
movq %rsi, 0xb0(%rsp)
movq 0x18(%rsi), %r10
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, (%rdx)
movl %eax, (%rcx)
movq 0x20(%r10), %rax
movl %r15d, %ecx
shrl %ecx
movq %rcx, 0xc8(%rsp)
cmpl $0x0, (%rax,%rcx,8)
js 0x20604b
movq 0x28(%r10), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rdx
xorl %eax, %eax
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
andq %rdx, %rsi
je 0x206915
movq %r8, %r13
movl 0x128(%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 0x206028
cmpl $0x2, %eax
jae 0x206052
xorl %eax, %eax
jmp 0x206915
xorl %esi, %esi
movq %rsi, 0x50(%r13)
movq %rsi, 0x38(%r13)
movq %rsi, 0x20(%r13)
movq %rsi, 0x8(%r13)
movq (%r13), %rax
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rax,%rdx)
movl $0x0, 0x14(%rax,%rdx)
cmpq %rsi, 0x10(%r13)
movq %r10, 0x30(%rsp)
jne 0x2060ad
movq $0x2, 0x10(%r13)
movq 0x18(%r13), %rdi
movl $0x8, %esi
callq 0x2370
movq 0x30(%rsp), %r10
movq %rax, 0x18(%r13)
movq 0x8(%r13), %rax
movq 0x18(%r13), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x8(%r13)
movl %r15d, (%rcx,%rax,4)
movl %ebx, %eax
movq %rax, 0x98(%rsp)
movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF
movl $0x0, 0x20(%rsp)
movq %r13, 0x60(%rsp)
movl %r15d, 0x54(%rsp)
movq 0x18(%r13), %rcx
movq (%r13), %rax
movq 0x8(%r13), %rdx
leaq -0x1(%rdx), %rsi
movq %rsi, 0x8(%r13)
movl -0x4(%rcx,%rdx,4), %r11d
movq 0x8(%r10), %rdx
movq 0x28(%r10), %rcx
movq (%rcx,%r11,8), %rcx
movq %rcx, %rsi
shrq $0x20, %rsi
xorl %r12d, %r12d
movq %rcx, %rdi
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
andq %r8, %rdi
je 0x20614b
movq %rsi, %r8
movl %r8d, %r9d
leaq (%r9,%r9,2), %r9
movl 0xc(%rdx,%r9,8), %r9d
notl %r9d
shrl $0x1f, %r9d
addl %r9d, %r12d
incq %r8
decq %rdi
jne 0x206125
cmpl $0x2, %r12d
setae %r12b
movq $0x0, 0x58(%rsp)
movq %rcx, %rdi
shlq $0x20, %rdi
setne %r9b
je 0x206756
leaq (%r11,%r11,8), %rdi
leaq (%rdi,%rdi,2), %rdi
addq %r11, %rdi
movl 0x4(%rax,%rdi), %r8d
movl %r8d, 0x94(%rsp)
movl 0x8(%rax,%rdi), %r8d
movq %r8, 0xa8(%rsp)
movl 0xc(%rax,%rdi), %eax
movq %rax, 0x78(%rsp)
leaq (%rsi,%rsi,2), %rax
leaq (%rdx,%rax,8), %rbp
movl %ecx, %eax
movq %rax, 0xd0(%rsp)
xorl %r8d, %r8d
xorl %ecx, %ecx
movq %r11, 0x38(%rsp)
movl %r9d, %edx
movq %rbp, 0xa0(%rsp)
leaq (%r8,%r8,2), %rax
cmpl $0x0, 0xc(%rbp,%rax,8)
js 0x206658
leaq (,%rax,8), %rsi
addq %rbp, %rsi
xorl %r9d, %r9d
cmpl %r15d, %r11d
je 0x2061df
movl (%rsi), %r9d
movl 0x8(%rsi), %r14d
movq %r14, 0x40(%rsp)
shrl %r14d
cmpl 0xc8(%rsp), %r14d
je 0x206765
movq %rsi, 0x48(%rsp)
movb %dl, 0x1b(%rsp)
movl %ecx, 0x24(%rsp)
movq 0x40(%rsp), %rcx
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rbp
addq %rcx, %rbp
addq (%r13), %rbp
movq 0x58(%r13), %rax
cmpq %rax, 0x50(%r13)
jne 0x206275
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x58(%r13)
movq 0x60(%r13), %rdi
shlq $0x2, %rsi
movq %rbp, 0x28(%rsp)
movq %r13, %rbx
movl %r15d, %r13d
movq %r8, %r15
movq %r9, %rbp
callq 0x2370
movq %rbp, %r9
movq %r15, %r8
movl %r13d, %r15d
movq %rbx, %r13
movq 0x28(%rsp), %rbp
movq 0x38(%rsp), %r11
movq 0x30(%rsp), %r10
movq %rax, 0x60(%rbx)
movq 0x28(%r10), %rax
movl 0x4(%rax,%r11,8), %ecx
addl %r8d, %ecx
movq 0x50(%r13), %rdx
movq 0x60(%r13), %rsi
leaq 0x1(%rdx), %rdi
movq %rdi, 0x50(%r13)
movl %ecx, (%rsi,%rdx,4)
addl 0x94(%rsp), %r9d
cmpq 0xc0(%rsp), %r9
ja 0x20675d
movq 0x40(%rsp), %r13
xorq $0x1, %r13
movq (%rax,%r13,8), %rax
movq %rax, %rcx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
andq %rdx, %rcx
je 0x2062eb
shrq $0x20, %rax
movq 0x8(%r10), %rdx
xorl %r15d, %r15d
movl %eax, %esi
leaq (%rsi,%rsi,2), %rsi
movl 0xc(%rdx,%rsi,8), %esi
notl %esi
shrl $0x1f, %esi
addl %esi, %r15d
incq %rax
decq %rcx
jne 0x2062cf
jmp 0x2062ee
xorl %r15d, %r15d
movq 0x68(%rsp), %rax
movq 0x248(%rax), %rax
movl (%rax,%r14,4), %ebx
cmpl $0x0, 0x118(%rsp)
je 0x20630f
xorl %esi, %esi
jmp 0x206451
testb %r12b, %r12b
movq %r8, 0x70(%rsp)
je 0x2063d0
movq 0x130(%rsp), %rax
movl (%rax), %ecx
movq %rcx, 0x28(%rsp)
movq %rax, %rdx
movq 0x138(%rsp), %rcx
xorl %eax, %eax
movq %rax, (%rcx)
leaq 0x80(%rsp), %rax
movq %rax, (%rsp)
movq 0x68(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x98(%rsp), %r8
movq %r9, %r14
leaq 0x88(%rsp), %r9
callq 0x204934
movq %r14, %r9
movq 0x70(%rsp), %r8
movq 0x38(%rsp), %r11
movq 0x30(%rsp), %r10
movq 0x28(%rsp), %rax
movq 0x130(%rsp), %rcx
movq %rax, (%rcx)
xorl %eax, %eax
movq 0x138(%rsp), %rcx
movq %rax, (%rcx)
movq 0x88(%rsp), %rdx
movq 0x80(%rsp), %rcx
movq %rcx, %rax
movl $0x0, %esi
subq %rdx, %rax
jbe 0x2063d2
testq %rdx, %rdx
je 0x206736
addq %rax, %rax
leaq (%rax,%rax,4), %rax
xorl %edx, %edx
divq %rcx
movq %rax, %rsi
jmp 0x2063d2
xorl %esi, %esi
cmpl $0x2, %r15d
jb 0x206451
movq %rsi, 0x48(%rsp)
movq 0x130(%rsp), %rax
movl (%rax), %eax
movq %rax, 0xb8(%rsp)
movq 0x138(%rsp), %rax
movq $0x0, (%rax)
movq 0x28(%r10), %rax
movq (%rax,%r13,8), %rcx
movq %rcx, %rax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
andq %rdx, %rax
je 0x206671
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %rsi
shlq $0x3, %rsi
addq 0x8(%r10), %rsi
movq 0x60(%rsp), %r13
cmpl $0x0, 0xc(%rsi)
js 0x206441
movl 0x8(%rsi), %ecx
xorl %r11d, %ecx
cmpl $0x1, %ecx
je 0x206678
addq $0x18, %rsi
decq %rax
jne 0x20642c
xorl %esi, %esi
jmp 0x206678
movq 0x60(%rsp), %r13
cmpl $0x0, 0x18(%rbp)
js 0x206503
movq 0x40(%r13), %rax
cmpq %rax, 0x38(%r13)
jne 0x2064b9
movq %rsi, 0x48(%rsp)
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x40(%r13)
movq 0x48(%r13), %rdi
shlq $0x2, %rsi
movq %r8, %r14
movq %rbx, 0x28(%rsp)
movq %r9, %rbx
callq 0x2370
movq 0x48(%rsp), %rsi
movq %rbx, %r9
movq 0x28(%rsp), %rbx
movq %r14, %r8
movq 0x38(%rsp), %r11
movq 0x30(%rsp), %r10
movq %rax, 0x48(%r13)
movq 0x38(%r13), %rax
movq 0x48(%r13), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x38(%r13)
movq 0x40(%rsp), %rdx
movl %edx, (%rcx,%rax,4)
movl %r11d, (%rbp)
movl %r9d, 0x4(%rbp)
addl 0xa8(%rsp), %esi
movl %esi, 0x8(%rbp)
movq 0x78(%rsp), %rax
addl %ebx, %eax
movl %eax, 0xc(%rbp)
orl $0x80000000, %r15d      # imm = 0x80000000
movl %r15d, 0x18(%rbp)
incl 0x20(%rsp)
movl 0x54(%rsp), %r15d
jmp 0x20655a
addq 0xa8(%rsp), %rsi
movl 0x8(%rbp), %eax
cmpq %rax, %rsi
jae 0x206526
movl %r11d, (%rbp)
movl %esi, 0x8(%rbp)
movq 0x78(%rsp), %rax
addl %ebx, %eax
movl %eax, 0xc(%rbp)
jmp 0x20654b
jne 0x20654b
movq 0x78(%rsp), %rcx
addq %rbx, %rcx
movl 0xc(%rbp), %edx
cmpq %rdx, %rcx
ja 0x206513
cmpq %rax, %rsi
jne 0x20654b
movl 0xc(%rbp), %eax
cmpq %rax, %rcx
jne 0x20654b
cmpl 0x4(%rbp), %r9d
ja 0x206513
cmpl 0x4(%rbp), %r9d
movl 0x54(%rsp), %r15d
jae 0x20655a
movl %r9d, 0x4(%rbp)
movl 0x18(%rbp), %eax
leal -0x1(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %eax       # imm = 0x80000000
orl %ecx, %eax
movl %eax, 0x18(%rbp)
testl %ecx, %ecx
je 0x206585
movl 0x24(%rsp), %ecx
movq 0xa0(%rsp), %rbp
jmp 0x206658
movq 0x28(%r10), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, %rcx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
andq %rdx, %rcx
movq 0xa0(%rsp), %rbp
je 0x206638
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 0x2065b5
testl %edx, %edx
je 0x206638
movq 0x10(%r13), %rax
cmpq %rax, 0x8(%r13)
jne 0x206611
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x10(%r13)
movq 0x18(%r13), %rdi
shlq $0x2, %rsi
movq %r8, %rbx
callq 0x2370
movq %rbx, %r8
movq 0x38(%rsp), %r11
movq 0x30(%rsp), %r10
movq %rax, 0x18(%r13)
movq 0x8(%r13), %rax
movq 0x18(%r13), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x8(%r13)
movq 0x40(%rsp), %rdx
movl %edx, (%rcx,%rax,4)
movl 0x1c(%rsp), %eax
movq %rax, 0x40(%rsp)
movl 0x24(%rsp), %eax
jmp 0x206649
movl $0x1, %eax
movl 0x24(%rsp), %ecx
testl %ecx, %ecx
jne 0x206761
decl 0x20(%rsp)
movq 0x40(%rsp), %rcx
movl %ecx, 0x1c(%rsp)
movl %eax, %ecx
incq %r8
cmpq 0xd0(%rsp), %r8
setb %dl
jne 0x2061ba
jmp 0x206765
xorl %esi, %esi
movq 0x60(%rsp), %r13
movq %r9, 0x28(%rsp)
testq %rsi, %rsi
je 0x206927
leaq 0x80(%rsp), %rax
movq %rax, (%rsp)
movq 0x68(%rsp), %rdi
movq 0x130(%rsp), %r14
movq %r14, %rdx
movq 0x138(%rsp), %rcx
movq 0x98(%rsp), %r8
leaq 0x88(%rsp), %r9
callq 0x204934
movq 0xb8(%rsp), %rax
movq %rax, (%r14)
movq 0x138(%rsp), %rax
movq $0x0, (%rax)
movq 0x88(%rsp), %rdx
movq 0x80(%rsp), %rcx
movq %rcx, %rax
subq %rdx, %rax
jbe 0x206718
testq %rdx, %rdx
movq 0x30(%rsp), %r10
movq 0x70(%rsp), %r8
movq 0x28(%rsp), %r9
movq 0x48(%rsp), %rsi
je 0x206740
addq %rax, %rax
leaq (%rax,%rax,4), %rax
xorl %edx, %edx
divq %rcx
jmp 0x206745
movq 0x30(%rsp), %r10
movq 0x38(%rsp), %r11
movq 0x70(%rsp), %r8
movq 0x28(%rsp), %r9
movq 0x48(%rsp), %rsi
jmp 0x206456
movl $0xa, %esi
jmp 0x2063d2
movl $0xa, %eax
movq 0x38(%rsp), %r11
cmpq %rsi, %rax
cmovaq %rax, %rsi
jmp 0x206456
xorl %eax, %eax
movl %r9d, %edx
jmp 0x20676b
movl 0x24(%rsp), %ecx
movb 0x1b(%rsp), %dl
cmpl $0x1, %ecx
sete %al
testb $0x1, %dl
jne 0x2068ae
testb %al, %al
jne 0x206816
movq 0x8(%r13), %rax
testq %rax, %rax
je 0x2068ae
cmpq $0x1, %rax
jne 0x2060e5
cmpl $0x0, 0x20(%rsp)
jne 0x2060e5
movq (%r13), %rax
movq 0x18(%r13), %rcx
movl (%rcx), %edx
leaq (%rdx,%rdx,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %rdx, %rsi
movl 0x8(%rax,%rsi), %edx
movq 0x140(%rsp), %rsi
movl %edx, (%rsi)
movl (%rcx), %ecx
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movl 0xc(%rax,%rdx), %eax
movq 0x148(%rsp), %rcx
movl %eax, (%rcx)
movl $0x1, %eax
movq %rax, 0x58(%rsp)
cmpl $0x0, 0x118(%rsp)
jne 0x2068ae
cmpl $0x0, 0x120(%rsp)
je 0x206870
movq 0xb0(%rsp), %rdi
movl %r15d, %esi
movq %r13, %rdx
callq 0x205ca1
jmp 0x2068a9
cmpl $-0x1, 0x1c(%rsp)
je 0x2068ae
cmpl $0x0, 0x20(%rsp)
jne 0x2068ae
cmpq $0x0, 0x8(%r13)
jne 0x2068ae
cmpq $0x0, 0x10(%r13)
jne 0x206854
movq $0x2, 0x10(%r13)
movq 0x18(%r13), %rdi
movl $0x8, %esi
callq 0x2370
movq %rax, 0x18(%r13)
movq 0x8(%r13), %rax
movq 0x18(%r13), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x8(%r13)
movl 0x1c(%rsp), %edx
movl %edx, (%rcx,%rax,4)
jmp 0x20679e
movq 0x138(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x130(%rsp), %rax
movq %rax, (%rsp)
movq 0x68(%rsp), %rdi
movl %r15d, %edx
movq %r13, %rcx
movl 0x90(%rsp), %r8d
movl 0x110(%rsp), %r9d
callq 0x205b56
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x38(%r13)
je 0x2068f1
movl $0x1, %eax
xorl %ecx, %ecx
xorps %xmm0, %xmm0
movq (%r13), %rdx
movq 0x48(%r13), %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(%r13)
ja 0x2068bf
movq 0x58(%rsp), %rdx
testl %edx, %edx
jne 0x206913
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq 0x148(%rsp), %rcx
movl %eax, (%rcx)
movq 0x140(%rsp), %rcx
movl %eax, (%rcx)
movl %edx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3567f(%rip), %rdi     # 0x23bfad
leaq 0x329f0(%rip), %rsi     # 0x239325
leaq 0x35674(%rip), %rcx     # 0x23bfb0
movl $0x2708, %edx           # imm = 0x2708
callq 0x2110