// File: splatlab[P]debgr/main.cc
// Function: reads_to_kmers(kmercounting::chunk&, flush_object*)
void reads_to_kmers(chunk &c, flush_object *obj)
{
	auto fs = c.get_reads();
	auto fe = c.get_reads();
	auto end = fs + c.get_size();
	while (fs && fs!=end) {
		fs = static_cast<char*>(memchr(fs, '\n', end-fs)); // ignore the first line
		fs++; // increment the pointer

		fe = static_cast<char*>(memchr(fs, '\n', end-fs)); // read the read
		string read(fs, fe-fs);
		/*cout << read << endl;*/

start_read:
		if (read.length() < K) // start with the next read if length is smaller than K
			goto next_read;
		{
			uint64_t first = 0;
			uint64_t first_rev = 0;
			uint64_t first_can = 0;
			uint64_t item = 0;
			//cout << "K " << read.substr(0,K) << endl;
			for(int i=0; i<K; i++) { //First kmer
				uint8_t curr = kmer::map_base(read[i]);
				if (curr > DNA_MAP::G) { // 'N' is encountered
					read = read.substr(i+1, read.length());
					goto start_read;
				}
				first = first | curr;
				first = first << 2;
			}
			first = first >> 2;
			first_rev = kmer::reverse_complement(first);

			//cout << "kmer: "; cout << int_to_str(first);
			//cout << " reverse-comp: "; cout << int_to_str(first_rev) << endl;

			if (kmer::compare_kmers(first, first_rev))
				first_can = first;
			else
				first_can = first_rev;

			// create a set of true k-mers
			uint64_t exact_hash = HashUtil::hash_64(first_can, BITMASK(2*K));
			qf_insert(obj->exact_qf, exact_hash, 0, 1, true, true);
			//true_kmers.insert(first_can);

			// this is the first kmer of the read, hash using invertible hash and insert
			// in the first QF
			// No need to use the range, because by default the QF will use the
			// lower order 56 (q+r) bits.
			uint64_t node = kmer::prefix(first, K-1);
			node = canonicalize_node(node);
			record_end(node, first_can, obj);

			// hash the kmer using murmurhash/xxHash before adding to the list
			item = HashUtil::MurmurHash64A(((void*)&first_can), sizeof(first_can),
																		 obj->local_qf->metadata->seed);
			/*
			 * first try and insert in the main QF.
			 * If lock can't be accuired in the first attempt then
			 * insert the item in the local QF.
			 */
			if (!qf_insert(obj->main_qf, item%obj->main_qf->metadata->range, 0, 1,
										 true, false)) {
				qf_insert(obj->local_qf, item%obj->local_qf->metadata->range, 0, 1,
									false, false);
				obj->count++;
				// check of the load factor of the local QF is more than 50%
				if (obj->count > 1ULL<<(QBITS_LOCAL_QF-1)) {
					dump_local_qf_to_main(obj);
					obj->count = 0;
				}
			}
			//cout<< "X " << bitset<64>(first)<<endl;

			uint64_t next = first;
			uint64_t next_rev = first_rev;
			uint64_t next_can = first_can;

			for(uint32_t i=K; i<read.length(); i++) { //next kmers
				uint64_t nextn = kmer::suffix(next, K-1);
				nextn = canonicalize_node(nextn);
				if (can_have_duplex_edges(nextn))
					record_end(nextn, next_can, obj);
				//cout << "K: " << read.substr(i-K+1,K) << endl;
				uint8_t curr = kmer::map_base(read[i]);
				if (curr > DNA_MAP::G) { // 'N' is encountered
					read = read.substr(i+1, read.length());
					// don't insert if i = K and node is a duplex node.
					if (i > K || !can_have_duplex_edges(nextn)) {
						nextn = kmer::suffix(next, K-1);
						nextn = canonicalize_node(nextn);
						record_end(nextn, next_can, obj);
					}
					goto start_read;
				}
				next = (next << 2) & BITMASK(2*K);
				next_rev = next_rev >> 2;
				
				next |= curr;
				uint64_t tmp = kmer::reverse_complement_base(curr);
				tmp <<= (K*2-2);
				next_rev = next_rev | tmp;
				if (kmer::compare_kmers(next, next_rev))
					next_can = next;
				else
					next_can = next_rev;

				uint64_t exact_hash = HashUtil::hash_64(next_can, BITMASK(2*K));
				qf_insert(obj->exact_qf, exact_hash, 0, 1, true, true);
				//true_kmers.insert(next_can);

				// hash the kmer using murmurhash/xxHash before adding to the list
				item = HashUtil::MurmurHash64A(((void*)&next_can), sizeof(next_can),
																			 obj->local_qf->metadata->seed);
				//item = XXH63 (((void*)&item), sizeof(item), seed);

				/*
				 * first try and insert in the main QF.
				 * If lock can't be accuired in the first attempt then
				 * insert the item in the local QF.
				 */
				if (!qf_insert(obj->main_qf, item%obj->main_qf->metadata->range, 0, 1, true,
											 false)) {
					qf_insert(obj->local_qf, item%obj->local_qf->metadata->range, 0, 1, false,
										false);
					obj->count++;
					// check of the load factor of the local QF is more than 50%
					if (obj->count > 1ULL<<(QBITS_LOCAL_QF-1)) {
						dump_local_qf_to_main(obj);
						obj->count = 0;
					}
				}

				//cout<<bitset<64>(next)<<endl;
				//assert(next == str_to_int(read.substr(i-K+1,K)));

				if (can_have_duplex_edges(nextn))
					record_end(nextn, next_can, obj);
			}
			node = kmer::suffix(next, K-1);
			node = canonicalize_node(node);
			record_end(node, next_can, obj);
		}

next_read:
		fs = ++fe;		// increment the pointer
		fs = static_cast<char*>(memchr(fs, '\n', end-fs)); // ignore one line
		fs++; // increment the pointer
		fs = static_cast<char*>(memchr(fs, '\n', end-fs)); // ignore one more line
		fs++; // increment the pointer
	}
	free(c.get_reads());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xae50
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0xae50
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x8(%rbp), %rdi
callq 0xae70
movl %eax, %ecx
movq -0x120(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x121(%rbp)
je 0x7683
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
setne %al
movb %al, -0x121(%rbp)
movb -0x121(%rbp), %al
testb $0x1, %al
jne 0x7692
jmp 0x806b
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rdx
subq %rdi, %rdx
movl $0xa, %esi
movl %esi, -0x144(%rbp)
callq 0x64f0
movl -0x144(%rbp), %esi
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
incq %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rdx
subq %rdi, %rdx
callq 0x64f0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, -0x140(%rbp)
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x138(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x67b0
movq -0x140(%rbp), %rsi
movq -0x138(%rbp), %rdx
movq -0x130(%rbp), %rcx
leaq -0x48(%rbp), %rdi
callq 0x6500
jmp 0x771f
leaq -0x49(%rbp), %rdi
callq 0x64b0
leaq -0x48(%rbp), %rdi
callq 0x6690
cmpq $0x1c, %rax
jae 0x7756
jmp 0x7ffb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x49(%rbp), %rdi
callq 0x64b0
jmp 0x8085
movq $0x0, -0x68(%rbp)
movq $0x0, -0x70(%rbp)
movq $0x0, -0x78(%rbp)
movq $0x0, -0x80(%rbp)
movl $0x0, -0x84(%rbp)
cmpl $0x1c, -0x84(%rbp)
jge 0x7882
movslq -0x84(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x6880
movq %rax, -0x150(%rbp)
jmp 0x77a6
movq -0x150(%rbp), %rax
movsbl (%rax), %edi
callq 0xae90
movb %al, -0x151(%rbp)
jmp 0x77bd
movb -0x151(%rbp), %al
movb %al, -0x85(%rbp)
movzbl -0x85(%rbp), %eax
cmpl $0x3, %eax
jle 0x7850
movl -0x84(%rbp), %eax
incl %eax
cltq
movq %rax, -0x160(%rbp)
leaq -0x48(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x6690
movq -0x168(%rbp), %rsi
movq -0x160(%rbp), %rdx
movq %rax, %rcx
leaq -0xa8(%rbp), %rdi
callq 0x6470
jmp 0x7815
leaq -0x48(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x6580
leaq -0xa8(%rbp), %rdi
callq 0x6250
jmp 0x7728
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x6250
jmp 0x8085
movq -0x68(%rbp), %rax
movzbl -0x85(%rbp), %ecx
orq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
shlq $0x2, %rax
movq %rax, -0x68(%rbp)
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x7780
movq -0x68(%rbp), %rax
shrq $0x2, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
callq 0x6cd0
movq %rax, -0x170(%rbp)
jmp 0x78a0
movq -0x170(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0xaef0
movb %al, -0x171(%rbp)
jmp 0x78c0
movb -0x171(%rbp), %al
testb $0x1, %al
jne 0x78cc
jmp 0x78d6
movq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x78de
movq -0x70(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
movabsq $0xffffffffffffff, %rsi # imm = 0xFFFFFFFFFFFFFF
callq 0x16020
movq %rax, -0x180(%rbp)
jmp 0x78fa
movq -0x180(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0xb0(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movl $0x1, %r9d
movl %r9d, %r8d
callq 0x16f50
jmp 0x7930
movq -0x68(%rbp), %rdi
movl $0x1b, %esi
callq 0xaf10
movq %rax, -0x188(%rbp)
jmp 0x7947
movq -0x188(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x71a0
movq %rax, -0x190(%rbp)
jmp 0x796a
movq -0x190(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x7570
jmp 0x798e
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movl 0x8(%rax), %edx
leaq -0x78(%rbp), %rdi
movl $0x8, %esi
callq 0x15c20
movq %rax, -0x198(%rbp)
jmp 0x79b4
movq -0x198(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x1b0(%rbp)
movq -0x80(%rbp), %rdi
movq 0x8(%rax), %rax
movq 0x40(%rax), %rdx
movq 0x48(%rax), %rcx
xorl %eax, %eax
movl %eax, -0x1a0(%rbp)
movl %eax, %esi
movq %rsi, -0x1a8(%rbp)
callq 0x66e0
movq -0x1b0(%rbp), %rdi
movq -0x1a8(%rbp), %rdx
movl -0x1a0(%rbp), %r9d
movq %rax, %rsi
movl $0x1, %ecx
movl $0x1, %r8d
callq 0x16f50
movb %al, -0x199(%rbp)
jmp 0x7a24
movb -0x199(%rbp), %al
testb $0x1, %al
jne 0x7ac4
jmp 0x7a34
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x1c8(%rbp)
movq -0x80(%rbp), %rdi
movq 0x8(%rax), %rax
movq 0x40(%rax), %rdx
movq 0x48(%rax), %rcx
xorl %eax, %eax
movl %eax, -0x1b4(%rbp)
movl %eax, %esi
movq %rsi, -0x1c0(%rbp)
callq 0x66e0
movq -0x1c8(%rbp), %rdi
movq -0x1c0(%rbp), %rdx
movl -0x1b4(%rbp), %r9d
movq %rax, %rsi
movl $0x1, %ecx
movl %r9d, %r8d
callq 0x16f50
jmp 0x7a90
movq -0x10(%rbp), %rax
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
cmpq $0x8000, %rax           # imm = 0x8000
jbe 0x7ac2
movq -0x10(%rbp), %rdi
callq 0x8090
jmp 0x7ab7
movq -0x10(%rbp), %rax
movl $0x0, 0x28(%rax)
jmp 0x7ac4
movq -0x68(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0xd0(%rbp)
movl $0x1c, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
movq %rax, -0x1d0(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x6690
movq %rax, %rcx
movq -0x1d0(%rbp), %rax
cmpq %rcx, %rax
jae 0x7f95
movq -0xc0(%rbp), %rdi
movl $0x1b, %esi
callq 0xaf30
movq %rax, -0x1d8(%rbp)
jmp 0x7b32
movq -0x1d8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rdi
callq 0x71a0
movq %rax, -0x1e0(%rbp)
jmp 0x7b55
movq -0x1e0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rdi
callq 0x7280
movb %al, -0x1e1(%rbp)
jmp 0x7b77
movb -0x1e1(%rbp), %al
testb $0x1, %al
jne 0x7b83
jmp 0x7b9e
movq -0xe0(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x7570
jmp 0x7b9c
jmp 0x7b9e
movl -0xd4(%rbp), %eax
movl %eax, %esi
leaq -0x48(%rbp), %rdi
callq 0x6880
movq %rax, -0x1f0(%rbp)
jmp 0x7bb8
movq -0x1f0(%rbp), %rax
movsbl (%rax), %edi
callq 0xae90
movb %al, -0x1f1(%rbp)
jmp 0x7bcf
movb -0x1f1(%rbp), %al
movb %al, -0xe1(%rbp)
movzbl -0xe1(%rbp), %eax
cmpl $0x3, %eax
jle 0x7cd9
movl -0xd4(%rbp), %eax
incl %eax
movq %rax, -0x200(%rbp)
leaq -0x48(%rbp), %rdi
movq %rdi, -0x208(%rbp)
callq 0x6690
movq -0x208(%rbp), %rsi
movq -0x200(%rbp), %rdx
movq %rax, %rcx
leaq -0x108(%rbp), %rdi
callq 0x6470
jmp 0x7c29
leaq -0x48(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x6580
leaq -0x108(%rbp), %rdi
callq 0x6250
cmpl $0x1c, -0xd4(%rbp)
ja 0x7c6e
movq -0xe0(%rbp), %rdi
callq 0x7280
movb %al, -0x209(%rbp)
jmp 0x7c62
movb -0x209(%rbp), %al
testb $0x1, %al
jne 0x7cd4
jmp 0x7c6e
movq -0xc0(%rbp), %rdi
movl $0x1b, %esi
callq 0xaf30
movq %rax, -0x218(%rbp)
jmp 0x7c88
movq -0x218(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rdi
callq 0x71a0
movq %rax, -0x220(%rbp)
jmp 0x7cab
movq -0x220(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x7570
jmp 0x7cd2
jmp 0x7cd4
jmp 0x7728
movq -0xc0(%rbp), %rax
shlq $0x2, %rax
movabsq $0xfffffffffffffc, %rcx # imm = 0xFFFFFFFFFFFFFC
andq %rcx, %rax
movq %rax, -0xc0(%rbp)
movq -0xc8(%rbp), %rax
shrq $0x2, %rax
movq %rax, -0xc8(%rbp)
movzbl -0xe1(%rbp), %eax
movl %eax, %ecx
movq -0xc0(%rbp), %rax
orq %rcx, %rax
movq %rax, -0xc0(%rbp)
movzbl -0xe1(%rbp), %edi
callq 0xab90
movl %eax, -0x224(%rbp)
jmp 0x7d38
movl -0x224(%rbp), %eax
cltq
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
shlq $0x36, %rax
movq %rax, -0x110(%rbp)
movq -0xc8(%rbp), %rax
movq -0x110(%rbp), %rcx
orq %rcx, %rax
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0xaef0
movb %al, -0x225(%rbp)
jmp 0x7d8c
movb -0x225(%rbp), %al
testb $0x1, %al
jne 0x7d98
jmp 0x7da8
movq -0xc0(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0x7db6
movq -0xc8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rdi
movabsq $0xffffffffffffff, %rsi # imm = 0xFFFFFFFFFFFFFF
callq 0x16020
movq %rax, -0x230(%rbp)
jmp 0x7dd5
movq -0x230(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x118(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movl $0x1, %r9d
movl %r9d, %r8d
callq 0x16f50
jmp 0x7e0b
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movl 0x8(%rax), %edx
leaq -0xd0(%rbp), %rdi
movl $0x8, %esi
callq 0x15c20
movq %rax, -0x238(%rbp)
jmp 0x7e34
movq -0x238(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x250(%rbp)
movq -0x80(%rbp), %rdi
movq 0x8(%rax), %rax
movq 0x40(%rax), %rdx
movq 0x48(%rax), %rcx
xorl %eax, %eax
movl %eax, -0x240(%rbp)
movl %eax, %esi
movq %rsi, -0x248(%rbp)
callq 0x66e0
movq -0x250(%rbp), %rdi
movq -0x248(%rbp), %rdx
movl -0x240(%rbp), %r9d
movq %rax, %rsi
movl $0x1, %ecx
movl $0x1, %r8d
callq 0x16f50
movb %al, -0x239(%rbp)
jmp 0x7ea4
movb -0x239(%rbp), %al
testb $0x1, %al
jne 0x7f44
jmp 0x7eb4
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x268(%rbp)
movq -0x80(%rbp), %rdi
movq 0x8(%rax), %rax
movq 0x40(%rax), %rdx
movq 0x48(%rax), %rcx
xorl %eax, %eax
movl %eax, -0x254(%rbp)
movl %eax, %esi
movq %rsi, -0x260(%rbp)
callq 0x66e0
movq -0x268(%rbp), %rdi
movq -0x260(%rbp), %rdx
movl -0x254(%rbp), %r9d
movq %rax, %rsi
movl $0x1, %ecx
movl %r9d, %r8d
callq 0x16f50
jmp 0x7f10
movq -0x10(%rbp), %rax
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
cmpq $0x8000, %rax           # imm = 0x8000
jbe 0x7f42
movq -0x10(%rbp), %rdi
callq 0x8090
jmp 0x7f37
movq -0x10(%rbp), %rax
movl $0x0, 0x28(%rax)
jmp 0x7f44
movq -0xe0(%rbp), %rdi
callq 0x7280
movb %al, -0x269(%rbp)
jmp 0x7f58
movb -0x269(%rbp), %al
testb $0x1, %al
jne 0x7f64
jmp 0x7f7f
movq -0xe0(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x7570
jmp 0x7f7d
jmp 0x7f7f
jmp 0x7f81
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0x7aef
movq -0xc0(%rbp), %rdi
movl $0x1b, %esi
callq 0xaf30
movq %rax, -0x278(%rbp)
jmp 0x7faf
movq -0x278(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x71a0
movq %rax, -0x280(%rbp)
jmp 0x7fd2
movq -0x280(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x7570
jmp 0x7ff9
jmp 0x7ffb
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
movl $0xa, %esi
callq 0x64f0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
movl $0xa, %esi
callq 0x64f0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x6250
jmp 0x7663
movq -0x8(%rbp), %rdi
callq 0xae50
movq %rax, %rdi
callq 0x6550
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x67a0
nop