// File: /workspace/github_cpp_makefile_star2_O2/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 $0x68, %rsp
movl %r9d, 0x14(%rsp)
movq %r8, %r14
movq %rcx, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rsi, 0x18(%rsp)
movq 0xa8(%rsp), %r10
movl 0x10(%rdi), %ecx
xorl %edx, %edx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x788c3
movq 0x18(%rdi), %rsi
movq (%rsi,%rdx,8), %r9
cmpq $-0x1, %r9
je 0x788be
movl %eax, %r8d
movq %r9, (%rsi,%r8,8)
incl %eax
incq %rdx
jmp 0x788a2
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movl %eax, 0x10(%rdi)
xorl %r11d, %r11d
xorl %r8d, %r8d
movq %rdi, 0x8(%rsp)
leal -0x1(%rax), %ecx
cmpq %rcx, %r11
jae 0x78d4a
movq 0x18(%rdi), %rax
movq (%rax,%r11,8), %r13
movq 0x8(%rax,%r11,8), %rbx
movq %r13, %rbp
shrq $0x20, %rbp
leaq 0x1(%r11), %r15
movq %rbx, %r12
shrq $0x20, %r12
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdx
movq 0x28(%rax), %rax
movq (%rax,%rbp,8), %rax
movq %rax, %rsi
shrq $0x20, %rsi
movl %eax, %ecx
imulq $0x18, %rsi, %rsi
addq %rsi, %rdx
addq $0xc, %rdx
xorl %esi, %esi
movq %r15, 0x20(%rsp)
movq %r13, 0x60(%rsp)
cmpq %rsi, %rcx
je 0x78950
cmpl $0x0, (%rdx)
js 0x78947
cmpl %r12d, -0x4(%rdx)
je 0x78956
incq %rsi
addq $0x18, %rdx
jmp 0x78937
pushq $-0x1
popq %r13
jmp 0x78962
movl -0xc(%rdx), %r13d
cmpl %esi, %eax
jne 0x78c55
movq (%r14), %rax
xorl %r15d, %r15d
movl %r15d, %r15d
cmpq %r15, %rax
jbe 0x7899e
movq 0x10(%r14), %rcx
imulq $0x18, %r15, %rdx
cmpl $0x0, 0xc(%rcx,%rdx)
js 0x78996
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, %rsi
shrq $0x20, %rsi
cmpl %ebp, %esi
jne 0x78996
cmpl %r12d, 0x8(%rcx)
je 0x7899b
incl %r15d
jmp 0x78968
movl %edx, %r13d
cmpq %r15, %rax
jne 0x78aff
movq %r11, 0x58(%rsp)
movl %r8d, %ebx
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl 0x14(%rsp), %ecx
movl 0xa0(%rsp), %r8d
movl %ebp, %r9d
leaq 0x40(%rsp), %rax
pushq %rax
pushq %r12
callq 0x79204
popq %rcx
popq %rdx
testl %eax, %eax
je 0x78cc2
movl 0x40(%rsp), %r13d
movq 0xa8(%rsp), %r10
testq %r10, %r10
je 0x78bc3
movq (%r10), %rcx
movq 0x10(%r10), %rax
cmpq 0x8(%r10), %rcx
jne 0x78a2f
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rdx
movq %rdx, 0x8(%r10)
imulq $0x18, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq 0xa8(%rsp), %r10
movq %rax, 0x10(%r10)
movq (%r10), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%r10)
imulq $0x18, %rcx, %rcx
movq 0x50(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rax,%rcx)
movl %r12d, %r9d
xorl $0x1, %r9d
movl %ebp, %eax
xorl $0x1, %eax
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl 0x14(%rsp), %ecx
movl 0xa0(%rsp), %r8d
leaq 0x40(%rsp), %rdx
pushq %rdx
pushq %rax
movq %r10, %r15
callq 0x79204
popq %rcx
popq %rdx
testl %eax, %eax
je 0x78d06
movq (%r15), %rcx
movq 0x10(%r15), %rax
cmpq 0x8(%r15), %rcx
movq %r15, %r10
jne 0x78ac5
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rdx
movq %rdx, 0x8(%r10)
imulq $0x18, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq 0xa8(%rsp), %r10
movq %rax, 0x10(%r10)
movq (%r10), %rcx
movq 0x8(%rsp), %rdi
movl %ebx, %r8d
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movq 0x58(%rsp), %r11
leaq 0x1(%rcx), %rdx
movq %rdx, (%r10)
imulq $0x18, %rcx, %rcx
movq 0x50(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rax,%rcx)
jmp 0x78c55
testq %r10, %r10
je 0x78c55
movq (%r10), %rcx
movq 0x10(%r10), %rax
cmpq 0x8(%r10), %rcx
movl %r8d, 0x2c(%rsp)
movq %r11, %r12
jne 0x78b54
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rdx
movq %rdx, 0x8(%r10)
imulq $0x18, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq 0xa8(%rsp), %r10
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movq %rax, 0x10(%r10)
movq (%r10), %rcx
movq 0x10(%r14), %rdx
imulq $0x18, %r15, %rsi
leaq 0x1(%rcx), %rdi
movq %rdi, (%r10)
imulq $0x18, %rcx, %rcx
movq 0x10(%rdx,%rsi), %rdi
movq %rdi, 0x10(%rax,%rcx)
movups (%rdx,%rsi), %xmm0
movups %xmm0, (%rax,%rcx)
movq (%r14), %rax
xorl %r15d, %r15d
movabsq $0x100000000, %rdi      # imm = 0x100000000
movl %r15d, %r15d
cmpq %r15, %rax
jbe 0x78bdf
movq 0x10(%r14), %rcx
imulq $0x18, %r15, %rdx
cmpl $0x0, 0xc(%rcx,%rdx)
js 0x78bbe
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, %rsi
xorq %rbx, %rsi
andq %r9, %rsi
cmpq %rdi, %rsi
jne 0x78bbe
movl 0x8(%rcx), %ecx
xorl %ebp, %ecx
cmpl $0x1, %ecx
je 0x78bdc
incl %r15d
jmp 0x78b89
movq 0x8(%rsp), %rdi
movl %ebx, %r8d
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movq 0x58(%rsp), %r11
jmp 0x78c55
movl %edx, %r13d
movq (%r10), %rcx
movq 0x10(%r10), %rax
cmpq 0x8(%r10), %rcx
jne 0x78c23
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rdx
movq %rdx, 0x8(%r10)
imulq $0x18, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq 0xa8(%rsp), %r10
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movq %rax, 0x10(%r10)
movq (%r10), %rcx
movq 0x8(%rsp), %rdi
movq %r12, %r11
movq 0x10(%r14), %rdx
imulq $0x18, %r15, %rsi
leaq 0x1(%rcx), %r8
movq %r8, (%r10)
imulq $0x18, %rcx, %rcx
movq 0x10(%rdx,%rsi), %r8
movq %r8, 0x10(%rax,%rcx)
movups (%rdx,%rsi), %xmm0
movups %xmm0, (%rax,%rcx)
movl 0x2c(%rsp), %r8d
cmpl $-0x1, %r13d
je 0x78c81
movq 0x18(%rdi), %rax
movq 0x60(%rsp), %rdx
andq %r9, %rdx
movl %r13d, %ecx
orq %rdx, %rcx
movq %rcx, (%rax,%r11,8)
addl %r13d, %r8d
movl 0x10(%rdi), %eax
movq 0x20(%rsp), %r11
jmp 0x788db
movq 0x1da358(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x1720f2(%rip), %rdi    # 0x1ead84
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
movl %r8d, %ebx
movq %r11, %r15
callq 0x2410
movq %r15, %r11
movq 0xa8(%rsp), %r10
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movl %ebx, %r8d
movq 0x8(%rsp), %rdi
jmp 0x78c5b
movq 0x1da317(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
movl %ebp, %edx
shrl %edx
movl %ebp, %ecx
andl $0x1, %ecx
movl %r12d, %r8d
shrl %r8d
movl %r12d, %r9d
andl $0x1, %r9d
movq 0x18(%rsp), %rax
movl 0x18(%rax), %r10d
subq $0x8, %rsp
leaq 0x16f551(%rip), %rsi    # 0x1e8247
xorl %eax, %eax
pushq %r10
callq 0x22b0
popq %rcx
popq %rdx
jmp 0x789df
movq 0x1da2d3(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
movl %ebp, %edx
shrl %edx
andl $0x1, %ebp
movl %r12d, %r8d
shrl %r8d
andl $0x1, %r12d
movq 0x18(%rsp), %rax
movl 0x18(%rax), %r10d
subq $0x8, %rsp
leaq 0x16f54f(%rip), %rsi    # 0x1e8284
movl %ebp, %ecx
movl %r12d, %r9d
xorl %eax, %eax
pushq %r10
callq 0x22b0
popq %rcx
popq %rdx
jmp 0x78a88
cmpl %r11d, %eax
jbe 0x790f9
cmpl $0x0, (%rdi)
movq 0x18(%rdi), %rax
movl %r11d, %r12d
movq (%rax,%r12,8), %r11
js 0x78d84
leaq (%rax,%r12,8), %r12
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
movq %r11, %rcx
shrq $0x21, %rcx
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
andl (%rax,%rcx,8), %ebx
jmp 0x790ea
movq %r11, %rdx
shrq $0x20, %rdx
movq (%rax), %rbp
movq %rbp, 0x20(%rsp)
shrq $0x20, %rbp
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x28(%rax), %rax
movq %rdx, %r15
movq (%rax,%rdx,8), %rax
movq %rax, %rsi
shrq $0x20, %rsi
movl %eax, %edx
imulq $0x18, %rsi, %rsi
addq %rcx, %rsi
addq $0xc, %rsi
xorl %ecx, %ecx
pushq $-0x1
popq %rbx
cmpq %rcx, %rdx
je 0x78de7
cmpl $0x0, (%rsi)
js 0x78dd3
cmpl %ebp, -0x4(%rsi)
je 0x78ddc
incq %rcx
addq $0x18, %rsi
jmp 0x78dc4
movl -0xc(%rsi), %ebx
cmpl %ecx, %eax
jne 0x790dd
movq (%r14), %rax
xorl %r13d, %r13d
movl %r13d, %r13d
cmpq %r13, %rax
jbe 0x78e22
movq 0x10(%r14), %rcx
imulq $0x18, %r13, %rdx
cmpl $0x0, 0xc(%rcx,%rdx)
js 0x78e1b
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, %rsi
shrq $0x20, %rsi
cmpl %r15d, %esi
jne 0x78e1b
cmpl %ebp, 0x8(%rcx)
je 0x78e20
incl %r13d
jmp 0x78ded
movl %edx, %ebx
cmpq %r13, %rax
jne 0x78f82
movq %r11, 0x20(%rsp)
movl %r8d, %r14d
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl 0x14(%rsp), %ecx
movl 0xa0(%rsp), %r8d
movl %r15d, %r9d
leaq 0x40(%rsp), %rax
pushq %rax
pushq %rbp
callq 0x79204
popq %rcx
popq %rdx
testl %eax, %eax
je 0x79177
movl 0x40(%rsp), %ebx
movq 0xa8(%rsp), %r10
testq %r10, %r10
je 0x7904c
movq (%r10), %rcx
movq 0x10(%r10), %rax
cmpq 0x8(%r10), %rcx
jne 0x78eb1
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rdx
movq %rdx, 0x8(%r10)
imulq $0x18, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq 0xa8(%rsp), %r10
movq %rax, 0x10(%r10)
movq (%r10), %rcx
movq %r15, %r13
leaq 0x1(%rcx), %rdx
movq %rdx, (%r10)
imulq $0x18, %rcx, %rcx
movq 0x50(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rax,%rcx)
movl %ebp, %r9d
xorl $0x1, %r9d
movl %r13d, %eax
xorl $0x1, %eax
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl 0x14(%rsp), %ecx
movl 0xa0(%rsp), %r8d
leaq 0x40(%rsp), %rdx
pushq %rdx
pushq %rax
movq %r10, %r15
callq 0x79204
popq %rcx
popq %rdx
testl %eax, %eax
je 0x791be
movq (%r15), %rcx
movq 0x10(%r15), %rax
cmpq 0x8(%r15), %rcx
jne 0x78f48
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rdx
movq %rdx, 0x8(%r15)
imulq $0x18, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq 0xa8(%rsp), %r15
movq %rax, 0x10(%r15)
movq (%r15), %rcx
movq 0x8(%rsp), %rdi
movl %r14d, %r8d
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movq 0x20(%rsp), %r11
leaq 0x1(%rcx), %rdx
movq %rdx, (%r15)
imulq $0x18, %rcx, %rcx
movq 0x50(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rax,%rcx)
jmp 0x790dd
testq %r10, %r10
je 0x790dd
movq (%r10), %rcx
movq 0x10(%r10), %rax
cmpq 0x8(%r10), %rcx
movl %r8d, 0x2c(%rsp)
movq %r11, %rbp
jne 0x78fd7
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rdx
movq %rdx, 0x8(%r10)
imulq $0x18, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq 0xa8(%rsp), %r10
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movq %rax, 0x10(%r10)
movq (%r10), %rcx
movq 0x10(%r14), %rdx
imulq $0x18, %r13, %rsi
leaq 0x1(%rcx), %rdi
movq %rdi, (%r10)
imulq $0x18, %rcx, %rcx
movq 0x10(%rdx,%rsi), %rdi
movq %rdi, 0x10(%rax,%rcx)
movups (%rdx,%rsi), %xmm0
movups %xmm0, (%rax,%rcx)
movq (%r14), %rax
xorl %r13d, %r13d
movabsq $0x100000000, %rdi      # imm = 0x100000000
movq 0x20(%rsp), %r8
movl %r13d, %r13d
cmpq %r13, %rax
jbe 0x79067
movq 0x10(%r14), %rcx
imulq $0x18, %r13, %rdx
cmpl $0x0, 0xc(%rcx,%rdx)
js 0x79047
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, %rsi
xorq %r8, %rsi
andq %r9, %rsi
cmpq %rdi, %rsi
jne 0x79047
movl 0x8(%rcx), %ecx
xorl %r15d, %ecx
cmpl $0x1, %ecx
je 0x79065
incl %r13d
jmp 0x79011
movq 0x8(%rsp), %rdi
movl %r14d, %r8d
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movq 0x20(%rsp), %r11
jmp 0x790dd
movl %edx, %ebx
movq (%r10), %rcx
movq 0x10(%r10), %rax
cmpq 0x8(%r10), %rcx
jne 0x790ab
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rdx
movq %rdx, 0x8(%r10)
imulq $0x18, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq 0xa8(%rsp), %r10
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movq %rax, 0x10(%r10)
movq (%r10), %rcx
movq 0x8(%rsp), %rdi
movq %rbp, %r11
movq 0x10(%r14), %rdx
imulq $0x18, %r13, %rsi
leaq 0x1(%rcx), %r8
movq %r8, (%r10)
imulq $0x18, %rcx, %rcx
movq 0x10(%rdx,%rsi), %r8
movq %r8, 0x10(%rax,%rcx)
movups (%rdx,%rsi), %xmm0
movups %xmm0, (%rax,%rcx)
movl 0x2c(%rsp), %r8d
cmpl $-0x1, %ebx
je 0x7913b
shlq $0x3, %r12
addq 0x18(%rdi), %r12
andq %r9, %r11
movl %ebx, %eax
orq %r11, %rax
movq %rax, (%r12)
addl %ebx, %r8d
movl (%rdi), %eax
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movl %eax, %ecx
andl $0x80000000, %ecx       # imm = 0x80000000
orl %r8d, %ecx
movl %ecx, (%rdi)
testl %eax, %eax
js 0x7912c
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 $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1d9e9e(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x171c38(%rip), %rdi    # 0x1ead84
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
movl %r8d, %ebp
movq %r11, %r14
callq 0x2410
movq %r14, %r11
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movl %ebp, %r8d
movq 0x8(%rsp), %rdi
jmp 0x790e2
movq 0x1d9e62(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
movq %r15, %rax
movl %eax, %edx
shrl %edx
movl %eax, %ecx
andl $0x1, %ecx
movl %ebp, %r8d
shrl %r8d
movl %ebp, %r9d
andl $0x1, %r9d
movq 0x18(%rsp), %rax
movl 0x18(%rax), %r10d
subq $0x8, %rsp
leaq 0x16f099(%rip), %rsi    # 0x1e8247
xorl %eax, %eax
pushq %r10
callq 0x22b0
popq %rcx
popq %rdx
jmp 0x78e62
movq 0x1d9e1b(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
movl %r13d, %edx
shrl %edx
andl $0x1, %r13d
movl %ebp, %r8d
shrl %r8d
andl $0x1, %ebp
movq 0x18(%rsp), %rax
movl 0x18(%rax), %r10d
subq $0x8, %rsp
leaq 0x16f096(%rip), %rsi    # 0x1e8284
movl %r13d, %ecx
movl %ebp, %r9d
xorl %eax, %eax
pushq %r10
callq 0x22b0
popq %rcx
popq %rdx
jmp 0x78f0e