// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/hic.cpp
// Function: clean_sub_tangle(bubble_type*, unsigned char*, kvec_t_u32_warp*, unsigned char*, unsigned char*, kvec_asg_arc_t_warp*, unsigned int, unsigned int, unsigned int)
void clean_sub_tangle(bubble_type* bub, uint8_t* vis_flag, kvec_t_u32_warp *res_utg, 
uint8_t *dedup, uint8_t *is_tangle, kvec_asg_arc_t_warp* edges, uint32_t flag, uint32_t s, 
uint32_t e)
{
    uint32_t i, k_i, pv, v, occ, beg, sink, p_beg, p_sink, n, *a = NULL;
    ma_utg_t *u = NULL;

    for (i = 0, pv = (uint32_t)-1; i < res_utg->a.n; i++)
    {
        if(is_tangle[res_utg->a.a[i]>>1] == 1)
        {
            if(pv == (uint32_t)-1)
            {
                pv = res_utg->a.a[i]>>1;
            }
            else if(pv != (res_utg->a.a[i]>>1))
            {
                pv = (uint32_t)-1;
                break;
            }
        }
        else if(is_tangle[res_utg->a.a[i]>>1] == (uint8_t)-1)
        {
            pv = (uint32_t)-1;
            break;
        }
    }

    if(pv == (uint32_t)-1)
    {
        for (i = 0; i < res_utg->a.n; i++)
        {
            is_tangle[res_utg->a.a[i]>>1] = (uint8_t)-1;
        }
        return;
    } 

    occ = 0;
    u = &(bub->b_ug->u.a[s]);
    for (i = 0, p_beg = p_sink = (uint32_t)-1; i < u->n; i++)
    {
        get_bubbles(bub, u->a[i]>>33, &beg, &sink, &a, &n, NULL);

        for (k_i = 0; k_i < n; k_i++)
        {
            occ += bub->ug->u.a[a[k_i]>>1].n;
        }
        if(beg != (uint32_t)-1 && (beg>>1) != (p_beg>>1) && (beg>>1) != (p_sink>>1))
        {
            occ += bub->ug->u.a[beg>>1].n; 
        } 
        if(sink != (uint32_t)-1 && (sink>>1) != (p_beg>>1) && (sink>>1) != (p_sink>>1))
        {
            occ += bub->ug->u.a[sink>>1].n; 
        } 
        p_beg = beg; p_sink = sink;
    }

    u = &(bub->b_ug->u.a[e]);
    for (i = 0, p_beg = p_sink = (uint32_t)-1; i < u->n; i++)
    {
        get_bubbles(bub, u->a[i]>>33, &beg, &sink, &a, &n, NULL);

        for (k_i = 0; k_i < n; k_i++)
        {
            occ += bub->ug->u.a[a[k_i]>>1].n;
        }
        if(beg != (uint32_t)-1 && (beg>>1) != (p_beg>>1) && (beg>>1) != (p_sink>>1))
        {
            occ += bub->ug->u.a[beg>>1].n; 
        } 
        if(sink != (uint32_t)-1 && (sink>>1) != (p_beg>>1) && (sink>>1) != (p_sink>>1))
        {
            occ += bub->ug->u.a[sink>>1].n; 
        } 
        p_beg = beg; p_sink = sink;
    }

    if(occ <= bub->ug->u.a[pv].n*200)
    {
        for (i = 0; i < res_utg->a.n; i++)
        {
            is_tangle[res_utg->a.a[i]>>1] = (uint8_t)-1;
        }
        return;
    }

    if(!edges) return;

    u = &(bub->b_ug->u.a[s]);
    for (i = 0; i < u->n; i++)
    {
        get_bubbles(bub, u->a[i]>>33, &beg, &sink, &a, &n, NULL);

        for (k_i = 0; k_i < n; k_i++)
        {
            vis_flag[a[k_i]>>1] ^= flag;
        }
        if(beg != (uint32_t)-1)
        {
            vis_flag[beg>>1] ^= flag;
        } 
        if(sink != (uint32_t)-1)
        {
            vis_flag[sink>>1] ^= flag;
        } 
    }
    u = &(bub->b_ug->u.a[e]);
    for (i = 0; i < u->n; i++)
    {
        get_bubbles(bub, u->a[i]>>33, &beg, &sink, &a, &n, NULL);

        for (k_i = 0; k_i < n; k_i++)
        {
            vis_flag[a[k_i]>>1] ^= flag;
        }
        if(beg != (uint32_t)-1)
        {
            vis_flag[beg>>1] ^= flag;
        } 
        if(sink != (uint32_t)-1)
        {
            vis_flag[sink>>1] ^= flag;
        } 
    }
    for (i = 0; i < res_utg->a.n; i++)
    {
        if(dedup[res_utg->a.a[i]>>1] == 3)
        {
            vis_flag[res_utg->a.a[i]>>1] ^= flag;
        }
    }



    asg_arc_t *av = NULL, *p = NULL;
    uint32_t nv, c[2];

    c[0] = c[1] = 0;
    while (1)
    {
        c[0] = c[1] = 0; p = NULL;
        v = pv<<1;
        av = asg_arc_a(bub->ug->g, v);
        nv = asg_arc_n(bub->ug->g, v);
        for (i = 0; i < nv; i++)
        {
            if(av[i].del) continue;
            c[(!!(vis_flag[av[i].v>>1]&flag))]++;
            if(p == NULL || p->ol > av[i].ol)
            {
                p = &(av[i]);
            }
        }
        



        v = (pv<<1) + 1;
        av = asg_arc_a(bub->ug->g, v);
        nv = asg_arc_n(bub->ug->g, v);
        for (i = 0; i < nv; i++)
        {
            if(av[i].del) continue;
            c[(!!(vis_flag[av[i].v>>1]&flag))]++;
            if(p == NULL || p->ol > av[i].ol)
            {
                p = &(av[i]);
            }
        }

        if(p)
        {
            p->del = 1;
            c[(!!(vis_flag[p->v>>1]&flag))]--;
            if((p->v>>1) == pv)
            {
                asg_arc_del(bub->ug->g, (p->v)^1, (p->ul>>32)^1, 1);
                c[0] = c[1] = 0;
                v = pv<<1;
                av = asg_arc_a(bub->ug->g, v);
                nv = asg_arc_n(bub->ug->g, v);
                for (i = 0; i < nv; i++)
                {
                    if(av[i].del) continue;
                    c[(!!(vis_flag[av[i].v>>1]&flag))]++;
                }

                v = (pv<<1) + 1;
                av = asg_arc_a(bub->ug->g, v);
                nv = asg_arc_n(bub->ug->g, v);
                for (i = 0; i < nv; i++)
                {
                    if(av[i].del) continue;
                    c[(!!(vis_flag[av[i].v>>1]&flag))]++;
                }
            }

            
        }
        if(c[0] == 0 || c[1] == 0) break;
    }
    


    
    v = pv<<1;
    av = asg_arc_a(bub->ug->g, v);
    nv = asg_arc_n(bub->ug->g, v);
    for (i = 0; i < nv; i++)
    {
        if(!av[i].del) continue;
        av[i].del = 0;
        kv_push(asg_arc_t, edges->a, av[i]);
    }
    

    v = (pv<<1) + 1;
    av = asg_arc_a(bub->ug->g, v);
    nv = asg_arc_n(bub->ug->g, v);
    for (i = 0; i < nv; i++)
    {
        if(!av[i].del) continue;
        av[i].del = 0;
        kv_push(asg_arc_t, edges->a, av[i]);
    }

    is_tangle[pv] = (uint8_t)-1;


    u = &(bub->b_ug->u.a[s]);
    for (i = 0; i < u->n; i++)
    {
        get_bubbles(bub, u->a[i]>>33, &beg, &sink, &a, &n, NULL);

        for (k_i = 0; k_i < n; k_i++)
        {
            vis_flag[a[k_i]>>1] ^= flag;
        }
        if(beg != (uint32_t)-1)
        {
            vis_flag[beg>>1] ^= flag;
        } 
        if(sink != (uint32_t)-1)
        {
            vis_flag[sink>>1] ^= flag;
        } 
    }
    u = &(bub->b_ug->u.a[e]);
    for (i = 0; i < u->n; i++)
    {
        get_bubbles(bub, u->a[i]>>33, &beg, &sink, &a, &n, NULL);

        for (k_i = 0; k_i < n; k_i++)
        {
            vis_flag[a[k_i]>>1] ^= flag;
        }
        if(beg != (uint32_t)-1)
        {
            vis_flag[beg>>1] ^= flag;
        } 
        if(sink != (uint32_t)-1)
        {
            vis_flag[sink>>1] ^= flag;
        } 
    }
    for (i = 0; i < res_utg->a.n; i++)
    {
        if(dedup[res_utg->a.a[i]>>1] == 3)
        {
            vis_flag[res_utg->a.a[i]>>1] ^= flag;
        }
    }


}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, 0x18(%rsp)
movq (%rdx), %rbx
testq %rbx, %rbx
je 0x1594b7
movq %rsi, %r15
movq %rdi, %r13
movl 0xb8(%rsp), %eax
movl 0xb0(%rsp), %r14d
movq 0x10(%rdx), %r9
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
movl $0x1, %esi
xorl %edi, %edi
movl (%r9,%rdi,4), %edi
shrl %edi
movzbl (%r8,%rdi), %r10d
cmpl $0x1, %r10d
je 0x159333
cmpl $0xff, %r10d
jne 0x159346
jmp 0x159499
cmpl $-0x1, %r11d
je 0x159343
cmpl %edi, %r11d
je 0x159346
jmp 0x159499
movl %edi, %r11d
movl %esi, %edi
incl %esi
cmpq %rdi, %rbx
ja 0x159314
cmpl $-0x1, %r11d
je 0x159494
movq %rbx, 0x70(%rsp)
movq %r11, 0x30(%rsp)
movq %r8, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
movq %rdx, 0x28(%rsp)
movq 0xc0(%r13), %rcx
movq 0x10(%rcx), %rcx
movl %eax, %eax
leaq (%rax,%rax,4), %rax
movq %rax, 0x68(%rsp)
movq %rcx, 0x50(%rsp)
leaq (%rcx,%rax,8), %rax
movl 0x10(%rax), %ecx
movq %rcx, 0x60(%rsp)
testq %rcx, %rcx
movq %r13, 0x8(%rsp)
movq %rax, 0x58(%rsp)
je 0x1594c6
movq 0x18(%rax), %rdx
movq 0x28(%r13), %r11
movq 0x40(%r13), %rbp
xorl %r9d, %r9d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
movl %edi, %ecx
movl %eax, %esi
movq (%rdx,%r9,8), %rdi
shrq $0x21, %rdi
movl (%rbp,%rdi,4), %eax
movl 0x4(%rbp,%rdi,4), %ebx
subl %eax, %ebx
addl $-0x2, %ebx
je 0x15940e
leaq (%r11,%rax,4), %rdi
movq 0x10(%r13), %r12
movq 0x10(%r12), %r12
movl %ebx, %r13d
xorl %ebx, %ebx
movl 0x8(%rdi,%rbx,4), %r10d
shrl %r10d
leaq (%r10,%r10,4), %r10
addl 0x10(%r12,%r10,8), %r8d
incq %rbx
cmpq %rbx, %r13
jne 0x1593f5
movl (%r11,%rax,4), %edi
cmpl $-0x1, %edi
je 0x159449
movl %edi, %ebx
shrl %ebx
movl %ecx, %r10d
shrl %r10d
cmpl %r10d, %ebx
movq 0x8(%rsp), %r13
je 0x15944e
movl %esi, %r10d
shrl %r10d
cmpl %r10d, %ebx
je 0x15944e
movq 0x10(%r13), %r10
movq 0x10(%r10), %r10
leaq (%rbx,%rbx,4), %rbx
addl 0x10(%r10,%rbx,8), %r8d
jmp 0x15944e
movq 0x8(%rsp), %r13
incl %eax
movl (%r11,%rax,4), %eax
cmpl $-0x1, %eax
je 0x159484
movl %eax, %ebx
shrl %ebx
shrl %ecx
cmpl %ecx, %ebx
sete %cl
shrl %esi
cmpl %esi, %ebx
sete %sil
orb %cl, %sil
jne 0x159484
movl %ebx, %ecx
movq 0x10(%r13), %rsi
movq 0x10(%rsi), %rsi
leaq (%rcx,%rcx,4), %rcx
addl 0x10(%rsi,%rcx,8), %r8d
incq %r9
cmpq 0x60(%rsp), %r9
jne 0x1593c8
jmp 0x1594c9
testq %rbx, %rbx
je 0x1594b7
movl $0x1, %eax
xorl %ecx, %ecx
movq 0x10(%rdx), %rsi
movl (%rsi,%rcx,4), %ecx
shrl %ecx
movb $-0x1, (%r8,%rcx)
movl %eax, %ecx
incl %eax
cmpq %rcx, (%rdx)
ja 0x1594a0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r8d, %r8d
movl 0xc0(%rsp), %eax
leaq (%rax,%rax,4), %rax
movq 0x50(%rsp), %rcx
movl 0x10(%rcx,%rax,8), %edi
testq %rdi, %rdi
movq %rax, 0x20(%rsp)
je 0x1595ef
leaq (%rcx,%rax,8), %rax
movq 0x18(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x28(%r13), %r11
movq 0x40(%r13), %rbp
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
xorl %esi, %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rdi, %rdx
movl %eax, %edi
movl %r12d, %ecx
movq 0x38(%rsp), %rax
movq (%rax,%rsi,8), %rax
shrq $0x21, %rax
movl (%rbp,%rax,4), %r12d
movl 0x4(%rbp,%rax,4), %r9d
subl %r12d, %r9d
addl $-0x2, %r9d
je 0x15955f
leaq (%r11,%r12,4), %rax
movq 0x10(%r13), %rbx
movq 0x10(%rbx), %r13
movl %r9d, %r9d
xorl %ebx, %ebx
movl 0x8(%rax,%rbx,4), %r10d
shrl %r10d
leaq (%r10,%r10,4), %r10
addl 0x10(%r13,%r10,8), %r8d
incq %rbx
cmpq %rbx, %r9
jne 0x159546
movl (%r11,%r12,4), %eax
cmpl $-0x1, %eax
je 0x15959c
movl %eax, %r9d
shrl %r9d
movl %edi, %r10d
shrl %r10d
cmpl %r10d, %r9d
movq 0x8(%rsp), %r13
je 0x1595a1
movl %ecx, %r10d
shrl %r10d
cmpl %r10d, %r9d
je 0x1595a1
movq 0x10(%r13), %r10
movq 0x10(%r10), %r10
leaq (%r9,%r9,4), %r9
addl 0x10(%r10,%r9,8), %r8d
jmp 0x1595a1
movq 0x8(%rsp), %r13
leal 0x1(%r12), %r9d
movl (%r11,%r9,4), %r12d
cmpl $-0x1, %r12d
je 0x1595e0
movl %r12d, %r9d
shrl %r9d
shrl %edi
cmpl %edi, %r9d
sete %dil
shrl %ecx
cmpl %ecx, %r9d
sete %cl
orb %dil, %cl
jne 0x1595e0
movl %r9d, %ecx
movq 0x10(%r13), %rdi
movq 0x10(%rdi), %rdi
leaq (%rcx,%rcx,4), %rcx
addl 0x10(%rdi,%rcx,8), %r8d
incq %rsi
movq %rdx, %rdi
cmpq %rdx, %rsi
jne 0x15950d
movq 0x10(%r13), %rax
movq 0x10(%rax), %rax
movl 0x30(%rsp), %edx
leaq (%rdx,%rdx,4), %rcx
imull $0xc8, 0x10(%rax,%rcx,8), %eax
cmpl %eax, %r8d
jbe 0x1596c6
cmpq $0x0, 0x18(%rsp)
movq 0x28(%rsp), %r11
movq 0x48(%rsp), %rbx
je 0x1594b7
movq %rdx, 0x38(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0x1596fe
xorl %eax, %eax
movq 0x20(%rsp), %rbp
movq 0x58(%rsp), %rdx
movq 0x18(%rdx), %rcx
movq (%rcx,%rax,8), %rcx
movq 0x28(%r13), %rsi
movq 0x40(%r13), %rdx
shrq $0x21, %rcx
movl (%rdx,%rcx,4), %r8d
movl 0x4(%rdx,%rcx,4), %edi
subl %r8d, %edi
leal 0x1(%r8), %ecx
movl (%rsi,%r8,4), %edx
movl (%rsi,%rcx,4), %ecx
addl $-0x2, %edi
je 0x15968f
leaq (%rsi,%r8,4), %rsi
movl %edi, %edi
xorl %r8d, %r8d
movl 0x8(%rsi,%r8,4), %r9d
shrl %r9d
xorb %r14b, (%r15,%r9)
incq %r8
cmpq %r8, %rdi
jne 0x15967b
cmpl $-0x1, %edx
je 0x15969a
shrl %edx
xorb %r14b, (%r15,%rdx)
cmpl $-0x1, %ecx
movq 0x58(%rsp), %rdx
je 0x1596aa
shrl %ecx
xorb %r14b, (%r15,%rcx)
incq %rax
movl 0x10(%rdx), %ecx
cmpq %rcx, %rax
jb 0x159643
movq 0xc0(%r13), %rax
movq 0x10(%rax), %rax
movl 0x10(%rax,%rbp,8), %edi
jmp 0x159708
cmpq $0x0, 0x70(%rsp)
movq 0x28(%rsp), %rsi
movq 0x40(%rsp), %rdi
je 0x1594b7
movl $0x1, %eax
xorl %ecx, %ecx
movq 0x10(%rsi), %rdx
movl (%rdx,%rcx,4), %ecx
shrl %ecx
movb $-0x1, (%rdi,%rcx)
movl %eax, %ecx
incl %eax
cmpq %rcx, (%rsi)
ja 0x1596e3
jmp 0x1594b7
movq 0x20(%rsp), %rbp
movq 0x50(%rsp), %rax
testl %edi, %edi
je 0x159782
leaq (%rax,%rbp,8), %rax
xorl %ecx, %ecx
movq 0x18(%rax), %rdx
movq (%rdx,%rcx,8), %rdx
movq 0x28(%r13), %rdi
movq 0x40(%r13), %rsi
shrq $0x21, %rdx
movl (%rsi,%rdx,4), %r9d
movl 0x4(%rsi,%rdx,4), %r8d
subl %r9d, %r8d
leal 0x1(%r9), %edx
movl (%rdi,%r9,4), %esi
movl (%rdi,%rdx,4), %edx
addl $-0x2, %r8d
je 0x159761
leaq (%rdi,%r9,4), %rdi
movl %r8d, %r8d
xorl %r9d, %r9d
movl 0x8(%rdi,%r9,4), %r10d
shrl %r10d
xorb %r14b, (%r15,%r10)
incq %r9
cmpq %r9, %r8
jne 0x15974d
cmpl $-0x1, %esi
je 0x15976c
shrl %esi
xorb %r14b, (%r15,%rsi)
cmpl $-0x1, %edx
je 0x159777
shrl %edx
xorb %r14b, (%r15,%rdx)
incq %rcx
movl 0x10(%rax), %edx
cmpq %rdx, %rcx
jb 0x159712
movq (%r11), %rax
testq %rax, %rax
je 0x1597b0
movl $0x1, %ecx
xorl %edx, %edx
movq 0x10(%r11), %rsi
movl (%rsi,%rdx,4), %edx
shrl %edx
cmpb $0x3, (%rbx,%rdx)
jne 0x1597a7
xorb %r14b, (%r15,%rdx)
movq (%r11), %rax
movl %ecx, %edx
incl %ecx
cmpq %rdx, %rax
ja 0x159791
movq 0x30(%rsp), %rax
leal (%rax,%rax), %ecx
leal 0x1(,%rax,2), %eax
movq %rax, 0x8(%rsp)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq $0x0, 0x10(%rsp)
movq 0x10(%r13), %rax
movq 0x18(%rax), %rdi
movq 0x8(%rdi), %rax
movq 0x28(%rdi), %r8
movq (%r8,%rcx,8), %rdi
testl %edi, %edi
je 0x159843
movq %rdi, %r9
shrq $0x20, %r9
leaq (%r9,%r9,2), %r9
leaq (%rax,%r9,8), %r9
movl %edi, %r10d
xorl %edi, %edi
movl 0xc(%r9), %r11d
testl %r11d, %r11d
js 0x159838
movl 0x8(%r9), %ebx
shrl %ebx
movzbl (%r15,%rbx), %ebx
xorl %r12d, %r12d
testl %r14d, %ebx
setne %r12b
incl 0x10(%rsp,%r12,4)
testq %rdi, %rdi
je 0x159835
movl 0xc(%rdi), %ebx
andl %esi, %ebx
cmpl %r11d, %ebx
jbe 0x159838
movq %r9, %rdi
addq $0x18, %r9
decq %r10
jne 0x159803
jmp 0x159845
xorl %edi, %edi
movq 0x8(%rsp), %r9
movq (%r8,%r9,8), %r8
testl %r8d, %r8d
je 0x1598a6
movq %r8, %r9
shrq $0x20, %r9
leaq (%r9,%r9,2), %r9
leaq (%rax,%r9,8), %rax
movl %r8d, %r8d
movl 0xc(%rax), %r9d
testl %r9d, %r9d
js 0x15989d
movl 0x8(%rax), %r10d
shrl %r10d
movzbl (%r15,%r10), %r10d
xorl %r11d, %r11d
testl %r14d, %r10d
setne %r11b
incl 0x10(%rsp,%r11,4)
testq %rdi, %rdi
je 0x15989a
movl 0xc(%rdi), %r10d
andl %esi, %r10d
cmpl %r9d, %r10d
jbe 0x15989d
movq %rax, %rdi
addq $0x18, %rax
decq %r8
jne 0x159865
testq %rdi, %rdi
je 0x1599fe
orb $-0x80, 0xf(%rdi)
movl 0x8(%rdi), %eax
shrl %eax
movzbl (%r15,%rax), %eax
xorl %r8d, %r8d
testl %r14d, %eax
setne %r8b
decl 0x10(%rsp,%r8,4)
movl 0x8(%rdi), %r9d
movl %r9d, %eax
shrl %eax
cmpl 0x30(%rsp), %eax
jne 0x1599fe
movq 0x10(%r13), %rax
movq 0x18(%rax), %r8
xorq $0x1, %r9
movq 0x8(%r8), %rax
movq 0x28(%r8), %r8
movq (%r8,%r9,8), %r9
movq %r9, %r10
andq %rdx, %r10
je 0x15994a
movl 0x4(%rdi), %edi
shrq $0x20, %r9
shlq $0x3, %r10
leaq (%r10,%r10,2), %r8
leaq (%r9,%r9,2), %r9
leaq (%rax,%r9,8), %rax
addq $0xc, %rax
xorl %r9d, %r9d
movl -0x4(%rax,%r9), %r10d
xorl %edi, %r10d
cmpl $0x1, %r10d
jne 0x159931
orb $-0x80, 0x3(%rax,%r9)
addq $0x18, %r9
cmpq %r9, %r8
jne 0x15991d
movq 0x10(%r13), %rax
movq 0x18(%rax), %rdi
movq 0x8(%rdi), %rax
movq 0x28(%rdi), %r8
movq $0x0, 0x10(%rsp)
movq (%r8,%rcx,8), %rdi
testl %edi, %edi
je 0x1599a5
movq %rdi, %r9
shrq $0x20, %r9
movl %edi, %r10d
leaq (%r9,%r9,2), %rdi
leaq (%rax,%rdi,8), %rdi
addq $0xc, %rdi
shlq $0x3, %r10
leaq (%r10,%r10,2), %r9
xorl %r10d, %r10d
cmpl $0x0, (%rdi,%r10)
js 0x15999c
movl -0x4(%rdi,%r10), %r11d
shrl %r11d
movzbl (%r15,%r11), %r11d
xorl %ebx, %ebx
testl %r14d, %r11d
setne %bl
incl 0x10(%rsp,%rbx,4)
addq $0x18, %r10
cmpq %r10, %r9
jne 0x15997c
movq 0x8(%rsp), %rdi
movq (%r8,%rdi,8), %rdi
testl %edi, %edi
je 0x1599fe
movq %rdi, %r8
shrq $0x20, %r8
movl %edi, %edi
leaq (%r8,%r8,2), %r8
leaq (%rax,%r8,8), %rax
addq $0xc, %rax
shlq $0x3, %rdi
leaq (%rdi,%rdi,2), %rdi
xorl %r8d, %r8d
cmpl $0x0, (%rax,%r8)
js 0x1599f5
movl -0x4(%rax,%r8), %r9d
shrl %r9d
movzbl (%r15,%r9), %r9d
xorl %r10d, %r10d
testl %r14d, %r9d
setne %r10b
incl 0x10(%rsp,%r10,4)
addq $0x18, %r8
cmpq %r8, %rdi
jne 0x1599d2
cmpl $0x0, 0x10(%rsp)
je 0x159a10
cmpl $0x0, 0x14(%rsp)
jne 0x1597ce
movq 0x10(%r13), %rax
movq 0x18(%rax), %rdx
movq 0x8(%rdx), %rax
movq 0x28(%rdx), %rdx
movq (%rdx,%rcx,8), %rsi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
andq %rsi, %rcx
je 0x159add
shrq $0x20, %rsi
leaq (%rsi,%rsi,2), %rdx
leaq (%rax,%rdx,8), %r12
addq $0xc, %r12
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rbx
xorl %ebp, %ebp
movq 0x18(%rsp), %rdi
movl (%r12,%rbp), %eax
testl %eax, %eax
jns 0x159ac2
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, (%r12,%rbp)
movq (%rdi), %rcx
movq 0x10(%rdi), %rax
cmpq 0x8(%rdi), %rcx
jne 0x159a9f
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rdx
movq %rdx, 0x8(%rdi)
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rsi
movq %rax, %rdi
callq 0x2370
movq 0x18(%rsp), %rdi
movq %rax, 0x10(%rdi)
movq (%rdi), %rcx
leaq (%r12,%rbp), %rdx
addq $-0xc, %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%rdi)
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rdx), %rsi
movq %rsi, 0x10(%rax,%rcx,8)
movups (%rdx), %xmm0
movups %xmm0, (%rax,%rcx,8)
addq $0x18, %rbp
cmpq %rbp, %rbx
jne 0x159a51
movq 0x10(%r13), %rax
movq 0x18(%rax), %rcx
movq 0x8(%rcx), %rax
movq 0x28(%rcx), %rdx
jmp 0x159ae2
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rcx
movq (%rdx,%rcx,8), %rcx
testl %ecx, %ecx
je 0x159b8c
movq %rcx, %rdx
shrq $0x20, %rdx
movl %ecx, %ecx
leaq (%rdx,%rdx,2), %rdx
leaq (%rax,%rdx,8), %r12
addq $0xc, %r12
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rbx
xorl %ebp, %ebp
movl (%r12,%rbp), %eax
testl %eax, %eax
jns 0x159b83
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, (%r12,%rbp)
movq (%rdi), %rcx
movq 0x10(%rdi), %rax
cmpq 0x8(%rdi), %rcx
jne 0x159b60
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rdx
movq %rdx, 0x8(%rdi)
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rsi
movq %rax, %rdi
callq 0x2370
movq 0x18(%rsp), %rdi
movq %rax, 0x10(%rdi)
movq (%rdi), %rcx
leaq (%r12,%rbp), %rdx
addq $-0xc, %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%rdi)
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rdx), %rsi
movq %rsi, 0x10(%rax,%rcx,8)
movups (%rdx), %xmm0
movups %xmm0, (%rax,%rcx,8)
addq $0x18, %rbp
cmpq %rbp, %rbx
jne 0x159b12
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %rcx
movb $-0x1, (%rax,%rcx)
movq 0xc0(%r13), %rax
movq 0x10(%rax), %rax
movq 0x68(%rsp), %rcx
cmpl $0x0, 0x10(%rax,%rcx,8)
movq 0x48(%rsp), %rbx
je 0x159c47
leaq (%rax,%rcx,8), %rax
xorl %ecx, %ecx
movq 0x28(%rsp), %r11
movq 0x20(%rsp), %r12
movq 0x18(%rax), %rdx
movq (%rdx,%rcx,8), %rdx
movq 0x28(%r13), %rdi
movq 0x40(%r13), %rsi
shrq $0x21, %rdx
movl (%rsi,%rdx,4), %r9d
movl 0x4(%rsi,%rdx,4), %r8d
subl %r9d, %r8d
leal 0x1(%r9), %edx
movl (%rdi,%r9,4), %esi
movl (%rdi,%rdx,4), %edx
addl $-0x2, %r8d
je 0x159c19
leaq (%rdi,%r9,4), %rdi
movl %r8d, %r8d
xorl %r9d, %r9d
movl 0x8(%rdi,%r9,4), %r10d
shrl %r10d
xorb %r14b, (%r15,%r10)
incq %r9
cmpq %r9, %r8
jne 0x159c05
cmpl $-0x1, %esi
je 0x159c24
shrl %esi
xorb %r14b, (%r15,%rsi)
cmpl $-0x1, %edx
je 0x159c2f
shrl %edx
xorb %r14b, (%r15,%rdx)
incq %rcx
movl 0x10(%rax), %edx
cmpq %rdx, %rcx
jb 0x159bca
movq 0xc0(%r13), %rax
movq 0x10(%rax), %rax
jmp 0x159c51
movq 0x28(%rsp), %r11
movq 0x20(%rsp), %r12
cmpl $0x0, 0x10(%rax,%r12,8)
je 0x159ccf
leaq (%rax,%r12,8), %rax
xorl %ecx, %ecx
movq 0x18(%rax), %rdx
movq (%rdx,%rcx,8), %rdx
movq 0x28(%r13), %rdi
movq 0x40(%r13), %rsi
shrq $0x21, %rdx
movl (%rsi,%rdx,4), %r9d
movl 0x4(%rsi,%rdx,4), %r8d
subl %r9d, %r8d
leal 0x1(%r9), %edx
movl (%rdi,%r9,4), %esi
movl (%rdi,%rdx,4), %edx
addl $-0x2, %r8d
je 0x159cae
leaq (%rdi,%r9,4), %rdi
movl %r8d, %r8d
xorl %r9d, %r9d
movl 0x8(%rdi,%r9,4), %r10d
shrl %r10d
xorb %r14b, (%r15,%r10)
incq %r9
cmpq %r9, %r8
jne 0x159c9a
cmpl $-0x1, %esi
je 0x159cb9
shrl %esi
xorb %r14b, (%r15,%rsi)
cmpl $-0x1, %edx
je 0x159cc4
shrl %edx
xorb %r14b, (%r15,%rdx)
incq %rcx
movl 0x10(%rax), %edx
cmpq %rdx, %rcx
jb 0x159c5f
movq (%r11), %rax
testq %rax, %rax
je 0x1594b7
movl $0x1, %ecx
xorl %edx, %edx
movq 0x10(%r11), %rsi
movl (%rsi,%rdx,4), %edx
shrl %edx
cmpb $0x3, (%rbx,%rdx)
jne 0x159cf8
xorb %r14b, (%r15,%rdx)
movq (%r11), %rax
movl %ecx, %edx
incl %ecx
cmpq %rdx, %rax
ja 0x159ce2
jmp 0x1594b7