// File: chhylp123[P]hifiasm/anchor.cpp
// Function: minimizers_qgen_input(ha_abufl_s*, unsigned long, char*, long, unsigned long, unsigned long, Candidates_list*, kvec_t_u8_warp*, void*, ha_pt_s*, All_reads*, ul_idx_t const*, kvec_t_u64_warp*, st_mt_t*, unsigned int*, unsigned int*, ha_mzl_t*, unsigned long, ha_mzl_t*, long, unsigned long, unsigned long, kv_u_trans_t*)
void minimizers_qgen_input(ha_abufl_t *ab, uint64_t rid, char* rs, int64_t rl, uint64_t mz_w, uint64_t mz_k, Candidates_list *cl, kvec_t_u8_warp* k_flag, 
void *ha_flt_tab, ha_pt_t *ha_idx, All_reads* rdb, const ul_idx_t *udb, kvec_t_u64_warp* dbg_ct, st_mt_t *sp, uint32_t *high_occ, 
uint32_t *low_occ, ha_mzl_t *in, uint64_t in_n, ha_mzl_t *idx, int64_t idx_n, uint64_t mzl_cutoff, uint64_t chain_cutoff, kv_u_trans_t *kov)
{
	// fprintf(stderr, "+[M::%s]\n", __func__);
	uint64_t i, k, l, max_cnt = UINT32_MAX, min_cnt = 0, n; ha_mzl_t *z, *p, *y; anchor1_t *an;
	int64_t zi, ns, ne; uint8_t rev; k_mer_hit *s;
	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); 

	for (i = 0, ab->n_a = 0; i < in_n; ++i) {
		///z is one of the minimizer
		z = &in[i]; p = &(idx[z->x]); n = 0;
		assert(z->pos == p->pos && z->rid == p->rid && z->span == p->span && z->rev == p->rev);
		for (zi = z->x+1; zi < idx_n && idx[zi].x == p->x && n < mzl_cutoff; zi++) {
			if(idx[zi].rid == rid) continue; n++;
		}
		for (zi = ((int64_t)z->x)-1; zi >= 0 && idx[zi].x == p->x && n < mzl_cutoff; zi--) {
			if(idx[zi].rid == rid) continue; n++;
		}
		if((!n) || (n >= mzl_cutoff)) continue;
		ab->n_a += n;
	}
	// if(rid == 0) {
	// 	fprintf(stderr, "-0-[M::%s] ab->n_a::%lu, in_n::%lu\n", __func__, ab->n_a, in_n);
	// }

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

	for (i = 0, k = 0; i < in_n; ++i) {
		///z is one of the minimizer
		z = &in[i]; p = &(idx[z->x]); n = 0; ns = 0; ne = -1;
		for (zi = z->x+1; zi < idx_n && idx[zi].x == p->x && n < mzl_cutoff; zi++) {
			if(idx[zi].rid == rid) continue; n++;
		}
		ne = zi;
		for (zi = ((int64_t)z->x)-1; zi >= 0 && idx[zi].x == p->x && n < mzl_cutoff; zi--) {
			if(idx[zi].rid == rid) continue; n++;
		}
		ns = zi + 1; 
		if((!n) || (n >= mzl_cutoff)) continue;
		n = ne - ns; if(n > ((uint32_t)(0xffffffu))) n = 0xffffffu; n<<=8;

		for (zi = z->x+1; zi < idx_n && idx[zi].x == p->x; zi++) {
			if(idx[zi].rid == rid) continue; 
			y = &(idx[zi]); an = &ab->a[k++];
			rev = z->rev == y->rev? 0 : 1;
			an->other_off = rev?((uint32_t)-1)-1-(y->pos+1-y->span):y->pos;
			an->self_off = z->pos;
			///an->cnt: cnt<<8|span
			an->cnt = ((z->span <= ((uint32_t)(0xffu)))?z->span:((uint32_t)(0xffu))); an->cnt |= n;
			an->srt = (uint64_t)y->rid<<33 | (uint64_t)rev<<32 | an->self_off;
		}
		for (zi = ((int64_t)z->x)-1; zi >= 0 && idx[zi].x == p->x; zi--) {
			if(idx[zi].rid == rid) continue; 
			y = &(idx[zi]); an = &ab->a[k++];
			rev = z->rev == y->rev? 0 : 1;
			an->other_off = rev?((uint32_t)-1)-1-(y->pos+1-y->span):y->pos;
			an->self_off = z->pos;
			///an->cnt: cnt<<8|span
			an->cnt = ((z->span <= ((uint32_t)(0xffu)))?z->span:((uint32_t)(0xffu))); an->cnt |= n;
			an->srt = (uint64_t)y->rid<<33 | (uint64_t)rev<<32 | an->self_off;
		}
	}
	assert(k == ab->n_a);

	uint64_t kn, spn; u_trans_t *ka; 
	kn = spn = 0; ka = NULL; sp->n = 0;
	if(kov) {
		kn = u_trans_n(*kov, rid); ka = u_trans_a(*kov, rid); 
	}
	if(kn > 0) {
		kv_resize(uint64_t, *sp, kn);
		for (k = 0; k < kn; ++k) {
			if(ka[k].del) continue;
			l = ka[k].tn; l <<= 1; l |= ka[k].rev; 
			kv_push(uint64_t, *sp, l);
		}
		if(sp->n > 1) radix_sort_anc64(sp->a, sp->a + sp->n);
	}

	radix_sort_ha_an1(ab->a, ab->a + ab->n_a); kn = 0;
	for (k = 1, l = n = 0, spn = sp->n; k <= ab->n_a; ++k) {
		if (k == ab->n_a || (ab->a[k].srt>>32) != (ab->a[l].srt>>32)) {
			if(k - l >= chain_cutoff) {
				for (; kn < spn && sp->a[kn] < (ab->a[l].srt>>32); kn++);
				if(kn < spn && sp->a[kn] == (ab->a[l].srt>>32)) kv_push(uint64_t, *sp, n);
				for (; kn < spn && sp->a[kn] == (ab->a[l].srt>>32); kn++) sp->a[kn] = (uint64_t)-1;
				for (i = l; i < k; i++) ab->a[n++] = ab->a[i];
			}
			l = k;
		}
	}
	ab->n_a = n;
	for (k = kn = 0; k < spn; k++) {
		if(sp->a[k] == (uint64_t)-1) continue;
		sp->a[kn++] = sp->a[k];
	}
	// sp->n = kn;
	if(kn > 0) gen_pair_chain(ab, rid, sp, kn, in, in_n, idx, idx_n, mzl_cutoff);
	if(spn > 0) {
		for (k = spn, kn = 0; k < sp->n; k++) sp->a[kn++] = sp->a[k];
		sp->n = kn;
	}
	

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

    uint64_t tid = (uint64_t)-1, tl = (uint64_t)-1;
    for (k = 1, l = 0; k <= ab->n_a; ++k) {
        if (k == ab->n_a || ab->a[k].srt != ab->a[l].srt) {
            if (k-l>1) radix_sort_ha_an3(ab->a+l, ab->a+k);
            if((ab->a[l].srt>>33)!=tid) {
                tid = ab->a[l].srt>>33;
                tl = rdb?Get_READ_LENGTH((*rdb), tid):udb->ug->u.a[tid].len;
            } 
            for (i = l; i < k; i++) {
                s = &cl->list[i];
                s->readID = ab->a[i].srt>>33;
                s->strand = (ab->a[i].srt>>32)&1;
                if(!(s->strand)) {
                    s->offset = ab->a[i].other_off;
                } else {
                    s->offset = ((uint32_t)-1)-ab->a[i].other_off;
                    s->offset = tl-s->offset;
                }
                s->self_offset = ab->a[i].self_off;
                if(((ab->a[i].cnt>>8) < max_cnt) && ((ab->a[i].cnt>>8) > min_cnt)){
                    s->cnt = 1;
                } else if((ab->a[i].cnt>>8) <= min_cnt) {
                    s->cnt = 2;
                } else{
                    s->cnt = 1 + (((ab->a[i].cnt>>8) + (max_cnt<<1) - 1)/(max_cnt<<1));
                    s->cnt = pow(s->cnt, 1.1);
                }
                if(s->cnt > ((uint32_t)(0xffffffu))) s->cnt = 0xffffffu;
                s->cnt <<= 8; s->cnt |= (((uint32_t)(0xffu))&(ab->a[i].cnt));
            }
            l = k;
        }
    }
	cl->length = ab->n_a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq 0x90(%rbp), %rax
movq 0x88(%rbp), %rax
movq 0x80(%rbp), %rax
movq 0x78(%rbp), %rax
movq 0x70(%rbp), %rax
movq 0x68(%rbp), %rax
movq 0x60(%rbp), %rax
movq 0x58(%rbp), %rax
movq 0x50(%rbp), %rax
movq 0x48(%rbp), %rax
movq 0x40(%rbp), %rax
movq 0x38(%rbp), %rax
movq 0x30(%rbp), %rax
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, 0x50(%rbp)
je 0x1a7b53
movq 0x50(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x50(%rbp)
cmpq $0x2, -0x50(%rbp)
jae 0x1a7b51
movq $0x2, -0x50(%rbp)
jmp 0x1a7b53
cmpq $0x0, 0x58(%rbp)
je 0x1a7b75
movq 0x58(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x58(%rbp)
cmpq $0x2, -0x58(%rbp)
jae 0x1a7b73
movq $0x2, -0x58(%rbp)
jmp 0x1a7b75
movq 0x10(%rbp), %rdi
callq 0x23090
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x38(%rbp), %rax
cmpq 0x68(%rbp), %rax
jae 0x1a7e20
movq 0x60(%rbp), %rax
imulq $0x18, -0x38(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq 0x70(%rbp), %rax
movq -0x68(%rbp), %rcx
imulq $0x18, (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
movl %eax, %ecx
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
movl %eax, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0xd1(%rbp)
jne 0x1a7c65
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
andq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
movl %eax, %ecx
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
andq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
movl %eax, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0xd1(%rbp)
jne 0x1a7c65
movq -0x68(%rbp), %rax
movzbl 0x10(%rax), %ecx
movq -0x70(%rbp), %rax
movzbl 0x10(%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0xd1(%rbp)
jne 0x1a7c65
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
movq -0x70(%rbp), %rcx
movq 0x8(%rcx), %rcx
shrq $0x1f, %rcx
andq $0x1, %rcx
cmpl %ecx, %eax
sete %al
movb %al, -0xd1(%rbp)
movb -0xd1(%rbp), %al
testb $0x1, %al
jne 0x1a7c71
jmp 0x1a7c73
jmp 0x1a7c92
leaq 0x1e3bd6(%rip), %rdi    # 0x38b850
leaq 0x1e3c1e(%rip), %rsi    # 0x38b89f
movl $0x587, %edx            # imm = 0x587
leaq 0x1e3ca0(%rip), %rcx    # 0x38b92d
callq 0x2130
movq -0x68(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rcx
xorl %eax, %eax
cmpq 0x78(%rbp), %rcx
movb %al, -0xd2(%rbp)
jge 0x1a7cf0
movq 0x70(%rbp), %rax
imulq $0x18, -0x88(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x70(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0xd2(%rbp)
jne 0x1a7cf0
movq -0x60(%rbp), %rax
cmpq 0x80(%rbp), %rax
setb %al
movb %al, -0xd2(%rbp)
movb -0xd2(%rbp), %al
testb $0x1, %al
jne 0x1a7cfc
jmp 0x1a7d40
movq 0x70(%rbp), %rax
imulq $0x18, -0x88(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
andq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
cmpq -0x10(%rbp), %rax
jne 0x1a7d1d
jmp 0x1a7d29
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x1a7ca4
movq -0x68(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rax
movq %rax, -0x88(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x88(%rbp)
movb %al, -0xd3(%rbp)
jl 0x1a7d9b
movq 0x70(%rbp), %rax
imulq $0x18, -0x88(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x70(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0xd3(%rbp)
jne 0x1a7d9b
movq -0x60(%rbp), %rax
cmpq 0x80(%rbp), %rax
setb %al
movb %al, -0xd3(%rbp)
movb -0xd3(%rbp), %al
testb $0x1, %al
jne 0x1a7da7
jmp 0x1a7deb
movq 0x70(%rbp), %rax
imulq $0x18, -0x88(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
andq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
cmpq -0x10(%rbp), %rax
jne 0x1a7dc8
jmp 0x1a7dd4
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x88(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x1a7d52
cmpq $0x0, -0x60(%rbp)
je 0x1a7dff
movq -0x60(%rbp), %rax
cmpq 0x80(%rbp), %rax
jb 0x1a7e01
jmp 0x1a7e0f
movq -0x60(%rbp), %rcx
movq -0x8(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1a7b91
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x1a7e61
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 $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq 0x68(%rbp), %rax
jae 0x1a8454
movq 0x60(%rbp), %rax
imulq $0x18, -0x38(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq 0x70(%rbp), %rax
movq -0x68(%rbp), %rcx
imulq $0x18, (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x90(%rbp)
movq $-0x1, -0x98(%rbp)
movq -0x68(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rcx
xorl %eax, %eax
cmpq 0x78(%rbp), %rcx
movb %al, -0xd4(%rbp)
jge 0x1a7f1e
movq 0x70(%rbp), %rax
imulq $0x18, -0x88(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x70(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0xd4(%rbp)
jne 0x1a7f1e
movq -0x60(%rbp), %rax
cmpq 0x80(%rbp), %rax
setb %al
movb %al, -0xd4(%rbp)
movb -0xd4(%rbp), %al
testb $0x1, %al
jne 0x1a7f2a
jmp 0x1a7f6e
movq 0x70(%rbp), %rax
imulq $0x18, -0x88(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
andq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
cmpq -0x10(%rbp), %rax
jne 0x1a7f4b
jmp 0x1a7f57
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x1a7ed2
movq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x68(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rax
movq %rax, -0x88(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x88(%rbp)
movb %al, -0xd5(%rbp)
jl 0x1a7fd7
movq 0x70(%rbp), %rax
imulq $0x18, -0x88(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x70(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0xd5(%rbp)
jne 0x1a7fd7
movq -0x60(%rbp), %rax
cmpq 0x80(%rbp), %rax
setb %al
movb %al, -0xd5(%rbp)
movb -0xd5(%rbp), %al
testb $0x1, %al
jne 0x1a7fe3
jmp 0x1a8027
movq 0x70(%rbp), %rax
imulq $0x18, -0x88(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
andq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
cmpq -0x10(%rbp), %rax
jne 0x1a8004
jmp 0x1a8010
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x88(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x1a7f8e
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x1a804d
movq -0x60(%rbp), %rax
cmpq 0x80(%rbp), %rax
jb 0x1a8052
jmp 0x1a8443
movq -0x98(%rbp), %rax
subq -0x90(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0xffffff, -0x60(%rbp)  # imm = 0xFFFFFF
jbe 0x1a8076
movq $0xffffff, -0x60(%rbp)  # imm = 0xFFFFFF
movq -0x60(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rcx
xorl %eax, %eax
cmpq 0x78(%rbp), %rcx
movb %al, -0xd6(%rbp)
jge 0x1a80cb
movq 0x70(%rbp), %rax
imulq $0x18, -0x88(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x70(%rbp), %rcx
cmpq (%rcx), %rax
sete %al
movb %al, -0xd6(%rbp)
movb -0xd6(%rbp), %al
testb $0x1, %al
jne 0x1a80da
jmp 0x1a8263
movq 0x70(%rbp), %rax
imulq $0x18, -0x88(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
andq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
cmpq -0x10(%rbp), %rax
jne 0x1a80fe
jmp 0x1a824c
movq 0x70(%rbp), %rax
imulq $0x18, -0x88(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x40(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
movl %eax, %edx
movq -0x78(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
movl %eax, %esi
movl $0x1, %eax
xorl %ecx, %ecx
cmpl %esi, %edx
cmovel %ecx, %eax
movb %al, -0x99(%rbp)
cmpb $0x0, -0x99(%rbp)
je 0x1a819c
movq -0x78(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
movl %eax, %ecx
addl $0x1, %ecx
movq -0x78(%rbp), %rax
movzbl 0x10(%rax), %eax
subl %eax, %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
subl %ecx, %eax
movl %eax, -0xdc(%rbp)
jmp 0x1a81ae
movq -0x78(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
movl %eax, -0xdc(%rbp)
movl -0xdc(%rbp), %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
movl %eax, %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x68(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0xff, %eax
ja 0x1a81ef
movq -0x68(%rbp), %rax
movzbl 0x10(%rax), %eax
movl %eax, -0xe0(%rbp)
jmp 0x1a81fc
movl $0xff, %eax
movl %eax, -0xe0(%rbp)
jmp 0x1a81fc
movl -0xe0(%rbp), %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x60(%rbp), %rdx
movq -0x80(%rbp), %rax
movl 0x10(%rax), %ecx
orq %rdx, %rcx
movl %ecx, 0x10(%rax)
movq -0x78(%rbp), %rax
movq 0x8(%rax), %rcx
andq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
shlq $0x21, %rcx
movzbl -0x99(%rbp), %eax
shlq $0x20, %rax
orq %rax, %rcx
movq -0x80(%rbp), %rax
movl 0x8(%rax), %eax
orq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, (%rax)
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x1a8094
movq -0x68(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rax
movq %rax, -0x88(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x88(%rbp)
movb %al, -0xe1(%rbp)
jl 0x1a82a9
movq 0x70(%rbp), %rax
imulq $0x18, -0x88(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x70(%rbp), %rcx
cmpq (%rcx), %rax
sete %al
movb %al, -0xe1(%rbp)
movb -0xe1(%rbp), %al
testb $0x1, %al
jne 0x1a82b8
jmp 0x1a8441
movq 0x70(%rbp), %rax
imulq $0x18, -0x88(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
andq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
cmpq -0x10(%rbp), %rax
jne 0x1a82dc
jmp 0x1a842a
movq 0x70(%rbp), %rax
imulq $0x18, -0x88(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x40(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
movl %eax, %edx
movq -0x78(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
movl %eax, %esi
movl $0x1, %eax
xorl %ecx, %ecx
cmpl %esi, %edx
cmovel %ecx, %eax
movb %al, -0x99(%rbp)
cmpb $0x0, -0x99(%rbp)
je 0x1a837a
movq -0x78(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
movl %eax, %ecx
addl $0x1, %ecx
movq -0x78(%rbp), %rax
movzbl 0x10(%rax), %eax
subl %eax, %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
subl %ecx, %eax
movl %eax, -0xe8(%rbp)
jmp 0x1a838c
movq -0x78(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
movl %eax, -0xe8(%rbp)
movl -0xe8(%rbp), %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
movl %eax, %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x68(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0xff, %eax
ja 0x1a83cd
movq -0x68(%rbp), %rax
movzbl 0x10(%rax), %eax
movl %eax, -0xec(%rbp)
jmp 0x1a83da
movl $0xff, %eax
movl %eax, -0xec(%rbp)
jmp 0x1a83da
movl -0xec(%rbp), %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x60(%rbp), %rdx
movq -0x80(%rbp), %rax
movl 0x10(%rax), %ecx
orq %rdx, %rcx
movl %ecx, 0x10(%rax)
movq -0x78(%rbp), %rax
movq 0x8(%rax), %rcx
andq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
shlq $0x21, %rcx
movzbl -0x99(%rbp), %eax
shlq $0x20, %rax
orq %rax, %rcx
movq -0x80(%rbp), %rax
movl 0x8(%rax), %eax
orq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, (%rax)
movq -0x88(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x1a8275
jmp 0x1a8443
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1a7e71
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x1a8463
jmp 0x1a8482
leaq 0x1e34b6(%rip), %rdi    # 0x38b920
leaq 0x1e342e(%rip), %rsi    # 0x38b89f
movl $0x5bd, %edx            # imm = 0x5BD
leaq 0x1e34b0(%rip), %rcx    # 0x38b92d
callq 0x2130
movq $0x0, -0xb8(%rbp)
movq $0x0, -0xb0(%rbp)
movq $0x0, -0xc0(%rbp)
movq 0x48(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, 0x90(%rbp)
je 0x1a8504
movq 0x90(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0xb0(%rbp)
movq 0x90(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x90(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xc0(%rbp)
cmpq $0x0, -0xb0(%rbp)
jbe 0x1a8743
jmp 0x1a8514
movq 0x48(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0xb0(%rbp), %rax
jae 0x1a85f3
movq -0xb0(%rbp), %rcx
movq 0x48(%rbp), %rax
movq %rcx, 0x8(%rax)
movq 0x48(%rbp), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq 0x48(%rbp), %rax
movq 0x8(%rax), %rcx
shrq %rcx
movq 0x48(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x48(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x2, %rcx
movq 0x48(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x48(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x4, %rcx
movq 0x48(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x48(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x8, %rcx
movq 0x48(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x48(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x10, %rcx
movq 0x48(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x48(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq 0x48(%rbp), %rax
movq 0x10(%rax), %rdi
movq 0x48(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq 0x48(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x1a85f5
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0xb0(%rbp), %rax
jae 0x1a8714
movq -0xc0(%rbp), %rax
imulq $0x30, -0x40(%rbp), %rcx
addq %rcx, %rax
movb 0x28(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
je 0x1a862c
jmp 0x1a8703
movq -0xc0(%rbp), %rax
imulq $0x30, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
shlq %rax
movq %rax, -0x48(%rbp)
movq -0xc0(%rbp), %rax
imulq $0x30, -0x40(%rbp), %rcx
addq %rcx, %rax
movb 0x28(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %eax
orq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq 0x48(%rbp), %rax
movq (%rax), %rax
movq 0x48(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1a86e0
movq 0x48(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1a869f
movq 0x48(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xf8(%rbp)
jmp 0x1a86ad
movl $0x2, %eax
movq %rax, -0xf8(%rbp)
jmp 0x1a86ad
movq -0xf8(%rbp), %rcx
movq 0x48(%rbp), %rax
movq %rcx, 0x8(%rax)
movq 0x48(%rbp), %rax
movq 0x10(%rax), %rdi
movq 0x48(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq 0x48(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x48(%rbp), %rdx
movq 0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x48(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x1a8703
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1a85fd
movq 0x48(%rbp), %rax
cmpq $0x1, (%rax)
jbe 0x1a8741
movq 0x48(%rbp), %rax
movq 0x10(%rax), %rdi
movq 0x48(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x48(%rbp), %rax
movq (%rax), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x19cfd0
jmp 0x1a8743
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, -0xb0(%rbp)
movq $0x1, -0x40(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x48(%rbp)
movq 0x48(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
ja 0x1a8a58
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
je 0x1a87e9
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x18, -0x40(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
imulq $0x18, -0x48(%rbp), %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
je 0x1a8a45
movq -0x40(%rbp), %rax
subq -0x48(%rbp), %rax
cmpq 0x88(%rbp), %rax
jb 0x1a8a3d
jmp 0x1a8800
movq -0xb0(%rbp), %rcx
xorl %eax, %eax
cmpq -0xb8(%rbp), %rcx
movb %al, -0xf9(%rbp)
jae 0x1a884e
movq 0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xb0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
imulq $0x18, -0x48(%rbp), %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
setb %al
movb %al, -0xf9(%rbp)
movb -0xf9(%rbp), %al
testb $0x1, %al
jne 0x1a885a
jmp 0x1a8870
jmp 0x1a885c
movq -0xb0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb0(%rbp)
jmp 0x1a8800
movq -0xb0(%rbp), %rax
cmpq -0xb8(%rbp), %rax
jae 0x1a894d
movq 0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xb0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
imulq $0x18, -0x48(%rbp), %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
jne 0x1a894d
jmp 0x1a88b9
movq 0x48(%rbp), %rax
movq (%rax), %rax
movq 0x48(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1a892a
movq 0x48(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1a88e9
movq 0x48(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x108(%rbp)
jmp 0x1a88f7
movl $0x2, %eax
movq %rax, -0x108(%rbp)
jmp 0x1a88f7
movq -0x108(%rbp), %rcx
movq 0x48(%rbp), %rax
movq %rcx, 0x8(%rax)
movq 0x48(%rbp), %rax
movq 0x10(%rax), %rdi
movq 0x48(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq 0x48(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x60(%rbp), %rdx
movq 0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x48(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x1a894d
jmp 0x1a894f
movq -0xb0(%rbp), %rcx
xorl %eax, %eax
cmpq -0xb8(%rbp), %rcx
movb %al, -0x109(%rbp)
jae 0x1a899d
movq 0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xb0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
imulq $0x18, -0x48(%rbp), %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
sete %al
movb %al, -0x109(%rbp)
movb -0x109(%rbp), %al
testb $0x1, %al
jne 0x1a89a9
jmp 0x1a89d7
movq 0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xb0(%rbp), %rcx
movq $-0x1, (%rax,%rcx,8)
movq -0xb0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb0(%rbp)
jmp 0x1a894f
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x1a8a3b
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rcx
imulq $0x18, -0x38(%rbp), %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x60(%rbp), %rdx
movq %rdx, %rsi
addq $0x1, %rsi
movq %rsi, -0x60(%rbp)
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1a89df
jmp 0x1a8a3d
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x1a8a47
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1a8794
movq -0x60(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0xb0(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0xb8(%rbp), %rax
jae 0x1a8ad7
movq 0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x40(%rbp), %rcx
cmpq $-0x1, (%rax,%rcx,8)
jne 0x1a8a98
jmp 0x1a8ac9
movq 0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xb0(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xb0(%rbp)
movq %rdx, (%rax,%rcx,8)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1a8a76
cmpq $0x0, -0xb0(%rbp)
jbe 0x1a8b1e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq 0x48(%rbp), %rdx
movq -0xb0(%rbp), %rcx
movq 0x60(%rbp), %r8
movq 0x68(%rbp), %r9
movq 0x70(%rbp), %r11
movq 0x78(%rbp), %r10
movq 0x80(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x1a6a60
cmpq $0x0, -0xb8(%rbp)
jbe 0x1a8b98
movq -0xb8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0xb0(%rbp)
movq -0x40(%rbp), %rax
movq 0x48(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1a8b8a
movq 0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xb0(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xb0(%rbp)
movq %rdx, (%rax,%rcx,8)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1a8b3e
movq -0xb0(%rbp), %rcx
movq 0x48(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jb 0x1a8bda
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq 0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rbp), %rax
movq (%rax), %rdi
movq 0x10(%rbp), %rax
movq 0x10(%rax), %rsi
shlq $0x4, %rsi
callq 0x2360
movq %rax, %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movq $-0x1, -0xc8(%rbp)
movq $-0x1, -0xd0(%rbp)
movq $0x1, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
ja 0x1a8f98
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
je 0x1a8c4a
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x18, -0x40(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
imulq $0x18, -0x48(%rbp), %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
je 0x1a8f85
movq -0x40(%rbp), %rax
subq -0x48(%rbp), %rax
cmpq $0x1, %rax
jbe 0x1a8c7d
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
imulq $0x18, -0x48(%rbp), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rsi
imulq $0x18, -0x40(%rbp), %rax
addq %rax, %rsi
callq 0x19cb70
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x21, %rax
cmpq -0xc8(%rbp), %rax
je 0x1a8d12
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x21, %rax
movq %rax, -0xc8(%rbp)
cmpq $0x0, 0x30(%rbp)
je 0x1a8cde
movq 0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0xc8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x118(%rbp)
jmp 0x1a8d04
movq 0x38(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0xc8(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x1a8f7d
movq 0x10(%rbp), %rax
movq (%rax), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x18, -0x38(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x21, %rax
movl %eax, %edx
movq -0xa8(%rbp), %rax
movl (%rax), %ecx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x18, -0x38(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
andq $0x1, %rax
movl %eax, %edx
movq -0xa8(%rbp), %rax
movl (%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, (%rax)
movq -0xa8(%rbp), %rax
movl (%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x1a8dd9
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x18, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
movq -0xa8(%rbp), %rax
movl %ecx, 0x4(%rax)
jmp 0x1a8e1b
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x18, -0x38(%rbp), %rcx
addq %rcx, %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
subl 0xc(%rax), %ecx
movq -0xa8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0xd0(%rbp), %rax
movq -0xa8(%rbp), %rcx
movl 0x4(%rcx), %ecx
subq %rcx, %rax
movl %eax, %ecx
movq -0xa8(%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 -0xa8(%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 0x1a8e87
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 0x1a8e87
movq -0xa8(%rbp), %rax
movl $0x1, 0xc(%rax)
jmp 0x1a8f18
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 0x1a8eb5
movq -0xa8(%rbp), %rax
movl $0x2, 0xc(%rax)
jmp 0x1a8f16
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 -0xa8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0xa8(%rbp), %rax
movl 0xc(%rax), %edi
movsd 0x1dd948(%rip), %xmm0   # 0x386848
callq 0x1b4690
cvttsd2si %xmm0, %rax
movl %eax, %ecx
movq -0xa8(%rbp), %rax
movl %ecx, 0xc(%rax)
jmp 0x1a8f18
movq -0xa8(%rbp), %rax
cmpl $0xffffff, 0xc(%rax)    # imm = 0xFFFFFF
jbe 0x1a8f36
movq -0xa8(%rbp), %rax
movl $0xffffff, 0xc(%rax)    # imm = 0xFFFFFF
movq -0xa8(%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 -0xa8(%rbp), %rax
orl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1a8d1a
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x1a8f87
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1a8c00
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq 0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq