// File: /workspace/github_cpp_makefile_star2_O2/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, %rbp
movq (%rdi), %rdi
movslq %edx, %rbx
imulq $0x68, %rbx, %rax
addq 0x88(%rbp), %rax
movq %rax, 0x20(%rsp)
movq 0x80(%rbp), %rax
movsd 0x41104(%rip), %xmm0    # 0x1e3570
divsd 0x68(%rdi), %xmm0
minsd 0x410ff(%rip), %xmm0    # 0x1e3578
cvttsd2si %xmm0, %rcx
movq %rcx, 0x8(%rsp)
movq (%rax,%rbx,8), %r14
pushq $0x2
popq %rcx
leaq 0x2c(%rsp), %rax
movl %ecx, (%rax)
pushq $0x1
popq %rcx
leaq 0x28(%rsp), %rax
movl %ecx, (%rax)
movq %rcx, %r11
movq 0x58(%rbp), %rcx
movq %rsi, 0x10(%rsp)
movq (%rcx,%rsi,8), %rdx
movq 0x48(%rbp), %rcx
movq (%rcx,%rsi,8), %rcx
movslq (%rdi), %r8
movslq 0x4(%rdi), %r9
movsd 0x60(%rdi), %xmm0
movl 0x80(%rdi), %eax
movq %rax, (%rsp)
movq 0xe8(%r14), %rdi
leaq 0xa0(%r14), %r13
leaq 0x48(%r14), %rax
movq %rax, 0x50(%rsp)
leaq 0x121a0(%r14), %r10
leaq 0x12250(%r14), %r15
subq $0x8, %rsp
pushq $-0x1
popq %rsi
movsd 0x40fd3(%rip), %xmm1    # 0x1e34d0
pushq %r11
pushq $0x2
popq %r12
pushq %r12
pushq %r11
movq %r11, %r12
pushq $0x0
pushq $0x0
leaq 0x5c(%rsp), %r11
pushq %r11
pushq %r15
pushq $0x0
pushq %r10
pushq $0x0
pushq %r12
pushq 0x60(%rsp)
pushq %rax
pushq %r13
pushq 0x30(%rbp)
callq 0xea18c
addq $0x80, %rsp
leaq 0x108(%r14), %rdi
callq 0x1b25d
leaq 0x9330(%r14), %rdi
callq 0x1b1e8
movq 0x30(%rbp), %rdx
movq (%rbp), %rsi
movq 0x28(%rbp), %rcx
movq 0x58(%rbp), %rax
movq 0x10(%rsp), %r12
movq (%rax,%r12,8), %r8
movq 0x48(%rbp), %rax
movq (%rax,%r12,8), %r9
leaq 0x8(%r14), %rax
movq %rax, 0x48(%rsp)
leaq 0x28(%r14), %rax
movq %rax, 0x18(%rsp)
leaq 0x2c0(%r14), %rax
movq %rax, 0x40(%rsp)
leaq 0x12268(%r14), %rax
movq %rax, 0x38(%rsp)
leaq 0x9040(%r14), %r10
movsd 0x68(%rsi), %xmm0
movq 0x50(%rbp), %rax
addq %r12, %rax
movslq 0x4(%rsi), %rsi
movq %rsi, (%rsp)
imulq $0x18, %rbx, %r15
movq 0x68(%rbp), %r11
addq %r15, %r11
movq %rbx, 0x80(%rsp)
imulq $0x30, %rbx, %rsi
movq 0x98(%rbp), %rbx
movq %rsi, 0x70(%rsp)
addq %rsi, %rbx
leaq 0x12160(%r14), %r12
subq $0x8, %rsp
movq %r13, %rdi
movq 0x58(%rsp), %rsi
pushq $0x0
pushq %rbx
movq %r12, %rbx
pushq 0xa0(%rbp)
pushq %r11
pushq 0x28(%rsp)
pushq %rax
pushq $0x0
movq 0x48(%rsp), %r12
pushq %r12
pushq $0x0
movq %rbx, 0x80(%rsp)
pushq %rbx
movq %r10, 0xd0(%rsp)
pushq %r10
pushq 0x98(%rsp)
movq 0xa8(%rsp), %rbx
pushq %rbx
pushq 0x88(%rsp)
pushq 0xc0(%rsp)
callq 0x48329
addq $0x80, %rsp
movq %r14, (%rsp)
movq 0xb0(%r14), %rax
movq %rax, 0x60(%rsp)
movq 0x20(%rsp), %r14
movq %r13, %rdi
callq 0x172830
movq %rax, 0x68(%rsp)
movq 0x68(%rbp), %rdx
movq %r15, 0x58(%rsp)
addq %r15, %rdx
movq 0x30(%rbp), %r8
movq 0x48(%rbp), %rax
subq $0x8, %rsp
movq %r13, %rdi
movq %rbx, %rsi
movq %r14, %rcx
movq %r12, %r9
leaq 0x30(%rsp), %r15
pushq %r15
pushq 0x28(%rbp)
movq 0x28(%rsp), %r10
pushq (%rax,%r10,8)
callq 0x170e37
addq $0x20, %rsp
cmpl $0x0, (%r15)
movq %rbp, 0x88(%rsp)
je 0x1a29b9
movq 0x28(%rbp), %rdx
movq 0x30(%rbp), %rsi
movq %r13, %rdi
movq 0x30(%rsp), %r8
movq %r14, %r9
callq 0x17163b
testq %rax, %rax
je 0x1a29b9
movq 0x48(%rbp), %rax
movq 0x10(%rsp), %rbx
movq (%rax,%rbx,8), %rdx
pushq $0x32
popq %r8
movq %r13, %rdi
movq %r14, %rsi
movq 0x8(%rsp), %rcx
movq %r14, %r9
callq 0x17191a
movq (%rsp), %r12
movq 0x9288(%r12), %rax
leaq 0xb0(%rsp), %rcx
movq %rax, 0x10(%rcx)
movups 0x9278(%r12), %xmm0
movaps %xmm0, (%rcx)
movq 0x68(%rbp), %rax
movq 0x58(%rsp), %r15
movq 0x10(%rax,%r15), %rcx
leaq 0xd0(%rsp), %rdx
movq %rcx, 0x10(%rdx)
movups (%rax,%r15), %xmm0
movaps %xmm0, (%rdx)
movq 0x12170(%r12), %rax
leaq 0x90(%rsp), %rcx
movq %rax, 0x10(%rcx)
movaps 0x12160(%r12), %xmm0
movaps %xmm0, (%rcx)
movq 0x30(%rbp), %rsi
movq (%rbp), %rcx
movq 0x28(%rbp), %rdx
movq 0x48(%rbp), %rax
movq (%rax,%rbx,8), %rax
movq %rax, %xmm0
punpckldq 0x40ae9(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x40af1(%rip), %xmm0    # 0x1e3280
movq 0x50(%rbp), %r10
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x40d29(%rip), %xmm1    # 0x1e34d0
minsd 0x40e11(%rip), %xmm1    # 0x1e35c0
addq %rbx, %r10
cvttsd2si %xmm1, %r11
movsd 0x68(%rcx), %xmm0
subq $0x8, %rsp
movq %r13, %rdi
xorl %ecx, %ecx
movq 0x20(%rsp), %r8
leaq 0xb8(%rsp), %r9
pushq %r11
pushq %r10
pushq %r14
pushq 0x28(%rsp)
pushq %rax
leaq 0xc0(%rsp), %rax
pushq %rax
leaq 0x108(%rsp), %r14
pushq %r14
callq 0x47f3e
addq $0x40, %rsp
leaq 0xb0(%rsp), %rcx
movq 0x10(%rcx), %rax
movq %rax, 0x9288(%r12)
movaps (%rcx), %xmm0
movups %xmm0, 0x9278(%r12)
movq 0x10(%r14), %rcx
movq 0x68(%rbp), %rdx
leaq (%rdx,%r15), %rax
movq %rcx, 0x10(%rdx,%r15)
movaps (%r14), %xmm0
movups %xmm0, (%rdx,%r15)
leaq 0x90(%rsp), %rdx
movq 0x10(%rdx), %rcx
movq %rcx, 0x12170(%r12)
movaps (%rdx), %xmm0
movaps %xmm0, 0x12160(%r12)
movq 0x30(%rbp), %rdx
movq (%rbp), %rsi
movq 0x28(%rbp), %rcx
movq 0x58(%rbp), %rdi
movq (%rdi,%rbx,8), %r8
movq 0x48(%rbp), %rdi
movq (%rdi,%rbx,8), %r9
movsd 0x68(%rsi), %xmm0
movq 0x50(%rbp), %r10
addq %rbx, %r10
movslq 0x4(%rsi), %r11
movq 0x70(%rsp), %rbx
addq 0x98(%rbp), %rbx
subq $0x8, %rsp
movq %r13, %rdi
movq 0x58(%rsp), %rsi
pushq $0x0
pushq %rbx
pushq 0xa0(%rbp)
pushq %rax
pushq %r11
pushq %r10
pushq 0x58(%rsp)
pushq 0x48(%rsp)
pushq 0xb0(%rsp)
pushq 0x80(%rsp)
pushq 0xd0(%rsp)
pushq 0x98(%rsp)
pushq 0xa8(%rsp)
pushq 0x88(%rsp)
pushq 0xc0(%rsp)
callq 0x48329
movq %r12, %r8
addq $0x80, %rsp
movl 0xb0(%r12), %r14d
xorps %xmm0, %xmm0
movq 0x60(%rsp), %rdi
movl %r14d, %r14d
cmpq %r14, %rdi
jle 0x1a2a79
movq (%r13), %rcx
imulq $0xa8, %r14, %r12
andq $0x0, 0x48(%rcx,%r12)
movl 0x4(%rcx,%r12), %ebx
movl 0x8(%rcx,%r12), %r15d
movl 0x30(%rcx,%r12), %ebp
cmpq $0x0, 0x50(%rcx,%r12)
je 0x1a2935
xorl %eax, %eax
jmp 0x1a296b
leaq (%rcx,%r12), %rax
addq $0x48, %rax
movq $0x2, 0x8(%rax)
movq 0x10(%rax), %rdi
pushq $0x40
popq %rsi
callq 0x2370
xorps %xmm0, %xmm0
movq 0x60(%rsp), %rdi
movq (%rsp), %r8
movq (%r13), %rcx
movq %rax, 0x58(%rcx,%r12)
movq 0x48(%rcx,%r12), %rax
incl %r15d
movq 0x58(%rcx,%r12), %rdx
leaq 0x1(%rax), %rsi
movq %rsi, 0x48(%rcx,%r12)
shlq $0x5, %rax
movl %ebx, (%rdx,%rax)
movl %r15d, 0x4(%rdx,%rax)
movups %xmm0, 0x8(%rdx,%rax)
andl $0x0, 0x18(%rdx,%rax)
movl %ebp, 0x1c(%rdx,%rax)
movq (%r13), %rax
andl $0x0, 0x28(%rax,%r12)
movl 0x8(%rax,%r12), %ecx
subl 0x4(%rax,%r12), %ecx
incl %ecx
movl %ecx, 0x20(%rax,%r12)
incl %r14d
jmp 0x1a28fd
xorl %r14d, %r14d
pushq $0x40
popq %r12
xorps %xmm0, %xmm0
movq (%rsp), %r8
movl %r14d, %r14d
cmpq %r14, 0xb0(%r8)
jbe 0x1a2a80
movq (%r13), %rcx
imulq $0xa8, %r14, %rbp
andq $0x0, 0x48(%rcx,%rbp)
movl 0x4(%rcx,%rbp), %ebx
movl 0x8(%rcx,%rbp), %r15d
cmpq $0x0, 0x50(%rcx,%rbp)
je 0x1a29fd
xorl %eax, %eax
jmp 0x1a2a2e
leaq (%rcx,%rbp), %rax
addq $0x48, %rax
movq $0x2, 0x8(%rax)
movq 0x10(%rax), %rdi
movq %r12, %rsi
callq 0x2370
xorps %xmm0, %xmm0
movq (%rsp), %r8
movq (%r13), %rcx
movq %rax, 0x58(%rcx,%rbp)
movq 0x48(%rcx,%rbp), %rax
incl %r15d
movq 0x58(%rcx,%rbp), %rdx
leaq 0x1(%rax), %rsi
movq %rsi, 0x48(%rcx,%rbp)
shlq $0x5, %rax
movl %ebx, (%rdx,%rax)
movl %r15d, 0x4(%rdx,%rax)
movups %xmm0, 0x8(%rdx,%rax)
andq $0x0, 0x18(%rdx,%rax)
movq (%r13), %rax
movl 0x8(%rax,%rbp), %ecx
subl 0x4(%rax,%rbp), %ecx
incl %ecx
movl %ecx, 0x20(%rax,%rbp)
movl %ecx, 0x28(%rax,%rbp)
andl $0x0, 0x30(%rax,%rbp)
incl %r14d
jmp 0x1a29c7
movq %rdi, 0xb0(%r8)
movq 0x88(%rsp), %r10
movq 0x78(%r10), %rax
movq 0x80(%rsp), %rbp
movq (%rax,%rbp,8), %rdi
leaq 0xb1879(%rip), %rax     # 0x254318
imulq $0x58, 0x50(%r10), %rsi
addq 0x48(%rax), %rsi
movq 0x10(%rsp), %r15
imulq $0x58, %r15, %r12
addq %r12, %rsi
leaq 0x60(%r8), %rcx
movq 0x58(%rsp), %r9
addq 0x68(%r10), %r9
imulq $0xc0, %rbp, %rax
addq 0x90(%r10), %rax
movq 0x30(%r10), %rdx
movq %r8, %r14
movq (%r10), %r8
movq 0x28(%r10), %r11
movsd 0x68(%r8), %xmm0
movq 0x48(%r10), %r8
movq (%r8,%r15,8), %r8
subq $0x50, %rsp
movq %r11, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq 0x58(%rsp), %r8
movq %r8, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
andq $0x0, 0x40(%rsp)
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rdx
movq %r10, %rbx
callq 0x16f969
addq $0x50, %rsp
imulq $0x58, 0x50(%rbx), %rax
leaq 0xb17e1(%rip), %rcx     # 0x254318
addq 0x48(%rcx), %rax
movb 0x50(%r12,%rax), %al
leal -0x1(%rax), %ecx
cmpb $0x1, %cl
ja 0x1a2b51
incq 0xf8(%r14)
jmp 0x1a2b55
cmpb $0x3, %al
je 0x1a2b6b
movq 0x58(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x2220
movq 0x58(%rbx), %rax
andq $0x0, (%rax,%r15,8)
movq 0x80(%rbx), %rax
movq (%rax,%rbp,8), %rax
incq 0xf0(%rax)
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq