// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: gen_switch_phasing(asg_t*, ma_ug_t*, unsigned long, ma_hit_t_alloc*, ma_sub_t*, int, int, unsigned char*, unsigned char*, buf_t*, unsigned long, unsigned long, asg_t*, asg64_v*)
int gen_switch_phasing(asg_t *sg, ma_ug_t *ug, uint64_t bi, 
ma_hit_t_alloc* src, ma_sub_t *cov, int32_t max_hang, 
int32_t min_ovlp, uint8_t* trio_flag, uint8_t* vis_r_flag, 
buf_t *b, uint64_t tLen, uint64_t vis_f, asg_t *res, asg64_v *sv)
{
    uint32_t k_i, k_j, k_v, rev, z, zn; asg_arc_t *za; 
    ma_utg_t* nsu = NULL; int sw0, sw1;

    sw0 = sw1 = 1;
    asg_bub_pop1_primary_trio_switch_check(ug->g, ug, bi, tLen, b, FATHER, DROP, 0, NULL, NULL, &sw0);
    if(sw0 == 0) {
        asg_bub_pop1_primary_trio_switch_check(ug->g, ug, bi, tLen, b, MOTHER, DROP, 0, NULL, NULL, &sw1);
    } 

    for (k_i = 0; k_i < b->b.n; k_i++) {
        if((b->b.a[k_i]>>1)==(bi>>1) || (b->b.a[k_i]>>1)==(b->S.a[0]>>1)) continue;
        nsu = &(ug->u.a[b->b.a[k_i]>>1]);
        for (k_j = 0; k_j < nsu->n; k_j++) {
            if(R_INF.trio_flag[nsu->a[k_j]>>33] == DROP) R_INF.trio_flag[nsu->a[k_j]>>33] = AMBIGU;
        }
    }
    if(sw0 == 0 && sw1 == 0) return 0;

    uint64_t i, ei = b->S.a[0]^1, v, bv, ev;
    for (k_i = 0; k_i < b->b.n; k_i++) {
        if((b->b.a[k_i]>>1)==(bi>>1) || (b->b.a[k_i]>>1)==(b->S.a[0]>>1)) continue;
        nsu = &(ug->u.a[b->b.a[k_i]>>1]); rev = b->b.a[k_i]&1;
        for (k_j = 0; k_j < nsu->n; k_j++) {
            v = nsu->a[k_j]>>32; if(rev) v ^= 1;
            vis_r_flag[v] = vis_f;
        }
    }
    bv = (bi&1)?(ug->u.a[bi>>1].start^1):(ug->u.a[bi>>1].end^1); //vis_r_flag[bv] = vis_f;
    ev = (ei&1)?(ug->u.a[ei>>1].start^1):(ug->u.a[ei>>1].end^1); //vis_r_flag[ev] = vis_f;

    ma_hit_t_alloc* x = NULL;
    ma_hit_t *h; ma_sub_t *sq, *st;
    int32_t r; asg_arc_t t0, t1, *p;

    for (k_i = 0; k_i < b->b.n; k_i++) {
        if((b->b.a[k_i]>>1)==(bi>>1) || (b->b.a[k_i]>>1)==(b->S.a[0]>>1)) continue;
        nsu = &(ug->u.a[b->b.a[k_i]>>1]);
        for (k_j = 0; k_j < nsu->n; k_j++) {
            for (k_v = 0; k_v < 2; k_v++) {
                v = ((nsu->a[k_j]>>33)<<1) + k_v;
                if(vis_r_flag[v] != vis_f) continue;;
                x = &(src[v>>1]); 
                za = asg_arc_a(sg, v); 
                zn = asg_arc_n(sg, v); 
                for (i = 0; i < x->length; i++) {
                    h = &(x->buffer[i]);
                    // if(!(h->el)) continue;
                    sq = &(cov[Get_qn(*h)]); st = &(cov[Get_tn(*h)]);
                    if(st->del || sg->seq[Get_tn(*h)].del) continue;
                    r = ma_hit2arc(h, sq->e - sq->s, st->e - st->s, max_hang, 
                                        asm_opt.max_hang_rate, min_ovlp, &t0);
                
                    ///if it is a contained read, skip
                    if(r < 0) continue;
                    if((t0.ul>>32) != v) continue;
                    if((vis_r_flag[t0.ul>>32] != vis_f) || (vis_r_flag[t0.v] != vis_f)) continue;
                    for (z = 0; (z < zn) && (za[z].v != t0.v); z++);
                    if(z < zn) continue;
                    if(get_edge_from_source(src, cov, NULL, max_hang, min_ovlp, (t0.v^1), ((t0.ul>>32)^1), &t1)) {
                        p = asg_arc_pushp(res); *p = t0;
                        p = asg_arc_pushp(res); *p = t1;
                    }
                }

            }
        }
    }
    kv_push(uint64_t, *sv, (bv<<32)|(ev));
    return 1;
}

int asg_arc_del_trans_aux(asg_t *g, asg_t *aux, uint8_t *mark, int fuzz)
{
    uint32_t v, w, n_vtx = g->n_seq * 2, n_reduced = 0;
    uint32_t L, i, j, nv0, nv1, kv; asg_arc_t *av0, *av1;
    asg_arc_t *aw0, *aw1; uint32_t nw0, nw1; 
    memset(mark, 0, sizeof((*mark))*n_vtx);

    for (v = 0; v < n_vtx; ++v) {
        if (g->seq[v>>1].del) continue;
        nv0 = asg_arc_n(g, v); av0 = asg_arc_a(g, v); 
        nv1 = asg_arc_n(aux, v); av1 = asg_arc_a(aux, v);
        if (nv0 + nv1 == 0) continue; 
        //all outnode of v should be set to "not reduce"
        for (i = kv = 0; i < nv0; ++i) {
            if(av0[i].del) continue;
            mark[av0[i].v] = 1; kv++;
        }
        for (i = 0; i < nv1; ++i) {
            if(av1[i].del) continue;
            mark[av1[i].v] = 1; kv++;
        }
        if(kv == 0) continue; 

        ///av[nv-1] is longest out-dege
        L = 0;
        if(nv0) L = asg_arc_len(av0[nv0-1]);
        if(nv1 && L < asg_arc_len(av1[nv1-1])) L = asg_arc_len(av1[nv1-1]);
        L += fuzz;
        for (i = 0; i < nv0; ++i) {
            //w is an out-node of v
            w = av0[i].v; if (mark[w] != 1) continue; ///w has already been reduced
            nw0 = asg_arc_n(g, w); aw0 = asg_arc_a(g, w);
            nw1 = asg_arc_n(aux, w); aw1 = asg_arc_a(aux, w);

            for (j = 0; j < nw0 && asg_arc_len(aw0[j]) + asg_arc_len(av0[i]) <= L; ++j)
                if (mark[aw0[j].v]) mark[aw0[j].v] = 2;
            for (j = 0; j < nw1 && asg_arc_len(aw1[j]) + asg_arc_len(av0[i]) <= L; ++j)
                if (mark[aw1[j].v]) mark[aw1[j].v] = 2;
        }
        //remove edges
        for (i = 0; i < nv0; ++i) {
            if (mark[av0[i].v] == 2) {
                av0[i].del = 1; ++n_reduced;
            }
            mark[av0[i].v] = 0;
        }
    }

    if (n_reduced) {
        asg_cleanup(g);
        asg_symm(g);
    }

    return n_reduced;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %r9d, %r15d
movq %r8, %r13
movq %rcx, 0x70(%rsp)
movq %rdi, 0x88(%rsp)
movq 0x140(%rsp), %r12
movq 0x138(%rsp), %rbp
movl $0x1, %eax
movl %eax, 0x44(%rsp)
leaq 0x64(%rsp), %rbx
movl %eax, (%rbx)
movq 0x18(%rsi), %rdi
movq %rbx, 0x20(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movl $0x0, 0x8(%rsp)
movl $0x5, (%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, %r14
movq %r12, %rcx
movq %rbp, %r8
movl $0x1, %r9d
callq 0xe2bf7
cmpl $0x0, (%rbx)
jne 0xe3c3a
movq 0x38(%rsp), %rsi
movq 0x18(%rsi), %rdi
leaq 0x44(%rsp), %rax
movq %rax, 0x20(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movl $0x0, 0x8(%rsp)
movl $0x5, (%rsp)
movl %r14d, %edx
movq %r12, %rcx
movq %rbp, %r8
movl $0x2, %r9d
callq 0xe2bf7
movq 0x38(%rbp), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0xe3cdf
movq %r14, %rdx
shrq %rdx
leaq 0x1b25da(%rip), %rsi    # 0x296230
movq 0x138(%rsp), %r8
movq 0x48(%r8), %rdi
movl (%rdi,%rax,4), %edi
shrl %edi
cmpq %rdi, %rdx
je 0xe3cd2
movq 0x18(%r8), %r8
movl (%r8), %r8d
shrl %r8d
cmpl %r8d, %edi
je 0xe3cd2
movq 0x38(%rsp), %r8
movq 0x10(%r8), %r8
leaq (%rdi,%rdi,4), %r9
movl 0x10(%r8,%r9,8), %edi
testl %edi, %edi
je 0xe3cd2
leaq (%r8,%r9,8), %rcx
movq 0x28(%rsi), %r8
xorl %r9d, %r9d
movq 0x18(%rcx), %r10
movq (%r10,%r9,8), %r10
shrq $0x21, %r10
cmpb $0x5, (%r8,%r10)
jne 0xe3cbb
movb $0x0, (%r8,%r10)
movq 0x28(%rsi), %r8
movl 0x10(%rcx), %edi
incq %r9
movl %edi, %r10d
cmpq %r10, %r9
jb 0xe3c9c
movq 0x138(%rsp), %rcx
movq 0x38(%rcx), %rcx
incl %eax
cmpq %rax, %rcx
ja 0xe3c56
jmp 0xe3ce1
xorl %ecx, %ecx
movl 0x44(%rsp), %edx
xorl %eax, %eax
orl 0x64(%rsp), %edx
je 0xe43e7
movq 0x148(%rsp), %r10
movq 0x130(%rsp), %r11
movq 0x138(%rsp), %rax
movq 0x18(%rax), %rax
movl (%rax), %eax
xorq $0x1, %rax
xorl %edx, %edx
testq %rcx, %rcx
je 0xe3d99
movq %r14, %rsi
shrq %rsi
movq 0x138(%rsp), %r9
movq 0x48(%r9), %rdi
movl (%rdi,%rdx,4), %edi
movl %edi, %r8d
shrl %r8d
cmpq %r8, %rsi
je 0xe3d90
movq 0x18(%r9), %r9
movl (%r9), %r9d
shrl %r9d
cmpl %r9d, %r8d
je 0xe3d90
movq 0x38(%rsp), %r9
movq 0x10(%r9), %r9
leaq (%r8,%r8,4), %r8
cmpl $0x0, 0x10(%r9,%r8,8)
je 0xe3d90
leaq (%r9,%r8,8), %rcx
andl $0x1, %edi
xorl %r8d, %r8d
movq 0x18(%rcx), %r9
movl 0x4(%r9,%r8,8), %r9d
xorq %rdi, %r9
movb %r10b, (%r11,%r9)
incq %r8
movl 0x10(%rcx), %r9d
cmpq %r9, %r8
jb 0xe3d68
movq 0x138(%rsp), %rcx
movq 0x38(%rcx), %rcx
incl %edx
cmpq %rdx, %rcx
ja 0xe3d20
jmp 0xe3d9b
xorl %ecx, %ecx
xorl %edx, %edx
testb $0x1, %r14b
sete %dl
movq 0x38(%rsp), %rsi
movq 0x10(%rsi), %rsi
shrq %r14
movq %r14, 0xa0(%rsp)
leaq (%r14,%r14,4), %rdi
leaq (%rsi,%rdi,8), %rdi
movl 0x4(%rdi,%rdx,4), %edx
movq %rdx, 0x98(%rsp)
xorl %edx, %edx
testb $0x1, %al
sete %dl
shrl %eax
leaq (%rax,%rax,4), %rax
leaq (%rsi,%rax,8), %rax
movl 0x4(%rax,%rdx,4), %eax
movq %rax, 0x90(%rsp)
testq %rcx, %rcx
movq 0x138(%rsp), %rax
je 0xe4379
xorl %esi, %esi
movl %edx, 0x34(%rsp)
movl %r15d, 0x30(%rsp)
movq %rax, %rdx
movq 0x48(%rax), %rax
movl (%rax,%rsi,4), %eax
shrl %eax
cmpq %rax, 0xa0(%rsp)
jne 0xe3e23
movq %rdx, %rax
jmp 0xe436e
movq 0x18(%rdx), %rdx
movl (%rdx), %edx
shrl %edx
cmpl %edx, %eax
je 0xe4366
movq 0x38(%rsp), %rdx
movq 0x10(%rdx), %rdx
leaq (%rax,%rax,4), %rax
cmpl $0x0, 0x10(%rdx,%rax,8)
je 0xe4366
leaq (%rdx,%rax,8), %rax
movq %rax, 0x78(%rsp)
movq $0x0, 0x50(%rsp)
movq %rsi, 0xc8(%rsp)
movb $0x1, %cl
xorl %eax, %eax
movl %ecx, 0x5c(%rsp)
movq 0x78(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq 0x50(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
leaq (%rax,%rcx,2), %rsi
movzbl (%r11,%rsi), %eax
cmpq %r10, %rax
jne 0xe430d
leaq (%rcx,%rcx,2), %rax
movq 0x70(%rsp), %rcx
cmpl $0x0, 0xc(%rcx,%rax,8)
je 0xe430d
leaq (%rcx,%rax,8), %r14
movq 0x88(%rsp), %rcx
movq 0x8(%rcx), %rax
movq 0x28(%rcx), %rcx
movq (%rcx,%rsi,8), %rdx
movq %rdx, %rcx
shrq $0x20, %rcx
movq %rdx, 0xb0(%rsp)
movl %edx, %edx
movq %rsi, 0xb8(%rsp)
xorl $0x1, %esi
movl %esi, 0x58(%rsp)
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rax
addq $0x8, %rax
movq %rax, 0xa8(%rsp)
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rax
movq %rax, 0xc0(%rsp)
xorl %r12d, %r12d
movq %r14, 0x80(%rsp)
movq (%r14), %r9
leaq (%r12,%r12,4), %r11
movl 0xc(%r9,%r11,8), %eax
leaq (%rax,%rax,2), %rsi
movl (%r13,%rsi,4), %edx
testl %edx, %edx
js 0xe404e
movq 0x88(%rsp), %rcx
movq 0x20(%rcx), %rcx
cmpl $0x0, (%rcx,%rax,8)
js 0xe404e
leaq (%r9,%r11,8), %rcx
leaq (,%rsi,4), %rsi
addq %r13, %rsi
movl 0x4(%rsi), %esi
subl %edx, %esi
movq 0x18(%rcx), %rdx
movq %rdx, 0x48(%rsp)
testl %edx, %edx
js 0xe3f76
movl 0x10(%rcx), %r10d
movl 0x14(%rcx), %r8d
subl %r8d, %esi
movl %esi, %edi
movl %r10d, %esi
jmp 0xe3f84
movl 0x10(%rcx), %r10d
movl 0x14(%rcx), %r8d
subl %r8d, %esi
movl %r10d, %edi
movq (%r9,%r11,8), %rbp
movq %rbp, %r9
shrq $0x20, %r9
leaq (%r9,%r9,2), %r9
movq %r13, %rdx
leaq (,%r9,4), %r9
addq %r13, %r9
movl 0x4(%r9), %ebx
movl (%r9), %r9d
movl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
andl %r11d, %r9d
subl %r9d, %ebx
cmpl %ebp, %esi
movl %ebp, %r13d
cmovll %esi, %r13d
movl 0x8(%rcx), %r9d
movl %ebx, 0x60(%rsp)
subl %r9d, %ebx
cmpl %edi, %ebx
movl %edi, %r11d
cmovll %ebx, %r11d
cmpl %r15d, %r13d
jg 0xe404b
cmpl %r15d, %r11d
jg 0xe404b
movl %r9d, %r15d
subl %ebp, %r15d
cvtsi2ss %r15, %xmm1
addl %r13d, %r15d
addl %r11d, %r15d
cvtsi2ss %r15, %xmm2
leaq 0x1b1760(%rip), %r14    # 0x295758
movss 0x158(%r14), %xmm0
mulss %xmm0, %xmm2
ucomiss %xmm1, %xmm2
jbe 0xe401c
movl 0x30(%rsp), %r15d
movq %rdx, %r13
movq 0x80(%rsp), %r14
jmp 0xe404e
subl %r10d, %r8d
xorps %xmm1, %xmm1
cvtsi2ss %r8, %xmm1
addl %r13d, %r11d
addl %r8d, %r11d
xorps %xmm2, %xmm2
cvtsi2ss %r11, %xmm2
mulss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
movq 0x80(%rsp), %r14
jbe 0xe4063
movl 0x30(%rsp), %r15d
movq %rdx, %r13
incq %r12
movl 0xc(%r14), %eax
cmpq %rax, %r12
jb 0xe3f10
jmp 0xe430d
cmpl %edi, %ebx
setl %r8b
setg %bl
cmpl %esi, %ebp
setg %r13b
setl %r10b
orb %bl, %r13b
cmpb $0x1, %r13b
jne 0xe4046
orb %r8b, %r10b
movq %rdx, %r13
je 0xe4223
movl 0x120(%rsp), %edx
cmpl %edx, %r15d
jl 0xe4223
cmpl %edx, %r11d
movl 0x30(%rsp), %r15d
jl 0xe404e
movq 0x48(%rsp), %rdx
testl %edx, %edx
setns %r8b
addl %r9d, %edi
movl 0x60(%rsp), %ebx
movl %ebx, %r10d
subl %edi, %r10d
xorl %edi, %edi
movl %ebp, %r11d
subl %esi, %r11d
setle %r9b
setg %sil
cmovlel %r10d, %r11d
shrl $0x10, %edx
andl $0x4000, %edx           # imm = 0x4000
movl 0x34(%rsp), %r10d
andl $0x3fff, %r10d          # imm = 0x3FFF
orl %edx, %r10d
movzbl 0x21(%rcx), %edx
shll $0xf, %edx
orl %r10d, %edx
movl %edx, 0x34(%rsp)
testl %r11d, %r11d
js 0xe404e
movb %r9b, %dil
shrq $0x1f, %rbp
andl $-0x2, %ebp
orq %rdi, %rbp
movq 0xb8(%rsp), %rdx
cmpq %rdx, %rbp
jne 0xe404e
movq 0x130(%rsp), %r9
movzbl (%r9,%rdx), %edx
movq 0x148(%rsp), %rdi
cmpq %rdi, %rdx
jne 0xe404e
xorb %sil, %r8b
addl %eax, %eax
movzbl %r8b, %edx
orq %rax, %rdx
movzbl (%r9,%rdx), %eax
cmpq %rdi, %rax
jne 0xe404e
movb 0x20(%rcx), %sil
cmpl $0x0, 0xb0(%rsp)
movq 0xa8(%rsp), %rcx
je 0xe4185
xorl %eax, %eax
cmpl %edx, (%rcx,%rax)
je 0xe404e
addq $0x18, %rax
cmpq %rax, 0xc0(%rsp)
jne 0xe416e
movb %sil, 0x2f(%rsp)
movq %r11, 0x48(%rsp)
movq %rdx, 0x68(%rsp)
movl %edx, %r9d
xorl $0x1, %r9d
leaq 0xd0(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x58(%rsp), %eax
movl %eax, (%rsp)
movq 0x70(%rsp), %rdi
movq %r13, %rsi
movl %r15d, %ecx
movl 0x120(%rsp), %r8d
callq 0xb3df3
testl %eax, %eax
je 0xe404e
movq 0x150(%rsp), %r8
movl 0x4(%r8), %edx
movl %edx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl (%r8), %ecx
jne 0xe422d
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
movl $0x10, %ecx
cmovel %ecx, %eax
movl %eax, (%r8)
movq 0x8(%r8), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
callq 0x2370
movq 0x150(%rsp), %r8
movq %rax, 0x8(%r8)
movl 0x4(%r8), %edx
movl %edx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
jmp 0xe4231
movl 0x30(%rsp), %r15d
jmp 0xe404e
movq 0x8(%r8), %rax
movq 0x48(%rsp), %rdi
movq 0x68(%rsp), %r10
shlq $0x20, %rbp
leaq (%rdi,%rbp), %rsi
subl %edi, %ebx
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
leal 0x1(%rdx), %edi
movl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
andl %r9d, %edi
andl $0x80000000, %edx       # imm = 0x80000000
orl %edi, %edx
movl %edx, 0x4(%r8)
movl %ecx, %ecx
leaq (%rcx,%rcx,2), %rcx
movq %rsi, (%rax,%rcx,8)
movl %r10d, 0x8(%rax,%rcx,8)
movl %ebx, 0xc(%rax,%rcx,8)
movl 0x34(%rsp), %edx
movw %dx, 0x10(%rax,%rcx,8)
movb 0x2f(%rsp), %dl
movb %dl, 0x12(%rax,%rcx,8)
movl 0x4(%r8), %edx
movl %edx, %ecx
andl %r9d, %ecx
cmpl (%r8), %ecx
jne 0xe42d0
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
movl $0x10, %ecx
cmovel %ecx, %eax
movl %eax, (%r8)
movq 0x8(%r8), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
callq 0x2370
movq 0x150(%rsp), %r8
movq %rax, 0x8(%r8)
movl 0x4(%r8), %edx
movl %edx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
jmp 0xe42d4
movq 0x8(%r8), %rax
leal 0x1(%rdx), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl $0x80000000, %edx       # imm = 0x80000000
orl %esi, %edx
movl %edx, 0x4(%r8)
movl %ecx, %ecx
leaq (%rcx,%rcx,2), %rcx
movq 0xe0(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups 0xd0(%rsp), %xmm0
movups %xmm0, (%rax,%rcx,8)
jmp 0xe404e
movl $0x1, %eax
testb $0x1, 0x5c(%rsp)
movl $0x0, %ecx
movq 0x148(%rsp), %r10
movq 0x130(%rsp), %r11
movq 0xc8(%rsp), %rsi
jne 0xe3e69
movq 0x50(%rsp), %rdx
incq %rdx
movq 0x78(%rsp), %rax
movl 0x10(%rax), %eax
movq %rdx, 0x50(%rsp)
cmpq %rax, %rdx
jb 0xe3e65
movq 0x138(%rsp), %rax
movq 0x38(%rax), %rcx
jmp 0xe436e
movq 0x138(%rsp), %rax
incl %esi
cmpq %rsi, %rcx
ja 0xe3e05
movq 0x98(%rsp), %r14
xorq $0x1, %r14
movq 0x90(%rsp), %r15
xorq $0x1, %r15
movq 0x158(%rsp), %rbx
movq (%rbx), %rcx
cmpq 0x8(%rbx), %rcx
jne 0xe43cc
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
movl $0x2, %esi
cmovneq %rax, %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x10(%rbx)
movq (%rbx), %rcx
jmp 0xe43d0
movq 0x10(%rbx), %rax
shlq $0x20, %r14
orq %r15, %r14
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movq %r14, (%rax,%rcx,8)
movl $0x1, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq