// File: /workspace/github_cpp_makefile_star2_O1/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 $0x68, %rsp
movl %r9d, 0x24(%rsp)
movq %r8, %r14
movq %rcx, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, %r10
movl 0x10(%rdi), %ecx
xorl %ebp, %ebp
movl $0x0, %eax
testq %rcx, %rcx
je 0xb2e25
movq 0x18(%r10), %rdx
xorl %esi, %esi
xorl %eax, %eax
movq (%rdx,%rsi,8), %rdi
cmpq $-0x1, %rdi
je 0xb2e1d
movl %eax, %r8d
movq %rdi, (%rdx,%r8,8)
incl %eax
incq %rsi
cmpq %rsi, %rcx
jne 0xb2e0a
movq 0xa8(%rsp), %r9
movl %eax, 0x10(%r10)
movl $0x0, %r11d
cmpl $0x2, %eax
movq %r10, 0x8(%rsp)
movq %r14, 0x28(%rsp)
movq 0x10(%rsp), %rdi
jb 0xb3339
movl $0x1, %ecx
xorl %ebx, %ebx
xorl %r11d, %r11d
movq %rcx, %rbp
movq 0x18(%r10), %rcx
movq (%rcx,%rbx,8), %r15
leaq 0x1d83c5(%rip), %rdx    # 0x28b230
movq 0x10(%rdx), %rax
movq 0x18(%rdx), %rdx
movq %r15, %r12
shrq $0x21, %r12
movl (%rdx,%r12,8), %edx
cmpq $0x0, (%rax,%r12,8)
je 0xb3253
movq (%rcx,%rbp,8), %r13
movq %r13, 0x18(%rsp)
shrq $0x20, %r13
movl %r13d, %ecx
shrl %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0xb3253
movq %rcx, 0x38(%rsp)
movq %rbp, (%rsp)
movq %r15, %rbp
shrq $0x20, %rbp
movq 0x28(%rdi), %rax
movq (%rax,%rbp,8), %rax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0xb2f02
movq 0x8(%rdi), %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 0xb2eed
cmpl %r13d, -0x4(%rsi)
je 0xb2f06
incq %rcx
addq $0x18, %rsi
cmpq %rcx, %rdx
jne 0xb2ee2
movl %eax, %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
jmp 0xb2f09
xorl %ecx, %ecx
jmp 0xb2f09
movl -0xc(%rsi), %edx
cmpl %eax, %ecx
jne 0xb31b7
movq (%r14), %rax
testq %rax, %rax
je 0xb2f62
movl %edx, 0x30(%rsp)
movq 0x10(%r14), %rcx
movl $0x1, %edx
xorl %r14d, %r14d
leaq (%r14,%r14,2), %rsi
cmpl $0x0, 0xc(%rcx,%rsi,8)
js 0xb2f4d
leaq (%rcx,%rsi,8), %rdi
movq (%rdi), %rsi
movq %rsi, %r8
shrq $0x20, %r8
cmpl %ebp, %r8d
jne 0xb2f4d
cmpl %r13d, 0x8(%rdi)
je 0xb2f67
movl %edx, %r14d
incl %edx
cmpq %r14, %rax
ja 0xb2f29
movq 0x10(%rsp), %rdi
movl 0x30(%rsp), %edx
jmp 0xb2f6e
xorl %r14d, %r14d
jmp 0xb2f6e
movl %esi, %edx
movq 0x10(%rsp), %rdi
cmpq %r14, %rax
jne 0xb30be
movl %r11d, 0x18(%rsp)
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x24(%rsp), %ecx
movl 0xa0(%rsp), %r8d
movl %ebp, %r9d
leaq 0x50(%rsp), %rax
pushq %rax
pushq %r13
callq 0xb2ced
addq $0x10, %rsp
testl %eax, %eax
je 0xb32b1
movl 0x50(%rsp), %edx
movq 0xa8(%rsp), %r9
testq %r9, %r9
movq 0x28(%rsp), %r14
je 0xb31a1
movl %edx, 0x30(%rsp)
movq 0x8(%r9), %rax
cmpq %rax, (%r9)
jne 0xb3006
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 0xa8(%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 0x60(%rsp), %rdx
movq %rdx, 0x10(%rcx,%rax,8)
movups 0x50(%rsp), %xmm0
movups %xmm0, (%rcx,%rax,8)
movq %r9, %r14
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 0xa0(%rsp), %r8d
leaq 0x50(%rsp), %rdx
pushq %rdx
pushq %rax
callq 0xb2ced
addq $0x10, %rsp
testl %eax, %eax
je 0xb32f5
movq 0x8(%r14), %rax
cmpq %rax, (%r14)
movq %r14, %r9
jne 0xb30a5
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 0xa8(%rsp), %r9
movq %rax, 0x10(%r9)
leaq 0x50(%rsp), %rax
movq 0x8(%rsp), %r10
movl 0x18(%rsp), %r11d
movq 0x28(%rsp), %r14
jmp 0xb321f
testq %r9, %r9
je 0xb31b2
movl %edx, 0x30(%rsp)
movq 0x8(%r9), %rax
cmpq %rax, (%r9)
jne 0xb3110
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 0xa8(%rsp), %r9
movl %r12d, %r11d
movq 0x8(%rsp), %r10
movq %rax, 0x10(%r9)
movq 0x28(%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, %r13      # imm = 0x100000000
je 0xb31c0
movq 0x10(%r8), %rcx
movl $0x1, %edx
xorl %r14d, %r14d
leaq (%r14,%r14,2), %rsi
cmpl $0x0, 0xc(%rcx,%rsi,8)
js 0xb3195
leaq (%rcx,%rsi,8), %rdi
movq (%rdi), %rsi
movq %rsi, %r8
xorq 0x18(%rsp), %r8
movabsq $-0x100000000, %r12     # imm = 0xFFFFFFFF00000000
andq %r12, %r8
cmpq %r13, %r8
jne 0xb3195
movl 0x8(%rdi), %edi
xorl %ebp, %edi
cmpl $0x1, %edi
je 0xb31c5
movl %edx, %r14d
incl %edx
cmpq %r14, %rax
ja 0xb315f
jmp 0xb31c9
movq 0x8(%rsp), %r10
movl 0x18(%rsp), %r11d
movq 0x10(%rsp), %rdi
jmp 0xb31b7
movq 0x28(%rsp), %r14
movq (%rsp), %rbp
jmp 0xb324e
xorl %r14d, %r14d
jmp 0xb31c9
movl %esi, 0x30(%rsp)
movq 0x8(%r9), %rax
cmpq %rax, (%r9)
jne 0xb320e
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 0xa8(%rsp), %r9
movl %ebp, %r11d
movq 0x8(%rsp), %r10
movq %rax, 0x10(%r9)
leaq (%r14,%r14,2), %rax
shlq $0x3, %rax
movq 0x28(%rsp), %r14
addq 0x10(%r14), %rax
movq 0x10(%rsp), %rdi
movq (%rsp), %rbp
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)
movl 0x30(%rsp), %edx
cmpl $-0x1, %edx
je 0xb3289
movq 0x18(%r10), %rax
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
andq %rcx, %r15
movl %edx, %ecx
orq %r15, %rcx
movq %rcx, (%rax,%rbx,8)
addl %edx, %r11d
leaq 0x1(%rbp), %rcx
movl 0x10(%r10), %eax
incq %rbx
cmpq %rax, %rcx
jb 0xb2e59
jmp 0xb3339
movl %r11d, %ebp
callq 0x103da
movq 0x10(%rsp), %rdi
movq 0xa8(%rsp), %r9
movl %ebp, %r11d
movq (%rsp), %rbp
movq 0x8(%rsp), %r10
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
jmp 0xb3253
movq 0x1d6d28(%rip), %rax    # 0x289fe0
movq (%rax), %rdi
movl %ebp, %ecx
andl $0x1, %ecx
movl %r13d, %r9d
andl $0x1, %r9d
movq 0x10(%rsp), %rax
movl 0x18(%rax), %r10d
subq $0x8, %rsp
leaq 0x176e7c(%rip), %rsi    # 0x22a157
movl %r12d, %edx
movq 0x40(%rsp), %r8
xorl %eax, %eax
pushq %r10
callq 0x22b0
addq $0x10, %rsp
jmp 0xb2fae
movq 0x1d6ce4(%rip), %rax    # 0x289fe0
movq (%rax), %rdi
andl $0x1, %ebp
andl $0x1, %r13d
movq 0x10(%rsp), %rax
movl 0x18(%rax), %r10d
subq $0x8, %rsp
leaq 0x176e7a(%rip), %rsi    # 0x22a194
movl %r12d, %edx
movl %ebp, %ecx
movq 0x40(%rsp), %r8
movl %r13d, %r9d
xorl %eax, %eax
pushq %r10
callq 0x22b0
addq $0x10, %rsp
jmp 0xb3068
cmpl %eax, %ebp
jae 0xb3774
cmpl $0x0, (%r10)
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
movq 0x18(%r10), %rax
movl %ebp, %ebx
movq (%rax,%rbx,8), %r12
js 0xb3379
leaq (%rax,%rbx,8), %rbx
movq 0x20(%rdi), %rax
movq %r12, %rcx
shrq $0x21, %rcx
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
andl (%rax,%rcx,8), %r15d
jmp 0xb3765
leaq 0x1d7eb0(%rip), %rdx    # 0x28b230
movq 0x10(%rdx), %rcx
movq 0x18(%rdx), %rdx
movq %r12, %r8
shrq $0x21, %r8
movl (%rdx,%r8,8), %r15d
cmpq $0x0, (%rcx,%r8,8)
je 0xb375d
movq (%rax), %rbp
movq %rbp, 0x18(%rsp)
shrq $0x20, %rbp
movl %ebp, %eax
shrl %eax
cmpq $0x0, (%rcx,%rax,8)
je 0xb375d
movq %rax, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq %r12, %r8
shrq $0x20, %r8
movq 0x28(%rdi), %rax
movq (%rax,%r8,8), %rax
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testl %eax, %eax
je 0xb3411
movq 0x8(%rdi), %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 0xb3401
cmpl %ebp, -0x4(%rsi)
je 0xb3415
incq %rcx
addq $0x18, %rsi
cmpq %rcx, %rdx
jne 0xb33f7
movl %eax, %ecx
jmp 0xb3419
xorl %ecx, %ecx
jmp 0xb3423
movl -0xc(%rsi), %r15d
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
cmpl %eax, %ecx
jne 0xb3757
movq (%r14), %rax
testq %rax, %rax
je 0xb3474
movq 0x10(%r14), %rcx
movl $0x1, %edx
xorl %r14d, %r14d
leaq (%r14,%r14,2), %rsi
cmpl $0x0, 0xc(%rcx,%rsi,8)
js 0xb3468
leaq (%rcx,%rsi,8), %rdi
movq (%rdi), %rsi
movq %r8, %r13
movq %rsi, %r8
shrq $0x20, %r8
cmpl %r13d, %r8d
movq %r13, %r8
jne 0xb3468
cmpl %ebp, 0x8(%rdi)
je 0xb3479
movl %edx, %r14d
incl %edx
cmpq %r14, %rax
ja 0xb343f
jmp 0xb347c
xorl %r14d, %r14d
jmp 0xb3486
movl %esi, %r15d
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
cmpq %r14, %rax
jne 0xb35c3
movl %r11d, 0x18(%rsp)
leaq 0x50(%rsp), %r13
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x24(%rsp), %ecx
movq %r8, %r9
movl 0xa0(%rsp), %r8d
movq %r9, (%rsp)
pushq %r13
pushq %rbp
callq 0xb2ced
addq $0x10, %rsp
testl %eax, %eax
je 0xb37dd
movl 0x50(%rsp), %r15d
movq 0xa8(%rsp), %r14
testq %r14, %r14
je 0xb36b2
movq 0x8(%r14), %rax
cmpq %rax, (%r14)
jne 0xb351a
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmovneq %rcx, %rax
movq %rax, 0x8(%r14)
movq 0x10(%r14), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
callq 0x2370
movq 0xa8(%rsp), %r14
movq %rax, 0x10(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
leaq (%rax,%rax,2), %rax
movq 0x60(%rsp), %rdx
movq %rdx, 0x10(%rcx,%rax,8)
movups 0x50(%rsp), %xmm0
movups %xmm0, (%rcx,%rax,8)
movl %ebp, %r9d
xorl $0x1, %r9d
movq (%rsp), %rax
xorl $0x1, %eax
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x24(%rsp), %ecx
movl 0xa0(%rsp), %r8d
pushq %r13
pushq %rax
callq 0xb2ced
addq $0x10, %rsp
testl %eax, %eax
je 0xb3827
movq 0x8(%r14), %rax
cmpq %rax, (%r14)
movq %r14, %r9
jne 0xb35b4
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 0xa8(%rsp), %r9
movq %rax, 0x10(%r9)
movq 0x8(%rsp), %r10
movl 0x18(%rsp), %r11d
jmp 0xb3729
testq %r9, %r9
je 0xb3757
movq %r8, (%rsp)
movq 0x8(%r9), %rax
cmpq %rax, (%r9)
jne 0xb3615
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 0xa8(%rsp), %r9
movl %ebp, %r11d
movq 0x8(%rsp), %r10
movq %rax, 0x10(%r9)
movq 0x28(%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
je 0xb36cb
movq 0x10(%r8), %rcx
movl $0x1, %edx
xorl %r14d, %r14d
movabsq $0x100000000, %rsi      # imm = 0x100000000
movabsq $-0x100000000, %rbp     # imm = 0xFFFFFFFF00000000
leaq (%r14,%r14,2), %rdi
cmpl $0x0, 0xc(%rcx,%rdi,8)
js 0xb36a6
leaq (%rcx,%rdi,8), %r8
movq (%r8), %rdi
movq %rdi, %r9
xorq 0x18(%rsp), %r9
andq %rbp, %r9
cmpq %rsi, %r9
movq 0xa8(%rsp), %r9
jne 0xb36a6
movl 0x8(%r8), %r8d
xorl (%rsp), %r8d
cmpl $0x1, %r8d
je 0xb36d0
movl %edx, %r14d
incl %edx
cmpq %r14, %rax
ja 0xb366e
jmp 0xb36d3
movq 0x8(%rsp), %r10
movl 0x18(%rsp), %r11d
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
jmp 0xb3757
xorl %r14d, %r14d
jmp 0xb36d3
movl %edi, %r15d
movq 0x8(%r9), %rax
cmpq %rax, (%r9)
jne 0xb3718
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 0xa8(%rsp), %r9
movl %ebp, %r11d
movq 0x8(%rsp), %r10
movq %rax, 0x10(%r9)
leaq (%r14,%r14,2), %r13
shlq $0x3, %r13
movq 0x28(%rsp), %rax
addq 0x10(%rax), %r13
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
movq (%r9), %rax
movq 0x10(%r9), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r9)
leaq (%rax,%rax,2), %rax
movq 0x10(%r13), %rdx
movq %rdx, 0x10(%rcx,%rax,8)
movups (%r13), %xmm0
movups %xmm0, (%rcx,%rax,8)
cmpl $-0x1, %r15d
je 0xb37bb
shlq $0x3, %rbx
addq 0x18(%r10), %rbx
andq %rsi, %r12
movl %r15d, %eax
orq %r12, %rax
movq %rax, (%rbx)
addl %r15d, %r11d
movl (%r10), %eax
andl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
movl %eax, %ecx
andl $0x80000000, %ecx       # imm = 0x80000000
orl %r11d, %ecx
movl %ecx, (%r10)
testl %eax, %eax
js 0xb37ac
movq 0x18(%r10), %rax
movl 0x4(%rax), %ecx
movl %ecx, 0x4(%r10)
movl 0x10(%r10), %ecx
decl %ecx
movl 0x4(%rax,%rcx,8), %eax
xorl $0x1, %eax
movl %eax, 0x8(%r10)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r11d, %ebp
callq 0x103f6
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
movl %ebp, %r11d
movq 0x8(%rsp), %r10
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0xb375d
movq 0x1d67fc(%rip), %rax    # 0x289fe0
movq (%rax), %rdi
movq (%rsp), %rax
movl %eax, %ecx
andl $0x1, %ecx
movl %ebp, %r9d
andl $0x1, %r9d
movq 0x10(%rsp), %rax
movl 0x18(%rax), %r10d
subq $0x8, %rsp
leaq 0x17694c(%rip), %rsi    # 0x22a157
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %r8
xorl %eax, %eax
pushq %r10
callq 0x22b0
addq $0x10, %rsp
jmp 0xb34ca
movq 0x1d67b2(%rip), %rax    # 0x289fe0
movq (%rax), %rdi
movq (%rsp), %rcx
andl $0x1, %ecx
andl $0x1, %ebp
movq 0x10(%rsp), %rax
movl 0x18(%rax), %r10d
subq $0x8, %rsp
leaq 0x176945(%rip), %rsi    # 0x22a194
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %r8
movl %ebp, %r9d
xorl %eax, %eax
pushq %r10
callq 0x22b0
addq $0x10, %rsp
jmp 0xb3577