// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: update_integer_seq(ul_resolve_t*, integer_t*, unsigned int, unsigned long*, unsigned long, unsigned int)
void update_integer_seq(ul_resolve_t *uidx, integer_t *buf, uint32_t id, uint64_t *seq, uint64_t seq_n, uint32_t tid)
{
    // if((((uint32_t)-1) - uidx->idx->a[id].rlen) < asm_opt.thread_num) {
    //     fprintf(stderr, "id->%u, c_tid->%u, l_tid->%u\n", id, tid, (((uint32_t)-1) - uidx->idx->a[id].rlen));
    //     exit(0);
    // }
    // assert(uidx->idx->a[id].rlen!=(uint32_t)-1);
    // fprintf(stderr, "dd->%u\n", uidx->idx->a[id].dd);
    // if(id != 1487) return;
    if(seq_n <= 0) return;
    buf->n_correct++;
    ul_str_t *str = &(uidx->pstr.str.a[id]); uc_block_t *z; ul_chain_t sc, msc;
    uint64_t k, i, pp; integer_aln_t *b; ma_ug_t *ug = uidx->l1_ug;
    assert((seq[0]>>32) == (ug->g->seq[((uint32_t)seq[0])>>1].len));
    // fprintf(stderr, "\n[M::%s::id->%u] seq_n::%lu\n", __func__, id, seq_n);
    // print_primary_ul_chain(str, &(uidx->idx->a[id]), ug);
    if(seq_n == 1) {
        pp = ug->g->seq[((uint32_t)seq[0])>>1].len;
        push_integer_seq_exact(&(uidx->idx->a[id]), ug, seq, seq_n, &pp, tid);
        return;
    }
    
    buf->u.n = 0;
    for (k = 0; k < str->cn; k++) {///old seq
        pp = ((uint32_t)str->a[k])>>1; pp <<= 33; pp += ((uint64_t)(0x100000000));
        pp += (k<<1); pp += ((uint32_t)str->a[k])&1;
        kv_push(uint64_t, buf->u, pp);
        // fprintf(stderr, "ok::%lu, ov::%u\n", k, ((uint32_t)str->a[k]));
    }
    for (k = 0; k < seq_n; k++) {///new seq
        pp = ((uint32_t)seq[k])>>1; pp <<= 33; 
        pp += (k<<1); pp += ((uint32_t)seq[k])&1;
        kv_push(uint64_t, buf->u, pp);
        // fprintf(stderr, "nk::%lu, nv::%u\n", k, ((uint32_t)seq[k]));

        // fprintf(stderr, ">>>>>>[M::%s::c_k->%lu] utg%.6d%c(%c::len->%u)\n", __func__, k,
        //             (((uint32_t)seq[k])>>1)+1, "lc"[ug->u.a[(((uint32_t)seq[k])>>1)].circ], 
        //             "+-"[((uint32_t)seq[k])&1], ug->u.a[(((uint32_t)seq[k])>>1)].len);
    }

    radix_sort_srt64(buf->u.a, buf->u.a + buf->u.n);
    for (k = 0, buf->b.n = 0; k < buf->u.n; k++) {
        if(buf->u.a[k]&((uint64_t)(0x100000000))) continue;///skip nodes in the old seq
        for (i = k+1; (i < buf->u.n) && ((buf->u.a[k]>>33) == (buf->u.a[i]>>33)); i++) {
            if((buf->u.a[i]&((uint64_t)(0x100000000))) == 0) continue;///skip nodes in the new seq
            if((buf->u.a[k]&1) != (buf->u.a[i]&1)) continue;///ignore reverse alignment;
            ///a[k] is the new seq (q); a[i] is old seq (t)
            kv_pushp(integer_aln_t, buf->b, &b);
            b->vq = ((buf->u.a[k]>>33)<<1) + (buf->u.a[k]&1);
            b->tn_rev_qk = ((uint32_t)buf->u.a[k])>>1;
            b->tk = ((uint32_t)buf->u.a[i])>>1; 
            z = &(uidx->idx->a[id].bb.a[str->a[b->tk]>>32]);
            assert(((z->hid<<1)+z->rev)==(((buf->u.a[i]>>33)<<1) + (buf->u.a[i]&1)));
            if((buf->u.a[k]&1) != (buf->u.a[i]&1)) {
                b->tk = str->cn - b->tk - 1;
                b->tn_rev_qk |= ((uint64_t)(0x100000000));
            }            
            b->sc = ug_occ_w(z->ts, z->te, &(ug->u.a[z->hid]));
            assert(b->sc > 0);
        }
    }

    msc.v = msc.s = msc.e = (uint32_t)-1; msc.sc = 0;
    if(buf->b.n > 0) {
        radix_sort_integer_aln_t_srt(buf->b.a, buf->b.a + buf->b.n); ///sorted by rev|qk
        for (k = 1, i = 0; k <= buf->b.n; k++) {
            // fprintf(stderr, "[M::%s::z->%lu] rev::%u, qk::%u, tk::%u\n", 
            // __func__, k-1, (uint32_t)(!!(buf->b.a[k-1].tn_rev_qk>>32)), (uint32_t)buf->b.a[k-1].tn_rev_qk, buf->b.a[k-1].tk);
            if(k == buf->b.n || (buf->b.a[i].tn_rev_qk>>32) != (buf->b.a[k].tn_rev_qk>>32)) {
                if(integer_chain(id, buf->b.a + i, k - i, i, buf, ug, NULL, NULL, &sc) && sc.v != (uint32_t)-1) {
                    if(msc.s == (uint32_t)-1 || msc.sc < sc.sc) msc = sc;
                }
                i = k;
            }
        }
    }
    // fprintf(stderr, "[M::%s::id->%u] seq_n::%lu, align_n::%u, buf->b.n::%u\n", 
    // __func__, id, seq_n, msc.e - msc.s, (uint32_t)buf->b.n);

    
    uint64_t l, v, pd, uls, ule, p_ls, p_le, is_rev, qk, tk, bc; integer_aln_t *x; uc_block_t *tb;
    buf->u.n = 0; kv_resize(uint64_t, buf->u, seq_n); 
    // assert((seq[0]>>32) == (ug->g->seq[((uint32_t)seq[0])>>1].len));
    for (k = l = 0, p_ls = p_le = (uint64_t)-1; k < seq_n; k++) {
        v = (uint32_t)seq[k]; pd = (seq[k]<<1)>>33;
        ule = l + pd; uls = ((ule >= ug->g->seq[v>>1].len)?(ule - ug->g->seq[v>>1].len):(0));
        bc = 0;
        if(k > 0){
            bc = (!!(seq[k]&((uint64_t)(0x8000000000000000))));///if connected in the graph
            if(bc) bc = double_check_gconnect(ug->g, ((uint32_t)seq[k])^1, ((uint32_t)seq[k-1])^1, pd);
            // fprintf(stderr, "bc->%lu\n", bc);
        }
        if(p_ls != (uint64_t)-1) {
            ///uls should uls>=p_ls && uls<=p_le
            if(uls < p_ls) uls = p_ls;
            if(bc && uls > p_le) uls = p_le;
            ///ule should ule > p_le
            if(ule <= p_le) ule = p_le + 1;
        }
        buf->u.a[k] = uls; buf->u.a[k] <<= 32; buf->u.a[k] |= ule;
        p_ls = uls; p_le = ule;
        l = ule;
        // fprintf(stderr, "[init_k->%lu] uls::%lu, ule::%lu, pd::%lu\n", k, uls, ule, pd);
    }
    buf->u.n = seq_n;

    int64_t beg_nl, end_nl; ma_utg_t *u;
    v = (uint32_t)seq[0]; u = &(ug->u.a[v>>1]); beg_nl = u->len;
    v = (uint32_t)seq[seq_n-1]; u = &(ug->u.a[v>>1]); end_nl = u->len;
    // fprintf(stderr, "+[M::%s] beg_nl::%lu, end_nl::%lu\n", __func__, beg_nl, end_nl);

    ///q -> new seq; t -> old seq
    if(msc.s != (uint32_t)-1 && msc.e > msc.s) {
        int64_t qoff, toff, beg_cut = 0, end_cut = 0; uint32_t r_end;
        is_rev = ((buf->b.a[msc.s].tn_rev_qk>>32)&1);

        ///beg
        x = &(buf->b.a[msc.s]); 
        qk = (uint32_t)(x->tn_rev_qk); tk = ((is_rev == 0)? (x->tk):(str->cn - x->tk - 1));
        tb = &(uidx->idx->a[id].bb.a[str->a[tk]>>32]);
        if((!!tb->rev) == (!!is_rev)) {
            if(tb->te == ug->u.a[tb->hid].len) r_end = 1;
            else r_end = 0;
        } else {
            if(tb->ts == 0) r_end = 1;
            else r_end = 0;
        }
        if(r_end) {///start from right end
            qoff = (uint32_t)buf->u.a[qk]; toff = (is_rev?(uidx->idx->a[id].rlen-tb->qs):(tb->qe));
        } else {///start from left end
            qoff = buf->u.a[qk]>>32; toff = (is_rev?(uidx->idx->a[id].rlen-tb->qe):(tb->qs));
        }
        
        if(qk == 0) toff = tb->te - tb->ts;
        if(toff < qoff) beg_cut = qoff - toff;
        // fprintf(stderr, "[M::%s::beg::is_rev->%lu] qoff::%ld, toff::%ld, r_end::%u\n", __func__, is_rev, qoff, toff, r_end);
        

        ///end
        x = &(buf->b.a[msc.e-1]);
        qk = (uint32_t)(x->tn_rev_qk); tk = ((is_rev == 0)? (x->tk):(str->cn - x->tk - 1));
        tb = &(uidx->idx->a[id].bb.a[str->a[tk]>>32]);
        if((!!tb->rev) == (!!is_rev)) {
            if(tb->ts == 0) r_end = 0;
            else r_end = 1;
        } else {
            if(tb->te == ug->u.a[tb->hid].len) r_end = 0;
            else r_end = 1;
        }
        if(!r_end) {
            qoff = l - (buf->u.a[qk]>>32); toff = (is_rev?(tb->qe):(uidx->idx->a[id].rlen-tb->qs));
        } else {
            qoff = l - (uint32_t)(buf->u.a[qk]); toff = (is_rev?(tb->qs):(uidx->idx->a[id].rlen-tb->qe));
        }
        if(qk+1==seq_n) toff = tb->te - tb->ts;
        if(toff < qoff) end_cut = qoff - toff;
        // fprintf(stderr, "[M::%s::end::is_rev->%lu] qoff::%ld, toff::%ld, r_end::%u\n", __func__, is_rev, qoff, toff, r_end);

        if(beg_cut > 0) {
            v = (uint32_t)seq[0]; u = &(ug->u.a[v>>1]);
            if(beg_cut < u->len) beg_cut = u->len - beg_cut;
            else beg_cut = 0;
            if(v&1) { 
                beg_nl = (int64_t)(Get_READ_LENGTH(R_INF, (u->a[0]>>33)));
            } else {
                beg_nl = (int64_t)(Get_READ_LENGTH(R_INF, (u->a[u->n-1]>>33)));
            }
            if(beg_cut > beg_nl) beg_nl = beg_cut;
            if(beg_nl == u->len) beg_cut = 0;
            else beg_cut = 1;
        }

        
        if(end_cut > 0) {
            v = (uint32_t)seq[seq_n-1]; u = &(ug->u.a[v>>1]);
            if(end_cut < u->len) end_cut = u->len - end_cut;
            else end_cut = 0;
            if(v&1) { 
                end_nl = Get_READ_LENGTH(R_INF, (u->a[u->n-1]>>33));
            } else {
                end_nl = Get_READ_LENGTH(R_INF, (u->a[0]>>33));
            }
            if(end_cut > end_nl) end_nl = end_cut;
            if(end_nl == u->len) end_cut = 0;
            else end_cut = 1;
        }
        // fprintf(stderr, "++[M::%s] beg_nl::%lu, end_nl::%lu\n", __func__, beg_nl, end_nl);
        if(beg_cut || end_cut) {
            k = 0; uls = 0; ule = beg_nl; 
            buf->u.a[k] = uls; buf->u.a[k] <<= 32; buf->u.a[k] |= ule;
            l = ule; p_ls = uls; p_le = ule;
            for (k += 1; k + 1 < seq_n; k++) {
                v = (uint32_t)seq[k]; pd = (seq[k]<<1)>>33;
                ule = l + pd; uls = ((ule >= ug->g->seq[v>>1].len)?(ule - ug->g->seq[v>>1].len):(0));
                bc = 0;
                if(k > 0){
                    bc = (!!(seq[k]&((uint64_t)(0x8000000000000000))));///if connected in the graph
                    if(bc) bc = double_check_gconnect(ug->g, ((uint32_t)seq[k])^1, ((uint32_t)seq[k-1])^1, pd);
                    // fprintf(stderr, "bc->%lu\n", bc);
                }
                if(p_ls != (uint64_t)-1) {
                    ///uls should uls>=p_ls && uls<=p_le
                    if(uls < p_ls) uls = p_ls;
                    if(bc && uls > p_le) uls = p_le;
                    ///ule should ule > p_le
                    if(ule <= p_le) ule = p_le + 1;
                }
                buf->u.a[k] = uls; buf->u.a[k] <<= 32; buf->u.a[k] |= ule;
                p_ls = uls; p_le = ule;
                l = ule;
            }

            assert(k < seq_n);
            v = (uint32_t)seq[k]; pd = (seq[k]<<1)>>33;
            ule = l + pd; uls = ((ule >= ug->g->seq[v>>1].len)?(ule - ug->g->seq[v>>1].len):(0));
            ule = uls + end_nl;
            bc = 0;
            if(k > 0){
                bc = (!!(seq[k]&((uint64_t)(0x8000000000000000))));///if connected in the graph
                if(bc) bc = double_check_gconnect(ug->g, ((uint32_t)seq[k])^1, ((uint32_t)seq[k-1])^1, pd);
                // fprintf(stderr, "bc->%lu\n", bc);
            }
            if(p_ls != (uint64_t)-1) {
                ///uls should uls>=p_ls && uls<=p_le
                if(uls < p_ls) uls = p_ls;
                if(bc && uls > p_le) uls = p_le;
                ///ule should ule > p_le
                if(ule <= p_le) ule = p_le + 1;
            }
            if(ule - uls < (uint64_t)end_nl) ule = uls + end_nl;
            buf->u.a[k] = uls; buf->u.a[k] <<= 32; buf->u.a[k] |= ule;
            p_ls = uls; p_le = ule;
            l = ule;
        }
    }
    
    push_integer_seq_exact(&(uidx->idx->a[id]), ug, seq, seq_n, buf->u.a, tid);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
cmpq $0x0, -0x28(%rbp)
ja 0x33b1ee
jmp 0x33cf2e
movq -0x10(%rbp), %rax
movq 0x318(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x318(%rax)
movq -0x8(%rbp), %rax
movq 0x1d0(%rax), %rax
movl -0x14(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
shrq $0x20, %rax
movq -0xb8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq -0x20(%rbp), %rdx
movq (%rdx), %rdx
shrl %edx
movl %edx, %edx
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jne 0x33b263
jmp 0x33b282
leaq 0x5d40d(%rip), %rdi     # 0x398677
leaq 0x5af48(%rip), %rsi     # 0x3961b9
movl $0x1cd3, %edx           # imm = 0x1CD3
leaq 0x5d432(%rip), %rcx     # 0x3986af
callq 0x2130
cmpq $0x1, -0x28(%rbp)
jne 0x33b2ee
movq -0xb8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movq %rax, -0xa8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x48(%rax), %rdi
movl -0x14(%rbp), %eax
imulq $0x58, %rax, %rax
addq %rax, %rdi
movq -0xb8(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r9d
leaq -0xa8(%rbp), %r8
callq 0x33abf0
jmp 0x33cf2e
movq -0x10(%rbp), %rax
movq $0x0, 0x90(%rax)
movq $0x0, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq -0x38(%rbp), %rcx
movl 0x18(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x33b47f
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrl %eax
movl %eax, %eax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
shlq $0x21, %rax
movq %rax, -0xa8(%rbp)
movabsq $0x100000000, %rax      # imm = 0x100000000
addq -0xa8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x98(%rbp), %rax
shlq %rax
addq -0xa8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
andl $0x1, %eax
movl %eax, %eax
addq -0xa8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x98(%rcx), %rax
jne 0x33b437
movq -0x10(%rbp), %rax
cmpq $0x0, 0x98(%rax)
je 0x33b3ea
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
shlq %rax
movq %rax, -0x168(%rbp)
jmp 0x33b3f8
movl $0x2, %eax
movq %rax, -0x168(%rbp)
jmp 0x33b3f8
movq -0x168(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0xa8(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x10(%rbp), %rsi
movq 0x90(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x90(%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x33b468
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0x33b308
movq $0x0, -0x98(%rbp)
movq -0x98(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x33b5d3
movq -0x20(%rbp), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrl %eax
movl %eax, %eax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
shlq $0x21, %rax
movq %rax, -0xa8(%rbp)
movq -0x98(%rbp), %rax
shlq %rax
addq -0xa8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x20(%rbp), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
andl $0x1, %eax
movl %eax, %eax
addq -0xa8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x98(%rcx), %rax
jne 0x33b58b
movq -0x10(%rbp), %rax
cmpq $0x0, 0x98(%rax)
je 0x33b53e
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
shlq %rax
movq %rax, -0x170(%rbp)
jmp 0x33b54c
movl $0x2, %eax
movq %rax, -0x170(%rbp)
jmp 0x33b54c
movq -0x170(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0xa8(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x10(%rbp), %rsi
movq 0x90(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x90(%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x33b5bc
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0x33b48a
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x30ed90
movq $0x0, -0x98(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x98(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x90(%rcx), %rax
jae 0x33ba33
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rcx
movq -0x98(%rbp), %rdx
movabsq $0x100000000, %rax      # imm = 0x100000000
andq (%rcx,%rdx,8), %rax
cmpq $0x0, %rax
je 0x33b65a
jmp 0x33ba1c
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rcx
movq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpq 0x90(%rdx), %rcx
movb %al, -0x171(%rbp)
jae 0x33b6c8
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
movq -0x10(%rbp), %rcx
movq 0xa0(%rcx), %rcx
movq -0xa0(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
cmpq %rcx, %rax
sete %al
movb %al, -0x171(%rbp)
movb -0x171(%rbp), %al
testb $0x1, %al
jne 0x33b6d7
jmp 0x33ba1a
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rcx
movq -0xa0(%rbp), %rdx
movabsq $0x100000000, %rax      # imm = 0x100000000
andq (%rcx,%rdx,8), %rax
cmpq $0x0, %rax
jne 0x33b702
jmp 0x33ba03
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
andq $0x1, %rax
movq -0x10(%rbp), %rcx
movq 0xa0(%rcx), %rcx
movq -0xa0(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
andq $0x1, %rcx
cmpq %rcx, %rax
je 0x33b740
jmp 0x33ba03
jmp 0x33b742
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jne 0x33b7b1
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x33b773
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
shlq %rax
movq %rax, -0x180(%rbp)
jmp 0x33b781
movl $0x2, %eax
movq %rax, -0x180(%rbp)
jmp 0x33b781
movq -0x180(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x10(%rbp), %rax
imulq $0x18, 0x38(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rdx
movq 0x30(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x30(%rdx)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
shlq %rax
movq -0x10(%rbp), %rcx
movq 0xa0(%rcx), %rcx
movq -0x98(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
andq $0x1, %rcx
addq %rcx, %rax
movl %eax, %ecx
movq -0xb0(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrl %eax
movl %eax, %eax
movl %eax, %ecx
movq -0xb0(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0xa0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
shrl %ecx
movq -0xb0(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x48(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x58, %rcx, %rcx
addq %rcx, %rax
movq 0x30(%rax), %rax
movq -0x38(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0xb0(%rbp), %rdx
movl (%rdx), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl (%rax), %eax
shll %eax
movq -0x40(%rbp), %rcx
movb 0x20(%rcx), %cl
shrb $0x5, %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
movl %eax, %eax
movq -0x10(%rbp), %rcx
movq 0xa0(%rcx), %rcx
movq -0xa0(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
shlq %rcx
movq -0x10(%rbp), %rdx
movq 0xa0(%rdx), %rdx
movq -0xa0(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
andq $0x1, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jne 0x33b905
jmp 0x33b924
leaq 0x5ce02(%rip), %rdi     # 0x39870e
leaq 0x5a8a6(%rip), %rsi     # 0x3961b9
movl $0x1cfa, %edx           # imm = 0x1CFA
leaq 0x5cd90(%rip), %rcx     # 0x3986af
callq 0x2130
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
andq $0x1, %rax
movq -0x10(%rbp), %rcx
movq 0xa0(%rcx), %rcx
movq -0xa0(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
andq $0x1, %rcx
cmpq %rcx, %rax
je 0x33b998
movq -0x38(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0xb0(%rbp), %rax
subl (%rax), %ecx
subl $0x1, %ecx
movq -0xb0(%rbp), %rax
movl %ecx, (%rax)
movq -0xb0(%rbp), %rax
movabsq $0x100000000, %rcx      # imm = 0x100000000
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, %edi
movq -0x40(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, %esi
movq -0xb8(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x40(%rbp), %rax
movl (%rax), %eax
imulq $0x28, %rax, %rax
addq %rax, %rdx
callq 0x327090
movl %eax, %ecx
movq -0xb0(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0xb0(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jbe 0x33b9e2
jmp 0x33ba01
leaq 0x5cd66(%rip), %rdi     # 0x39874f
leaq 0x5a7c9(%rip), %rsi     # 0x3961b9
movl $0x1d00, %edx           # imm = 0x1D00
leaq 0x5ccb3(%rip), %rcx     # 0x3986af
callq 0x2130
jmp 0x33ba03
movq -0xa0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
jmp 0x33b66c
jmp 0x33ba1c
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0x33b617
movl $0xffffffff, -0x8c(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x90(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x88(%rbp) # imm = 0xFFFFFFFF
movq $0x0, -0x80(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jbe 0x33bbb9
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
movq -0x10(%rbp), %rax
imulq $0x18, 0x30(%rax), %rax
addq %rax, %rsi
callq 0x310150
movq $0x1, -0x98(%rbp)
movq $0x0, -0xa0(%rbp)
movq -0x98(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x30(%rcx), %rax
ja 0x33bbb7
movq -0x98(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x30(%rcx), %rax
je 0x33bb04
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
imulq $0x18, -0xa0(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
shrq $0x20, %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
imulq $0x18, -0x98(%rbp), %rdx
addq %rdx, %rcx
movq 0x10(%rcx), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
je 0x33bb9e
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
imulq $0x18, -0xa0(%rbp), %rax
addq %rax, %rsi
movq -0x98(%rbp), %rdx
subq -0xa0(%rbp), %rdx
movq -0xa0(%rbp), %rcx
movq -0x10(%rbp), %r8
movq -0xb8(%rbp), %r9
xorl %eax, %eax
leaq -0x68(%rbp), %rax
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x329410
cmpl $0x0, %eax
je 0x33bb90
cmpl $-0x1, -0x60(%rbp)
je 0x33bb90
cmpl $-0x1, -0x90(%rbp)
je 0x33bb79
movq -0x80(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x33bb8e
leaq -0x90(%rbp), %rdi
leaq -0x68(%rbp), %rsi
movl $0x28, %edx
callq 0x2180
jmp 0x33bb90
movq -0x98(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x33bba0
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0x33ba9f
jmp 0x33bbb9
movq -0x10(%rbp), %rax
movq $0x0, 0x90(%rax)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
cmpq -0x28(%rbp), %rax
jae 0x33bce9
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rcx
shrq %rcx
movq -0x10(%rbp), %rax
orq 0x98(%rax), %rcx
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rcx
shrq $0x2, %rcx
movq -0x10(%rbp), %rax
orq 0x98(%rax), %rcx
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rcx
shrq $0x4, %rcx
movq -0x10(%rbp), %rax
orq 0x98(%rax), %rcx
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rcx
shrq $0x8, %rcx
movq -0x10(%rbp), %rax
orq 0x98(%rax), %rcx
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rcx
shrq $0x10, %rcx
movq -0x10(%rbp), %rax
orq 0x98(%rax), %rcx
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
jmp 0x33bceb
movq $0x0, -0xc0(%rbp)
movq $0x0, -0x98(%rbp)
movq $-0x1, -0xf0(%rbp)
movq $-0x1, -0xe8(%rbp)
movq -0x98(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x33bfa6
movq -0x20(%rbp), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0xc8(%rbp)
movq -0x20(%rbp), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shlq %rax
shrq $0x21, %rax
movq %rax, -0xd0(%rbp)
movq -0xc0(%rbp), %rax
addq -0xd0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movq -0xb8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq -0xc8(%rbp), %rdx
shrq %rdx
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jb 0x33bdd9
movq -0xe0(%rbp), %rax
movq -0xb8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq -0xc8(%rbp), %rdx
shrq %rdx
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
subq %rcx, %rax
movq %rax, -0x188(%rbp)
jmp 0x33bde4
xorl %eax, %eax
movq %rax, -0x188(%rbp)
jmp 0x33bde4
movq -0x188(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq $0x0, -0x110(%rbp)
cmpq $0x0, -0x98(%rbp)
jbe 0x33be95
movq -0x20(%rbp), %rcx
movq -0x98(%rbp), %rdx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq (%rcx,%rdx,8), %rax
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movq %rax, -0x110(%rbp)
cmpq $0x0, -0x110(%rbp)
je 0x33be93
movq -0xb8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %esi
xorl $0x1, %esi
movq -0x20(%rbp), %rax
movq -0x98(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %edx
xorl $0x1, %edx
movq -0xd0(%rbp), %rax
movl %eax, %ecx
callq 0x33b100
movl %eax, %eax
movq %rax, -0x110(%rbp)
jmp 0x33be95
cmpq $-0x1, -0xe8(%rbp)
je 0x33bf09
movq -0xd8(%rbp), %rax
cmpq -0xe8(%rbp), %rax
jae 0x33bebd
movq -0xe8(%rbp), %rax
movq %rax, -0xd8(%rbp)
cmpq $0x0, -0x110(%rbp)
je 0x33bee5
movq -0xd8(%rbp), %rax
cmpq -0xf0(%rbp), %rax
jbe 0x33bee5
movq -0xf0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xe0(%rbp), %rax
cmpq -0xf0(%rbp), %rax
ja 0x33bf07
movq -0xf0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xe0(%rbp)
jmp 0x33bf09
movq -0xd8(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x98(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0xe0(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x98(%rbp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0xd8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0x33bd17
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl %eax, %eax
movq %rax, -0xc8(%rbp)
movq -0xb8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc8(%rbp), %rcx
shrq %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movq %rax, -0x128(%rbp)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0xc8(%rbp)
movq -0xb8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc8(%rbp), %rcx
shrq %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movq %rax, -0x130(%rbp)
cmpl $-0x1, -0x90(%rbp)
je 0x33cef5
movl -0x8c(%rbp), %eax
cmpl -0x90(%rbp), %eax
jbe 0x33cef5
movq $0x0, -0x150(%rbp)
movq $0x0, -0x158(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x90(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
shrq $0x20, %rax
andq $0x1, %rax
movq %rax, -0xf8(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x90(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movq 0x10(%rax), %rax
movl %eax, %eax
movq %rax, -0x100(%rbp)
cmpq $0x0, -0xf8(%rbp)
jne 0x33c0fa
movq -0x118(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x18c(%rbp)
jmp 0x33c118
movq -0x38(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x118(%rbp), %rcx
subl (%rcx), %eax
subl $0x1, %eax
movl %eax, -0x18c(%rbp)
movl -0x18c(%rbp), %eax
movl %eax, %eax
movq %rax, -0x108(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x48(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x58, %rcx, %rcx
addq %rcx, %rax
movq 0x30(%rax), %rax
movq -0x38(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x108(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
movb 0x20(%rax), %al
shrb $0x5, %al
andb $0x1, %al
cmpb $0x0, %al
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpq $0x0, -0xf8(%rbp)
setne %cl
xorb $-0x1, %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x33c1e7
movq -0x120(%rbp), %rax
movl 0x10(%rax), %eax
movq -0xb8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x120(%rbp), %rdx
movl (%rdx), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jne 0x33c1db
movl $0x1, -0x15c(%rbp)
jmp 0x33c1e5
movl $0x0, -0x15c(%rbp)
jmp 0x33c20c
movq -0x120(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x33c200
movl $0x1, -0x15c(%rbp)
jmp 0x33c20a
movl $0x0, -0x15c(%rbp)
jmp 0x33c20c
cmpl $0x0, -0x15c(%rbp)
je 0x33c28a
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x100(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x140(%rbp)
cmpq $0x0, -0xf8(%rbp)
je 0x33c269
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x48(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x58, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
movq -0x120(%rbp), %rcx
subl 0x4(%rcx), %eax
movl %eax, -0x190(%rbp)
jmp 0x33c279
movq -0x120(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x190(%rbp)
movl -0x190(%rbp), %eax
movl %eax, %eax
movq %rax, -0x148(%rbp)
jmp 0x33c2ff
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x100(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0x140(%rbp)
cmpq $0x0, -0xf8(%rbp)
je 0x33c2e0
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x48(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x58, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
movq -0x120(%rbp), %rcx
subl 0x8(%rcx), %eax
movl %eax, -0x194(%rbp)
jmp 0x33c2f0
movq -0x120(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x194(%rbp)
movl -0x194(%rbp), %eax
movl %eax, %eax
movq %rax, -0x148(%rbp)
cmpq $0x0, -0x100(%rbp)
jne 0x33c326
movq -0x120(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x120(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, %eax
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rax
cmpq -0x140(%rbp), %rax
jge 0x33c34b
movq -0x140(%rbp), %rax
subq -0x148(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x8c(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movq 0x10(%rax), %rax
movl %eax, %eax
movq %rax, -0x100(%rbp)
cmpq $0x0, -0xf8(%rbp)
jne 0x33c39b
movq -0x118(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x198(%rbp)
jmp 0x33c3b9
movq -0x38(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x118(%rbp), %rcx
subl (%rcx), %eax
subl $0x1, %eax
movl %eax, -0x198(%rbp)
movl -0x198(%rbp), %eax
movl %eax, %eax
movq %rax, -0x108(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x48(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x58, %rcx, %rcx
addq %rcx, %rax
movq 0x30(%rax), %rax
movq -0x38(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x108(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
movb 0x20(%rax), %al
shrb $0x5, %al
andb $0x1, %al
cmpb $0x0, %al
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpq $0x0, -0xf8(%rbp)
setne %cl
xorb $-0x1, %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x33c464
movq -0x120(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x33c458
movl $0x0, -0x15c(%rbp)
jmp 0x33c462
movl $0x1, -0x15c(%rbp)
jmp 0x33c4ad
movq -0x120(%rbp), %rax
movl 0x10(%rax), %eax
movq -0xb8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x120(%rbp), %rdx
movl (%rdx), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jne 0x33c4a1
movl $0x0, -0x15c(%rbp)
jmp 0x33c4ab
movl $0x1, -0x15c(%rbp)
jmp 0x33c4ad
cmpl $0x0, -0x15c(%rbp)
jne 0x33c53b
movq -0xc0(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0xa0(%rcx), %rcx
movq -0x100(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
subq %rcx, %rax
movq %rax, -0x140(%rbp)
cmpq $0x0, -0xf8(%rbp)
je 0x33c501
movq -0x120(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x19c(%rbp)
jmp 0x33c52a
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x48(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x58, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
movq -0x120(%rbp), %rcx
subl 0x4(%rcx), %eax
movl %eax, -0x19c(%rbp)
movl -0x19c(%rbp), %eax
movl %eax, %eax
movq %rax, -0x148(%rbp)
jmp 0x33c5b8
movq -0xc0(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0xa0(%rcx), %rcx
movq -0x100(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %ecx
subq %rcx, %rax
movq %rax, -0x140(%rbp)
cmpq $0x0, -0xf8(%rbp)
je 0x33c580
movq -0x120(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x1a0(%rbp)
jmp 0x33c5a9
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x48(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x58, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
movq -0x120(%rbp), %rcx
subl 0x8(%rcx), %eax
movl %eax, -0x1a0(%rbp)
movl -0x1a0(%rbp), %eax
movl %eax, %eax
movq %rax, -0x148(%rbp)
movq -0x100(%rbp), %rax
addq $0x1, %rax
cmpq -0x28(%rbp), %rax
jne 0x33c5e6
movq -0x120(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x120(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, %eax
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rax
cmpq -0x140(%rbp), %rax
jge 0x33c60b
movq -0x140(%rbp), %rax
subq -0x148(%rbp), %rax
movq %rax, -0x158(%rbp)
cmpq $0x0, -0x150(%rbp)
jle 0x33c75c
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl %eax, %eax
movq %rax, -0xc8(%rbp)
movq -0xb8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc8(%rbp), %rcx
shrq %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x138(%rbp)
movq -0x150(%rbp), %rax
movq -0x138(%rbp), %rcx
movl (%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jge 0x33c689
movq -0x138(%rbp), %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
subq -0x150(%rbp), %rax
movq %rax, -0x150(%rbp)
jmp 0x33c694
movq $0x0, -0x150(%rbp)
movq -0xc8(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x33c6cf
leaq 0x88c24(%rip), %rax     # 0x3c52d0
movq 0x18(%rax), %rax
movq -0x138(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq (%rcx), %rcx
shrq $0x21, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x128(%rbp)
jmp 0x33c707
leaq 0x88bfa(%rip), %rax     # 0x3c52d0
movq 0x18(%rax), %rax
movq -0x138(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq -0x138(%rbp), %rdx
movl 0x10(%rdx), %edx
subl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x128(%rbp)
movq -0x150(%rbp), %rax
cmpq -0x128(%rbp), %rax
jle 0x33c725
movq -0x150(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq -0x138(%rbp), %rcx
movl (%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jne 0x33c74f
movq $0x0, -0x150(%rbp)
jmp 0x33c75a
movq $0x1, -0x150(%rbp)
jmp 0x33c75c
cmpq $0x0, -0x158(%rbp)
jle 0x33c8b6
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0xc8(%rbp)
movq -0xb8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xc8(%rbp), %rcx
shrq %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x138(%rbp)
movq -0x158(%rbp), %rax
movq -0x138(%rbp), %rcx
movl (%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jge 0x33c7e3
movq -0x138(%rbp), %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
subq -0x158(%rbp), %rax
movq %rax, -0x158(%rbp)
jmp 0x33c7ee
movq $0x0, -0x158(%rbp)
movq -0xc8(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x33c839
leaq 0x88aca(%rip), %rax     # 0x3c52d0
movq 0x18(%rax), %rax
movq -0x138(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq -0x138(%rbp), %rdx
movl 0x10(%rdx), %edx
subl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x130(%rbp)
jmp 0x33c861
leaq 0x88a90(%rip), %rax     # 0x3c52d0
movq 0x18(%rax), %rax
movq -0x138(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq (%rcx), %rcx
shrq $0x21, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x130(%rbp)
movq -0x158(%rbp), %rax
cmpq -0x130(%rbp), %rax
jle 0x33c87f
movq -0x158(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rax
movq -0x138(%rbp), %rcx
movl (%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jne 0x33c8a9
movq $0x0, -0x158(%rbp)
jmp 0x33c8b4
movq $0x1, -0x158(%rbp)
jmp 0x33c8b6
cmpq $0x0, -0x150(%rbp)
jne 0x33c8ce
cmpq $0x0, -0x158(%rbp)
je 0x33cef3
movq $0x0, -0x98(%rbp)
movq $0x0, -0xd8(%rbp)
movq -0x128(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x98(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0xe0(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x98(%rbp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0xe0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
addq $0x1, %rax
cmpq -0x28(%rbp), %rax
jae 0x33cc1d
movq -0x20(%rbp), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0xc8(%rbp)
movq -0x20(%rbp), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shlq %rax
shrq $0x21, %rax
movq %rax, -0xd0(%rbp)
movq -0xc0(%rbp), %rax
addq -0xd0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movq -0xb8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq -0xc8(%rbp), %rdx
shrq %rdx
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jb 0x33ca50
movq -0xe0(%rbp), %rax
movq -0xb8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq -0xc8(%rbp), %rdx
shrq %rdx
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
subq %rcx, %rax
movq %rax, -0x1a8(%rbp)
jmp 0x33ca5b
xorl %eax, %eax
movq %rax, -0x1a8(%rbp)
jmp 0x33ca5b
movq -0x1a8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq $0x0, -0x110(%rbp)
cmpq $0x0, -0x98(%rbp)
jbe 0x33cb0c
movq -0x20(%rbp), %rcx
movq -0x98(%rbp), %rdx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq (%rcx,%rdx,8), %rax
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movq %rax, -0x110(%rbp)
cmpq $0x0, -0x110(%rbp)
je 0x33cb0a
movq -0xb8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %esi
xorl $0x1, %esi
movq -0x20(%rbp), %rax
movq -0x98(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %edx
xorl $0x1, %edx
movq -0xd0(%rbp), %rax
movl %eax, %ecx
callq 0x33b100
movl %eax, %eax
movq %rax, -0x110(%rbp)
jmp 0x33cb0c
cmpq $-0x1, -0xe8(%rbp)
je 0x33cb80
movq -0xd8(%rbp), %rax
cmpq -0xe8(%rbp), %rax
jae 0x33cb34
movq -0xe8(%rbp), %rax
movq %rax, -0xd8(%rbp)
cmpq $0x0, -0x110(%rbp)
je 0x33cb5c
movq -0xd8(%rbp), %rax
cmpq -0xf0(%rbp), %rax
jbe 0x33cb5c
movq -0xf0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xe0(%rbp), %rax
cmpq -0xf0(%rbp), %rax
ja 0x33cb7e
movq -0xf0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xe0(%rbp)
jmp 0x33cb80
movq -0xd8(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x98(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0xe0(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x98(%rbp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0xd8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0x33c98a
movq -0x98(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x33cc2c
jmp 0x33cc4b
leaq 0x5bb26(%rip), %rdi     # 0x398759
leaq 0x5957f(%rip), %rsi     # 0x3961b9
movl $0x1d9a, %edx           # imm = 0x1D9A
leaq 0x5ba69(%rip), %rcx     # 0x3986af
callq 0x2130
movq -0x20(%rbp), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0xc8(%rbp)
movq -0x20(%rbp), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shlq %rax
shrq $0x21, %rax
movq %rax, -0xd0(%rbp)
movq -0xc0(%rbp), %rax
addq -0xd0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movq -0xb8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq -0xc8(%rbp), %rdx
shrq %rdx
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jb 0x33ccfc
movq -0xe0(%rbp), %rax
movq -0xb8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq -0xc8(%rbp), %rdx
shrq %rdx
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
subq %rcx, %rax
movq %rax, -0x1b0(%rbp)
jmp 0x33cd07
xorl %eax, %eax
movq %rax, -0x1b0(%rbp)
jmp 0x33cd07
movq -0x1b0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
addq -0x130(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq $0x0, -0x110(%rbp)
cmpq $0x0, -0x98(%rbp)
jbe 0x33cdcd
movq -0x20(%rbp), %rcx
movq -0x98(%rbp), %rdx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq (%rcx,%rdx,8), %rax
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movq %rax, -0x110(%rbp)
cmpq $0x0, -0x110(%rbp)
je 0x33cdcb
movq -0xb8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %esi
xorl $0x1, %esi
movq -0x20(%rbp), %rax
movq -0x98(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %edx
xorl $0x1, %edx
movq -0xd0(%rbp), %rax
movl %eax, %ecx
callq 0x33b100
movl %eax, %eax
movq %rax, -0x110(%rbp)
jmp 0x33cdcd
cmpq $-0x1, -0xe8(%rbp)
je 0x33ce41
movq -0xd8(%rbp), %rax
cmpq -0xe8(%rbp), %rax
jae 0x33cdf5
movq -0xe8(%rbp), %rax
movq %rax, -0xd8(%rbp)
cmpq $0x0, -0x110(%rbp)
je 0x33ce1d
movq -0xd8(%rbp), %rax
cmpq -0xf0(%rbp), %rax
jbe 0x33ce1d
movq -0xf0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xe0(%rbp), %rax
cmpq -0xf0(%rbp), %rax
ja 0x33ce3f
movq -0xf0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xe0(%rbp)
jmp 0x33ce41
movq -0xe0(%rbp), %rax
subq -0xd8(%rbp), %rax
cmpq -0x130(%rbp), %rax
jae 0x33ce6d
movq -0xd8(%rbp), %rax
addq -0x130(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x98(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0xe0(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x98(%rbp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0xd8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xc0(%rbp)
jmp 0x33cef5
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x48(%rax), %rdi
movl -0x14(%rbp), %eax
imulq $0x58, %rax, %rax
addq %rax, %rdi
movq -0xb8(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %r8
movl -0x2c(%rbp), %r9d
callq 0x33abf0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopw (%rax,%rax)