// File: /workspace/github_cpp_makefile_star2_O1/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, 0x1c(%rsp)
movq %r8, %r14
movq %rcx, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rsi, 0x10(%rsp)
movl 0x10(%rdi), %ecx
xorl %r15d, %r15d
movl $0x0, %eax
testq %rcx, %rcx
je 0xb23f0
movq 0x18(%rdi), %rdx
xorl %esi, %esi
xorl %eax, %eax
movq (%rdx,%rsi,8), %r9
cmpq $-0x1, %r9
je 0xb23e8
movl %eax, %r8d
movq %r9, (%rdx,%r8,8)
incl %eax
incq %rsi
cmpq %rsi, %rcx
jne 0xb23d5
movq 0x98(%rsp), %r9
movl %eax, 0x10(%rdi)
movl $0x0, %r11d
cmpl $0x1, %eax
movq %rdi, (%rsp)
movq %r14, 0x8(%rsp)
movq 0x10(%rsp), %r8
jne 0xb2459
cmpl %eax, %r15d
jae 0xb2c70
cmpl $0x0, (%rdi)
movabsq $-0x100000000, %rbp     # imm = 0xFFFFFFFF00000000
movq 0x18(%rdi), %rax
movl %r15d, %r15d
movq (%rax,%r15,8), %r12
js 0xb2892
leaq (%rax,%r15,8), %r15
movq 0x20(%r8), %rax
movq %r12, %rcx
shrq $0x21, %rcx
movl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
andl (%rax,%rcx,8), %r14d
jmp 0xb2c61
leaq 0x18(%r8), %rax
movq %rax, 0x50(%rsp)
xorl %r15d, %r15d
xorl %r11d, %r11d
movq 0x18(%rdi), %rax
movq (%rax,%r15,8), %rbp
movq 0x8(%rax,%r15,8), %r13
movq %rbp, 0x20(%rsp)
shrq $0x20, %rbp
movq %r13, %r12
shrq $0x20, %r12
movq 0x28(%r8), %rax
movq (%rax,%rbp,8), %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0xb24cc
movq 0x8(%r8), %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 0xb24bc
cmpl %r12d, -0x4(%rsi)
je 0xb24d0
incq %rcx
addq $0x18, %rsi
cmpq %rcx, %rdx
jne 0xb24b1
movl %eax, %ecx
jmp 0xb24d3
xorl %ecx, %ecx
jmp 0xb24d3
movl -0xc(%rsi), %ebx
cmpl %eax, %ecx
jne 0xb277e
movq (%r14), %rax
testq %rax, %rax
je 0xb251f
movq 0x10(%r14), %rcx
movl $0x1, %edx
xorl %r14d, %r14d
leaq (%r14,%r14,2), %rsi
cmpl $0x0, 0xc(%rcx,%rsi,8)
js 0xb2513
leaq (%rcx,%rsi,8), %rdi
movq (%rdi), %rsi
movq %rsi, %r8
shrq $0x20, %r8
cmpl %ebp, %r8d
jne 0xb2513
cmpl %r12d, 0x8(%rdi)
je 0xb2524
movl %edx, %r14d
incl %edx
cmpq %r14, %rax
ja 0xb24ef
jmp 0xb2526
xorl %r14d, %r14d
jmp 0xb252b
movl %esi, %ebx
movq 0x10(%rsp), %r8
cmpq %r14, %rax
jne 0xb267d
movl %r11d, %r14d
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl 0x1c(%rsp), %ecx
movl 0x90(%rsp), %r8d
movl %ebp, %r9d
leaq 0x38(%rsp), %rax
pushq %rax
pushq %r12
callq 0xb2ced
addq $0x10, %rsp
testl %eax, %eax
je 0xb286a
movl 0x38(%rsp), %ebx
movq 0x98(%rsp), %r9
testq %r9, %r9
je 0xb2759
movq 0x8(%r9), %rax
cmpq %rax, (%r9)
jne 0xb25b8
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x8(%r9)
movq 0x10(%r9), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq 0x98(%rsp), %r9
movq %rax, 0x10(%r9)
movq (%r9), %rax
movq 0x10(%r9), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r9)
leaq (%rax,%rax,2), %rax
movq 0x48(%rsp), %rdx
movq %rdx, 0x10(%rcx,%rax,8)
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rcx,%rax,8)
movq %r9, %r13
movl %r12d, %r9d
xorl $0x1, %r9d
movl %ebp, %eax
xorl $0x1, %eax
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl 0x1c(%rsp), %ecx
movl 0x90(%rsp), %r8d
leaq 0x38(%rsp), %rdx
pushq %rdx
pushq %rax
callq 0xb2ced
addq $0x10, %rsp
testl %eax, %eax
je 0xb287e
movq 0x8(%r13), %rax
cmpq %rax, (%r13)
movq %r13, %r9
jne 0xb2658
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x8(%r9)
movq 0x10(%r9), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq 0x98(%rsp), %r9
movq %rax, 0x10(%r9)
leaq 0x38(%rsp), %rax
movq (%rsp), %rdi
movl %r14d, %r11d
movq 0x8(%rsp), %r14
movq 0x10(%rsp), %r8
movabsq $-0x100000000, %r12     # imm = 0xFFFFFFFF00000000
jmp 0xb27f6
testq %r9, %r9
je 0xb2779
movq 0x8(%r9), %rax
cmpq %rax, (%r9)
jne 0xb26c6
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x8(%r9)
movq 0x10(%r9), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
movl %r11d, %r12d
callq 0x2370
movq 0x98(%rsp), %r9
movl %r12d, %r11d
movq %rax, 0x10(%r9)
movq 0x8(%rsp), %r8
movq 0x10(%r8), %rax
leaq (%r14,%r14,2), %rcx
movq (%r9), %rdx
movq 0x10(%r9), %rsi
leaq 0x1(%rdx), %rdi
movq %rdi, (%r9)
leaq (%rdx,%rdx,2), %rdx
movq 0x10(%rax,%rcx,8), %rdi
movq %rdi, 0x10(%rsi,%rdx,8)
movups (%rax,%rcx,8), %xmm0
movups %xmm0, (%rsi,%rdx,8)
movq (%r8), %rax
testq %rax, %rax
movabsq $-0x100000000, %r12     # imm = 0xFFFFFFFF00000000
je 0xb2791
movq 0x10(%r8), %rcx
movl $0x1, %edx
xorl %r14d, %r14d
leaq (%r14,%r14,2), %rsi
cmpl $0x0, 0xc(%rcx,%rsi,8)
js 0xb274d
leaq (%rcx,%rsi,8), %rdi
movq (%rdi), %rsi
movq %rsi, %r8
xorq %r13, %r8
andq %r12, %r8
movabsq $0x100000000, %r10      # imm = 0x100000000
cmpq %r10, %r8
jne 0xb274d
movl 0x8(%rdi), %edi
xorl %ebp, %edi
cmpl $0x1, %edi
je 0xb2796
movl %edx, %r14d
incl %edx
cmpq %r14, %rax
ja 0xb2719
jmp 0xb2798
movq (%rsp), %rdi
movl %r14d, %r11d
movq 0x8(%rsp), %r14
movq 0x10(%rsp), %r8
movabsq $-0x100000000, %r12     # imm = 0xFFFFFFFF00000000
jmp 0xb2818
movq 0x8(%rsp), %r14
movabsq $-0x100000000, %r12     # imm = 0xFFFFFFFF00000000
movq (%rsp), %rdi
jmp 0xb2818
xorl %r14d, %r14d
jmp 0xb2798
movl %esi, %ebx
movq 0x8(%r9), %rax
cmpq %rax, (%r9)
movq (%rsp), %rdi
jne 0xb27e0
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x8(%r9)
movq 0x10(%r9), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
movl %r11d, %ebp
callq 0x2370
movq 0x98(%rsp), %r9
movl %ebp, %r11d
movq (%rsp), %rdi
movq %rax, 0x10(%r9)
leaq (%r14,%r14,2), %rax
shlq $0x3, %rax
movq 0x8(%rsp), %r14
addq 0x10(%r14), %rax
movq 0x10(%rsp), %r8
movq (%r9), %rcx
movq 0x10(%r9), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%r9)
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rax), %rsi
movq %rsi, 0x10(%rdx,%rcx,8)
movups (%rax), %xmm0
movups %xmm0, (%rdx,%rcx,8)
cmpl $-0x1, %ebx
je 0xb284c
movq 0x18(%rdi), %rax
movq 0x20(%rsp), %rdx
andq %r12, %rdx
movl %ebx, %ecx
orq %rdx, %rcx
movq %rcx, (%rax,%r15,8)
incq %r15
addl %ebx, %r11d
movl 0x10(%rdi), %eax
leal -0x1(%rax), %ecx
cmpq %rcx, %r15
jb 0xb2468
jmp 0xb2414
movl %r11d, %ebp
callq 0x10330
movq 0x10(%rsp), %r8
movq 0x98(%rsp), %r9
movl %ebp, %r11d
movq (%rsp), %rdi
jmp 0xb281d
movl %ebp, %edi
movl %r12d, %esi
movq 0x50(%rsp), %rdx
callq 0x102c0
jmp 0xb2569
movl %ebp, %edi
movl %r12d, %esi
movq 0x50(%rsp), %rdx
callq 0x102f8
jmp 0xb261a
movq %r12, %rbx
shrq $0x20, %rbx
movq (%rax), %rbp
movq %rbp, 0x20(%rsp)
shrq $0x20, %rbp
movq 0x28(%r8), %rax
movq (%rax,%rbx,8), %rax
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testl %eax, %eax
je 0xb28ec
movq 0x8(%r8), %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 0xb28dc
cmpl %ebp, -0x4(%rsi)
je 0xb28f0
incq %rcx
addq $0x18, %rsi
cmpq %rcx, %rdx
jne 0xb28d2
movl %eax, %ecx
jmp 0xb28f4
xorl %ecx, %ecx
jmp 0xb28f4
movl -0xc(%rsi), %r14d
cmpl %eax, %ecx
jne 0xb2ba9
movq %rdi, %r10
movq 0x8(%rsp), %rcx
movq (%rcx), %rax
testq %rax, %rax
je 0xb294e
movq 0x10(%rcx), %rcx
movl $0x1, %edx
xorl %r13d, %r13d
leaq (,%r13,2), %rsi
addq %r13, %rsi
cmpl $0x0, 0xc(%rcx,%rsi,8)
js 0xb2942
leaq (%rcx,%rsi,8), %rdi
movq (%rdi), %rsi
movq %rsi, %r8
shrq $0x20, %r8
cmpl %ebx, %r8d
jne 0xb2942
cmpl %ebp, 0x8(%rdi)
je 0xb2953
movl %edx, %r13d
incl %edx
cmpq %r13, %rax
ja 0xb2918
jmp 0xb2956
xorl %r13d, %r13d
jmp 0xb2956
movl %esi, %r14d
cmpq %r13, %rax
jne 0xb2aa5
movl %r11d, 0x20(%rsp)
leaq 0x38(%rsp), %rax
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl 0x1c(%rsp), %ecx
movl 0x90(%rsp), %r8d
movq %rbx, %r14
movl %r14d, %r9d
pushq %rax
pushq %rbp
callq 0xb2ced
addq $0x10, %rsp
testl %eax, %eax
je 0xb2cc3
movl 0x38(%rsp), %r14d
movq 0x98(%rsp), %r13
testq %r13, %r13
je 0xb2ba0
movq 0x8(%r13), %rax
cmpq %rax, (%r13)
jne 0xb29e9
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmovneq %rcx, %rax
movq %rax, 0x8(%r13)
movq 0x10(%r13), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
callq 0x2370
movq 0x98(%rsp), %r13
movq %rax, 0x10(%r13)
movq (%r13), %rax
movq 0x10(%r13), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r13)
leaq (%rax,%rax,2), %rax
movq 0x48(%rsp), %rdx
movq %rdx, 0x10(%rcx,%rax,8)
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rcx,%rax,8)
movl %ebp, %r9d
xorl $0x1, %r9d
movq %rbx, 0x8(%rsp)
movl %ebx, %eax
xorl $0x1, %eax
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl 0x1c(%rsp), %ecx
movl 0x90(%rsp), %r8d
leaq 0x38(%rsp), %rbx
pushq %rbx
pushq %rax
callq 0xb2ced
addq $0x10, %rsp
testl %eax, %eax
je 0xb2cd7
movq 0x8(%r13), %rax
cmpq %rax, (%r13)
movq %r13, %r9
jne 0xb2a8d
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmovneq %rcx, %rax
movq %rax, 0x8(%r9)
movq 0x10(%r9), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
callq 0x2370
movq 0x98(%rsp), %r9
movq %rax, 0x10(%r9)
movq (%rsp), %rdi
movl 0x20(%rsp), %r11d
movabsq $-0x100000000, %rbp     # imm = 0xFFFFFFFF00000000
jmp 0xb2c31
testq %r9, %r9
je 0xb2bb8
movq 0x8(%r9), %rax
cmpq %rax, (%r9)
jne 0xb2af2
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmovneq %rcx, %rax
movq %rax, 0x8(%r9)
movq 0x10(%r9), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
movl %r11d, %ebp
callq 0x2370
movq 0x98(%rsp), %r9
movl %ebp, %r11d
movq (%rsp), %r10
movq %rax, 0x10(%r9)
movq 0x8(%rsp), %r8
movq 0x10(%r8), %rax
leaq (,%r13,2), %rcx
addq %r13, %rcx
movq (%r9), %rdx
movq 0x10(%r9), %rsi
leaq 0x1(%rdx), %rdi
movq %rdi, (%r9)
leaq (%rdx,%rdx,2), %rdx
movq 0x10(%rax,%rcx,8), %rdi
movq %rdi, 0x10(%rsi,%rdx,8)
movups (%rax,%rcx,8), %xmm0
movups %xmm0, (%rsi,%rdx,8)
movq (%r8), %rax
testq %rax, %rax
movabsq $-0x100000000, %rbp     # imm = 0xFFFFFFFF00000000
je 0xb2bca
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 0xb2b94
leaq (%rcx,%rdi,8), %r8
movq (%r8), %rdi
movq %rdi, %r9
xorq 0x20(%rsp), %r9
andq %rbp, %r9
cmpq %rsi, %r9
movq 0x98(%rsp), %r9
jne 0xb2b94
movl 0x8(%r8), %r8d
xorl %ebx, %r8d
cmpl $0x1, %r8d
je 0xb2bcf
movl %edx, %r13d
incl %edx
cmpq %r13, %rax
ja 0xb2b56
jmp 0xb2bd2
movq (%rsp), %rdi
movl 0x20(%rsp), %r11d
movabsq $-0x100000000, %rbp     # imm = 0xFFFFFFFF00000000
jmp 0xb2c53
movabsq $-0x100000000, %rbp     # imm = 0xFFFFFFFF00000000
movq %r10, %rdi
jmp 0xb2c53
xorl %r13d, %r13d
jmp 0xb2bd2
movl %edi, %r14d
movq 0x8(%r9), %rax
cmpq %rax, (%r9)
jne 0xb2c16
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmovneq %rcx, %rax
movq %rax, 0x8(%r9)
movq 0x10(%r9), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
movl %r11d, %ebx
callq 0x2370
movq 0x98(%rsp), %r9
movl %ebx, %r11d
movq (%rsp), %r10
movq %rax, 0x10(%r9)
leaq (,%r13,2), %rbx
addq %r13, %rbx
shlq $0x3, %rbx
movq 0x8(%rsp), %rax
addq 0x10(%rax), %rbx
movq %r10, %rdi
movq (%r9), %rax
movq 0x10(%r9), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r9)
leaq (%rax,%rax,2), %rax
movq 0x10(%rbx), %rdx
movq %rdx, 0x10(%rcx,%rax,8)
movups (%rbx), %xmm0
movups %xmm0, (%rcx,%rax,8)
cmpl $-0x1, %r14d
je 0xb2cb2
shlq $0x3, %r15
addq 0x18(%rdi), %r15
andq %rbp, %r12
movl %r14d, %eax
orq %r12, %rax
movq %rax, (%r15)
addl %r14d, %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 0xb2ca3
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
movl %r11d, %ebx
callq 0x103be
movl %ebx, %r11d
movq (%rsp), %rdi
jmp 0xb2c59
movl %r14d, %edi
movl %ebp, %esi
movq 0x10(%rsp), %rdx
callq 0x1034c
jmp 0xb2998
movq 0x8(%rsp), %rdi
movl %ebp, %esi
movq 0x10(%rsp), %rdx
callq 0x10385
jmp 0xb2a4f