// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: integer_gen_ovlp(ul_resolve_t*, integer_t*, unsigned int, ul2ul_item_t*, unsigned int)
void integer_gen_ovlp(ul_resolve_t *uidx, integer_t *buf, uint32_t qid, ul2ul_item_t *o, uint32_t ug_offset)
{
    ul_str_idx_t *str_idx = &(uidx->pstr); ma_ug_t *ug = uidx->l1_ug; ul2ul_t res;
    ul_str_t *str = &(str_idx->str.a[qid]); integer_aln_t *p; ul_chain_t sc;
    uint64_t k, z, *hid_a, hid_n, sck, b_n, m/**, ovn = 0**/; uint32_t vk, vz; uc_block_t *xi;
    o->n = o->cn = 0; o->id = qid; o->is_del = 0; ///o->is_consist = 0;
    // if(qid == 95 || qid == 36) print_integer_seq(ug, str_idx->str.a, qid, 1);
    if(str->cn < 2) return;
    for (k = 0, buf->b.n = 0; k < str->cn; k++) {
        xi = &(uidx->idx->a[qid].bb.a[str->a[k]>>32]);
        assert(((xi->hid<<1)+xi->rev)==((uint32_t)str->a[k]));
        sck = ug_occ_w(xi->ts, xi->te, &(ug->u.a[xi->hid]));

        vk = (uint32_t)str->a[k];
        hid_a = str_idx->occ.a + str_idx->idx.a[vk>>1];
        hid_n = str_idx->idx.a[(vk>>1)+1] - str_idx->idx.a[vk>>1];
        for (z = 0; z < hid_n; z++) {
            // if(qid == 95 || qid == 36) {
            //     fprintf(stderr,"[M::%s::qid->%u::tid->%lu] k->%lu, tid_occ->%u\n", 
            //                 __func__, qid, (hid_a[z]>>32), k, str_idx->str.a[hid_a[z]>>32].cn);
            // }
            if((hid_a[z]>>32) == qid) continue;
            if(str_idx->str.a[hid_a[z]>>32].cn < 2) continue;
            vz = (uint32_t)(str_idx->str.a[hid_a[z]>>32].a[(uint32_t)hid_a[z]]);
            assert((vk>>1) == (vz>>1));
            kv_pushp(integer_aln_t, buf->b, &p);
            p->vq = vk; p->tk = (uint32_t)hid_a[z]; 
            if((vk^vz)&1) p->tk = str_idx->str.a[hid_a[z]>>32].cn - p->tk - 1;///rev
            p->tn_rev_qk = (hid_a[z]>>32); p->tn_rev_qk <<= 1; p->tn_rev_qk |= ((vk^vz)&1);
            p->tn_rev_qk <<= 32; p->tn_rev_qk += k; 
            ///set score of this pair
            p->sc = sck;
            xi = &(uidx->idx->a[hid_a[z]>>32].bb.a[(str_idx->str.a[hid_a[z]>>32].a[(uint32_t)hid_a[z]])>>32]);
            assert(((xi->hid<<1)+xi->rev)==vz); m = ug_occ_w(xi->ts, xi->te, &(ug->u.a[xi->hid]));
            if(p->sc > m) p->sc = m;
        }
    }

    radix_sort_integer_aln_t_srt(buf->b.a, buf->b.a + buf->b.n); 

    // b_n = buf->b.n;
    // for (k = 1, z = ovn = 0; k <= b_n; k++) {
    //     if(k == b_n || (buf->b.a[z].tn_rev_qk>>33) != (buf->b.a[k].tn_rev_qk>>33)) {
    //         ovn++; z = k;
    //     }
    // }

    b_n = buf->b.n; buf->sc.n = 0;
    for (k = 1, z = 0; k <= b_n; k++) {
        if(k == b_n || (buf->b.a[z].tn_rev_qk>>32) != (buf->b.a[k].tn_rev_qk>>32)) {
            // if(qid == 95 || qid == 36) {
            //     fprintf(stderr,"[M::%s::qid->%u::tid->%lu]\n", __func__, qid, buf->b.a[z].tn_rev_qk>>33);
            // }
            if(integer_chain(qid, buf->b.a + z, k - z, z, buf, ug, str_idx, uidx->idx, &sc) && sc.v != (uint32_t)-1) {
                if((buf->sc.n > 0) && ((buf->sc.a[buf->sc.n-1].v>>1) == (sc.v>>1))) {
                    if(buf->sc.a[buf->sc.n-1].sc < sc.sc) {
                        buf->sc.a[buf->sc.n-1] = sc;
                    }
                } else {
                    kv_push(ul_chain_t, buf->sc, sc);
                }
            }
            z = k;
        }
    }

    for (k = o->n = 0; k < buf->sc.n; k++) {
        if(update_exact_ul_ovlps(uidx->idx, ug, str_idx->str.a, buf->b.a, &(buf->sc.a[k]), qid, buf, &res)) {                                                
            kv_push(ul2ul_t, *o, res);
        }
    }
    // if(str->cn > 0) {
    //     for (k = 0, buf->b.n = 0; k < str->cn; k++) {
    //         xi = &(uidx->idx->a[qid].bb.a[str->a[k]>>32]);

    //         // if(xi->ts)
    //     }
    //     // uint32_t v, nv; asg_arc_t *av; asg_t *g = ug->g; ul2ul_t *r;
    //     // v = ((uint32_t)str->a[0])^1;
    //     // nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
    //     // for (k = 0; k < nv; k++) {
    //     //     if(av[k].del) continue;
    //     //     kv_pushp(ul2ul_t, *o, &r);
    //     //     r->hid = (av[k].v>>1) + ug_offset; 
    //     //     r->is_rev = (av[k].v^v)&1;
    //     //     r->qs = 0; r->qe = av[k].ol;

    //     // }
    //     // v = ((uint32_t)str->a[str->cn-1]);
    //     // nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
    // }
    o->cn = o->n; 
    // if(ovn == o->cn) o->is_consist = 1;
    if(o->n <= 0) return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq -0x8(%rbp), %rax
addq $0x190, %rax            # imm = 0x190
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x14(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x18(%rax)
movq -0x68(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x2, %eax
jge 0x3372b9
jmp 0x337c35
movq $0x0, -0xa0(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0xa0(%rbp), %rax
movq -0x68(%rbp), %rcx
movl 0x18(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x337817
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 -0x68(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0xa0(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movl (%rax), %eax
shll %eax
movq -0xe0(%rbp), %rcx
movb 0x20(%rcx), %cl
shrb $0x5, %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
movq -0x68(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0xa0(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl %ecx, %eax
jne 0x337367
jmp 0x337386
leaq 0x60e5a(%rip), %rdi     # 0x3981c8
leaq 0x5ee44(%rip), %rsi     # 0x3961b9
movl $0x19ce, %edx           # imm = 0x19CE
leaq 0x60f0a(%rip), %rcx     # 0x39828b
callq 0x2130
movq -0xe0(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, %edi
movq -0xe0(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, %esi
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0xe0(%rbp), %rax
movl (%rax), %eax
imulq $0x28, %rax, %rax
addq %rax, %rdx
callq 0x327090
movq %rax, -0xc0(%rbp)
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xa0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0xd4(%rbp)
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0xd4(%rbp), %edx
shrl %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xd4(%rbp), %ecx
shrl %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0xd4(%rbp), %edx
shrl %edx
movl %edx, %edx
subq (%rcx,%rdx,8), %rax
movq %rax, -0xb8(%rbp)
movq $0x0, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
cmpq -0xb8(%rbp), %rax
jae 0x3377fe
movq -0xb0(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl -0x14(%rbp), %ecx
cmpq %rcx, %rax
jne 0x33747f
jmp 0x3377e7
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movq -0xb0(%rbp), %rcx
movq -0xa8(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x2, %eax
jge 0x3374b6
jmp 0x3377e7
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movq -0xb0(%rbp), %rcx
movq -0xa8(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0xb0(%rbp), %rcx
movq -0xa8(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0xd8(%rbp)
movl -0xd4(%rbp), %eax
shrl %eax
movl -0xd8(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
jne 0x337513
jmp 0x337532
leaq 0x60d34(%rip), %rdi     # 0x39824e
leaq 0x5ec98(%rip), %rsi     # 0x3961b9
movl $0x19dc, %edx           # imm = 0x19DC
leaq 0x60d5e(%rip), %rcx     # 0x39828b
callq 0x2130
jmp 0x337534
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jne 0x3375a3
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x337565
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
shlq %rax
movq %rax, -0xe8(%rbp)
jmp 0x337573
movl $0x2, %eax
movq %rax, -0xe8(%rbp)
jmp 0x337573
movq -0xe8(%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, -0x70(%rbp)
movl -0xd4(%rbp), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0xb0(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x70(%rbp), %rax
movl %ecx, (%rax)
movl -0xd4(%rbp), %eax
xorl -0xd8(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x337641
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movq -0xb0(%rbp), %rcx
movq -0xa8(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0x70(%rbp), %rax
subl (%rax), %ecx
subl $0x1, %ecx
movq -0x70(%rbp), %rax
movl %ecx, (%rax)
movq -0xb0(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
shrq $0x20, %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x70(%rbp), %rax
movq 0x10(%rax), %rcx
shlq %rcx
movq %rcx, 0x10(%rax)
movl -0xd4(%rbp), %eax
xorl -0xd8(%rbp), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x70(%rbp), %rax
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x70(%rbp), %rax
movq 0x10(%rax), %rcx
shlq $0x20, %rcx
movq %rcx, 0x10(%rax)
movq -0xa0(%rbp), %rcx
movq -0x70(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0xc0(%rbp), %rax
movl %eax, %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x48(%rax), %rax
movq -0xb0(%rbp), %rcx
movq -0xa8(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x58, %rcx, %rcx
addq %rcx, %rax
movq 0x30(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x40(%rcx), %rcx
movq -0xb0(%rbp), %rdx
movq -0xa8(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
shrq $0x20, %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movq 0x10(%rcx), %rcx
movq -0xb0(%rbp), %rdx
movq -0xa8(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movl (%rax), %eax
shll %eax
movq -0xe0(%rbp), %rcx
movb 0x20(%rcx), %cl
shrb $0x5, %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
cmpl -0xd8(%rbp), %eax
jne 0x33776a
jmp 0x337789
leaq 0x60af0(%rip), %rdi     # 0x398261
leaq 0x5ea41(%rip), %rsi     # 0x3961b9
movl $0x19e5, %edx           # imm = 0x19E5
leaq 0x60b07(%rip), %rcx     # 0x39828b
callq 0x2130
movq -0xe0(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, %edi
movq -0xe0(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, %esi
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0xe0(%rbp), %rax
movl (%rax), %eax
imulq $0x28, %rax, %rax
addq %rax, %rdx
callq 0x327090
movq %rax, -0xd0(%rbp)
movq -0x70(%rbp), %rax
movl 0x8(%rax), %eax
cmpq -0xd0(%rbp), %rax
jbe 0x3377e5
movq -0xd0(%rbp), %rax
movl %eax, %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x3377e7
movq -0xa8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
jmp 0x337448
jmp 0x337800
movq -0xa0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
jmp 0x3372d0
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 -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0xc8(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0xc0(%rax)
movq $0x1, -0xa0(%rbp)
movq $0x0, -0xa8(%rbp)
movq -0xa0(%rbp), %rax
cmpq -0xc8(%rbp), %rax
ja 0x337ad7
movq -0xa0(%rbp), %rax
cmpq -0xc8(%rbp), %rax
je 0x3378cf
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
imulq $0x18, -0xa8(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
shrq $0x20, %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
imulq $0x18, -0xa0(%rbp), %rdx
addq %rdx, %rcx
movq 0x10(%rcx), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
je 0x337abe
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
imulq $0x18, -0xa8(%rbp), %rax
addq %rax, %rsi
movq -0xa0(%rbp), %rdx
subq -0xa8(%rbp), %rdx
movq -0xa8(%rbp), %rcx
movq -0x10(%rbp), %r8
movq -0x38(%rbp), %r9
movq -0x30(%rbp), %r11
movq -0x8(%rbp), %rax
movq 0x30(%rax), %r10
leaq -0x98(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x329410
cmpl $0x0, %eax
je 0x337ab0
cmpl $-0x1, -0x90(%rbp)
je 0x337ab0
movq -0x10(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
jbe 0x3379e7
movq -0x10(%rbp), %rax
movq 0xd0(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xc0(%rcx), %rcx
subq $0x1, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
shrl %eax
movl -0x90(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
jne 0x3379e7
movq -0x10(%rbp), %rax
movq 0xd0(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xc0(%rcx), %rcx
subq $0x1, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
cmpq -0x88(%rbp), %rax
jae 0x3379e2
movq -0x10(%rbp), %rax
movq 0xd0(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rax
subq $0x1, %rax
imulq $0x28, %rax, %rax
addq %rax, %rdi
leaq -0x98(%rbp), %rsi
movl $0x28, %edx
callq 0x2180
jmp 0x337aae
jmp 0x3379e9
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0xc8(%rcx), %rax
jne 0x337a70
movq -0x10(%rbp), %rax
cmpq $0x0, 0xc8(%rax)
je 0x337a26
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rax
shlq %rax
movq %rax, -0xf0(%rbp)
jmp 0x337a34
movl $0x2, %eax
movq %rax, -0xf0(%rbp)
jmp 0x337a34
movq -0xf0(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xc8(%rax)
movq -0x10(%rbp), %rax
movq 0xd0(%rax), %rdi
movq -0x10(%rbp), %rax
imulq $0x28, 0xc8(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xd0(%rax)
movq -0x10(%rbp), %rax
movq 0xd0(%rax), %rdi
movq -0x10(%rbp), %rcx
movq 0xc0(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0xc0(%rcx)
imulq $0x28, %rax, %rax
addq %rax, %rdi
leaq -0x98(%rbp), %rsi
movl $0x28, %edx
callq 0x2180
jmp 0x337aae
jmp 0x337ab0
movq -0xa0(%rbp), %rax
movq %rax, -0xa8(%rbp)
jmp 0x337ac0
movq -0xa0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
jmp 0x33786c
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq $0x0, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0xc0(%rcx), %rax
jae 0x337c17
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0xd0(%rax), %r8
imulq $0x28, -0xa0(%rbp), %rax
addq %rax, %r8
movl -0x14(%rbp), %eax
movl %eax, %r9d
movq -0x10(%rbp), %r10
leaq -0x60(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x32d800
cmpq $0x0, %rax
je 0x337bfe
jmp 0x337b60
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x337bcd
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x337b91
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
shlq %rax
movq %rax, -0xf8(%rbp)
jmp 0x337b9f
movl $0x2, %eax
movq %rax, -0xf8(%rbp)
jmp 0x337b9f
movq -0xf8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
imulq $0x28, 0x10(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x8(%rcx)
imulq $0x28, %rax, %rax
addq %rax, %rdi
leaq -0x60(%rbp), %rsi
movl $0x28, %edx
callq 0x2180
jmp 0x337bfe
jmp 0x337c00
movq -0xa0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
jmp 0x337aee
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
ja 0x337c35
jmp 0x337c35
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nop