// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: asg_arc_cut_chimeric_cmk(asg_t*, asg64_v*, int, float, float, unsigned int, unsigned int, unsigned int, unsigned int, unsigned char*, unsigned int)
void asg_arc_cut_chimeric_cmk(asg_t *g, asg64_v *in, int32_t max_ext, float len_rat, float ou_rat, uint32_t is_ou, uint32_t is_topo, uint32_t min_ou, uint32_t test_bub, uint8_t *cmk, uint32_t cmk_cut)
{
    asg64_v tx = {0,0,0}, *b = NULL; asg_arc_t *av, *aw, *ve, *we; 
    uint32_t i, k, v, w, n_vtx = g->n_seq<<1, nv, nw, kv, kw, ol_max, ou_max, to_del, cnt = 0, mm_ol, mm_ou;
    
    if(in) b = in;
    else b = &tx;
	b->n = 0;

    for (v = 0; v < n_vtx; ++v) {
        // if((v>>1)==17078) fprintf(stderr, "[M::%s::] v:%u, del:%u, seq_vis:%u\n", __func__, v, g->seq[v>>1].del, g->seq_vis[v]);
        if (g->seq[v>>1].del) continue;
        if (cmk[v>>1] > cmk_cut) continue;
        if((test_bub == 0) || (g->seq_vis[v] == 0)) {
            av = asg_arc_a(g, v); nv = asg_arc_n(g, v);
            if (nv < 2) continue;

            for (i = kv = 0; i < nv; ++i) {
                if(av[i].del) continue;
                kv++;
            }
            if(kv < 2) continue;

            for (i = 0; i < nv; ++i) {
                if(av[i].del) continue;
                kv_push(uint64_t, *b, (((uint64_t)av[i].ol)<<32) | ((uint64_t)(av-g->arc+i)));
            }
        }
	}

    radix_sort_srt64(b->a, b->a + b->n);
    for (k = 0; k < b->n; k++) {
        if(g->arc[(uint32_t)b->a[k]].del) continue;

        v = g->arc[(uint32_t)b->a[k]].ul>>32; w = g->arc[(uint32_t)b->a[k]].v^1;
        if(g->seq[v>>1].del || g->seq[w>>1].del) continue;
        nv = asg_arc_n(g, v); nw = asg_arc_n(g, w);
        av = asg_arc_a(g, v); aw = asg_arc_a(g, w);
        if(nv<=1 && nw <= 1) continue;

        ve = &(g->arc[(uint32_t)b->a[k]]);
        for (i = 0; i < nw; ++i) {
            if (aw[i].v == (v^1)) {
                we = &(aw[i]);
                break;
            }
        }
        ///mm_ol and mm_ou are used to make edge with long indel more easy to be cutted
        mm_ol = MIN(ve->ol, we->ol); mm_ou = MIN(ve->ou, we->ou);

        for (i = kv = ol_max = ou_max = 0; i < nv; ++i) {
            if(av[i].del) continue;
            kv++;
            
            if(ol_max < av[i].ol) ol_max = av[i].ol;
            if(ou_max < av[i].ou) ou_max = av[i].ou;
        }
        if (kv < 1) continue;
        if (kv >= 2) {
            if (mm_ol > ol_max*len_rat) continue;
            if (is_ou && mm_ou > ou_max*ou_rat && mm_ou > min_ou) continue;
        }
        

        for (i = kw = ol_max = ou_max = 0; i < nw; ++i) {
            if(aw[i].del) continue;
            kw++;

            if(ol_max < aw[i].ol) ol_max = aw[i].ol;
            if(ou_max < aw[i].ou) ou_max = aw[i].ou;
        }
        if (kw < 1) continue;
        if (kw >= 2) {
            if (mm_ol > ol_max*len_rat) continue;
            if (is_ou && mm_ou > ou_max*ou_rat && mm_ou > min_ou) continue;
        }

        if (kv <= 1 && kw <= 1) continue;

        to_del = 0;
        if(is_topo) {
            if (kv > 1 && kw > 1) {
                to_del = 1;
            } else if (kw == 1) {
                if (asg_topocut_aux(g, w^1, max_ext) < max_ext) to_del = 1;
            } else if (kv == 1) {
                if (asg_topocut_aux(g, v^1, max_ext + 1) < max_ext + 1) to_del = 1;
            }
        }

        if (to_del) {
            asg_seq_del(g, v>>1); ++cnt;
        }
    }
    // stats_sysm(g);
    if(!in) free(tx.a);
    if (cnt > 0) asg_cleanup(g);

    // fprintf(stderr, "[M::%s::] cnt:%u\n", __func__, cnt);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movl 0x20(%rbp), %eax
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movss %xmm0, -0x18(%rbp)
movss %xmm1, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x2100
movq $0x0, -0x48(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movl %eax, -0x7c(%rbp)
movl $0x0, -0x9c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x317999
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x3179a1
leaq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jae 0x317be3
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x74(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x3179de
jmp 0x317bd5
movq 0x18(%rbp), %rax
movl -0x74(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
cmpl 0x20(%rbp), %eax
jbe 0x3179f7
jmp 0x317bd5
cmpl $0x0, 0x10(%rbp)
je 0x317a15
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x74(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x317bd3
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x74(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x74(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x80(%rbp)
cmpl $0x2, -0x80(%rbp)
jae 0x317a58
jmp 0x317bd5
movl $0x0, -0x88(%rbp)
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x80(%rbp), %eax
jae 0x317aa6
movq -0x50(%rbp), %rax
movl -0x6c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x317a8c
jmp 0x317a9b
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x317a69
cmpl $0x2, -0x88(%rbp)
jae 0x317ab4
jmp 0x317bd5
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x80(%rbp), %eax
jae 0x317bd1
movq -0x50(%rbp), %rax
movl -0x6c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x317ae5
jmp 0x317bc3
jmp 0x317ae7
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq -0x48(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x317b58
movq -0x48(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x317b17
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xb0(%rbp)
jmp 0x317b25
movl $0x2, %eax
movq %rax, -0xb0(%rbp)
jmp 0x317b25
movq -0xb0(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x50(%rbp), %rax
movl -0x6c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
shlq $0x20, %rax
movq %rax, -0xb8(%rbp)
movq -0x50(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rcx, %rax
movl $0x18, %ecx
cqto
idivq %rcx
movq -0xb8(%rbp), %rdx
movl -0x6c(%rbp), %ecx
addq %rcx, %rax
orq %rax, %rdx
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x48(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x317bc3
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x317abb
jmp 0x317bd3
jmp 0x317bd5
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x3179b3
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x48(%rbp), %rax
movq (%rax), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x30ed90
movl $0x0, -0x70(%rbp)
movl -0x70(%rbp), %eax
movq -0x48(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x318228
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x70(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x317c4d
jmp 0x31821a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x70(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0x74(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x70(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
xorl $0x1, %eax
movl %eax, -0x78(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x74(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x317cd4
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x78(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x317cd9
jmp 0x31821a
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x74(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x80(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x78(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x84(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x74(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x78(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
cmpl $0x1, -0x80(%rbp)
ja 0x317d60
cmpl $0x1, -0x84(%rbp)
ja 0x317d60
jmp 0x31821a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x70(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x84(%rbp), %eax
jae 0x317dd2
movq -0x58(%rbp), %rax
movl -0x6c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl -0x74(%rbp), %ecx
xorl $0x1, %ecx
cmpl %ecx, %eax
jne 0x317dc5
movq -0x58(%rbp), %rax
movl -0x6c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
jmp 0x317dd2
jmp 0x317dc7
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x317d8b
movq -0x60(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x68(%rbp), %rcx
movl 0xc(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jg 0x317e03
movq -0x60(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0xbc(%rbp)
jmp 0x317e15
movq -0x68(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
movl %eax, -0xa0(%rbp)
movq -0x60(%rbp), %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movzwl %ax, %eax
movq -0x68(%rbp), %rcx
movw 0x10(%rcx), %cx
andw $0x3fff, %cx            # imm = 0x3FFF
movzwl %cx, %ecx
cmpl %ecx, %eax
jg 0x317e59
movq -0x60(%rbp), %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movw %ax, -0xbe(%rbp)
jmp 0x317e6c
movq -0x68(%rbp), %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movw %ax, -0xbe(%rbp)
movw -0xbe(%rbp), %ax
movzwl %ax, %eax
movl %eax, -0xa4(%rbp)
movl $0x0, -0x94(%rbp)
movl $0x0, -0x90(%rbp)
movl $0x0, -0x88(%rbp)
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x80(%rbp), %eax
jae 0x317f6a
movq -0x50(%rbp), %rax
movl -0x6c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x317ecb
jmp 0x317f5c
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
movl -0x90(%rbp), %eax
movq -0x50(%rbp), %rcx
movl -0x6c(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x317f17
movq -0x50(%rbp), %rax
movl -0x6c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x90(%rbp)
movl -0x94(%rbp), %eax
movq -0x50(%rbp), %rcx
movl -0x6c(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movw 0x10(%rcx), %cx
andw $0x3fff, %cx            # imm = 0x3FFF
movzwl %cx, %ecx
cmpl %ecx, %eax
jae 0x317f5a
movq -0x50(%rbp), %rax
movl -0x6c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movzwl %ax, %eax
movl %eax, -0x94(%rbp)
jmp 0x317f5c
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x317ea1
cmpl $0x1, -0x88(%rbp)
jae 0x317f78
jmp 0x31821a
cmpl $0x2, -0x88(%rbp)
jb 0x317fde
movl -0xa0(%rbp), %eax
cvtsi2ss %rax, %xmm0
movl -0x90(%rbp), %eax
cvtsi2ss %rax, %xmm1
mulss -0x18(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x317fa6
jmp 0x31821a
cmpl $0x0, -0x20(%rbp)
je 0x317fdc
movl -0xa4(%rbp), %eax
cvtsi2ss %rax, %xmm0
movl -0x94(%rbp), %eax
cvtsi2ss %rax, %xmm1
mulss -0x1c(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x317fdc
movl -0xa4(%rbp), %eax
cmpl -0x28(%rbp), %eax
jbe 0x317fdc
jmp 0x31821a
jmp 0x317fde
movl $0x0, -0x94(%rbp)
movl $0x0, -0x90(%rbp)
movl $0x0, -0x8c(%rbp)
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x84(%rbp), %eax
jae 0x3180cf
movq -0x58(%rbp), %rax
movl -0x6c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x318030
jmp 0x3180c1
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
movl -0x90(%rbp), %eax
movq -0x58(%rbp), %rcx
movl -0x6c(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x31807c
movq -0x58(%rbp), %rax
movl -0x6c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x90(%rbp)
movl -0x94(%rbp), %eax
movq -0x58(%rbp), %rcx
movl -0x6c(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movw 0x10(%rcx), %cx
andw $0x3fff, %cx            # imm = 0x3FFF
movzwl %cx, %ecx
cmpl %ecx, %eax
jae 0x3180bf
movq -0x58(%rbp), %rax
movl -0x6c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movzwl %ax, %eax
movl %eax, -0x94(%rbp)
jmp 0x3180c1
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x318003
cmpl $0x1, -0x8c(%rbp)
jae 0x3180dd
jmp 0x31821a
cmpl $0x2, -0x8c(%rbp)
jb 0x318143
movl -0xa0(%rbp), %eax
cvtsi2ss %rax, %xmm0
movl -0x90(%rbp), %eax
cvtsi2ss %rax, %xmm1
mulss -0x18(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x31810b
jmp 0x31821a
cmpl $0x0, -0x20(%rbp)
je 0x318141
movl -0xa4(%rbp), %eax
cvtsi2ss %rax, %xmm0
movl -0x94(%rbp), %eax
cvtsi2ss %rax, %xmm1
mulss -0x1c(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x318141
movl -0xa4(%rbp), %eax
cmpl -0x28(%rbp), %eax
jbe 0x318141
jmp 0x31821a
jmp 0x318143
cmpl $0x1, -0x88(%rbp)
ja 0x31815a
cmpl $0x1, -0x8c(%rbp)
ja 0x31815a
jmp 0x31821a
movl $0x0, -0x98(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x3181f2
cmpl $0x1, -0x88(%rbp)
jbe 0x31818c
cmpl $0x1, -0x8c(%rbp)
jbe 0x31818c
movl $0x1, -0x98(%rbp)
jmp 0x3181f0
cmpl $0x1, -0x8c(%rbp)
jne 0x3181b8
movq -0x8(%rbp), %rdi
movl -0x78(%rbp), %esi
xorl $0x1, %esi
movl -0x14(%rbp), %edx
callq 0xdd220
cmpl -0x14(%rbp), %eax
jge 0x3181b6
movl $0x1, -0x98(%rbp)
jmp 0x3181ee
cmpl $0x1, -0x88(%rbp)
jne 0x3181ec
movq -0x8(%rbp), %rdi
movl -0x74(%rbp), %esi
xorl $0x1, %esi
movl -0x14(%rbp), %edx
addl $0x1, %edx
callq 0xdd220
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x3181ea
movl $0x1, -0x98(%rbp)
jmp 0x3181ec
jmp 0x3181ee
jmp 0x3181f0
jmp 0x3181f2
cmpl $0x0, -0x98(%rbp)
je 0x318218
movq -0x8(%rbp), %rdi
movl -0x74(%rbp), %esi
shrl %esi
callq 0x312c50
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x31821a
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x317c0d
cmpq $0x0, -0x10(%rbp)
jne 0x318238
movq -0x30(%rbp), %rdi
callq 0x2210
cmpl $0x0, -0x9c(%rbp)
jbe 0x31824a
movq -0x8(%rbp), %rdi
callq 0xcdd10
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)