// File: ChnMasterOG[P]KmerGO2/kmergo/../kmc_api/kmer_api.h
// Function: void CKmerAPI::to_string_impl<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>(__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>)
inline void to_string_impl(RandomAccessIterator iter)
	{
		uchar *byte_ptr;
		uchar c;
		uchar temp_byte_alignment = byte_alignment;
		uint32 cur_string_size = 0;
		for (uint32 row_counter = 0; row_counter < no_of_rows; row_counter++)
		{
			byte_ptr = reinterpret_cast<uchar*>(&kmer_data[row_counter]);

			byte_ptr += 7;					// shift a pointer towards a MSB

			for (uint32 i = 0; (i < kmer_length) && (i < 32); i += 4)		// 32 symbols of any "row" in kmer_data
			{
				if ((i == 0) && temp_byte_alignment)				// check if a byte_alignment placed before a prefix is to be skipped
					temp_byte_alignment--;
				else
				{
					c = 0xc0 & *byte_ptr;			//11000000
					c = c >> 6;
					*(iter + cur_string_size++) = char_codes[c];
					if (cur_string_size == kmer_length) break;
				}

				if ((i == 0) && temp_byte_alignment)				// check if a  byte_alignment placed before a prefix is to be skipped
					temp_byte_alignment--;
				else
				{
					c = 0x30 & *byte_ptr;			//00110000
					c = c >> 4;
					*(iter + cur_string_size++) = char_codes[c];
					if (cur_string_size == kmer_length) break;
				}

				if ((i == 0) && temp_byte_alignment)				// check if a  byte_alignment placed before a prefix is to be skipped
					temp_byte_alignment--;
				else
				{
					c = 0x0c & *byte_ptr;			//00001100
					c = c >> 2;
					*(iter + cur_string_size++) = char_codes[c];
					if (cur_string_size == kmer_length) break;
				}
				// no need to check byte alignment as its length is at most 3 
				c = 0x03 & *byte_ptr;			//00000011
				*(iter + cur_string_size++) = char_codes[c];
				if (cur_string_size == kmer_length) break;

				byte_ptr--;
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rsi, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movb 0xc(%rax), %al
movb %al, -0x1a(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x50(%rbp), %rcx
movl -0x24(%rbp), %eax
cmpl 0x10(%rcx), %eax
jae 0x40ca63
movq -0x50(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x7, %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x50(%rbp), %rdx
movl -0x28(%rbp), %ecx
xorl %eax, %eax
cmpl 0x8(%rdx), %ecx
movb %al, -0x51(%rbp)
jae 0x40c85f
cmpl $0x20, -0x28(%rbp)
setb %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x40c86b
jmp 0x40ca53
cmpl $0x0, -0x28(%rbp)
jne 0x40c881
cmpb $0x0, -0x1a(%rbp)
je 0x40c881
movb -0x1a(%rbp), %al
addb $-0x1, %al
movb %al, -0x1a(%rbp)
jmp 0x40c8ea
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
andl $0xc0, %eax
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
sarl $0x6, %eax
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
movl %eax, %ecx
movq $0x5b6ee8, %rax         # imm = 0x5B6EE8
movb (%rax,%rcx), %al
movb %al, -0x52(%rbp)
movl -0x20(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x20(%rbp)
movl %eax, %eax
movl %eax, %esi
leaq -0x8(%rbp), %rdi
callq 0x40ca70
movq %rax, -0x30(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x408440
movb -0x52(%rbp), %dl
movq -0x50(%rbp), %rcx
movb %dl, (%rax)
movl -0x20(%rbp), %eax
cmpl 0x8(%rcx), %eax
jne 0x40c8e8
jmp 0x40ca53
jmp 0x40c8ea
cmpl $0x0, -0x28(%rbp)
jne 0x40c900
cmpb $0x0, -0x1a(%rbp)
je 0x40c900
movb -0x1a(%rbp), %al
addb $-0x1, %al
movb %al, -0x1a(%rbp)
jmp 0x40c967
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
andl $0x30, %eax
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
sarl $0x4, %eax
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
movl %eax, %ecx
movq $0x5b6ee8, %rax         # imm = 0x5B6EE8
movb (%rax,%rcx), %al
movb %al, -0x53(%rbp)
movl -0x20(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x20(%rbp)
movl %eax, %eax
movl %eax, %esi
leaq -0x8(%rbp), %rdi
callq 0x40ca70
movq %rax, -0x38(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x408440
movb -0x53(%rbp), %dl
movq -0x50(%rbp), %rcx
movb %dl, (%rax)
movl -0x20(%rbp), %eax
cmpl 0x8(%rcx), %eax
jne 0x40c965
jmp 0x40ca53
jmp 0x40c967
cmpl $0x0, -0x28(%rbp)
jne 0x40c97d
cmpb $0x0, -0x1a(%rbp)
je 0x40c97d
movb -0x1a(%rbp), %al
addb $-0x1, %al
movb %al, -0x1a(%rbp)
jmp 0x40c9e1
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
andl $0xc, %eax
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
sarl $0x2, %eax
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
movl %eax, %ecx
movq $0x5b6ee8, %rax         # imm = 0x5B6EE8
movb (%rax,%rcx), %al
movb %al, -0x54(%rbp)
movl -0x20(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x20(%rbp)
movl %eax, %eax
movl %eax, %esi
leaq -0x8(%rbp), %rdi
callq 0x40ca70
movq %rax, -0x40(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x408440
movb -0x54(%rbp), %dl
movq -0x50(%rbp), %rcx
movb %dl, (%rax)
movl -0x20(%rbp), %eax
cmpl 0x8(%rcx), %eax
jne 0x40c9df
jmp 0x40ca53
jmp 0x40c9e1
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
andl $0x3, %eax
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
movl %eax, %ecx
movq $0x5b6ee8, %rax         # imm = 0x5B6EE8
movb (%rax,%rcx), %al
movb %al, -0x55(%rbp)
movl -0x20(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x20(%rbp)
movl %eax, %eax
movl %eax, %esi
leaq -0x8(%rbp), %rdi
callq 0x40ca70
movq %rax, -0x48(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x408440
movb -0x55(%rbp), %dl
movq -0x50(%rbp), %rcx
movb %dl, (%rax)
movl -0x20(%rbp), %eax
cmpl 0x8(%rcx), %eax
jne 0x40ca39
jmp 0x40ca53
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
movl -0x28(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x28(%rbp)
jmp 0x40c844
jmp 0x40ca55
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x40c80c
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)