// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/tovlp.cpp
// Function: pt_sketch(char const*, int, int, int, unsigned int, int, pt_mz1_v*)
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 && rid < (uint64_t)1<<32 && (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 $0x1a08, %rsp           # imm = 0x1A08
movl %r9d, 0x8c(%rsp)
movq %rdx, 0x68(%rsp)
movq %rdi, 0x30(%rsp)
pushq $-0x1
popq %rax
movq %rcx, 0x48(%rsp)
shlq %cl, %rax
movq %rax, 0x90(%rsp)
movl %esi, 0x1c(%rsp)
testl %esi, %esi
jle 0x154d34
movq 0x68(%rsp), %rax
decl %eax
cmpl $0xfe, %eax
ja 0x154d34
movq 0x48(%rsp), %rax
leal -0x1(%rax), %ebx
cmpl $0x3f, %ebx
jae 0x154d34
movq 0x1a40(%rsp), %r14
movl %r8d, %eax
movq %rax, 0xb8(%rsp)
movq 0x68(%rsp), %r15
imull $0x18, %r15d, %edx
leaq 0x200(%rsp), %rdi
movl $0xff, %esi
callq 0x20e0
leaq 0x100(%rsp), %rdi
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x20e0
movl 0x4(%r14), %ecx
movl 0x1c(%rsp), %eax
xorl %edx, %edx
divl %r15d
addl (%r14), %eax
cmpl %eax, %ecx
jae 0x15443f
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
incl %ecx
movl %ecx, 0x4(%r14)
movq 0x8(%r14), %rdi
imulq $0x18, %rcx, %rsi
callq 0x2370
movq %rax, 0x8(%r14)
movslq %ebx, %rax
movq %rax, 0xc0(%rsp)
notq 0x90(%rsp)
movabsq $0x7fffffffffffffff, %r9 # imm = 0x7FFFFFFFFFFFFFFF
movq 0x48(%rsp), %rax
movq 0x68(%rsp), %rcx
leal (%rax,%rcx), %edx
movl %edx, 0x88(%rsp)
leal -0x1(%rax,%rcx), %eax
movl %eax, 0x44(%rsp)
movl 0x1c(%rsp), %eax
movq %rax, 0xc8(%rsp)
movl %ecx, %r10d
movl $0xfffffff, %r12d       # imm = 0xFFFFFFF
leaq 0x9766c(%rip), %r11     # 0x1ebb00
movq $0x0, 0x78(%rsp)
movq $0x0, 0x98(%rsp)
xorl %ebx, %ebx
movq $0x0, 0x50(%rsp)
movq $0x0, 0xa0(%rsp)
movq $0x0, 0x70(%rsp)
xorl %r13d, %r13d
pushq $-0x1
popq %r15
movq $0x0, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movq $0x0, 0x10(%rsp)
xorl %ebp, %ebp
xorl %r8d, %r8d
movq 0x30(%rsp), %rdi
movq %r10, 0x38(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, %ecx
subl %r8d, %ecx
jle 0x154cd3
movslq %r8d, %rdx
movzbl (%rdi,%rdx), %eax
movzbl (%r11,%rax), %eax
cmpl $0x3, %eax
ja 0x154577
cmpl $0x0, 0x8c(%rsp)
je 0x1548ef
leaq 0x1(%rdx), %rsi
cmpl 0x1c(%rsp), %esi
jge 0x1548e7
movzbl (%rdi,%rsi), %esi
cmpb %al, (%r11,%rsi)
jne 0x1548e7
movq %rbp, 0x20(%rsp)
movq %r8, %rbp
addq %rdx, %rdi
pushq $0x2
popq %rsi
leaq (%rdx,%rsi), %r8
cmpq 0xc8(%rsp), %r8
jge 0x154ac1
movzbl (%rdi,%rsi), %r8d
cmpb %al, (%r11,%r8)
jne 0x154abf
incq %rsi
jmp 0x154551
movq %rbx, 0x80(%rsp)
movq %r12, 0x58(%rsp)
andq $0x0, 0xf8(%rsp)
movl $0xfffffff, %edx        # imm = 0xFFFFFFF
movq $0x0, 0x50(%rsp)
movq $0x0, 0x70(%rsp)
xorl %ecx, %ecx
xorl %eax, %eax
xorl %esi, %esi
pushq $-0x1
popq %rbx
movq %rcx, 0x10(%rsp)
movslq 0x8(%rsp), %r11
imulq $0x18, %r11, %rbp
movq %rbx, 0x200(%rsp,%rbp)
movq %rdx, 0xb0(%rsp)
movq %rdx, 0x208(%rsp,%rbp)
movq %rsi, 0xa8(%rsp)
movq %rsi, 0x210(%rsp,%rbp)
movq %rax, 0x20(%rsp)
cmpl 0x44(%rsp), %eax
movq %r8, 0x28(%rsp)
movq %r11, 0x60(%rsp)
jne 0x154751
cmpq $-0x1, %r15
je 0x154751
leaq 0x1(%r11), %r12
leaq 0x218(%rsp), %rax
addq %rax, %rbp
cmpq %r10, %r12
jge 0x1546a1
cmpq (%rbp), %r15
jne 0x154695
movq 0x10(%rbp), %rax
xorq %r13, %rax
testq %r9, %rax
je 0x154695
movl (%r14), %ecx
movq 0x8(%r14), %rax
cmpl 0x4(%r14), %ecx
jne 0x154678
leal (%rcx,%rcx), %edx
testl %ecx, %ecx
pushq $0x2
popq %rcx
cmovel %ecx, %edx
movl %edx, 0x4(%r14)
imulq $0x18, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq 0x60(%rsp), %r11
movq 0x28(%rsp), %r8
movq 0x38(%rsp), %r10
movabsq $0x7fffffffffffffff, %r9 # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, 0x8(%r14)
movl (%r14), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%r14)
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
movq 0x10(%rbp), %rdx
movq %rdx, 0x10(%rax,%rcx)
movups (%rbp), %xmm0
movups %xmm0, (%rax,%rcx)
incq %r12
addq $0x18, %rbp
jmp 0x154615
movq 0x8(%rsp), %rcx
testl %ecx, %ecx
movl $0x0, %eax
cmovgl %ecx, %eax
imulq $0x18, %rax, %r12
xorl %ebp, %ebp
cmpq %rbp, %r12
je 0x154751
cmpq 0x200(%rsp,%rbp), %r15
jne 0x154748
movq 0x210(%rsp,%rbp), %rax
xorq %r13, %rax
testq %r9, %rax
je 0x154748
movl (%r14), %ecx
movq 0x8(%r14), %rax
cmpl 0x4(%r14), %ecx
jne 0x154721
leal (%rcx,%rcx), %edx
testl %ecx, %ecx
pushq $0x2
popq %rcx
cmovel %ecx, %edx
movl %edx, 0x4(%r14)
imulq $0x18, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq 0x60(%rsp), %r11
movq 0x28(%rsp), %r8
movq 0x38(%rsp), %r10
movabsq $0x7fffffffffffffff, %r9 # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, 0x8(%r14)
movl (%r14), %ecx
leaq (%rsp,%rbp), %rdx
addq $0x200, %rdx            # imm = 0x200
leal 0x1(%rcx), %esi
movl %esi, (%r14)
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
movq 0x10(%rdx), %rsi
movq %rsi, 0x10(%rax,%rcx)
movups (%rdx), %xmm0
movups %xmm0, (%rax,%rcx)
addq $0x18, %rbp
jmp 0x1546b6
cmpq %r15, %rbx
jbe 0x15483d
movl 0x4(%rsp), %eax
cmpl %eax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
movq 0x58(%rsp), %r12
movq 0x20(%rsp), %rbp
jne 0x154901
cmpq $-0x1, %r15
sete %al
cmpl 0x44(%rsp), %ebp
setl %cl
orb %al, %cl
jne 0x1547f0
movl (%r14), %ecx
movq 0x8(%r14), %rax
cmpl 0x4(%r14), %ecx
jne 0x1547d6
leal (%rcx,%rcx), %edx
testl %ecx, %ecx
pushq $0x2
popq %rcx
cmovel %ecx, %edx
movl %edx, 0x4(%r14)
imulq $0x18, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq 0x60(%rsp), %r11
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %r8
movq 0x38(%rsp), %r10
movabsq $0x7fffffffffffffff, %r9 # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, 0x8(%r14)
movl (%r14), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%r14)
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
movq %r15, (%rax,%rcx)
movq %r12, 0x8(%rax,%rcx)
movq %r13, 0x10(%rax,%rcx)
movq 0x8(%rsp), %rsi
leal 0x1(%rsi), %eax
movslq %eax, %r15
imulq $0x18, %r15, %rax
leaq 0x210(%rsp), %rcx
addq %rax, %rcx
movq %r15, %rdx
pushq $-0x1
popq %rbx
movl %esi, 0x4(%rsp)
cmpq %r10, %rdx
jge 0x154909
movq -0x10(%rcx), %rsi
cmpq %rsi, %rbx
jb 0x154834
movq -0x8(%rcx), %r12
movq (%rcx), %r13
movq %rsi, %rbx
movl %edx, 0x4(%rsp)
incq %rdx
addq $0x18, %rcx
jmp 0x154814
cmpq $-0x1, %r15
sete %al
movq 0x20(%rsp), %rbp
cmpl 0x88(%rsp), %ebp
setl %cl
orb %al, %cl
movq 0x30(%rsp), %rdi
movq 0x58(%rsp), %r12
jne 0x1548c9
movl (%r14), %ecx
movq 0x8(%r14), %rax
cmpl 0x4(%r14), %ecx
jne 0x1548af
leal (%rcx,%rcx), %edx
testl %ecx, %ecx
pushq $0x2
popq %rcx
cmovel %ecx, %edx
movl %edx, 0x4(%r14)
imulq $0x18, %rdx, %rsi
movq %rdi, %rbp
movq %rax, %rdi
callq 0x2370
movq %rbp, %rdi
movq 0x20(%rsp), %rbp
movq 0x28(%rsp), %r8
movq 0x38(%rsp), %r10
movabsq $0x7fffffffffffffff, %r9 # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, 0x8(%r14)
movl (%r14), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%r14)
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
movq %r15, (%rax,%rcx)
movq %r12, 0x8(%rax,%rcx)
movq %r13, 0x10(%rax,%rcx)
movq 0x8(%rsp), %rcx
movl %ecx, 0x4(%rsp)
movq 0xb0(%rsp), %r12
movq 0xa8(%rsp), %r13
jmp 0x154a95
pushq $0x1
popq %rcx
jmp 0x154acd
leal 0x1(%rbp), %edx
movq 0x48(%rsp), %rcx
cmpl %ecx, %edx
cmovgel %ecx, %edx
jmp 0x154b54
movq %r15, %rbx
jmp 0x154a90
leaq 0x210(%rsp), %rcx
xorl %edx, %edx
cmpq %r11, %rdx
jg 0x154938
movq -0x10(%rcx), %rsi
cmpq %rsi, %rbx
jb 0x15492f
movq -0x8(%rcx), %r12
movq (%rcx), %r13
movq %rsi, %rbx
movl %edx, 0x4(%rsp)
incq %rdx
addq $0x18, %rcx
jmp 0x154913
cmpl 0x44(%rsp), %ebp
jl 0x154a90
cmpq $-0x1, %rbx
je 0x154a90
movq %r12, 0x58(%rsp)
leaq (%rsp,%rax), %r12
addq $0x200, %r12            # imm = 0x200
cmpq %r10, %r15
jge 0x1549f0
cmpq (%r12), %rbx
jne 0x1549e4
movq 0x10(%r12), %rax
xorq %r13, %rax
testq %r9, %rax
je 0x1549e4
movl (%r14), %ecx
movq 0x8(%r14), %rax
cmpl 0x4(%r14), %ecx
jne 0x1549c5
leal (%rcx,%rcx), %edx
testl %ecx, %ecx
pushq $0x2
popq %rcx
cmovel %ecx, %edx
movl %edx, 0x4(%r14)
imulq $0x18, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq 0x60(%rsp), %r11
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %r8
movq 0x38(%rsp), %r10
movabsq $0x7fffffffffffffff, %r9 # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, 0x8(%r14)
movl (%r14), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%r14)
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
movq 0x10(%r12), %rdx
movq %rdx, 0x10(%rax,%rcx)
movups (%r12), %xmm0
movups %xmm0, (%rax,%rcx)
incq %r15
addq $0x18, %r12
jmp 0x15495c
leaq 0x200(%rsp), %r15
xorl %r12d, %r12d
cmpq %r11, %r12
jg 0x154a8b
cmpq (%r15), %rbx
jne 0x154a7f
movq 0x10(%r15), %rax
xorq %r13, %rax
testq %r9, %rax
je 0x154a7f
movl (%r14), %ecx
movq 0x8(%r14), %rax
cmpl 0x4(%r14), %ecx
jne 0x154a62
leal (%rcx,%rcx), %edx
testl %ecx, %ecx
pushq $0x2
popq %rcx
cmovel %ecx, %edx
movl %edx, 0x4(%r14)
imulq $0x18, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq 0x60(%rsp), %r11
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %r8
movq 0x38(%rsp), %r10
movabsq $0x7fffffffffffffff, %r9 # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, 0x8(%r14)
movl (%r14), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%r14)
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
movq 0x10(%r15), %rdx
movq %rdx, 0x10(%rax,%rcx)
movups (%r15), %xmm0
movups %xmm0, (%rax,%rcx)
incq %r12
addq $0x18, %r15
jmp 0x1549fb
movq 0x58(%rsp), %r12
movq 0x8(%rsp), %rcx
incl %ecx
cmpl 0x68(%rsp), %ecx
movl $0x0, %eax
cmovel %eax, %ecx
movq %rcx, 0x8(%rsp)
movq %rbx, %r15
leaq 0x9704e(%rip), %r11     # 0x1ebb00
movq 0x80(%rsp), %rbx
jmp 0x154bf3
movl %esi, %ecx
leal (%rcx,%rbp), %r8d
decl %r8d
movq 0x20(%rsp), %rbp
movq 0x50(%rsp), %rdi
leal 0x1(%rdi), %edx
movl %edx, 0xfc(%rsp)
movq 0x70(%rsp), %rsi
addl %edi, %esi
andl $0x3f, %esi
movl %ecx, 0x100(%rsp,%rsi,4)
movq 0x10(%rsp), %rsi
addl %ecx, %esi
movq %rsi, 0x10(%rsp)
cmpl 0x48(%rsp), %edi
jge 0x154b08
movl %edx, %ecx
movq %rcx, 0x50(%rsp)
jmp 0x154b59
testl %edx, %edx
je 0x154b41
movq 0x70(%rsp), %rdx
movslq %edx, %rcx
incl %edx
movl %edx, 0xf8(%rsp)
movl 0x100(%rsp,%rcx,4), %ecx
andl $0x3f, %edx
movl %edx, 0xf8(%rsp)
movq 0x50(%rsp), %rsi
movl %esi, 0xfc(%rsp)
movq %rdx, 0x70(%rsp)
jmp 0x154b4d
movq $0x0, 0x50(%rsp)
pushq $-0x1
popq %rcx
movq 0x10(%rsp), %rdx
subl %ecx, %edx
movq %rdx, 0x10(%rsp)
movq 0x98(%rsp), %rdx
movl %eax, %esi
andl $0x1, %esi
movq 0xa0(%rsp), %rdi
leaq (%rsi,%rdi,2), %rdi
movq 0x90(%rsp), %rcx
andq %rcx, %rdi
movq %rdi, 0xa0(%rsp)
movq %rdi, 0xd0(%rsp)
addq %rbx, %rbx
shrl %eax
orq %rax, %rbx
andq %rcx, %rbx
xorl $0x1, %esi
movq 0xc0(%rsp), %rcx
shlq %cl, %rsi
movq %rbx, 0xd8(%rsp)
shrq %rdx
orq %rdx, %rsi
movq %rsi, 0x98(%rsp)
movq %rsi, 0xe0(%rsp)
movq 0x78(%rsp), %rdx
pushq $0x1
popq %rsi
subl %eax, %esi
shlq %cl, %rsi
shrq %rdx
orq %rdx, %rsi
movq %rsi, 0xe8(%rsp)
movq %rsi, 0x78(%rsp)
cmpq %rsi, %rbx
jne 0x154bfb
movq %rbx, 0x78(%rsp)
movq 0x30(%rsp), %rdi
incl %r8d
jmp 0x1544f9
incl %ebp
cmpl 0x48(%rsp), %ebp
movq %r12, 0x58(%rsp)
movq %rbx, 0x80(%rsp)
jl 0x154cbc
movq %rbp, 0x20(%rsp)
movq 0x10(%rsp), %rcx
cmpl $0xff, %ecx
jg 0x154cb0
leaq 0x1(%r9), %rax
xorl %ebx, %ebx
movq 0x78(%rsp), %rcx
cmpq %rcx, 0x80(%rsp)
setae %bl
movl $0x0, %r12d
cmovaeq %rax, %r12
shll $0x4, %ebx
movq 0xd0(%rsp,%rbx), %rdi
movq %r8, %rbp
callq 0x154d53
movq %rax, 0x28(%rsp)
movq 0xd8(%rsp,%rbx), %rdi
callq 0x154d53
movq 0x10(%rsp), %rcx
movq %rbp, %r8
movq 0x38(%rsp), %r10
movabsq $0x7fffffffffffffff, %r9 # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, %rbx
addq 0x28(%rsp), %rbx
movslq %r8d, %rsi
andq %r9, %rsi
orq %r12, %rsi
movq %rcx, %rdx
shlq $0x20, %rdx
addq 0xb8(%rsp), %rdx
movq 0x20(%rsp), %rax
jmp 0x1545ad
xorl %esi, %esi
pushq $-0x1
popq %rbx
movq 0x20(%rsp), %rax
jmp 0x154cc9
xorl %esi, %esi
pushq $-0x1
popq %rbx
movq %rbp, %rax
movq 0x10(%rsp), %rcx
movl $0xfffffff, %edx        # imm = 0xFFFFFFF
jmp 0x1545ad
cmpq $-0x1, %r15
je 0x154d22
movl (%r14), %ecx
movq 0x8(%r14), %rax
cmpl 0x4(%r14), %ecx
jne 0x154d08
leal (%rcx,%rcx), %edx
testl %ecx, %ecx
pushq $0x2
popq %rcx
cmovel %ecx, %edx
movl %edx, 0x4(%r14)
imulq $0x18, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x8(%r14)
movl (%r14), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%r14)
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
movq %r15, (%rax,%rcx)
movq %r12, 0x8(%rax,%rcx)
movq %r13, 0x10(%rax,%rcx)
addq $0x1a08, %rsp           # imm = 0x1A08
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9cb3e(%rip), %rdi     # 0x1f1879
leaq 0x9cb84(%rip), %rsi     # 0x1f18c6
leaq 0x9cb87(%rip), %rcx     # 0x1f18d0
movl $0x5d4, %edx            # imm = 0x5D4
callq 0x2110