// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: filter_u_trans_t(kv_u_trans_t*, ma_ug_t*, asg_t*, unsigned int)
void filter_u_trans_t(kv_u_trans_t *ta, ma_ug_t *ug, asg_t *read_g, uint32_t thres)
{
    u_trans_t *a = NULL, *r_a = NULL;
    ma_utg_t *u = NULL;
    uint32_t i, k, m, j, st, n, r_n;
    uint64_t offset, r_beg, r_end, ovlp, min, max, pass;
    kvec_t(uint32_t) cnt; kv_init(cnt);
    for (k = 0; k < ta->idx.n; k++)
    {
        a = u_trans_a(*ta, k);
        n = u_trans_n(*ta, k);
        if(n == 0) continue;
        kv_resize(uint32_t, cnt, n); cnt.n = n;
        min = a[0].qs; max = a[0].qe; 
        for (i = 0; i < n; i++)
        {
            cnt.a[i] = 0;
            min = MIN(min, a[i].qs);
            max = MAX(max, a[i].qe);
        } 
        

        u = &(ug->u.a[k]); pass = 0;
        for (j = 0, offset = 0; j < u->n; j++)
        {
            pass = 0;
            r_beg = offset; r_end = offset + read_g->seq[u->a[j]>>33].len;
            offset += (uint32_t)u->a[j];
            if(min >= r_end) continue;
            if(max <= r_beg) break;
            for (i = 0; i < n; i++)
            {
                if(cnt.a[i] >= thres || r_beg >= a[i].qe)
                {
                    pass++;
                    continue;
                } 
                ovlp = ((MIN(r_end, a[i].qe) > MAX(r_beg, a[i].qs))?
                                        MIN(r_end, a[i].qe) - MAX(r_beg, a[i].qs):0);
                if(ovlp == (r_end - r_beg))
                {   
                    cnt.a[i]++;
                    if(cnt.a[i] >= thres) pass++;
                }
            }

            if(pass == n) 
            {
                for (i = 0; i < n; i++)
                {
                    if(cnt.a[i] < thres) a[i].del = 1;
                }
                break;
            }
        }

        if(pass < n)
        {
            for (i = 0; i < n; i++)
            {
                if(cnt.a[i] < thres) a[i].del = 1;
            }
        } 
    }
    kv_destroy(cnt);

    for (k = 0; k < ta->idx.n; k++)
    {
        a = u_trans_a(*ta, k);
        n = u_trans_n(*ta, k);
        for (st = 0, i = 1; i <= n; ++i)
        {
            if (i == n || a[i].tn != a[st].tn)///same qn && tn
            {
                get_u_trans_spec(ta, a[st].tn, a[st].qn, &r_a, &r_n);
                
                for (m = st; m < i; m++)
                {
                    if(!a[m].del) continue;
                    
                    for (j = 0; j < r_n; j++)
                    {
                        if(r_a[j].tn == a[m].qn && r_a[j].qn == a[m].tn && 
                           r_a[j].ts == a[m].qs && r_a[j].te == a[m].qe && 
                           r_a[j].qs == a[m].ts && r_a[j].qe == a[m].te &&
                           r_a[j].nw == a[m].nw && r_a[j].rev == a[m].rev)
                        {
                            r_a[j].del = 1;
                            break;
                        }
                    }                    
                }
                st = i;
            }
        }
    }
    /*******************************for debug************************************/
    // for (i = 0; i < ta->n; ++i)
    // {
    //     uint32_t c_q = 0, c_t = 0, s, e;
    //     u = &(ug->u.a[ta->a[i].qn]); s = ta->a[i].qs; e = ta->a[i].qe; 
    //     for (j = 0, offset = 0; j < u->n; j++)
    //     {
    //         r_beg = offset; r_end = offset + read_g->seq[u->a[j]>>33].len;
    //         offset += (uint32_t)u->a[j];

    //         ovlp = ((MIN(r_end, e) > MAX(r_beg, s))? MIN(r_end, e) - MAX(r_beg, s):0);
    //         if(ovlp == (r_end - r_beg))
    //         {   
    //             c_q++;
    //             if(c_q >= thres) break;
    //         }
    //     }


    //     u = &(ug->u.a[ta->a[i].tn]); s = ta->a[i].ts; e = ta->a[i].te; 
    //     for (j = 0, offset = 0; j < u->n; j++)
    //     {
    //         r_beg = offset; r_end = offset + read_g->seq[u->a[j]>>33].len;
    //         offset += (uint32_t)u->a[j];

    //         ovlp = ((MIN(r_end, e) > MAX(r_beg, s))? MIN(r_end, e) - MAX(r_beg, s):0);
    //         if(ovlp == (r_end - r_beg))
    //         {   
    //             c_t++;
    //             if(c_t >= thres) break;
    //         }
    //     }

    //     if(ta->a[i].del && (c_q >= thres && c_t >= thres)) fprintf(stderr, "ERROR\n");
    //     if(!ta->a[i].del && (c_q < thres || c_t < thres)) fprintf(stderr, "ERROR\n");
    // }
    /*******************************for debug************************************/

    for (i = m = 0; i < ta->n; ++i)
    {
        if(ta->a[i].del) continue;
        ta->a[m] = ta->a[i];
        m++;
    }
    ta->n = m;
    kt_u_trans_t_idx(ta, ug->g->n_seq);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0xa0(%rbp)
movq $0x0, -0xa8(%rbp)
movq $0x0, -0x98(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x113957
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x40(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x40(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x50(%rbp)
cmpl $0x0, -0x50(%rbp)
jne 0x1133ee
jmp 0x113949
jmp 0x1133f0
movq -0xa0(%rbp), %rax
movl -0x50(%rbp), %ecx
cmpq %rcx, %rax
jae 0x1134cb
movl -0x50(%rbp), %eax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
shrq %rax
orq -0xa0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
shrq $0x2, %rax
orq -0xa0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
shrq $0x4, %rax
orq -0xa0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
shrq $0x8, %rax
orq -0xa0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
shrq $0x10, %rax
orq -0xa0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
movq -0xa0(%rbp), %rsi
shlq $0x2, %rsi
callq 0x2360
movq %rax, -0x98(%rbp)
jmp 0x1134cd
movl -0x50(%rbp), %eax
movq %rax, -0xa8(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x80(%rbp)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
movq %rax, -0x88(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x1135bc
movq -0x98(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl $0x0, (%rax,%rcx,4)
movq -0x80(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x3c(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
cmpq %rcx, %rax
ja 0x113539
movq -0x80(%rbp), %rax
movq %rax, -0xb0(%rbp)
jmp 0x113550
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x88(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x3c(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
movl 0x4(%rcx), %ecx
cmpq %rcx, %rax
jb 0x113588
movq -0x88(%rbp), %rax
movq %rax, -0xb8(%rbp)
jmp 0x1135a0
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0x88(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1134f6
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x40(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x90(%rbp)
movl $0x0, -0x48(%rbp)
movq $0x0, -0x60(%rbp)
movl -0x48(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x1138ee
movq $0x0, -0x90(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq -0x38(%rbp), %rdx
movq 0x18(%rdx), %rdx
movl -0x48(%rbp), %esi
movq (%rdx,%rsi,8), %rdx
shrq $0x21, %rdx
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x48(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x80(%rbp), %rax
cmpq -0x70(%rbp), %rax
jb 0x113668
jmp 0x1138e0
movq -0x88(%rbp), %rax
cmpq -0x68(%rbp), %rax
ja 0x11367a
jmp 0x1138ee
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x113885
movq -0x98(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0x1c(%rbp), %eax
jae 0x1136b9
movq -0x68(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x3c(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
movl 0x4(%rcx), %ecx
cmpq %rcx, %rax
jb 0x1136d0
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x113877
movq -0x70(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x3c(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
movl 0x4(%rcx), %ecx
cmpq %rcx, %rax
ja 0x1136f7
movq -0x70(%rbp), %rax
movq %rax, -0xc0(%rbp)
jmp 0x11370f
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x68(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x3c(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
cmpq %rcx, %rax
jb 0x113743
movq -0x68(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0x11375a
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq %rax, -0xd0(%rbp)
movq -0xc8(%rbp), %rax
movq -0xd0(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x113815
movq -0x70(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x3c(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
movl 0x4(%rcx), %ecx
cmpq %rcx, %rax
ja 0x113798
movq -0x70(%rbp), %rax
movq %rax, -0xd8(%rbp)
jmp 0x1137b0
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x68(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x3c(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
cmpq %rcx, %rax
jb 0x1137e4
movq -0x68(%rbp), %rax
movq %rax, -0xe8(%rbp)
jmp 0x1137fb
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq %rax, -0xe8(%rbp)
movq -0xe0(%rbp), %rax
movq -0xe8(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0xf0(%rbp)
jmp 0x113820
xorl %eax, %eax
movq %rax, -0xf0(%rbp)
jmp 0x113820
movq -0xf0(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq -0x70(%rbp), %rcx
subq -0x68(%rbp), %rcx
cmpq %rcx, %rax
jne 0x113875
movq -0x98(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movq -0x98(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0x1c(%rbp), %eax
jb 0x113873
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x113875
jmp 0x113877
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x113681
movq -0x90(%rbp), %rax
movl -0x50(%rbp), %ecx
cmpq %rcx, %rax
jne 0x1138de
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x1138dc
movq -0x98(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0x1c(%rbp), %eax
jae 0x1138cf
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movb 0x28(%rax), %cl
andb $0x7f, %cl
orb $-0x80, %cl
movb %cl, 0x28(%rax)
jmp 0x1138d1
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x11389b
jmp 0x1138ee
jmp 0x1138e0
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x1135ec
movq -0x90(%rbp), %rax
movl -0x50(%rbp), %ecx
cmpq %rcx, %rax
jae 0x113947
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x113945
movq -0x98(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
cmpl -0x1c(%rbp), %eax
jae 0x113938
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movb 0x28(%rax), %cl
andb $0x7f, %cl
orb $-0x80, %cl
movb %cl, 0x28(%rax)
jmp 0x11393a
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x113904
jmp 0x113947
jmp 0x113949
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x11339a
movq -0x98(%rbp), %rdi
callq 0x2210
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x113c1f
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x40(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x40(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x50(%rbp)
movl $0x0, -0x4c(%rbp)
movl $0x1, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x50(%rbp), %eax
ja 0x113c0f
movl -0x3c(%rbp), %eax
cmpl -0x50(%rbp), %eax
je 0x1139fd
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movq -0x28(%rbp), %rcx
movl -0x4c(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x14(%rcx), %eax
je 0x113bff
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl -0x4c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %esi
movq -0x28(%rbp), %rax
movl -0x4c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edx
leaq -0x30(%rbp), %rcx
leaq -0x54(%rbp), %r8
callq 0x110ee0
movl -0x4c(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jae 0x113bf9
movq -0x28(%rbp), %rax
movl -0x44(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movb 0x28(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
jne 0x113a5f
jmp 0x113beb
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x54(%rbp), %eax
jae 0x113be9
movq -0x30(%rbp), %rax
movl -0x48(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movq -0x28(%rbp), %rcx
movl -0x44(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jne 0x113bd9
movq -0x30(%rbp), %rax
movl -0x48(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x28(%rbp), %rcx
movl -0x44(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x14(%rcx), %eax
jne 0x113bd9
movq -0x30(%rbp), %rax
movl -0x48(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movq -0x28(%rbp), %rcx
movl -0x44(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jne 0x113bd9
movq -0x30(%rbp), %rax
movl -0x48(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq -0x28(%rbp), %rcx
movl -0x44(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jne 0x113bd9
movq -0x30(%rbp), %rax
movl -0x48(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x28(%rbp), %rcx
movl -0x44(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
jne 0x113bd9
movq -0x30(%rbp), %rax
movl -0x48(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x28(%rbp), %rcx
movl -0x44(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x10(%rcx), %eax
jne 0x113bd9
movq -0x30(%rbp), %rax
movl -0x48(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movsd 0x20(%rax), %xmm0
movq -0x28(%rbp), %rax
movl -0x44(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
ucomisd 0x20(%rax), %xmm0
jne 0x113bd9
jp 0x113bd9
movq -0x30(%rbp), %rax
movl -0x48(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movb 0x28(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %eax
movq -0x28(%rbp), %rcx
movl -0x44(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
movb 0x28(%rcx), %cl
shrb $0x6, %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x113bd9
movq -0x30(%rbp), %rax
movl -0x48(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movb 0x28(%rax), %cl
andb $0x7f, %cl
orb $-0x80, %cl
movb %cl, 0x28(%rax)
jmp 0x113be9
jmp 0x113bdb
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x113a66
jmp 0x113beb
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x113a36
movl -0x3c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x113c01
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1139c1
jmp 0x113c11
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x11396a
movl $0x0, -0x44(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x113c99
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x3c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movb 0x28(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
je 0x113c57
jmp 0x113c8e
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movl -0x3c(%rbp), %eax
imulq $0x30, %rax, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x44(%rbp), %eax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movl $0x30, %edx
callq 0x2180
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x113c2d
movl -0x44(%rbp), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
callq 0x104540
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax,%rax)