// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: explore_graph(asg_t*, unsigned int, float, float, long long, long long, unsigned int, buf_t*, unsigned int**, unsigned long*, unsigned long*, unsigned char*, ma_ug_t*, unsigned int*)
int explore_graph(asg_t *nsg, uint32_t vBeg, float single_threshold,
float l_untig_rate_threshold, long long minLongUntig, long long maxShortUntig, uint32_t ignore_d,
buf_t* bb, uint32_t** r, size_t* rm, size_t* rn, uint8_t* visit, ma_ug_t *ug, uint32_t* r_ID)
{
    ///the ID of the end long unitig
    (*r_ID) = (uint32_t)-1;
    uint32_t nv, vBeg_end;
    asg_arc_t *av;

    kvec_t(uint32_t) u_vecs;
    kv_init(u_vecs);
    if(r && rm && rn) kv_reuse(u_vecs, 0, (*rm), (*r));
    
    memset(visit, 0, nsg->n_seq);
    kdq_t(uint32_t) *buf;
    buf = kdq_init(uint32_t);

    uint32_t vEnd, threshold, num_reads = 0, i, k, v, end = (uint32_t)-1, in = 0, vELen, tmp;
    long long nodeLen, baseLen, max_stop_nodeLen, max_stop_baseLen;

    bb->b.n = 0;
    if(get_unitig(nsg, ug, vBeg, &vEnd, &nodeLen, &baseLen, 
                                        &max_stop_nodeLen, &max_stop_baseLen, 1, bb)==LOOP)
    {
        ///the length of LOO is infinite
        kdq_destroy(uint32_t, buf); 
        return 0;
    }
    vBeg_end = vEnd;
    threshold = nodeLen;
    for (i = 0; i < bb->b.n; i++)
    {
        Set_vis(visit, bb->b.a[i], ignore_d);
        Set_vis(visit, bb->b.a[i]^1, ignore_d);
    }    
    v = vBeg;

    kdq_push(uint32_t, buf, v);
    while (kdq_size(buf) != 0)
    {
        in++;
        v = *(kdq_pop(uint32_t, buf));

        ///in == 1 means the start node, it is useless
        if(in != 1)
        {
            ///get current untig length
            bb->b.n = 0;
            if(get_unitig(nsg, ug, v, &vEnd, &nodeLen, &baseLen, 
                                        &max_stop_nodeLen, &max_stop_baseLen, 1, bb)==LOOP)
            {
                kdq_destroy(uint32_t, buf);
                return 0;
            }
            vELen = nodeLen;

            ///first long unitig except the start node
            if(if_long_tip_length(nsg, ug, v, &vELen, 
                    minLongUntig, maxShortUntig, l_untig_rate_threshold, threshold)==1)
            {
                if(end == (uint32_t)-1)
                {
                    end = v;
                    continue;
                }
                else
                {
                    in = (uint32_t)-1;
                    break;
                }
            }

            if(vELen > (threshold * single_threshold))
            {
                in = (uint32_t)-1;
                break;
            }

            num_reads = num_reads + vELen;
            if(num_reads > threshold)
            {
                in = (uint32_t)-1;
                break;
            }

            if(r && rm && rn)
            {
                for (i = 0; i < bb->b.n; i++)
                {
                    kv_push(uint32_t, u_vecs, bb->b.a[i]);
                }   
            } 
        }

        tmp = v^1;
        v = vEnd;
        nv = asg_arc_n(nsg, v);
        av = asg_arc_a(nsg, v);
        for(k = 0; k < nv; k++)
        {
            if(av[k].del) continue;

            if(av[k].v == vBeg)
            {
                in = (uint32_t)-1;
                goto termi;
            }
            
            if(Get_vis(visit,av[k].v,ignore_d)==0)
            {
                kdq_push(uint32_t, buf, av[k].v);

                bb->b.n = 0;
                get_unitig(nsg, ug, av[k].v, &vEnd, &nodeLen, &baseLen, 
                                        &max_stop_nodeLen, &max_stop_baseLen, 1, bb);

                for (i = 0; i < bb->b.n; i++)
                {
                    Set_vis(visit, bb->b.a[i], ignore_d);
                }
            }
        }

        ///for start node, we just need one direction
        if(in != 1 && ignore_d)
        {
            v = tmp;
            nv = asg_arc_n(nsg, v);
            av = asg_arc_a(nsg, v);
            for(k = 0; k < nv; k++)
            {
                if(av[k].del) continue;

                if(av[k].v == vBeg)
                {
                    in = (uint32_t)-1;
                    goto termi;
                }

                if(Get_vis(visit,av[k].v,ignore_d)==0)
                {
                    kdq_push(uint32_t, buf, av[k].v);

                    bb->b.n = 0;
                    get_unitig(nsg, ug, av[k].v, &vEnd, &nodeLen, &baseLen, 
                                        &max_stop_nodeLen, &max_stop_baseLen, 1, bb);


                    for (i = 0; i < bb->b.n; i++)
                    {
                        Set_vis(visit, bb->b.a[i], ignore_d);
                    }
                }
            }
        }
    }

    termi:
    kdq_destroy(uint32_t, buf);
    if(r && rm && rn)
    {
        (*rn) = u_vecs.n;
        (*rm) = u_vecs.m;
        (*r) = u_vecs.a;
    }


    (*r_ID) = end;
    ///in == 1 means the end subgraph is the long untig itself
    ///so here is no tangles
    if(in == (uint32_t)-1 || in == 1)
    {
        return 0;
    }
    else
    {
        if(r && rm && rn) return double_check_tangle(vBeg_end, (*r_ID), u_vecs.a, u_vecs.n, nsg);

        return 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq 0x38(%rbp), %rax
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movss %xmm0, -0x18(%rbp)
movss %xmm1, -0x1c(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movl %r8d, -0x34(%rbp)
movq %r9, -0x40(%rbp)
movq 0x38(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq $0x0, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movq $0x0, -0x58(%rbp)
cmpq $0x0, 0x10(%rbp)
je 0x140a49
cmpq $0x0, 0x18(%rbp)
je 0x140a49
cmpq $0x0, 0x20(%rbp)
je 0x140a49
movq $0x0, -0x68(%rbp)
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq 0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq 0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2100
callq 0x1412a0
movq %rax, -0x70(%rbp)
movl $0x0, -0x7c(%rbp)
movl $0xffffffff, -0x8c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x90(%rbp)
movq -0x40(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x10(%rbp), %rdi
movq 0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x40(%rbp), %rax
leaq -0x74(%rbp), %rcx
leaq -0xa0(%rbp), %r8
leaq -0xa8(%rbp), %r9
leaq -0xb0(%rbp), %r11
leaq -0xb8(%rbp), %r10
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x166c30
cmpl $0x7, %eax
jne 0x140af8
movq -0x70(%rbp), %rdi
callq 0x141340
movl $0x0, -0x4(%rbp)
jmp 0x14128a
movl -0x74(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0xa0(%rbp), %rax
movl %eax, -0x78(%rbp)
movl $0x0, -0x80(%rbp)
movl -0x80(%rbp), %eax
movq -0x40(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jae 0x140ba4
movq -0x40(%rbp), %rax
movq 0x48(%rax), %rax
movl -0x80(%rbp), %ecx
movl (%rax,%rcx,4), %esi
movl -0x34(%rbp), %ecx
shll %cl, %esi
andl $0x1, %esi
addl $0x1, %esi
movq 0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movq 0x48(%rcx), %rcx
movl -0x80(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x40(%rbp), %rax
movq 0x48(%rax), %rax
movl -0x80(%rbp), %ecx
movl (%rax,%rcx,4), %esi
xorl $0x1, %esi
movl -0x34(%rbp), %ecx
shll %cl, %esi
andl $0x1, %esi
addl $0x1, %esi
movq 0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movq 0x48(%rcx), %rcx
movl -0x80(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
xorl $0x1, %ecx
shrl %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x140b0f
movl -0x14(%rbp), %eax
movl %eax, -0x88(%rbp)
movq -0x70(%rbp), %rdi
movl -0x88(%rbp), %esi
callq 0x141380
movq -0x70(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1411e5
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
movq -0x70(%rbp), %rdi
callq 0x141410
movl (%rax), %eax
movl %eax, -0x88(%rbp)
cmpl $0x1, -0x90(%rbp)
je 0x140de5
movq -0x40(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x10(%rbp), %rdi
movq 0x30(%rbp), %rsi
movl -0x88(%rbp), %edx
movq -0x40(%rbp), %rax
leaq -0x74(%rbp), %rcx
leaq -0xa0(%rbp), %r8
leaq -0xa8(%rbp), %r9
leaq -0xb0(%rbp), %r11
leaq -0xb8(%rbp), %r10
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x166c30
cmpl $0x7, %eax
jne 0x140c6b
movq -0x70(%rbp), %rdi
callq 0x141340
movl $0x0, -0x4(%rbp)
jmp 0x14128a
movq -0xa0(%rbp), %rax
movl %eax, -0x94(%rbp)
movq -0x10(%rbp), %rdi
movq 0x30(%rbp), %rsi
movl -0x88(%rbp), %edx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movss -0x1c(%rbp), %xmm0
movl -0x78(%rbp), %eax
leaq -0x94(%rbp), %rcx
movq %rax, (%rsp)
callq 0xdc920
cmpl $0x1, %eax
jne 0x140cd4
cmpl $-0x1, -0x8c(%rbp)
jne 0x140cc5
movl -0x88(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0x140bbc
movl $0xffffffff, -0x90(%rbp) # imm = 0xFFFFFFFF
jmp 0x1411e5
movl -0x94(%rbp), %eax
cvtsi2ss %rax, %xmm0
movl -0x78(%rbp), %eax
cvtsi2ss %rax, %xmm1
mulss -0x18(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x140d00
movl $0xffffffff, -0x90(%rbp) # imm = 0xFFFFFFFF
jmp 0x1411e5
movl -0x7c(%rbp), %eax
addl -0x94(%rbp), %eax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
cmpl -0x78(%rbp), %eax
jbe 0x140d23
movl $0xffffffff, -0x90(%rbp) # imm = 0xFFFFFFFF
jmp 0x1411e5
cmpq $0x0, 0x10(%rbp)
je 0x140de3
cmpq $0x0, 0x18(%rbp)
je 0x140de3
cmpq $0x0, 0x20(%rbp)
je 0x140de3
movl $0x0, -0x80(%rbp)
movl -0x80(%rbp), %eax
movq -0x40(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jae 0x140de1
jmp 0x140d5e
movq -0x68(%rbp), %rax
cmpq -0x60(%rbp), %rax
jne 0x140dad
cmpq $0x0, -0x60(%rbp)
je 0x140d7f
movq -0x60(%rbp), %rax
shlq %rax
movq %rax, -0xc0(%rbp)
jmp 0x140d8d
movl $0x2, %eax
movq %rax, -0xc0(%rbp)
jmp 0x140d8d
movq -0xc0(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
shlq $0x2, %rsi
callq 0x2360
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rax
movq 0x48(%rax), %rax
movl -0x80(%rbp), %ecx
movl (%rax,%rcx,4), %edx
movq -0x58(%rbp), %rax
movq -0x68(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x68(%rbp)
movl %edx, (%rax,%rcx,4)
jmp 0x140dd3
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x140d4b
jmp 0x140de3
jmp 0x140de5
movl -0x88(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x98(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x88(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x88(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x84(%rbp)
movl -0x84(%rbp), %eax
cmpl -0x44(%rbp), %eax
jae 0x140fdc
movq -0x50(%rbp), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x140e75
jmp 0x140fc8
movq -0x50(%rbp), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x140e9d
movl $0xffffffff, -0x90(%rbp) # imm = 0xFFFFFFFF
jmp 0x1411e7
movq 0x28(%rbp), %rax
movq -0x50(%rbp), %rcx
movl -0x84(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
shrl %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
movq -0x50(%rbp), %rcx
movl -0x84(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %edx
movl -0x34(%rbp), %ecx
shll %cl, %edx
movl %edx, %ecx
andl $0x1, %ecx
addl $0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x140fc6
movq -0x70(%rbp), %rdi
movq -0x50(%rbp), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %esi
callq 0x141380
movq -0x40(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x10(%rbp), %rdi
movq 0x30(%rbp), %rsi
movq -0x50(%rbp), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edx
movq -0x40(%rbp), %rax
leaq -0x74(%rbp), %rcx
leaq -0xa0(%rbp), %r8
leaq -0xa8(%rbp), %r9
leaq -0xb0(%rbp), %r11
leaq -0xb8(%rbp), %r10
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x166c30
movl $0x0, -0x80(%rbp)
movl -0x80(%rbp), %eax
movq -0x40(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jae 0x140fc4
movq -0x40(%rbp), %rax
movq 0x48(%rax), %rax
movl -0x80(%rbp), %ecx
movl (%rax,%rcx,4), %esi
movl -0x34(%rbp), %ecx
shll %cl, %esi
andl $0x1, %esi
addl $0x1, %esi
movq 0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movq 0x48(%rcx), %rcx
movl -0x80(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x140f74
jmp 0x140fc6
jmp 0x140fc8
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x140e45
cmpl $0x1, -0x90(%rbp)
je 0x1411e0
cmpl $0x0, -0x34(%rbp)
je 0x1411e0
movl -0x98(%rbp), %eax
movl %eax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x88(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x88(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x84(%rbp)
movl -0x84(%rbp), %eax
cmpl -0x44(%rbp), %eax
jae 0x1411de
movq -0x50(%rbp), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x141077
jmp 0x1411ca
movq -0x50(%rbp), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x14109f
movl $0xffffffff, -0x90(%rbp) # imm = 0xFFFFFFFF
jmp 0x1411e7
movq 0x28(%rbp), %rax
movq -0x50(%rbp), %rcx
movl -0x84(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
shrl %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
movq -0x50(%rbp), %rcx
movl -0x84(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %edx
movl -0x34(%rbp), %ecx
shll %cl, %edx
movl %edx, %ecx
andl $0x1, %ecx
addl $0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x1411c8
movq -0x70(%rbp), %rdi
movq -0x50(%rbp), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %esi
callq 0x141380
movq -0x40(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x10(%rbp), %rdi
movq 0x30(%rbp), %rsi
movq -0x50(%rbp), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edx
movq -0x40(%rbp), %rax
leaq -0x74(%rbp), %rcx
leaq -0xa0(%rbp), %r8
leaq -0xa8(%rbp), %r9
leaq -0xb0(%rbp), %r11
leaq -0xb8(%rbp), %r10
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x166c30
movl $0x0, -0x80(%rbp)
movl -0x80(%rbp), %eax
movq -0x40(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jae 0x1411c6
movq -0x40(%rbp), %rax
movq 0x48(%rax), %rax
movl -0x80(%rbp), %ecx
movl (%rax,%rcx,4), %esi
movl -0x34(%rbp), %ecx
shll %cl, %esi
andl $0x1, %esi
addl $0x1, %esi
movq 0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movq 0x48(%rcx), %rcx
movl -0x80(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x141176
jmp 0x1411c8
jmp 0x1411ca
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x141047
jmp 0x1411e0
jmp 0x140bbc
jmp 0x1411e7
movq -0x70(%rbp), %rdi
callq 0x141340
cmpq $0x0, 0x10(%rbp)
je 0x141226
cmpq $0x0, 0x18(%rbp)
je 0x141226
cmpq $0x0, 0x20(%rbp)
je 0x141226
movq -0x68(%rbp), %rcx
movq 0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x60(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x8c(%rbp), %ecx
movq 0x38(%rbp), %rax
movl %ecx, (%rax)
cmpl $-0x1, -0x90(%rbp)
je 0x141244
cmpl $0x1, -0x90(%rbp)
jne 0x14124d
movl $0x0, -0x4(%rbp)
jmp 0x14128a
cmpq $0x0, 0x10(%rbp)
je 0x141283
cmpq $0x0, 0x18(%rbp)
je 0x141283
cmpq $0x0, 0x20(%rbp)
je 0x141283
movl -0x48(%rbp), %edi
movq 0x38(%rbp), %rax
movl (%rax), %esi
movq -0x58(%rbp), %rdx
movq -0x68(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %r8
callq 0x140590
movl %eax, -0x4(%rbp)
jmp 0x14128a
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)