// File: /workspace/github_c_makefile_star2_O0/lh3[P]minimap2/sketch.c
// Function: mm_sketch
void mm_sketch(void *km, const char *str, int len, int w, int k, uint32_t rid, int is_hpc, mm128_v *p)
{
	uint64_t shift1 = 2 * (k - 1), mask = (1ULL<<2*k) - 1, kmer[2] = {0,0};
	int i, j, l, buf_pos, min_pos, kmer_span = 0;
	mm128_t buf[256], min = { UINT64_MAX, UINT64_MAX };
	tiny_queue_t tq;

	assert(len > 0 && (w > 0 && w < 256) && (k > 0 && k <= 28)); // 56 bits for k-mer; could use long k-mers, but 28 enough in practice
	memset(buf, 0xff, w * 16);
	memset(&tq, 0, sizeof(tiny_queue_t));
	kv_resize(mm128_t, km, *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]];
		mm128_t info = { UINT64_MAX, UINT64_MAX };
		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] << 2 | c) & mask;           // forward k-mer
			kmer[1] = (kmer[1] >> 2) | (3ULL^c) << shift1; // reverse k-mer
			if (kmer[0] == kmer[1]) continue; // skip "symmetric k-mers" as we don't know it strand
			z = kmer[0] < kmer[1]? 0 : 1; // strand
			++l;
			if (l >= k && kmer_span < 256) {
				info.x = hash64(kmer[z], mask) << 8 | kmer_span;
				info.y = (uint64_t)rid<<32 | (uint32_t)i<<1 | z;
			}
		} 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 (min.x == buf[j].x && buf[j].y != min.y) kv_push(mm128_t, km, *p, buf[j]);
			for (j = 0; j < buf_pos; ++j)
				if (min.x == buf[j].x && buf[j].y != min.y) kv_push(mm128_t, km, *p, buf[j]);
		}
		if (info.x <= min.x) { // a new minimum; then write the old min
			if (l >= w + k && min.x != UINT64_MAX) kv_push(mm128_t, km, *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(mm128_t, km, *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 (min.x >= buf[j].x) 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 (min.x >= buf[j].x) 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 (min.x == buf[j].x && min.y != buf[j].y) kv_push(mm128_t, km, *p, buf[j]);
				for (j = 0; j <= buf_pos; ++j)
					if (min.x == buf[j].x && min.y != buf[j].y) kv_push(mm128_t, km, *p, buf[j]);
			}
		}
		if (++buf_pos == w) buf_pos = 0;
	}
	if (min.x != UINT64_MAX)
		kv_push(mm128_t, km, *p, min);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1160, %rsp           # imm = 0x1160
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
movl -0x1c(%rbp), %eax
subl $0x1, %eax
shll %eax
cltq
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0x30(%rbp)
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x21b0
movl $0x0, -0x58(%rbp)
movq 0x3b813(%rip), %rax     # 0x57f40
movq %rax, -0x1070(%rbp)
movq 0x3b80d(%rip), %rax     # 0x57f48
movq %rax, -0x1068(%rbp)
cmpl $0x0, -0x14(%rbp)
jle 0x1c765
cmpl $0x0, -0x18(%rbp)
jle 0x1c765
cmpl $0x100, -0x18(%rbp)     # imm = 0x100
jge 0x1c765
cmpl $0x0, -0x1c(%rbp)
jle 0x1c765
cmpl $0x1c, -0x1c(%rbp)
jg 0x1c765
jmp 0x1c784
leaq 0x3b7e4(%rip), %rdi     # 0x57f50
leaq 0x3b811(%rip), %rsi     # 0x57f84
movl $0x54, %edx
leaq 0x3b80e(%rip), %rcx     # 0x57f8d
callq 0x21a0
leaq -0x1060(%rbp), %rdi
movl -0x18(%rbp), %eax
shll $0x4, %eax
movslq %eax, %rdx
movl $0xff, %esi
callq 0x21b0
leaq -0x10f8(%rbp), %rdi
xorl %esi, %esi
movl $0x88, %edx
callq 0x21b0
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x1120(%rbp)
movq 0x18(%rbp), %rax
movq (%rax), %rcx
movl -0x14(%rbp), %eax
cltd
idivl -0x18(%rbp)
movl %eax, %edx
movq -0x1120(%rbp), %rax
movslq %edx, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x1c8c0
movq 0x18(%rbp), %rax
movq (%rax), %rcx
movl -0x14(%rbp), %eax
cltd
idivl -0x18(%rbp)
cltq
addq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rcx
shrq %rcx
movq 0x18(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x2, %rcx
movq 0x18(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x4, %rcx
movq 0x18(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x8, %rcx
movq 0x18(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x10, %rcx
movq 0x18(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rdx
shlq $0x4, %rdx
callq 0x1ad30
movq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x1c8c2
movl $0x0, -0x54(%rbp)
movl $0x0, -0x50(%rbp)
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x1d31a
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x41f21(%rip), %rax     # 0x5e820
movzbl (%rax,%rcx), %eax
movl %eax, -0x10fc(%rbp)
movq 0x3b630(%rip), %rax     # 0x57f40
movq %rax, -0x1110(%rbp)
movq 0x3b62a(%rip), %rax     # 0x57f48
movq %rax, -0x1108(%rbp)
cmpl $0x4, -0x10fc(%rbp)
jge 0x1cb19
cmpl $0x0, 0x10(%rbp)
je 0x1ca21
movl $0x1, -0x1118(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
cmpl -0x14(%rbp), %eax
jge 0x1c9e0
movq -0x10(%rbp), %rax
movl -0x44(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x41eb1(%rip), %rax     # 0x5e820
movzbl (%rax,%rcx), %eax
cmpl -0x10fc(%rbp), %eax
jne 0x1c9e0
movl $0x2, -0x1118(%rbp)
movl -0x44(%rbp), %eax
addl -0x1118(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x1c9d1
movq -0x10(%rbp), %rax
movl -0x44(%rbp), %ecx
addl -0x1118(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x41e70(%rip), %rax     # 0x5e820
movzbl (%rax,%rcx), %eax
cmpl -0x10fc(%rbp), %eax
je 0x1c9be
jmp 0x1c9d1
jmp 0x1c9c0
movl -0x1118(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1118(%rbp)
jmp 0x1c985
movl -0x1118(%rbp), %eax
subl $0x1, %eax
addl -0x44(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x1118(%rbp), %esi
leaq -0x10f8(%rbp), %rdi
callq 0x1d3e0
movl -0x1118(%rbp), %eax
addl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x10f4(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jle 0x1ca1f
leaq -0x10f8(%rbp), %rdi
callq 0x1d420
movl %eax, %ecx
movl -0x58(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x58(%rbp)
jmp 0x1ca4c
movl -0x4c(%rbp), %eax
addl $0x1, %eax
cmpl -0x1c(%rbp), %eax
jge 0x1ca3a
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1124(%rbp)
jmp 0x1ca43
movl -0x1c(%rbp), %eax
movl %eax, -0x1124(%rbp)
movl -0x1124(%rbp), %eax
movl %eax, -0x58(%rbp)
movq -0x40(%rbp), %rax
shlq $0x2, %rax
movslq -0x10fc(%rbp), %rcx
orq %rcx, %rax
andq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
shrq $0x2, %rax
movslq -0x10fc(%rbp), %rdx
xorq $0x3, %rdx
movq -0x28(%rbp), %rcx
shlq %cl, %rdx
movq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x1ca99
jmp 0x1d30c
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
movl $0x1, %eax
xorl %ecx, %ecx
cmpq %rsi, %rdx
cmovbl %ecx, %eax
movl %eax, -0x1114(%rbp)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jl 0x1cb17
cmpl $0x100, -0x58(%rbp)     # imm = 0x100
jge 0x1cb17
movslq -0x1114(%rbp), %rax
movq -0x40(%rbp,%rax,8), %rdi
movq -0x30(%rbp), %rsi
callq 0x1d480
shlq $0x8, %rax
movslq -0x58(%rbp), %rcx
orq %rcx, %rax
movq %rax, -0x1110(%rbp)
movl -0x20(%rbp), %eax
shlq $0x20, %rax
movl -0x44(%rbp), %ecx
shll %ecx
movl %ecx, %ecx
orq %rcx, %rax
movslq -0x1114(%rbp), %rcx
orq %rcx, %rax
movq %rax, -0x1108(%rbp)
jmp 0x1cb3b
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x10f8(%rbp)
movl $0x0, -0x10f4(%rbp)
movl $0x0, -0x58(%rbp)
movslq -0x50(%rbp), %rcx
leaq -0x1060(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x1110(%rbp), %rcx
movq %rcx, (%rax)
movq -0x1108(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x4c(%rbp), %eax
movl -0x18(%rbp), %ecx
addl -0x1c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x1cdca
cmpq $-0x1, -0x1070(%rbp)
je 0x1cdca
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x1cca7
movq -0x1070(%rbp), %rax
movslq -0x48(%rbp), %rdx
leaq -0x1060(%rbp), %rcx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jne 0x1cc97
movslq -0x48(%rbp), %rcx
leaq -0x1060(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
cmpq -0x1068(%rbp), %rax
je 0x1cc97
jmp 0x1cbe0
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1cc55
movq 0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1cc10
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x1130(%rbp)
jmp 0x1cc1e
movl $0x2, %eax
movq %rax, -0x1130(%rbp)
jmp 0x1cc1e
movq -0x1130(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rdx
shlq $0x4, %rdx
callq 0x1ad30
movq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x48(%rbp), %rdx
leaq -0x1060(%rbp), %rcx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0x1cc97
jmp 0x1cc99
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x1cb8d
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x1cdc8
movq -0x1070(%rbp), %rax
movslq -0x48(%rbp), %rdx
leaq -0x1060(%rbp), %rcx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jne 0x1cdb8
movslq -0x48(%rbp), %rcx
leaq -0x1060(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
cmpq -0x1068(%rbp), %rax
je 0x1cdb8
jmp 0x1cd01
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1cd76
movq 0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1cd31
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x1138(%rbp)
jmp 0x1cd3f
movl $0x2, %eax
movq %rax, -0x1138(%rbp)
jmp 0x1cd3f
movq -0x1138(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rdx
shlq $0x4, %rdx
callq 0x1ad30
movq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x48(%rbp), %rdx
leaq -0x1060(%rbp), %rcx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0x1cdb8
jmp 0x1cdba
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x1ccae
jmp 0x1cdca
movq -0x1110(%rbp), %rax
cmpq -0x1070(%rbp), %rax
ja 0x1ced2
movl -0x4c(%rbp), %eax
movl -0x18(%rbp), %ecx
addl -0x1c(%rbp), %ecx
cmpl %ecx, %eax
jl 0x1ceab
cmpq $-0x1, -0x1070(%rbp)
je 0x1ceab
jmp 0x1cdff
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1ce74
movq 0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1ce2f
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x1140(%rbp)
jmp 0x1ce3d
movl $0x2, %eax
movq %rax, -0x1140(%rbp)
jmp 0x1ce3d
movq -0x1140(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rdx
shlq $0x4, %rdx
callq 0x1ad30
movq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x1070(%rbp), %rcx
movq %rcx, (%rax)
movq -0x1068(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x1ceab
movq -0x1110(%rbp), %rax
movq %rax, -0x1070(%rbp)
movq -0x1108(%rbp), %rax
movq %rax, -0x1068(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x1d2f5
movl -0x50(%rbp), %eax
cmpl -0x54(%rbp), %eax
jne 0x1d2f3
movl -0x4c(%rbp), %eax
movl -0x18(%rbp), %ecx
addl -0x1c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x1cfae
cmpq $-0x1, -0x1070(%rbp)
je 0x1cfae
jmp 0x1cf02
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1cf77
movq 0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1cf32
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x1148(%rbp)
jmp 0x1cf40
movl $0x2, %eax
movq %rax, -0x1148(%rbp)
jmp 0x1cf40
movq -0x1148(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rdx
shlq $0x4, %rdx
callq 0x1ad30
movq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x1070(%rbp), %rcx
movq %rcx, (%rax)
movq -0x1068(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x1cfae
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
movq $-0x1, -0x1070(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x1d022
movq -0x1070(%rbp), %rax
movslq -0x48(%rbp), %rdx
leaq -0x1060(%rbp), %rcx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jb 0x1d015
movslq -0x48(%rbp), %rcx
leaq -0x1060(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x1070(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x1068(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x1d017
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x1cfc2
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x50(%rbp), %eax
jg 0x1d089
movq -0x1070(%rbp), %rax
movslq -0x48(%rbp), %rdx
leaq -0x1060(%rbp), %rcx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jb 0x1d07c
movslq -0x48(%rbp), %rcx
leaq -0x1060(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x1070(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x1068(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x1d07e
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x1d029
movl -0x4c(%rbp), %eax
movl -0x18(%rbp), %ecx
addl -0x1c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x1d2f1
cmpq $-0x1, -0x1070(%rbp)
je 0x1d2f1
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x1d1ce
movq -0x1070(%rbp), %rax
movslq -0x48(%rbp), %rdx
leaq -0x1060(%rbp), %rcx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jne 0x1d1be
movq -0x1068(%rbp), %rax
movslq -0x48(%rbp), %rdx
leaq -0x1060(%rbp), %rcx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
je 0x1d1be
jmp 0x1d107
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1d17c
movq 0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1d137
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x1150(%rbp)
jmp 0x1d145
movl $0x2, %eax
movq %rax, -0x1150(%rbp)
jmp 0x1d145
movq -0x1150(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rdx
shlq $0x4, %rdx
callq 0x1ad30
movq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x48(%rbp), %rdx
leaq -0x1060(%rbp), %rcx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0x1d1be
jmp 0x1d1c0
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x1d0b4
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x50(%rbp), %eax
jg 0x1d2ef
movq -0x1070(%rbp), %rax
movslq -0x48(%rbp), %rdx
leaq -0x1060(%rbp), %rcx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jne 0x1d2df
movq -0x1068(%rbp), %rax
movslq -0x48(%rbp), %rdx
leaq -0x1060(%rbp), %rcx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
je 0x1d2df
jmp 0x1d228
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1d29d
movq 0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1d258
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x1158(%rbp)
jmp 0x1d266
movl $0x2, %eax
movq %rax, -0x1158(%rbp)
jmp 0x1d266
movq -0x1158(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rdx
shlq $0x4, %rdx
callq 0x1ad30
movq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x48(%rbp), %rdx
leaq -0x1060(%rbp), %rcx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0x1d2df
jmp 0x1d2e1
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x1d1d5
jmp 0x1d2f1
jmp 0x1d2f3
jmp 0x1d2f5
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
cmpl -0x18(%rbp), %eax
jne 0x1d30a
movl $0x0, -0x50(%rbp)
jmp 0x1d30c
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x1c8de
cmpq $-0x1, -0x1070(%rbp)
je 0x1d3d6
jmp 0x1d32a
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1d39f
movq 0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1d35a
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x1160(%rbp)
jmp 0x1d368
movl $0x2, %eax
movq %rax, -0x1160(%rbp)
jmp 0x1d368
movq -0x1160(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rdx
shlq $0x4, %rdx
callq 0x1ad30
movq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x1070(%rbp), %rcx
movq %rcx, (%rax)
movq -0x1068(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x1d3d6
addq $0x1160, %rsp           # imm = 0x1160
popq %rbp
retq
nop