// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::strconv_comment(char*, char)
PUGI__FN char_t* strconv_comment(char_t* s, char_t endch)
	{
		gap g;

		while (true)
		{
			PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_comment));

			if (*s == '\r') // Either a single 0x0d or 0x0d 0x0a pair
			{
				*s++ = '\n'; // replace first one with 0x0a

				if (*s == '\n') g.push(s, 1);
			}
			else if (s[0] == '-' && s[1] == '-' && PUGI__ENDSWITH(s[2], '>')) // comment ends here
			{
				*g.flush(s) = 0;

				return s + (s[2] == '>' ? 3 : 2);
			}
			else if (*s == 0)
			{
				return 0;
			}
			else ++s;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x54ca0
jmp 0x5640d
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
movl %eax, %ecx
leaq 0x14cad(%rip), %rax     # 0x6b0d0
movzbl (%rax,%rcx), %eax
andl $0x20, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x5643a
jmp 0x5643f
jmp 0x56507
movq -0x10(%rbp), %rax
movb 0x1(%rax), %al
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
movl %eax, %ecx
leaq 0x14c7a(%rip), %rax     # 0x6b0d0
movzbl (%rax,%rcx), %eax
andl $0x20, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x5646d
jmp 0x5647e
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x56507
movq -0x10(%rbp), %rax
movb 0x2(%rax), %al
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
movl %eax, %ecx
leaq 0x14c3b(%rip), %rax     # 0x6b0d0
movzbl (%rax,%rcx), %eax
andl $0x20, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x564ac
jmp 0x564ba
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x10(%rbp)
jmp 0x56507
movq -0x10(%rbp), %rax
movb 0x3(%rax), %al
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
movl %eax, %ecx
leaq 0x14bff(%rip), %rax     # 0x6b0d0
movzbl (%rax,%rcx), %eax
andl $0x20, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x564e8
jmp 0x564f6
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x10(%rbp)
jmp 0x56507
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
jmp 0x5640d
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xd, %eax
jne 0x56548
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0xa, (%rax)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x56543
leaq -0x28(%rbp), %rdi
leaq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x55280
jmp 0x565e2
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x565bc
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2d, %eax
jne 0x565bc
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x3e, %eax
je 0x56584
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
jne 0x565bc
movsbl -0x11(%rbp), %eax
cmpl $0x3e, %eax
jne 0x565bc
movq -0x10(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x54cc0
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movsbl 0x2(%rcx), %esi
movl $0x2, %ecx
movl $0x3, %edx
cmpl $0x3e, %esi
cmovel %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x565e7
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x565d2
movq $0x0, -0x8(%rbp)
jmp 0x565e7
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x565e0
jmp 0x565e2
jmp 0x5640b
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)