// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: iter_contain_g(R_to_U*, flex_asg_t*, unsigned int, asg64_v*, asg64_v*, float, unsigned int)
uint32_t iter_contain_g(R_to_U* rI, flex_asg_t *fg, uint32_t v0, asg64_v *b, asg64_v *st, float ou_rat, uint32_t only_trans_nn)
{
    uint32_t v, w = (uint32_t)-1, x, i, kv, kw, ulen, cnt = 0, st_n, m, is_purge; 
    asg_arc_t *s; flex_asg_e_retrive_t rr;
    b->n = st->n = ulen = 0; kv_push(uint64_t, *st, v0);
    while (st->n) {
        v = kv_pop(*st); kv = kw = (uint32_t)-1; ulen = 0;
        if(fg->g->seq_vis[v>>1]) continue;
        while ((!(fg->g->seq_vis[v>>1])) && (is_contain_r((*rI), (v>>1)))) {///push a unitig
            kv = get_flex_arcs(fg, v, &w, 1); ulen++;
            kv_push(uint64_t, *b, v); 
            if(kv == 1) {
                flex_arcs0(s, (*fg), w);
                w = s->v;
                kw = get_flex_arcs(fg, w^1, NULL, 0);
                if(kw == 1) v = w;
                else break;
            } else {
                break;
            }
        }
        // if((v0>>1) == 12321 || (v0>>1) == 12334) {
        //     fprintf(stderr, "0[M::%s] v0>>1::%u(%c), b->n::%u, ulen::%u\n", 
        //     __func__, (v0>>1), "+-"[v0&1], (uint32_t)b->n, ulen);
        // }   
        if((!ulen) || (fg->g->seq_vis[v>>1]) || (!(is_contain_r((*rI), (v>>1))))) {
            for (i = b->n - ulen; i < b->n; i++) {
                fg->g->seq_vis[b->a[i]>>1] = 1; b->a[i] |= ((uint64_t)0x100000000);
            }
            continue;
        }
        // fprintf(stderr, "1[M::%s] v0>>1::%u(%c), b->n::%u, ulen::%u\n", 
        //     __func__, (v0>>1), "+-"[v0&1], (uint32_t)b->n, ulen);
        
        for (i = 0; i < b->n; i++) {
            if(b->a[i]&(0x100000000)) continue;
            fg->g->seq_vis[b->a[i]>>1] = 2;
        }
        // fprintf(stderr, "2[M::%s] v0>>1::%u(%c), b->n::%u, ulen::%u\n", 
        //     __func__, (v0>>1), "+-"[v0&1], (uint32_t)b->n, ulen);
        for (i = 0, st_n = st->n; i < b->n; i++) {
            if(b->a[i]&(0x100000000)) continue;
            if(detect_tip2(fg, b->a[i]>>1, st, ou_rat)) break;
        }
        if(i >= b->n) is_purge = 1;
        else is_purge = 0;
        // fprintf(stderr, "3[M::%s] v0>>1::%u(%c), b->n::%u, ulen::%u\n", 
        //     __func__, (v0>>1), "+-"[v0&1], (uint32_t)b->n, ulen);
        for (i = m = st_n; i < st->n; i++) {
            if(fg->g->seq_vis[st->a[i]]&128) fg->g->seq_vis[st->a[i]] -= 128;
            ///append edges to all nodes, instead of non-contained only
            // if(is_contain_r((*rI), (st->a[i]>>1))) continue;
            st->a[m++] = st->a[i];
        }
        st->n = m;
        // if((v0>>1) == 12321 || (v0>>1) == 12334) {
        //     fprintf(stderr, "4[M::%s] v0>>1::%u(%c), b->n::%u, i::%u\n", 
        //         __func__, (v0>>1), "+-"[v0&1], (uint32_t)b->n, i);
        // }
        if(is_purge && only_trans_nn) {
            is_purge = append_trans_check(fg, st->a + st_n, st->n-st_n);
        }
        
        if(is_purge) {
            for (i = 0; i < b->n; i++) {
                x = ((uint32_t)b->a[i])>>1;
                // if((v0>>1) == 12321 || (v0>>1) == 12334) {
                //     fprintf(stderr, "del::[M::%s] x::%u, seq_vis::%u\n", __func__, x, fg->g->seq_vis[x]);
                // }
                if(fg->g->seq_vis[x]&2) {
                    asg_seq_del(fg->g, x); cnt++;
                }
                fg->g->seq_vis[x] = 0;
            }
            append_notrans_e(fg, st->a + st_n, st->n-st_n, b);
            st->n = st_n;
            return cnt;
        }
        for (i = 0; i < b->n; i++) {
            if(b->a[i]&(0x100000000)) continue;
            fg->g->seq_vis[b->a[i]>>1] = 1;
        }
        st->n = st_n;

        rr.i[0] = 0; rr.i[1] = (uint32_t)-1;
        while(1) {
            s = iter_flex_asg(fg, &rr, v);
            if(!s) break;
            if(s->del) continue;
            if(fg->g->seq_vis[s->v>>1]) continue;
            if(!is_contain_r((*rI), (s->v>>1))) continue;
            kv_push(uint64_t, *st, s->v); 
        }
    }
    for (i = 0; i < b->n; i++) fg->g->seq_vis[((uint32_t)b->a[i])>>1] = 0;
    return cnt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movss %xmm0, -0x34(%rbp)
movl %r9d, -0x38(%rbp)
movl $0xffffffff, -0x40(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x58(%rbp)
movl $0x0, -0x54(%rbp)
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x31a80a
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x31a7cf
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x80(%rbp)
jmp 0x31a7da
movl $0x2, %eax
movq %rax, -0x80(%rbp)
jmp 0x31a7da
movq -0x80(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x1c(%rbp), %eax
movl %eax, %edx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x31a82e
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x31afa5
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $-0x1, %rsi
movq %rsi, (%rdx)
movq -0x8(%rax,%rcx,8), %rax
movl %eax, -0x3c(%rbp)
movl $0xffffffff, -0x50(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x4c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x54(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x30(%rax), %rax
movl -0x3c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
cmpb $0x0, (%rax,%rcx)
je 0x31a88d
jmp 0x31a82e
jmp 0x31a88f
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x30(%rax), %rcx
movl -0x3c(%rbp), %eax
shrl %eax
movl %eax, %eax
movl %eax, %edx
xorl %eax, %eax
cmpb $0x0, (%rcx,%rdx)
movb %al, -0x81(%rbp)
jne 0x31a91a
movl -0x3c(%rbp), %eax
shrl %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0x82(%rbp)
jae 0x31a90e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movl -0x3c(%rbp), %eax
shrl %eax
movl %eax, %eax
movl %eax, %edx
xorl %eax, %eax
cmpl $-0x1, (%rcx,%rdx,4)
movb %al, -0x82(%rbp)
je 0x31a90e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x3c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x82(%rbp)
movb -0x82(%rbp), %al
movb %al, -0x81(%rbp)
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x31a929
jmp 0x31aa7a
movq -0x18(%rbp), %rdi
movl -0x3c(%rbp), %esi
leaq -0x40(%rbp), %rdx
movl $0x1, %ecx
callq 0x311c60
movl %eax, -0x4c(%rbp)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x31a9bb
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x31a97a
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x90(%rbp)
jmp 0x31a988
movl $0x2, %eax
movq %rax, -0x90(%rbp)
jmp 0x31a988
movq -0x90(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x3c(%rbp), %eax
movl %eax, %edx
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
cmpl $0x1, -0x4c(%rbp)
jne 0x31aa73
movl -0x40(%rbp), %eax
andl $0x80000000, %eax       # imm = 0x80000000
cmpl $0x0, %eax
jne 0x31aa13
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
jmp 0x31aa34
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x40(%rbp), %ecx
subl $0x80000000, %ecx       # imm = 0x80000000
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movl -0x40(%rbp), %esi
xorl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x311c60
movl %eax, -0x50(%rbp)
cmpl $0x1, -0x50(%rbp)
jne 0x31aa6f
movl -0x40(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x31aa71
jmp 0x31aa7a
jmp 0x31aa75
jmp 0x31aa7a
jmp 0x31a88f
cmpl $0x0, -0x54(%rbp)
je 0x31aad8
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x30(%rax), %rax
movl -0x3c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
cmpb $0x0, (%rax,%rcx)
jne 0x31aad8
movl -0x3c(%rbp), %eax
shrl %eax
movl %eax, %eax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x31aad8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x3c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
cmpl $-0x1, (%rax,%rcx,4)
je 0x31aad8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x3c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x31ab43
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x54(%rbp), %ecx
subq %rcx, %rax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x31ab3e
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x48(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq %rcx
movb $0x1, (%rax,%rcx)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x48(%rbp), %ecx
movabsq $0x100000000, %rdx      # imm = 0x100000000
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x31aae8
jmp 0x31a82e
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x31aba6
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
movl -0x48(%rbp), %eax
movl %eax, %edx
movabsq $0x100000000, %rax      # imm = 0x100000000
andq (%rcx,%rdx,8), %rax
cmpq $0x0, %rax
je 0x31ab79
jmp 0x31ab9b
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x48(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq %rcx
movb $0x2, (%rax,%rcx)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x31ab4a
movl $0x0, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x5c(%rbp)
movl -0x48(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x31ac20
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
movl -0x48(%rbp), %eax
movl %eax, %edx
movabsq $0x100000000, %rax      # imm = 0x100000000
andq (%rcx,%rdx,8), %rax
cmpq $0x0, %rax
je 0x31abe6
jmp 0x31ac15
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x48(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq %rax
movl %eax, %esi
movq -0x30(%rbp), %rdx
movss -0x34(%rbp), %xmm0
callq 0x3191d0
cmpl $0x0, %eax
je 0x31ac13
jmp 0x31ac20
jmp 0x31ac15
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x31abb7
movl -0x48(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jb 0x31ac35
movl $0x1, -0x64(%rbp)
jmp 0x31ac3c
movl $0x0, -0x64(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x60(%rbp)
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x31acdc
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x30(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x48(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movzbl (%rax,%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x31aca6
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x30(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x48(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movzbl (%rax,%rcx), %edx
subl $0x80, %edx
movb %dl, (%rax,%rcx)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x48(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x60(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x60(%rbp)
movl %ecx, %ecx
movq %rdx, (%rax,%rcx,8)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x31ac45
movl -0x60(%rbp), %eax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
cmpl $0x0, -0x64(%rbp)
je 0x31ad1f
cmpl $0x0, -0x38(%rbp)
je 0x31ad1f
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rsi
movl -0x5c(%rbp), %eax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x30(%rbp), %rax
movq (%rax), %rdx
movl -0x5c(%rbp), %eax
subq %rax, %rdx
callq 0x31a390
movl %eax, -0x64(%rbp)
cmpl $0x0, -0x64(%rbp)
je 0x31ade5
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x31ada2
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x48(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrl %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x30(%rax), %rax
movl -0x44(%rbp), %ecx
movzbl (%rax,%rcx), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x31ad84
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdi
movl -0x44(%rbp), %esi
callq 0x312c50
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x30(%rax), %rax
movl -0x44(%rbp), %ecx
movb $0x0, (%rax,%rcx)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x31ad30
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rsi
movl -0x5c(%rbp), %eax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x30(%rbp), %rax
movq (%rax), %rdx
movl -0x5c(%rbp), %eax
subq %rax, %rdx
movq -0x28(%rbp), %rcx
callq 0x319cb0
movl -0x5c(%rbp), %eax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0x58(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x31afec
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x31ae48
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
movl -0x48(%rbp), %eax
movl %eax, %edx
movabsq $0x100000000, %rax      # imm = 0x100000000
andq (%rcx,%rdx,8), %rax
cmpq $0x0, %rax
je 0x31ae1b
jmp 0x31ae3d
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x48(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq %rcx
movb $0x1, (%rax,%rcx)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x31adec
movl -0x5c(%rbp), %eax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x78(%rbp)
movl $0xffffffff, -0x74(%rbp) # imm = 0xFFFFFFFF
movq -0x18(%rbp), %rdi
movl -0x3c(%rbp), %edx
leaq -0x78(%rbp), %rsi
callq 0x3190c0
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0x31ae82
jmp 0x31afa0
movq -0x70(%rbp), %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x31ae93
jmp 0x31ae62
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x30(%rax), %rax
movq -0x70(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrl %ecx
movl %ecx, %ecx
cmpb $0x0, (%rax,%rcx)
je 0x31aeb2
jmp 0x31ae62
movq -0x70(%rbp), %rax
movl 0x8(%rax), %eax
shrl %eax
movl %eax, %eax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x31aefd
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x70(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrl %ecx
movl %ecx, %ecx
cmpl $-0x1, (%rax,%rcx,4)
je 0x31aefd
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x70(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x31af02
jmp 0x31ae62
jmp 0x31af04
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x31af75
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x31af34
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xa0(%rbp)
jmp 0x31af42
movl $0x2, %eax
movq %rax, -0xa0(%rbp)
jmp 0x31af42
movq -0xa0(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x70(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %edx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x31ae62
jmp 0x31a82e
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x31afe6
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x48(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrl %ecx
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x31afac
movl -0x58(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)