// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: reduce_ma_utg_t_scaf(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_scaf(ma_utg_t *in, asg_t *rg, ma_hit_t_alloc* src, ma_sub_t *cov, 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 < in->n; i++) {
        if(in->a[i] == (uint64_t)-1) {
            // if(newE) asg_seq_del(read_g, collection->a[i]>>33);
            continue;
        } 
        
        in->a[m] = in->a[i];
        m++;
    }
    in->n = m;


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

        if((!IS_SCAF_READ(R_INF, v>>1)) && (!IS_SCAF_READ(R_INF, w>>1))) {
            /*******************************for debug************************************/
            l = (uint32_t)-1;
            av = asg_arc_a(rg, v); nv = asg_arc_n(rg, 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(src, cov, 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, rg->r_seq);
                    }
                    l = asg_arc_len(t_f);

                    
                    if(newE) {
                        kv_push(asg_arc_t, newE->a, t_f);
                        if(get_edge_from_source(src, cov, 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, rg->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************************************/
        }


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

    if(i < in->n) {
        if(in->circ) {
            v = (uint64_t)(in->a[i])>>32;
            w = (uint64_t)(in->a[0])>>32; 
            l = Get_READ_LENGTH(R_INF, (v>>1)); ///for Ns

            if((!IS_SCAF_READ(R_INF, v>>1)) && (!IS_SCAF_READ(R_INF, w>>1))) {
                /*******************************for debug************************************/
                l = (uint32_t)-1;
                av = asg_arc_a(rg, v);
                nv = asg_arc_n(rg, 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(src, cov, 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, rg->r_seq);
                        }
                        l = asg_arc_len(t_f);

                        if(newE) {
                            kv_push(asg_arc_t, newE->a, t_f);
                            if(get_edge_from_source(src, cov, 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, rg->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************************************/
            }

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r9d, 0x24(%rsp)
movq %r8, %r14
movq %rcx, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rsi, 0x28(%rsp)
movq 0xb8(%rsp), %r10
movl 0x10(%rdi), %ecx
xorl %edx, %edx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x7932a
movq 0x18(%rdi), %rsi
movq (%rsi,%rdx,8), %r9
cmpq $-0x1, %r9
je 0x79325
movl %eax, %r8d
movq %r9, (%rsi,%r8,8)
incl %eax
incq %rdx
jmp 0x79309
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movl %eax, 0x10(%rdi)
leaq 0x1daef2(%rip), %r11    # 0x254230
xorl %esi, %esi
xorl %r8d, %r8d
movq %rdi, 0x10(%rsp)
movq %rsi, %rbx
incq %rsi
movl %eax, %ecx
cmpq %rcx, %rsi
jae 0x79815
movq 0x18(%rdi), %rcx
movq (%rcx,%rbx,8), %rbp
movq 0x10(%r11), %rax
movq 0x18(%r11), %rdx
movq %rbp, %r12
shrq $0x21, %r12
movl (%rdx,%r12,8), %edx
cmpq $0x0, (%rax,%r12,8)
je 0x79727
movq (%rcx,%rsi,8), %r13
movq %r13, 0x70(%rsp)
shrq $0x20, %r13
movl %r13d, %ecx
shrl %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0x79727
movq %rcx, 0x68(%rsp)
movq %rsi, 0x38(%rsp)
movq %rbp, 0x30(%rsp)
shrq $0x20, %rbp
movq 0x28(%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
cmpq %rsi, %rcx
je 0x793ef
cmpl $0x0, (%rdx)
js 0x793e6
cmpl %r13d, -0x4(%rdx)
je 0x793f8
incq %rsi
addq $0x18, %rdx
jmp 0x793d6
pushq $-0x1
popq %rax
movl %eax, 0x18(%rsp)
jmp 0x79407
movl -0xc(%rdx), %ecx
movl %ecx, 0x18(%rsp)
cmpl %esi, %eax
jne 0x79714
movq (%r14), %rax
xorl %r15d, %r15d
movl %r15d, %r15d
cmpq %r15, %rax
jbe 0x79444
movq 0x10(%r14), %rcx
imulq $0x18, %r15, %rdx
cmpl $0x0, 0xc(%rcx,%rdx)
js 0x7943b
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, %rsi
shrq $0x20, %rsi
cmpl %ebp, %esi
jne 0x7943b
cmpl %r13d, 0x8(%rcx)
je 0x79440
incl %r15d
jmp 0x7940d
movl %edx, 0x18(%rsp)
cmpq %r15, %rax
jne 0x795a9
movl %r8d, 0xc(%rsp)
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x24(%rsp), %ecx
movl 0xb0(%rsp), %r8d
movl %ebp, %r9d
leaq 0x50(%rsp), %rax
pushq %rax
pushq %r13
callq 0x79204
popq %rcx
popq %rdx
testl %eax, %eax
je 0x79791
movl 0x50(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0xb8(%rsp), %r10
testq %r10, %r10
je 0x795fb
movq (%r10), %rcx
movq 0x10(%r10), %rax
cmpq 0x8(%r10), %rcx
jne 0x794d5
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 0xb8(%rsp), %r10
movq %rax, 0x10(%r10)
movq (%r10), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%r10)
imulq $0x18, %rcx, %rcx
movq 0x60(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx)
movups 0x50(%rsp), %xmm0
movups %xmm0, (%rax,%rcx)
movl %r13d, %r9d
xorl $0x1, %r9d
movl %ebp, %eax
xorl $0x1, %eax
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x24(%rsp), %ecx
movl 0xb0(%rsp), %r8d
leaq 0x50(%rsp), %rdx
pushq %rdx
pushq %rax
movq %r10, %r15
callq 0x79204
popq %rcx
popq %rdx
testl %eax, %eax
je 0x797d3
movq (%r15), %rcx
movq 0x10(%r15), %rax
cmpq 0x8(%r15), %rcx
movq %r15, %r10
jne 0x7956b
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 0xb8(%rsp), %r10
movq %rax, 0x10(%r10)
movq (%r10), %rcx
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %r8d
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
leaq 0x1dacaa(%rip), %r11    # 0x254230
leaq 0x1(%rcx), %rdx
movq %rdx, (%r10)
imulq $0x18, %rcx, %rcx
movq 0x60(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx)
movups 0x50(%rsp), %xmm0
movups %xmm0, (%rax,%rcx)
jmp 0x79714
testq %r10, %r10
je 0x79714
movq (%r10), %rcx
movq 0x10(%r10), %rax
cmpq 0x8(%r10), %rcx
jne 0x7961b
movl %r8d, %r12d
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 0xb8(%rsp), %r10
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movq %rax, 0x10(%r10)
movq (%r10), %rcx
jmp 0x7961e
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %r8d
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
leaq 0x1dac1a(%rip), %r11    # 0x254230
jmp 0x79714
movl %r8d, %r12d
movq 0x70(%rsp), %r8
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 0x79692
movq 0x10(%r14), %rcx
imulq $0x18, %r15, %rdx
cmpl $0x0, 0xc(%rcx,%rdx)
js 0x7968d
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, %rsi
xorq %r8, %rsi
andq %r9, %rsi
cmpq %rdi, %rsi
jne 0x7968d
movl 0x8(%rcx), %ecx
xorl %ebp, %ecx
cmpl $0x1, %ecx
je 0x79698
incl %r15d
jmp 0x79658
movl 0x18(%rsp), %edx
jmp 0x79698
movq (%r10), %rcx
movq 0x10(%r10), %rax
cmpq 0x8(%r10), %rcx
movl %edx, 0x18(%rsp)
jne 0x796e0
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 0xb8(%rsp), %r10
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movq %rax, 0x10(%r10)
movq (%r10), %rcx
movq 0x10(%rsp), %rdi
leaq 0x1dab44(%rip), %r11    # 0x254230
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 %r12d, %r8d
movl 0x18(%rsp), %edx
cmpl $-0x1, %edx
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rbp
je 0x79742
movq 0x18(%rdi), %rax
andq %r9, %rbp
movl %edx, %ecx
orq %rbp, %rcx
movq %rcx, (%rax,%rbx,8)
addl %edx, %r8d
movl 0x10(%rdi), %eax
jmp 0x79348
movq 0x1d9897(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x171631(%rip), %rdi    # 0x1ead84
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
movl %r8d, %ebp
callq 0x2410
leaq 0x1daac8(%rip), %r11    # 0x254230
movq 0xb8(%rsp), %r10
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movl %ebp, %r8d
movq 0x30(%rsp), %rbp
movq 0x38(%rsp), %rsi
movq 0x10(%rsp), %rdi
pushq $-0x1
popq %rdx
jmp 0x79727
movq 0x1d9848(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
movl %ebp, %ecx
andl $0x1, %ecx
movl %r13d, %r9d
andl $0x1, %r9d
movq 0x28(%rsp), %rax
movl 0x18(%rax), %r10d
subq $0x8, %rsp
leaq 0x16ea8c(%rip), %rsi    # 0x1e8247
movl %r12d, %edx
movq 0x70(%rsp), %r8
xorl %eax, %eax
pushq %r10
callq 0x22b0
popq %rcx
popq %rdx
jmp 0x79482
movq 0x1d9806(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
andl $0x1, %ebp
andl $0x1, %r13d
movq 0x28(%rsp), %rax
movl 0x18(%rax), %r10d
subq $0x8, %rsp
leaq 0x16ea8c(%rip), %rsi    # 0x1e8284
movl %r12d, %edx
movl %ebp, %ecx
movq 0x70(%rsp), %r8
movl %r13d, %r9d
xorl %eax, %eax
pushq %r10
callq 0x22b0
popq %rcx
popq %rdx
jmp 0x7952e
cmpl %ebx, %eax
jbe 0x79bf3
cmpl $0x0, (%rdi)
movq 0x18(%rdi), %rax
movl %ebx, %r15d
movq (%rax,%r15,8), %r13
js 0x7984e
leaq (%rax,%r15,8), %r15
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rax
movq %r13, %rcx
shrq $0x21, %rcx
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
andl (%rax,%rcx,8), %ebx
jmp 0x79be5
movq 0x10(%r11), %rcx
movq 0x18(%r11), %rdx
movq %r13, %rsi
shrq $0x21, %rsi
movl (%rdx,%rsi,8), %ebx
cmpq $0x0, (%rcx,%rsi,8)
je 0x79bdd
movq (%rax), %rbp
movq %rbp, 0x18(%rsp)
shrq $0x20, %rbp
movl %ebp, %eax
shrl %eax
cmpq $0x0, (%rcx,%rax,8)
je 0x79bdd
movq %rax, 0x30(%rsp)
movq %rsi, 0x38(%rsp)
movq %r13, %r11
shrq $0x20, %r11
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x28(%rax), %rax
movq (%rax,%r11,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 0x798e4
cmpl $0x0, (%rsi)
js 0x798d0
cmpl %ebp, -0x4(%rsi)
je 0x798d9
incq %rcx
addq $0x18, %rsi
jmp 0x798c1
movl -0xc(%rsi), %ebx
cmpl %ecx, %eax
jne 0x79bd8
movq (%r14), %rax
xorl %r12d, %r12d
movl %r12d, %r12d
cmpq %r12, %rax
jbe 0x7991f
movq 0x10(%r14), %rcx
imulq $0x18, %r12, %rdx
cmpl $0x0, 0xc(%rcx,%rdx)
js 0x79918
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, %rsi
shrq $0x20, %rsi
cmpl %r11d, %esi
jne 0x79918
cmpl %ebp, 0x8(%rcx)
je 0x7991d
incl %r12d
jmp 0x798ea
movl %edx, %ebx
cmpq %r12, %rax
jne 0x79a80
movl %r8d, 0xc(%rsp)
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x24(%rsp), %ecx
movl 0xb0(%rsp), %r8d
movq %r11, %r14
movl %r11d, %r9d
leaq 0x50(%rsp), %rax
pushq %rax
pushq %rbp
callq 0x79204
popq %rcx
popq %rdx
testl %eax, %eax
je 0x79c6e
movl 0x50(%rsp), %ebx
movq 0xb8(%rsp), %r10
testq %r10, %r10
je 0x79b4d
movq (%r10), %rcx
movq 0x10(%r10), %rax
cmpq 0x8(%r10), %rcx
jne 0x799ae
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 0xb8(%rsp), %r10
movq %rax, 0x10(%r10)
movq (%r10), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%r10)
imulq $0x18, %rcx, %rcx
movq 0x60(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx)
movups 0x50(%rsp), %xmm0
movups %xmm0, (%rax,%rcx)
movl %ebp, %r9d
xorl $0x1, %r9d
movl %r14d, %eax
xorl $0x1, %eax
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x24(%rsp), %ecx
movl 0xb0(%rsp), %r8d
leaq 0x50(%rsp), %rdx
pushq %rdx
pushq %rax
movq %r10, %r12
callq 0x79204
popq %rcx
popq %rdx
testl %eax, %eax
je 0x79cb3
movq (%r12), %rcx
movq 0x10(%r12), %rax
cmpq 0x8(%r12), %rcx
jne 0x79a48
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rdx
movq %rdx, 0x8(%r12)
imulq $0x18, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq 0xb8(%rsp), %r12
movq %rax, 0x10(%r12)
movq (%r12), %rcx
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %r8d
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
leaq 0x1(%rcx), %rdx
movq %rdx, (%r12)
imulq $0x18, %rcx, %rcx
movq 0x60(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx)
movups 0x50(%rsp), %xmm0
movups %xmm0, (%rax,%rcx)
jmp 0x79bd8
testq %r10, %r10
je 0x79bd8
movq (%r10), %rcx
movq 0x10(%r10), %rax
cmpq 0x8(%r10), %rcx
movl %r8d, 0xc(%rsp)
jne 0x79ad8
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
movq %r11, %rbp
callq 0x2370
movq %rbp, %r11
movq 0xb8(%rsp), %r10
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movq %rax, 0x10(%r10)
movq (%r10), %rcx
movq 0x18(%rsp), %r8
movq 0x10(%r14), %rdx
imulq $0x18, %r12, %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 %r12d, %r12d
movabsq $0x100000000, %rdi      # imm = 0x100000000
movl %r12d, %r12d
cmpq %r12, %rax
jbe 0x79b65
movq 0x10(%r14), %rcx
imulq $0x18, %r12, %rdx
cmpl $0x0, 0xc(%rcx,%rdx)
js 0x79b48
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, %rsi
xorq %r8, %rsi
andq %r9, %rsi
cmpq %rdi, %rsi
jne 0x79b48
movl 0x8(%rcx), %ecx
xorl %r11d, %ecx
cmpl $0x1, %ecx
je 0x79b63
incl %r12d
jmp 0x79b12
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %r8d
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
jmp 0x79bd8
movl %edx, %ebx
movq (%r10), %rcx
movq 0x10(%r10), %rax
cmpq 0x8(%r10), %rcx
jne 0x79ba9
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 0xb8(%rsp), %r10
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movq %rax, 0x10(%r10)
movq (%r10), %rcx
movq 0x10(%rsp), %rdi
movq 0x10(%r14), %rdx
imulq $0x18, %r12, %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 0xc(%rsp), %r8d
cmpl $-0x1, %ebx
je 0x79c35
shlq $0x3, %r15
addq 0x18(%rdi), %r15
andq %r9, %r13
movl %ebx, %eax
orq %r13, %rax
movq %rax, (%r15)
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 0x79c26
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 $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1d93a4(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x17113e(%rip), %rdi    # 0x1ead84
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
movl %r8d, %ebx
callq 0x2410
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movl %ebx, %r8d
movq 0x10(%rsp), %rdi
pushq $-0x1
popq %rbx
jmp 0x79bdd
movq 0x1d936b(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
movl %r14d, %ecx
andl $0x1, %ecx
movl %ebp, %r9d
andl $0x1, %r9d
movq 0x28(%rsp), %rax
movl 0x18(%rax), %r10d
subq $0x8, %rsp
leaq 0x16e5ae(%rip), %rsi    # 0x1e8247
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %r8
xorl %eax, %eax
pushq %r10
callq 0x22b0
popq %rcx
popq %rdx
jmp 0x7995f
movq 0x1d9326(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
andl $0x1, %r14d
andl $0x1, %ebp
movq 0x28(%rsp), %rax
movl 0x18(%rax), %r10d
subq $0x8, %rsp
leaq 0x16e5ac(%rip), %rsi    # 0x1e8284
movq 0x40(%rsp), %rdx
movl %r14d, %ecx
movq 0x38(%rsp), %r8
movl %ebp, %r9d
xorl %eax, %eax
pushq %r10
callq 0x22b0
popq %rcx
popq %rdx
jmp 0x79a08