// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: u2g_threading(ul_resolve_t*, ulg_opt_t*, unsigned long, unsigned long, asg64_v*, asg64_v*)
void u2g_threading(ul_resolve_t *uidx, ulg_opt_t *ulopt, uint64_t cov_cutoff, uint64_t is_bridg, asg64_v *b, asg64_v *ub)
{
    renew_ul2_utg(uidx);
    ul2ul_idx_t *idx = &(uidx->uovl); ma_ug_t *iug = idx->i_ug; ma_ug_t *raw = uidx->l1_ug;
    uint64_t k, z, i, t_s, t_e; uinfo_srt_warp_t *seq; 
    usg_t *ng; CALLOC(ng, 1); usg_seq_t *s; usg_arc_warp *sv; usg_arc_t *p; 
    asg_arc_t *av; uint32_t nv, v, w, vx, wx; int64_t tt, tl, tm; 

    ng->mp.n = ng->mp.m = raw->g->n_seq; MALLOC(ng->mp.a, ng->mp.n);
    for (k = 0; k < raw->g->n_seq; k++) {
        s = push_usg_t_node(ng, k); 
        s->mm = k; s->arc[0].n = s->arc[1].n = 0; s->occ = raw->u.a[k].n;
        s->arc_mm[0].n = s->arc_mm[1].n;
        s->del = raw->g->seq[k].del; s->len = raw->g->seq[k].len;
        s->telo = 0; 
        if(uidx->uopt->te) {
            s->telo = gen_utg_telo(&(raw->u.a[k]), uidx->uopt->te);
        }

        av = asg_arc_a(raw->g, (k<<1)); nv = asg_arc_n(raw->g, (k<<1)); sv = &(s->arc[0]);
        for (z = 0; z < nv; z++) {
            if(av[z].del) continue;
            kv_pushp(usg_arc_t, *sv, &p); 
            p->del = 0; p->ou = 0; p->v = av[z].v; p->ol = av[z].ol; p->ul = av[z].ul; p->idx = 0;
        }

        av = asg_arc_a(raw->g, ((k<<1)+1)); nv = asg_arc_n(raw->g, ((k<<1)+1)); sv = &(s->arc[1]);
        for (z = 0; z < nv; z++) {
            if(av[z].del) continue;
            kv_pushp(usg_arc_t, *sv, &p); 
            p->del = 0; p->ou = 0; p->v = av[z].v; p->ol = av[z].ol; p->ul = av[z].ul; p->idx = 0;
        }
        ///map: ng id -> raw id
        ng->mp.a[k].n = ng->mp.a[k].m = 1; MALLOC(ng->mp.a[k].a, 1); ng->mp.a[k].a[0] = k;
    }

    for (k = b->n = 0; k < iug->u.n; k++) {
        seq = &(idx->cc.iug_a[k]);
        if(seq->n <= 1) continue;

        uidx->uovl.iug_seq = seq; uidx->uovl.iug_cov_thre = cov_cutoff;
        for (z = 0; z < uidx->str_b.n_thread; z++) {
            uidx->str_b.buf[z].res_dump.n = 0;
        }
        kt_for(uidx->str_b.n_thread, worker_update_ul_arc_drop, uidx, seq->n-1);///seq->n > 1
        for (z = ub->n = 0; z < uidx->str_b.n_thread; z++) {
            for (i = 0; i < uidx->str_b.buf[z].res_dump.n; i++) {
                kv_push(uint64_t, *ub, uidx->str_b.buf[z].res_dump.a[i]);
            }
        }

        for (z = 0; z < ub->n; z++) {///all unreliable arcs
            i = ub->a[z]; tm = 1; p = get_usg_arc(ng, seq->a[i].v, seq->a[i+1].v);
            if(p) {
                if(p->ou < (uint64_t)tm) p->ou = tm;///since the initial ou is 0, p->ou = 1
                pushp_usg_arc_mm(ng, seq->a[i].v, seq->a[i+1].v, k, i); 

                p = get_usg_arc(ng, seq->a[i+1].v^1, seq->a[i].v^1);
                if(p->ou < (uint64_t)tm) p->ou = tm;///since the initial ou is 0, p->ou = 1
                pushp_usg_arc_mm(ng, seq->a[i+1].v^1, seq->a[i].v^1, k, i); 
            } 
            ///give up unreliable arcs if they are not adjacent
        }

        radix_sort_srt64(ub->a, ub->a + ub->n); 
        if(ub->n == 0 || ub->a[ub->n-1] < seq->n-1) kv_push(uint64_t, *ub, seq->n-1);
        for (z = t_s = t_e = 0; z < ub->n; z++) {
            t_e = ub->a[z];
            if(t_s < t_e) {
                for (i = t_s, tt = seq->a[t_e].n; i < t_e; i++) {
                    tt += seq->a[i].n;///how many HiFi reads are covered
                }
                for (i = t_s, tl = 0; i < t_e; i++) {
                    tl += seq->a[i].n; 
                    tm = tt - tl; if(tm > tl) tm = tl; assert(tm > 0); tm <<= 1; tm += 1;
                    p = get_usg_arc(ng, seq->a[i].v, seq->a[i+1].v);
                    if(p) {
                        if(p->ou < (uint64_t)tm) p->ou = tm;
                        p = get_usg_arc(ng, seq->a[i+1].v^1, seq->a[i].v^1);
                        if(p->ou < (uint64_t)tm) p->ou = tm;
                    } else if(is_bridg) {
                        v = seq->a[i].v; w = seq->a[i+1].v; p = NULL;
                        vx = (v&1?((raw->u.a[v>>1].a[0]>>32)^1):(raw->u.a[v>>1].a[raw->u.a[v>>1].n-1]>>32));
                        wx = (w&1?((raw->u.a[w>>1].a[raw->u.a[w>>1].n-1]>>32)^1):(raw->u.a[w>>1].a[0]>>32));
                        ///(v>>1) != (w>>1) or v == w, need to handle (v>>1) == (w>>1) && (v&1) != (w&1) later
                        if(((v^w) != 1) && (uidx->sg->seq[vx>>1].len > uidx->uopt->min_ovlp) && 
                                (uidx->sg->seq[wx>>1].len > uidx->uopt->min_ovlp)) {
                            kv_pushp(usg_arc_t, (ng->a[v>>1].arc[v&1]), &p); 
                            p->del = 0; p->ou = tm; p->v = w; p->ol = 0; p->idx = 0;
                            p->ul = (((uint64_t)v)<<32)|(raw->g->seq[v>>1].len);

                            v = seq->a[i+1].v^1; w = seq->a[i].v^1; 
                            kv_pushp(usg_arc_t, (ng->a[v>>1].arc[v&1]), &p); 
                            p->del = 0; p->ou = tm; p->v = w; p->ol = 0; p->idx = 0;
                            p->ul = (((uint64_t)v)<<32)|(raw->g->seq[v>>1].len);
                        }
                    }
                    if(p) {
                        pushp_usg_arc_mm(ng, seq->a[i].v, seq->a[i+1].v, k, i); 
                        pushp_usg_arc_mm(ng, seq->a[i+1].v^1, seq->a[i].v^1, k, i); 
                    }
                }
            }
            t_s = ub->a[z] + 1;
        }
    }

    // for (v = 0; v < (ng->n<<1); v++) {
    //     p = usg_arc_a(ng, v); nv = usg_arc_n(ng, v);
    //     for (i = 0; i < nv; i++) {
    //         assert(get_usg_arc(ng, p[i].v^1, v^1));
    //     }
    // }

    usg_cleanup(ng);

    ///debug
    debug_sysm_usg_t(ng, __func__);

    idx->h_usg = ng;

    /******for debug******/
    // prt_usg_t(uidx, ng, "ng0");
    /******for debug******/



    u2g_hybrid_clean(uidx, ulopt, ng, b, ub);
    // idx->hybrid_ug = gen_hybrid_ug(uidx, ng);
    
    
    // idx->hybrid_ug = gen_debug_hybrid_ug(uidx, ng);
    // fprintf(stderr, "-[M::%s::] idx->hybrid_ug->g->n_seq::%u\n", __func__, (uint32_t)idx->hybrid_ug->g->n_seq);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x370620
movq -0x8(%rbp), %rax
addq $0x1f0, %rax            # imm = 0x1F0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movl $0x1, %edi
movl $0x30, %esi
callq 0x2140
movq %rax, -0x80(%rbp)
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %ecx
movq -0x80(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x80(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x80(%rbp), %rax
imulq $0x18, 0x18(%rax), %rdi
callq 0x2270
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x28(%rax)
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x36f5f4
movq -0x80(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x34d480
movq %rax, -0x88(%rbp)
movq -0x50(%rbp), %rax
movl %eax, %ecx
movq -0x88(%rbp), %rax
movl %ecx, (%rax)
movq -0x88(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x88(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x50(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x88(%rbp), %rax
movq 0x58(%rax), %rcx
movq -0x88(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq -0x50(%rbp), %rcx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
movb %al, %cl
movq -0x88(%rbp), %rax
movb %cl, 0x70(%rax)
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq -0x50(%rbp), %rcx
movl (%rax,%rcx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0x88(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x88(%rbp), %rax
movb $0x0, 0x71(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x70(%rax)
je 0x36f168
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rdi
imulq $0x28, -0x50(%rbp), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x70(%rax), %rsi
callq 0x36ef30
movb %al, %cl
movq -0x88(%rbp), %rax
movb %cl, 0x71(%rax)
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movq -0x50(%rbp), %rdx
shlq %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movq -0x50(%rbp), %rcx
shlq %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0xa4(%rbp)
movq -0x88(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x90(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl -0xa4(%rbp), %ecx
cmpq %rcx, %rax
jae 0x36f36d
movq -0xa0(%rbp), %rax
imulq $0x18, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x36f206
jmp 0x36f35c
jmp 0x36f208
movq -0x90(%rbp), %rax
movq (%rax), %rax
movq -0x90(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x36f291
movq -0x90(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x36f244
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xd8(%rbp)
jmp 0x36f252
movl $0x2, %eax
movq %rax, -0xd8(%rbp)
jmp 0x36f252
movq -0xd8(%rbp), %rcx
movq -0x90(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x90(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x5, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x90(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x90(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x90(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0xc(%rax)
movq -0x98(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0xa0(%rbp), %rax
imulq $0x18, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
movq -0x98(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0xa0(%rbp), %rax
imulq $0x18, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq -0x98(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, 0xc(%rax)
movq -0xa0(%rbp), %rax
imulq $0x18, -0x58(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x98(%rbp), %rax
movq %rcx, (%rax)
movq -0x98(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x36f1d4
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movq -0x50(%rbp), %rdx
shlq %rdx
movq 0x8(%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movq -0x50(%rbp), %rcx
shlq %rcx
movq 0x8(%rax,%rcx,8), %rax
movl %eax, -0xa4(%rbp)
movq -0x88(%rbp), %rax
addq $0x10, %rax
addq $0x18, %rax
movq %rax, -0x90(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl -0xa4(%rbp), %ecx
cmpq %rcx, %rax
jae 0x36f578
movq -0xa0(%rbp), %rax
imulq $0x18, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x36f411
jmp 0x36f567
jmp 0x36f413
movq -0x90(%rbp), %rax
movq (%rax), %rax
movq -0x90(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x36f49c
movq -0x90(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x36f44f
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xe0(%rbp)
jmp 0x36f45d
movl $0x2, %eax
movq %rax, -0xe0(%rbp)
jmp 0x36f45d
movq -0xe0(%rbp), %rcx
movq -0x90(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x90(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x5, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x90(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x90(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x90(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0xc(%rax)
movq -0x98(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0xa0(%rbp), %rax
imulq $0x18, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
movq -0x98(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0xa0(%rbp), %rax
imulq $0x18, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq -0x98(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, 0xc(%rax)
movq -0xa0(%rbp), %rax
imulq $0x18, -0x58(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x98(%rbp), %rax
movq %rcx, (%rax)
movq -0x98(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x36f3df
movq -0x80(%rbp), %rax
movq 0x28(%rax), %rax
imulq $0x18, -0x50(%rbp), %rcx
addq %rcx, %rax
movq $0x1, 0x10(%rax)
movq -0x80(%rbp), %rax
movq 0x28(%rax), %rax
imulq $0x18, -0x50(%rbp), %rcx
addq %rcx, %rax
movq $0x1, 0x8(%rax)
movl $0x4, %edi
callq 0x2270
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq 0x28(%rax), %rax
imulq $0x18, -0x50(%rbp), %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
movl %eax, %ecx
movq -0x80(%rbp), %rax
movq 0x28(%rax), %rax
imulq $0x18, -0x50(%rbp), %rdx
addq %rdx, %rax
movq (%rax), %rax
movl %ecx, (%rax)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x36f04a
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x40(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x3705cc
movq -0x38(%rbp), %rax
movq 0x70(%rax), %rax
imulq $0x18, -0x50(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
cmpq $0x1, (%rax)
ja 0x36f63b
jmp 0x3705bb
movq -0x78(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x298(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2a0(%rax)
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x1e0(%rcx), %rax
jae 0x36f6a1
movq -0x8(%rbp), %rax
movq 0x1d8(%rax), %rax
imulq $0x328, -0x58(%rbp), %rcx # imm = 0x328
addq %rcx, %rax
movq $0x0, 0x300(%rax)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x36f661
movq -0x8(%rbp), %rax
movq 0x1e0(%rax), %rax
movl %eax, %edi
movq -0x8(%rbp), %rdx
movq -0x78(%rbp), %rax
movq (%rax), %rcx
subq $0x1, %rcx
leaq 0x105c(%rip), %rsi      # 0x370720
callq 0x16d710
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x1e0(%rcx), %rax
jae 0x36f7fb
movq $0x0, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x1d8(%rcx), %rcx
imulq $0x328, -0x58(%rbp), %rdx # imm = 0x328
addq %rdx, %rcx
cmpq 0x300(%rcx), %rax
jae 0x36f7e8
jmp 0x36f722
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x36f793
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x36f752
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xe8(%rbp)
jmp 0x36f760
movl $0x2, %eax
movq %rax, -0xe8(%rbp)
jmp 0x36f760
movq -0xe8(%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 -0x8(%rbp), %rax
movq 0x1d8(%rax), %rax
imulq $0x328, -0x58(%rbp), %rcx # imm = 0x328
addq %rcx, %rax
movq 0x310(%rax), %rax
movq -0x60(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
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 0x36f7d7
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x36f6f9
jmp 0x36f7ea
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x36f6dc
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x36f9b0
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movq $0x1, -0xd0(%rbp)
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %esi
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
addq $0x1, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %edx
callq 0x37d400
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x98(%rbp)
je 0x36f99d
movq -0x98(%rbp), %rax
movl 0x10(%rax), %eax
cmpq -0xd0(%rbp), %rax
jae 0x36f8a5
movq -0xd0(%rbp), %rax
movl %eax, %ecx
movq -0x98(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %esi
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
addq $0x1, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %edx
movq -0x50(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movl %eax, %r8d
callq 0x34d5f0
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
addq $0x1, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %esi
xorl $0x1, %esi
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %edx
xorl $0x1, %edx
callq 0x37d400
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movl 0x10(%rax), %eax
cmpq -0xd0(%rbp), %rax
jae 0x36f953
movq -0xd0(%rbp), %rax
movl %eax, %ecx
movq -0x98(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
addq $0x1, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %esi
xorl $0x1, %esi
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %edx
xorl $0x1, %edx
movq -0x50(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movl %eax, %r8d
callq 0x34d5f0
jmp 0x36f99f
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x36f803
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x30(%rbp), %rax
movq (%rax), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x30ed90
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x36fa08
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movq -0x78(%rbp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x36faa5
jmp 0x36fa0a
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x36fa7b
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x36fa3a
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xf0(%rbp)
jmp 0x36fa48
movl $0x2, %eax
movq %rax, -0xf0(%rbp)
jmp 0x36fa48
movq -0xf0(%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 -0x78(%rbp), %rax
movq (%rax), %rdx
subq $0x1, %rdx
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 0x36faa5
movq $0x0, -0x70(%rbp)
movq $0x0, -0x68(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x3705b9
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x70(%rbp), %rax
jae 0x370590
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movq %rax, -0xc0(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x70(%rbp), %rax
jae 0x36fb51
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
addq -0xc0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x36fb15
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0xc8(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x70(%rbp), %rax
jae 0x37058e
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
addq -0xc8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rax
subq -0xc8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
cmpq -0xc8(%rbp), %rax
jle 0x36fbc9
movq -0xc8(%rbp), %rax
movq %rax, -0xd0(%rbp)
cmpq $0x0, -0xd0(%rbp)
jle 0x36fbd5
jmp 0x36fbf4
leaq 0x2b0a0(%rip), %rdi     # 0x39ac7c
leaq 0x265d6(%rip), %rsi     # 0x3961b9
movl $0x3f5c, %edx           # imm = 0x3F5C
leaq 0x2b094(%rip), %rcx     # 0x39ac83
callq 0x2130
movq -0xd0(%rbp), %rax
shlq %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd0(%rbp)
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %esi
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
addq $0x1, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %edx
callq 0x37d400
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x98(%rbp)
je 0x36fcf8
movq -0x98(%rbp), %rax
movl 0x10(%rax), %eax
cmpq -0xd0(%rbp), %rax
jae 0x36fc89
movq -0xd0(%rbp), %rax
movl %eax, %ecx
movq -0x98(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
addq $0x1, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %esi
xorl $0x1, %esi
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %edx
xorl $0x1, %edx
callq 0x37d400
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movl 0x10(%rax), %eax
cmpq -0xd0(%rbp), %rax
jae 0x36fcf3
movq -0xd0(%rbp), %rax
movl %eax, %ecx
movq -0x98(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x3704df
cmpq $0x0, -0x20(%rbp)
je 0x3704dd
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0xa8(%rbp)
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
addq $0x1, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0xac(%rbp)
movq $0x0, -0x98(%rbp)
movl -0xa8(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x36fd87
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xa8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
shrq $0x20, %rax
xorq $0x1, %rax
movq %rax, -0xf8(%rbp)
jmp 0x36fdd4
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xa8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq -0x48(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0xa8(%rbp), %edx
shrl %edx
movl %edx, %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movl %eax, -0xb0(%rbp)
movl -0xac(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x36fe42
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xac(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq -0x48(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0xac(%rbp), %edx
shrl %edx
movl %edx, %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
xorq $0x1, %rax
movq %rax, -0x100(%rbp)
jmp 0x36fe6d
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xac(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
shrq $0x20, %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
movl %eax, -0xb4(%rbp)
movl -0xa8(%rbp), %eax
xorl -0xac(%rbp), %eax
cmpl $0x1, %eax
je 0x3704db
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
movl -0xb0(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x44(%rcx), %eax
jle 0x3704db
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
movl -0xb4(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x44(%rcx), %eax
jle 0x3704db
jmp 0x36feed
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl -0xa8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x78, %rcx, %rcx
addq %rcx, %rax
addq $0x10, %rax
movl -0xa8(%rbp), %ecx
andl $0x1, %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x80(%rbp), %rcx
movq (%rcx), %rcx
movl -0xa8(%rbp), %edx
shrl %edx
movl %edx, %edx
imulq $0x78, %rdx, %rdx
addq %rdx, %rcx
addq $0x10, %rcx
movl -0xa8(%rbp), %edx
andl $0x1, %edx
movl %edx, %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0x3700b2
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl -0xa8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x78, %rcx, %rcx
addq %rcx, %rax
addq $0x10, %rax
movl -0xa8(%rbp), %ecx
andl $0x1, %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x36ffc9
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl -0xa8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x78, %rcx, %rcx
addq %rcx, %rax
addq $0x10, %rax
movl -0xa8(%rbp), %ecx
andl $0x1, %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x108(%rbp)
jmp 0x36ffd7
movl $0x2, %eax
movq %rax, -0x108(%rbp)
jmp 0x36ffd7
movq -0x108(%rbp), %rcx
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl -0xa8(%rbp), %edx
shrl %edx
movl %edx, %edx
imulq $0x78, %rdx, %rdx
addq %rdx, %rax
addq $0x10, %rax
movl -0xa8(%rbp), %edx
andl $0x1, %edx
movl %edx, %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl -0xa8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x78, %rcx, %rcx
addq %rcx, %rax
addq $0x10, %rax
movl -0xa8(%rbp), %ecx
andl $0x1, %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl -0xa8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x78, %rcx, %rcx
addq %rcx, %rax
addq $0x10, %rax
movl -0xa8(%rbp), %ecx
andl $0x1, %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
shlq $0x5, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl -0xa8(%rbp), %edx
shrl %edx
movl %edx, %edx
imulq $0x78, %rdx, %rdx
addq %rdx, %rax
addq $0x10, %rax
movl -0xa8(%rbp), %edx
andl $0x1, %edx
movl %edx, %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl -0xa8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x78, %rcx, %rcx
addq %rcx, %rax
addq $0x10, %rax
movl -0xa8(%rbp), %ecx
andl $0x1, %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rcx
movq (%rcx), %rdx
movl -0xa8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x78, %rcx, %rcx
addq %rcx, %rdx
addq $0x10, %rdx
movl -0xa8(%rbp), %ecx
andl $0x1, %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0xc(%rax)
movq -0xd0(%rbp), %rax
movl %eax, %ecx
movq -0x98(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0xac(%rbp), %ecx
movq -0x98(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x98(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x80000000, %ecx       # imm = 0x80000000
orl $0x0, %ecx
movl %ecx, 0xc(%rax)
movq -0x98(%rbp), %rax
movq $0x0, 0x18(%rax)
movl -0xa8(%rbp), %eax
movl %eax, %ecx
shlq $0x20, %rcx
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0xa8(%rbp), %edx
shrl %edx
movl %edx, %edx
movl (%rax,%rdx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
orq %rax, %rcx
movq -0x98(%rbp), %rax
movq %rcx, (%rax)
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
addq $0x1, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
xorl $0x1, %eax
movl %eax, -0xa8(%rbp)
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
xorl $0x1, %eax
movl %eax, -0xac(%rbp)
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl -0xa8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x78, %rcx, %rcx
addq %rcx, %rax
addq $0x10, %rax
movl -0xa8(%rbp), %ecx
andl $0x1, %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x80(%rbp), %rcx
movq (%rcx), %rcx
movl -0xa8(%rbp), %edx
shrl %edx
movl %edx, %edx
imulq $0x78, %rdx, %rdx
addq %rdx, %rcx
addq $0x10, %rcx
movl -0xa8(%rbp), %edx
andl $0x1, %edx
movl %edx, %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0x3703c9
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl -0xa8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x78, %rcx, %rcx
addq %rcx, %rax
addq $0x10, %rax
movl -0xa8(%rbp), %ecx
andl $0x1, %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x3702e0
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl -0xa8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x78, %rcx, %rcx
addq %rcx, %rax
addq $0x10, %rax
movl -0xa8(%rbp), %ecx
andl $0x1, %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x110(%rbp)
jmp 0x3702ee
movl $0x2, %eax
movq %rax, -0x110(%rbp)
jmp 0x3702ee
movq -0x110(%rbp), %rcx
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl -0xa8(%rbp), %edx
shrl %edx
movl %edx, %edx
imulq $0x78, %rdx, %rdx
addq %rdx, %rax
addq $0x10, %rax
movl -0xa8(%rbp), %edx
andl $0x1, %edx
movl %edx, %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl -0xa8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x78, %rcx, %rcx
addq %rcx, %rax
addq $0x10, %rax
movl -0xa8(%rbp), %ecx
andl $0x1, %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl -0xa8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x78, %rcx, %rcx
addq %rcx, %rax
addq $0x10, %rax
movl -0xa8(%rbp), %ecx
andl $0x1, %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
shlq $0x5, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl -0xa8(%rbp), %edx
shrl %edx
movl %edx, %edx
imulq $0x78, %rdx, %rdx
addq %rdx, %rax
addq $0x10, %rax
movl -0xa8(%rbp), %edx
andl $0x1, %edx
movl %edx, %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl -0xa8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x78, %rcx, %rcx
addq %rcx, %rax
addq $0x10, %rax
movl -0xa8(%rbp), %ecx
andl $0x1, %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rcx
movq (%rcx), %rdx
movl -0xa8(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x78, %rcx, %rcx
addq %rcx, %rdx
addq $0x10, %rdx
movl -0xa8(%rbp), %ecx
andl $0x1, %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0xc(%rax)
movq -0xd0(%rbp), %rax
movl %eax, %ecx
movq -0x98(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0xac(%rbp), %ecx
movq -0x98(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x98(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x80000000, %ecx       # imm = 0x80000000
orl $0x0, %ecx
movl %ecx, 0xc(%rax)
movq -0x98(%rbp), %rax
movq $0x0, 0x18(%rax)
movl -0xa8(%rbp), %eax
movl %eax, %ecx
shlq $0x20, %rcx
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0xa8(%rbp), %edx
shrl %edx
movl %edx, %edx
movl (%rax,%rdx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
orq %rax, %rcx
movq -0x98(%rbp), %rax
movq %rcx, (%rax)
jmp 0x3704dd
jmp 0x3704df
cmpq $0x0, -0x98(%rbp)
je 0x37057b
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %esi
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
addq $0x1, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %edx
movq -0x50(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movl %eax, %r8d
callq 0x34d5f0
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
addq $0x1, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %esi
xorl $0x1, %esi
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %edx
xorl $0x1, %edx
movq -0x50(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movl %eax, %r8d
callq 0x34d5f0
jmp 0x37057d
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x36fb64
jmp 0x370590
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x36fabd
jmp 0x3705bb
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x36f607
movq -0x80(%rbp), %rdi
callq 0x34d830
movq -0x80(%rbp), %rdi
leaq 0x2a6fd(%rip), %rsi     # 0x39acdd
callq 0x3586a0
movq -0x80(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0x36e960
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)