// File: /workspace/github_cpp_makefile_star2_O3/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 $0x108, %rsp            # imm = 0x108
movq %rsi, %r14
movq %rdi, %r12
movq (%rdi), %rsi
movslq %edx, %rbx
imulq $0x68, %rbx, %rax
addq 0x88(%rdi), %rax
movq %rax, 0x58(%rsp)
movq 0x80(%rdi), %rax
movsd 0x4447c(%rip), %xmm1    # 0x231620
divsd 0x68(%rsi), %xmm1
movq (%rax,%rbx,8), %r13
minsd 0x44473(%rip), %xmm1    # 0x231628
movl $0x2, %ebp
leaq 0x2c(%rsp), %rax
movl %ebp, (%rax)
movl $0x1, %eax
leaq 0x28(%rsp), %rcx
movl %eax, (%rcx)
movl $0x1, %eax
xorl %ecx, %ecx
movl %ecx, 0x70(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movq 0x58(%rdi), %rcx
movq (%rcx,%r14,8), %rdx
movq 0x48(%rdi), %rcx
movq (%rcx,%r14,8), %rcx
movslq (%rsi), %r8
movslq 0x4(%rsi), %r9
movsd 0x60(%rsi), %xmm0
movl 0x80(%rsi), %esi
movq %rsi, (%rsp)
cvttsd2si %xmm1, %rsi
movq %rsi, 0x18(%rsp)
movq 0xe8(%r13), %rdi
leaq 0xa0(%r13), %rsi
movq %rsi, 0x10(%rsp)
leaq 0x48(%r13), %r10
movq %r10, 0x50(%rsp)
leaq 0x121a0(%r13), %r11
leaq 0x12250(%r13), %r15
subq $0x8, %rsp
movsd 0x4433a(%rip), %xmm1    # 0x231580
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
pushq %rax
pushq %rbp
pushq %rax
movl $0x0, %ebp
pushq %rbp
pushq %rbp
leaq 0x5c(%rsp), %rax
pushq %rax
pushq %r15
pushq %rbp
pushq %r11
pushq %rbp
movl $0x1, %eax
pushq %rax
pushq 0x60(%rsp)
pushq %r10
movq 0x80(%rsp), %r15
pushq %r15
pushq 0x30(%r12)
callq 0x12fbc2
addq $0x80, %rsp
leaq 0x108(%r13), %rdi
callq 0x475fb
leaq 0x9330(%r13), %rdi
callq 0x4758d
movq 0x30(%r12), %rdx
movq (%r12), %rsi
movq 0x28(%r12), %rcx
movq 0x58(%r12), %rax
movq (%rax,%r14,8), %r8
movq 0x48(%r12), %rax
movq (%rax,%r14,8), %r9
movq %r14, 0x8(%rsp)
leaq 0x8(%r13), %rax
movq %rax, 0x48(%rsp)
leaq 0x28(%r13), %rax
movq %rax, 0x20(%rsp)
leaq 0x2c0(%r13), %rax
movq %rax, 0x40(%rsp)
leaq 0x12268(%r13), %r10
movsd 0x68(%rsi), %xmm0
movq 0x50(%r12), %rax
addq %r14, %rax
movslq 0x4(%rsi), %rsi
movq %rsi, (%rsp)
leaq (,%rbx,8), %rsi
leaq (%rsi,%rsi,2), %rsi
movq %rsi, 0x38(%rsp)
movq 0x68(%r12), %r11
addq %rsi, %r11
movq %rbx, 0xa0(%rsp)
leaq (%rbx,%rbx,2), %rsi
movq %rsi, 0x98(%rsp)
shlq $0x4, %rsi
movq 0x98(%r12), %rbx
movq %rsi, 0x80(%rsp)
addq %rsi, %rbx
leaq 0x9040(%r13), %rbp
leaq 0x12160(%r13), %r14
subq $0x8, %rsp
movq %r15, %rdi
movq 0x58(%rsp), %rsi
xorl %r15d, %r15d
pushq %r15
pushq %rbx
pushq 0xa0(%r12)
pushq %r11
pushq 0x28(%rsp)
pushq %rax
pushq %r15
pushq 0x58(%rsp)
pushq %r15
movq %r14, 0x80(%rsp)
pushq %r14
movq %rbp, 0xe0(%rsp)
pushq %rbp
movq %r10, 0xf0(%rsp)
pushq %r10
movq 0xa8(%rsp), %r15
pushq %r15
pushq 0x90(%rsp)
pushq 0xc0(%rsp)
callq 0x7b38c
addq $0x80, %rsp
movq 0xb0(%r13), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x1bce5f
movq %rax, 0x78(%rsp)
movq 0x68(%r12), %rdx
addq 0x38(%rsp), %rdx
movq 0x30(%r12), %r8
movq 0x48(%r12), %rax
subq $0x8, %rsp
movq %rbx, %rdi
movq %rbx, %rbp
movq %r15, %rsi
movq 0x60(%rsp), %r14
movq %r14, %rcx
movq 0x20(%rsp), %r9
movq %r9, %rbx
leaq 0x30(%rsp), %r15
pushq %r15
pushq 0x28(%r12)
movq 0x20(%rsp), %r10
pushq (%rax,%r10,8)
callq 0x1bb323
addq $0x20, %rsp
xorl %eax, %eax
cmpl %eax, (%r15)
movq %r12, 0xa8(%rsp)
je 0x1ed756
movq 0x28(%r12), %rdx
movq 0x30(%r12), %rsi
movq %rbp, %rdi
movq 0x30(%rsp), %r8
movq %r14, %r9
callq 0x1bbb4e
testq %rax, %rax
je 0x1ed756
movq 0x48(%r12), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movl $0x32, %r8d
movq %rbp, %rdi
movq %r14, %rsi
movq %rbx, %rcx
movq %r14, %r9
callq 0x1bbe27
movq 0x9288(%r13), %rax
leaq 0xf0(%rsp), %rcx
movq %rax, 0x10(%rcx)
movups 0x9278(%r13), %xmm0
movaps %xmm0, (%rcx)
movq %rcx, %r9
movq 0x68(%r12), %rax
movq 0x38(%rsp), %r15
movq 0x10(%rax,%r15), %rcx
leaq 0xd0(%rsp), %rdx
movq %rcx, 0x10(%rdx)
movups (%rax,%r15), %xmm0
movaps %xmm0, (%rdx)
movq 0x12170(%r13), %rax
movq %rbp, %rdi
leaq 0xb0(%rsp), %rcx
movq %rax, 0x10(%rcx)
movaps 0x12160(%r13), %xmm0
movaps %xmm0, (%rcx)
movq %rcx, %rbx
movq 0x30(%r12), %rsi
movq (%r12), %rcx
movq 0x28(%r12), %rdx
movq 0x48(%r12), %rax
movq 0x8(%rsp), %r8
movq (%rax,%r8,8), %rax
movq %rax, %xmm0
punpckldq 0x43d6d(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x43d75(%rip), %xmm0    # 0x231290
movq 0x50(%r12), %r10
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x4404c(%rip), %xmm1    # 0x231580
minsd 0x44134(%rip), %xmm1    # 0x231670
addq %r8, %r10
cvttsd2si %xmm1, %r11
movsd 0x68(%rcx), %xmm0
subq $0x8, %rsp
xorl %ecx, %ecx
movq 0x28(%rsp), %r8
movq %r9, %rbp
pushq %r11
pushq %r10
pushq %r14
pushq 0x38(%rsp)
pushq %rax
pushq %rbx
leaq 0x108(%rsp), %rbx
pushq %rbx
callq 0x7af9b
addq $0x40, %rsp
movq 0x10(%rbp), %rax
movq %rax, 0x9288(%r13)
movaps (%rbp), %xmm0
movups %xmm0, 0x9278(%r13)
movq 0x10(%rbx), %rcx
movq 0x68(%r12), %rdx
leaq (%rdx,%r15), %rax
movq %rcx, 0x10(%rdx,%r15)
movaps (%rbx), %xmm0
movups %xmm0, (%rdx,%r15)
leaq 0xb0(%rsp), %rdx
movq 0x10(%rdx), %rcx
movq %rcx, 0x12170(%r13)
movaps (%rdx), %xmm0
movaps %xmm0, 0x12160(%r13)
movq 0x30(%r12), %rdx
movq (%r12), %rsi
movq 0x28(%r12), %rcx
movq 0x58(%r12), %rdi
movq 0x8(%rsp), %r10
movq (%rdi,%r10,8), %r8
movq 0x48(%r12), %rdi
movq (%rdi,%r10,8), %r9
movq %r10, %rdi
movsd 0x68(%rsi), %xmm0
movq 0x50(%r12), %r10
addq %rdi, %r10
movslq 0x4(%rsi), %r11
movq 0x80(%rsp), %rbp
addq 0x98(%r12), %rbp
subq $0x8, %rsp
movq 0x18(%rsp), %r15
movq %r15, %rdi
movq 0x58(%rsp), %rsi
pushq $0x0
pushq %rbp
pushq 0xa0(%r12)
pushq %rax
pushq %r11
pushq %r10
pushq %r14
pushq 0x58(%rsp)
pushq 0xc0(%rsp)
pushq 0x80(%rsp)
pushq 0xe0(%rsp)
pushq 0xf0(%rsp)
pushq 0xa8(%rsp)
pushq 0x90(%rsp)
pushq 0xc0(%rsp)
callq 0x7b38c
addq $0x80, %rsp
movl 0xb0(%r13), %eax
movq (%rsp), %r8
cmpq %rax, %r8
movq %r15, %rdx
jle 0x1ed74a
movq (%rdx), %rcx
leal 0x1(%rax), %ebp
imulq $0xa8, %rax, %r14
movq $0x0, 0x48(%rcx,%r14)
movl 0x4(%rcx,%r14), %r12d
movl 0x8(%rcx,%r14), %ebx
movl 0x30(%rcx,%r14), %r15d
cmpq $0x0, 0x50(%rcx,%r14)
je 0x1ed6b9
xorl %eax, %eax
jmp 0x1ed6ed
leaq (%rcx,%r14), %rax
addq $0x48, %rax
movq $0x2, 0x8(%rax)
movq 0x10(%rax), %rdi
movl $0x40, %esi
callq 0x2370
movq (%rsp), %r8
movq 0x10(%rsp), %rdx
movq (%rdx), %rcx
movq %rax, 0x58(%rcx,%r14)
movq 0x48(%rcx,%r14), %rax
incl %ebx
movq 0x58(%rcx,%r14), %rdi
leaq 0x1(%rax), %rsi
movq %rsi, 0x48(%rcx,%r14)
shlq $0x5, %rax
movl %r12d, (%rdi,%rax)
movl %ebx, 0x4(%rdi,%rax)
movaps 0x60(%rsp), %xmm0
movups %xmm0, 0x8(%rdi,%rax)
movl 0x70(%rsp), %ecx
movl %ecx, 0x18(%rdi,%rax)
movl %r15d, 0x1c(%rdi,%rax)
movq (%rdx), %rcx
movl $0x0, 0x28(%rcx,%r14)
movl 0x8(%rcx,%r14), %eax
subl 0x4(%rcx,%r14), %eax
incl %eax
movl %eax, 0x20(%rcx,%r14)
movl %ebp, %eax
incl %ebp
cmpq %rax, %r8
ja 0x1ed68e
movq %r8, 0xb0(%r13)
jmp 0x1ed831
cmpq $0x0, 0xb0(%r13)
movq %rbp, %rdx
je 0x1ed831
movq (%rdx), %rcx
movl $0x1, %ebp
xorl %r14d, %r14d
xorl %eax, %eax
imulq $0xa8, %rax, %r15
movq $0x0, 0x48(%rcx,%r15)
movl 0x4(%rcx,%r15), %ebx
movl 0x8(%rcx,%r15), %r12d
cmpq $0x0, 0x50(%rcx,%r15)
je 0x1ed79a
xorl %eax, %eax
jmp 0x1ed7ca
leaq (%rcx,%r15), %rax
addq $0x48, %rax
movq $0x2, 0x8(%rax)
movq 0x10(%rax), %rdi
movl $0x40, %esi
callq 0x2370
movq 0x10(%rsp), %rdx
movq (%rdx), %rcx
movq %rax, 0x58(%rcx,%r15)
movq 0x48(%rcx,%r15), %rax
incl %r12d
movq 0x58(%rcx,%r15), %rdi
leaq 0x1(%rax), %rsi
movq %rsi, 0x48(%rcx,%r15)
shlq $0x5, %rax
movl %ebx, (%rdi,%rax)
movl %r12d, 0x4(%rdi,%rax)
movaps 0x60(%rsp), %xmm0
movups %xmm0, 0x8(%rdi,%rax)
movl 0x70(%rsp), %ecx
movl %ecx, 0x18(%rdi,%rax)
movl %r14d, 0x1c(%rdi,%rax)
movq 0xa0(%r13), %rcx
movl 0x8(%rcx,%r15), %eax
subl 0x4(%rcx,%r15), %eax
incl %eax
movl %eax, 0x20(%rcx,%r15)
movl %eax, 0x28(%rcx,%r15)
movl %r14d, 0x30(%rcx,%r15)
movl %ebp, %eax
incl %ebp
cmpq %rax, 0xb0(%r13)
ja 0x1ed774
movq 0xa8(%rsp), %r15
movq 0x78(%r15), %rax
leaq 0xa8ad4(%rip), %r14     # 0x296318
imulq $0x58, 0x50(%r15), %rsi
addq 0x48(%r14), %rsi
movq 0xa0(%rsp), %rbp
movq (%rax,%rbp,8), %rdi
movq 0x8(%rsp), %r12
imulq $0x58, %r12, %rbx
addq %rbx, %rsi
leaq 0x60(%r13), %rcx
movq 0x98(%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 0xa8(%rsp), %rax
movq %rax, (%rsp)
callq 0x1b9741
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 0x1ed8ec
incq 0xf8(%r13)
jmp 0x1ed8f0
cmpb $0x3, %al
je 0x1ed909
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,%rbp,8), %rax
incq 0xf0(%rax)
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq