// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: get_phase_path(ma_ug_t*, unsigned int, unsigned int, bub_p_t_warp*, H_partition*, unsigned int)
uint64_t get_phase_path(ma_ug_t *ug, uint32_t s, uint32_t d, bub_p_t_warp *b, H_partition* hap, uint32_t max_hap_label)
{
    asg_t *g = ug->g;
    if(g->seq[s>>1].del) return 0; // already deleted
    if(get_real_length(g, s, NULL)<2) return 0;
    uint32_t i, n_pending, is_first, to_replace, cur_nc, cur_uc, cur_ac, n_tips, tip_end, n_pop;
    double cur_nh, cur_w0, cur_w1, cur_rate, max_rate, cur_weight, max_weight;
    ///S saves nodes with all incoming edges visited
    b->S.n = b->T.n = b->b.n = b->e.n = 0;
    ///for each node, b->a saves all related information
    b->a[s].d = b->a[s].nc = b->a[s].ac = b->a[s].uc = 0; b->a[s].nh = b->a[s].w[0] = b->a[s].w[1] = 0;
    ///b->S is the nodes with all incoming edges visited
    kv_push(uint32_t, b->S, s);
    n_pop = n_tips = n_pending = 0;
    tip_end = (uint32_t)-1;
    is_first = 1;

    do {
        ///v is a node that all incoming edges have been visited
        ///d is the distance from v0 to v
        uint32_t v = kv_pop(b->S);
        uint32_t d = b->a[v].d, nc = b->a[v].nc, uc = b->a[v].uc, ac = b->a[v].ac; 
        double nh = b->a[v].nh;
        double nw_0 = b->a[v].w[0], nw_1 = b->a[v].w[1];

        uint32_t nv = asg_arc_n(g, v);
        asg_arc_t *av = asg_arc_a(g, v);
        for (i = 0; i < nv; ++i) {
            uint32_t w = av[i].v, l = (uint32_t)av[i].ul; // v->w with length l, not overlap length
            bub_p_t *t = &b->a[w];
            //got a circle
            if ((w>>1) == (s>>1)) goto pop_reset;
            //important when poping at long untig graph
            if(is_first) l = 0;
            if (av[i].del) continue;
            ///push the edge
            kv_push(uint32_t, b->e, (g->idx[v]>>32) + i);

            if (t->s == 0) 
            { // this vertex has never been visited
                kv_push(uint32_t, b->b, w); // save it for revert
                ///t->p is the parent node of 
                ///t->s = 1 means w has been visited
                ///d is len(v0->v), l is len(v->w), so t->d is len(v0->w)
                t->p = v, t->s = 1, t->d = d + l, t->nc = nc + ug->u.a[(w>>1)].n;
                t->r = get_real_length(g, w^1, NULL);
                /**need fix**/
                t->nh = nh + get_path_weight(w, v, s, b, hap->link);

                get_related_weight(w>>1, hap, &(t->w[0]), &(t->w[1]), &max_hap_label);
                t->w[0] += nw_0; t->w[1] += nw_1; 

                t->ac = ac + ((!is_hap_set_label(w>>1, *hap, max_hap_label))?ug->u.a[(w>>1)].n : 0);
                t->uc = uc + ((is_hap_set_label(w>>1, *hap, max_hap_label))?ug->u.a[(w>>1)].n : 0);
                
                ++n_pending;
            }
            else {
                to_replace = 0;

                cur_nc = nc + ug->u.a[(w>>1)].n;
                /**need fix**/
                cur_nh = nh + get_path_weight(w, v, s, b, hap->link);
                get_related_weight(w>>1, hap, &cur_w0, &cur_w1, &max_hap_label);
                cur_w0 += nw_0; cur_w1 += nw_1;
                cur_weight = cur_nh + MAX(cur_w0, cur_w1) - MIN(cur_w0, cur_w1);
                max_weight = t->nh + MAX(t->w[0], t->w[1]) - MIN(t->w[0], t->w[1]);

                cur_ac = ac + ((!is_hap_set_label(w>>1, *hap, max_hap_label))?ug->u.a[(w>>1)].n : 0);;
                cur_uc = uc + ((is_hap_set_label(w>>1, *hap, max_hap_label))?ug->u.a[(w>>1)].n : 0);
                cur_rate = ((double)(cur_ac)/(double)(cur_ac+cur_uc));
                max_rate = ((double)(t->ac)/(double)(t->ac+t->uc));

                if(cur_rate > max_rate)
                {
                    to_replace = 1;
                }
                else if(cur_rate == max_rate)
                {
                    ///if(cur_nh > t->nh)
                    if(cur_weight > max_weight)
                    {
                        to_replace = 1;
                    }
                    else if(cur_weight == max_weight)///(cur_nh == t->nh)
                    {
                        if(cur_nc > t->nc)
                        {
                            to_replace = 1;
                        }
                        else if(cur_nc == t->nc)
                        {
                            if(d + l > t->d)
                            {
                                to_replace = 1;
                            }
                        }
                    }
                }


                if(to_replace)
                {
                    t->p = v;
                    t->nc = cur_nc;
                    t->nh = cur_nh;
                    t->ac = cur_ac;
                    t->uc = cur_uc;
                    t->w[0] = cur_w0;
                    t->w[1] = cur_w1;
                }


                if (d + l < t->d) t->d = d + l; // update dist
            }

            if (--(t->r) == 0) {
                uint32_t x = get_real_length(g, w, NULL);
                if(x > 0)
                {
                    kv_push(uint32_t, b->S, w);
                }
                else
                {
                    ///at most one tip
                    if(n_tips != 0) goto pop_reset;
                    n_tips++;
                    tip_end = w;
                }
                --n_pending;
            }
        }
        is_first = 0;


        if(n_tips == 1)
        {
            if(tip_end != (uint32_t)-1 && n_pending == 0 && b->S.n == 0)
            {
                ///sink is b.S.a[0]
                kv_push(uint32_t, b->S, tip_end);
                break;
            }
            else
            {
                goto pop_reset;
            }
        }

        if (i < nv || b->S.n == 0) goto pop_reset;
    }while (b->S.n > 1 || n_pending);


    n_pop = 1;
    /**need fix**/
    set_path_hap(b, s, hap, max_hap_label);
    pop_reset:

    for (i = 0; i < b->b.n; ++i) { // clear the states of visited vertices
        bub_p_t *t = &b->a[b->b.a[i]];
        t->p = t->d = t->nc = t->ac = t->uc = t->r = t->s = 0;
        t->nh = t->w[0] = t->w[1] = 0;
    }

    return n_pop;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rcx, %rbx
movl %r9d, 0x4(%rsp)
movq %rdi, 0x50(%rsp)
movq 0x18(%rdi), %r9
movq 0x20(%r9), %rax
movl %esi, %ecx
shrl %ecx
movq %rcx, 0xa8(%rsp)
cmpl $0x0, (%rax,%rcx,8)
js 0x152acb
movl %esi, %ebp
movq 0x28(%r9), %rcx
movl %esi, %eax
movq (%rcx,%rax,8), %rcx
xorl %r15d, %r15d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
andq %rcx, %rdx
je 0x152ace
movq 0x8(%r9), %rsi
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rsi,%rcx,8), %rcx
addq $0xc, %rcx
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
movl (%rcx,%rsi), %edi
notl %edi
shrl $0x1f, %edi
addl %edi, %r15d
addq $0x18, %rsi
cmpq %rsi, %rdx
jne 0x152ab1
cmpl $0x2, %r15d
jge 0x152ae3
xorl %r15d, %r15d
movq %r15, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ecx, %ecx
movq %rcx, 0x50(%rbx)
movq %rcx, 0x38(%rbx)
movq %rcx, 0x20(%rbx)
movq %rcx, 0x8(%rbx)
movq (%rbx), %rdx
imulq $0x38, %rax, %rax
movq %rcx, 0x4(%rdx,%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rdx,%rax)
movupd %xmm0, 0x20(%rdx,%rax)
cmpq %rcx, 0x10(%rbx)
movq %r8, 0x8(%rsp)
movq %r9, 0x20(%rsp)
je 0x152b29
movq 0x18(%rbx), %rax
xorl %ecx, %ecx
jmp 0x152b51
movq $0x2, 0x10(%rbx)
movq 0x18(%rbx), %rdi
movl $0x8, %esi
callq 0x2370
movq 0x20(%rsp), %r9
movq 0x8(%rsp), %r8
movq %rax, 0x18(%rbx)
movq 0x8(%rbx), %rcx
movl %ebp, (%rax,%rcx,4)
incq %rcx
xorl %r15d, %r15d
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
movq $0x0, 0x80(%rsp)
movl $0x0, 0x1c(%rsp)
movl %ebp, 0x18(%rsp)
movq (%rbx), %rax
movq 0x18(%rbx), %rdx
leaq -0x1(%rcx), %rsi
movq %rsi, 0x8(%rbx)
movl -0x4(%rdx,%rcx,4), %esi
movq 0x28(%r9), %rcx
movq (%rcx,%rsi,8), %r14
testl %r14d, %r14d
je 0x153200
imulq $0x38, %rsi, %rcx
movl 0x4(%rax,%rcx), %edx
movq %rdx, 0x60(%rsp)
movl 0x8(%rax,%rcx), %edx
movl %edx, 0x4c(%rsp)
movl 0x28(%rax,%rcx), %edx
movl %edx, 0x48(%rsp)
movl 0x2c(%rax,%rcx), %edx
movl %edx, 0x44(%rsp)
movsd 0x10(%rax,%rcx), %xmm0
movsd %xmm0, 0x70(%rsp)
movupd 0x18(%rax,%rcx), %xmm0
movapd %xmm0, 0xb0(%rsp)
movq %r14, %rax
shrq $0x20, %rax
leaq (%rax,%rax,2), %r12
shlq $0x3, %r12
addq 0x8(%r9), %r12
xorl %r13d, %r13d
movl $0x0, 0x2c(%rsp)
movq %rsi, 0x30(%rsp)
movq %r12, 0x68(%rsp)
movq %r14, 0x78(%rsp)
movl %r13d, %eax
leaq (%rax,%rax,2), %rax
movl 0x8(%r12,%rax,8), %edi
movl %edi, %ebp
shrl %ebp
cmpl 0xa8(%rsp), %ebp
je 0x15323f
leaq (%r12,%rax,8), %rax
xorl %edx, %edx
testb $0x1, 0x80(%rsp)
je 0x152c3a
movl (%rax), %edx
cmpl $0x0, 0xc(%rax)
js 0x1531c7
imulq $0x38, %rdi, %r14
addq (%rbx), %r14
movq 0x50(%rbx), %rcx
movq 0x60(%rbx), %rax
cmpq 0x58(%rbx), %rcx
movq %rdi, 0x38(%rsp)
movq %rdx, 0x58(%rsp)
jne 0x152c9a
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x58(%rbx)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x20(%rsp), %r9
movq %rax, 0x60(%rbx)
movq 0x50(%rbx), %rcx
movq 0x28(%r9), %rdx
movl 0x4(%rdx,%rsi,8), %edx
addl %r13d, %edx
leaq 0x1(%rcx), %r8
movq %r8, 0x50(%rbx)
movl %edx, (%rax,%rcx,4)
movl 0x30(%r14), %r12d
testl %r12d, %r12d
js 0x152da6
movq 0x38(%rbx), %rcx
movq 0x48(%rbx), %rax
cmpq 0x40(%rbx), %rcx
jne 0x152d02
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x40(%rbx)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x20(%rsp), %r9
movq %rax, 0x48(%rbx)
movq 0x38(%rbx), %rcx
movq 0x58(%rsp), %r8
leaq 0x1(%rcx), %rdx
movq %rdx, 0x38(%rbx)
movl %edi, (%rax,%rcx,4)
movl %esi, (%r14)
orb $-0x80, 0x33(%r14)
addl 0x60(%rsp), %r8d
movl %r8d, 0x4(%r14)
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rax
leaq (,%rbp,4), %r12
addq %rbp, %r12
movl 0x10(%rax,%r12,8), %eax
addl 0x4c(%rsp), %eax
movl %eax, 0x8(%r14)
movq %rdi, %rax
xorq $0x1, %rax
movq 0x28(%r9), %rcx
movq (%rcx,%rax,8), %rcx
movq %rcx, %rax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
andq %rdx, %rax
je 0x152e81
movq 0x8(%r9), %rdx
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rdx,%rcx,8), %rcx
addq $0xc, %rcx
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdx
xorl %r8d, %r8d
xorl %eax, %eax
movl (%rcx,%r8), %r9d
notl %r9d
shrl $0x1f, %r9d
addl %r9d, %eax
addq $0x18, %r8
cmpq %r8, %rdx
jne 0x152d85
orl $0x80000000, %eax       # imm = 0x80000000
jmp 0x152e86
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rax
movl %ebp, %ecx
movq %rcx, 0x98(%rsp)
leaq (%rcx,%rcx,4), %rcx
movl 0x10(%rax,%rcx,8), %eax
movl %eax, 0x40(%rsp)
movq 0x8(%rsp), %rax
movq 0x30(%rax), %r8
movl 0x18(%rsp), %edx
movq %rbx, %rcx
callq 0x1527d4
movsd %xmm0, 0xa0(%rsp)
movl %ebp, %edi
movq 0x8(%rsp), %rsi
leaq 0x90(%rsp), %rdx
leaq 0x88(%rsp), %rcx
leaq 0x4(%rsp), %r8
callq 0x15284f
movq 0x8(%rsp), %r8
movsd 0x90(%rsp), %xmm0
movhpd 0x88(%rsp), %xmm0       # xmm0 = xmm0[0],mem[0]
addpd 0xb0(%rsp), %xmm0
movlpd %xmm0, 0x90(%rsp)
movhpd %xmm0, 0x88(%rsp)
movq 0x10(%r8), %rax
movl 0x1c(%r8), %ecx
orl 0x18(%r8), %ecx
movq 0x98(%rsp), %rdx
movl (%rax,%rdx,4), %eax
orl 0x20(%r8), %ecx
testl %eax, %ecx
je 0x152f85
movb 0x2c(%r8), %cl
shrl %cl, %eax
movl 0x4(%rsp), %edx
shrl %cl, %edx
cmpl %edx, %eax
movl 0x40(%rsp), %r10d
movl %r10d, %eax
cmovel %r15d, %eax
movl $0x0, %ecx
cmovel %r10d, %ecx
jmp 0x152f8f
movl $0x80000000, %eax       # imm = 0x80000000
movl %eax, 0x30(%r14)
movq 0x8(%rsp), %rax
movq 0x30(%rax), %r8
movl 0x18(%rsp), %edx
movq %rbx, %rcx
callq 0x1527d4
addsd 0x70(%rsp), %xmm0
movsd %xmm0, 0x10(%r14)
leaq 0x18(%r14), %rdx
leaq 0x20(%r14), %rcx
movl %ebp, %edi
movq 0x8(%rsp), %rsi
leaq 0x4(%rsp), %r8
callq 0x15284f
movq 0x8(%rsp), %r8
movupd 0x18(%r14), %xmm0
addpd 0xb0(%rsp), %xmm0
movupd %xmm0, 0x18(%r14)
movq 0x10(%r8), %rax
movl 0x1c(%r8), %ecx
orl 0x18(%r8), %ecx
movl (%rax,%rbp,4), %edx
orl 0x20(%r8), %ecx
testl %edx, %ecx
je 0x152f07
movb 0x2c(%r8), %cl
shrl %cl, %edx
movl 0x4(%rsp), %esi
shrl %cl, %esi
xorl %ecx, %ecx
cmpl %esi, %edx
je 0x152f15
movq 0x50(%rsp), %rcx
movq 0x10(%rcx), %rcx
movl 0x10(%rcx,%r12,8), %ecx
addl 0x44(%rsp), %ecx
movl %ecx, 0x2c(%r14)
movl (%rax,%rbp,4), %edx
movl 0x1c(%r8), %ecx
orl 0x18(%r8), %ecx
orl 0x20(%r8), %ecx
xorl %eax, %eax
testl %edx, %ecx
je 0x152f61
movb 0x2c(%r8), %cl
shrl %cl, %edx
movl 0x4(%rsp), %esi
shrl %cl, %esi
cmpl %esi, %edx
movq 0x20(%rsp), %r9
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %r11
jne 0x152f70
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x10(%rax,%r12,8), %eax
jmp 0x152f70
movq 0x20(%rsp), %r9
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %r11
addl 0x48(%rsp), %eax
movl %eax, 0x28(%r14)
incl 0x1c(%rsp)
movl 0x30(%r14), %r12d
jmp 0x1530c4
xorl %ecx, %ecx
movl 0x40(%rsp), %r10d
movl %r10d, %eax
movq 0x58(%rsp), %rdi
addl 0x4c(%rsp), %r10d
addl 0x44(%rsp), %eax
cvtsi2sd %rax, %xmm1
addl 0x48(%rsp), %ecx
leal (%rcx,%rax), %edx
cvtsi2sd %rdx, %xmm2
divsd %xmm2, %xmm1
movl 0x2c(%r14), %edx
xorps %xmm2, %xmm2
cvtsi2sd %rdx, %xmm2
movl 0x28(%r14), %esi
addl %edx, %esi
cvtsi2sd %rsi, %xmm3
movsd 0xa0(%rsp), %xmm6
addsd 0x70(%rsp), %xmm6
divsd %xmm3, %xmm2
ucomisd %xmm2, %xmm1
movq 0x20(%rsp), %r9
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %r11
ja 0x15309b
jne 0x1530b6
jp 0x1530b6
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
movapd %xmm2, %xmm1
cmplesd %xmm0, %xmm1
movapd %xmm1, %xmm3
andpd %xmm0, %xmm3
andnpd %xmm2, %xmm1
orpd %xmm3, %xmm1
addsd %xmm6, %xmm1
movapd %xmm0, %xmm3
cmplesd %xmm2, %xmm3
movapd %xmm3, %xmm4
andpd %xmm0, %xmm4
andnpd %xmm2, %xmm3
orpd %xmm4, %xmm3
subsd %xmm3, %xmm1
movsd 0x18(%r14), %xmm2
movsd 0x20(%r14), %xmm3
movapd %xmm3, %xmm4
cmplesd %xmm2, %xmm4
movapd %xmm4, %xmm5
andpd %xmm2, %xmm5
andnpd %xmm3, %xmm4
orpd %xmm5, %xmm4
addsd 0x10(%r14), %xmm4
movapd %xmm2, %xmm5
cmplesd %xmm3, %xmm5
andpd %xmm5, %xmm2
andnpd %xmm3, %xmm5
orpd %xmm2, %xmm5
subsd %xmm5, %xmm4
ucomisd %xmm4, %xmm1
ja 0x15309b
jne 0x1530b6
jp 0x1530b6
cmpl 0x8(%r14), %r10d
jbe 0x1531d5
movl %esi, (%r14)
movl %r10d, 0x8(%r14)
movsd %xmm6, 0x10(%r14)
movl %eax, 0x2c(%r14)
movl %ecx, 0x28(%r14)
movupd %xmm0, 0x18(%r14)
addl 0x60(%rsp), %edi
cmpl 0x4(%r14), %edi
jae 0x1530c4
movl %edi, 0x4(%r14)
leal -0x1(%r12), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl $0x80000000, %r12d      # imm = 0x80000000
orl %eax, %r12d
movl %r12d, 0x30(%r14)
testl %eax, %eax
je 0x1530ef
movq 0x78(%rsp), %r14
movq 0x68(%rsp), %r12
jmp 0x1531c7
movq 0x28(%r9), %rax
movq (%rax,%r11,8), %rax
movq %rax, %rcx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
andq %rdx, %rcx
movq 0x78(%rsp), %r14
movq 0x68(%rsp), %r12
je 0x1531ab
movq 0x8(%r9), %rdx
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
leaq (%rdx,%rax,8), %rax
addq $0xc, %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
xorl %r10d, %r10d
movl (%rax,%rdx), %edi
notl %edi
shrl $0x1f, %edi
addl %edi, %r10d
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0x153133
testl %r10d, %r10d
je 0x1531ab
movq 0x8(%rbx), %rcx
movq 0x18(%rbx), %rax
cmpq 0x10(%rbx), %rcx
jne 0x153196
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x10(%rbx)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq 0x38(%rsp), %r11
movq 0x30(%rsp), %rsi
movq 0x20(%rsp), %r9
movq 0x8(%rsp), %r8
movq %rax, 0x18(%rbx)
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbx)
movl %r11d, (%rax,%rcx,4)
movl 0x14(%rsp), %eax
movl %eax, %r11d
jmp 0x1531be
cmpl $0x0, 0x2c(%rsp)
movl $0x1, 0x2c(%rsp)
jne 0x15323f
decl 0x1c(%rsp)
movl %r11d, 0x14(%rsp)
incl %r13d
cmpl %r14d, %r13d
jne 0x152c0b
jmp 0x1531f1
jne 0x1530b6
movq 0x60(%rsp), %rdx
addl %edi, %edx
cmpl 0x4(%r14), %edx
ja 0x15309b
jmp 0x1530b6
cmpl $0x1, 0x2c(%rsp)
je 0x153290
movl 0x18(%rsp), %ebp
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x15323f
movb $0x1, %al
movq %rax, 0x80(%rsp)
cmpq $0x1, %rcx
jne 0x152b7a
cmpl $0x0, 0x1c(%rsp)
jne 0x152b7a
movl 0x4(%rsp), %ecx
movq %rbx, %rdi
movl %ebp, %esi
movq %r8, %rdx
callq 0x152937
movl $0x1, %r15d
cmpq $0x0, 0x38(%rbx)
je 0x152ace
movl $0x1, %eax
xorl %ecx, %ecx
xorpd %xmm0, %xmm0
xorl %edx, %edx
movq (%rbx), %rsi
movq 0x48(%rbx), %rdi
movl (%rdi,%rdx,4), %edx
imulq $0x38, %rdx, %rdi
movl %ecx, 0x8(%rsi,%rdi)
movq $0x0, (%rsi,%rdi)
movl %eax, %edx
movupd %xmm0, 0x10(%rsi,%rdi)
movupd %xmm0, 0x20(%rsi,%rdi)
movl %ecx, 0x30(%rsi,%rdi)
incl %eax
cmpq %rdx, 0x38(%rbx)
ja 0x153257
jmp 0x152ace
xorl %r15d, %r15d
movl 0x14(%rsp), %esi
cmpl $-0x1, %esi
movl 0x18(%rsp), %ebp
je 0x15323f
cmpl $0x0, 0x1c(%rsp)
jne 0x15323f
cmpq $0x0, 0x8(%rbx)
je 0x1532b3
xorl %r15d, %r15d
jmp 0x15323f
cmpq $0x0, 0x10(%rbx)
movq 0x18(%rbx), %rax
je 0x1532c2
xorl %ecx, %ecx
jmp 0x1532e8
movq $0x2, 0x10(%rbx)
movl $0x8, %esi
movq %rax, %rdi
callq 0x2370
movl 0x14(%rsp), %esi
movq 0x8(%rsp), %r8
movq %rax, 0x18(%rbx)
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbx)
movl %esi, (%rax,%rcx,4)
jmp 0x153228