// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: worker_for_ul_rescall_alignment(void*, long, int)
static void worker_for_ul_rescall_alignment(void *data, long i, int tid) // callback for kt_for()
{
    utepdat_t *s = (utepdat_t*)data;
    ha_ovec_buf_t *b = s->hab[tid];
    glchain_t *bl = &(s->ll[tid]);
    int64_t /**rid = s->id+i,**/ winLen = MIN((((double)THRESHOLD_MAX_SIZE)/s->opt->diff_ec_ul), WINDOW), ton = 0;
	uint32_t high_occ = 2, phase = 1, k;
	asg64_v b0, b1, b2; window_list p; memset(&p, 0, sizeof(p));
	overlap_region *aux_o = NULL;
    // uint64_t align = 0;
    
	// if(UL_INF.a[s->id+i].rlen != s->len[i]) {
	// fprintf(stderr, "[M::%s] rid:%ld, s->len:%lu, UL_INF->rlen:%u\n", __func__, s->id+i, s->len[i], UL_INF.a[s->id+i].rlen);
	// }
	// assert(UL_INF.a[s->id+i].rlen == s->len[i]);
    // void *km = s->buf?(s->buf[tid]?s->buf[tid]->km:NULL):NULL;
    // if(s->id+i!=0/** && s->id+i!=4 && s->id+i!=5**/) return;
	// if(s->id+i!=300) return;
	// fprintf(stderr, "\n[M::%s] rid:%ld, s->len:%lu\n", __func__, s->id+i, s->len[i]);
	// if((s->id+i!=871) && (s->id+i!=963) && (s->id+i!=980)) return;
	// if(s->id+i!=944) return;
	// if(s->id+i != 35437) return;
	// if((s->id+i != 7086) && (s->id+i != 51705) && (s->id+i != 266022) && (s->id+i != 353608)
	// 		&& (s->id+i != 399416) && (s->id+i != 403014) && (s->id+i != 420915) && (s->id+i != 603855)
	// 		&& (s->id+i != 680134) && (s->id+i != 766261) && (s->id+i != 794527)) {
	// 	return;
	// }
	// char *as = NULL; 
	// asprintf(&as, "\n[M::%s] rid::%ld, len::%lu, name::%.*s\n", __func__, s->id+i, s->len[i], (int32_t)UL_INF.nid.a[s->id+i].n, UL_INF.nid.a[s->id+i].a);
    // push_vlog(&(overall_zdbg->a[s->id+i]), as); free(as); as = NULL;
	// fprintf(stderr, "\n[M::%s] rid::%ld, len::%lu, name::%.*s\n", __func__, s->id+i, s->len[i],
	// (int32_t)UL_INF.nid.a[s->id+i].n, UL_INF.nid.a[s->id+i].a);
	// fprintf(stderr, ">%.*s\n%.*s\n", (int32_t)UL_INF.nid.a[s->id+i].n, UL_INF.nid.a[s->id+i].a, 
	// (int32_t)s->len[i], s->seq[i]);

    // if (memcmp(UL_INF.nid.a[s->id+i].a, "d0aab024-b3a7-40fb-83cc-22c3d6d951f8", UL_INF.nid.a[s->id+i].n-1)) return;
    // fprintf(stderr, "[M::%s::] ==> len: %lu\n", __func__, s->len[i]);
    // ha_get_ul_candidates_interface(b->abl, i, s->seq[i], s->len[i], s->opt->w, s->opt->k, s->uu, &b->olist, &b->olist_hp, &b->clist, s->opt->bw_thres, 
    //     s->opt->max_n_chain, 1, NULL, &b->r_buf, &(b->tmp_region), NULL, &(b->sp), 1, NULL);
    ul_map_lchain(b->abl, (uint32_t)-1, s->seq[i], s->len[i], s->opt->w, s->opt->k, s->uu, &b->olist, &b->clist, s->opt->bw_thres, 
            s->opt->max_n_chain, 1, NULL, &(b->tmp_region), NULL, &(b->sp), &high_occ, NULL, 0, 1, 0.2, /**0**/2, 1/**3**/);

    clear_Cigar_record(&b->cigar1);
    clear_Round2_alignment(&b->round2);
    // return;
    // b->num_correct_base += overlap_statistics(&b->olist, NULL, 0);   

	// int fully_cov, abnormal;
    // b->self_read.seq = s->seq[i]; b->self_read.length = s->len[i]; b->self_read.size = 0;
    // correct_ul_overlap(&b->olist, s->uu, &b->self_read, &b->correct, &b->ovlp_read, &b->POA_Graph, &b->DAGCon,
    //         &b->cigar1, &b->hap, &b->round2, &b->r_buf, &(b->tmp_region.w_list), 0, 1, &fully_cov, &abnormal, s->opt->diff_ec_ul, winLen, NULL);
	// memset(&b->self_read, 0, sizeof(b->self_read));

	ul_lalign(&b->olist, &b->clist, s->uu, s->uopt, s->seq[i], s->len[i], &b->self_read, &b->ovlp_read,
                        &b->correct, &b->exz, &b->hap, &b->r_buf, aux_o, s->opt->diff_ec_ul, winLen, NULL, s->id+i, s->opt->k, &(s->sps[tid]), s->mm, &(s->mk[tid]), NULL);
	// ul_lalign_old_ed(&b->olist, &b->clist, s->uu, s->seq[i], s->len[i], &b->self_read, &b->ovlp_read,
    //                     &b->correct, &b->hap, &b->r_buf, s->opt->diff_ec_ul, winLen, 1, NULL);
	ton = b->olist.length;//all alignments pass similary check
	aux_o = gen_aux_ovlp(&b->olist);///must be here
	gl_chain_flter(&b->olist, &b->correct, &(s->sps[tid]), bl, s->uu, s->opt->diff_ec_ul, winLen, s->len[i], s->uopt, &phase);

	// fprintf(stderr, "[M::%s] rid::%ld, len::%lu, name::%.*s, phase::%u\n", __func__, s->id+i, s->len[i],
	// 		(int32_t)UL_INF.nid.a[s->id+i].n, UL_INF.nid.a[s->id+i].a, phase);
	if(phase && gen_shared_intervals(&b->olist, s->uu, s->uopt, winLen, &b->r_buf, &(bl->lo))) {
		filter_topN(&b->olist, &(bl->lo), s->len[i], winLen, UL_TOPN, bl);
		// update_shared_intervals(&b->olist, s->uu, s->uopt, NULL, &b->ovlp_read, &b->r_buf, &(s->sps[tid]), s->len[i], winLen, &(bl->lo), s->id+i);
		
		copy_asg_arr(b0, b->hap.snp_srt); copy_asg_arr(b1, s->sps[tid]); copy_asg_arr(b2, b->r_buf.a); 
		// update_shared_intervals(&b->olist, s->uu, s->uopt, NULL, &b->ovlp_read, &b0, &b1, &b2, s->len[i], winLen, &(bl->lo), s->id+i);
		update_sketch_trace(&b->olist, s->uu, s->uopt, NULL, &b->ovlp_read, &b0, &b1, &b2, s->len[i], winLen, &(bl->lo), s->id+i, MAX_LGAP(s->len[i]), s->opt->diff_ec_ul);
		copy_asg_arr(b->hap.snp_srt, b0); copy_asg_arr(s->sps[tid], b1); copy_asg_arr(b->r_buf.a, b2); 
		
		ul_lalign(&b->olist, &b->clist, s->uu, s->uopt, s->seq[i], s->len[i], &b->self_read, &b->ovlp_read,
						&b->correct, &b->exz, &b->hap, &b->r_buf, aux_o, s->opt->diff_ec_ul, winLen, &(bl->lo), s->id+i, s->opt->k, &(s->sps[tid]), s->mm, &(s->mk[tid]), NULL);
		// ul_lalign_old_ed(&b->olist, &b->clist, s->uu, s->seq[i], s->len[i], &b->self_read, &b->ovlp_read,
		//                 &b->correct, &b->hap, &b->r_buf, s->opt->diff_ec_ul, winLen, 0, NULL);
		// fprintf(stderr, "\n[M::%s] b->olist.length::%lu, ton::%ld\n", __func__, 
		// b->olist.length, ton);
		///recover alignments
		for (k = b->olist.length; k < ton; k++) {
			b->olist.list[k].w_list.n = 0;
			p.x_start = b->olist.list[k].x_pos_s; 
			p.x_end = b->olist.list[k].x_pos_e+1;
			p.clen = b->olist.list[k].non_homopolymer_errors;
			kv_push(window_list, b->olist.list[k].w_list, p);
			b->olist.list[k].align_length = 0; 
			b->olist.list[k].overlapLen = b->olist.list[k].x_pos_e+1-b->olist.list[k].x_pos_s;
			// fprintf(stderr, "[M::%s]\tutg%.6u%c\txl::%lu\tx::[%u,\t%u)\t%c\tyl::%u\ty::[%u,\t%u)\tsec::%u\n", 
			// __func__, b->olist.list[k].y_id + 1, "lc"[s->uu->ug->u.a[b->olist.list[k].y_id].circ], 
			// s->len[i], b->olist.list[k].x_pos_s, b->olist.list[k].x_pos_e+1, "+-"[b->olist.list[k].y_pos_strand], 
			// s->uu->ug->u.a[b->olist.list[k].y_id].len, b->olist.list[k].y_pos_s, b->olist.list[k].y_pos_e+1, 
			// b->olist.list[k].non_homopolymer_errors);
		}
		b->olist.length = ton;
	} else {
		for (k = 0; k < b->olist.length; k++) {
			b->olist.list[k].w_list.n = 0;
			p.x_start = b->olist.list[k].x_pos_s; 
			p.x_end = b->olist.list[k].x_pos_e+1;
			p.clen = 0;
			kv_push(window_list, b->olist.list[k].w_list, p);
			b->olist.list[k].align_length = b->olist.list[k].overlapLen = 
										b->olist.list[k].x_pos_e+1-b->olist.list[k].x_pos_s;
			b->olist.list[k].non_homopolymer_errors = 0;
		}
	}
	
	// prt_overlap_region_alloc_ol(&(b->olist), s->id+i);
	
	
	gl_chain(s->buf[tid], &(UL_INF.a[s->id+i]), &b->olist, &(b->clist.chainDP), &b->hap, &(s->sps[tid]), bl, &(s->gdp[tid]), s->uu, s->opt->diff_ec_ul, winLen, s->len[i], s->uopt, s->id+i, tid, NULL);

	// exit(1);
    // uint64_t k;
    // for (k = 0; k < b->olist.length; k++) {
    //  if(b->olist.list[k].is_match == 1) b->num_correct_base += b->olist.list[k].x_pos_e+1-b->olist.list[k].x_pos_s;
    //  if(b->olist.list[k].is_match == 2) b->num_recorrect_base += b->olist.list[k].x_pos_e+1-b->olist.list[k].x_pos_s;
    // }


    // gl_chain_refine(&b->olist, &b->correct, &b->hap, bl, s->uu, s->opt->diff_ec_ul, winLen, s->len[i], km);
    // gl_chain_refine_advance_combine(s->buf[tid], &(UL_INF.a[s->id+i]), &b->olist, &b->correct, &b->hap, &(s->sps[tid]), bl, &(s->gdp[tid]), s->uu, s->opt->diff_ec_ul, winLen, s->len[i], s->uopt, s->id+i, tid, NULL);
    // return;
    // b->num_read_base += b->self_read.length;
    // b->num_correct_base += b->correct.corrected_base;
    // b->num_recorrect_base += b->round2.dumy.corrected_base;
    
    if(UL_INF.a[s->id+i].dd == 1 || UL_INF.a[s->id+i].dd == 2) {
        b->num_correct_base++;
    }
	if(UL_INF.a[s->id+i].dd != 3) {
		free(s->seq[i]); s->seq[i] = NULL; 
	}
    s->hab[tid]->num_read_base++;
	// fprintf(stderr, "[M::%s] rid:%ld, dd:%u\n", __func__, s->id+i, UL_INF.a[s->id+i].dd);
    // int64_t mem[6], mem_hab[6];
    // if(get_utepdat_t_mem_tid(s, tid, mem, mem_hab)>((int64_t)5*(int64_t)1073741824)) {
    //     fprintf(stderr, "[M::%s::tid->%d::rid->%ld] buffer[0]: %.3fGB(%.3fGB::%.3fGB::%.3fGB::%.3fGB::%.3fGB), buffer[1]: %.3fGB, buffer[2]: %.3fGB, buffer[3]: %.3fGB, buffer[4]: %.3fGB, buffer[5]: %.3fGB\n", 
    //             __func__, tid, i, mem[0]/1073741824.0, 
	// 			mem_hab[0]/1073741824.0, mem_hab[1]/1073741824.0, mem_hab[2]/1073741824.0, 
	// 			mem_hab[3]/1073741824.0, mem_hab[4]/1073741824.0,
	// 			mem[1]/1073741824.0, mem[2]/1073741824.0,
    //             mem[3]/1073741824.0, mem[4]/1073741824.0, mem[5]/1073741824.0);
    // }

    // align = kv_ul_ov_t_statistics(&(bl->tk), i, &(b->num_recorrect_base));
    // if(align == s->len[i]) {
    //  free(s->seq[i]); s->seq[i] = NULL;
    // }
    // b->num_correct_base += align;

    // uint64_t k;
    // b->num_read_base += overlap_statistics(&b->olist, NULL, NULL, 1);
    // for (k = 0; k < bl->tk.n; k++) {
    //  if(bl->tk.a[k].sec == 0) b->num_correct_base += bl->tk.a[k].qe - bl->tk.a[k].qs;
    //  if(bl->tk.a[k].sec > 0) b->num_recorrect_base += bl->tk.a[k].qe - bl->tk.a[k].qs;
    // }
    // for (k = 0; k < bl->lo.n; k++) {
    //  b->num_read_base += bl->lo.a[k].qe - bl->lo.a[k].qs;
    // }

    // uint32_t l1 = overlap_statistics(&b->olist, s->uu->ug, 1), l2 = overlap_statistics(&b->olist, s->uu->ug, 2);
    // 
    // if(l1 == 0 && l2 > 0) fprintf(stderr, "[M::%s::%lu::no_match]\n", UL_INF.nid.a[s->id+i].a, s->len[i]);
    // fprintf(stderr, "[M::%s::%lu::] l1->%u; l2->%u\n", UL_INF.nid.a[s->id+i].a, s->len[i], l1, l2);
    // fprintf(stderr, "[M::%s::rid->%ld] done\n", __func__, s->id+i);
	// exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %r11
movq (%rdi), %rdi
movslq %edx, %rbx
imulq $0x68, %rbx, %rax
addq 0x88(%r11), %rax
movq %rax, 0x60(%rsp)
movq 0x80(%r11), %rax
movsd 0x42e15(%rip), %xmm0    # 0x225520
divsd 0x68(%rdi), %xmm0
minsd 0x42e10(%rip), %xmm0    # 0x225528
cvttsd2si %xmm0, %rcx
movq %rcx, 0x18(%rsp)
movq (%rax,%rbx,8), %rbp
movl $0x2, %ecx
leaq 0x34(%rsp), %rax
movl %ecx, (%rax)
movl $0x1, %eax
leaq 0x30(%rsp), %rcx
movl %eax, (%rcx)
movq 0x58(%r11), %rcx
movq %rsi, 0x20(%rsp)
movq (%rcx,%rsi,8), %rdx
movq 0x48(%r11), %rcx
movq (%rcx,%rsi,8), %rcx
movslq (%rdi), %r8
movslq 0x4(%rdi), %r9
movsd 0x60(%rdi), %xmm0
movl 0x80(%rdi), %eax
movq %rax, 0x8(%rsp)
movq 0xe8(%rbp), %rdi
leaq 0xa0(%rbp), %r13
leaq 0x48(%rbp), %r15
movq %r15, 0x58(%rsp)
leaq 0x121a0(%rbp), %rax
movq %rax, 0x10(%rsp)
leaq 0x12250(%rbp), %r12
subq $0x8, %rsp
xorl %eax, %eax
movsd 0x42cde(%rip), %xmm1    # 0x225480
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x1, %r10d
pushq %r10
movl $0x2, %r14d
pushq %r14
pushq %r10
movl $0x1, %r14d
pushq $0x0
pushq %rax
leaq 0x64(%rsp), %r10
pushq %r10
pushq %r12
movq %r11, %r12
pushq %rax
pushq 0x58(%rsp)
pushq %rax
pushq %r14
pushq 0x68(%rsp)
pushq %r15
pushq %r13
movq %r13, 0xa0(%rsp)
pushq 0x30(%r11)
callq 0x129aff
addq $0x80, %rsp
leaq 0x108(%rbp), %rdi
callq 0x48007
leaq 0x9330(%rbp), %rdi
callq 0x47f99
movq 0x30(%r12), %r15
movq (%r12), %rsi
movq 0x28(%r12), %rcx
movq 0x58(%r12), %rax
movq 0x20(%rsp), %r14
movq (%rax,%r14,8), %r8
movq 0x48(%r12), %rax
movq (%rax,%r14,8), %r9
leaq 0x8(%rbp), %rdx
leaq 0x28(%rbp), %rax
movq %rax, 0x10(%rsp)
leaq 0x2c0(%rbp), %rax
movq %rax, 0x50(%rsp)
leaq 0x12268(%rbp), %rax
movq %rax, 0x48(%rsp)
movsd 0x68(%rsi), %xmm0
movq 0x50(%r12), %rax
addq %r14, %rax
movslq 0x4(%rsi), %rsi
movq %rsi, 0x8(%rsp)
leaq (,%rbx,8), %rsi
leaq (%rsi,%rsi,2), %rsi
movq %rsi, 0x40(%rsp)
movq 0x68(%r12), %r11
addq %rsi, %r11
movq %rbx, 0x90(%rsp)
leaq (%rbx,%rbx,2), %rsi
movq %rsi, 0x88(%rsp)
shlq $0x4, %rsi
movq 0x98(%r12), %rbx
movq %rsi, 0x70(%rsp)
addq %rsi, %rbx
leaq 0x9040(%rbp), %r10
leaq 0x12160(%rbp), %r14
subq $0x8, %rsp
movq %r13, %rdi
movq 0x60(%rsp), %rsi
movq %rdx, %r13
movq %r15, %rdx
movl $0x0, %r15d
pushq %r15
pushq %rbx
pushq 0xa0(%r12)
pushq %r11
pushq 0x30(%rsp)
pushq %rax
movl $0x0, %eax
pushq %rax
movq 0x58(%rsp), %r15
pushq %r15
pushq %rax
movq 0xb0(%rsp), %rbx
movq %r14, 0x88(%rsp)
pushq %r14
movq %r10, 0xd0(%rsp)
pushq %r10
pushq 0xa8(%rsp)
movq 0xb8(%rsp), %r14
pushq %r14
pushq 0x80(%rsp)
movq %r13, 0xf8(%rsp)
pushq %r13
callq 0x7b800
addq $0x80, %rsp
movq 0xb0(%rbp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %r13
movq %r13, %rdi
callq 0x1b3684
movq %rax, 0x68(%rsp)
movq 0x68(%r12), %rdx
addq 0x40(%rsp), %rdx
movq 0x30(%r12), %r8
movq 0x48(%r12), %rax
subq $0x8, %rsp
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rcx
movq %r15, %r9
leaq 0x38(%rsp), %r15
pushq %r15
pushq 0x28(%r12)
movq 0x38(%rsp), %r10
pushq (%rax,%r10,8)
callq 0x1b1b1a
addq $0x20, %rsp
cmpl $0x0, (%r15)
movq %r12, 0x98(%rsp)
je 0x1e2d16
movq 0x28(%r12), %rdx
movq 0x30(%r12), %rsi
movq %r13, %rdi
movq 0x38(%rsp), %r8
movq %rbx, %r9
callq 0x1b2343
testq %rax, %rax
je 0x1e2d16
movq 0x48(%r12), %rax
movq 0x20(%rsp), %r15
movq (%rax,%r15,8), %rdx
movl $0x32, %r8d
movq %r13, %rdi
movq %rbx, %rsi
movq 0x18(%rsp), %rcx
movq %rbx, %r9
callq 0x1b261f
movq 0x9288(%rbp), %rax
leaq 0xd0(%rsp), %rcx
movq %rax, 0x10(%rcx)
movq 0x9278(%rbp), %rax
movq %rax, (%rcx)
movq 0x9280(%rbp), %rax
movq %rax, 0x8(%rcx)
movq 0x68(%r12), %rax
movq 0x40(%rsp), %r14
movq 0x10(%rax,%r14), %rcx
leaq 0xb8(%rsp), %rdx
movq %rcx, 0x10(%rdx)
movq (%rax,%r14), %rcx
movq %rcx, (%rdx)
movq 0x8(%rax,%r14), %rax
movq %rax, 0x8(%rdx)
movq 0x12170(%rbp), %rax
leaq 0xa0(%rsp), %rcx
movq %rax, 0x10(%rcx)
movq 0x12160(%rbp), %rax
movq %rax, (%rcx)
movq 0x12168(%rbp), %rax
movq %rax, 0x8(%rcx)
movq 0x30(%r12), %rsi
movq (%r12), %rcx
movq 0x28(%r12), %rdx
movq 0x48(%r12), %rax
movq (%rax,%r15,8), %rax
movq %rax, %xmm0
punpckldq 0x427a6(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x427ae(%rip), %xmm0    # 0x225250
movq 0x50(%r12), %r10
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x429c5(%rip), %xmm1    # 0x225480
minsd 0x42aad(%rip), %xmm1    # 0x225570
addq %r15, %r10
cvttsd2si %xmm1, %r11
movsd 0x68(%rcx), %xmm0
subq $0x8, %rsp
movq %r13, %rdi
xorl %ecx, %ecx
movq 0x18(%rsp), %r8
leaq 0xd8(%rsp), %r9
pushq %r11
pushq %r10
pushq %rbx
pushq 0x38(%rsp)
pushq %rax
leaq 0xd0(%rsp), %rax
pushq %rax
leaq 0xf0(%rsp), %rax
pushq %rax
callq 0x7b407
addq $0x40, %rsp
leaq 0xd0(%rsp), %rcx
movq 0x10(%rcx), %rax
movq %rax, 0x9288(%rbp)
movq (%rcx), %rax
movq %rax, 0x9278(%rbp)
movq 0x8(%rcx), %rax
movq %rax, 0x9280(%rbp)
leaq 0xb8(%rsp), %rsi
movq 0x10(%rsi), %rcx
movq 0x68(%r12), %rdx
leaq (%rdx,%r14), %rax
movq %rcx, 0x10(%rdx,%r14)
movq (%rsi), %rcx
movq %rcx, (%rdx,%r14)
movq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rdx,%r14)
leaq 0xa0(%rsp), %rdx
movq 0x10(%rdx), %rcx
movq %rcx, 0x12170(%rbp)
movq (%rdx), %rcx
movq %rcx, 0x12160(%rbp)
movq 0x8(%rdx), %rcx
movq %rcx, 0x12168(%rbp)
movq 0x30(%r12), %rdx
movq (%r12), %rsi
movq 0x28(%r12), %rcx
movq 0x58(%r12), %rdi
movq (%rdi,%r15,8), %r8
movq 0x48(%r12), %rdi
movq (%rdi,%r15,8), %r9
movsd 0x68(%rsi), %xmm0
movq 0x50(%r12), %r10
addq %r15, %r10
movslq 0x4(%rsi), %r11
movq 0x70(%rsp), %r15
addq 0x98(%r12), %r15
subq $0x8, %rsp
movq %r13, %rdi
movq 0x60(%rsp), %rsi
pushq $0x0
pushq %r15
pushq 0xa0(%r12)
pushq %rax
pushq %r11
pushq %r10
pushq %rbx
pushq 0x58(%rsp)
pushq 0xb0(%rsp)
pushq 0x88(%rsp)
pushq 0xd0(%rsp)
pushq 0xa8(%rsp)
pushq 0xb8(%rsp)
pushq 0x80(%rsp)
pushq 0xf8(%rsp)
callq 0x7b800
addq $0x80, %rsp
movl 0xb0(%rbp), %eax
movq 0x8(%rsp), %r8
cmpq %rax, %r8
movq %r13, %rdx
jle 0x1e2d0a
leal 0x1(%rax), %r14d
xorps %xmm0, %xmm0
movq (%rdx), %rcx
imulq $0xa8, %rax, %r13
movq $0x0, 0x48(%rcx,%r13)
movl 0x4(%rcx,%r13), %ebx
movl 0x8(%rcx,%r13), %r12d
movl 0x30(%rcx,%r13), %r15d
movq 0x50(%rcx,%r13), %rax
testq %rax, %rax
jne 0x1e2cad
addq %r13, %rcx
addq $0x48, %rcx
leaq (%rax,%rax), %rdx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rdx
movq %rdx, 0x8(%rcx)
movq 0x8(%rcx), %rsi
movq 0x10(%rcx), %rdi
shlq $0x5, %rsi
callq 0x2370
xorps %xmm0, %xmm0
movq 0x8(%rsp), %r8
movq 0x28(%rsp), %rdx
movq (%rdx), %rcx
movq %rax, 0x58(%rcx,%r13)
incl %r12d
movq (%rdx), %rax
movq 0x48(%rax,%r13), %rcx
movq 0x58(%rax,%r13), %rdi
leaq 0x1(%rcx), %rsi
movq %rsi, 0x48(%rax,%r13)
shlq $0x5, %rcx
movl %ebx, (%rdi,%rcx)
movl %r12d, 0x4(%rdi,%rcx)
movups %xmm0, 0x8(%rdi,%rcx)
xorl %esi, %esi
movl %esi, 0x18(%rdi,%rcx)
movl %r15d, 0x1c(%rdi,%rcx)
movq (%rdx), %rax
movl %esi, 0x28(%rax,%r13)
movl 0x8(%rax,%r13), %ecx
subl 0x4(%rax,%r13), %ecx
incl %ecx
movl %ecx, 0x20(%rax,%r13)
movl %r14d, %eax
incl %r14d
cmpq %rax, %r8
jg 0x1e2c40
movq %r8, 0xb0(%rbp)
jmp 0x1e2e06
cmpq $0x0, 0xb0(%rbp)
movq %r13, %rdx
je 0x1e2e06
movl $0x1, %r14d
xorl %eax, %eax
movl $0x2, %r15d
xorps %xmm0, %xmm0
movq (%rdx), %rcx
imulq $0xa8, %rax, %r13
movq $0x0, 0x48(%rcx,%r13)
movl 0x4(%rcx,%r13), %ebx
movl 0x8(%rcx,%r13), %r12d
movq 0x50(%rcx,%r13), %rax
testq %rax, %rax
jne 0x1e2d96
addq %r13, %rcx
addq $0x48, %rcx
leaq (%rax,%rax), %rdx
testq %rax, %rax
cmoveq %r15, %rdx
movq %rdx, 0x8(%rcx)
movq 0x8(%rcx), %rsi
movq 0x10(%rcx), %rdi
shlq $0x5, %rsi
callq 0x2370
xorps %xmm0, %xmm0
movq 0x28(%rsp), %rdx
movq (%rdx), %rcx
movq %rax, 0x58(%rcx,%r13)
incl %r12d
movq 0xa0(%rbp), %rax
movq 0x48(%rax,%r13), %rcx
movq 0x58(%rax,%r13), %rdi
leaq 0x1(%rcx), %rsi
movq %rsi, 0x48(%rax,%r13)
shlq $0x5, %rcx
movl %ebx, (%rdi,%rcx)
movl %r12d, 0x4(%rdi,%rcx)
movups %xmm0, 0x8(%rdi,%rcx)
movq $0x0, 0x18(%rdi,%rcx)
movq 0xa0(%rbp), %rax
movl 0x8(%rax,%r13), %ecx
subl 0x4(%rax,%r13), %ecx
incl %ecx
movl %ecx, 0x20(%rax,%r13)
movl %ecx, 0x28(%rax,%r13)
movl $0x0, 0x30(%rax,%r13)
movl %r14d, %eax
incl %r14d
cmpq %rax, 0xb0(%rbp)
ja 0x1e2d38
movq 0x98(%rsp), %r15
movq 0x78(%r15), %rax
leaq 0xa84ff(%rip), %r14     # 0x28b318
imulq $0x58, 0x50(%r15), %rsi
addq 0x48(%r14), %rsi
movq 0x90(%rsp), %r13
movq (%rax,%r13,8), %rdi
movq 0x20(%rsp), %r12
imulq $0x58, %r12, %rbx
addq %rbx, %rsi
leaq 0x60(%rbp), %rcx
movq 0x88(%rsp), %r11
leaq (,%r11,8), %r9
addq 0x68(%r15), %r9
shlq $0x6, %r11
addq 0x90(%r15), %r11
movq 0x30(%r15), %rax
movq (%r15), %r10
movq 0x28(%r15), %r8
movsd 0x68(%r10), %xmm0
movq 0x48(%r15), %r10
movq (%r10,%r12,8), %r10
subq $0x50, %rsp
movq %r8, 0x28(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x10(%rsp)
movq %r11, 0x8(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, (%rsp)
callq 0x1b04c2
addq $0x50, %rsp
imulq $0x58, 0x50(%r15), %rax
addq 0x48(%r14), %rax
movb 0x50(%rbx,%rax), %al
leal -0x1(%rax), %ecx
cmpb $0x1, %cl
ja 0x1e2ebf
incq 0xf8(%rbp)
cmpb $0x3, %al
je 0x1e2edc
movq 0x58(%r15), %rax
movq (%rax,%r12,8), %rdi
callq 0x2220
movq 0x58(%r15), %rax
movq $0x0, (%rax,%r12,8)
movq 0x80(%r15), %rax
movq (%rax,%r13,8), %rax
incq 0xf0(%rax)
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq