// File: /workspace/github_c_makefile_star2_O1/lh3[P]partig/sketch.c
// Function: pt_sketch
void pt_sketch(const char *str, int len, int w, int k, uint32_t rid, int is_hpc, pt_mz1_v *p)
{
	static const pt_mz1_t dummy = { UINT64_MAX, (1<<28) - 1, 0, 0 };
	uint64_t shift1 = k - 1, mask = (1ULL<<k) - 1, kmer[4] = {0,0,0,0};
	int i, j, l, buf_pos, min_pos, kmer_span = 0;
	pt_mz1_t buf[256], min = dummy;
	tiny_queue_t tq;

	assert(len > 0 && len < 1<<27 && rid < 1<<28 && (w > 0 && w < 256) && (k > 0 && k <= 63));

	memset(buf, 0xff, w * sizeof(pt_mz1_t));
	memset(&tq, 0, sizeof(tiny_queue_t));
	kv_resize(pt_mz1_t, *p, p->n + len/w);

	for (i = l = buf_pos = min_pos = 0; i < len; ++i) {
		int c = seq_nt4_table[(uint8_t)str[i]];
		pt_mz1_t info = dummy;
		if (c < 4) { // not an ambiguous base
			int z;
			if (is_hpc) {
				int skip_len = 1;
				if (i + 1 < len && seq_nt4_table[(uint8_t)str[i + 1]] == c) {
					for (skip_len = 2; i + skip_len < len; ++skip_len)
						if (seq_nt4_table[(uint8_t)str[i + skip_len]] != c)
							break;
					i += skip_len - 1; // put $i at the end of the current homopolymer run
				}
				tq_push(&tq, skip_len);
				kmer_span += skip_len;
				if (tq.count > k) kmer_span -= tq_shift(&tq);
			} else kmer_span = l + 1 < k? l + 1 : k; 

			kmer[0] = (kmer[0] << 1 | (c&1))  & mask;                  // forward k-mer
			kmer[1] = (kmer[1] << 1 | (c>>1)) & mask;
			kmer[2] = kmer[2] >> 1 | (uint64_t)(1 - (c&1))  << shift1; // reverse k-mer
			kmer[3] = kmer[3] >> 1 | (uint64_t)(1 - (c>>1)) << shift1;
			if (kmer[1] == kmer[3]) continue; // skip "symmetric k-mers" as we don't know its strand
			z = kmer[1] < kmer[3]? 0 : 1; // strand
			++l;
			if (l >= k && kmer_span < 256) {
				uint64_t y;
				y = yak_hash64_64(kmer[z<<1|0]) + yak_hash64_64(kmer[z<<1|1]);
				info.x = y, info.rid = rid, info.pos = i, info.rev = z, info.span = kmer_span; // initially pt_mz1_t::rid keeps the k-mer count
			}
		} else l = 0, tq.count = tq.front = 0, kmer_span = 0;

		buf[buf_pos] = info; // need to do this here as appropriate buf_pos and buf[buf_pos] are needed below
		if (l == w + k - 1 && min.x != UINT64_MAX) { // special case for the first window - because identical k-mers are not stored yet
			for (j = buf_pos + 1; j < w; ++j)
				if (mzcmp(&min, &buf[j]) == 0 && buf[j].pos != min.pos) kv_push(pt_mz1_t, *p, buf[j]);
			for (j = 0; j < buf_pos; ++j)
				if (mzcmp(&min, &buf[j]) == 0 && buf[j].pos != min.pos) kv_push(pt_mz1_t, *p, buf[j]);
		}
		///three cases: 1. 
		if (info.x <= min.x) { // a new minimum; then write the old min
			if (l >= w + k && min.x != UINT64_MAX) kv_push(pt_mz1_t, *p, min);
			min = info, min_pos = buf_pos;
		} else if (buf_pos == min_pos) { // old min has moved outside the window
			if (l >= w + k - 1 && min.x != UINT64_MAX) kv_push(pt_mz1_t, *p, min);
			for (j = buf_pos + 1, min.x = UINT64_MAX; j < w; ++j) // the two loops are necessary when there are identical k-mers
				if (mzcmp(&min, &buf[j]) >= 0) min = buf[j], min_pos = j; // >= is important s.t. min is always the closest k-mer
			for (j = 0; j <= buf_pos; ++j)
				if (mzcmp(&min, &buf[j]) >= 0) min = buf[j], min_pos = j;

			if (l >= w + k - 1 && min.x != UINT64_MAX) { // write identical k-mers
				for (j = buf_pos + 1; j < w; ++j) // these two loops make sure the output is sorted
					if (mzcmp(&min, &buf[j]) == 0 && min.pos != buf[j].pos) kv_push(pt_mz1_t, *p, buf[j]);
				for (j = 0; j <= buf_pos; ++j)
					if (mzcmp(&min, &buf[j]) == 0 && min.pos != buf[j].pos) kv_push(pt_mz1_t, *p, buf[j]);
			}
		}
		if (++buf_pos == w) buf_pos = 0;
	}
	if (min.x != UINT64_MAX)
		kv_push(pt_mz1_t, *p, min);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x11e8, %rsp           # imm = 0x11E8
movl %r9d, 0x7c(%rsp)
movq %rdi, 0x70(%rsp)
leal -0x1(%rcx), %ebp
movq $-0x1, %rax
movq %rcx, 0x48(%rsp)
shlq %cl, %rax
movq %rax, 0xa0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
cmpl $0x3e, %ebp
ja 0x72af
movl %edx, %r15d
leal -0x1(%r15), %eax
movl %eax, 0x44(%rsp)
cmpl $0xfe, %eax
ja 0x72af
movl %esi, %r14d
leal -0x1(%r14), %eax
cmpl $0x7fffffe, %eax        # imm = 0x7FFFFFE
ja 0x72af
movl %r8d, %r12d
cmpl $0x10000000, %r8d       # imm = 0x10000000
jae 0x72af
movq 0x1220(%rsp), %rbx
movl %r15d, %edx
shll $0x4, %edx
leaq 0x1e0(%rsp), %rdi
movl $0xff, %esi
callq 0x1100
leaq 0xd8(%rsp), %rdi
movl $0x108, %edx            # imm = 0x108
xorl %esi, %esi
callq 0x1100
movl 0x4(%rbx), %ecx
movl %r14d, %eax
xorl %edx, %edx
divl %r15d
addl (%rbx), %eax
cmpl %eax, %ecx
jae 0x69c0
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, %esi
shrl $0x10, %esi
orl %eax, %esi
incl %esi
movl %esi, 0x4(%rbx)
movq 0x8(%rbx), %rdi
shlq $0x4, %rsi
callq 0x11a0
movq %rax, 0x8(%rbx)
testl %r14d, %r14d
jle 0x724b
movslq %ebp, %rax
movq %rax, 0xc8(%rsp)
notq 0xa0(%rsp)
movabsq $0x7ffffff0000000, %r10 # imm = 0x7FFFFFF0000000
movq 0x80(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x60(%rsp)
movl 0xd8(%rsp), %eax
movq %rax, 0x50(%rsp)
movl 0xdc(%rsp), %eax
movq %rax, 0x30(%rsp)
movl %r12d, %eax
movq %rax, 0xc0(%rsp)
movq 0x48(%rsp), %rax
leal (%rax,%r15), %ecx
movl %ecx, 0x78(%rsp)
leal -0x1(%rax,%r15), %eax
movl %eax, 0x24(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x58(%rsp)
movl %r14d, %eax
movq %rax, 0xd0(%rsp)
movl $0xfffffff, %ebp        # imm = 0xFFFFFFF
movq $-0x1, %r13
xorl %r11d, %r11d
movq $0x0, 0x8(%rsp)
xorl %r12d, %r12d
movl $0x0, 0x4(%rsp)
xorl %r8d, %r8d
movq %r15, 0x18(%rsp)
movq %r14, 0x28(%rsp)
movslq %r11d, %rdx
movq 0x70(%rsp), %rax
movzbl (%rax,%rdx), %eax
leaq 0x2a19(%rip), %rcx      # 0x94c0
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
movq %r8, 0x10(%rsp)
ja 0x6b43
cmpl $0x0, 0x7c(%rsp)
je 0x6b89
leaq 0x1(%rdx), %rsi
movl $0x1, %ecx
cmpl %r14d, %esi
jge 0x6bb7
movq 0x70(%rsp), %rdi
movzbl (%rdi,%rsi), %esi
leaq 0x29da(%rip), %rdi      # 0x94c0
cmpb %al, (%rsi,%rdi)
jne 0x6bb7
leal 0x2(%r11), %esi
movl $0x2, %ecx
cmpl %r14d, %esi
jge 0x6bb1
movl %r14d, %ecx
subl %r11d, %ecx
movl %r11d, %edi
movl $0x2, %esi
leal (%rdi,%rsi), %r8d
movslq %r8d, %r8
movq 0x70(%rsp), %r9
movzbl (%r9,%r8), %r8d
leaq 0x2999(%rip), %r9       # 0x94c0
cmpb %al, (%r8,%r9)
jne 0x6baa
leaq (%rdx,%rsi), %r8
incq %r8
incq %rsi
cmpq 0xd0(%rsp), %r8
jl 0x6b0f
jmp 0x6bac
movq %r11, 0x68(%rsp)
movq $0x0, 0xd8(%rsp)
movq $-0x1, %r12
movl $0xfffffff, %ecx        # imm = 0xFFFFFFF
movq $0x0, 0x30(%rsp)
movq $0x0, 0x50(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x8(%rsp)
jmp 0x6dee
movq %r11, 0x68(%rsp)
movq 0x8(%rsp), %rcx
leal 0x1(%rcx), %edx
movq 0x48(%rsp), %rcx
cmpl %ecx, %edx
cmovgel %ecx, %edx
movq %rdx, 0x38(%rsp)
jmp 0x6c33
movl %esi, %ecx
movq 0x10(%rsp), %r8
addl %ecx, %r11d
decl %r11d
movq 0x30(%rsp), %rdi
leal 0x1(%rdi), %edx
movl %edx, 0xdc(%rsp)
movq 0x50(%rsp), %rsi
addl %edi, %esi
andl $0x3f, %esi
movl %ecx, 0xe0(%rsp,%rsi,4)
addl %ecx, %r12d
cmpl 0x48(%rsp), %edi
movq %r11, 0x68(%rsp)
jl 0x6c27
testl %edx, %edx
je 0x6c1f
movq 0x50(%rsp), %rdx
movslq %edx, %rcx
leal 0x1(%rdx), %esi
movl %esi, 0xd8(%rsp)
movl 0xe0(%rsp,%rcx,4), %ecx
andl $0x3f, %esi
movl %esi, 0xd8(%rsp)
movq 0x30(%rsp), %rdx
movl %edx, 0xdc(%rsp)
movq %rsi, 0x50(%rsp)
jmp 0x6c24
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
subl %ecx, %r12d
movq %r12, 0x38(%rsp)
movl %edx, %ecx
movq %rcx, 0x30(%rsp)
movq 0xa8(%rsp), %rdx
movl %eax, %esi
andl $0x1, %esi
movq 0xb0(%rsp), %rdi
leaq (%rsi,%rdi,2), %rdi
movq 0xa0(%rsp), %rcx
andq %rcx, %rdi
movq %rdi, 0xb0(%rsp)
movq %rdi, 0x80(%rsp)
movq 0x60(%rsp), %rdi
addq %rdi, %rdi
shrl %eax
orq %rax, %rdi
andq %rcx, %rdi
movq %rdi, 0x88(%rsp)
shrq %rdx
xorl $0x1, %esi
movq 0xc8(%rsp), %rcx
shlq %cl, %rsi
orq %rdx, %rsi
movq %rsi, 0xa8(%rsp)
movq %rsi, 0x90(%rsp)
movq 0x58(%rsp), %rdx
shrq %rdx
movl $0x1, %esi
subl %eax, %esi
shlq %cl, %rsi
orq %rdx, %rsi
movq %rsi, 0x98(%rsp)
movq $-0x1, %r12
movl $0xfffffff, %ecx        # imm = 0xFFFFFFF
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
cmpq %rsi, %rdi
je 0x6dde
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
cmpl 0x48(%rsp), %eax
jl 0x6dde
movq 0x38(%rsp), %r9
cmpl $0xff, %r9d
jg 0x6dde
leaq 0x10000000(%r10), %rcx
xorl %edx, %edx
movq 0x58(%rsp), %rax
cmpq %rax, 0x60(%rsp)
movl $0x0, %eax
cmovaeq %rcx, %rax
setae %dl
shll $0x4, %edx
movq 0x80(%rsp,%rdx), %rsi
movq 0x88(%rsp,%rdx), %rcx
movq %rsi, %rdx
notq %rdx
shlq $0x15, %rsi
addq %rdx, %rsi
movq %rsi, %rdx
shrq $0x18, %rdx
xorq %rsi, %rdx
imulq $0x109, %rdx, %rdx      # imm = 0x109
movq %rdx, %rsi
shrq $0xe, %rsi
xorq %rdx, %rsi
leaq (%rsi,%rsi,4), %rdx
leaq (%rsi,%rdx,4), %rdx
movq %rcx, %rsi
notq %rsi
movq %rdx, %rdi
shrq $0x1c, %rdi
xorq %rdx, %rdi
shlq $0x15, %rcx
addq %rsi, %rcx
movq %rcx, %rdx
shrq $0x18, %rdx
xorq %rcx, %rdx
imulq $0x109, %rdx, %rcx      # imm = 0x109
movq %rcx, %rdx
shrq $0xe, %rdx
xorq %rcx, %rdx
leaq (%rdx,%rdx,4), %rcx
leaq (%rdx,%rcx,4), %rcx
movq %rcx, %rdx
shrq $0x1c, %rdx
xorq %rcx, %rdx
addq %rdi, %rdx
movq %rdx, %r12
shlq $0x1f, %r12
addq %rdx, %r12
movq 0x68(%rsp), %rcx
andl $0x7ffffff, %ecx        # imm = 0x7FFFFFF
shlq $0x1c, %rcx
orq 0xc0(%rsp), %rcx
orq %rax, %rcx
shlq $0x38, %r9
orq %rcx, %r9
movq %r9, %rcx
movq 0x58(%rsp), %rax
cmpq %rax, 0x60(%rsp)
je 0x7233
movslq %r8d, %rax
shlq $0x4, %rax
movq %r12, 0x1e0(%rsp,%rax)
movq %rcx, 0xb8(%rsp)
movq %rcx, 0x1e8(%rsp,%rax)
movq 0x8(%rsp), %rax
cmpl 0x24(%rsp), %eax
jne 0x6f42
cmpq $-0x1, %r13
je 0x6f42
leal 0x1(%r8), %eax
cmpl 0x18(%rsp), %eax
jge 0x6eb5
cltq
shlq $0x4, %rax
leaq (%rsp,%rax), %r15
addq $0x1e0, %r15            # imm = 0x1E0
movl 0x44(%rsp), %r14d
subl %r8d, %r14d
cmpq (%r15), %r13
jne 0x6eac
movq 0x8(%r15), %rax
xorq %rbp, %rax
testq %r10, %rax
je 0x6eac
movl 0x4(%rbx), %eax
cmpl %eax, (%rbx)
jne 0x6e95
leal (%rax,%rax), %esi
testl %eax, %eax
movl $0x2, %eax
cmovel %eax, %esi
movl %esi, 0x4(%rbx)
movq 0x8(%rbx), %rdi
shlq $0x4, %rsi
callq 0x11a0
movq 0x10(%rsp), %r8
movabsq $0x7ffffff0000000, %r10 # imm = 0x7FFFFFF0000000
movq %rax, 0x8(%rbx)
movq 0x8(%rbx), %rax
movl (%rbx), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
shlq $0x4, %rcx
movups (%r15), %xmm0
movups %xmm0, (%rax,%rcx)
addq $0x10, %r15
decl %r14d
jne 0x6e4d
testl %r8d, %r8d
jle 0x6f42
movl %r8d, %r15d
shlq $0x4, %r15
xorl %r14d, %r14d
cmpq 0x1e0(%rsp,%r14), %r13
jne 0x6f39
movq 0x1e8(%rsp,%r14), %rax
xorq %rbp, %rax
testq %r10, %rax
je 0x6f39
movl 0x4(%rbx), %eax
cmpl %eax, (%rbx)
jne 0x6f19
leal (%rax,%rax), %esi
testl %eax, %eax
movl $0x2, %eax
cmovel %eax, %esi
movl %esi, 0x4(%rbx)
movq 0x8(%rbx), %rdi
shlq $0x4, %rsi
callq 0x11a0
movq 0x10(%rsp), %r8
movabsq $0x7ffffff0000000, %r10 # imm = 0x7FFFFFF0000000
movq %rax, 0x8(%rbx)
leaq (%rsp,%r14), %rax
addq $0x1e0, %rax            # imm = 0x1E0
movq 0x8(%rbx), %rcx
movl (%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, (%rbx)
shlq $0x4, %rdx
movups (%rax), %xmm0
movups %xmm0, (%rcx,%rdx)
addq $0x10, %r14
cmpq %r14, %r15
jne 0x6ec8
cmpq %r13, %r12
jbe 0x7014
cmpl 0x4(%rsp), %r8d
movq 0x28(%rsp), %r14
jne 0x708b
cmpq $-0x1, %r13
sete %al
movq 0x8(%rsp), %rcx
cmpl 0x24(%rsp), %ecx
setl %cl
orb %al, %cl
movq 0x18(%rsp), %r15
jne 0x6fc6
movl 0x4(%rbx), %eax
cmpl %eax, (%rbx)
jne 0x6fae
leal (%rax,%rax), %esi
testl %eax, %eax
movl $0x2, %eax
cmovel %eax, %esi
movl %esi, 0x4(%rbx)
movq 0x8(%rbx), %rdi
shlq $0x4, %rsi
callq 0x11a0
movq 0x10(%rsp), %r8
movabsq $0x7ffffff0000000, %r10 # imm = 0x7FFFFFF0000000
movq %rax, 0x8(%rbx)
movq 0x8(%rbx), %rax
movl (%rbx), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
shlq $0x4, %rcx
movq %r13, (%rax,%rcx)
movq %rbp, 0x8(%rax,%rcx)
leal 0x1(%r8), %r14d
movq $-0x1, %r12
cmpl %r15d, %r14d
jge 0x70af
movslq %r14d, %rax
shlq $0x4, %rax
leaq 0x1e8(%rsp), %rcx
addq %rcx, %rax
movl %r14d, %ecx
movl 0x4(%rsp), %edi
movq -0x8(%rax), %rdx
cmpq %rdx, %r12
jb 0x7004
movq (%rax), %rbp
movq %rdx, %r12
movl %ecx, %edi
incl %ecx
addq $0x10, %rax
cmpl %ecx, %r15d
jne 0x6ff3
jmp 0x70b3
cmpq $-0x1, %r13
sete %al
movq 0x8(%rsp), %rcx
cmpl 0x78(%rsp), %ecx
setl %cl
orb %al, %cl
movq 0x28(%rsp), %r14
jne 0x7098
movl 0x4(%rbx), %eax
cmpl %eax, (%rbx)
movq 0x18(%rsp), %r15
jne 0x706c
leal (%rax,%rax), %esi
testl %eax, %eax
movl $0x2, %eax
cmovel %eax, %esi
movl %esi, 0x4(%rbx)
movq 0x8(%rbx), %rdi
shlq $0x4, %rsi
callq 0x11a0
movq 0x10(%rsp), %r8
movabsq $0x7ffffff0000000, %r10 # imm = 0x7FFFFFF0000000
movq %rax, 0x8(%rbx)
movq 0x8(%rbx), %rax
movl (%rbx), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
shlq $0x4, %rcx
movq %r13, (%rax,%rcx)
movq %rbp, 0x8(%rax,%rcx)
movl %r8d, 0x4(%rsp)
jmp 0x70a2
movq %r13, %r12
movq 0x18(%rsp), %r15
jmp 0x7221
movl %r8d, 0x4(%rsp)
movq 0x18(%rsp), %r15
movq 0xb8(%rsp), %rbp
jmp 0x7221
movl 0x4(%rsp), %edi
testl %r8d, %r8d
js 0x70e2
movl %r14d, %eax
leaq 0x1e8(%rsp), %rcx
xorl %edx, %edx
movq -0x8(%rcx), %rsi
cmpq %rsi, %r12
jb 0x70d6
movq (%rcx), %rbp
movq %rsi, %r12
movl %edx, %edi
incq %rdx
addq $0x10, %rcx
cmpq %rdx, %rax
jne 0x70c5
movl %edi, 0x4(%rsp)
movq 0x8(%rsp), %rax
cmpl 0x24(%rsp), %eax
jl 0x721c
cmpq $-0x1, %r12
je 0x721c
cmpl %r15d, %r14d
jge 0x718a
movslq %r14d, %rax
shlq $0x4, %rax
leaq (%rsp,%rax), %r15
addq $0x1e0, %r15            # imm = 0x1E0
movl 0x44(%rsp), %r13d
subl %r8d, %r13d
cmpq (%r15), %r12
jne 0x7181
movq 0x8(%r15), %rax
xorq %rbp, %rax
testq %r10, %rax
je 0x7181
movl 0x4(%rbx), %eax
cmpl %eax, (%rbx)
jne 0x716a
leal (%rax,%rax), %esi
testl %eax, %eax
movl $0x2, %eax
cmovel %eax, %esi
movl %esi, 0x4(%rbx)
movq 0x8(%rbx), %rdi
shlq $0x4, %rsi
callq 0x11a0
movq 0x10(%rsp), %r8
movabsq $0x7ffffff0000000, %r10 # imm = 0x7FFFFFF0000000
movq %rax, 0x8(%rbx)
movq 0x8(%rbx), %rax
movl (%rbx), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
shlq $0x4, %rcx
movups (%r15), %xmm0
movups %xmm0, (%rax,%rcx)
addq $0x10, %r15
decl %r13d
jne 0x7122
testl %r8d, %r8d
js 0x7217
movl %r14d, %r14d
shlq $0x4, %r14
xorl %r15d, %r15d
cmpq 0x1e0(%rsp,%r15), %r12
jne 0x720e
movq 0x1e8(%rsp,%r15), %rax
xorq %rbp, %rax
testq %r10, %rax
je 0x720e
movl 0x4(%rbx), %eax
cmpl %eax, (%rbx)
jne 0x71ee
leal (%rax,%rax), %esi
testl %eax, %eax
movl $0x2, %eax
cmovel %eax, %esi
movl %esi, 0x4(%rbx)
movq 0x8(%rbx), %rdi
shlq $0x4, %rsi
callq 0x11a0
movq 0x10(%rsp), %r8
movabsq $0x7ffffff0000000, %r10 # imm = 0x7FFFFFF0000000
movq %rax, 0x8(%rbx)
leaq (%rsp,%r15), %rax
addq $0x1e0, %rax            # imm = 0x1E0
movq 0x8(%rbx), %rcx
movl (%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, (%rbx)
shlq $0x4, %rdx
movups (%rax), %xmm0
movups %xmm0, (%rcx,%rdx)
addq $0x10, %r15
cmpq %r15, %r14
jne 0x719d
movq 0x18(%rsp), %r15
movq 0x28(%rsp), %r14
incl %r8d
cmpl %r15d, %r8d
movl $0x0, %eax
cmovel %eax, %r8d
movq %r12, %r13
movq 0x68(%rsp), %r11
incl %r11d
cmpl %r14d, %r11d
movq 0x38(%rsp), %r12
jl 0x6a94
jmp 0x7257
movq $-0x1, %r13
movl $0xfffffff, %ebp        # imm = 0xFFFFFFF
cmpq $-0x1, %r13
je 0x729d
movl 0x4(%rbx), %eax
cmpl %eax, (%rbx)
jne 0x7285
leal (%rax,%rax), %ecx
testl %eax, %eax
movl $0x2, %esi
cmovnel %ecx, %esi
movl %esi, 0x4(%rbx)
movq 0x8(%rbx), %rdi
shlq $0x4, %rsi
callq 0x11a0
movq %rax, 0x8(%rbx)
movq 0x8(%rbx), %rax
movl (%rbx), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
shlq $0x4, %rcx
movq %r13, (%rax,%rcx)
movq %rbp, 0x8(%rax,%rcx)
addq $0x11e8, %rsp           # imm = 0x11E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x230a(%rip), %rdi      # 0x95c0
leaq 0x2355(%rip), %rsi      # 0x9612
leaq 0x2357(%rip), %rcx      # 0x961b
movl $0x53, %edx
callq 0x10e0
nop