// File: 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
movq %rsp, %rbp
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movsd %xmm0, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movl %eax, -0x50(%rbp)
movl $0x1, -0x84(%rbp)
movq $0x0, -0xd8(%rbp)
movq $0x0, -0xe0(%rbp)
movq $0x0, -0xd0(%rbp)
leaq -0x148(%rbp), %rdi
xorl %esi, %esi
movl $0x68, %edx
callq 0x2100
leaq -0x1b0(%rbp), %rdi
xorl %esi, %esi
movl $0x68, %edx
callq 0x2100
cmpq $0x0, -0x30(%rbp)
je 0x14b80b
movq -0x48(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
callq 0xd86a0
movq %rax, -0x1b8(%rbp)
movq -0x30(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x1b8(%rbp), %rdx
xorl %ecx, %ecx
callq 0xcce00
jmp 0x14b80d
cmpl $0x0, -0x84(%rbp)
jbe 0x14c7e6
movl $0x0, -0x84(%rbp)
movq -0x48(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
movl $0x64, %ecx
xorl %r8d, %r8d
movq %rsi, %rdi
callq 0x1401e0
movq %rax, %rcx
movl -0x84(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x84(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x14c7e1
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x14b880
jmp 0x14c7d3
movl -0x4c(%rbp), %eax
movl %eax, -0x68(%rbp)
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x68(%rbp), %ecx
movq (%rax,%rcx,8), %rax
cmpl $0x1, %eax
jae 0x14b89f
jmp 0x14c7d3
movq -0x48(%rbp), %rdi
movl -0x68(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x1, %eax
je 0x14b8b9
jmp 0x14c7d3
movq -0x48(%rbp), %rdi
movl -0x68(%rbp), %edx
xorl $0x1, %edx
xorl %eax, %eax
movl %eax, %esi
leaq -0x6c(%rbp), %rcx
leaq -0x90(%rbp), %r8
leaq -0x98(%rbp), %r9
leaq -0xb0(%rbp), %r10
leaq -0xb8(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
callq 0x166c30
movl %eax, -0x7c(%rbp)
cmpl $0x7, -0x7c(%rbp)
jne 0x14b914
jmp 0x14c7d3
cmpl $0x3, -0x7c(%rbp)
je 0x14b91f
jmp 0x14c7d3
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x6c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
cmpl $0x1, %eax
jae 0x14b938
jmp 0x14c7d3
movq -0x48(%rbp), %rdi
movl -0x6c(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x1, %eax
je 0x14b952
jmp 0x14c7d3
movq -0x48(%rbp), %rdi
movl -0x68(%rbp), %esi
leaq -0x70(%rbp), %rdx
callq 0x166b50
movq -0x48(%rbp), %rdi
movl -0x6c(%rbp), %esi
leaq -0x78(%rbp), %rdx
callq 0x166b50
movl -0x68(%rbp), %eax
shrl %eax
movl -0x70(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
je 0x14b98e
movl -0x68(%rbp), %eax
shrl %eax
movl -0x78(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
jne 0x14b993
jmp 0x14c7d3
movl -0x6c(%rbp), %eax
shrl %eax
movl -0x70(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
je 0x14b9af
movl -0x6c(%rbp), %eax
shrl %eax
movl -0x78(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
jne 0x14b9b4
jmp 0x14c7d3
movl -0x70(%rbp), %eax
cmpl -0x78(%rbp), %eax
je 0x14c0c8
movq -0x48(%rbp), %rdi
movl -0x70(%rbp), %edx
xorl %eax, %eax
movl %eax, %esi
leaq -0x80(%rbp), %rcx
leaq -0x90(%rbp), %r8
leaq -0xa0(%rbp), %r9
leaq -0xb0(%rbp), %r10
leaq -0xb8(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
callq 0x166c30
movl %eax, -0x7c(%rbp)
cmpl $0x7, -0x7c(%rbp)
jne 0x14ba18
jmp 0x14c7d3
cmpl $0x4, -0x7c(%rbp)
je 0x14ba23
jmp 0x14c7d3
movl -0x80(%rbp), %eax
movl -0x78(%rbp), %ecx
xorl $0x1, %ecx
cmpl %ecx, %eax
je 0x14ba35
jmp 0x14c7d3
movl $0xffffffff, -0x60(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x5c(%rbp) # imm = 0xFFFFFFFF
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x70(%rbp), %edx
xorl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xc0(%rbp)
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x70(%rbp), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x58(%rbp)
movl $0x0, -0x64(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x64(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x14bb07
movq -0xc0(%rbp), %rax
movl -0x64(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x14babc
jmp 0x14bafc
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
movq -0xc0(%rbp), %rax
movl -0x64(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl -0x68(%rbp), %ecx
xorl $0x1, %ecx
cmpl %ecx, %eax
jne 0x14bae5
jmp 0x14bafc
movq -0xc0(%rbp), %rax
movl -0x64(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x5c(%rbp)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x14ba96
cmpl $0x2, -0x54(%rbp)
je 0x14bb12
jmp 0x14c7d3
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x78(%rbp), %edx
xorl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xc0(%rbp)
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x78(%rbp), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x58(%rbp)
movl $0x0, -0x64(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x64(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x14bbd6
movq -0xc0(%rbp), %rax
movl -0x64(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x14bb8b
jmp 0x14bbcb
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
movq -0xc0(%rbp), %rax
movl -0x64(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl -0x6c(%rbp), %ecx
xorl $0x1, %ecx
cmpl %ecx, %eax
jne 0x14bbb4
jmp 0x14bbcb
movq -0xc0(%rbp), %rax
movl -0x64(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x60(%rbp)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x14bb65
cmpl $0x2, -0x54(%rbp)
je 0x14bbe1
jmp 0x14c7d3
movq -0x48(%rbp), %rdi
movl -0x5c(%rbp), %esi
xorl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x1, %eax
je 0x14bbfe
jmp 0x14c7d3
movq -0x48(%rbp), %rdi
movl -0x60(%rbp), %esi
xorl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x1, %eax
je 0x14bc1b
jmp 0x14c7d3
movl -0x5c(%rbp), %eax
shrl %eax
movl -0x60(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
jne 0x14bc2e
jmp 0x14c7d3
movq $0x0, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
cmpq -0xd8(%rbp), %rax
jne 0x14bca0
cmpq $0x0, -0xd8(%rbp)
je 0x14bc66
movq -0xd8(%rbp), %rax
shlq %rax
movq %rax, -0x1c0(%rbp)
jmp 0x14bc74
movl $0x2, %eax
movq %rax, -0x1c0(%rbp)
jmp 0x14bc74
movq -0x1c0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0xd0(%rbp)
movl -0x5c(%rbp), %eax
xorl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
movq -0xd0(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xe0(%rbp)
movq %rdx, (%rax,%rcx,8)
movq $0x0, -0x110(%rbp)
movq -0x48(%rbp), %rdi
movl -0x70(%rbp), %edx
xorl %eax, %eax
movl %eax, %esi
leaq -0x80(%rbp), %rcx
leaq -0x90(%rbp), %r8
leaq -0xa8(%rbp), %r9
leaq -0xb0(%rbp), %r11
leaq -0xb8(%rbp), %r10
leaq -0x148(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x166c30
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpq -0x110(%rbp), %rax
jae 0x14bde1
jmp 0x14bd3b
movq -0xe0(%rbp), %rax
cmpq -0xd8(%rbp), %rax
jne 0x14bda2
cmpq $0x0, -0xd8(%rbp)
je 0x14bd68
movq -0xd8(%rbp), %rax
shlq %rax
movq %rax, -0x1c8(%rbp)
jmp 0x14bd76
movl $0x2, %eax
movq %rax, -0x1c8(%rbp)
jmp 0x14bd76
movq -0x1c8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0xd0(%rbp)
movq -0x100(%rbp), %rax
movl -0x64(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, %edx
movq -0xd0(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xe0(%rbp)
movq %rdx, (%rax,%rcx,8)
jmp 0x14bdd3
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x14bd29
movq $0x0, -0x110(%rbp)
movq -0x48(%rbp), %rdi
movl -0x6c(%rbp), %edx
xorl $0x1, %edx
xorl %eax, %eax
movl %eax, %esi
leaq -0x80(%rbp), %rcx
leaq -0x90(%rbp), %r8
leaq -0xa8(%rbp), %r9
leaq -0xb0(%rbp), %r11
leaq -0xb8(%rbp), %r10
leaq -0x148(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x166c30
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpq -0x110(%rbp), %rax
jae 0x14befb
jmp 0x14be55
movq -0xe0(%rbp), %rax
cmpq -0xd8(%rbp), %rax
jne 0x14bebc
cmpq $0x0, -0xd8(%rbp)
je 0x14be82
movq -0xd8(%rbp), %rax
shlq %rax
movq %rax, -0x1d0(%rbp)
jmp 0x14be90
movl $0x2, %eax
movq %rax, -0x1d0(%rbp)
jmp 0x14be90
movq -0x1d0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0xd0(%rbp)
movq -0x100(%rbp), %rax
movl -0x64(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, %edx
movq -0xd0(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xe0(%rbp)
movq %rdx, (%rax,%rcx,8)
jmp 0x14beed
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x14be43
movq $0x0, -0x110(%rbp)
movq -0x48(%rbp), %rdi
movl -0x70(%rbp), %edx
xorl %eax, %eax
movl %eax, %esi
leaq -0x80(%rbp), %rcx
leaq -0x90(%rbp), %r8
leaq -0xa8(%rbp), %r9
leaq -0xb0(%rbp), %r11
leaq -0xb8(%rbp), %r10
leaq -0x148(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x166c30
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpq -0x110(%rbp), %rax
jae 0x14c012
jmp 0x14bf6c
movq -0xe0(%rbp), %rax
cmpq -0xd8(%rbp), %rax
jne 0x14bfd3
cmpq $0x0, -0xd8(%rbp)
je 0x14bf99
movq -0xd8(%rbp), %rax
shlq %rax
movq %rax, -0x1d8(%rbp)
jmp 0x14bfa7
movl $0x2, %eax
movq %rax, -0x1d8(%rbp)
jmp 0x14bfa7
movq -0x1d8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0xd0(%rbp)
movq -0x100(%rbp), %rax
movl -0x64(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, %edx
movq -0xd0(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xe0(%rbp)
movq %rdx, (%rax,%rcx,8)
jmp 0x14c004
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x14bf5a
jmp 0x14c014
movq -0xe0(%rbp), %rax
cmpq -0xd8(%rbp), %rax
jne 0x14c07b
cmpq $0x0, -0xd8(%rbp)
je 0x14c041
movq -0xd8(%rbp), %rax
shlq %rax
movq %rax, -0x1e0(%rbp)
jmp 0x14c04f
movl $0x2, %eax
movq %rax, -0x1e0(%rbp)
jmp 0x14c04f
movq -0x1e0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0xd0(%rbp)
movl -0x60(%rbp), %eax
movl %eax, %edx
movq -0xd0(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xe0(%rbp)
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x14a930
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x14c7d1
movq -0x48(%rbp), %rdi
movl -0x70(%rbp), %esi
xorl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x2, %eax
je 0x14c0e5
jmp 0x14c7d3
movq -0x48(%rbp), %rdi
movl -0x70(%rbp), %edx
xorl %eax, %eax
movl %eax, %esi
leaq -0x80(%rbp), %rcx
leaq -0x90(%rbp), %r8
leaq -0xa0(%rbp), %r9
leaq -0xb0(%rbp), %r10
leaq -0xb8(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
callq 0x166c30
movl %eax, -0x7c(%rbp)
cmpl $0x7, -0x7c(%rbp)
jne 0x14c13d
jmp 0x14c7d3
cmpl $0x4, -0x7c(%rbp)
je 0x14c148
jmp 0x14c7d3
movq -0x48(%rbp), %rdi
movl -0x80(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x2, %eax
je 0x14c162
jmp 0x14c7d3
cvtsi2sdq -0xa0(%rbp), %xmm0
cvtsi2sdq -0x98(%rbp), %xmm1
mulsd -0x40(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jb 0x14c184
jmp 0x14c7d3
movl $0xffffffff, -0x60(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x5c(%rbp) # imm = 0xFFFFFFFF
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x80(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xc0(%rbp)
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x80(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x58(%rbp)
movl $0x0, -0x64(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x64(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x14c24f
movq -0xc0(%rbp), %rax
movl -0x64(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x14c201
jmp 0x14c244
cmpl $0x0, -0x54(%rbp)
jne 0x14c21e
movq -0xc0(%rbp), %rax
movl -0x64(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x5c(%rbp)
cmpl $0x1, -0x54(%rbp)
jne 0x14c23b
movq -0xc0(%rbp), %rax
movl -0x64(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x60(%rbp)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x14c1db
cmpl $0x2, -0x54(%rbp)
je 0x14c25a
jmp 0x14c7d3
movl -0x5c(%rbp), %eax
shrl %eax
movl -0x60(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
jne 0x14c26d
jmp 0x14c7d3
movq -0x48(%rbp), %rdi
movl -0x5c(%rbp), %esi
xorl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x1, %eax
je 0x14c28a
jmp 0x14c7d3
movq -0x48(%rbp), %rdi
movl -0x60(%rbp), %esi
xorl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x1, %eax
je 0x14c2a7
jmp 0x14c7d3
cmpq $0x0, -0x30(%rbp)
je 0x14c2d4
movq -0x48(%rbp), %rdi
movl -0x80(%rbp), %esi
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rdx
movq -0x30(%rbp), %rax
movq (%rax), %rcx
callq 0x13a640
cmpq $0x0, %rax
je 0x14c2d4
jmp 0x14c7d3
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x5c(%rbp), %ecx
movl -0x60(%rbp), %r8d
movq -0x20(%rbp), %r9
movq -0x28(%rbp), %r10
movq -0x38(%rbp), %rax
leaq -0x148(%rbp), %rbx
leaq -0x1b0(%rbp), %r11
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movl $0x2, 0x20(%rsp)
movl $0x1, 0x28(%rsp)
callq 0x1674d0
cmpl $0x0, %eax
jne 0x14c333
jmp 0x14c7d3
movl -0x80(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x74(%rbp)
movq $0x0, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
cmpq -0xd8(%rbp), %rax
jne 0x14c3ae
cmpq $0x0, -0xd8(%rbp)
je 0x14c374
movq -0xd8(%rbp), %rax
shlq %rax
movq %rax, -0x1e8(%rbp)
jmp 0x14c382
movl $0x2, %eax
movq %rax, -0x1e8(%rbp)
jmp 0x14c382
movq -0x1e8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0xd0(%rbp)
movl -0x5c(%rbp), %eax
xorl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
movq -0xd0(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xe0(%rbp)
movq %rdx, (%rax,%rcx,8)
movq $0x0, -0x110(%rbp)
movq -0x48(%rbp), %rdi
movl -0x74(%rbp), %edx
xorl %eax, %eax
movl %eax, %esi
leaq -0x80(%rbp), %rcx
leaq -0x90(%rbp), %r8
leaq -0xa8(%rbp), %r9
leaq -0xb0(%rbp), %r11
leaq -0xb8(%rbp), %r10
leaq -0x148(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x166c30
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpq -0x110(%rbp), %rax
jae 0x14c4ef
jmp 0x14c449
movq -0xe0(%rbp), %rax
cmpq -0xd8(%rbp), %rax
jne 0x14c4b0
cmpq $0x0, -0xd8(%rbp)
je 0x14c476
movq -0xd8(%rbp), %rax
shlq %rax
movq %rax, -0x1f0(%rbp)
jmp 0x14c484
movl $0x2, %eax
movq %rax, -0x1f0(%rbp)
jmp 0x14c484
movq -0x1f0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0xd0(%rbp)
movq -0x100(%rbp), %rax
movl -0x64(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, %edx
movq -0xd0(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xe0(%rbp)
movq %rdx, (%rax,%rcx,8)
jmp 0x14c4e1
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x14c437
movq $0x0, -0x110(%rbp)
movq -0x48(%rbp), %rdi
movl -0x68(%rbp), %edx
xorl $0x1, %edx
xorl %eax, %eax
movl %eax, %esi
leaq -0x80(%rbp), %rcx
leaq -0x90(%rbp), %r8
leaq -0xa8(%rbp), %r9
leaq -0xb0(%rbp), %r11
leaq -0xb8(%rbp), %r10
leaq -0x148(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x166c30
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpq -0x110(%rbp), %rax
jae 0x14c609
jmp 0x14c563
movq -0xe0(%rbp), %rax
cmpq -0xd8(%rbp), %rax
jne 0x14c5ca
cmpq $0x0, -0xd8(%rbp)
je 0x14c590
movq -0xd8(%rbp), %rax
shlq %rax
movq %rax, -0x1f8(%rbp)
jmp 0x14c59e
movl $0x2, %eax
movq %rax, -0x1f8(%rbp)
jmp 0x14c59e
movq -0x1f8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0xd0(%rbp)
movq -0x100(%rbp), %rax
movl -0x64(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, %edx
movq -0xd0(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xe0(%rbp)
movq %rdx, (%rax,%rcx,8)
jmp 0x14c5fb
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x14c551
movq $0x0, -0x110(%rbp)
movq -0x48(%rbp), %rdi
movl -0x70(%rbp), %edx
xorl %eax, %eax
movl %eax, %esi
leaq -0x80(%rbp), %rcx
leaq -0x90(%rbp), %r8
leaq -0xa8(%rbp), %r9
leaq -0xb0(%rbp), %r11
leaq -0xb8(%rbp), %r10
leaq -0x148(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x166c30
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpq -0x110(%rbp), %rax
jae 0x14c720
jmp 0x14c67a
movq -0xe0(%rbp), %rax
cmpq -0xd8(%rbp), %rax
jne 0x14c6e1
cmpq $0x0, -0xd8(%rbp)
je 0x14c6a7
movq -0xd8(%rbp), %rax
shlq %rax
movq %rax, -0x200(%rbp)
jmp 0x14c6b5
movl $0x2, %eax
movq %rax, -0x200(%rbp)
jmp 0x14c6b5
movq -0x200(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0xd0(%rbp)
movq -0x100(%rbp), %rax
movl -0x64(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, %edx
movq -0xd0(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xe0(%rbp)
movq %rdx, (%rax,%rcx,8)
jmp 0x14c712
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x14c668
jmp 0x14c722
movq -0xe0(%rbp), %rax
cmpq -0xd8(%rbp), %rax
jne 0x14c789
cmpq $0x0, -0xd8(%rbp)
je 0x14c74f
movq -0xd8(%rbp), %rax
shlq %rax
movq %rax, -0x208(%rbp)
jmp 0x14c75d
movl $0x2, %eax
movq %rax, -0x208(%rbp)
jmp 0x14c75d
movq -0x208(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0xd0(%rbp)
movl -0x60(%rbp), %eax
movl %eax, %edx
movq -0xd0(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xe0(%rbp)
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x14a930
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x14c7d3
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x14b855
jmp 0x14b80d
movq -0x100(%rbp), %rdi
callq 0x2210
movq -0x168(%rbp), %rdi
callq 0x2210
movq -0xd0(%rbp), %rdi
callq 0x2210
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)