// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: clean_u_trans_t_idx_filter_adv(kv_u_trans_t*, ma_ug_t*, asg_t*, double, unsigned long)
void clean_u_trans_t_idx_filter_adv(kv_u_trans_t *ta, ma_ug_t *ug, asg_t *read_g, double sc_sec_rate, uint64_t uniform_only)
{
    u_trans_clean_t sl; uint64_t k, i, l, st, occ; ha_mzl_t *tz;
    ha_mzl_v srt_a; kv_u_trans_t *bl; u_trans_t *z;
    memset(&sl, 0, sizeof(sl)); kv_init(srt_a);
    
    kt_u_trans_t_idx(ta, ug->g->n_seq);
    sl.n_thread = asm_opt.thread_num; sl.ug = ug; sl.rg = read_g; sl.ta = ta;
    CALLOC(sl.res, sl.n_thread); 
    sl.ov_cutoff = 3; sl.small_ov_rate = 0.8; sl.sc_sec_rate = sc_sec_rate;
    // dbg_prt_utg_trans(ta, ug, "pre");
    kt_for(sl.n_thread, worker_for_trans_clean_re, &sl, sl.ta->idx.n);

    for (i = srt_a.n = occ = 0; i < sl.n_thread; i++) {
		bl = &(sl.res[i]); 
		if(!(bl->n)) continue;
		for (k = 1, l = 0; k <= bl->n; k++) {
			if(k == bl->n || bl->a[k].qn != bl->a[l].qn) {
				if(k > l) {
					kv_pushp(ha_mzl_t, srt_a, &tz);
					tz->x = bl->a[l].qn; tz->x <<= 32; tz->x |= i;
					tz->rid = l>>32; tz->pos = (uint32_t)l;
					occ += (k - l);
				}
				l = k;
			}
		}
	}
    // fprintf(stderr, "[M::%s::] occ::%lu \n", __func__, occ);
    assert(srt_a.n <= sl.ug->u.n); 
	radix_sort_ha_mzl_t_srt1(srt_a.a, srt_a.a + srt_a.n);
    occ <<= 1; ta->n = 0; kv_resize(u_trans_t, *ta, occ); 
    for (i = 0; i < srt_a.n; i++) {
		tz = &(srt_a.a[i]);
		bl = &(sl.res[(uint32_t)(tz->x)]);
		k = tz->rid; k <<= 32; k += tz->pos;
		assert(bl->a[k].qn == (tz->x>>32));
		for (; (k < bl->n) && (bl->a[k].qn == (tz->x>>32)); k++) {
			if(bl->a[k].qn == bl->a[k].tn) continue;
			kv_pushp(u_trans_t, *ta, &z); 
            (*z) = bl->a[k]; z->occ = 0; if(z->f == RC_3) z->f = RC_2;

            kv_pushp(u_trans_t, *ta, &z); 
            (*z) = bl->a[k]; z->occ = 0; if(z->f == RC_3) z->f = RC_2;
            z->qn = bl->a[k].tn; z->qs = bl->a[k].ts; z->qe = bl->a[k].te;
            z->tn = bl->a[k].qn; z->ts = bl->a[k].qs; z->te = bl->a[k].qe;
		}
	}

    for (k = 0; k < sl.n_thread; k++) free(sl.res[k].a); 
    free(sl.res); kv_destroy(srt_a);
    kt_u_trans_t_idx(ta, ug->g->n_seq);
    // dbg_prt_utg_trans(ta, ug, "after");
    if(uniform_only) return;



    CALLOC(sl.srt, sl.n_thread); sl.sec_rate = 0.5; sl.sc_sec_rate = sc_sec_rate;
    kt_for(sl.n_thread, worker_for_trans_sec_cut, &sl, sl.ta->idx.n);
    sl.cu = gen_u_trans_cluster(ta);
    kt_for(sl.n_thread, worker_for_trans_sec_cut, &sl, sl.cu->idx.n);
    free(sl.cu->idx.a); free(sl.cu->z.a); free(sl.cu);
    for (k = 0; k < sl.n_thread; k++) free(sl.srt[k].a); free(sl.srt);

    for (k = st = 0; k < ta->n; k++) {
        if(ta->a[k].occ == ((uint32_t)-1)) continue;
        ta->a[st++] = ta->a[k];
    }
    ta->n = st;
    for (st = 0, i = 1; i <= ta->n; ++i) {
        if (i == ta->n || ta->a[i].qn != ta->a[st].qn) {
            ta->idx.a[ta->a[st].qn] = (((uint64_t)st)<<32)|(i-st);
            st = i;
        }
    }
    // dbg_prt_utg_extra_trans(ta, ug, asm_opt.output_file_name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x58, %edx
callq 0x2100
movl $0x0, -0xbc(%rbp)
movl $0x0, -0xc0(%rbp)
movq $0x0, -0xb8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
callq 0x104540
leaq 0x2bf2c8(%rip), %rax    # 0x3c47f8
movslq 0x7c(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
movl $0x30, %esi
callq 0x2140
movq %rax, -0x70(%rbp)
movq $0x3, -0x58(%rbp)
movsd 0x27ccbe(%rip), %xmm0   # 0x382230
movsd %xmm0, -0x50(%rbp)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x60(%rbp), %rax
movl %eax, %edi
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rcx
leaq 0xb1a(%rip), %rsi       # 0x1060b0
leaq -0x80(%rbp), %rdx
callq 0x16d710
movq $0x0, -0xa8(%rbp)
movl $0x0, -0xc0(%rbp)
movq $0x0, -0x90(%rbp)
movq -0x90(%rbp), %rax
cmpq -0x60(%rbp), %rax
jae 0x105817
movq -0x70(%rbp), %rax
imulq $0x30, -0x90(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x1055f8
jmp 0x105800
movq $0x1, -0x88(%rbp)
movq $0x0, -0x98(%rbp)
movq -0x88(%rbp), %rax
movq -0xc8(%rbp), %rcx
cmpq (%rcx), %rax
ja 0x1057fe
movq -0x88(%rbp), %rax
movq -0xc8(%rbp), %rcx
cmpq (%rcx), %rax
je 0x105670
movq -0xc8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x30, -0x88(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0xc8(%rbp), %rcx
movq 0x10(%rcx), %rcx
imulq $0x30, -0x98(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
je 0x1057e5
movq -0x88(%rbp), %rax
cmpq -0x98(%rbp), %rax
jbe 0x1057d7
jmp 0x105686
movl -0xc0(%rbp), %eax
cmpl -0xbc(%rbp), %eax
jne 0x1056e3
cmpl $0x0, -0xbc(%rbp)
je 0x1056ad
movl -0xbc(%rbp), %eax
shll %eax
movl %eax, -0xd4(%rbp)
jmp 0x1056ba
movl $0x2, %eax
movl %eax, -0xd4(%rbp)
jmp 0x1056ba
movl -0xd4(%rbp), %eax
movl %eax, -0xbc(%rbp)
movq -0xb8(%rbp), %rdi
movl -0xbc(%rbp), %eax
imulq $0x18, %rax, %rsi
callq 0x2360
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movl -0xc0(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0xc0(%rbp)
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
movq -0xc8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x30, -0x98(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, %ecx
movq -0xb0(%rbp), %rax
movq %rcx, (%rax)
movq -0xb0(%rbp), %rax
movq (%rax), %rcx
shlq $0x20, %rcx
movq %rcx, (%rax)
movq -0x90(%rbp), %rcx
movq -0xb0(%rbp), %rax
orq (%rax), %rcx
movq %rcx, (%rax)
movq -0x98(%rbp), %rdx
shrq $0x20, %rdx
movq -0xb0(%rbp), %rax
movq 0x8(%rax), %rcx
andq $0x7fffffff, %rdx       # imm = 0x7FFFFFFF
andq $-0x80000000, %rcx      # imm = 0x80000000
orq %rdx, %rcx
movq %rcx, 0x8(%rax)
movq -0x98(%rbp), %rax
movl %eax, %eax
movl %eax, %edx
movq -0xb0(%rbp), %rax
movq 0x8(%rax), %rcx
movabsq $0xffffffff, %rsi       # imm = 0xFFFFFFFF
andq %rsi, %rdx
shlq $0x20, %rdx
movabsq $0xffffffff, %rsi       # imm = 0xFFFFFFFF
andq %rsi, %rcx
orq %rdx, %rcx
movq %rcx, 0x8(%rax)
movq -0x88(%rbp), %rax
subq -0x98(%rbp), %rax
addq -0xa8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x1057e7
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x10560e
jmp 0x105800
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x1055bf
movl -0xc0(%rbp), %eax
movq -0x80(%rbp), %rcx
cmpq (%rcx), %rax
ja 0x105828
jmp 0x105847
leaq 0x281f0e(%rip), %rdi    # 0x38773d
leaq 0x281087(%rip), %rsi    # 0x3868bd
movl $0x3cac, %edx           # imm = 0x3CAC
leaq 0x281fc9(%rip), %rcx    # 0x38780b
callq 0x2130
movq -0xb8(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movl -0xc0(%rbp), %eax
imulq $0x18, %rax, %rax
addq %rax, %rsi
callq 0xcaeb0
movq -0xa8(%rbp), %rax
shlq %rax
movq %rax, -0xa8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0xa8(%rbp), %rax
jae 0x10595f
movq -0xa8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
shrq %rcx
movq -0x8(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x2, %rcx
movq -0x8(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x4, %rcx
movq -0x8(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x8, %rcx
movq -0x8(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x10, %rcx
movq -0x8(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
imulq $0x30, 0x8(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x105961
movq $0x0, -0x90(%rbp)
movq -0x90(%rbp), %rax
movl -0xc0(%rbp), %ecx
cmpq %rcx, %rax
jae 0x105dcb
movq -0xb8(%rbp), %rax
imulq $0x18, -0x90(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
movq -0x70(%rbp), %rax
movq -0xb0(%rbp), %rcx
movq (%rcx), %rcx
movl %ecx, %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xc8(%rbp)
movq -0xb0(%rbp), %rax
movq 0x8(%rax), %rax
andq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
shlq $0x20, %rax
movq %rax, -0x88(%rbp)
movq -0xb0(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
addq -0x88(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0xc8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x30, -0x88(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0xb0(%rbp), %rcx
movq (%rcx), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
jne 0x105a2e
jmp 0x105a4d
leaq 0x281d5f(%rip), %rdi    # 0x387794
leaq 0x280e81(%rip), %rsi    # 0x3868bd
movl $0x3cb3, %edx           # imm = 0x3CB3
leaq 0x281dc3(%rip), %rcx    # 0x38780b
callq 0x2130
jmp 0x105a4f
movq -0x88(%rbp), %rcx
movq -0xc8(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0xd5(%rbp)
jae 0x105a9d
movq -0xc8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x30, -0x88(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0xb0(%rbp), %rcx
movq (%rcx), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
sete %al
movb %al, -0xd5(%rbp)
movb -0xd5(%rbp), %al
testb $0x1, %al
jne 0x105aac
jmp 0x105db2
movq -0xc8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x30, -0x88(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0xc8(%rbp), %rcx
movq 0x10(%rcx), %rcx
imulq $0x30, -0x88(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x14(%rcx), %eax
jne 0x105ae5
jmp 0x105d9b
jmp 0x105ae7
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x105b55
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x105b17
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xe0(%rbp)
jmp 0x105b25
movl $0x2, %eax
movq %rax, -0xe0(%rbp)
jmp 0x105b25
movq -0xe0(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
imulq $0x30, 0x8(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xd0(%rbp)
movq -0xc8(%rbp), %rax
movq 0x10(%rax), %rsi
imulq $0x30, -0x88(%rbp), %rax
addq %rax, %rsi
movq -0xd0(%rbp), %rdi
movl $0x30, %edx
callq 0x2180
movq -0xd0(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0xd0(%rbp), %rax
movb 0x28(%rax), %al
andb $0x3f, %al
movzbl %al, %eax
cmpl $0x3, %eax
jne 0x105bd8
movq -0xd0(%rbp), %rax
movb 0x28(%rax), %cl
andb $-0x40, %cl
orb $0x2, %cl
movb %cl, 0x28(%rax)
jmp 0x105bda
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x105c48
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x105c0a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xe8(%rbp)
jmp 0x105c18
movl $0x2, %eax
movq %rax, -0xe8(%rbp)
jmp 0x105c18
movq -0xe8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
imulq $0x30, 0x8(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xd0(%rbp)
movq -0xc8(%rbp), %rax
movq 0x10(%rax), %rsi
imulq $0x30, -0x88(%rbp), %rax
addq %rax, %rsi
movq -0xd0(%rbp), %rdi
movl $0x30, %edx
callq 0x2180
movq -0xd0(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0xd0(%rbp), %rax
movb 0x28(%rax), %al
andb $0x3f, %al
movzbl %al, %eax
cmpl $0x3, %eax
jne 0x105ccb
movq -0xd0(%rbp), %rax
movb 0x28(%rax), %cl
andb $-0x40, %cl
orb $0x2, %cl
movb %cl, 0x28(%rax)
movq -0xc8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x30, -0x88(%rbp), %rcx
addq %rcx, %rax
movl 0x14(%rax), %ecx
movq -0xd0(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0xc8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x30, -0x88(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
movq -0xd0(%rbp), %rax
movl %ecx, (%rax)
movq -0xc8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x30, -0x88(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
movq -0xd0(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0xc8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x30, -0x88(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
movq -0xd0(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0xc8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x30, -0x88(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %ecx
movq -0xd0(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0xc8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x30, -0x88(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
movq -0xd0(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x105a4f
jmp 0x105db4
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x10596c
movq $0x0, -0x88(%rbp)
movq -0x88(%rbp), %rax
cmpq -0x60(%rbp), %rax
jae 0x105e0f
movq -0x70(%rbp), %rax
imulq $0x30, -0x88(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
callq 0x2210
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x105dd6
movq -0x70(%rbp), %rdi
callq 0x2210
movq -0xb8(%rbp), %rdi
callq 0x2210
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
callq 0x104540
cmpq $0x0, -0x28(%rbp)
je 0x105e4a
jmp 0x10609d
movq -0x60(%rbp), %rdi
movl $0x18, %esi
callq 0x2140
movq %rax, -0x38(%rbp)
movsd 0x27c40c(%rip), %xmm0   # 0x382270
movsd %xmm0, -0x48(%rbp)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x60(%rbp), %rax
movl %eax, %edi
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rcx
leaq 0xb18(%rip), %rsi       # 0x1069a0
leaq -0x80(%rbp), %rdx
callq 0x16d710
movq -0x8(%rbp), %rdi
callq 0x105080
movq %rax, -0x30(%rbp)
movq -0x60(%rbp), %rax
movl %eax, %edi
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rcx
leaq 0xaed(%rip), %rsi       # 0x1069a0
leaq -0x80(%rbp), %rdx
callq 0x16d710
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x2210
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2210
movq -0x30(%rbp), %rdi
callq 0x2210
movq $0x0, -0x88(%rbp)
movq -0x88(%rbp), %rax
cmpq -0x60(%rbp), %rax
jae 0x105f23
movq -0x38(%rbp), %rax
imulq $0x18, -0x88(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
callq 0x2210
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x105eea
movq -0x38(%rbp), %rdi
callq 0x2210
movq $0x0, -0xa0(%rbp)
movq $0x0, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x105fc2
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x30, -0x88(%rbp), %rcx
addq %rcx, %rax
cmpl $-0x1, 0x18(%rax)
jne 0x105f6d
jmp 0x105fae
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
imulq $0x30, -0x88(%rbp), %rax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0xa0(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xa0(%rbp)
imulq $0x30, %rax, %rax
addq %rax, %rdi
movl $0x30, %edx
callq 0x2180
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x105f42
movq -0xa0(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0xa0(%rbp)
movq $0x1, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
ja 0x10609d
movq -0x90(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
je 0x106038
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x30, -0x90(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
imulq $0x30, -0xa0(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
je 0x106084
movq -0xa0(%rbp), %rdx
shlq $0x20, %rdx
movq -0x90(%rbp), %rax
subq -0xa0(%rbp), %rax
orq %rax, %rdx
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
imulq $0x30, -0xa0(%rbp), %rsi
addq %rsi, %rcx
movl 0x8(%rcx), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x90(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x106086
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x105fe6
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)