// File: /workspace/github_cpp_makefile_star2_O3/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::utf32_writer::value_type pugi::impl::(anonymous namespace)::utf8_decoder::process<pugi::impl::(anonymous namespace)::utf32_writer>(unsigned char const*, unsigned long, pugi::impl::(anonymous namespace)::utf32_writer::value_type, pugi::impl::(anonymous namespace)::utf32_writer)
static inline typename Traits::value_type process(const uint8_t* data, size_t size, typename Traits::value_type result, Traits)
		{
			const uint8_t utf8_byte_mask = 0x3f;

			while (size)
			{
				uint8_t lead = *data;

				// 0xxxxxxx -> U+0000..U+007F
				if (lead < 0x80)
				{
					result = Traits::low(result, lead);
					data += 1;
					size -= 1;

					// process aligned single-byte (ascii) blocks
					if ((reinterpret_cast<uintptr_t>(data) & 3) == 0)
					{
						// round-trip through void* to silence 'cast increases required alignment of target type' warnings
						while (size >= 4 && (*static_cast<const uint32_t*>(static_cast<const void*>(data)) & 0x80808080) == 0)
						{
							result = Traits::low(result, data[0]);
							result = Traits::low(result, data[1]);
							result = Traits::low(result, data[2]);
							result = Traits::low(result, data[3]);
							data += 4;
							size -= 4;
						}
					}
				}
				// 110xxxxx -> U+0080..U+07FF
				else if (static_cast<unsigned int>(lead - 0xC0) < 0x20 && size >= 2 && (data[1] & 0xc0) == 0x80)
				{
					result = Traits::low(result, ((lead & ~0xC0) << 6) | (data[1] & utf8_byte_mask));
					data += 2;
					size -= 2;
				}
				// 1110xxxx -> U+0800-U+FFFF
				else if (static_cast<unsigned int>(lead - 0xE0) < 0x10 && size >= 3 && (data[1] & 0xc0) == 0x80 && (data[2] & 0xc0) == 0x80)
				{
					result = Traits::low(result, ((lead & ~0xE0) << 12) | ((data[1] & utf8_byte_mask) << 6) | (data[2] & utf8_byte_mask));
					data += 3;
					size -= 3;
				}
				// 11110xxx -> U+10000..U+10FFFF
				else if (static_cast<unsigned int>(lead - 0xF0) < 0x08 && size >= 4 && (data[1] & 0xc0) == 0x80 && (data[2] & 0xc0) == 0x80 && (data[3] & 0xc0) == 0x80)
				{
					result = Traits::high(result, ((lead & ~0xF0) << 18) | ((data[1] & utf8_byte_mask) << 12) | ((data[2] & utf8_byte_mask) << 6) | (data[3] & utf8_byte_mask));
					data += 4;
					size -= 4;
				}
				// 10xxxxxx or 11111xxx -> invalid
				else
				{
					data += 1;
					size -= 1;
				}
			}

			return result;
		}

// Assembly:
movq %rdx, %rax
testq %rsi, %rsi
je 0x2a26c
movzbl (%rdi), %ecx
testb %cl, %cl
js 0x2a132
movl %ecx, (%rax)
addq $0x4, %rax
incq %rdi
decq %rsi
cmpq $0x4, %rsi
jb 0x2a0d1
movl %edi, %ecx
andl $0x3, %ecx
jne 0x2a0d1
movl (%rdi), %ecx
testl $0x80808080, %ecx       # imm = 0x80808080
jne 0x2a0d1
andl $0x7f, %ecx
movl %ecx, (%rax)
movzbl 0x1(%rdi), %ecx
movl %ecx, 0x4(%rax)
movzbl 0x2(%rdi), %ecx
movl %ecx, 0x8(%rax)
movzbl 0x3(%rdi), %ecx
movl %ecx, 0xc(%rax)
addq $0x10, %rax
addq $0x4, %rdi
addq $-0x4, %rsi
cmpq $0x3, %rsi
ja 0x2a0fa
jmp 0x2a0d1
cmpq $0x1, %rsi
je 0x2a177
movl %ecx, %edx
andl $-0x20, %edx
cmpl $0xc0, %edx
jne 0x2a177
movzbl 0x1(%rdi), %edx
movl %edx, %r8d
andl $-0x40, %r8d
cmpl $0x80, %r8d
jne 0x2a177
andl $0x1f, %ecx
shll $0x6, %ecx
andl $0x3f, %edx
orl %ecx, %edx
movl %edx, (%rax)
addq $0x4, %rax
addq $0x2, %rdi
addq $-0x2, %rsi
jmp 0x2a0d1
cmpq $0x3, %rsi
jb 0x2a1dc
movl %ecx, %edx
andl $-0x10, %edx
cmpl $0xe0, %edx
jne 0x2a1dc
movzbl 0x1(%rdi), %edx
movl %edx, %r8d
andl $-0x40, %r8d
cmpl $0x80, %r8d
jne 0x2a1dc
movzbl 0x2(%rdi), %r8d
movl %r8d, %r9d
andl $-0x40, %r9d
cmpl $0x80, %r9d
jne 0x2a1dc
shll $0xc, %ecx
movzwl %cx, %ecx
andl $0x3f, %edx
shll $0x6, %edx
orl %ecx, %edx
andl $0x3f, %r8d
orl %edx, %r8d
movl %r8d, (%rax)
addq $0x4, %rax
addq $0x3, %rdi
addq $-0x3, %rsi
jmp 0x2a0d1
cmpq $0x4, %rsi
jb 0x2a261
movl %ecx, %edx
andl $-0x8, %edx
cmpl $0xf0, %edx
jne 0x2a261
movzbl 0x1(%rdi), %edx
movl %edx, %r8d
andl $-0x40, %r8d
cmpl $0x80, %r8d
jne 0x2a261
movzbl 0x2(%rdi), %r8d
movl %r8d, %r9d
andl $-0x40, %r9d
cmpl $0x80, %r9d
jne 0x2a261
movzbl 0x3(%rdi), %r9d
movl %r9d, %r10d
andl $-0x40, %r10d
cmpl $0x80, %r10d
jne 0x2a261
andl $0x7, %ecx
shll $0x12, %ecx
andl $0x3f, %edx
shll $0xc, %edx
orl %ecx, %edx
andl $0x3f, %r8d
shll $0x6, %r8d
orl %edx, %r8d
andl $0x3f, %r9d
orl %r8d, %r9d
movl %r9d, (%rax)
addq $0x4, %rax
addq $0x4, %rdi
addq $-0x4, %rsi
jmp 0x2a0d1
incq %rdi
decq %rsi
jmp 0x2a0d1
retq