// File: /workspace/github_cpp_makefile_star2_O1/thierry7100[P]CutOptim/include/nanosvg.h
// Function: nsvg__parseXML(char*, void (*)(void*, char const*, char const**), void (*)(void*, char const*), void (*)(void*, char const*), void*)
int nsvg__parseXML(char* input,
				   void (*startelCb)(void* ud, const char* el, const char** attr),
				   void (*endelCb)(void* ud, const char* el),
				   void (*contentCb)(void* ud, const char* s),
				   void* ud)
{
	char* s = input;
	char* mark = s;
	int state = NSVG_XML_CONTENT;
	while (*s) {
		if (*s == '<' && state == NSVG_XML_CONTENT) {
			// Start of a tag
			*s++ = '\0';
			nsvg__parseContent(mark, contentCb, ud);
			mark = s;
			state = NSVG_XML_TAG;
		} else if (*s == '>' && state == NSVG_XML_TAG) {
			// Start of a content or new tag.
			*s++ = '\0';
			nsvg__parseElement(mark, startelCb, endelCb, ud);
			mark = s;
			state = NSVG_XML_CONTENT;
		} else {
			s++;
		}
	}

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x838, %rsp            # imm = 0x838
movq %r8, 0x10(%rsp)
movq %rcx, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movb (%rdi), %al
testb %al, %al
je 0x2a966
movq %rdi, %r15
movl $0x2, %ebp
leaq 0x16579(%rip), %r13     # 0x40bd7
movq %rdi, %rbx
cmpb $0x3c, %al
sete %cl
cmpl $0x2, %ebp
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x2a69e
movb $0x0, (%rbx)
movb (%r15), %al
testb %al, %al
je 0x2a6e6
movsbl %al, %esi
movl $0x7, %edx
movq %r13, %rdi
callq 0x74a0
testq %rax, %rax
sete %al
je 0x2a6e8
movb 0x1(%r15), %al
incq %r15
jmp 0x2a679
cmpb $0x3e, %al
sete %al
cmpl $0x1, %ebp
sete %cl
andb %al, %cl
leaq 0x1(%rbx), %r12
cmpb $0x1, %cl
jne 0x2a70d
movb $0x0, (%rbx)
movb (%r15), %bl
testb %bl, %bl
je 0x2a712
movsbl %bl, %esi
movl $0x7, %edx
movq %r13, %rdi
callq 0x74a0
testq %rax, %rax
je 0x2a6de
movb 0x1(%r15), %bl
incq %r15
testb %bl, %bl
jne 0x2a6be
cmpb $0x2f, %bl
setne %dl
jmp 0x2a714
xorl %eax, %eax
incq %rbx
movl $0x1, %ebp
cmpq $0x0, 0x28(%rsp)
je 0x2a708
testb %al, %al
je 0x2a708
movq 0x10(%rsp), %rdi
movq %r15, %rsi
callq *0x28(%rsp)
movq %rbx, %r12
jmp 0x2a73d
movq %r15, %rbx
jmp 0x2a73d
movb $0x1, %dl
xorb $0x1, %dl
movzbl %dl, %ebp
movzbl (%r15,%rbp), %eax
cmpq $0x3f, %rax
ja 0x2a754
movabsq $-0x7ffffffdffffffff, %rcx # imm = 0x8000000200000001
btq %rax, %rcx
jae 0x2a754
movl $0x2, %ebp
movq %r12, %rbx
movb (%r12), %al
movq %rbx, %r15
movq %r12, %rbx
testb %al, %al
jne 0x2a661
jmp 0x2a966
movb %dl, 0x3(%rsp)
leaq (%r15,%rbp), %rbx
movq %rbx, 0x8(%rsp)
testb %al, %al
sete %r14b
je 0x2a7b8
movsbl %al, %esi
movl $0x7, %edx
movq %r13, %rdi
callq 0x74a0
movq 0x8(%rsp), %rbx
testq %rax, %rax
jne 0x2a7ad
leaq (%r15,%rbp), %rbx
incq %rbx
movsbl (%rbx), %esi
testl %esi, %esi
sete %r14b
je 0x2a7b8
movl $0x7, %edx
movq %r13, %rdi
callq 0x74a0
incq %rbx
testq %rax, %rax
je 0x2a78a
decq %rbx
testb %r14b, %r14b
jne 0x2a7b8
movb $0x0, (%rbx)
incq %rbx
movl $0x0, 0x4(%rsp)
testl %ebp, %ebp
jne 0x2a90b
movb (%rbx), %r15b
xorl %ebp, %ebp
testb %r15b, %r15b
je 0x2a910
cmpl $0xfc, 0x4(%rsp)
jg 0x2a910
leaq 0x1(%rbx), %r14
movsbl %r15b, %esi
movl $0x7, %edx
movq %r13, %rdi
callq 0x74a0
testq %rax, %rax
je 0x2a814
movb 0x1(%rbx), %r15b
incq %rbx
incq %r14
testb %r15b, %r15b
jne 0x2a7e8
xorl %ebp, %ebp
jmp 0x2a8db
movzbl %r15b, %ebp
testb %r15b, %r15b
je 0x2a8db
cmpl $0x2f, %ebp
jne 0x2a830
movl $0x1, %ebp
jmp 0x2a8db
movsbl (%rbx), %r15d
movq %rbx, %rcx
testl %r15d, %r15d
sete %bpl
je 0x2a89c
movl $0x7, %edx
movq %r13, %rdi
movl %r15d, %esi
callq 0x74a0
movq %rbx, %rcx
cmpb $0x3d, %r15b
je 0x2a88f
testq %rax, %rax
jne 0x2a88f
movsbl (%r14), %r15d
testl %r15d, %r15d
sete %bpl
je 0x2a899
movl $0x7, %edx
movq %r13, %rdi
movl %r15d, %esi
callq 0x74a0
incq %r14
cmpb $0x3d, %r15b
je 0x2a889
testq %rax, %rax
je 0x2a85e
decq %r14
movq %r14, %rcx
testb %bpl, %bpl
jne 0x2a89c
movb $0x0, (%rcx)
jmp 0x2a8ad
movq %r14, %rcx
movzbl (%rcx), %edx
testl %edx, %edx
je 0x2a8d6
cmpl $0x22, %edx
je 0x2a8b2
cmpl $0x27, %edx
je 0x2a8b2
incq %rcx
jmp 0x2a89c
incq %rcx
movq %rcx, %rax
movb (%rax), %sil
incq %rax
testb %sil, %sil
je 0x2a8c8
cmpb %dl, %sil
jne 0x2a8b8
leaq -0x1(%rax), %rdx
testb %sil, %sil
je 0x2a8e7
movb $0x0, (%rdx)
jmp 0x2a8ea
xorl %ebp, %ebp
movq %rcx, %rbx
xorl %ecx, %ecx
testb %cl, %cl
jne 0x2a7c0
jmp 0x2a910
movq %rdx, %rax
movl 0x4(%rsp), %esi
movslq %esi, %rdx
movq %rbx, 0x30(%rsp,%rdx,8)
movq %rcx, 0x38(%rsp,%rdx,8)
addl $0x2, %esi
movl %esi, 0x4(%rsp)
movb $0x1, %cl
xorl %ebp, %ebp
movq %rax, %rbx
jmp 0x2a8dd
movl $0x1, %ebp
cmpq $0x0, 0x18(%rsp)
sete %al
movslq 0x4(%rsp), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rsp,%rcx,8)
orb 0x3(%rsp), %al
jne 0x2a93f
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq *0x18(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x2a735
testl %ebp, %ebp
je 0x2a735
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq *0x20(%rsp)
jmp 0x2a735
movl $0x1, %eax
addq $0x838, %rsp            # imm = 0x838
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq