// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap/map.c
// Function: mm_map
const mm_reg1_t *mm_map(const mm_idx_t *mi, int l_seq, const char *seq, int *n_regs, mm_tbuf_t *b, const mm_mapopt_t *opt, const char *name)
{
	int j, n_dreg = 0, u = 0;
	const uint64_t *dreg = 0;

	b->mini.n = b->coef.n = 0;
	mm_sketch(seq, l_seq, mi->w, mi->k, 0, &b->mini);
	if (opt->sdust_thres > 0)
		dreg = sdust_core((const uint8_t*)seq, l_seq, opt->sdust_thres, 64, &n_dreg, b->sdb);
	for (j = 0; j < b->mini.n; ++j) {
		int k, n;
		const uint64_t *r;
		int32_t qpos = (uint32_t)b->mini.a[j].y>>1, strand = b->mini.a[j].y&1;
		b->mini.a[j].y = b->mini.a[j].y<<32>>32; // clear the rid field
		if (dreg && n_dreg) { // test complexity
			int s = qpos - (mi->k - 1), e = s + mi->k;
			while (u < n_dreg && (uint32_t)dreg[u] <= s) ++u;
			if (u < n_dreg && dreg[u]>>32 < e) {
				int v, l = 0;
				for (v = u; v < n_dreg && dreg[v]>>32 < e; ++v) { // iterate over LCRs overlapping this minimizer
					int ss = s > dreg[v]>>32? s : dreg[v]>>32;
					int ee = e < (uint32_t)dreg[v]? e : (uint32_t)dreg[v];
					l += ee - ss;
				}
				if (l > mi->k>>1) continue;
			}
		}
		r = mm_idx_get(mi, b->mini.a[j].x, &n);
		if (n > mi->max_occ) continue;
		for (k = 0; k < n; ++k) {
			int32_t rpos = (uint32_t)r[k] >> 1;
			mm128_t *p;
			if (name && (opt->flag&MM_F_NO_SELF) && mi->name && strcmp(name, mi->name[r[k]>>32]) == 0 && rpos == qpos)
				continue;
			if (name && (opt->flag&MM_F_AVA) && mi->name && strcmp(name, mi->name[r[k]>>32]) > 0)
				continue;
			kv_pushp(mm128_t, b->coef, &p);
			if ((r[k]&1) == strand) { // forward strand
				p->x = (uint64_t)r[k] >> 32 << 32 | (0x80000000U + rpos - qpos);
				p->y = (uint64_t)j << 32 | rpos;
			} else { // reverse strand
				p->x = (uint64_t)r[k] >> 32 << 32 | (rpos + qpos) | 1ULL<<63;
				p->y = (uint64_t)j << 32 | rpos;
			}
		}
	}
	radix_sort_128x(b->coef.a, b->coef.a + b->coef.n);
	b->reg.n = 0;
	get_reg(b, opt->radius, mi->k, opt->min_cnt, opt->max_gap, opt->merge_frac, opt->flag);
	*n_regs = b->reg.n;
	return b->reg.a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r9, %r12
movq %r8, %rbx
movq %rcx, 0x78(%rsp)
movq %rdx, %r14
movl %esi, %ebp
movl $0x0, 0x54(%rsp)
xorl %r13d, %r13d
movq %r13, 0x18(%r8)
movq %r13, (%r8)
movl 0x4(%rdi), %edx
movq %rdi, 0x18(%rsp)
movl 0x8(%rdi), %ecx
movq %r14, %rdi
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x6c04
movl 0x10(%r12), %edx
testl %edx, %edx
jle 0x5615
movq 0x78(%rbx), %r9
leaq 0x54(%rsp), %r8
movq %r14, %rdi
movl %ebp, %esi
movl $0x40, %ecx
callq 0x7350
movq %rax, %r13
cmpq $0x0, (%rbx)
je 0x58fe
movabsq $-0x80000001, %rax      # imm = 0xFFFFFFFF7FFFFFFF
xorl %r15d, %r15d
addq $-0x7fffffff, %rax      # imm = 0x80000001
movq %rax, 0x38(%rsp)
xorl %ebp, %ebp
movq %r12, 0x58(%rsp)
movq %r13, 0x10(%rsp)
testq %r13, %r13
setne %sil
movq 0x10(%rbx), %rax
movq %r15, %rcx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %rdi
movl %edi, %edx
movq %rdi, 0x40(%rsp)
shrl %edi
movq %rdi, 0x8(%rsp)
movq %rdx, 0x8(%rax,%rcx)
movl 0x54(%rsp), %edx
testl %edx, %edx
setne %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x5766
movslq %edx, %rdx
movb $0x1, %r9b
cmpl %edx, %ebp
setl %r11b
jge 0x575d
movq 0x18(%rsp), %rsi
movl 0x8(%rsi), %esi
movq 0x8(%rsp), %rdi
incl %edi
movl %edi, %r8d
subl %esi, %r8d
movslq %ebp, %r10
cmpl (%r13,%r10,8), %r8d
jae 0x56ba
movq %r10, %rbp
jmp 0x56e0
incl %ebp
leaq -0x1(%rdx), %r14
movl %ebp, %r11d
cmpq %r10, %r14
je 0x5742
incl %r11d
leaq 0x1(%r10), %rbp
cmpl 0x8(%r13,%r10,8), %r8d
movq %rbp, %r10
jae 0x56c3
cmpq %rdx, %rbp
setl %r11b
testb %r11b, %r11b
je 0x575d
movslq %ebp, %r10
movl 0x4(%r13,%r10,8), %r11d
movslq %edi, %r10
cmpq %r10, %r11
jae 0x575d
movq %r15, 0x30(%rsp)
xorl %r9d, %r9d
movq %rbp, 0x20(%rsp)
cmpl %ebp, %edx
jle 0x574a
movslq %r8d, %r11
xorl %ebp, %ebp
movq 0x20(%rsp), %r14
movq (%r13,%r14,8), %r9
movq %r9, %r15
shrq $0x20, %r15
cmpq %r10, %r15
jae 0x5747
cmpq %r11, %r15
cmovbl %r8d, %r15d
cmpl %r9d, %edi
cmovbl %edi, %r9d
addl %ebp, %r9d
subl %r15d, %r9d
incq %r14
movl %r9d, %ebp
cmpq %rdx, %r14
jl 0x5710
jmp 0x574a
movl %r11d, %ebp
jmp 0x575d
movl %ebp, %r9d
sarl %esi
cmpl %esi, %r9d
setle %r9b
movq 0x30(%rsp), %r15
movq 0x20(%rsp), %rbp
testb %r9b, %r9b
je 0x58f2
movq (%rax,%rcx), %rsi
movq 0x18(%rsp), %r14
movq %r14, %rdi
leaq 0x50(%rsp), %rdx
callq 0x3c83
movl 0x50(%rsp), %ecx
cmpl 0x18(%r14), %ecx
seta %dl
movq %rax, %r14
testl %ecx, %ecx
setle %al
orb %dl, %al
jne 0x58f2
movq %rbp, 0x20(%rsp)
movq %r15, 0x30(%rsp)
shlq $0x20, %r15
movq %r15, 0x28(%rsp)
xorl %r15d, %r15d
movq (%r14,%r15,8), %rbp
movl %ebp, %r12d
shrl %r12d
cmpq $0x0, 0xc0(%rsp)
je 0x5837
movq 0x58(%rsp), %rax
movl 0x14(%rax), %r13d
testb $0x2, %r13b
je 0x5806
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x5806
movq %rbp, %rcx
shrq $0x20, %rcx
movq (%rax,%rcx,8), %rsi
movq 0xc0(%rsp), %rdi
callq 0x2160
testl %eax, %eax
jne 0x5806
cmpl 0x8(%rsp), %r12d
je 0x58cd
testb $0x8, %r13b
je 0x5837
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x5837
shrq $0x20, %rbp
movq (%rax,%rbp,8), %rsi
movq 0xc0(%rsp), %rdi
callq 0x2160
testl %eax, %eax
jg 0x58cd
movq 0x20(%rbx), %rax
cmpq %rax, 0x18(%rbx)
jne 0x5866
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x20(%rbx)
movq 0x28(%rbx), %rdi
shlq $0x4, %rsi
callq 0x2200
movq %rax, 0x28(%rbx)
movq 0x18(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x18(%rbx)
shlq $0x4, %rax
addq 0x28(%rbx), %rax
movq (%r14,%r15,8), %rcx
movq 0x40(%rsp), %rdx
xorl %ecx, %edx
testb $0x1, %dl
jne 0x58a1
andq 0x38(%rsp), %rcx
movl %r12d, %edx
subl 0x8(%rsp), %edx
addl $0x80000000, %edx       # imm = 0x80000000
orq %rcx, %rdx
jmp 0x58be
movabsq $0x7fffffff00000000, %rdx # imm = 0x7FFFFFFF00000000
andq %rdx, %rcx
movq 0x8(%rsp), %rdx
addl %r12d, %edx
orq %rcx, %rdx
btsq $0x3f, %rdx
movl %r12d, %ecx
orq 0x28(%rsp), %rcx
movq %rdx, (%rax)
movq %rcx, 0x8(%rax)
incq %r15
movslq 0x50(%rsp), %rax
cmpq %rax, %r15
jl 0x57ad
movq 0x58(%rsp), %r12
movq 0x10(%rsp), %r13
movq 0x30(%rsp), %r15
movq 0x20(%rsp), %rbp
incq %r15
cmpq %r15, (%rbx)
ja 0x5643
movq 0x18(%rbx), %rsi
movq 0x28(%rbx), %rdi
shlq $0x4, %rsi
addq %rdi, %rsi
callq 0x31ad
movq $0x0, 0xa0(%rbx)
movslq 0x8(%r12), %rcx
movq 0x18(%rbx), %rax
cmpq %rcx, %rax
jb 0x63b2
movslq (%r12), %r9
movq 0x18(%rsp), %rdx
movl 0x8(%rdx), %edx
movq %rdx, 0x70(%rsp)
movl 0x4(%r12), %edx
movl %edx, 0x48(%rsp)
movl 0x14(%r12), %edx
movss 0x18(%r12), %xmm0
movss %xmm0, 0x28(%rsp)
movl %edx, 0x68(%rsp)
testb $0x4, %dl
movq %rcx, 0x10(%rsp)
movq %r9, 0x8(%rsp)
je 0x5a66
testq %rax, %rax
je 0x598f
movq 0x28(%rbx), %rcx
addq $0x8, %rcx
movq %rax, %rdx
orb $-0x80, 0x3(%rcx)
addq $0x10, %rcx
decq %rdx
jne 0x5982
cmpq $0x2, %rax
jb 0x5a14
movq 0x8(%rsp), %rcx
addl %ecx, %ecx
movabsq $-0x80000001, %rdx      # imm = 0xFFFFFFFF7FFFFFFF
movq 0x28(%rbx), %rsi
leaq 0x18(%rsi), %rdi
movl $0x1, %r8d
movl $0x2, %r9d
movq %r8, %r10
shlq $0x4, %r10
movq (%rsi,%r10), %r14
movl 0x8(%rsi,%r10), %ebp
movq %rdi, %r11
movq %r9, %r15
decq %r15
jle 0x5a05
movq %r14, %r12
subq -0x18(%r11), %r12
cmpq 0x8(%rsp), %r12
jae 0x5a05
movl -0x10(%r11), %r12d
addq $-0x10, %r11
subl %ebp, %r12d
movl %r12d, %r13d
negl %r13d
cmovsl %r12d, %r13d
cmpl %ecx, %r13d
jge 0x59d0
andq %rdx, 0x8(%rsi,%r10)
andq %rdx, (%r11)
incq %r8
incq %r9
addq $0x10, %rdi
cmpq %rax, %r8
jne 0x59ba
xorl %ecx, %ecx
testq %rax, %rax
je 0x5a5d
movl $0x8, %eax
xorl %edx, %edx
movq 0x8(%rsp), %r9
movq 0x28(%rbx), %rsi
testb $-0x80, 0x3(%rsi,%rax)
jne 0x5a4b
leaq (%rsi,%rax), %rdi
addq $-0x8, %rdi
movslq %ecx, %r8
incl %ecx
shlq $0x4, %r8
movups (%rdi), %xmm0
movups %xmm0, (%rsi,%r8)
incq %rdx
addq $0x10, %rax
cmpq %rdx, 0x18(%rbx)
ja 0x5a27
movslq %ecx, %rcx
jmp 0x5a62
movq 0x8(%rsp), %r9
movq %rcx, 0x18(%rbx)
movq $0x0, 0x30(%rbx)
cmpq $0x2, 0x18(%rbx)
jb 0x5bb8
xorl %r15d, %r15d
movl $0x1, %r12d
movq 0x28(%rbx), %rax
movq %r12, %rbp
shlq $0x4, %rbp
movq (%rax,%rbp), %rcx
movslq %r15d, %r14
movq %r14, %r13
shlq $0x4, %r13
subq (%rax,%r13), %rcx
cmpq %r9, %rcx
jbe 0x5ba9
movl %r12d, %r10d
subl %r15d, %r10d
cmpl 0x10(%rsp), %r10d
jl 0x5b72
movq 0x30(%rbx), %rax
testq %rax, %rax
je 0x5b15
movq 0x40(%rbx), %rcx
movq %rax, %rsi
shlq $0x4, %rsi
movq -0x8(%rcx,%rsi), %rdx
movl -0x10(%rcx,%rsi), %edi
addl %edx, %edi
movl %edi, %r8d
subl %r15d, %r8d
jle 0x5b15
subl %edx, %edi
cmpl %edi, %r10d
cmovll %r10d, %edi
xorps %xmm0, %xmm0
cvtsi2ss %r8d, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %edi, %xmm1
mulss 0x28(%rsp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x5b15
addq %rsi, %rcx
movslq %edx, %rax
movq %r12, %rdx
subq %rax, %rdx
movq %rdx, -0x10(%rcx)
jmp 0x5b72
movq 0x38(%rbx), %rcx
cmpq %rcx, %rax
jne 0x5b52
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x38(%rbx)
movq 0x40(%rbx), %rdi
shlq $0x4, %rsi
movl %r10d, 0x40(%rsp)
callq 0x2200
movl 0x40(%rsp), %r10d
movq 0x8(%rsp), %r9
movq %rax, 0x40(%rbx)
movq 0x30(%rbx), %rax
movq 0x40(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x30(%rbx)
shlq $0x4, %rax
movslq %r10d, %rdx
movq %rdx, (%rcx,%rax)
movq %r14, 0x8(%rcx,%rax)
leal 0x1(%r15), %eax
cmpl %eax, %r12d
cmovgl %r12d, %eax
addq $0x10, %r13
incq %r14
cmpq %r12, %r14
jge 0x5ba6
movq 0x28(%rbx), %rcx
movq (%rcx,%rbp), %rdx
subq (%rcx,%r13), %rdx
incl %r15d
addq $0x10, %r13
incq %r14
cmpq %r9, %rdx
ja 0x5b84
jmp 0x5ba9
movl %eax, %r15d
incq %r12
cmpq %r12, 0x18(%rbx)
ja 0x5a82
jmp 0x5bc1
movl $0x1, %r12d
xorl %r15d, %r15d
movl %r12d, %ebp
subl %r15d, %ebp
cmpl 0x10(%rsp), %ebp
jl 0x5c7c
movq 0x30(%rbx), %rax
testq %rax, %rax
je 0x5c2b
movq 0x40(%rbx), %rcx
movq %rax, %rsi
shlq $0x4, %rsi
movl -0x8(%rcx,%rsi), %edx
movl -0x10(%rcx,%rsi), %edi
addl %edx, %edi
movl %edi, %r8d
subl %r15d, %r8d
jle 0x5c2b
subl %edx, %edi
cmpl %edi, %ebp
cmovll %ebp, %edi
xorps %xmm0, %xmm0
cvtsi2ss %r8d, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %edi, %xmm1
movss 0x28(%rsp), %xmm2
mulss %xmm1, %xmm2
ucomiss %xmm2, %xmm0
jbe 0x5c2b
addq %rsi, %rcx
subl %edx, %r12d
movslq %r12d, %rax
movq %rax, -0x10(%rcx)
jmp 0x5c7c
movq 0x38(%rbx), %rcx
cmpq %rcx, %rax
jne 0x5c59
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
movl $0x2, %esi
cmovneq %rax, %rsi
movq %rsi, 0x38(%rbx)
movq 0x40(%rbx), %rdi
shlq $0x4, %rsi
callq 0x2200
movq %rax, 0x40(%rbx)
movq 0x30(%rbx), %rax
movq 0x40(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x30(%rbx)
shlq $0x4, %rax
movslq %ebp, %rdx
movq %rdx, (%rcx,%rax)
movslq %r15d, %rdx
movq %rdx, 0x8(%rcx,%rax)
movq 0x30(%rbx), %rsi
movq 0x40(%rbx), %rdi
shlq $0x4, %rsi
addq %rdi, %rsi
callq 0x31ad
movq $0x0, 0x48(%rbx)
movl 0x30(%rbx), %eax
movq 0x10(%rsp), %r13
cmpl $0x2, %r13d
movl $0x1, %ecx
cmovgel %r13d, %ecx
movl %ecx, 0x6c(%rsp)
decl %eax
movl 0x48(%rsp), %ebp
js 0x6237
movq 0x70(%rsp), %rcx
leal -0x1(%rcx), %r14d
movl %eax, %ecx
movl %r14d, 0x4c(%rsp)
movq 0x40(%rbx), %rax
movq %rcx, 0x80(%rsp)
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %r15
movq (%rax,%rcx), %r12
addq %r15, %r12
movl %r12d, %eax
subl %r15d, %eax
cmpl 0x84(%rbx), %eax
jbe 0x5d7c
decl %eax
movl %eax, %ecx
shrl %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x8, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x10, %ecx
orl %eax, %ecx
leal 0x1(%rcx), %eax
movl %eax, 0x84(%rbx)
movq 0x88(%rbx), %rdi
leal 0x8(,%rcx,8), %esi
callq 0x2200
movq %rax, 0x88(%rbx)
movq 0x90(%rbx), %rdi
movl 0x84(%rbx), %esi
shlq $0x3, %rsi
callq 0x2200
movq %rax, 0x90(%rbx)
movq 0x98(%rbx), %rdi
movl 0x84(%rbx), %esi
shlq $0x3, %rsi
callq 0x2200
movq %rax, 0x98(%rbx)
movl $0x0, 0x80(%rbx)
movq $0x0, 0x8(%rsp)
movabsq $0x7fffffff00000000, %rax # imm = 0x7FFFFFFF00000000
movq %rax, 0x38(%rsp)
cmpl %r15d, %r12d
jle 0x5e0c
movslq %r15d, %rax
movslq %r12d, %rcx
subq %rax, %rcx
shlq $0x4, %rax
addq 0x28(%rbx), %rax
xorl %edx, %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
cmpq $-0x1, (%rax)
je 0x5def
movq 0x8(%rax), %rdx
movq 0x88(%rbx), %rsi
movl 0x80(%rbx), %edi
leal 0x1(%rdi), %r8d
movl %r8d, 0x80(%rbx)
movq %rdx, (%rsi,%rdi,8)
movq (%rax), %rdx
movq %rdx, %rsi
shrq $0x20, %rsi
shrq $0x3f, %rdx
addq $0x10, %rax
decq %rcx
jne 0x5dbb
movq %rdx, 0x8(%rsp)
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
shlq $0x20, %rsi
movq %rsi, 0x38(%rsp)
movl 0x80(%rbx), %eax
cmpl %r13d, %eax
jb 0x621f
movq 0x88(%rbx), %rdi
leaq (%rdi,%rax,8), %rsi
callq 0x5160
movl 0x80(%rbx), %edi
movq 0x88(%rbx), %rsi
movq 0x90(%rbx), %rdx
movq 0x98(%rbx), %rcx
cmpl $0x0, 0x8(%rsp)
je 0x5e54
callq 0x53b5
jmp 0x5e59
callq 0x51c5
cmpl %eax, %r13d
jg 0x621f
movl $0x1, %r9d
cmpl $0x2, %eax
jl 0x5ebb
movq 0x88(%rbx), %rcx
movq 0x90(%rbx), %rdx
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl $0x1, %r9d
movl $0x1, %esi
movq -0x8(%rdx,%rsi,8), %r8
movq (%rdx,%rsi,8), %rdi
movq (%rcx,%rdi,8), %rdi
movq (%rcx,%r8,8), %r8
xorq %rdi, %r8
shrq $0x20, %r8
je 0x5eb3
movslq %r9d, %r8
incl %r9d
movq (%rdx,%r8,8), %r8
movq %rdi, (%rcx,%r8,8)
incq %rsi
cmpq %rsi, %rax
jne 0x5e8b
cmpl 0x6c(%rsp), %r9d
jl 0x621f
movq %r9, %rcx
movq 0x8(%rsp), %rax
shll $0x1f, %eax
orq %rax, 0x38(%rsp)
movl %ecx, %edi
incl %ecx
movq %rcx, 0x58(%rsp)
xorl %r15d, %r15d
movl $0x1, %r12d
movq %rdi, 0x60(%rsp)
movl $0x0, %eax
cmpq %rdi, %r12
je 0x5f30
movq 0x10(%rbx), %rcx
movq 0x88(%rbx), %rdx
movq 0x90(%rbx), %rax
movq -0x8(%rax,%r12,8), %rsi
movq (%rax,%r12,8), %rax
movl 0x4(%rdx,%rax,8), %eax
shlq $0x4, %rax
movl 0x8(%rcx,%rax), %eax
shrl %eax
movl 0x4(%rdx,%rsi,8), %edx
shlq $0x4, %rdx
movl 0x8(%rcx,%rdx), %ecx
shrl %ecx
subl %ecx, %eax
cmpq %rdi, %r12
jne 0x5f48
movl %r12d, %r14d
subl %r15d, %r14d
cmpl %r13d, %r14d
jge 0x5f7d
movl %r12d, %r15d
jmp 0x6211
cmpl %ebp, %eax
jle 0x6211
movq 0x88(%rbx), %rax
movq 0x90(%rbx), %rcx
movq -0x8(%rcx,%r12,8), %rdx
movq (%rcx,%r12,8), %rcx
movl (%rax,%rcx,8), %ecx
subl (%rax,%rdx,8), %ecx
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
cmpl %ebp, %eax
jg 0x5f35
jmp 0x6211
movq 0xa8(%rbx), %rax
cmpq %rax, 0xa0(%rbx)
jne 0x5fc2
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rcx
movq %rcx, 0xa8(%rbx)
movq 0xb0(%rbx), %rdi
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rsi
addq %rcx, %rsi
callq 0x2200
movq %rax, 0xb0(%rbx)
movq 0xa0(%rbx), %rax
movq 0xb0(%rbx), %r9
leaq 0x1(%rax), %rcx
movq %rcx, 0xa0(%rbx)
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %r10
addq %rax, %r10
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
orq 0x38(%rsp), %r14
movq %r14, (%r9,%r10)
movq 0x10(%rbx), %rax
movq 0x88(%rbx), %rcx
movq 0x90(%rbx), %rdx
movslq %r15d, %r14
movq (%rdx,%r14,8), %rsi
leaq (%rcx,%rsi,8), %rsi
movl 0x4(%rsi), %edi
shlq $0x4, %rdi
movl 0x8(%rax,%rdi), %edi
shrl %edi
movl 0x4c(%rsp), %r8d
subl %r8d, %edi
movl %edi, 0xc(%r9,%r10)
movq -0x8(%rdx,%r12,8), %rdx
leaq (%rcx,%rdx,8), %rcx
movl 0x4(%rcx), %edx
shlq $0x4, %rdx
movl 0x8(%rax,%rdx), %eax
shrl %eax
incl %eax
cmpl $0x0, 0x8(%rsp)
movl %eax, 0x10(%r9,%r10)
movq %rcx, %rax
cmoveq %rsi, %rax
movl (%rax), %eax
movl %eax, 0x14(%r9,%r10)
cmoveq %rcx, %rsi
movl (%rsi), %ecx
subl %r8d, %eax
movl %eax, 0x14(%r9,%r10)
incl %ecx
movq %r9, 0x20(%rsp)
movq %r10, 0x30(%rsp)
movl %ecx, 0x18(%r9,%r10)
xorl %r15d, %r15d
movq %r14, %r13
cmpq %r14, %r12
jle 0x61ea
movq 0x10(%rbx), %rax
movq 0x88(%rbx), %rcx
movq 0x90(%rbx), %rdx
movq (%rdx,%r13,8), %rdx
movq (%rcx,%rdx,8), %rbp
movq %rbp, %rcx
sarq $0x20, %rcx
shlq $0x4, %rcx
movabsq $0x100000000, %rdx      # imm = 0x100000000
addq %rdx, 0x8(%rax,%rcx)
movq 0x50(%rbx), %rax
cmpq %rax, 0x48(%rbx)
jne 0x60ee
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x50(%rbx)
movq 0x58(%rbx), %rdi
shlq $0x2, %rsi
callq 0x2200
movq %rax, 0x58(%rbx)
shrq $0x20, %rbp
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x48(%rbx)
movl %ebp, (%rcx,%rax,4)
incq %r13
cmpq %r13, %r12
jne 0x608b
movl $0x0, %eax
cmpq %r14, %r12
movq 0x60(%rsp), %rdi
jle 0x61f1
movq 0x10(%rbx), %rax
movq %rax, 0x40(%rsp)
movq 0x88(%rbx), %rax
movq %rax, 0x28(%rsp)
movq 0x90(%rbx), %rax
movq %rax, 0x18(%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r15d, %r15d
xorl %eax, %eax
xorl %r10d, %r10d
xorl %r8d, %r8d
movq 0x70(%rsp), %rdx
movl 0x4c(%rsp), %edi
movq 0x18(%rsp), %r9
movq (%r9,%r14,8), %r11
movq 0x28(%rsp), %r13
movq (%r13,%r11,8), %r13
movq %r13, %r11
shrq $0x1c, %r11
andq $-0x10, %r11
movq 0x40(%rsp), %rbp
movl 0x8(%rbp,%r11), %r11d
shrl %r11d
subl %edi, %r11d
movl $0x80000000, %ebp       # imm = 0x80000000
subl %r13d, %ebp
subl %edi, %r13d
cmpl $0x0, 0x8(%rsp)
cmovnel %ebp, %r13d
movl %r15d, %ebp
subl %esi, %ebp
cmpl %r15d, %r13d
movl $0x0, %r9d
cmovbel %r9d, %ebp
cmoval %r13d, %esi
addl %ebp, %r10d
movl %r13d, %r15d
addl %edx, %r15d
movl %eax, %ebp
subl %ecx, %ebp
cmpl %eax, %r11d
cmovbel %r9d, %ebp
cmoval %r11d, %ecx
addl %ebp, %r8d
movl %r11d, %eax
addl %edx, %eax
incq %r14
cmpq %r14, %r12
jne 0x615d
subl %esi, %r15d
addl %r10d, %r15d
subl %ecx, %eax
addl %r8d, %eax
jmp 0x61ec
xorl %eax, %eax
movq 0x60(%rsp), %rdi
movq 0x20(%rsp), %rcx
addq 0x30(%rsp), %rcx
cmpl %eax, %r15d
cmovbl %r15d, %eax
movl %eax, 0x8(%rcx)
movl %r12d, %r15d
movq 0x10(%rsp), %r13
movl 0x48(%rsp), %ebp
incq %r12
cmpq 0x58(%rsp), %r12
jne 0x5eed
movq 0x80(%rsp), %rcx
leaq -0x1(%rcx), %rax
testq %rcx, %rcx
movq %rax, %rcx
jg 0x5ccd
testb $0x1, 0x68(%rsp)
jne 0x63b2
movq $0x0, 0x60(%rbx)
cmpq $0x0, (%rbx)
je 0x62bd
movl $0x8, %r14d
xorl %r15d, %r15d
movl $0x2, %r12d
movq 0x10(%rbx), %rax
cmpl $0x0, 0x4(%rax,%r14)
je 0x62b1
movq 0x68(%rbx), %rax
cmpq %rax, 0x60(%rbx)
jne 0x6295
leaq (%rax,%rax), %rsi
testq %rax, %rax
cmoveq %r12, %rsi
movq %rsi, 0x68(%rbx)
movq 0x70(%rbx), %rdi
shlq $0x2, %rsi
callq 0x2200
movq %rax, 0x70(%rbx)
movq 0x10(%rbx), %rax
movq 0x60(%rbx), %rcx
movl 0x4(%rax,%r14), %eax
movq 0x70(%rbx), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x60(%rbx)
movl %eax, (%rdx,%rcx,4)
incq %r15
addq $0x10, %r14
cmpq %r15, (%rbx)
ja 0x625f
movq 0x60(%rbx), %rdi
cmpq $0x3, %rdi
jb 0x63b2
movq 0x70(%rbx), %rsi
movq %rdi, %rdx
shrq %rdx
callq 0x32e4
xorl %ecx, %ecx
cmpq $0x0, 0xa0(%rbx)
je 0x63ab
movl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x2624(%rip), %xmm0     # 0x8920
addsd 0x1d1c(%rip), %xmm0     # 0x8020
cvttsd2si %xmm0, %rax
movl %eax, %eax
xorl %edx, %edx
xorl %esi, %esi
movq 0xb0(%rbx), %r8
leaq (%rdx,%rdx,8), %rdi
leaq (%rdi,%rdi,2), %r9
addq %rdx, %r9
movq (%r8,%r9), %r10
movl %r10d, %edi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
je 0x6365
movq 0x10(%rbx), %r11
movl %ecx, %r14d
andl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
shlq $0x2, %r14
addq 0x58(%rbx), %r14
xorl %r15d, %r15d
xorl %ebp, %ebp
movl (%r14,%r15,4), %r12d
shlq $0x4, %r12
cmpl 0xc(%r11,%r12), %eax
sbbl $-0x1, %ebp
incq %r15
cmpq %r15, %r10
jne 0x634b
jmp 0x6367
xorl %ebp, %ebp
cmpl 0x10(%rsp), %ebp
jl 0x6396
addq %r8, %r9
movslq %esi, %r10
incl %esi
leaq (%r10,%r10,8), %r11
leaq (%r11,%r11,2), %r11
addq %r10, %r11
movupd (%r9), %xmm0
movups 0xc(%r9), %xmm1
movups %xmm1, 0xc(%r8,%r11)
movupd %xmm0, (%r8,%r11)
addl %edi, %ecx
incq %rdx
cmpq %rdx, 0xa0(%rbx)
ja 0x630f
movslq %esi, %rcx
movq %rcx, 0xa0(%rbx)
movl 0xa0(%rbx), %eax
movq 0x78(%rsp), %rcx
movl %eax, (%rcx)
movq 0xb0(%rbx), %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq