// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Overlaps.cpp
// Function: merge_ug_nodes(ma_ug_t*, asg_t*, kvec_t_u64_warp*)
void merge_ug_nodes(ma_ug_t *ug, asg_t* read_g, kvec_t_u64_warp* array)
{
    if(array->a.n == 0) return;
    uint32_t i, k, v, w;
    ma_utg_t result;
    memset(&result, 0, sizeof(ma_utg_t));
    v = w = (uint32_t)-1;
    for (i = 0; i < array->a.n; i++)
    {
        w = array->a.a[i];
        collect_ma_utg_ts(ug, v, w, &result);
        v = w;
    }

    

    if(result.n == 0) return;
    asg_arc_t *av = NULL;
    uint32_t nv, l;
    result.len = 0;
    for (i = 0; i < result.n - 1; i++)
    {
        
        v = (uint64_t)(result.a[i])>>32;
        w = (uint64_t)(result.a[i + 1])>>32; 
        av = asg_arc_a(read_g, v);
        nv = asg_arc_n(read_g, v);
        l = 0;
        
        for (k = 0; k < nv; k++)
        {
            if(av[k].del) continue;
            if(av[k].v == w) 
            {
                l = asg_arc_len(av[k]);
                break;
            }
        }
        if(k == nv) fprintf(stderr ,"******error, i: %u, k: %u, nv: %u\n", i, k, nv);
        result.a[i] = v; result.a[i] = result.a[i]<<32; result.a[i] = result.a[i] | (uint64_t)(l);
        result.len += l;
    }
    

    if(i < result.n)
    {
        v = (uint64_t)(result.a[i])>>32;
        l = read_g->seq[v>>1].len;
        result.a[i] = v;
        result.a[i] = result.a[i]<<32;
        result.a[i] = result.a[i] | (uint64_t)(l);
        result.len += l;
    }
    //has already set result.a, result.len, result.n, result.m
    result.circ = 0;
    result.start = result.a[0]>>32;
    result.end = (result.a[result.n-1]>>32)^1;

    
    uint32_t beg_uid = array->a.a[0];
    uint32_t end_uid = array->a.a[array->a.n-1];
    uint32_t realLen = array->a.n;
    uint32_t new_uid = array->a.a[0]>>1;
    uint64_t kmp;





    /*******************************just for debug**********************************/
    /**
    if(beg_uid&1)
    {
        if(result.start != ug->u.a[beg_uid>>1].end)
        {
            fprintf(stderr, "ERROR\n");
        }
    }
    else
    {
        if(result.start != ug->u.a[beg_uid>>1].start)
        {
            fprintf(stderr, "ERROR\n");
        }
    }

    if(end_uid&1)
    {
        if(result.end != ug->u.a[end_uid>>1].start)
        {
            fprintf(stderr, "ERROR\n");
        }
    }
    else
    {
        if(result.end != ug->u.a[end_uid>>1].end)
        {
            fprintf(stderr, "ERROR\n");
        }
    }
    **/
    /*******************************just for debug**********************************/

    asg_arc_t *aw = NULL;
    uint32_t nw = 0;
    ///corresponding to direction 1 of new node
    v = beg_uid^1;
    av = asg_arc_a(ug->g, v);
    nv = asg_arc_n(ug->g, v);
    ///fprintf(stderr, "beg_uid_v>>1: %u, beg_uid_v&1: %u, nv: %u\n", v>>1, v&1, nv);
    for (k = 0; k < nv; k++)
    {
        if(av[k].del) continue;
        kmp = new_uid<<1; kmp = kmp^1; kmp = kmp << 32;

        ///if((av[k].v>>1) == (end_uid>>1)) continue;
        w = av[k].v^1; aw = asg_arc_a(ug->g, w); nw = asg_arc_n(ug->g, w);
        for (i = 0; i < nw; i++)
        {
            if(aw[i].del) continue;
            if(aw[i].v == (v^1)) break;
        }
        if(i == nw) fprintf(stderr, "ERROR at %s:%d\n", __FILE__, __LINE__);
        kmp = kmp | (uint64_t)(aw[i].ol);


        ///kmp = kmp | (uint64_t)(((ug->g)->idx[v]>>32) + k);/**kmp = kmp | av[k].v;**/
        ///here kmp is ul
        kv_push(uint64_t, array->a, kmp);
        kmp = av[k].ol; kmp = kmp<<32; kmp = kmp|(uint64_t)(av[k].v);
        ///here kmp is ol + v
        kv_push(uint64_t, array->a, kmp);
        ///fprintf(stderr, "*av[%u].v>>1: %u, v&1: %u, ol: %u\n", k, av[k].v>>1, av[k].v&1, av[k].ol);
    }

    ///corresponding to direction 0 of new node
    v = end_uid;
    av = asg_arc_a(ug->g, v);
    nv = asg_arc_n(ug->g, v);
    ///fprintf(stderr, "end_uid_v>>1: %u, end_uid_v&1: %u, nv: %u\n", v>>1, v&1, nv);
    for (k = 0; k < nv; k++)
    {
        if(av[k].del) continue;
        kmp = new_uid<<1; kmp = kmp << 32;

        w = av[k].v^1; 
        aw = asg_arc_a(ug->g, w); 
        nw = asg_arc_n(ug->g, w);
        for (i = 0; i < nw; i++)
        {
            if(aw[i].del) continue;
            if(aw[i].v == (v^1)) break;
        }
        if(i == nw) fprintf(stderr, "ERROR at %s:%d\n", __FILE__, __LINE__);
        kmp = kmp | (uint64_t)(aw[i].ol);


        ///here kmp is ul
        kv_push(uint64_t, array->a, kmp);
        kmp = av[k].ol; kmp = kmp<<32; kmp = kmp|(uint64_t)(av[k].v);
        ///here kmp is ol + v
        kv_push(uint64_t, array->a, kmp);
        ///fprintf(stderr, "#av[%u].v>>1: %u, v&1: %u, ol: %u\n", k, av[k].v>>1, av[k].v&1, av[k].ol);
    }

    
    ma_utg_t* tmp;
    for (i = 0; i < realLen; i++)
    {
        w = array->a.a[i];
        tmp = &(ug->u.a[w>>1]);
        if(tmp->m != 0)
        {
            tmp->circ = tmp->end = tmp->len = tmp->m = tmp->n = tmp->start = 0;
            free(tmp->a);
            tmp->a = NULL;
        }
        asg_seq_del(ug->g, w>>1);
    }
    
    ug->u.a[beg_uid>>1] = result;
    ug->g->seq[beg_uid>>1].del = 0;
    ug->g->seq[beg_uid>>1].len = result.len;

    uint32_t oLen = 0;
    for (; i < array->a.n; i += 2)
    {
        v = array->a.a[i]>>32;
        w = (uint32_t)array->a.a[i+1];
        /****************************may have bugs********************************/
        ///may have bug here, if there is an edge between beg_uid and end_uid
        ///if(((w>>1) == (beg_uid>>1)) || ((w>>1) == (end_uid>>1))) continue;
        if(((w>>1) == (beg_uid>>1)) || ((w>>1) == (end_uid>>1))) w = v;
        /****************************may have bugs********************************/

        oLen = array->a.a[i+1]>>32;
        asg_append_edges_to_srt(ug->g, v, ug->u.a[v>>1].len, w, oLen, 0, 0, 0);
        oLen = (uint32_t)array->a.a[i];
        asg_append_edges_to_srt(ug->g, w^1, ug->u.a[w>>1].len, v^1, oLen, 0, 0, 0);
    }
}

// Assembly:
cmpq $0x0, (%rdx)
je 0xef4da
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %rbx
movq %rdi, %r15
movq %rsi, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x60(%rsp)
cmpq $0x0, (%rdx)
je 0xeed74
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x1, %r14d
xorl %eax, %eax
leaq 0x40(%rsp), %r12
movq 0x10(%rbx), %rcx
movl (%rcx,%rax,8), %ebp
movq %r15, %rdi
movl %ebp, %edx
movq %r12, %rcx
callq 0xee23d
movl %r14d, %eax
incl %r14d
movl %ebp, %esi
cmpq %rax, (%rbx)
ja 0xeed53
movl 0x50(%rsp), %ecx
testl %ecx, %ecx
je 0xef4c9
movq %r15, 0x28(%rsp)
movl $0x80000000, %r13d      # imm = 0x80000000
andl 0x40(%rsp), %r13d
movabsq $-0x100000000, %r10     # imm = 0xFFFFFFFF00000000
movl %ecx, %eax
decl %eax
movl %eax, %r9d
je 0xeee90
movl %ecx, 0x10(%rsp)
movq 0x58(%rsp), %rbp
xorl %r12d, %r12d
movq 0x8(%rsp), %rdi
movq %r9, 0x18(%rsp)
movq (%rbp,%r12,8), %r15
movq 0x28(%rdi), %rax
movq %r15, %rcx
shrq $0x20, %rcx
movq (%rax,%rcx,8), %r8
movl $0x0, %ecx
movl $0x0, %r14d
testl %r8d, %r8d
je 0xeee24
movl 0xc(%rbp,%r12,8), %eax
movq 0x8(%rdi), %rcx
movq %r8, %rsi
shrq $0x20, %rsi
movl %r8d, %edx
leaq (%rsi,%rsi,2), %rsi
leaq (%rcx,%rsi,8), %rsi
addq $0xc, %rsi
xorl %ecx, %ecx
cmpl $0x0, (%rsi)
js 0xeee0c
cmpl %eax, -0x4(%rsi)
je 0xeee20
incq %rcx
addq $0x18, %rsi
cmpq %rcx, %rdx
jne 0xeee02
movl %r8d, %ecx
xorl %r14d, %r14d
jmp 0xeee24
movl -0xc(%rsi), %r14d
cmpl %r8d, %ecx
je 0xeee59
andq %r10, %r15
movl %r14d, %eax
orq %r15, %rax
movq %rax, (%rbp,%r12,8)
incq %r12
addl %r13d, %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
andl $0x80000000, %r13d      # imm = 0x80000000
orl %r14d, %r13d
cmpq %r9, %r12
jne 0xeedbd
jmp 0xeee8a
movq 0x19b180(%rip), %rax    # 0x289fe0
movq (%rax), %rdi
leaq 0x13d7ab(%rip), %rsi    # 0x22c615
movl %r12d, %edx
xorl %eax, %eax
callq 0x22b0
movabsq $-0x100000000, %r10     # imm = 0xFFFFFFFF00000000
movq 0x18(%rsp), %r9
movq 0x8(%rsp), %rdi
jmp 0xeee29
movl 0x10(%rsp), %ecx
jmp 0xeee98
xorl %r12d, %r12d
movq 0x8(%rsp), %rdi
movl %r13d, 0x40(%rsp)
cmpl %ecx, %r12d
jae 0xeeee3
movq 0x58(%rsp), %rax
movl %r12d, %ecx
movq (%rax,%rcx,8), %rdx
andq %rdx, %r10
movq 0x20(%rdi), %rsi
shrq $0x21, %rdx
movl (%rsi,%rdx,8), %edx
movl %edx, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
orq %r10, %rsi
movq %rsi, (%rax,%rcx,8)
addl %r13d, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %r13d      # imm = 0x80000000
orl %edx, %r13d
movl %r13d, 0x40(%rsp)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl 0x40(%rsp), %eax
andl %ecx, %eax
movl %eax, 0x3c(%rsp)
movl %eax, 0x40(%rsp)
movq 0x58(%rsp), %rax
movl 0x4(%rax), %ecx
movl %ecx, 0x44(%rsp)
movl 0x4(%rax,%r9,8), %eax
xorl $0x1, %eax
movl %eax, 0x48(%rsp)
movq (%rbx), %rcx
movq 0x10(%rbx), %rax
movq (%rax), %rsi
movl %esi, %edx
movq %rcx, 0x78(%rsp)
movq -0x8(%rax,%rcx,8), %rdi
movl %edi, %eax
movq %rax, 0x70(%rsp)
movq 0x28(%rsp), %r13
movq 0x18(%r13), %rcx
movq 0x28(%rcx), %rax
movq %rdx, 0x20(%rsp)
xorq $0x1, %rdx
movq (%rax,%rdx,8), %rax
testl %eax, %eax
movq %rsi, 0x8(%rsp)
movq %rdi, 0x18(%rsp)
je 0xef0dc
movq %rax, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
shlq $0x3, %rdx
addq 0x8(%rcx), %rdx
movq 0x20(%rsp), %rcx
shlq $0x20, %rcx
movq %rcx, 0x80(%rsp)
movl %eax, %eax
movq %rax, 0x10(%rsp)
xorl %r15d, %r15d
movq %rdx, 0x30(%rsp)
leaq (%r15,%r15,2), %rax
cmpl $0x0, 0xc(%rdx,%rax,8)
js 0xef0c2
leaq (%rdx,%rax,8), %rbp
movl 0x8(%rbp), %eax
xorq $0x1, %rax
movq 0x18(%r13), %rcx
movq 0x8(%rcx), %r14
movq 0x28(%rcx), %rcx
movq (%rcx,%rax,8), %rax
movq %rax, %rcx
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %r13
testl %eax, %eax
je 0xeefeb
movl %eax, %ecx
leaq (%r14,%r13,8), %rdx
addq $0xc, %rdx
xorl %r12d, %r12d
cmpl $0x0, (%rdx)
js 0xeefda
cmpl %esi, -0x4(%rdx)
je 0xeefee
incq %r12
addq $0x18, %rdx
cmpq %r12, %rcx
jne 0xeefd0
movl %eax, %r12d
jmp 0xeefee
xorl %r12d, %r12d
cmpl %eax, %r12d
je 0xef0d2
leaq (%r14,%r13,8), %rax
movl %r12d, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0xc(%rax,%rcx,8), %r14d
movq 0x8(%rbx), %rax
cmpq %rax, (%rbx)
jne 0xef035
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x10(%rbx)
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
orq 0x80(%rsp), %r14
btsq $0x20, %r14
movq (%rbx), %rax
movq 0x10(%rbx), %rdi
leaq 0x1(%rax), %rcx
movq %rcx, (%rbx)
movq %r14, (%rdi,%rax,8)
movl 0xc(%rbp), %r12d
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl %eax, %r12d
movl 0x8(%rbp), %r14d
movq 0x8(%rbx), %rax
cmpq %rax, (%rbx)
movq 0x28(%rsp), %r13
jne 0xef09a
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x8(%rbx)
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x10(%rbx)
shlq $0x20, %r12
orq %r12, %r14
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movq %r14, (%rcx,%rax,8)
movq 0x8(%rsp), %rsi
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rdx
incq %r15
cmpq 0x10(%rsp), %r15
jne 0xeef8a
jmp 0xef0dc
callq 0x11bdb
jmp 0xeeff7
movq 0x18(%r13), %rcx
movq 0x28(%rcx), %rax
movq 0x70(%rsp), %rdx
movq (%rax,%rdx,8), %rax
testl %eax, %eax
je 0xef277
movq %rax, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
shlq $0x3, %rdx
addq 0x8(%rcx), %rdx
movq 0x20(%rsp), %rcx
andl $-0x2, %ecx
shlq $0x20, %rcx
movq %rcx, 0x20(%rsp)
movl %eax, %eax
movq %rax, 0x10(%rsp)
xorl %r15d, %r15d
movq %rdx, 0x30(%rsp)
leaq (%r15,%r15,2), %rax
cmpl $0x0, 0xc(%rdx,%rax,8)
js 0xef25d
leaq (%rdx,%rax,8), %rbp
movl 0x8(%rbp), %eax
xorq $0x1, %rax
movq 0x18(%r13), %rcx
movq 0x8(%rcx), %r14
movq 0x28(%rcx), %rcx
movq (%rcx,%rax,8), %rax
movq %rax, %rcx
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %r13
testl %eax, %eax
je 0xef18e
movl %eax, %ecx
leaq (%r14,%r13,8), %rdx
addq $0xc, %rdx
xorl %r12d, %r12d
cmpl $0x0, (%rdx)
js 0xef17d
movl -0x4(%rdx), %esi
xorl %edi, %esi
cmpl $0x1, %esi
je 0xef191
incq %r12
addq $0x18, %rdx
cmpq %r12, %rcx
jne 0xef16e
movl %eax, %r12d
jmp 0xef191
xorl %r12d, %r12d
cmpl %eax, %r12d
je 0xef26d
leaq (%r14,%r13,8), %rax
movl %r12d, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0xc(%rax,%rcx,8), %r14d
movq 0x8(%rbx), %rax
cmpq %rax, (%rbx)
jne 0xef1d8
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x10(%rbx)
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
orq 0x20(%rsp), %r14
movq (%rbx), %rax
movq 0x10(%rbx), %rdi
leaq 0x1(%rax), %rcx
movq %rcx, (%rbx)
movq %r14, (%rdi,%rax,8)
movl 0xc(%rbp), %r12d
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl %eax, %r12d
movl 0x8(%rbp), %r14d
movq 0x8(%rbx), %rax
cmpq %rax, (%rbx)
movq 0x28(%rsp), %r13
jne 0xef235
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x8(%rbx)
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x10(%rbx)
shlq $0x20, %r12
orq %r12, %r14
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movq %r14, (%rcx,%rax,8)
movq 0x8(%rsp), %rsi
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rdx
incq %r15
cmpq 0x10(%rsp), %r15
jne 0xef128
jmp 0xef277
callq 0x11bff
jmp 0xef19a
movq 0x78(%rsp), %rax
testl %eax, %eax
je 0xef3a8
movl %eax, %eax
movq %rax, 0x10(%rsp)
xorl %r15d, %r15d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rbp
movq 0x10(%r13), %rax
movl %ebp, %r14d
shrl %r14d
leaq (%r14,%r14,4), %rcx
cmpl $0x0, 0xc(%rax,%rcx,8)
je 0xef2db
leaq (%rax,%rcx,8), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%r13)
movl $0x0, (%r13)
movq 0x18(%r13), %rdi
callq 0x2220
movq $0x0, 0x18(%r13)
movq 0x28(%rsp), %r13
movq 0x18(%r13), %rax
movq 0x20(%rax), %rcx
orl $0x80000000, (%rcx,%r14,8) # imm = 0x80000000
andl $-0x2, %ebp
xorl %ecx, %ecx
leaq (%rcx,%rbp), %rdx
movq 0x28(%rax), %rsi
movq (%rsi,%rdx,8), %rdi
movq %rdi, %rsi
andq %r12, %rsi
je 0xef37e
shrq $0x20, %rdi
leaq (%rdi,%rdi,2), %rdi
shlq $0x3, %rdi
addq 0x8(%rax), %rdi
xorl %r8d, %r8d
leaq (%r8,%r8,2), %r9
orb $-0x80, 0xf(%rdi,%r9,8)
movl 0x8(%rdi,%r9,8), %r9d
xorq $0x1, %r9
movq 0x28(%rax), %r10
movq (%r10,%r9,8), %r10
movq %r10, %r9
andq %r12, %r9
je 0xef376
movq 0x8(%rax), %r11
shrq $0x20, %r10
shlq $0x3, %r9
leaq (%r9,%r9,2), %r9
leaq (%r10,%r10,2), %r10
leaq (%r11,%r10,8), %r10
addq $0xc, %r10
xorl %r11d, %r11d
movl -0x4(%r10,%r11), %r14d
xorl %edx, %r14d
cmpl $0x1, %r14d
jne 0xef36d
orb $-0x80, 0x3(%r10,%r11)
addq $0x18, %r11
cmpq %r11, %r9
jne 0xef359
incq %r8
cmpq %rsi, %r8
jne 0xef317
leaq 0x1(%rcx), %rdx
testq %rcx, %rcx
movq %rdx, %rcx
je 0xef2f0
incq %r15
cmpq 0x10(%rsp), %r15
jne 0xef294
movq 0x8(%rsp), %rsi
movq 0x18(%rsp), %rdi
jmp 0xef3ab
xorl %r15d, %r15d
movq 0x10(%r13), %rax
shrl %esi
leaq (%rsi,%rsi,4), %rcx
movq 0x60(%rsp), %rdx
movq %rdx, 0x20(%rax,%rcx,8)
movaps 0x40(%rsp), %xmm0
movaps 0x50(%rsp), %xmm1
movups %xmm1, 0x10(%rax,%rcx,8)
movups %xmm0, (%rax,%rcx,8)
movq 0x18(%r13), %rax
movq 0x20(%rax), %rax
andl $0x7fffffff, (%rax,%rsi,8) # imm = 0x7FFFFFFF
movq 0x18(%r13), %rax
movq 0x20(%rax), %rax
movl $0x80000000, %ecx       # imm = 0x80000000
andl (%rax,%rsi,8), %ecx
addl 0x3c(%rsp), %ecx
movl %ecx, (%rax,%rsi,8)
movl %r15d, %r14d
cmpq %r14, (%rbx)
jbe 0xef4c9
shrl %edi
leal 0x1(%r14), %ebp
movq %rsi, 0x8(%rsp)
movq %rdi, 0x18(%rsp)
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rcx
movq %rcx, %r15
shrq $0x20, %r15
movl %ebp, %edx
movq (%rax,%rdx,8), %r8
movl %r8d, %eax
shrl %eax
cmpl %edi, %eax
movl %r8d, %r12d
cmovel %r15d, %r12d
cmpl %esi, %eax
cmovel %r15d, %r12d
shrq $0x20, %r8
movq 0x10(%r13), %rax
movq 0x18(%r13), %rdi
shrq $0x21, %rcx
leaq (%rcx,%rcx,4), %rcx
movl (%rax,%rcx,8), %edx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl %eax, %edx
movl %r15d, %esi
movl %r12d, %ecx
xorl %r9d, %r9d
xorl %eax, %eax
pushq %rax
pushq %rax
callq 0xe907b
addq $0x10, %rsp
movq 0x10(%rbx), %rax
movl (%rax,%r14,8), %r8d
movq 0x10(%r13), %rax
movq 0x18(%r13), %rdi
movl %r12d, %esi
xorl $0x1, %esi
shrl %r12d
leaq (%r12,%r12,4), %rcx
movl (%rax,%rcx,8), %edx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl %eax, %edx
xorl $0x1, %r15d
movl %r15d, %ecx
xorl %r9d, %r9d
xorl %eax, %eax
pushq %rax
pushq %rax
callq 0xe907b
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x10, %rsp
leal 0x1(%rbp), %r14d
addl $0x2, %ebp
cmpq %r14, (%rbx)
ja 0xef414
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq