// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: debug_utg_graph(ma_ug_t*, asg_t*, kvec_asg_arc_t_warp*, int, int)
void debug_utg_graph(ma_ug_t *ug, asg_t* read_g, kvec_asg_arc_t_warp* edge, int require_equal_nv, int test_tangle)
{
    asg_t* nsg = ug->g;
    uint32_t n_vtx = nsg->n_seq, i, j, k, l, totalLen, v, nv, nw, w, untig_v, rid_v;
    asg_arc_t *aw = NULL, *av = NULL, *t_v = NULL, *t_w = NULL;
    for (i = 0; i < n_vtx; i++)
    {
        if(ug->g->seq[i].del) continue;

        totalLen = 0;
        ma_utg_t* result = &(ug->u.a[i]);
        if(result->n == 0) continue;
        v = (uint64_t)(result->a[0])>>32;
        if(result->start != UINT32_MAX && result->start != v) fprintf(stderr, "hehe\n");
        v = (uint64_t)(result->a[result->n-1])>>32;
        if(result->end != UINT32_MAX && result->end != (v^1)) fprintf(stderr, "haha\n");
        uint64_t end_index = result->n-1;
        if(result->start == UINT32_MAX && result->end == UINT32_MAX) end_index++;
        for (j = 0; j < end_index; j++)
        {
            v = (uint64_t)(result->a[j])>>32;
            if(j == result->n-1)
            {
                w = (uint64_t)(result->a[0])>>32; 
            }
            else
            {
                w = (uint64_t)(result->a[j+1])>>32; 
            }
            
            

            av = asg_arc_a(read_g, v);
            nv = asg_arc_n(read_g, v);
            l = (uint32_t)-1;
            for (k = 0; k < nv; k++)
            {
                if(av[k].del) continue;
                if(av[k].v == w) 
                {
                    l = asg_arc_len(av[k]);
                    break;
                }
            }

            if(edge && 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]);
                        k = nv + 1;
                        break;
                    }
                }
            }
            
            if(k == nv) fprintf(stderr ,"******error, j: %u, k: %u, nv: %u\n", j, k, nv);
            if(l != (uint32_t)(result->a[j]))
            {
                fprintf(stderr ,"(i: %u) ERROR Length, l: %u, result->a[j]: %u, j: %u, k: %u, nv: %u, circ: %u, result->n: %u\n", 
                            i, l, (uint32_t)(result->a[j]), j, k, nv, result->circ, (uint32_t)result->n);
            }
             
            totalLen = totalLen + l;
        }


        if(j < result->n)
        {
            v = (uint64_t)(result->a[j])>>32;
            l = read_g->seq[v>>1].len;
            if(l != (uint32_t)(result->a[j])) fprintf(stderr ,"*** ERROR Length, i: %u\n", i);
            totalLen = totalLen + l;
        }

        if(totalLen != result->len)
        {
            fprintf(stderr ,"ERROR Total Length, i: %u\n", i);
        } 
                


        if(ug->u.a[i].start == UINT32_MAX && ug->u.a[i].end == UINT32_MAX) continue;

        v = i<<1; v=v^1;
        av = asg_arc_a(ug->g, v);
        nv = asg_arc_n(ug->g, v);

        w = (ug->u.a[v>>1].start^1);
        aw = asg_arc_a(read_g, w);
        nw = asg_arc_n(read_g, w);


        if(require_equal_nv && get_real_length(ug->g, v, NULL) != get_real_length(read_g, w, NULL))
        {
            fprintf(stderr, "#########ERROR: i: %u, nv: %u, nw: %u\n", i, nv, nw);
        }

        for (j = 0; j < nv; j++)
        {
            if(av[j].del) continue;
            untig_v = av[j].v;
            if(untig_v&1) rid_v = ug->u.a[untig_v>>1].end;
            else rid_v = ug->u.a[untig_v>>1].start;

            t_v = t_w = NULL;
            for (k = 0; k < nw; k++)
            {
                if(aw[k].del) continue;
                if(aw[k].v == rid_v)
                {
                    t_w = &(aw[k]);
                    break;
                } 
                
            }

            if(edge && t_w == NULL)
            {
                for (k = 0; k < edge->a.n; k++)
                {
                    if(edge->a.a[k].del) continue;
                    if((edge->a.a[k].ul>>32) == w && edge->a.a[k].v == rid_v)
                    {
                        t_w = &(edge->a.a[k]);
                        break;
                    }
                }
            }
            
            if(t_w == NULL) fprintf(stderr, "#########ERROR: i: %u\n", i);
            t_v = &av[j];
            if(t_w && (t_v->ol != t_w->ol))
            {
                fprintf(stderr, "#########????????ERROR\n");
                fprintf(stderr, "nv: %u, nw: %u\n", nv, nw);
                fprintf(stderr, "av[%u].ol: %u, aw[%u].ol: %u, untig_v>>1: %u, untig_v&1: %u\n", 
                j, t_v->ol, k, t_w->ol, untig_v>>1, untig_v&1);
            }
        }






        v = v^1;
        av = asg_arc_a(ug->g, v);
        nv = asg_arc_n(ug->g, v);

        w = (ug->u.a[v>>1].end^1);
        aw = asg_arc_a(read_g, w);
        nw = asg_arc_n(read_g, w);
        if(require_equal_nv && get_real_length(ug->g, v, NULL) != get_real_length(read_g, w, NULL))
        {
            fprintf(stderr, "*******ERROR: i: %u, nv: %u, nw: %u\n", i, nv, nw);
        }
        for (j = 0; j < nv; j++)
        {
            if(av[j].del) continue;
            untig_v = av[j].v;
            if(untig_v&1) rid_v = ug->u.a[untig_v>>1].end;
            else rid_v = ug->u.a[untig_v>>1].start;
            
            t_v = t_w = NULL;
            for (k = 0; k < nw; k++)
            {
                if(aw[k].del) continue;
                if(aw[k].v == rid_v)
                {
                    t_w = &(aw[k]);
                    break;
                } 
                
            }

            if(edge && t_w == NULL)
            {
                for (k = 0; k < edge->a.n; k++)
                {
                    if(edge->a.a[k].del) continue;
                    if((edge->a.a[k].ul>>32) == w && edge->a.a[k].v == rid_v)
                    {
                        t_w = &(edge->a.a[k]);
                        break;
                    }
                }
            }
            
            if(t_w == NULL) fprintf(stderr, "#########ERROR: i: %u\n", i);
            t_v = &av[j];
            if(t_w && (t_v->ol != t_w->ol))
            {
                fprintf(stderr, "#########????????ERROR\n");
                fprintf(stderr, "nv: %u, nw: %u\n", nv, nw);
                fprintf(stderr, "av[%u].ol: %u, aw[%u].ol: %u, untig_v>>1: %u, untig_v&1: %u\n", 
                j, t_v->ol, k, t_w->ol, untig_v>>1, untig_v&1);
            }
        }

    }


    if(test_tangle != 1) return;
    fprintf(stderr, "test_tangle: %u\n", test_tangle);
    n_vtx = nsg->n_seq * 2;
    for (v = 0; v < n_vtx; ++v) 
    {
        uint32_t w1, w2, beg, end, rnw;
        if(nsg->seq[v>>1].del) continue;
        if(asg_arc_n(nsg, v) < 1 || asg_arc_n(nsg, v^1) < 1) continue;
        if(get_real_length(nsg, v, NULL) != 1 || get_real_length(nsg, v^1, NULL) != 1) continue;
        get_real_length(nsg, v, &w1); get_real_length(nsg, v^1, &w2);

        ///for simple circle
        if(w1 == (w2^1))
        {
            beg = end = 0;
            aw = asg_arc_a(nsg, w1^1);
            nw = asg_arc_n(nsg, w1^1);
            for (i = 0, rnw = 0; i < nw; i++)
            {
                if(aw[i].del) continue;
                rnw++;
                if(aw[i].v == (v^1)) continue;
                beg = aw[i].v;
            }
            if(rnw != 2) continue;

            aw = asg_arc_a(nsg, w2^1);
            nw = asg_arc_n(nsg, w2^1);
            for (i = 0, rnw = 0; i < nw; i++)
            {
                if(aw[i].del) continue;
                rnw++;
                if(aw[i].v == v) 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;
            fprintf(stderr, "\n************\n");
        }
        else if(w1 == w2)
        {
            if(get_real_length(nsg, w1^1, NULL) != 2) continue;
            if(get_real_length(nsg, w1, NULL) != 2) continue;
            end = beg = (uint32_t)-1;

            aw = asg_arc_a(nsg, w1);
            nw = asg_arc_n(nsg, w1);
            for (i = 0, rnw = 0; i < nw && rnw < 2; i++)
            {
                if(aw[i].del) continue;
                if(rnw == 0) beg = aw[i].v;
                if(rnw == 1) end = aw[i].v;
                rnw++;
            }
            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;
            fprintf(stderr, "\n#################\n");
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xc8, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x34(%rbp)
movq $0x0, -0x68(%rbp)
movq $0x0, -0x70(%rbp)
movq $0x0, -0x78(%rbp)
movq $0x0, -0x80(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x34(%rbp), %eax
jae 0x14a405
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x38(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x14980c
jmp 0x14a3f7
movl $0x0, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x38(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x14983e
jmp 0x14a3f7
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0x4c(%rbp)
movq -0x88(%rbp), %rax
cmpl $-0x1, 0x4(%rax)
je 0x149887
movq -0x88(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x4c(%rbp), %eax
je 0x149887
movq 0x27a76a(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x23fa03(%rip), %rsi    # 0x389283
movb $0x0, %al
callq 0x22a0
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x88(%rbp), %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x4c(%rbp)
movq -0x88(%rbp), %rax
cmpl $-0x1, 0x8(%rax)
je 0x1498e5
movq -0x88(%rbp), %rax
movl 0x8(%rax), %eax
movl -0x4c(%rbp), %ecx
xorl $0x1, %ecx
cmpl %ecx, %eax
je 0x1498e5
movq 0x27a70c(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x23f9ab(%rip), %rsi    # 0x389289
movb $0x0, %al
callq 0x22a0
movq -0x88(%rbp), %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, %eax
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rax
cmpl $-0x1, 0x4(%rax)
jne 0x149927
movq -0x88(%rbp), %rax
cmpl $-0x1, 0x8(%rax)
jne 0x149927
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpq -0x90(%rbp), %rax
jae 0x149bc0
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x3c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x4c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x88(%rbp), %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x149982
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0x58(%rbp)
jmp 0x1499a0
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x3c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x4c(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x50(%rbp)
movl $0xffffffff, -0x44(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x149a42
movq -0x70(%rbp), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x149a09
jmp 0x149a37
movq -0x70(%rbp), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x58(%rbp), %eax
jne 0x149a35
movq -0x70(%rbp), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl %eax, -0x44(%rbp)
jmp 0x149a42
jmp 0x149a37
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x1499e6
cmpq $0x0, -0x20(%rbp)
je 0x149aff
movl -0x40(%rbp), %eax
cmpl -0x50(%rbp), %eax
jne 0x149aff
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x149afd
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x149a8f
jmp 0x149aef
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl -0x4c(%rbp), %ecx
cmpq %rcx, %rax
jne 0x149aed
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x58(%rbp), %eax
jne 0x149aed
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl %eax, -0x44(%rbp)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x149afd
jmp 0x149aef
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x149a60
jmp 0x149aff
movl -0x40(%rbp), %eax
cmpl -0x50(%rbp), %eax
jne 0x149b29
movq 0x27a4d2(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x3c(%rbp), %edx
movl -0x40(%rbp), %ecx
movl -0x50(%rbp), %r8d
leaq 0x23f76d(%rip), %rsi    # 0x38928f
movb $0x0, %al
callq 0x22a0
movl -0x44(%rbp), %eax
movq -0x88(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x3c(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
cmpl %ecx, %eax
je 0x149ba9
movq 0x27a497(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x38(%rbp), %edx
movl -0x44(%rbp), %ecx
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x3c(%rbp), %esi
movq (%rax,%rsi,8), %rax
movl %eax, %r8d
movl -0x3c(%rbp), %r9d
movl -0x40(%rbp), %ebx
movl -0x50(%rbp), %r11d
movq -0x88(%rbp), %rax
movl (%rax), %r10d
shrl $0x1f, %r10d
movq -0x88(%rbp), %rax
movl 0x10(%rax), %eax
leaq 0x23f721(%rip), %rsi    # 0x3892b2
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x22a0
movl -0x48(%rbp), %eax
addl -0x44(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x14992e
movl -0x3c(%rbp), %eax
movq -0x88(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x149c3f
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x3c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x88(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x3c(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
cmpl %ecx, %eax
je 0x149c36
movq 0x27a3be(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x38(%rbp), %edx
leaq 0x23f6e1(%rip), %rsi    # 0x389310
movb $0x0, %al
callq 0x22a0
movl -0x48(%rbp), %eax
addl -0x44(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movq -0x88(%rbp), %rcx
movl (%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
je 0x149c70
movq 0x27a384(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x38(%rbp), %edx
leaq 0x23f6c0(%rip), %rsi    # 0x389329
movb $0x0, %al
callq 0x22a0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x38(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, 0x4(%rax)
jne 0x149ca5
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x38(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, 0x8(%rax)
jne 0x149ca5
jmp 0x14a3f7
movl -0x38(%rbp), %eax
shll %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0x4c(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
xorl $0x1, %eax
movl %eax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x58(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x58(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x149daf
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x4c(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
movl %eax, -0xa8(%rbp)
movq -0x18(%rbp), %rdi
movl -0x58(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
movl %eax, %ecx
movl -0xa8(%rbp), %eax
cmpl %ecx, %eax
je 0x149daf
movq 0x27a24c(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x38(%rbp), %edx
movl -0x50(%rbp), %ecx
movl -0x54(%rbp), %r8d
leaq 0x23f59c(%rip), %rsi    # 0x389344
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x14a051
movq -0x70(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x149de0
jmp 0x14a043
movq -0x70(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x149e1d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x60(%rbp)
jmp 0x149e39
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x60(%rbp)
movq $0x0, -0x80(%rbp)
movq $0x0, -0x78(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x54(%rbp), %eax
jae 0x149eaa
movq -0x68(%rbp), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x149e73
jmp 0x149e9f
movq -0x68(%rbp), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x60(%rbp), %eax
jne 0x149e9d
movq -0x68(%rbp), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
jmp 0x149eaa
jmp 0x149e9f
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x149e50
cmpq $0x0, -0x20(%rbp)
je 0x149f5b
cmpq $0x0, -0x80(%rbp)
jne 0x149f5b
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x149f59
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x149ef6
jmp 0x149f4b
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl -0x58(%rbp), %ecx
cmpq %rcx, %rax
jne 0x149f49
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x60(%rbp), %eax
jne 0x149f49
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
jmp 0x149f59
jmp 0x149f4b
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x149ec7
jmp 0x149f5b
cmpq $0x0, -0x80(%rbp)
jne 0x149f7d
movq 0x27a077(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x38(%rbp), %edx
leaq 0x23f3f5(%rip), %rsi    # 0x38936b
movb $0x0, %al
callq 0x22a0
movq -0x70(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x80(%rbp)
je 0x14a041
movq -0x78(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x80(%rbp), %rcx
movl 0xc(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
je 0x14a041
movq 0x27a01e(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x23f3b6(%rip), %rsi    # 0x389382
movb $0x0, %al
callq 0x22a0
movq 0x27a006(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x50(%rbp), %edx
movl -0x54(%rbp), %ecx
leaq 0x23f371(%rip), %rsi    # 0x38935b
movb $0x0, %al
callq 0x22a0
movq 0x279fe8(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x3c(%rbp), %edx
movq -0x78(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl -0x40(%rbp), %r8d
movq -0x80(%rbp), %rax
movl 0xc(%rax), %r9d
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movl -0x5c(%rbp), %r10d
shrl %r10d
movl -0x5c(%rbp), %eax
andl $0x1, %eax
leaq 0x23f368(%rip), %rsi    # 0x38939a
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x22a0
jmp 0x14a043
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x149db6
movl -0x4c(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0x4c(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
xorl $0x1, %eax
movl %eax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x58(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x58(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x14a153
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x4c(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
movl %eax, -0xac(%rbp)
movq -0x18(%rbp), %rdi
movl -0x58(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
movl %eax, %ecx
movl -0xac(%rbp), %eax
cmpl %ecx, %eax
je 0x14a153
movq 0x279ea8(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x38(%rbp), %edx
movl -0x50(%rbp), %ecx
movl -0x54(%rbp), %r8d
leaq 0x23f28b(%rip), %rsi    # 0x3893d7
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x14a3f5
movq -0x70(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x14a184
jmp 0x14a3e7
movq -0x70(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x14a1c1
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x60(%rbp)
jmp 0x14a1dd
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x60(%rbp)
movq $0x0, -0x80(%rbp)
movq $0x0, -0x78(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x54(%rbp), %eax
jae 0x14a24e
movq -0x68(%rbp), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x14a217
jmp 0x14a243
movq -0x68(%rbp), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x60(%rbp), %eax
jne 0x14a241
movq -0x68(%rbp), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
jmp 0x14a24e
jmp 0x14a243
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x14a1f4
cmpq $0x0, -0x20(%rbp)
je 0x14a2ff
cmpq $0x0, -0x80(%rbp)
jne 0x14a2ff
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x14a2fd
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x14a29a
jmp 0x14a2ef
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl -0x58(%rbp), %ecx
cmpq %rcx, %rax
jne 0x14a2ed
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x60(%rbp), %eax
jne 0x14a2ed
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
jmp 0x14a2fd
jmp 0x14a2ef
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x14a26b
jmp 0x14a2ff
cmpq $0x0, -0x80(%rbp)
jne 0x14a321
movq 0x279cd3(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x38(%rbp), %edx
leaq 0x23f051(%rip), %rsi    # 0x38936b
movb $0x0, %al
callq 0x22a0
movq -0x70(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x80(%rbp)
je 0x14a3e5
movq -0x78(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x80(%rbp), %rcx
movl 0xc(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
je 0x14a3e5
movq 0x279c7a(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x23f012(%rip), %rsi    # 0x389382
movb $0x0, %al
callq 0x22a0
movq 0x279c62(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x50(%rbp), %edx
movl -0x54(%rbp), %ecx
leaq 0x23efcd(%rip), %rsi    # 0x38935b
movb $0x0, %al
callq 0x22a0
movq 0x279c44(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x3c(%rbp), %edx
movq -0x78(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl -0x40(%rbp), %r8d
movq -0x80(%rbp), %rax
movl 0xc(%rax), %r9d
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movl -0x5c(%rbp), %r10d
shrl %r10d
movl -0x5c(%rbp), %eax
andl $0x1, %eax
leaq 0x23efc4(%rip), %rsi    # 0x38939a
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x22a0
jmp 0x14a3e7
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x14a15a
jmp 0x14a3f7
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x1497e1
cmpl $0x1, -0x28(%rbp)
je 0x14a410
jmp 0x14a917
movq 0x279bc9(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x28(%rbp), %edx
leaq 0x23efd8(%rip), %rsi    # 0x3893fc
movb $0x0, %al
callq 0x22a0
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movl %eax, -0x34(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jae 0x14a917
movq -0x30(%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 0x14a46e
jmp 0x14a909
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
cmpl $0x1, %eax
jb 0x14a49b
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x4c(%rbp), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
cmpl $0x1, %eax
jae 0x14a4a0
jmp 0x14a909
movq -0x30(%rbp), %rdi
movl -0x4c(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x1, %eax
jne 0x14a4cd
movq -0x30(%rbp), %rdi
movl -0x4c(%rbp), %esi
xorl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x1, %eax
je 0x14a4d2
jmp 0x14a909
movq -0x30(%rbp), %rdi
movl -0x4c(%rbp), %esi
leaq -0x94(%rbp), %rdx
callq 0x166b50
movq -0x30(%rbp), %rdi
movl -0x4c(%rbp), %esi
xorl $0x1, %esi
leaq -0x98(%rbp), %rdx
callq 0x166b50
movl -0x94(%rbp), %eax
movl -0x98(%rbp), %ecx
xorl $0x1, %ecx
cmpl %ecx, %eax
jne 0x14a747
movl $0x0, -0xa0(%rbp)
movl $0x0, -0x9c(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x94(%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, -0x68(%rbp)
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x94(%rbp), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x54(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0xa4(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x54(%rbp), %eax
jae 0x14a5f0
movq -0x68(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x14a5a2
jmp 0x14a5e5
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
movq -0x68(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl -0x4c(%rbp), %ecx
xorl $0x1, %ecx
cmpl %ecx, %eax
jne 0x14a5ce
jmp 0x14a5e5
movq -0x68(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x9c(%rbp)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x14a57f
cmpl $0x2, -0xa4(%rbp)
je 0x14a5fe
jmp 0x14a909
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x98(%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, -0x68(%rbp)
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x98(%rbp), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x54(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0xa4(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x54(%rbp), %eax
jae 0x14a6c3
movq -0x68(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x14a67a
jmp 0x14a6b8
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
movq -0x68(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x4c(%rbp), %eax
jne 0x14a6a1
jmp 0x14a6b8
movq -0x68(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0xa0(%rbp)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x14a657
cmpl $0x2, -0xa4(%rbp)
je 0x14a6d1
jmp 0x14a909
movq -0x30(%rbp), %rdi
movl -0x9c(%rbp), %esi
xorl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x1, %eax
je 0x14a6f1
jmp 0x14a909
movq -0x30(%rbp), %rdi
movl -0xa0(%rbp), %esi
xorl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x1, %eax
je 0x14a711
jmp 0x14a909
movl -0x9c(%rbp), %eax
shrl %eax
movl -0xa0(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
jne 0x14a72a
jmp 0x14a909
movq 0x2798af(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x23ecd2(%rip), %rsi    # 0x38940d
movb $0x0, %al
callq 0x22a0
jmp 0x14a907
movl -0x94(%rbp), %eax
cmpl -0x98(%rbp), %eax
jne 0x14a905
movq -0x30(%rbp), %rdi
movl -0x94(%rbp), %esi
xorl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x2, %eax
je 0x14a779
jmp 0x14a909
movq -0x30(%rbp), %rdi
movl -0x94(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x2, %eax
je 0x14a796
jmp 0x14a909
movl $0xffffffff, -0x9c(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0xa0(%rbp) # imm = 0xFFFFFFFF
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x94(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x94(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x54(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0xa4(%rbp)
movl -0x38(%rbp), %ecx
xorl %eax, %eax
cmpl -0x54(%rbp), %ecx
movb %al, -0xad(%rbp)
jae 0x14a819
cmpl $0x2, -0xa4(%rbp)
setb %al
movb %al, -0xad(%rbp)
movb -0xad(%rbp), %al
testb $0x1, %al
jne 0x14a825
jmp 0x14a89d
movq -0x68(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x14a840
jmp 0x14a88f
cmpl $0x0, -0xa4(%rbp)
jne 0x14a860
movq -0x68(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x9c(%rbp)
cmpl $0x1, -0xa4(%rbp)
jne 0x14a880
movq -0x68(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0xa0(%rbp)
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x14a7f9
movl -0x9c(%rbp), %eax
shrl %eax
movl -0xa0(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
jne 0x14a8b3
jmp 0x14a909
movq -0x30(%rbp), %rdi
movl -0x9c(%rbp), %esi
xorl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x1, %eax
je 0x14a8d0
jmp 0x14a909
movq -0x30(%rbp), %rdi
movl -0xa0(%rbp), %esi
xorl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b50
cmpl $0x1, %eax
je 0x14a8ed
jmp 0x14a909
movq 0x2796ec(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x23eb1e(%rip), %rsi    # 0x38941c
movb $0x0, %al
callq 0x22a0
jmp 0x14a907
jmp 0x14a909
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x14a443
addq $0xc8, %rsp
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)