// File: chhylp123[P]hifiasm/anchor.cpp
// Function: lchain_qgen_mcopy_fast_re0(ha_abuf_s*, ha_pt_s*, ha_mz1_t*, unsigned long, ha_mz1_t*, unsigned long, unsigned long, Candidates_list*, unsigned int*, unsigned int*)
uint64_t lchain_qgen_mcopy_fast_re0(ha_abuf_t *ab, ha_pt_t *ha_idx, ha_mz1_t *ra, uint64_t rn, ha_mz1_t *qa, uint64_t qn, uint64_t qid, Candidates_list *cl, uint32_t *high_occ, uint32_t *low_occ)
{
	// fprintf(stderr, "+[M::%s]\n", __func__);
	uint64_t i, k, l, max_cnt = UINT32_MAX, min_cnt = 0, ri, qi, sn; anchor1_t *an; k_mer_hit *p;
	if(high_occ) {
		max_cnt = (*high_occ);
		if(max_cnt < 2) max_cnt = 2;
	}
	if(low_occ) {
		min_cnt = (*low_occ);
		if(min_cnt < 2) min_cnt = 2;
	}
	// clear_Candidates_list(cl); 

	///first try
	for (k = 1, l = i = ab->n_a = 0; k <= rn; ++k) {
		if (k == rn || ra[k].x != ra[l].x) {
			for (; i < qn && qa[i].x < ra[l].x; i++);
			if(i < qn && qa[i].x == ra[l].x) {
				sn = 0;
				if(ab->n_a < ab->m_a) sn = ab->seed[l].n;///ha_pt_cnt(ha_idx, ra[l].x);
							
				for (qi = i; qi < qn && qa[qi].x == ra[l].x; qi++) {
					for (ri = l; ri < k; ri++) {
						if(qa[qi].rev != ra[ri].rev) continue;
						if(ab->n_a < ab->m_a) {
							an = &(ab->a[ab->n_a++]); 

							an->other_off = qa[qi].pos;
							an->self_off = ra[ri].pos;
							///an->cnt: cnt<<8|span
							an->cnt = sn; if(an->cnt > ((uint32_t)(0xffffffu))) an->cnt = 0xffffffu;
							an->cnt <<= 8; an->cnt |= ((ra[ri].span <= ((uint32_t)(0xffu)))?ra[ri].span:((uint32_t)(0xffu)));
							an->srt = (((uint64_t)(an->self_off))<<32)|((uint64_t)(an->other_off));
						} else {
							ab->n_a++;
						}
					}
				}
			}
			l = k;
		}
	}

	
	if (ab->n_a > ab->m_a) {
		ab->m_a = ab->n_a; REALLOC(ab->a, ab->m_a);

		for (k = 1, l = i = ab->n_a = 0; k <= rn; ++k) {
			if (k == rn || ra[k].x != ra[l].x) {
				for (; i < qn && qa[i].x < ra[l].x; i++);
				if(i < qn && qa[i].x == ra[l].x) {
					sn = ab->seed[l].n;///ha_pt_cnt(ha_idx, ra[l].x);
					
					for (qi = i; qi < qn && qa[qi].x == ra[l].x; qi++) {
						for (ri = l; ri < k; ri++) {
							if(qa[qi].rev != ra[ri].rev) continue;

							an = &(ab->a[ab->n_a++]); 

							an->other_off = qa[qi].pos;
							an->self_off = ra[ri].pos;
							///an->cnt: cnt<<8|span
							an->cnt = sn; if(an->cnt > ((uint32_t)(0xffffffu))) an->cnt = 0xffffffu;
							an->cnt <<= 8; an->cnt |= ((ra[ri].span <= ((uint32_t)(0xffu)))?ra[ri].span:((uint32_t)(0xffu)));
							an->srt = (((uint64_t)(an->self_off))<<32)|((uint64_t)(an->other_off));
						}
					}
				}
				l = k;
			}
		}
	}

	// copy over to _cl_
	sn = ab->n_a + cl->length;
	if (sn > (uint64_t)cl->size) {
		cl->size = sn;
		REALLOC(cl->list, cl->size);
	}

	radix_sort_ha_an1(ab->a, ab->a + ab->n_a);
	for (i = 0; i < ab->n_a; i++) {
		p = &cl->list[cl->length++];
		p->readID = qid;
		p->strand = 0;
		p->offset = ab->a[i].other_off;
		p->self_offset = ab->a[i].self_off;

		if(((ab->a[i].cnt>>8) < max_cnt) && ((ab->a[i].cnt>>8) > min_cnt)){
			p->cnt = 1;
		} else if((ab->a[i].cnt>>8) <= min_cnt) {
			p->cnt = 2;
		} else{
			p->cnt = 1 + (((ab->a[i].cnt>>8) + (max_cnt<<1) - 1)/(max_cnt<<1));
			p->cnt = pow(p->cnt, 1.1);
		}
		if(p->cnt > ((uint32_t)(0xffffffu))) p->cnt = 0xffffffu;
		p->cnt <<= 8; p->cnt |= (((uint32_t)(0xffu))&(ab->a[i].cnt));
	}
	// cl->length = ab->n_a;
	return ab->n_a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
cmpq $0x0, 0x20(%rbp)
je 0x1a6136
movq 0x20(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x50(%rbp)
cmpq $0x2, -0x50(%rbp)
jae 0x1a6134
movq $0x2, -0x50(%rbp)
jmp 0x1a6136
cmpq $0x0, 0x28(%rbp)
je 0x1a6158
movq 0x28(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x58(%rbp)
cmpq $0x2, -0x58(%rbp)
jae 0x1a6156
movq $0x2, -0x58(%rbp)
jmp 0x1a6158
movq $0x1, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x1a64b2
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x1a61bd
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x48(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
je 0x1a649f
jmp 0x1a61bf
movq -0x38(%rbp), %rcx
xorl %eax, %eax
cmpq -0x30(%rbp), %rcx
movb %al, -0x81(%rbp)
jae 0x1a61fe
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x48(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
setb %al
movb %al, -0x81(%rbp)
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x1a620a
jmp 0x1a621a
jmp 0x1a620c
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1a61bf
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x1a6497
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x48(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jne 0x1a6497
movq $0x0, -0x70(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x1a6285
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x48(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rcx
xorl %eax, %eax
cmpq -0x30(%rbp), %rcx
movb %al, -0x82(%rbp)
jae 0x1a62cc
movq -0x28(%rbp), %rax
movq -0x68(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x48(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
sete %al
movb %al, -0x82(%rbp)
movb -0x82(%rbp), %al
testb $0x1, %al
jne 0x1a62db
jmp 0x1a6495
movq -0x48(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x1a6482
movq -0x28(%rbp), %rax
movq -0x68(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x37, %rax
andq $0x1, %rax
movq -0x18(%rbp), %rcx
movq -0x60(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
shrq $0x37, %rcx
andq $0x1, %rcx
cmpl %ecx, %eax
je 0x1a6330
jmp 0x1a6471
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x1a6461
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x28(%rbp), %rax
movq -0x68(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x1c, %rax
andq $0x7ffffff, %rax        # imm = 0x7FFFFFF
movl %eax, %ecx
movq -0x78(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x1c, %rax
andq $0x7ffffff, %rax        # imm = 0x7FFFFFF
movl %eax, %ecx
movq -0x78(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x70(%rbp), %rax
movl %eax, %ecx
movq -0x78(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x78(%rbp), %rax
cmpl $0xffffff, 0x10(%rax)   # imm = 0xFFFFFF
jbe 0x1a63da
movq -0x78(%rbp), %rax
movl $0xffffff, 0x10(%rax)   # imm = 0xFFFFFF
movq -0x78(%rbp), %rax
movl 0x10(%rax), %ecx
shll $0x8, %ecx
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x38, %rax
cmpl $0xff, %eax
ja 0x1a6424
movq -0x18(%rbp), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x38, %rax
movl %eax, -0x88(%rbp)
jmp 0x1a6431
movl $0xff, %eax
movl %eax, -0x88(%rbp)
jmp 0x1a6431
movl -0x88(%rbp), %ecx
movq -0x78(%rbp), %rax
orl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movq -0x78(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %ecx
shlq $0x20, %rcx
movq -0x78(%rbp), %rax
movl 0xc(%rax), %eax
orq %rax, %rcx
movq -0x78(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1a646f
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x1a6471
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x1a62e3
jmp 0x1a6484
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x1a628d
jmp 0x1a6497
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x1a64a1
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1a617b
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x1a6813
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x8(%rbp), %rax
imulq $0x18, 0x8(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq $0x1, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x1a6811
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x1a655c
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x48(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
je 0x1a67fe
jmp 0x1a655e
movq -0x38(%rbp), %rcx
xorl %eax, %eax
cmpq -0x30(%rbp), %rcx
movb %al, -0x89(%rbp)
jae 0x1a659d
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x48(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
setb %al
movb %al, -0x89(%rbp)
movb -0x89(%rbp), %al
testb $0x1, %al
jne 0x1a65a9
jmp 0x1a65b9
jmp 0x1a65ab
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1a655e
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x1a67f6
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x48(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jne 0x1a67f6
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x48(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rcx
xorl %eax, %eax
cmpq -0x30(%rbp), %rcx
movb %al, -0x8a(%rbp)
jae 0x1a6652
movq -0x28(%rbp), %rax
movq -0x68(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x48(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
sete %al
movb %al, -0x8a(%rbp)
movb -0x8a(%rbp), %al
testb $0x1, %al
jne 0x1a6661
jmp 0x1a67f4
movq -0x48(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x1a67e1
movq -0x28(%rbp), %rax
movq -0x68(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x37, %rax
andq $0x1, %rax
movq -0x18(%rbp), %rcx
movq -0x60(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
shrq $0x37, %rcx
andq $0x1, %rcx
cmpl %ecx, %eax
je 0x1a66b6
jmp 0x1a67d0
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x28(%rbp), %rax
movq -0x68(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x1c, %rax
andq $0x7ffffff, %rax        # imm = 0x7FFFFFF
movl %eax, %ecx
movq -0x78(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x1c, %rax
andq $0x7ffffff, %rax        # imm = 0x7FFFFFF
movl %eax, %ecx
movq -0x78(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x70(%rbp), %rax
movl %eax, %ecx
movq -0x78(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x78(%rbp), %rax
cmpl $0xffffff, 0x10(%rax)   # imm = 0xFFFFFF
jbe 0x1a674b
movq -0x78(%rbp), %rax
movl $0xffffff, 0x10(%rax)   # imm = 0xFFFFFF
movq -0x78(%rbp), %rax
movl 0x10(%rax), %ecx
shll $0x8, %ecx
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x38, %rax
cmpl $0xff, %eax
ja 0x1a6795
movq -0x18(%rbp), %rax
movq -0x60(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x38, %rax
movl %eax, -0x90(%rbp)
jmp 0x1a67a2
movl $0xff, %eax
movl %eax, -0x90(%rbp)
jmp 0x1a67a2
movl -0x90(%rbp), %ecx
movq -0x78(%rbp), %rax
orl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movq -0x78(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %ecx
shlq $0x20, %rcx
movq -0x78(%rbp), %rax
movl 0xc(%rax), %eax
orq %rax, %rcx
movq -0x78(%rbp), %rax
movq %rcx, (%rax)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x1a6669
jmp 0x1a67e3
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x1a6613
jmp 0x1a67f6
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x1a6800
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1a651a
jmp 0x1a6813
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
addq 0x8(%rcx), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq 0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x1a6862
movq -0x70(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rbp), %rax
movq (%rax), %rdi
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rsi
shlq $0x4, %rsi
callq 0x2360
movq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rsi
movq -0x8(%rbp), %rax
imulq $0x18, (%rax), %rax
addq %rax, %rsi
callq 0x19c150
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1a6a4b
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rdx
movq 0x8(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x8(%rdx)
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq 0x10(%rbp), %rax
movl %eax, %edx
movq -0x80(%rbp), %rax
movl (%rax), %ecx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x80(%rbp), %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x18, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x18, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x18, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
shrl $0x8, %eax
movl %eax, %eax
cmpq -0x50(%rbp), %rax
jae 0x1a696d
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x18, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
shrl $0x8, %eax
movl %eax, %eax
cmpq -0x58(%rbp), %rax
jbe 0x1a696d
movq -0x80(%rbp), %rax
movl $0x1, 0xc(%rax)
jmp 0x1a69f2
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x18, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
shrl $0x8, %eax
movl %eax, %eax
cmpq -0x58(%rbp), %rax
ja 0x1a6998
movq -0x80(%rbp), %rax
movl $0x2, 0xc(%rax)
jmp 0x1a69f0
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x38(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movl 0x10(%rax,%rcx,8), %eax
shrl $0x8, %eax
movq -0x50(%rbp), %rdx
movq %rdx, %rcx
addq %rcx, %rcx
leaq -0x1(%rax,%rdx,2), %rax
xorl %edx, %edx
divq %rcx
movl %eax, %ecx
incl %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x80(%rbp), %rax
movl 0xc(%rax), %edi
movsd 0x1dfe6b(%rip), %xmm0   # 0x386848
callq 0x1b4690
cvttsd2si %xmm0, %rax
movl %eax, %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0xc(%rax)
jmp 0x1a69f2
movq -0x80(%rbp), %rax
cmpl $0xffffff, 0xc(%rax)    # imm = 0xFFFFFF
jbe 0x1a6a0a
movq -0x80(%rbp), %rax
movl $0xffffff, 0xc(%rax)    # imm = 0xFFFFFF
movq -0x80(%rbp), %rax
movl 0xc(%rax), %ecx
shll $0x8, %ecx
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x18, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
andl $0xff, %ecx
movq -0x80(%rbp), %rax
orl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1a688a
movq -0x8(%rbp), %rax
movq (%rax), %rax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)