// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: renew_phase_bubble(rd_hamming_fly_simp_t*, unsigned long, buf_t*, ma_ug_t*, unsigned long, unsigned int, unsigned int, hap_cov_t*, utg_trans_t*, unsigned int)
uint64_t renew_phase_bubble(rd_hamming_fly_simp_t *pf, uint64_t v0, buf_t *b, ma_ug_t *ug, uint64_t max_dist, 
uint32_t positive_flag, uint32_t negative_flag, hap_cov_t *cov, utg_trans_t *o, uint32_t is_update_chain)
{
    uint64_t v, k, i, v1 = b->S.a[0], is_update, is_pop = 0; ma_ug_t *fg = pf->fg;
    uint8_t *s = pf->vs; asg32_v *bc = pf->srt; uint8_t sn = 1, se = 2; uint64_t max_dist0 = max_dist;
    bc->n = 0; kv_resize(uint32_t, (*bc), b->b.n);
    assert((fg->u.a[v0>>1].len == ug->u.a[v0>>1].len) && (fg->u.a[v0>>1].n == ug->u.a[v0>>1].n));
    assert((fg->u.a[v1>>1].len == ug->u.a[v1>>1].len) && (fg->u.a[v1>>1].n == ug->u.a[v1>>1].n));


    // if(((v0>>1) == 7536) && ((v1>>1) == 99223)) {
    //     print_simple_dbg_gfa(ug->g, "ug0");
    // }

    ///b->S.a[0] is the sink of this bubble
    for (i = 0; i < b->b.n; i++) {
        v = b->b.a[i];
        if((v == v0) || (v == v1)) continue;
        s[v] = sn;
        kv_push(uint32_t, *bc, v);
        assert((fg->u.a[v>>1].len == ug->u.a[v>>1].len) && (fg->u.a[v>>1].n == ug->u.a[v>>1].n));
    }
    
    asg_arc_t *av, *za, *ra; uint32_t an, zn, rn, ri;
    v = v0;
    av = asg_arc_a(fg->g, v); 
    an = asg_arc_n(fg->g, v); 
    for (k = 0; k < an; k++) {
        av[k].del = 1; asg_arc_del(fg->g, av[k].v^1, (av[k].ul>>32)^1, 1);
    }
    fg->g->seq[v>>1].c = ug->g->seq[v>>1].c;


    v = v1^1; 
    av = asg_arc_a(fg->g, v); 
    an = asg_arc_n(fg->g, v); 
    for (k = 0; k < an; k++) {
        av[k].del = 1; asg_arc_del(fg->g, av[k].v^1, (av[k].ul>>32)^1, 1);
    }
    fg->g->seq[v>>1].c = ug->g->seq[v>>1].c;


    for (i = 0; i < bc->n; i++) {
        v = bc->a[i];
        av = asg_arc_a(fg->g, v); an = asg_arc_n(fg->g, v); 
        for (k = 0; k < an; k++) {
            // av[k].del = 1;
            av[k].del = 1; asg_arc_del(fg->g, av[k].v^1, (av[k].ul>>32)^1, 1);
        }

        v ^= 1;
        av = asg_arc_a(fg->g, v); an = asg_arc_n(fg->g, v); 
        for (k = 0; k < an; k++) {
            // av[k].del = 1;
            av[k].del = 1; asg_arc_del(fg->g, av[k].v^1, (av[k].ul>>32)^1, 1);
        }

        fg->g->seq[v>>1].c = ug->g->seq[v>>1].c;
    }


    for (i = 0; i < bc->n; i++) {
        v = bc->a[i];
        za = asg_arc_a(ug->g, v); zn = asg_arc_n(ug->g, v); 
        av = asg_arc_a(fg->g, v); an = asg_arc_n(fg->g, v); 

        ///set
        for (k = 0; k < zn; k++) {
            if((za[k].del) || (!s[za[k].v])) continue;
            s[za[k].v] |= se;
        }

        
        for (k = 0; k < an; k++) {
            ///s[av[k].v]&se:: in the existing graph
            if((!s[av[k].v]) || (s[av[k].v]&se)) continue; ///in the existing graph
            // if((av[k].v) == (v>>1)) continue;///looks like a bug
            if((av[k].v>>1) == (v>>1)) continue;
            av[k].del = 0;

            ra = asg_arc_a(fg->g, (av[k].v^1)); rn = asg_arc_n(fg->g, (av[k].v^1));
            for (ri = 0; ri < rn; ri++) {
                if(ra[ri].v == ((av[k].ul>>32)^1)) {
                    ra[ri].del = 0; break;
                }
            }
            assert(ri < rn);
        }

        ///reset
        for (k = 0; k < zn; k++) {
            if((za[k].del) || (!s[za[k].v])) continue;
            if(s[za[k].v]&se) s[za[k].v] -= se;
        }
    }


    is_update = rd_hamming_symm_simple0(b, ug->g, fg->g, v0, v1^1, max_dist, &max_dist);

    // if(((v0>>1) == 7536) && ((v1>>1) == 99223)) {
    //     fprintf(stderr, "v0::utg%.6lul(%c)\tv1::utg%.6lul(%c)\n", (v0>>1) + 1, "+-"[(v0&1)], (v1>>1) + 1, "+-"[(v1&1)]);
    //     for (i = 0; i < bc->n; i++) fprintf(stderr, "w::utg%.6ul(%c)\n", (bc->a[i]>>1) + 1, "+-"[(bc->a[i]&1)]);
    //     print_simple_dbg_gfa(ug->g, "ug1");
    //     print_simple_dbg_gfa(fg->g, "fg0");
    // }

    // fprintf(stderr, "[M::%s] is_update::%lu\n", __func__, is_update);
    if(is_update) {
        for (i = 0; i < bc->n; i++) {
            append_node_arcs(fg->g, ug->g, s, se, bc->a[i]);
            append_node_arcs(fg->g, ug->g, s, se, bc->a[i]^1);
        }
        append_node_arcs(fg->g, ug->g, s, se, v0);
        append_node_arcs(fg->g, ug->g, s, se, v1^1);
        is_pop = bub_pop_merge(ug, fg, v0, v1, max_dist, b, positive_flag, negative_flag, cov, is_update_chain, o, pf->ae, pf->src, pf->cov, pf->max_hang, pf->min_ovlp, pf->gap_fuzz, &(pf->n_insert));
    } else {
        max_dist = max_dist0;
        is_pop = asg_bub_pop1_primary_trio(ug->g, ug, v0, max_dist, b, positive_flag, negative_flag, 1, NULL, NULL, cov, is_update_chain, 0, o);
    }



    for (i = 0; i < bc->n; i++) s[bc->a[i]] = 0;
    ///reset
    v = v0;
    av = asg_arc_a(fg->g, v); 
    an = asg_arc_n(fg->g, v); 
    for (k = 0; k < an; k++) {
        av[k].del = 0; asg_arc_del(fg->g, av[k].v^1, (av[k].ul>>32)^1, 0);
    }
    fg->g->seq[v>>1].c = PRIMARY_LABLE;


    v = v1^1; 
    av = asg_arc_a(fg->g, v); 
    an = asg_arc_n(fg->g, v); 
    for (k = 0; k < an; k++) {
        av[k].del = 0; asg_arc_del(fg->g, av[k].v^1, (av[k].ul>>32)^1, 0);
    }
    fg->g->seq[v>>1].c = PRIMARY_LABLE;


    for (i = 0; i < bc->n; i++) {
        v = bc->a[i];
        av = asg_arc_a(fg->g, v); 
        an = asg_arc_n(fg->g, v); 
        for (k = 0; k < an; k++) {
            av[k].del = 0; asg_arc_del(fg->g, av[k].v^1, (av[k].ul>>32)^1, 0);
        }

        v ^= 1;
        av = asg_arc_a(fg->g, v); 
        an = asg_arc_n(fg->g, v); 
        for (k = 0; k < an; k++) {
            av[k].del = 0; asg_arc_del(fg->g, av[k].v^1, (av[k].ul>>32)^1, 0);
        }

        fg->g->seq[v>>1].c = PRIMARY_LABLE;
    }
    return is_pop;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %r9d, %ebp
movq %r8, %r12
movq %rdi, %r14
movq %r8, 0xa0(%rsp)
movq 0x18(%rdx), %rax
movl (%rax), %eax
movq %rax, 0x90(%rsp)
movq 0x30(%rdi), %rbx
movq 0x20(%rdi), %rdi
movq 0x28(%r14), %r15
movq $0x0, (%rdi)
movq 0x38(%rdx), %rax
cmpq %rax, 0x8(%rdi)
movq %rdi, 0x68(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x88(%rsp)
movq %rcx, 0x70(%rsp)
jae 0xe7939
decq %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x10, %rcx
orq %rax, %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0x8(%rdi)
movq 0x10(%rdi), %rdi
leaq 0x4(,%rcx,4), %rsi
callq 0x2370
movq 0x70(%rsp), %rcx
movq 0x88(%rsp), %rdx
movq 0x78(%rsp), %rsi
movq 0x68(%rsp), %rdi
movq %rax, 0x10(%rdi)
movq 0x10(%rbx), %rax
movq %rsi, %r8
shrq %r8
movq %r8, 0xb0(%rsp)
leaq (,%r8,8), %r8
leaq (%r8,%r8,4), %r9
movq 0x10(%rcx), %r10
movl (%r10,%r9), %r8d
xorl (%rax,%r9), %r8d
testl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
jne 0xe84e5
leaq (%rax,%r9), %r8
addq %r10, %r9
movl 0x10(%r8), %r8d
cmpl 0x10(%r9), %r8d
jne 0xe84e5
movq %r12, 0xc8(%rsp)
movq %r14, 0xd0(%rsp)
movl %ebp, 0x84(%rsp)
movq 0x90(%rsp), %r8
shrl %r8d
movq %r8, 0xa8(%rsp)
leaq (,%r8,8), %r8
leaq (%r8,%r8,4), %r9
movl (%r10,%r9), %r8d
xorl (%rax,%r9), %r8d
testl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
jne 0xe8504
addq %r9, %rax
addq %r9, %r10
movl 0x10(%rax), %eax
cmpl 0x10(%r10), %eax
jne 0xe8504
movq 0x38(%rdx), %rax
testq %rax, %rax
je 0xe7ab9
xorl %r14d, %r14d
movl $0x2, %r13d
movq 0x48(%rdx), %r8
movl (%r8,%r14,4), %r12d
cmpq %rsi, %r12
je 0xe7aad
cmpl 0x90(%rsp), %r12d
je 0xe7aad
movb $0x1, (%r15,%r12)
movq (%rdi), %r9
movq 0x10(%rdi), %rax
cmpq 0x8(%rdi), %r9
jne 0xe7a63
leaq (%r9,%r9), %rsi
testq %r9, %r9
cmoveq %r13, %rsi
movq %rsi, 0x8(%rdi)
shlq $0x2, %rsi
movq %rax, %rdi
callq 0x2370
movq 0x70(%rsp), %rcx
movq 0x88(%rsp), %rdx
movq 0x78(%rsp), %rsi
movq 0x68(%rsp), %rdi
movq %rax, 0x10(%rdi)
movq (%rdi), %r9
leaq 0x1(%r9), %r8
movq %r8, (%rdi)
movl %r12d, (%rax,%r9,4)
movq 0x10(%rbx), %rax
shrl %r12d
shlq $0x3, %r12
leaq (%r12,%r12,4), %r9
movq 0x10(%rcx), %r10
movl (%r10,%r9), %r8d
xorl (%rax,%r9), %r8d
testl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
jne 0xe84c6
addq %r9, %rax
addq %r9, %r10
movl 0x10(%rax), %eax
cmpl 0x10(%r10), %eax
jne 0xe84c6
movq 0x38(%rdx), %rax
incq %r14
cmpq %rax, %r14
jb 0xe79f9
movq 0x18(%rbx), %rdx
movq 0x8(%rdx), %rdi
movq 0x28(%rdx), %r8
movq (%r8,%rsi,8), %rsi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rsi, %r14
andq %rax, %r14
je 0xe7b67
shrq $0x20, %rsi
leaq (%rsi,%rsi,2), %rdx
leaq (%rdi,%rdx,8), %rdx
xorl %esi, %esi
leaq (%rsi,%rsi,2), %rdi
orb $-0x80, 0xf(%rdx,%rdi,8)
movq 0x18(%rbx), %r8
movl 0x8(%rdx,%rdi,8), %r9d
xorq $0x1, %r9
movq 0x28(%r8), %r10
movq (%r10,%r9,8), %r9
movq %r9, %r10
andq %rax, %r10
je 0xe7b4e
movl 0x4(%rdx,%rdi,8), %edi
movq 0x8(%r8), %r11
shrq $0x20, %r9
shlq $0x3, %r10
leaq (%r10,%r10,2), %r8
leaq (%r9,%r9,2), %r9
leaq (%r11,%r9,8), %r9
addq $0xc, %r9
xorl %r10d, %r10d
movl -0x4(%r9,%r10), %r11d
xorl %edi, %r11d
cmpl $0x1, %r11d
jne 0xe7b45
orb $-0x80, 0x3(%r9,%r10)
addq $0x18, %r10
cmpq %r10, %r8
jne 0xe7b31
incq %rsi
cmpq %r14, %rsi
jne 0xe7ae8
movq 0x18(%rbx), %rdx
movq 0x8(%rdx), %rdi
movq 0x28(%rdx), %r8
movq 0x70(%rsp), %rcx
movq 0x18(%rcx), %rsi
movq 0x20(%rsi), %rcx
movq 0xb0(%rsp), %r11
movb 0x4(%rcx,%r11,8), %r10b
movq 0x20(%rdx), %r9
movb %r10b, 0x4(%r9,%r11,8)
movq 0x90(%rsp), %r10
xorq $0x1, %r10
movq %r10, 0x98(%rsp)
movq (%r8,%r10,8), %r8
andq %r8, %rax
je 0xe7c3c
shrq $0x20, %r8
leaq (%r8,%r8,2), %rcx
leaq (%rdi,%rcx,8), %rcx
xorl %edx, %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq (%rdx,%rdx,2), %rdi
orb $-0x80, 0xf(%rcx,%rdi,8)
movq 0x18(%rbx), %r8
movl 0x8(%rcx,%rdi,8), %r9d
xorq $0x1, %r9
movq 0x28(%r8), %r10
movq (%r10,%r9,8), %r9
movq %r9, %r10
andq %rsi, %r10
je 0xe7c1f
movl 0x4(%rcx,%rdi,8), %edi
movq 0x8(%r8), %r11
shrq $0x20, %r9
shlq $0x3, %r10
leaq (%r10,%r10,2), %r8
leaq (%r9,%r9,2), %r9
leaq (%r11,%r9,8), %r9
addq $0xc, %r9
xorl %r10d, %r10d
movl -0x4(%r9,%r10), %r11d
xorl %edi, %r11d
cmpl $0x1, %r11d
jne 0xe7c16
orb $-0x80, 0x3(%r9,%r10)
addq $0x18, %r10
cmpq %r10, %r8
jne 0xe7c02
incq %rdx
cmpq %rax, %rdx
jne 0xe7bb9
movq 0x70(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0x20(%rsi), %rcx
movq 0x18(%rbx), %rdx
movq 0x20(%rdx), %r9
movq 0xa8(%rsp), %rdi
movb 0x4(%rcx,%rdi,8), %al
movb %al, 0x4(%r9,%rdi,8)
movq 0x68(%rsp), %r8
cmpq $0x0, (%r8)
je 0xe7faf
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq 0x10(%r8), %rsi
movl (%rsi,%rax,4), %edi
movq 0x8(%rdx), %r8
movq 0x28(%rdx), %r9
movq (%r9,%rdi,8), %r10
movq %r10, %rsi
andq %rcx, %rsi
je 0xe7d0c
shrq $0x20, %r10
leaq (%r10,%r10,2), %rdx
leaq (%r8,%rdx,8), %rdx
xorl %r8d, %r8d
leaq (%r8,%r8,2), %r9
orb $-0x80, 0xf(%rdx,%r9,8)
movq 0x18(%rbx), %r10
movl 0x8(%rdx,%r9,8), %r11d
xorq $0x1, %r11
movq 0x28(%r10), %r14
movq (%r14,%r11,8), %r11
movq %r11, %r14
andq %rcx, %r14
je 0xe7cf8
movl 0x4(%rdx,%r9,8), %r9d
movq 0x8(%r10), %r12
shrq $0x20, %r11
shlq $0x3, %r14
leaq (%r14,%r14,2), %r10
leaq (%r11,%r11,2), %r11
leaq (%r12,%r11,8), %r11
addq $0xc, %r11
xorl %r14d, %r14d
movl -0x4(%r11,%r14), %ebp
xorl %r9d, %ebp
cmpl $0x1, %ebp
jne 0xe7cef
orb $-0x80, 0x3(%r11,%r14)
addq $0x18, %r14
cmpq %r14, %r10
jne 0xe7cdc
incq %r8
cmpq %rsi, %r8
jne 0xe7c91
movq 0x18(%rbx), %rdx
movq 0x8(%rdx), %r8
movq 0x28(%rdx), %r9
movq %rdi, %rsi
xorq $0x1, %rsi
movq (%r9,%rsi,8), %r9
movq %r9, %rsi
andq %rcx, %rsi
je 0xe7da5
shrq $0x20, %r9
leaq (%r9,%r9,2), %rdx
leaq (%r8,%rdx,8), %rdx
xorl %r8d, %r8d
leaq (%r8,%r8,2), %r9
orb $-0x80, 0xf(%rdx,%r9,8)
movq 0x18(%rbx), %r10
movl 0x8(%rdx,%r9,8), %r11d
xorq $0x1, %r11
movq 0x28(%r10), %r14
movq (%r14,%r11,8), %r11
movq %r11, %r14
andq %rcx, %r14
je 0xe7d99
movl 0x4(%rdx,%r9,8), %r9d
movq 0x8(%r10), %r12
shrq $0x20, %r11
shlq $0x3, %r14
leaq (%r14,%r14,2), %r10
leaq (%r11,%r11,2), %r11
leaq (%r12,%r11,8), %r11
addq $0xc, %r11
xorl %r14d, %r14d
movl -0x4(%r11,%r14), %ebp
xorl %r9d, %ebp
cmpl $0x1, %ebp
jne 0xe7d90
orb $-0x80, 0x3(%r11,%r14)
addq $0x18, %r14
cmpq %r14, %r10
jne 0xe7d7d
incq %r8
cmpq %rsi, %r8
jne 0xe7d32
movq 0x18(%rbx), %rdx
movq 0x70(%rsp), %r10
movq 0x18(%r10), %rsi
movq 0x20(%rsi), %r8
shrl %edi
movb 0x4(%r8,%rdi,8), %r8b
movq 0x20(%rdx), %r9
movb %r8b, 0x4(%r9,%rdi,8)
incq %rax
movq 0x68(%rsp), %r8
movq (%r8), %rdi
cmpq %rdi, %rax
jb 0xe7c63
testq %rdi, %rdi
je 0xe7faf
xorl %eax, %eax
movq 0x10(%r8), %rcx
movl (%rcx,%rax,4), %r8d
movq 0x18(%r10), %rcx
movq 0x8(%rcx), %rdx
movq %rdx, 0xc0(%rsp)
movq 0x28(%rcx), %rcx
movq (%rcx,%r8,8), %rdi
movq %rdi, %rcx
shrq $0x20, %rcx
movq %rcx, 0xb8(%rsp)
movq 0x18(%rbx), %rcx
movq 0x28(%rcx), %rdx
movq (%rdx,%r8,8), %r9
movq %r9, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %r10
shlq $0x3, %r10
addq 0x8(%rcx), %r10
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
andq %rcx, %rdi
je 0xe7e89
leaq (,%rdi,8), %rcx
leaq (%rcx,%rcx,2), %r11
movq 0xb8(%rsp), %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0xc0(%rsp), %rdx
leaq (%rdx,%rcx,8), %r14
addq $0xc, %r14
xorl %ecx, %ecx
cmpl $0x0, (%r14,%rcx)
js 0xe7e80
movl -0x4(%r14,%rcx), %edx
movb (%r15,%rdx), %bpl
testb %bpl, %bpl
je 0xe7e80
orb $0x2, %bpl
movb %bpl, (%r15,%rdx)
addq $0x18, %rcx
cmpq %rcx, %r11
jne 0xe7e63
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
andq %rcx, %r9
je 0xe7f41
shrl %r8d
xorl %r11d, %r11d
leaq (%r11,%r11,2), %rcx
movl 0x8(%r10,%rcx,8), %r14d
movb (%r15,%r14), %dl
testb %dl, %dl
je 0xe7f35
andb $0x2, %dl
jne 0xe7f35
movl %r14d, %edx
shrl %edx
cmpl %edx, %r8d
je 0xe7f35
leaq (%r10,%rcx,8), %rcx
andb $0x7f, 0xf(%rcx)
movq 0x18(%rbx), %r12
movq 0x28(%r12), %rdx
xorq $0x1, %r14
movq (%rdx,%r14,8), %rdx
testl %edx, %edx
je 0xe84a7
movq 0x8(%r12), %r14
movq %rdx, %r13
shrq $0x20, %r13
movl 0x4(%rcx), %r12d
movl %edx, %edx
leaq (,%r13,2), %rcx
addq %r13, %rcx
leaq (%r14,%rcx,8), %r13
addq $0xc, %r13
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %ebp, %ebp
movl -0x4(%r13,%rbp), %esi
xorl %r12d, %esi
cmpl $0x1, %esi
je 0xe7f2c
addq $0x18, %rbp
cmpq %rbp, %rdx
jne 0xe7f11
jmp 0xe84a7
leaq (%r14,%rcx,8), %rcx
andb $0x7f, 0xf(%rbp,%rcx)
incq %r11
cmpq %r9, %r11
jne 0xe7e9d
testq %rdi, %rdi
movq 0x70(%rsp), %r10
je 0xe7f96
shlq $0x3, %rdi
leaq (%rdi,%rdi,2), %rdi
movq 0xb8(%rsp), %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0xc0(%rsp), %rdx
leaq (%rdx,%rcx,8), %rdx
addq $0xc, %rdx
xorl %ecx, %ecx
cmpl $0x0, (%rdx,%rcx)
js 0xe7f8d
movl -0x4(%rdx,%rcx), %esi
movb (%r15,%rsi), %r8b
testb $0x2, %r8b
je 0xe7f8d
addb $-0x2, %r8b
movb %r8b, (%r15,%rsi)
addq $0x18, %rcx
cmpq %rcx, %rdi
jne 0xe7f71
incq %rax
movq 0x68(%rsp), %r8
cmpq (%r8), %rax
jb 0xe7de1
movq 0x18(%r10), %rsi
movq 0x18(%rbx), %rdx
movq 0x120(%rsp), %r13
movq 0x118(%rsp), %rbp
leaq 0xa0(%rsp), %rax
movq (%rax), %r9
movq %rax, (%rsp)
movq 0x88(%rsp), %r12
movq %r12, %rdi
movq 0x78(%rsp), %r14
movl %r14d, %ecx
movq 0x98(%rsp), %r8
callq 0xe5b08
testl %eax, %eax
je 0xe812f
movq 0x68(%rsp), %rax
cmpq $0x0, (%rax)
movq 0x70(%rsp), %r12
je 0xe8064
xorl %r14d, %r14d
movq 0x18(%rbx), %rdi
movq 0x18(%r12), %rsi
movq 0x10(%rax), %rax
movl (%rax,%r14,4), %r8d
movq %r15, %rdx
movl $0x2, %ecx
callq 0xe6e8a
movq 0x18(%rbx), %rdi
movq 0x70(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0x68(%rsp), %rax
movq 0x10(%rax), %rax
movl (%rax,%r14,4), %r8d
xorl $0x1, %r8d
movq %r15, %rdx
movl $0x2, %ecx
callq 0xe6e8a
movq 0x70(%rsp), %r12
movq 0x68(%rsp), %rax
incq %r14
cmpq (%rax), %r14
jb 0xe8009
movq 0x18(%rbx), %rdi
movq 0x18(%r12), %rsi
movq %r15, %rdx
movl $0x2, %ecx
movq 0x78(%rsp), %r14
movl %r14d, %r8d
callq 0xe6e8a
movq 0x18(%rbx), %rdi
movq 0x18(%r12), %rsi
movq %r15, %rdx
movl $0x2, %ecx
movq 0x98(%rsp), %r8
callq 0xe6e8a
movq 0xa0(%rsp), %r8
movq 0xd0(%rsp), %r9
movq 0x38(%r9), %rax
movq (%r9), %rcx
movq 0x8(%r9), %rdx
movl 0x10(%r9), %esi
movl 0x14(%r9), %edi
addq $0x40, %r9
movq %r9, 0x58(%rsp)
movl %edi, 0x48(%rsp)
movl %esi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movq %rax, 0x28(%rsp)
movq %r13, 0x20(%rsp)
movl 0x128(%rsp), %eax
movl %eax, 0x18(%rsp)
movq %rbp, 0x10(%rsp)
movl 0x110(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x84(%rsp), %eax
movl %eax, (%rsp)
movq %r12, %rdi
movq %rbx, %rsi
movq 0x88(%rsp), %r9
movl %r14d, %edx
movq 0x90(%rsp), %rcx
callq 0xe701d
movl %eax, %eax
jmp 0xe8192
movq 0xc8(%rsp), %rcx
movq %rcx, 0xa0(%rsp)
movq 0x70(%rsp), %rsi
movq 0x18(%rsi), %rdi
movq %r13, 0x38(%rsp)
movl 0x128(%rsp), %eax
movl %eax, 0x28(%rsp)
movq %rbp, 0x20(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movl 0x110(%rsp), %eax
movl %eax, (%rsp)
movl $0x0, 0x30(%rsp)
movl $0x1, 0x8(%rsp)
movl %r14d, %edx
movq %r12, %r8
movl 0x84(%rsp), %r9d
callq 0xc02d6
movq 0x68(%rsp), %rsi
cmpq $0x0, (%rsi)
je 0xe81b3
xorl %ecx, %ecx
movq 0x10(%rsi), %rdx
movl (%rdx,%rcx,4), %edx
movb $0x0, (%r15,%rdx)
incq %rcx
cmpq (%rsi), %rcx
jb 0xe819f
movq 0x18(%rbx), %rdi
movq 0x8(%rdi), %rsi
movq 0x28(%rdi), %r8
movq 0x78(%rsp), %rcx
movq (%r8,%rcx,8), %r9
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %r9, %rdx
andq %rcx, %rdx
je 0xe8262
shrq $0x20, %r9
leaq (%r9,%r9,2), %rdi
leaq (%rsi,%rdi,8), %rsi
xorl %edi, %edi
leaq (%rdi,%rdi,2), %r8
andb $0x7f, 0xf(%rsi,%r8,8)
movq 0x18(%rbx), %r9
movl 0x8(%rsi,%r8,8), %r10d
xorq $0x1, %r10
movq 0x28(%r9), %r11
movq (%r11,%r10,8), %r10
movq %r10, %r11
andq %rcx, %r11
je 0xe824e
movl 0x4(%rsi,%r8,8), %r8d
movq 0x8(%r9), %r14
shrq $0x20, %r10
shlq $0x3, %r11
leaq (%r11,%r11,2), %r9
leaq (%r10,%r10,2), %r10
leaq (%r14,%r10,8), %r10
addq $0xc, %r10
xorl %r11d, %r11d
movl -0x4(%r10,%r11), %ebp
xorl %r8d, %ebp
cmpl $0x1, %ebp
jne 0xe8245
andb $0x7f, 0x3(%r10,%r11)
addq $0x18, %r11
cmpq %r11, %r9
jne 0xe8232
incq %rdi
cmpq %rdx, %rdi
jne 0xe81e7
movq 0x18(%rbx), %rdi
movq 0x8(%rdi), %rsi
movq 0x28(%rdi), %r8
movq 0x20(%rdi), %rdx
movq 0xb0(%rsp), %r9
movb $0x0, 0x4(%rdx,%r9,8)
movq 0x98(%rsp), %r9
movq (%r8,%r9,8), %r8
andq %r8, %rcx
je 0xe8313
shrq $0x20, %r8
leaq (%r8,%r8,2), %rdx
leaq (%rsi,%rdx,8), %rdx
xorl %esi, %esi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
leaq (%rsi,%rsi,2), %r8
andb $0x7f, 0xf(%rdx,%r8,8)
movq 0x18(%rbx), %r9
movl 0x8(%rdx,%r8,8), %r10d
xorq $0x1, %r10
movq 0x28(%r9), %r11
movq (%r11,%r10,8), %r10
movq %r10, %r11
andq %rdi, %r11
je 0xe8303
movl 0x4(%rdx,%r8,8), %r8d
movq 0x8(%r9), %r14
shrq $0x20, %r10
shlq $0x3, %r11
leaq (%r11,%r11,2), %r9
leaq (%r10,%r10,2), %r10
leaq (%r14,%r10,8), %r10
addq $0xc, %r10
xorl %r11d, %r11d
movl -0x4(%r10,%r11), %ebp
xorl %r8d, %ebp
cmpl $0x1, %ebp
jne 0xe82fa
andb $0x7f, 0x3(%r10,%r11)
addq $0x18, %r11
cmpq %r11, %r9
jne 0xe82e7
incq %rsi
cmpq %rcx, %rsi
jne 0xe829c
movq 0x18(%rbx), %rdi
movq 0x20(%rdi), %rdx
movq 0xa8(%rsp), %rcx
movb $0x0, 0x4(%rdx,%rcx,8)
movq 0x68(%rsp), %rsi
cmpq $0x0, (%rsi)
je 0xe8495
xorl %ecx, %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq 0x10(%rsi), %rsi
movl (%rsi,%rcx,4), %esi
movq 0x8(%rdi), %r9
movq 0x28(%rdi), %r10
movq (%r10,%rsi,8), %r11
movq %r11, %r8
andq %rdx, %r8
je 0xe83df
shrq $0x20, %r11
leaq (%r11,%r11,2), %rdi
leaq (%r9,%rdi,8), %rdi
xorl %r9d, %r9d
leaq (%r9,%r9,2), %r10
andb $0x7f, 0xf(%rdi,%r10,8)
movq 0x18(%rbx), %r11
movl 0x8(%rdi,%r10,8), %r14d
xorq $0x1, %r14
movq 0x28(%r11), %r15
movq (%r15,%r14,8), %r14
movq %r14, %r15
andq %rdx, %r15
je 0xe83cb
movl 0x4(%rdi,%r10,8), %r10d
movq 0x8(%r11), %r12
shrq $0x20, %r14
shlq $0x3, %r15
leaq (%r15,%r15,2), %r11
leaq (%r14,%r14,2), %r14
leaq (%r12,%r14,8), %r14
addq $0xc, %r14
xorl %r15d, %r15d
movl -0x4(%r14,%r15), %ebp
xorl %r10d, %ebp
cmpl $0x1, %ebp
jne 0xe83c2
andb $0x7f, 0x3(%r14,%r15)
addq $0x18, %r15
cmpq %r15, %r11
jne 0xe83af
incq %r9
cmpq %r8, %r9
jne 0xe8364
movq 0x18(%rbx), %rdi
movq 0x8(%rdi), %r9
movq 0x28(%rdi), %r10
movq %rsi, %r8
xorq $0x1, %r8
movq (%r10,%r8,8), %r10
movq %r10, %r8
andq %rdx, %r8
je 0xe8478
shrq $0x20, %r10
leaq (%r10,%r10,2), %rdi
leaq (%r9,%rdi,8), %rdi
xorl %r9d, %r9d
leaq (%r9,%r9,2), %r10
andb $0x7f, 0xf(%rdi,%r10,8)
movq 0x18(%rbx), %r11
movl 0x8(%rdi,%r10,8), %r14d
xorq $0x1, %r14
movq 0x28(%r11), %r15
movq (%r15,%r14,8), %r14
movq %r14, %r15
andq %rdx, %r15
je 0xe846c
movl 0x4(%rdi,%r10,8), %r10d
movq 0x8(%r11), %r12
shrq $0x20, %r14
shlq $0x3, %r15
leaq (%r15,%r15,2), %r11
leaq (%r14,%r14,2), %r14
leaq (%r12,%r14,8), %r14
addq $0xc, %r14
xorl %r15d, %r15d
movl -0x4(%r14,%r15), %ebp
xorl %r10d, %ebp
cmpl $0x1, %ebp
jne 0xe8463
andb $0x7f, 0x3(%r14,%r15)
addq $0x18, %r15
cmpq %r15, %r11
jne 0xe8450
incq %r9
cmpq %r8, %r9
jne 0xe8405
movq 0x18(%rbx), %rdi
movq 0x20(%rdi), %r8
shrl %esi
movb $0x0, 0x4(%r8,%rsi,8)
incq %rcx
movq 0x68(%rsp), %rsi
cmpq (%rsi), %rcx
jb 0xe8336
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x14fe7d(%rip), %rdi    # 0x23832b
leaq 0x14d9dc(%rip), %rsi    # 0x235e91
leaq 0x14fd32(%rip), %rcx    # 0x2381ee
movl $0x684f, %edx           # imm = 0x684F
callq 0x2110
leaq 0x14fe0d(%rip), %rdi    # 0x2382da
leaq 0x14d9bd(%rip), %rsi    # 0x235e91
leaq 0x14fd13(%rip), %rcx    # 0x2381ee
movl $0x680d, %edx           # imm = 0x680D
callq 0x2110
leaq 0x14fcad(%rip), %rdi    # 0x238199
leaq 0x14d99e(%rip), %rsi    # 0x235e91
leaq 0x14fcf4(%rip), %rcx    # 0x2381ee
movl $0x67ff, %edx           # imm = 0x67FF
callq 0x2110
leaq 0x14fd7a(%rip), %rdi    # 0x238285
leaq 0x14d97f(%rip), %rsi    # 0x235e91
leaq 0x14fcd5(%rip), %rcx    # 0x2381ee
movl $0x6800, %edx           # imm = 0x6800
callq 0x2110