// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: worker_for_trans_sec_cut(void*, long, int)
static void worker_for_trans_sec_cut(void *data, long i, int tid) // callback for kt_for()
{
    u_trans_clean_t *s = (u_trans_clean_t*)data;
    kv_u_trans_t *ta = s->ta;
    asg64_v *srt = &(s->srt[tid]);
    u_trans_t *a = NULL, *mz, *cz, t;
    uint32_t n, r_n, id = i, k, l, z, m, wm, wl, len;
    uint32_t ovq, os, oe; uint64_t *ss, *hs, *bu, *wu;

    if(!(s->cu)) {
        a = u_trans_a(*ta, id); n = u_trans_n(*ta, id);
        for (k = r_n = 0; k < n; k++) {///RC_0/RC_1 to a[0, r_n)
            if((a[k].f == RC_0) || (a[k].f == RC_1)) {
                if(k != r_n) {
                    t = a[k]; a[k] = a[r_n]; a[r_n] = t;
                }
                r_n++;
            }
        }
        if(r_n >= n) return;
        if(n-r_n > 1) qsort(a+r_n, n-r_n, sizeof((*a)), cmp_u_trans_weight);
        // if(id == 3924 || id == 160) {
        //     fprintf(stderr, "[M::%s::]\tutg%.6u%c\tr_n::%u\tn::%u\n", __func__,
        //              id + 1, "lc"[s->ug->u.a[id].circ], r_n, n);
        //     for (k = 0; k < n; k++) {
        //         fprintf(stderr, "+[%u]\tutg%.6u%c\t%u\t%u\t%u\t%c\tutg%.6u%c\t%u\t%u\t%u\tnw::%f\tf::%u\n", k,
        //              a[k].qn+1, "lc"[s->ug->u.a[a[k].qn].circ], s->ug->u.a[a[k].qn].len, a[k].qs, a[k].qe, "+-"[a[k].rev],
        //              a[k].tn+1, "lc"[s->ug->u.a[a[k].tn].circ], s->ug->u.a[a[k].tn].len, a[k].ts, a[k].te, a[k].nw, a[k].f);
        //     }
        // }
        srt->n = 0; kv_resize(uint64_t, *srt, (n<<2));
        for (k = 0; k < n; k++) {
            srt->a[srt->n] = a[k].qs;
            srt->a[srt->n] <<= 32;
            srt->a[srt->n] |= k;
            srt->n++;
        }
        ss = srt->a; hs = ss + srt->n; bu = hs + srt->n; wu = bu + srt->n;
        radix_sort_arch64(ss, ss+n);
        for (k = 0; k < n; k++) {
            ss[k] = (uint32_t)ss[k]; hs[ss[k]] = k;
        }
        for (k = r_n; k < n; k++) {
            cz = &(a[k]); len = (cz->qe-cz->qs)*s->sec_rate; m = wm = 0;
            for (z = l = wl = 0; z < n; z++) {
                if(z == hs[k]) {
                    assert(ss[z] == k);
                    continue;
                }
                if(ss[z] > k) continue;///smaller nw than a[k]
                mz = &(a[ss[z]]);
                if(mz->qs >= cz->qe) break;
                if(mz->occ == ((uint32_t)-1)) continue;///has been deleted
                if((mz->f != RC_0) && (mz->f != RC_1) && (cz->nw > (mz->nw*s->sc_sec_rate/**0.95**/))) continue;
                os = MAX(cz->qs, mz->qs); oe = MIN(cz->qe, mz->qe);
                ovq = ((oe > os)? (oe - os):0);
                if(!ovq) continue;
                if(is_connect_arc(cz, mz, s->ug, 0.04) || is_connect_arc(mz, cz, s->ug, 0.04)) continue;

                if((m > 0) && (((uint32_t)bu[m-1]) >= os)) {
                    if(oe > ((uint32_t)bu[m-1])) {
                        l += (oe - ((uint32_t)bu[m-1]));
                        bu[m-1] += (oe - ((uint32_t)bu[m-1]));
                    }
                } else {
                    l += oe - os;
                    bu[m] = os; bu[m] <<= 32; bu[m] |= oe; m++;
                }

                if((wm > 0) && (((uint32_t)wu[wm-1]) >= mz->qs)) {
                    if(mz->qe > ((uint32_t)wu[wm-1])) {
                        wl += (mz->qe - ((uint32_t)wu[wm-1]));
                        wu[wm-1] += (mz->qe - ((uint32_t)wu[wm-1]));
                    }
                } else {
                    wl += mz->qe - mz->qs;
                    wu[wm] = mz->qs; wu[wm] <<= 32; wu[wm] |= mz->qe; wm++;
                }

                if((l > 0) && ((l>=len) || (l>=(wl*s->sec_rate)))) {
                    // if((cz->qn == 3924 && cz->tn == 160) || (cz->tn == 3924 && cz->qn == 160)) {
                    //     fprintf(stderr, "[M::%s]\tutg%.6u%c\t->\tutg%.6u%c\tl::%u\tlen::%u\twl::%u\tsec_rate::%f\n", __func__, 
                    //     cz->qn+1, "lc"[s->ug->u.a[cz->qn].circ], 
                    //     cz->tn+1, "lc"[s->ug->u.a[cz->tn].circ],
                    //     l, len, wl, s->sec_rate);
                    // }
                    cz->occ = ((uint32_t)-1);
                    break;
                }
            }        
        }
        // if(id == 3924 || id == 160) {
        //     for (k = 0; k < n; k++) {
        //         fprintf(stderr, "-[%u]\tutg%.6u%c\t%u\t%u\t%u\t%c\tutg%.6u%c\t%u\t%u\t%u\tnw::%f\tf::%u\tdel::%u\n", k,
        //              a[k].qn+1, "lc"[s->ug->u.a[a[k].qn].circ], s->ug->u.a[a[k].qn].len, a[k].qs, a[k].qe, "+-"[a[k].rev],
        //              a[k].tn+1, "lc"[s->ug->u.a[a[k].tn].circ], s->ug->u.a[a[k].tn].len, a[k].ts, a[k].te, a[k].nw, a[k].f,
        //              (a[k].occ == ((uint32_t)-1))?1:0);
        //     }
        // }
    } else {
        assert(((uint32_t)(s->cu->idx.a[id])) > (s->cu->idx.a[id]>>32)+1);
        for (z = (s->cu->idx.a[id]>>32); z < ((uint32_t)(s->cu->idx.a[id])); z++) {
            a = u_trans_a(*ta, ((uint32_t)s->cu->z.a[z])); 
            n = u_trans_n(*ta, ((uint32_t)s->cu->z.a[z])); 
            for (k = 0; k < n; k++) deep_clean_u_trans(ta, &(a[k]), s->ug, srt, 3000000, 0.5);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl %eax, -0x84(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x10735b
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x84(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x84(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x7c(%rbp)
movl $0x0, -0x80(%rbp)
movl $0x0, -0x88(%rbp)
movl -0x88(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jae 0x106b2a
movq -0x38(%rbp), %rax
movl -0x88(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movb 0x28(%rax), %al
andb $0x3f, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x106a9c
movq -0x38(%rbp), %rax
movl -0x88(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movb 0x28(%rax), %al
andb $0x3f, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x106b14
movl -0x88(%rbp), %eax
cmpl -0x80(%rbp), %eax
je 0x106b0b
movq -0x38(%rbp), %rsi
movl -0x88(%rbp), %eax
imulq $0x30, %rax, %rax
addq %rax, %rsi
leaq -0x78(%rbp), %rdi
movl $0x30, %edx
callq 0x2180
movq -0x38(%rbp), %rsi
movl -0x80(%rbp), %eax
imulq $0x30, %rax, %rax
addq %rax, %rsi
movq -0x38(%rbp), %rdi
movl -0x88(%rbp), %eax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movl $0x30, %edx
callq 0x2180
movq -0x38(%rbp), %rdi
movl -0x80(%rbp), %eax
imulq $0x30, %rax, %rax
addq %rax, %rdi
leaq -0x78(%rbp), %rsi
movl $0x30, %edx
callq 0x2180
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x106b16
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0x106a51
movl -0x80(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jb 0x106b37
jmp 0x1074ce
movl -0x7c(%rbp), %eax
subl -0x80(%rbp), %eax
cmpl $0x1, %eax
jbe 0x106b6b
movq -0x38(%rbp), %rdi
movl -0x80(%rbp), %eax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movl -0x7c(%rbp), %eax
subl -0x80(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
movl $0x30, %edx
leaq -0x4976(%rip), %rcx     # 0x1021f0
callq 0x23e0
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x7c(%rbp), %ecx
shll $0x2, %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x106c5c
movl -0x7c(%rbp), %eax
shll $0x2, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
shrq %rcx
movq -0x30(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x2, %rcx
movq -0x30(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x4, %rcx
movq -0x30(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x8, %rcx
movq -0x30(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x10, %rcx
movq -0x30(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
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)
jmp 0x106c5e
movl $0x0, -0x88(%rbp)
movl -0x88(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jae 0x106cfb
movq -0x38(%rbp), %rax
movl -0x88(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, %edx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x88(%rbp), %eax
movl %eax, %edx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0x106c68
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xd0(%rbp)
movq -0xb8(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movl -0x7c(%rbp), %eax
shlq $0x3, %rax
addq %rax, %rsi
callq 0xc90e0
movl $0x0, -0x88(%rbp)
movl -0x88(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jae 0x106deb
movq -0xb8(%rbp), %rax
movl -0x88(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movl %eax, %edx
movq -0xb8(%rbp), %rax
movl -0x88(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movl -0x88(%rbp), %eax
movl %eax, %edx
movq -0xc0(%rbp), %rax
movq -0xb8(%rbp), %rcx
movl -0x88(%rbp), %esi
movq (%rcx,%rsi,8), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0x106d85
movl -0x80(%rbp), %eax
movl %eax, -0x88(%rbp)
movl -0x88(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jae 0x107356
movq -0x38(%rbp), %rax
movl -0x88(%rbp), %ecx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl (%rax), %ecx
movl 0x4(%rax), %eax
subl %ecx, %eax
cvtsi2sd %rax, %xmm0
movq -0x20(%rbp), %rax
movsd 0x38(%rax), %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, -0xa0(%rbp)
movl $0x0, -0x98(%rbp)
movl $0x0, -0x94(%rbp)
movl $0x0, -0x9c(%rbp)
movl $0x0, -0x8c(%rbp)
movl $0x0, -0x90(%rbp)
movl -0x90(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jae 0x107340
movl -0x90(%rbp), %eax
movq -0xc0(%rbp), %rcx
movl -0x88(%rbp), %edx
cmpq (%rcx,%rdx,8), %rax
jne 0x106ee0
movq -0xb8(%rbp), %rax
movl -0x90(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x88(%rbp), %ecx
cmpq %rcx, %rax
jne 0x106ebc
jmp 0x106edb
leaq 0x2807a8(%rip), %rdi    # 0x38766b
leaq 0x27f9f3(%rip), %rsi    # 0x3868bd
movl $0x3b77, %edx           # imm = 0x3B77
leaq 0x282e7a(%rip), %rcx    # 0x389d50
callq 0x2130
jmp 0x10732c
movq -0xb8(%rbp), %rax
movl -0x90(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x88(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x106f01
jmp 0x10732c
movq -0x38(%rbp), %rax
movq -0xb8(%rbp), %rcx
movl -0x90(%rbp), %edx
imulq $0x30, (%rcx,%rdx,8), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl (%rax), %eax
movq -0x48(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jb 0x106f32
jmp 0x107340
movq -0x40(%rbp), %rax
cmpl $-0x1, 0x18(%rax)
jne 0x106f41
jmp 0x10732c
movq -0x40(%rbp), %rax
movb 0x28(%rax), %al
andb $0x3f, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x106f89
movq -0x40(%rbp), %rax
movb 0x28(%rax), %al
andb $0x3f, %al
movzbl %al, %eax
cmpl $0x1, %eax
je 0x106f89
movq -0x48(%rbp), %rax
movsd 0x20(%rax), %xmm0
movq -0x40(%rbp), %rax
movsd 0x20(%rax), %xmm1
movq -0x20(%rbp), %rax
mulsd 0x40(%rax), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x106f89
jmp 0x10732c
movq -0x48(%rbp), %rax
movl (%rax), %eax
movq -0x40(%rbp), %rcx
cmpl (%rcx), %eax
jb 0x106fa5
movq -0x48(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xd4(%rbp)
jmp 0x106fb1
movq -0x40(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
movl %eax, -0xa8(%rbp)
movq -0x48(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x40(%rbp), %rcx
cmpl 0x4(%rcx), %eax
ja 0x106fdc
movq -0x48(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0xd8(%rbp)
jmp 0x106fe9
movq -0x40(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0xd8(%rbp)
movl -0xd8(%rbp), %eax
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %eax
cmpl -0xa8(%rbp), %eax
jbe 0x107017
movl -0xac(%rbp), %eax
subl -0xa8(%rbp), %eax
movl %eax, -0xdc(%rbp)
jmp 0x107021
xorl %eax, %eax
movl %eax, -0xdc(%rbp)
jmp 0x107021
movl -0xdc(%rbp), %eax
movl %eax, -0xa4(%rbp)
cmpl $0x0, -0xa4(%rbp)
jne 0x10703b
jmp 0x10732c
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movsd 0x277fde(%rip), %xmm0   # 0x37f030
callq 0x102680
cmpl $0x0, %eax
jne 0x10707d
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movsd 0x277fbd(%rip), %xmm0   # 0x37f030
callq 0x102680
cmpl $0x0, %eax
je 0x107082
jmp 0x10732c
cmpl $0x0, -0x94(%rbp)
jbe 0x107139
movq -0xc8(%rbp), %rax
movl -0x94(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
cmpl -0xa8(%rbp), %eax
jb 0x107139
movl -0xac(%rbp), %eax
movq -0xc8(%rbp), %rcx
movl -0x94(%rbp), %edx
subl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
cmpl %ecx, %eax
jbe 0x107137
movl -0xac(%rbp), %eax
movq -0xc8(%rbp), %rcx
movl -0x94(%rbp), %edx
subl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
subl %ecx, %eax
addl -0x8c(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl -0xac(%rbp), %eax
movq -0xc8(%rbp), %rcx
movl -0x94(%rbp), %edx
subl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
subl %ecx, %eax
movl %eax, %eax
movl %eax, %edx
movq -0xc8(%rbp), %rax
movl -0x94(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x1071af
movl -0xac(%rbp), %eax
subl -0xa8(%rbp), %eax
addl -0x8c(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl -0xa8(%rbp), %eax
movl %eax, %edx
movq -0xc8(%rbp), %rax
movl -0x94(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0xc8(%rbp), %rax
movl -0x94(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movl -0xac(%rbp), %eax
movl %eax, %edx
movq -0xc8(%rbp), %rax
movl -0x94(%rbp), %ecx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
cmpl $0x0, -0x98(%rbp)
jbe 0x107269
movq -0xd0(%rbp), %rax
movl -0x98(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movq -0x40(%rbp), %rcx
cmpl (%rcx), %eax
jb 0x107269
movq -0x40(%rbp), %rax
movl 0x4(%rax), %eax
movq -0xd0(%rbp), %rcx
movl -0x98(%rbp), %edx
subl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
cmpl %ecx, %eax
jbe 0x107267
movq -0x40(%rbp), %rax
movl 0x4(%rax), %eax
movq -0xd0(%rbp), %rcx
movl -0x98(%rbp), %edx
subl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
subl %ecx, %eax
addl -0x9c(%rbp), %eax
movl %eax, -0x9c(%rbp)
movq -0x40(%rbp), %rax
movl 0x4(%rax), %eax
movq -0xd0(%rbp), %rcx
movl -0x98(%rbp), %edx
subl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
subl %ecx, %eax
movl %eax, %eax
movl %eax, %edx
movq -0xd0(%rbp), %rax
movl -0x98(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x1072e1
movq -0x40(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x40(%rbp), %rcx
subl (%rcx), %eax
addl -0x9c(%rbp), %eax
movl %eax, -0x9c(%rbp)
movq -0x40(%rbp), %rax
movl (%rax), %eax
movl %eax, %edx
movq -0xd0(%rbp), %rax
movl -0x98(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0xd0(%rbp), %rax
movl -0x98(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x40(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edx
movq -0xd0(%rbp), %rax
movl -0x98(%rbp), %ecx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x98(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x98(%rbp)
cmpl $0x0, -0x8c(%rbp)
jbe 0x10732a
movl -0x8c(%rbp), %eax
cmpl -0xa0(%rbp), %eax
jae 0x10731d
movl -0x8c(%rbp), %eax
cvtsi2sd %rax, %xmm0
movl -0x9c(%rbp), %eax
cvtsi2sd %rax, %xmm1
movq -0x20(%rbp), %rax
mulsd 0x38(%rax), %xmm1
ucomisd %xmm1, %xmm0
jb 0x10732a
movq -0x48(%rbp), %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
jmp 0x107340
jmp 0x10732c
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
jmp 0x106e76
jmp 0x107342
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0x106df4
jmp 0x1074ce
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
movq 0x28(%rax), %rax
movl -0x84(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq -0x20(%rbp), %rcx
movq 0x50(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0x84(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jbe 0x107398
jmp 0x1073b7
leaq 0x2829e2(%rip), %rdi    # 0x389d81
leaq 0x27f517(%rip), %rsi    # 0x3868bd
movl $0x3bad, %edx           # imm = 0x3BAD
leaq 0x28299e(%rip), %rcx    # 0x389d50
callq 0x2130
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
movq 0x28(%rax), %rax
movl -0x84(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x90(%rbp)
movl -0x90(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x50(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0x84(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
cmpl %ecx, %eax
jae 0x1074cc
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x20(%rbp), %rdx
movq 0x50(%rdx), %rdx
movq 0x10(%rdx), %rdx
movl -0x90(%rbp), %esi
movq (%rdx,%rsi,8), %rdx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x50(%rcx), %rcx
movq 0x10(%rcx), %rcx
movl -0x90(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x7c(%rbp)
movl $0x0, -0x88(%rbp)
movl -0x88(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jae 0x1074b6
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x88(%rbp), %eax
imulq $0x30, %rax, %rax
addq %rax, %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movq -0x30(%rbp), %rcx
movl $0x2dc6c0, %r8d         # imm = 0x2DC6C0
movsd 0x27add0(%rip), %xmm0   # 0x382270
callq 0x102d30
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0x107467
jmp 0x1074b8
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
jmp 0x1073d7
jmp 0x1074ce
addq $0xe0, %rsp
popq %rbp
retq
nopw (%rax,%rax)