// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: reduce_ma_utg_t(ma_utg_t*, asg_t*, ma_hit_t_alloc*, ma_sub_t*, kvec_asg_arc_t_warp*, int, int, kvec_asg_arc_t_warp*)
void reduce_ma_utg_t(ma_utg_t* collection, asg_t* read_g, ma_hit_t_alloc* sources, 
ma_sub_t *coverage_cut, kvec_asg_arc_t_warp* edge, int max_hang, int min_ovlp, kvec_asg_arc_t_warp* newE)
{
    asg_arc_t t_f;
    asg_arc_t* av = NULL;
    uint32_t m = 0, k, i, nv;
    for (i = 0; i < collection->n; i++)
    {
        if(collection->a[i] == (uint64_t)-1)
        {
            // if(newE) asg_seq_del(read_g, collection->a[i]>>33);
            continue;
        } 
        
        collection->a[m] = collection->a[i];
        m++;
    }
    collection->n = m;


    uint32_t totalLen = 0, v, w, l;
    for (i = 0; i < collection->n - 1; i++)
    {
        v = (uint64_t)(collection->a[i])>>32;
        w = (uint64_t)(collection->a[i + 1])>>32; 




        /*******************************for debug************************************/
        l = (uint32_t)-1;
        av = asg_arc_a(read_g, v);
        nv = asg_arc_n(read_g, v);
        for (k = 0; k < nv; k++)
        {
            if(av[k].del) continue;
            if(av[k].v == w) 
            {
                l = asg_arc_len(av[k]);
                break;
            }
        }

        if(k == nv) 
        {
            for (k = 0; k < edge->a.n; k++)
            {
                if(edge->a.a[k].del) continue;
                if((edge->a.a[k].ul>>32) == v && edge->a.a[k].v == w)
                {
                    l = asg_arc_len(edge->a.a[k]);
                    break;
                }
            }

            if(k == edge->a.n)
            {
                if(get_edge_from_source(sources, coverage_cut, NULL, max_hang, min_ovlp, v, w, &t_f)==0)
                {
                    fprintf(stderr, "####ERROR1: v>>1: %u, v&1: %u, w>>1: %u, w&1: %u, r_seq: %u\n",
                    v>>1, v&1, w>>1, w&1, read_g->r_seq);
                }
                l = asg_arc_len(t_f);

                
                if(newE)
                {
                    kv_push(asg_arc_t, newE->a, t_f);
                    if(get_edge_from_source(sources, coverage_cut, NULL, max_hang, min_ovlp, w^1, v^1, &t_f)==0)
                    {
                        fprintf(stderr, "####ERROR2: v>>1: %u, v&1: %u, w>>1: %u, w&1: %u, r_seq: %u\n",
                        v>>1, v&1, w>>1, w&1, read_g->r_seq);
                    }
                    kv_push(asg_arc_t, newE->a, t_f);
                }
                
            }
            else if(newE)
            {
                kv_push(asg_arc_t, newE->a, edge->a.a[k]);
                for (k = 0; k < edge->a.n; k++)
                {
                    if(edge->a.a[k].del) continue;
                    if((edge->a.a[k].ul>>32) == (w^1) && edge->a.a[k].v == (v^1))
                    {
                        l = asg_arc_len(edge->a.a[k]);
                        break;
                    }
                }
                kv_push(asg_arc_t, newE->a, edge->a.a[k]);
            }
        }
        if(l == (uint32_t)-1) fprintf(stderr, "ERROR\n");
        /*******************************for debug************************************/









        collection->a[i] = v; collection->a[i] = collection->a[i]<<32; 
        collection->a[i] = collection->a[i] | (uint64_t)(l);
        totalLen += l;
    }

    if(i < collection->n)
    {
        if(collection->circ)
        {
            v = (uint64_t)(collection->a[i])>>32;
            w = (uint64_t)(collection->a[0])>>32; 
            



            /*******************************for debug************************************/
            l = (uint32_t)-1;
            av = asg_arc_a(read_g, v);
            nv = asg_arc_n(read_g, v);
            for (k = 0; k < nv; k++)
            {
                if(av[k].del) continue;
                if(av[k].v == w) 
                {
                    l = asg_arc_len(av[k]);
                    break;
                }
            }
            
            if(k == nv) 
            {
                for (k = 0; k < edge->a.n; k++)
                {
                    if(edge->a.a[k].del) continue;
                    if((edge->a.a[k].ul>>32) == v && edge->a.a[k].v == w)
                    {
                        l = asg_arc_len(edge->a.a[k]);
                        break;
                    }
                }

                if(k == edge->a.n)
                {
                    if(get_edge_from_source(sources, coverage_cut, NULL, max_hang, min_ovlp, v, w, &t_f)==0)
                    {
                        fprintf(stderr, "####ERROR1: v>>1: %u, v&1: %u, w>>1: %u, w&1: %u, r_seq: %u\n",
                        v>>1, v&1, w>>1, w&1, read_g->r_seq);
                    }
                    l = asg_arc_len(t_f);

                    if(newE)
                    {
                        kv_push(asg_arc_t, newE->a, t_f);
                        if(get_edge_from_source(sources, coverage_cut, NULL, max_hang, min_ovlp, w^1, v^1, &t_f)==0)
                        {
                            fprintf(stderr, "####ERROR2: v>>1: %u, v&1: %u, w>>1: %u, w&1: %u, r_seq: %u\n",
                            v>>1, v&1, w>>1, w&1, read_g->r_seq);
                        }
                        kv_push(asg_arc_t, newE->a, t_f);
                    }
                }
                else if(newE)
                {
                    kv_push(asg_arc_t, newE->a, edge->a.a[k]);
                    for (k = 0; k < edge->a.n; k++)
                    {
                        if(edge->a.a[k].del) continue;
                        if((edge->a.a[k].ul>>32) == (w^1) && edge->a.a[k].v == (v^1))
                        {
                            l = asg_arc_len(edge->a.a[k]);
                            break;
                        }
                    }
                    kv_push(asg_arc_t, newE->a, edge->a.a[k]);
                }
            }
            if(l == (uint32_t)-1) fprintf(stderr, "ERROR\n");
            /*******************************for debug************************************/












            collection->a[i] = v; collection->a[i] = collection->a[i]<<32; 
            collection->a[i] = collection->a[i] | (uint64_t)(l);

            totalLen += l;
        }
        else
        {
            v = (uint64_t)(collection->a[i])>>32;
            l = read_g->seq[v>>1].len;
            collection->a[i] = v;
            collection->a[i] = collection->a[i]<<32;
            collection->a[i] = collection->a[i] | (uint64_t)(l);
            totalLen += l;
        }
    }

    collection->len = totalLen;
    if(!collection->circ)
    {
        collection->start = collection->a[0]>>32;
        collection->end = (collection->a[collection->n-1]>>32)^1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, 0x14(%rsp)
movq %r8, 0x8(%rsp)
movq %rcx, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movabsq $-0x100000000, %r10     # imm = 0xFFFFFFFF00000000
movl 0x10(%rdi), %eax
testq %rax, %rax
movq %rdi, (%rsp)
movq %rsi, 0x18(%rsp)
je 0xb34fa
movq 0x18(%rdi), %rcx
xorl %edx, %edx
xorl %r11d, %r11d
movq (%rcx,%rdx,8), %r9
cmpq $-0x1, %r9
je 0xb34dd
movl %r11d, %r8d
movq %r9, (%rcx,%r8,8)
incl %r11d
incq %rdx
cmpq %rdx, %rax
jne 0xb34c9
movl %r11d, 0x10(%rdi)
cmpl $0x1, %r11d
jne 0xb34fa
xorl %r11d, %r11d
xorl %r14d, %r14d
jmp 0xb3946
leaq 0x18(%rsi), %rax
movq %rax, 0x50(%rsp)
movq 0x18(%rdi), %rax
xorl %r14d, %r14d
xorl %r11d, %r11d
movq (%rax,%r14,8), %r9
movq 0x8(%rax,%r14,8), %r13
movq %r9, %rbp
shrq $0x20, %rbp
movq %r13, %r12
shrq $0x20, %r12
movq 0x28(%rsi), %rax
movq (%rax,%rbp,8), %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0xb356c
movq 0x8(%rsi), %rcx
movq %rax, %r8
shrq $0x20, %r8
movl %eax, %edx
leaq (%r8,%r8,2), %r8
leaq (%rcx,%r8,8), %r8
addq $0xc, %r8
xorl %ecx, %ecx
cmpl $0x0, (%r8)
js 0xb355c
cmpl %r12d, -0x4(%r8)
je 0xb3570
incq %rcx
addq $0x18, %r8
cmpq %rcx, %rdx
jne 0xb3550
movl %eax, %ecx
jmp 0xb3574
xorl %ecx, %ecx
jmp 0xb3574
movl -0xc(%r8), %ebx
cmpl %eax, %ecx
jne 0xb38d7
movq %r9, 0x20(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rax
testq %rax, %rax
je 0xb35da
movq 0x8(%rsp), %rcx
movq 0x10(%rcx), %rcx
movl $0x1, %edx
xorl %r15d, %r15d
leaq (%r15,%r15,2), %rsi
cmpl $0x0, 0xc(%rcx,%rsi,8)
js 0xb35c3
leaq (%rcx,%rsi,8), %r9
movq (%r9), %rsi
movq %rsi, %r8
shrq $0x20, %r8
cmpl %ebp, %r8d
jne 0xb35c3
cmpl %r12d, 0x8(%r9)
je 0xb35cf
movl %edx, %r15d
incl %edx
cmpq %r15, %rax
ja 0xb359f
jmp 0xb35d1
movl %esi, %ebx
cmpq %r15, %rax
jne 0xb3740
movq %r11, %r15
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl 0x14(%rsp), %ecx
movl 0x90(%rsp), %r8d
movl %ebp, %r9d
leaq 0x38(%rsp), %rax
pushq %rax
pushq %r12
callq 0xb3df3
addq $0x10, %rsp
testl %eax, %eax
je 0xb383c
movl 0x38(%rsp), %ebx
movq 0x98(%rsp), %rsi
testq %rsi, %rsi
je 0xb37a0
movq (%rsi), %rcx
movq 0x10(%rsi), %rax
cmpq 0x8(%rsi), %rcx
jne 0xb3664
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rdx
movq %rdx, 0x8(%rsi)
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rsi
movq %rax, %rdi
callq 0x2370
movq 0x98(%rsp), %rsi
movq %rax, 0x10(%rsi)
movq (%rsi), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rsi)
leaq (%rcx,%rcx,2), %rcx
movq 0x48(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rax,%rcx,8)
movq %rsi, %r13
movl %r12d, %r9d
xorl $0x1, %r9d
movl %ebp, %eax
xorl $0x1, %eax
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl 0x14(%rsp), %ecx
movl 0x90(%rsp), %r8d
leaq 0x38(%rsp), %rdx
pushq %rdx
pushq %rax
callq 0xb3df3
addq $0x10, %rsp
testl %eax, %eax
je 0xb3929
movq (%r13), %rcx
movq 0x10(%r13), %rax
cmpq 0x8(%r13), %rcx
jne 0xb3701
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rdx
movq %rdx, 0x8(%r13)
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rsi
movq %rax, %rdi
callq 0x2370
movq 0x98(%rsp), %r13
movq %rax, 0x10(%r13)
movq (%r13), %rcx
movq (%rsp), %rdi
movabsq $-0x100000000, %r10     # imm = 0xFFFFFFFF00000000
movq %r15, %r11
movq 0x20(%rsp), %r9
leaq 0x1(%rcx), %rdx
movq %rdx, (%r13)
leaq (%rcx,%rcx,2), %rcx
movq 0x48(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rax,%rcx,8)
movq 0x18(%rsp), %rsi
jmp 0xb38d7
movq 0x98(%rsp), %r9
testq %r9, %r9
je 0xb38cd
movq (%r9), %rcx
movq 0x10(%r9), %rax
cmpq 0x8(%r9), %rcx
jne 0xb37b6
movq %r11, %r12
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rdx
movq %rdx, 0x8(%r9)
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rsi
movq %rax, %rdi
callq 0x2370
movq 0x98(%rsp), %r9
movabsq $-0x100000000, %r10     # imm = 0xFFFFFFFF00000000
movq %rax, 0x10(%r9)
movq (%r9), %rcx
jmp 0xb37b9
movq (%rsp), %rdi
movabsq $-0x100000000, %r10     # imm = 0xFFFFFFFF00000000
movq %r15, %r11
jmp 0xb38cd
movq %r11, %r12
movq 0x8(%rsp), %r8
movq 0x10(%r8), %rdx
leaq (%r15,%r15,2), %rsi
leaq 0x1(%rcx), %rdi
movq %rdi, (%r9)
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rdx,%rsi,8), %rdi
movq %rdi, 0x10(%rax,%rcx,8)
movups (%rdx,%rsi,8), %xmm0
movups %xmm0, (%rax,%rcx,8)
movq (%r8), %rax
testq %rax, %rax
movabsq $0x100000000, %r11      # imm = 0x100000000
je 0xb3837
movq 0x10(%r8), %rcx
movl $0x1, %edx
xorl %r15d, %r15d
leaq (%r15,%r15,2), %rsi
cmpl $0x0, 0xc(%rcx,%rsi,8)
js 0xb382b
leaq (%rcx,%rsi,8), %rdi
movq (%rdi), %rsi
movq %rsi, %r8
xorq %r13, %r8
andq %r10, %r8
cmpq %r11, %r8
jne 0xb382b
movl 0x8(%rdi), %edi
xorl %ebp, %edi
cmpl $0x1, %edi
je 0xb3850
movl %edx, %r15d
incl %edx
cmpq %r15, %rax
ja 0xb3801
jmp 0xb3852
xorl %r15d, %r15d
jmp 0xb3852
movl %ebp, %edi
movl %r12d, %esi
movq 0x50(%rsp), %rdx
callq 0x1008f
jmp 0xb360f
movl %esi, %ebx
movq (%r9), %rcx
movq 0x10(%r9), %rax
cmpq 0x8(%r9), %rcx
jne 0xb389c
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rdx
movq %rdx, 0x8(%r9)
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rsi
movq %rax, %rdi
callq 0x2370
movq 0x98(%rsp), %r9
movabsq $-0x100000000, %r10     # imm = 0xFFFFFFFF00000000
movq %rax, 0x10(%r9)
movq (%r9), %rcx
movq (%rsp), %rdi
movq %r12, %r11
movq 0x8(%rsp), %rdx
movq 0x10(%rdx), %rdx
leaq (%r15,%r15,2), %rsi
leaq 0x1(%rcx), %r8
movq %r8, (%r9)
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rdx,%rsi,8), %r8
movq %r8, 0x10(%rax,%rcx,8)
movups (%rdx,%rsi,8), %xmm0
movups %xmm0, (%rax,%rcx,8)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %r9
cmpl $-0x1, %ebx
je 0xb3903
movq 0x18(%rdi), %rax
andq %r10, %r9
movl %ebx, %ecx
orq %r9, %rcx
movq %rcx, (%rax,%r14,8)
incq %r14
addl %ebx, %r11d
movl 0x10(%rdi), %ecx
leal -0x1(%rcx), %edx
cmpq %rdx, %r14
jb 0xb350d
jmp 0xb393d
movq %r11, %r15
movq %r9, %r12
callq 0x100ff
movq %r12, %r9
movq %r15, %r11
movq 0x18(%rsp), %rsi
movabsq $-0x100000000, %r10     # imm = 0xFFFFFFFF00000000
movq (%rsp), %rdi
jmp 0xb38dc
movl %ebp, %edi
movl %r12d, %esi
movq 0x50(%rsp), %rdx
callq 0x100c7
jmp 0xb36bf
cmpl %r14d, %ecx
jbe 0xb3d82
cmpl $0x0, (%rdi)
movq 0x18(%rdi), %rax
movl %r14d, %r14d
movq (%rax,%r14,8), %r12
js 0xb3974
leaq (%rax,%r14,8), %r14
movq 0x20(%rsi), %rax
movq %r12, %rcx
shrq $0x21, %rcx
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
andl (%rax,%rcx,8), %r15d
jmp 0xb3d73
movq %r12, %rcx
shrq $0x20, %rcx
movq (%rax), %rbp
movq %rbp, 0x20(%rsp)
shrq $0x20, %rbp
movq 0x28(%rsi), %rax
movq %rcx, %rbx
movq (%rax,%rcx,8), %rax
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testl %eax, %eax
je 0xb39d1
movq 0x8(%rsi), %rcx
movq %rax, %rsi
shrq $0x20, %rsi
movl %eax, %edx
leaq (%rsi,%rsi,2), %rsi
leaq (%rcx,%rsi,8), %rsi
addq $0xc, %rsi
xorl %ecx, %ecx
cmpl $0x0, (%rsi)
js 0xb39c1
cmpl %ebp, -0x4(%rsi)
je 0xb39d5
incq %rcx
addq $0x18, %rsi
cmpq %rcx, %rdx
jne 0xb39b7
movl %eax, %ecx
jmp 0xb39d9
xorl %ecx, %ecx
jmp 0xb39d9
movl -0xc(%rsi), %r15d
cmpl %eax, %ecx
jne 0xb3d65
movq 0x8(%rsp), %rax
movq (%rax), %rax
testq %rax, %rax
je 0xb3a42
movq 0x8(%rsp), %rcx
movq 0x10(%rcx), %rcx
movl $0x1, %edx
xorl %r13d, %r13d
leaq (,%r13,2), %rsi
addq %r13, %rsi
cmpl $0x0, 0xc(%rcx,%rsi,8)
js 0xb3a2a
leaq (%rcx,%rsi,8), %r9
movq (%r9), %rsi
movq %rsi, %r8
shrq $0x20, %r8
cmpl %ebx, %r8d
jne 0xb3a2a
cmpl %ebp, 0x8(%r9)
je 0xb3a36
movl %edx, %r13d
incl %edx
cmpq %r13, %rax
ja 0xb39ff
jmp 0xb3a39
movl %esi, %r15d
cmpq %r13, %rax
jne 0xb3ad5
movq %r11, 0x8(%rsp)
leaq 0x38(%rsp), %r13
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl 0x14(%rsp), %ecx
movl 0x90(%rsp), %r8d
movl %ebx, %r9d
pushq %r13
pushq %rbp
callq 0xb3df3
addq $0x10, %rsp
testl %eax, %eax
je 0xb3ccd
movl 0x38(%rsp), %r15d
movq 0x98(%rsp), %rsi
testq %rsi, %rsi
je 0xb3b39
movq (%rsi), %rcx
cmpq 0x8(%rsi), %rcx
jne 0xb3b51
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
movl $0x2, %ecx
cmovneq %rax, %rcx
movq %rcx, 0x8(%rsi)
movq 0x10(%rsi), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq 0x98(%rsp), %rsi
movq %rax, 0x10(%rsi)
movq (%rsi), %rcx
jmp 0xb3b55
movq 0x98(%rsp), %r9
testq %r9, %r9
je 0xb3d65
movq (%r9), %rcx
cmpq 0x8(%r9), %rcx
jne 0xb3c25
movq %r11, %rbp
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
movl $0x2, %ecx
cmovneq %rax, %rcx
movq %rcx, 0x8(%r9)
movq 0x10(%r9), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq 0x98(%rsp), %r9
movabsq $-0x100000000, %r10     # imm = 0xFFFFFFFF00000000
movq %rax, 0x10(%r9)
movq (%r9), %rcx
jmp 0xb3c2c
movq (%rsp), %rdi
movabsq $-0x100000000, %r10     # imm = 0xFFFFFFFF00000000
movq 0x8(%rsp), %r11
jmp 0xb3d65
movq 0x10(%rsi), %rax
movq %rbx, %r10
leaq 0x1(%rcx), %rdx
movq %rdx, (%rsi)
leaq (%rcx,%rcx,2), %rcx
movq 0x48(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rax,%rcx,8)
movq %rsi, %rbx
movl %ebp, %r9d
xorl $0x1, %r9d
movl %r10d, %eax
xorl $0x1, %eax
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl 0x14(%rsp), %ecx
movl 0x90(%rsp), %r8d
pushq %r13
pushq %rax
movq %r10, %r13
callq 0xb3df3
addq $0x10, %rsp
testl %eax, %eax
je 0xb3ddf
movq (%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rcx
jne 0xb3bf3
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %ecx
cmovneq %rdx, %rcx
movq %rcx, 0x8(%rbx)
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
movq %rax, %rdi
callq 0x2370
movq 0x98(%rsp), %rbx
movq %rax, 0x10(%rbx)
movq (%rbx), %rcx
movq (%rsp), %rdi
movabsq $-0x100000000, %r10     # imm = 0xFFFFFFFF00000000
movq 0x8(%rsp), %r11
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
leaq (%rcx,%rcx,2), %rcx
movq 0x48(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups 0x38(%rsp), %xmm0
jmp 0xb3d61
movq %r11, %rbp
movq 0x10(%r9), %rax
movq 0x8(%rsp), %r8
movq 0x10(%r8), %rdx
leaq (,%r13,2), %rsi
addq %r13, %rsi
leaq 0x1(%rcx), %rdi
movq %rdi, (%r9)
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rdx,%rsi,8), %rdi
movq %rdi, 0x10(%rax,%rcx,8)
movups (%rdx,%rsi,8), %xmm0
movups %xmm0, (%rax,%rcx,8)
movq (%r8), %rax
testq %rax, %rax
movq 0x20(%rsp), %r11
je 0xb3cc8
movq 0x10(%r8), %rcx
movl $0x1, %edx
xorl %r13d, %r13d
movabsq $0x100000000, %rsi      # imm = 0x100000000
leaq (,%r13,2), %rdi
addq %r13, %rdi
cmpl $0x0, 0xc(%rcx,%rdi,8)
js 0xb3cbc
leaq (%rcx,%rdi,8), %r8
movq (%r8), %rdi
movq %rdi, %r9
xorq %r11, %r9
andq %r10, %r9
cmpq %rsi, %r9
movq 0x98(%rsp), %r9
jne 0xb3cbc
movl 0x8(%r8), %r8d
xorl %ebx, %r8d
cmpl $0x1, %r8d
je 0xb3ce0
movl %edx, %r13d
incl %edx
cmpq %r13, %rax
ja 0xb3c80
jmp 0xb3ce3
xorl %r13d, %r13d
jmp 0xb3ce3
movl %ebx, %edi
movl %ebp, %esi
movq 0x18(%rsp), %rdx
callq 0x1011b
jmp 0xb3a79
movl %edi, %r15d
movq (%r9), %rcx
movq 0x10(%r9), %rax
cmpq 0x8(%r9), %rcx
jne 0xb3d2d
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %ecx
cmovneq %rdx, %rcx
movq %rcx, 0x8(%r9)
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
movq %rax, %rdi
callq 0x2370
movq 0x98(%rsp), %r9
movabsq $-0x100000000, %r10     # imm = 0xFFFFFFFF00000000
movq %rax, 0x10(%r9)
movq (%r9), %rcx
movq (%rsp), %rdi
movq %rbp, %r11
movq 0x8(%rsp), %rdx
movq 0x10(%rdx), %rdx
leaq (,%r13,2), %rsi
addq %r13, %rsi
leaq 0x1(%rcx), %r8
movq %r8, (%r9)
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rdx,%rsi,8), %r8
movq %r8, 0x10(%rax,%rcx,8)
movups (%rdx,%rsi,8), %xmm0
movups %xmm0, (%rax,%rcx,8)
cmpl $-0x1, %r15d
je 0xb3dc4
shlq $0x3, %r14
addq 0x18(%rdi), %r14
andq %r10, %r12
movl %r15d, %eax
orq %r12, %rax
movq %rax, (%r14)
addl %r15d, %r11d
movl (%rdi), %eax
andl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
movl %eax, %ecx
andl $0x80000000, %ecx       # imm = 0x80000000
orl %r11d, %ecx
movl %ecx, (%rdi)
testl %eax, %eax
js 0xb3db5
movq 0x18(%rdi), %rax
movl 0x4(%rax), %ecx
movl %ecx, 0x4(%rdi)
movl 0x10(%rdi), %ecx
decl %ecx
movl 0x4(%rax,%rcx,8), %eax
xorl $0x1, %eax
movl %eax, 0x8(%rdi)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r11, %rbx
callq 0x1018d
movq %rbx, %r11
movabsq $-0x100000000, %r10     # imm = 0xFFFFFFFF00000000
movq (%rsp), %rdi
jmp 0xb3d6b
movl %r13d, %edi
movl %ebp, %esi
movq 0x18(%rsp), %rdx
callq 0x10154
jmp 0xb3bb3