// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Overlaps.cpp
// Function: unroll_simple_case_advance(ma_ug_t*, asg_t*, ma_hit_t_alloc*, R_to_U*, bub_label_t*, unsigned char*, double)
void unroll_simple_case_advance(ma_ug_t *ug, asg_t* read_g, ma_hit_t_alloc* reverse_sources, R_to_U* ruIndex, bub_label_t* b_mask_t, uint8_t* is_r_het, double dupLenThres)
{
    asg_t* nsg = ug->g;
    uint32_t v, n_vtx = nsg->n_seq * 2, rnw, nw, beg, end, i;
    uint32_t v_left, v_right, w_left, w_term, w_right, return_flag, convex, /**is_found,**/ n_reduce = 1;
    long long ll, rBase, dupBase, tmp, max_stop_nodeLen, max_stop_baseLen;
    asg_arc_t *aw;
    kvec_t_u64_warp u_vecs;
    kv_init(u_vecs.a);
    buf_t b_0, b_1;
    memset(&b_0, 0, sizeof(buf_t));
    memset(&b_1, 0, sizeof(buf_t));
    if(b_mask_t)
    {
        uint64_t bub_dist = get_s_bub_pop_max_dist_advance(nsg, &(b_mask_t->b[0]));
        reset_bub_label_t(b_mask_t, nsg, bub_dist, 0);
    } 
    

    while (n_reduce > 0)
    {
        n_reduce = 0;
        ///break nearly circle, forget why...
        n_reduce += asg_arc_del_simple_circle_untig(NULL, NULL, nsg, 100, 0);
 
        for (v = 0; v < n_vtx; ++v) 
        {
            if (nsg->seq[v>>1].del) continue;
            v_left = v;
            if(asg_arc_n(nsg, v_left)<1) continue;
            if(get_real_length(nsg, v_left, NULL)!=1) continue;

            return_flag = get_unitig(nsg, NULL, v_left^1, &v_right, &ll, &rBase, &max_stop_nodeLen, 
                            &max_stop_baseLen, 1, NULL);
            if(return_flag == LOOP) continue;
            if(return_flag != MUL_INPUT) continue;
            if(asg_arc_n(nsg, v_right)<1) continue;
            if(get_real_length(nsg, v_right, NULL)!=1) continue;

            get_real_length(nsg, v_left, &w_left);
            get_real_length(nsg, v_right, &w_right);
            if((v_left>>1)==(w_left>>1)||(v_left>>1)==(w_right>>1)) continue;
            if((v_right>>1)==(w_left>>1)||(v_right>>1)==(w_right>>1)) continue;

            if(w_left!=w_right)
            {
                return_flag = get_unitig(nsg, NULL, w_left, &convex, &ll, &dupBase, &max_stop_nodeLen, 
                            &max_stop_baseLen, 1, NULL);
                if(return_flag == LOOP) continue;
                if(return_flag != MUL_OUTPUT) continue;
                if(convex != (w_right^1)) continue;


                beg = end = (uint32_t)-1;
                aw = asg_arc_a(nsg, w_left^1);
                nw = asg_arc_n(nsg, w_left^1);
                for (i = 0, rnw = 0; i < nw; i++)
                {
                    if(aw[i].del) continue;
                    rnw++;
                    if(aw[i].v == (v_left^1)) continue;
                    beg = aw[i].v;
                }
                if(rnw != 2) continue;

                aw = asg_arc_a(nsg, w_right^1);
                nw = asg_arc_n(nsg, w_right^1);
                for (i = 0, rnw = 0; i < nw; i++)
                {
                    if(aw[i].del) continue;
                    rnw++;
                    if(aw[i].v == (v_right^1)) continue;
                    end = aw[i].v;
                }
                if(rnw != 2) continue;

                if(get_real_length(nsg, beg^1, NULL)!=1) continue;
                if(get_real_length(nsg, end^1, NULL)!=1) continue;
                if((beg>>1) == (end>>1)) continue;

                u_vecs.a.n = 0;
                kv_push(uint64_t, u_vecs.a, beg^1);


                b_0.b.n = 0;
                get_unitig(nsg, NULL, w_left, &convex, &ll, &tmp, &max_stop_nodeLen, 
                            &max_stop_baseLen, 1, &b_0);
                for (i = 0; i < b_0.b.n; i++)
                {
                    kv_push(uint64_t, u_vecs.a, b_0.b.a[i]);
                }
                b_0.b.n = 0;
                get_unitig(nsg, NULL, v_right^1, &convex, &ll, &tmp, &max_stop_nodeLen, 
                            &max_stop_baseLen, 1, &b_0);
                for (i = 0; i < b_0.b.n; i++)
                {
                    kv_push(uint64_t, u_vecs.a, b_0.b.a[i]);
                }
                b_0.b.n = 0;
                get_unitig(nsg, NULL, w_left, &convex, &ll, &tmp, &max_stop_nodeLen, 
                            &max_stop_baseLen, 1, &b_0);
                for (i = 0; i < b_0.b.n; i++)
                {
                    kv_push(uint64_t, u_vecs.a, b_0.b.a[i]);
                }

                kv_push(uint64_t, u_vecs.a, end);
                merge_ug_nodes(ug, read_g, &u_vecs);
                n_reduce++;

                // fprintf(stderr, "++1++v>>1: %u, w_left>>1: %u, w_right>>1: %u\n", 
                //                                             v>>1, w_left>>1, w_right>>1);
            }
            else ///if(w_left == w_right)
            {
                if(get_real_length(nsg, w_left^1, NULL)!=2) continue;
                return_flag = get_unitig(nsg, NULL, w_left, &convex, &ll, &dupBase, &max_stop_nodeLen, 
                            &max_stop_baseLen, 1, NULL);
                if(return_flag == LOOP) continue;
                if(return_flag != MUL_OUTPUT) continue;
                if(get_real_length(nsg, convex, NULL)!=2) continue;
                if(dupBase >= rBase*dupLenThres)
                {
                    continue;
                }
                beg = end = (uint32_t)-1;

                aw = asg_arc_a(nsg, convex);
                nw = asg_arc_n(nsg, convex);
                for (i = 0, rnw = 0; i < nw; i++)
                {
                    if(aw[i].del) continue;
                    if(rnw == 0) beg = aw[i].v;
                    if(rnw == 1) end = aw[i].v;
                    rnw++;
                }

                if(rnw != 2) continue;
                if((beg>>1) == (end>>1)) continue;
                if(get_real_length(nsg, beg^1, NULL)!=1) continue;
                if(get_real_length(nsg, end^1, NULL)!=1) continue;


                if(b_mask_t && asg_bub_pop1_label(nsg, convex, b_mask_t->bub_dist, &(b_mask_t->b[0])))
                {
                    continue;
                }

                if(check_different_haps(nsg, ug, read_g, beg, end, reverse_sources, &b_0, &b_1,
                    ruIndex, is_r_het, 2, 1) == PLOID)
                {
                    continue;
                }


                w_term = convex^1;
                u_vecs.a.n = 0;
                kv_push(uint64_t, u_vecs.a, beg^1);

                b_0.b.n = 0;
                get_unitig(nsg, NULL, w_term, &convex, &ll, &tmp, &max_stop_nodeLen, 
                            &max_stop_baseLen, 1, &b_0);
                for (i = 0; i < b_0.b.n; i++)
                {
                    kv_push(uint64_t, u_vecs.a, b_0.b.a[i]);
                }

                b_0.b.n = 0;
                get_unitig(nsg, NULL, v_left^1, &convex, &ll, &tmp, &max_stop_nodeLen, 
                            &max_stop_baseLen, 1, &b_0);
                for (i = 0; i < b_0.b.n; i++)
                {
                    kv_push(uint64_t, u_vecs.a, b_0.b.a[i]);
                }

                b_0.b.n = 0;
                get_unitig(nsg, NULL, w_left, &convex, &ll, &tmp, &max_stop_nodeLen, 
                            &max_stop_baseLen, 1, &b_0);
                for (i = 0; i < b_0.b.n; i++)
                {
                    kv_push(uint64_t, u_vecs.a, b_0.b.a[i]);
                }

                kv_push(uint64_t, u_vecs.a, end);
                merge_ug_nodes(ug, read_g, &u_vecs);
                n_reduce++;

                // fprintf(stderr, "--1--v>>1: %u, w_left>>1: %u, w_right>>1: %u\n", 
                //                                             v>>1, w_left>>1, w_right>>1);
            }
        }

        
    }

    free(b_0.b.a);
    free(b_1.b.a);
    kv_destroy(u_vecs.a);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movsd %xmm0, 0x130(%rsp)
movq %r9, 0x120(%rsp)
movq %r8, %r14
movq %rcx, 0x118(%rsp)
movq %rdx, 0x110(%rsp)
movq %rsi, 0x100(%rsp)
movq %rdi, 0xf8(%rsp)
movq 0x18(%rdi), %rbx
movl 0x14(%rbx), %eax
addl %eax, %eax
movl %eax, 0x84(%rsp)
xorl %eax, %eax
movq %rax, 0x30(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movapd %xmm0, 0x90(%rsp)
movapd %xmm0, 0xa0(%rsp)
movapd %xmm0, 0xb0(%rsp)
movapd %xmm0, 0xc0(%rsp)
movapd %xmm0, 0xd0(%rsp)
movapd %xmm0, 0xe0(%rsp)
movq %rax, 0xf0(%rsp)
movapd %xmm0, 0x140(%rsp)
movapd %xmm0, 0x150(%rsp)
movapd %xmm0, 0x160(%rsp)
movapd %xmm0, 0x170(%rsp)
movapd %xmm0, 0x180(%rsp)
movapd %xmm0, 0x190(%rsp)
movq %rax, 0x1a0(%rsp)
testq %r8, %r8
je 0xef67c
movq (%r14), %rsi
movq %rbx, %rdi
callq 0xa6e76
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x9fb31
movq %r14, 0x128(%rsp)
movl 0x84(%rsp), %r13d
movl $0x64, %ecx
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0xe7e99
movq %rax, 0x88(%rsp)
cmpl $0x0, 0x84(%rsp)
je 0xf03ef
xorl %ebp, %ebp
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
movq 0x20(%rbx), %rax
movl %ebp, %r12d
shrl %r12d
cmpl $0x0, (%rax,%r12,8)
js 0xf0194
movq 0x28(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq %rax, %rcx
andq %r11, %rcx
je 0xf0194
movq 0x8(%rbx), %rdx
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
leaq (%rdx,%rax,8), %rax
addq $0xc, %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
xorl %esi, %esi
movl (%rax,%rdx), %edi
notl %edi
shrl $0x1f, %edi
addl %edi, %esi
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0xef703
cmpl $0x1, %esi
jne 0xf0194
movl %ebp, %r15d
xorl $0x1, %r15d
movq %rbx, %rdi
xorl %esi, %esi
movl %r15d, %edx
leaq 0x6c(%rsp), %rcx
leaq 0x60(%rsp), %r8
leaq 0x138(%rsp), %r9
pushq $0x0
pushq $0x1
leaq 0x60(%rsp), %rax
pushq %rax
leaq 0x70(%rsp), %rax
pushq %rax
callq 0x10109f
addq $0x20, %rsp
cmpl $0x3, %eax
jne 0xf018e
movq 0x28(%rbx), %rax
movl 0x6c(%rsp), %ecx
movq (%rax,%rcx,8), %rsi
movq %rsi, %rdx
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
andq %r11, %rdx
je 0xf0194
movq 0x8(%rbx), %rdi
shrq $0x20, %rsi
leaq (%rsi,%rsi,2), %rsi
leaq (%rdi,%rsi,8), %rdi
addq $0xc, %rdi
leaq (,%rdx,8), %r8
leaq (%r8,%r8,2), %r8
xorl %r9d, %r9d
xorl %r10d, %r10d
movl (%rdi,%r9), %r11d
notl %r11d
shrl $0x1f, %r11d
addl %r11d, %r10d
addq $0x18, %r9
cmpq %r9, %r8
jne 0xef7a6
cmpl $0x1, %r10d
jne 0xf018e
movq (%rax,%rbp,8), %r8
movq %r8, %rdi
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
andq %r11, %rdi
je 0xef812
movq 0x8(%rbx), %r9
shrq $0x20, %r8
shlq $0x3, %rdi
leaq (%rdi,%rdi,2), %rdi
leaq (%r8,%r8,2), %r8
leaq (%r9,%r8,8), %r8
addq $0xc, %r8
xorl %r9d, %r9d
cmpl $0x0, (%r8,%r9)
js 0xef809
movl -0x4(%r8,%r9), %r10d
movl %r10d, 0x14(%rsp)
addq $0x18, %r9
cmpq %r9, %rdi
jne 0xef7f8
movq 0x8(%rbx), %rdi
leaq (%rdi,%rsi,8), %rsi
addq $0xc, %rsi
cmpl $0x0, (%rsi)
js 0xef827
movl -0x4(%rsi), %r14d
addq $0x18, %rsi
decq %rdx
jne 0xef81e
movl 0x14(%rsp), %edx
shrl %edx
cmpl %edx, %r12d
je 0xf0194
movl %r14d, %esi
shrl %esi
cmpl %esi, %r12d
je 0xf0194
shrl %ecx
cmpl %edx, %ecx
je 0xf0194
cmpl %esi, %ecx
je 0xf0194
movl 0x14(%rsp), %edx
cmpl %r14d, %edx
jne 0xef9e4
movl %edx, %ecx
xorl $0x1, %ecx
movq (%rax,%rcx,8), %rax
movq %rax, %rcx
andq %r11, %rcx
je 0xf0194
movq 0x8(%rbx), %rdx
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
leaq (%rdx,%rax,8), %rax
addq $0xc, %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
xorl %esi, %esi
movl (%rax,%rdx), %edi
notl %edi
shrl $0x1f, %edi
addl %edi, %esi
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0xef8a1
cmpl $0x2, %esi
jne 0xf0194
movq %rbx, %rdi
xorl %esi, %esi
movl 0x14(%rsp), %edx
leaq 0x10(%rsp), %rcx
leaq 0x60(%rsp), %r8
leaq 0x108(%rsp), %r9
pushq $0x0
pushq $0x1
leaq 0x60(%rsp), %rax
pushq %rax
leaq 0x70(%rsp), %rax
pushq %rax
callq 0x10109f
addq $0x20, %rsp
cmpl $0x4, %eax
jne 0xf018e
movl 0x10(%rsp), %esi
movq 0x28(%rbx), %rax
movq (%rax,%rsi,8), %rdi
movq %rdi, %rdx
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
andq %r11, %rdx
je 0xf0194
movq 0x8(%rbx), %rcx
movq %rdi, %r8
shrq $0x20, %r8
leaq (%r8,%r8,2), %r8
leaq (%rcx,%r8,8), %rcx
addq $0xc, %rcx
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %r9d, %r9d
xorl %r10d, %r10d
movl (%rcx,%r9), %r11d
notl %r11d
shrl $0x1f, %r11d
addl %r11d, %r10d
addq $0x18, %r9
cmpq %r9, %rdx
jne 0xef93d
cmpl $0x2, %r10d
jne 0xf018e
cvtsi2sdq 0x108(%rsp), %xmm0
cvtsi2sdq 0x138(%rsp), %xmm1
mulsd 0x130(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jae 0xf018e
movq 0x8(%rbx), %rcx
testl %edi, %edi
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
je 0xefbcf
leaq (%rcx,%r8,8), %rdi
addq $0x8, %rdi
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
xorl %r8d, %r8d
xorl %r9d, %r9d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
cmpl $0x0, 0x4(%rdi,%r8)
js 0xef9cf
testl %r9d, %r9d
jne 0xef9c2
movl (%rdi,%r8), %r12d
cmpl $0x1, %r9d
jne 0xef9cc
movl (%rdi,%r8), %r10d
incl %r9d
addq $0x18, %r8
cmpq %r8, %rdx
jne 0xef9b1
cmpl $0x2, %r9d
setne %dl
jmp 0xefbdd
movq %rbx, %rdi
xorl %esi, %esi
leaq 0x10(%rsp), %rcx
leaq 0x60(%rsp), %r8
leaq 0x108(%rsp), %r9
pushq $0x0
pushq $0x1
leaq 0x60(%rsp), %rax
pushq %rax
leaq 0x70(%rsp), %rax
pushq %rax
callq 0x10109f
addq $0x20, %rsp
cmpl $0x4, %eax
jne 0xf018e
movl 0x10(%rsp), %eax
xorl %r14d, %eax
cmpl $0x1, %eax
jne 0xf018e
movq 0x8(%rbx), %rcx
movq 0x28(%rbx), %rdx
movl 0x14(%rsp), %eax
xorl $0x1, %eax
movq (%rdx,%rax,8), %rax
xorl %esi, %esi
testl %eax, %eax
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
je 0xefa98
movq %rax, %rdi
shrq $0x20, %rdi
movl %eax, %eax
leaq (%rdi,%rdi,2), %rdi
leaq (%rcx,%rdi,8), %rdi
addq $0xc, %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %r8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
cmpl $0x0, (%rdi,%r9)
js 0xefa86
incl %esi
movl -0x4(%rdi,%r9), %r10d
cmpl %r15d, %r10d
cmovnel %r10d, %eax
addq $0x18, %r9
cmpq %r9, %r8
jne 0xefa71
cmpl $0x2, %esi
sete %sil
jmp 0xefa9d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %sil, %sil
je 0xf0194
movl %r14d, %esi
xorl $0x1, %esi
movq (%rdx,%rsi,8), %r8
xorl %esi, %esi
testl %r8d, %r8d
je 0xefb16
movq %r8, %r9
shrq $0x20, %r9
movl 0x6c(%rsp), %edi
movl %r8d, %r10d
leaq (%r9,%r9,2), %r8
leaq (%rcx,%r8,8), %r8
addq $0xc, %r8
shlq $0x3, %r10
leaq (%r10,%r10,2), %r9
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
xorl %r10d, %r10d
cmpl $0x0, (%r8,%r10)
js 0xefb04
incl %esi
movl -0x4(%r8,%r10), %r11d
movl %edi, %r15d
xorl %r11d, %r15d
cmpl $0x1, %r15d
cmovnel %r11d, %r12d
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
addq $0x18, %r10
cmpq %r10, %r9
jne 0xefae2
cmpl $0x2, %esi
sete %sil
jmp 0xefb1c
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testb %sil, %sil
je 0xf0194
movl %eax, %r15d
xorl $0x1, %r15d
movq (%rdx,%r15,8), %rsi
movq %rsi, %rdi
andq %r11, %rdi
je 0xf0194
shrq $0x20, %rsi
leaq (%rsi,%rsi,2), %rsi
leaq (%rcx,%rsi,8), %rsi
addq $0xc, %rsi
shlq $0x3, %rdi
leaq (%rdi,%rdi,2), %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
movl (%rsi,%r8), %r10d
notl %r10d
shrl $0x1f, %r10d
addl %r10d, %r9d
addq $0x18, %r8
cmpq %r8, %rdi
jne 0xefb5a
cmpl $0x1, %r9d
jne 0xf0194
movl %r12d, %esi
xorl $0x1, %esi
movq (%rdx,%rsi,8), %rsi
movq %rsi, %rdx
andq %r11, %rdx
je 0xefe38
shrq $0x20, %rsi
leaq (%rsi,%rsi,2), %rsi
leaq (%rcx,%rsi,8), %rcx
addq $0xc, %rcx
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
xorl %edi, %edi
movl (%rcx,%rsi), %r8d
notl %r8d
shrl $0x1f, %r8d
addl %r8d, %edi
addq $0x18, %rsi
cmpq %rsi, %rdx
jne 0xefbad
cmpl $0x1, %edi
setne %cl
jmp 0xefe3a
movb $0x1, %dl
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
testb %dl, %dl
jne 0xf0194
movl %r10d, %edx
xorl %r12d, %edx
cmpl $0x2, %edx
jb 0xf0194
movl %r10d, 0x48(%rsp)
movl %r12d, 0x8(%rsp)
xorl $0x1, %r12d
movq (%rax,%r12,8), %rdx
movq %rdx, %rdi
andq %r11, %rdi
je 0xf0194
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
leaq (%rcx,%rdx,8), %rdx
addq $0xc, %rdx
shlq $0x3, %rdi
leaq (%rdi,%rdi,2), %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
movl (%rdx,%r8), %r10d
notl %r10d
shrl $0x1f, %r10d
addl %r10d, %r9d
addq $0x18, %r8
cmpq %r8, %rdi
jne 0xefc30
cmpl $0x1, %r9d
jne 0xf0194
movl 0x48(%rsp), %edx
xorl $0x1, %edx
movq (%rax,%rdx,8), %rax
movq %rax, %rdx
andq %r11, %rdx
je 0xf0194
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rax
addq $0xc, %rax
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rcx
xorl %edx, %edx
xorl %edi, %edi
movl (%rax,%rdx), %r8d
notl %r8d
shrl $0x1f, %r8d
addl %r8d, %edi
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0xefc84
cmpl $0x1, %edi
jne 0xf0194
movq 0x128(%rsp), %rax
testq %rax, %rax
je 0xefcc9
movq (%rax), %rcx
movq 0x20(%rax), %rdx
movq %rbx, %rdi
callq 0xe46a0
testq %rax, %rax
jne 0xf018e
movq %rbx, %rdi
movq 0xf8(%rsp), %rsi
movq 0x100(%rsp), %rdx
movl 0x8(%rsp), %ecx
movl 0x48(%rsp), %r8d
movq 0x110(%rsp), %r9
pushq $0x1
pushq $0x2
pushq 0x130(%rsp)
pushq 0x130(%rsp)
leaq 0x160(%rsp), %rax
pushq %rax
leaq 0xb8(%rsp), %rax
pushq %rax
callq 0x1015d1
addq $0x30, %rsp
testl %eax, %eax
je 0xf018e
movl 0x10(%rsp), %edx
movq $0x0, 0x20(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0xefd5c
movq $0x2, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movl $0x10, %esi
movl %edx, 0x8(%rsp)
callq 0x2370
movl 0x8(%rsp), %edx
movq %rax, 0x30(%rsp)
xorl $0x1, %edx
movq 0x30(%rsp), %rax
movq $0x1, 0x20(%rsp)
movq %rax, 0x18(%rsp)
movq %r12, (%rax)
movq $0x0, 0xc8(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
leaq 0x10(%rsp), %rcx
leaq 0x60(%rsp), %r8
leaq 0x78(%rsp), %r9
leaq 0x90(%rsp), %rax
pushq %rax
pushq $0x1
leaq 0x60(%rsp), %rax
pushq %rax
leaq 0x70(%rsp), %rax
pushq %rax
callq 0x10109f
addq $0x20, %rsp
movq 0x28(%rsp), %rdx
cmpq $0x0, 0xc8(%rsp)
je 0xf01a5
movl $0x1, %r12d
xorl %esi, %esi
movq 0x18(%rsp), %rdi
cmpq %rdx, %r12
jne 0xefe0f
leaq (%rdx,%rdx), %rcx
testq %rdx, %rdx
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x18(%rsp)
movq %rsi, 0x8(%rsp)
leaq (,%rcx,8), %rsi
callq 0x2370
movq 0x8(%rsp), %rsi
movq %rax, %rdi
movq 0x18(%rsp), %rdx
movq 0xd8(%rsp), %rax
movl (%rax,%rsi,4), %eax
leaq 0x1(%r12), %rcx
movq %rax, (%rdi,%r12,8)
movl %r12d, %esi
movq %rcx, %r12
cmpq %rsi, 0xc8(%rsp)
ja 0xefdd6
jmp 0xf01af
movb $0x1, %cl
testb %cl, %cl
jne 0xf0194
xorl %r12d, %eax
cmpl $0x2, %eax
jb 0xf0194
movq $0x0, 0x20(%rsp)
cmpq $0x0, 0x28(%rsp)
movl 0x14(%rsp), %edx
jne 0xefe84
movq $0x2, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movl $0x10, %esi
callq 0x2370
movq %rax, 0x30(%rsp)
movl 0x14(%rsp), %edx
movl %r12d, 0x18(%rsp)
movq 0x30(%rsp), %rax
movq $0x1, 0x20(%rsp)
movq %rax, 0x8(%rsp)
movq %r15, (%rax)
movq $0x0, 0xc8(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
leaq 0x10(%rsp), %rcx
leaq 0x60(%rsp), %r8
leaq 0x78(%rsp), %r9
leaq 0x90(%rsp), %rax
pushq %rax
pushq $0x1
leaq 0x60(%rsp), %rax
pushq %rax
leaq 0x70(%rsp), %rax
pushq %rax
callq 0x10109f
addq $0x20, %rsp
movq 0x28(%rsp), %rax
cmpq $0x0, 0xc8(%rsp)
je 0xeff52
movl $0x1, %r15d
xorl %r12d, %r12d
movq 0x8(%rsp), %rdi
cmpq %rax, %r15
jne 0xeff2c
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0x8(%rsp)
leaq (,%rcx,8), %rsi
callq 0x2370
movq %rax, %rdi
movq 0x8(%rsp), %rax
movq 0xd8(%rsp), %rcx
movl (%rcx,%r12,4), %edx
leaq 0x1(%r15), %rcx
movq %rdx, (%rdi,%r15,8)
movl %r15d, %r12d
movq %rcx, %r15
cmpq %r12, 0xc8(%rsp)
ja 0xefefd
jmp 0xeff5c
movl $0x1, %ecx
movq 0x8(%rsp), %rdi
movq %rcx, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq %rdi, 0x30(%rsp)
movq $0x0, 0xc8(%rsp)
movl 0x6c(%rsp), %edx
xorl $0x1, %edx
movq %rbx, %rdi
xorl %esi, %esi
leaq 0x10(%rsp), %rcx
leaq 0x60(%rsp), %r8
leaq 0x78(%rsp), %r9
leaq 0x90(%rsp), %rax
pushq %rax
pushq $0x1
leaq 0x60(%rsp), %rax
pushq %rax
leaq 0x70(%rsp), %rax
pushq %rax
callq 0x10109f
addq $0x20, %rsp
movq 0x20(%rsp), %r15
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %rdi
cmpq $0x0, 0xc8(%rsp)
je 0xf002f
movl $0x1, %r12d
xorl %edx, %edx
cmpq %rcx, %r15
jne 0xf000d
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x48(%rsp)
leaq (,%rsi,8), %rsi
movq %rdx, 0x8(%rsp)
callq 0x2370
movq 0x8(%rsp), %rdx
movq %rax, %rdi
movq 0x48(%rsp), %rcx
movq 0xd8(%rsp), %rax
movl (%rax,%rdx,4), %eax
movq %rax, (%rdi,%r15,8)
incq %r15
movl %r12d, %edx
incl %r12d
cmpq %rdx, 0xc8(%rsp)
ja 0xeffd4
movq %r15, 0x20(%rsp)
movq %rcx, 0x48(%rsp)
movq %rcx, 0x28(%rsp)
movq %rdi, 0x8(%rsp)
movq %rdi, 0x30(%rsp)
movq $0x0, 0xc8(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
movl 0x14(%rsp), %edx
leaq 0x10(%rsp), %rcx
leaq 0x60(%rsp), %r8
leaq 0x78(%rsp), %r9
leaq 0x90(%rsp), %rax
pushq %rax
pushq $0x1
leaq 0x60(%rsp), %rax
pushq %rax
leaq 0x70(%rsp), %rax
pushq %rax
callq 0x10109f
addq $0x20, %rsp
cmpq $0x0, 0xc8(%rsp)
je 0xf0106
movl $0x1, %r12d
xorl %edx, %edx
movq 0x8(%rsp), %rdi
movq 0x48(%rsp), %rcx
cmpq %rcx, %r15
jne 0xf00e2
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x48(%rsp)
leaq (,%rsi,8), %rsi
movq %rdx, 0x8(%rsp)
callq 0x2370
movq 0x8(%rsp), %rdx
movq %rax, %rdi
movq 0x48(%rsp), %rcx
movq 0xd8(%rsp), %rax
movl (%rax,%rdx,4), %eax
movq %rax, (%rdi,%r15,8)
incq %r15
movl %r12d, %edx
incl %r12d
cmpq %rdx, 0xc8(%rsp)
ja 0xf00a9
jmp 0xf0110
movq 0x8(%rsp), %rdi
movq 0x48(%rsp), %rcx
movq %r15, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
movq %rdi, 0x30(%rsp)
cmpq %rcx, %r15
jne 0xf014c
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x30(%rsp)
movl 0x18(%rsp), %eax
movq 0x30(%rsp), %rcx
leaq 0x1(%r15), %rdx
movq %rdx, 0x20(%rsp)
movq %rax, (%rcx,%r15,8)
movq 0xf8(%rsp), %rdi
movq 0x100(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0xeecff
movq 0x88(%rsp), %rax
incl %eax
movq %rax, 0x88(%rsp)
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
incq %rbp
cmpq %r13, %rbp
jne 0xef6ba
jmp 0xf03ef
movl $0x1, %ecx
movq 0x18(%rsp), %rdi
movq %rcx, 0x8(%rsp)
movq %rcx, 0x20(%rsp)
movq %rdx, 0x70(%rsp)
movq %rdx, 0x28(%rsp)
movq %rdi, 0x18(%rsp)
movq %rdi, 0x30(%rsp)
movq $0x0, 0xc8(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
movl %r15d, %edx
leaq 0x10(%rsp), %rcx
leaq 0x60(%rsp), %r8
leaq 0x78(%rsp), %r9
leaq 0x90(%rsp), %rax
pushq %rax
pushq $0x1
leaq 0x60(%rsp), %rax
pushq %rax
leaq 0x70(%rsp), %rax
pushq %rax
callq 0x10109f
addq $0x20, %rsp
cmpq $0x0, 0xc8(%rsp)
je 0xf0291
movl $0x1, %r15d
xorl %r12d, %r12d
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rcx
movq 0x70(%rsp), %rdx
cmpq %rdx, %rcx
jne 0xf026c
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x18(%rsp)
movq %rcx, 0x8(%rsp)
leaq (,%rsi,8), %rsi
callq 0x2370
movq 0x8(%rsp), %rcx
movq %rax, %rdi
movq 0x18(%rsp), %rdx
movq 0xd8(%rsp), %rax
movl (%rax,%r12,4), %eax
movq %rax, (%rdi,%rcx,8)
incq %rcx
movl %r15d, %r12d
incl %r15d
cmpq %r12, 0xc8(%rsp)
ja 0xf0233
jmp 0xf02a0
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rcx
movq 0x70(%rsp), %rdx
movq %rcx, 0x8(%rsp)
movq %rcx, 0x20(%rsp)
movq %rdx, 0x70(%rsp)
movq %rdx, 0x28(%rsp)
movq %rdi, 0x18(%rsp)
movq %rdi, 0x30(%rsp)
movq $0x0, 0xc8(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
movl 0x14(%rsp), %edx
leaq 0x10(%rsp), %rcx
leaq 0x60(%rsp), %r8
leaq 0x78(%rsp), %r9
leaq 0x90(%rsp), %rax
pushq %rax
pushq $0x1
leaq 0x60(%rsp), %rax
pushq %rax
leaq 0x70(%rsp), %rax
pushq %rax
callq 0x10109f
addq $0x20, %rsp
cmpq $0x0, 0xc8(%rsp)
je 0xf0383
movl $0x1, %r15d
xorl %r12d, %r12d
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x70(%rsp), %rcx
cmpq %rcx, %rsi
jne 0xf035e
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rdx
movq %rdx, 0x18(%rsp)
movq %rsi, 0x8(%rsp)
leaq (,%rdx,8), %rsi
callq 0x2370
movq 0x8(%rsp), %rsi
movq %rax, %rdi
movq 0x18(%rsp), %rcx
movq 0xd8(%rsp), %rax
movl (%rax,%r12,4), %eax
movq %rax, (%rdi,%rsi,8)
incq %rsi
movl %r15d, %r12d
incl %r15d
cmpq %r12, 0xc8(%rsp)
ja 0xf0325
jmp 0xf0392
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x70(%rsp), %rcx
movq %rsi, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
movq %rdi, 0x30(%rsp)
cmpq %rcx, %rsi
jne 0xf03d4
movq %rsi, %r15
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %r15, %rsi
movq %rax, 0x30(%rsp)
movl 0x48(%rsp), %eax
movq 0x30(%rsp), %rcx
leaq 0x1(%rsi), %rdx
movq %rdx, 0x20(%rsp)
movq %rax, (%rcx,%rsi,8)
jmp 0xf0162
cmpl $0x0, 0x88(%rsp)
jne 0xef68c
movq 0xd8(%rsp), %rdi
callq 0x2220
movq 0x188(%rsp), %rdi
callq 0x2220
movq 0x30(%rsp), %rdi
callq 0x2220
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq