// File: thierry7100[P]CutOptim/include/nanosvg.h
// Function: nsvg__parseElement(char*, void (*)(void*, char const*, char const**), void (*)(void*, char const*), void*)
static void nsvg__parseElement(char* s,
							   void (*startelCb)(void* ud, const char* el, const char** attr),
							   void (*endelCb)(void* ud, const char* el),
							   void* ud)
{
	const char* attr[NSVG_XML_MAX_ATTRIBS];
	int nattr = 0;
	char* name;
	int start = 0;
	int end = 0;
	char quote;

	// Skip white space after the '<'
	while (*s && nsvg__isspace(*s)) s++;

	// Check if the tag is end tag
	if (*s == '/') {
		s++;
		end = 1;
	} else {
		start = 1;
	}

	// Skip comments, data and preprocessor stuff.
	if (!*s || *s == '?' || *s == '!')
		return;

	// Get tag name
	name = s;
	while (*s && !nsvg__isspace(*s)) s++;
	if (*s) { *s++ = '\0'; }

	// Get attribs
	while (!end && *s && nattr < NSVG_XML_MAX_ATTRIBS-3) {
		char* name = NULL;
		char* value = NULL;

		// Skip white space before the attrib name
		while (*s && nsvg__isspace(*s)) s++;
		if (!*s) break;
		if (*s == '/') {
			end = 1;
			break;
		}
		name = s;
		// Find end of the attrib name.
		while (*s && !nsvg__isspace(*s) && *s != '=') s++;
		if (*s) { *s++ = '\0'; }
		// Skip until the beginning of the value.
		while (*s && *s != '\"' && *s != '\'') s++;
		if (!*s) break;
		quote = *s;
		s++;
		// Store value and find the end of it.
		value = s;
		while (*s && *s != quote) s++;
		if (*s) { *s++ = '\0'; }

		// Store only well formed attributes
		if (name && value) {
			attr[nattr++] = name;
			attr[nattr++] = value;
		}
	}

	// List terminator
	attr[nattr++] = 0;
	attr[nattr++] = 0;

	// Call callbacks.
	if (start && startelCb)
		(*startelCb)(ud, name, attr);
	if (end && endelCb)
		(*endelCb)(ud, name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x860, %rsp            # imm = 0x860
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x824(%rbp)
movl $0x0, -0x834(%rbp)
movl $0x0, -0x838(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x851(%rbp)
je 0x68342
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x76fd0
cmpl $0x0, %eax
setne %al
movb %al, -0x851(%rbp)
movb -0x851(%rbp), %al
testb $0x1, %al
jne 0x6834e
jmp 0x6835c
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x68319
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x68380
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x838(%rbp)
jmp 0x6838a
movl $0x1, -0x834(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0x683ab
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3f, %eax
je 0x683ab
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x21, %eax
jne 0x683b0
jmp 0x6872a
movq -0x8(%rbp), %rax
movq %rax, -0x830(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x852(%rbp)
je 0x683e6
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x76fd0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x852(%rbp)
movb -0x852(%rbp), %al
testb $0x1, %al
jne 0x683f2
jmp 0x68400
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x683bb
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0x6841b
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x0, (%rax)
jmp 0x6841d
xorl %eax, %eax
cmpl $0x0, -0x838(%rbp)
movb %al, -0x853(%rbp)
jne 0x68452
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x853(%rbp)
je 0x68452
cmpl $0xfd, -0x824(%rbp)
setl %al
movb %al, -0x853(%rbp)
movb -0x853(%rbp), %al
testb $0x1, %al
jne 0x68461
jmp 0x686a3
movq $0x0, -0x848(%rbp)
movq $0x0, -0x850(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x854(%rbp)
je 0x684a0
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x76fd0
cmpl $0x0, %eax
setne %al
movb %al, -0x854(%rbp)
movb -0x854(%rbp), %al
testb $0x1, %al
jne 0x684ac
jmp 0x684ba
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x68477
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x684c8
jmp 0x686a3
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x684e3
movl $0x1, -0x838(%rbp)
jmp 0x686a3
movq -0x8(%rbp), %rax
movq %rax, -0x848(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x855(%rbp)
je 0x6852d
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x76fd0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x855(%rbp)
jne 0x6852d
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
setne %al
movb %al, -0x855(%rbp)
movb -0x855(%rbp), %al
testb $0x1, %al
jne 0x68539
jmp 0x68547
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x684ee
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0x68562
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x0, (%rax)
jmp 0x68564
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x856(%rbp)
je 0x6859c
movq -0x8(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x22, %ecx
movb %al, -0x856(%rbp)
je 0x6859c
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
setne %al
movb %al, -0x856(%rbp)
movb -0x856(%rbp), %al
testb $0x1, %al
jne 0x685a8
jmp 0x685b6
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x68564
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x685c4
jmp 0x686a3
movq -0x8(%rbp), %rax
movb (%rax), %al
movb %al, -0x839(%rbp)
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x850(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x857(%rbp)
je 0x68611
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x839(%rbp), %ecx
cmpl %ecx, %eax
setne %al
movb %al, -0x857(%rbp)
movb -0x857(%rbp), %al
testb $0x1, %al
jne 0x6861d
jmp 0x6862b
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x685e7
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0x68646
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x0, (%rax)
cmpq $0x0, -0x848(%rbp)
je 0x6869e
cmpq $0x0, -0x850(%rbp)
je 0x6869e
movq -0x848(%rbp), %rcx
movl -0x824(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x824(%rbp)
cltq
movq %rcx, -0x820(%rbp,%rax,8)
movq -0x850(%rbp), %rcx
movl -0x824(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x824(%rbp)
cltq
movq %rcx, -0x820(%rbp,%rax,8)
jmp 0x6841d
movl -0x824(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x824(%rbp)
cltq
movq $0x0, -0x820(%rbp,%rax,8)
movl -0x824(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x824(%rbp)
cltq
movq $0x0, -0x820(%rbp,%rax,8)
cmpl $0x0, -0x834(%rbp)
je 0x68709
cmpq $0x0, -0x10(%rbp)
je 0x68709
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rdi
movq -0x830(%rbp), %rsi
leaq -0x820(%rbp), %rdx
callq *%rax
cmpl $0x0, -0x838(%rbp)
je 0x6872a
cmpq $0x0, -0x18(%rbp)
je 0x6872a
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rdi
movq -0x830(%rbp), %rsi
callq *%rax
addq $0x860, %rsp            # imm = 0x860
popq %rbp
retq
nopw %cs:(%rax,%rax)