// File: thierry7100[P]CutOptim/include/nanosvg.h
// Function: nsvg__startElement(void*, char const*, char const**)
static void nsvg__startElement(void* ud, const char* el, const char** attr)
{
	NSVGparser* p = (NSVGparser*)ud;

	if (p->defsFlag) {
		// Skip everything but gradients in defs
		if (strcmp(el, "linearGradient") == 0) {
			nsvg__parseGradient(p, attr, NSVG_PAINT_LINEAR_GRADIENT);
		} else if (strcmp(el, "radialGradient") == 0) {
			nsvg__parseGradient(p, attr, NSVG_PAINT_RADIAL_GRADIENT);
		} else if (strcmp(el, "stop") == 0) {
			nsvg__parseGradientStop(p, attr);
		}
		return;
	}

	if (strcmp(el, "g") == 0) {
		nsvg__pushAttr(p);
		nsvg__parseAttribs(p, attr);
	} else if (strcmp(el, "path") == 0) {
		if (p->pathFlag)	// Do not allow nested paths.
			return;
		nsvg__pushAttr(p);
		nsvg__parsePath(p, attr);
		nsvg__popAttr(p);
	} else if (strcmp(el, "rect") == 0) {
		nsvg__pushAttr(p);
		nsvg__parseRect(p, attr);
		nsvg__popAttr(p);
	} else if (strcmp(el, "circle") == 0) {
		nsvg__pushAttr(p);
		nsvg__parseCircle(p, attr);
		nsvg__popAttr(p);
	} else if (strcmp(el, "ellipse") == 0) {
		nsvg__pushAttr(p);
		nsvg__parseEllipse(p, attr);
		nsvg__popAttr(p);
	} else if (strcmp(el, "line") == 0)  {
		nsvg__pushAttr(p);
		nsvg__parseLine(p, attr);
		nsvg__popAttr(p);
	} else if (strcmp(el, "polyline") == 0)  {
		nsvg__pushAttr(p);
		nsvg__parsePoly(p, attr, 0);
		nsvg__popAttr(p);
	} else if (strcmp(el, "polygon") == 0)  {
		nsvg__pushAttr(p);
		nsvg__parsePoly(p, attr, 1);
		nsvg__popAttr(p);
	} else  if (strcmp(el, "linearGradient") == 0) {
		nsvg__parseGradient(p, attr, NSVG_PAINT_LINEAR_GRADIENT);
	} else if (strcmp(el, "radialGradient") == 0) {
		nsvg__parseGradient(p, attr, NSVG_PAINT_RADIAL_GRADIENT);
	} else if (strcmp(el, "stop") == 0) {
		nsvg__parseGradientStop(p, attr);
	} else if (strcmp(el, "defs") == 0) {
		p->defsFlag = 1;
	} else if (strcmp(el, "svg") == 0) {
		nsvg__parseSVG(p, attr);
	} else if (strcmp(el, "text") == 0) {
		fprintf(stderr, "Text element in SVG file, please convert it to path !\n");
	} else if (strcmp(el, "image") == 0) {
		fprintf(stderr, "Image in SVG file, please vectorize and convert to path !\n");
	}
#ifdef UNDEF
	else
	{
        fprintf(stderr, "Unprocessed element %s in SVG file\n", el);
	}
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, 0xd089(%rax)
je 0x68a36
movq -0x10(%rbp), %rdi
leaq 0x1d2b8(%rip), %rsi     # 0x85c7c
callq 0x9770
cmpl $0x0, %eax
jne 0x689e2
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x2, %edx
callq 0x77060
jmp 0x68a31
movq -0x10(%rbp), %rdi
leaq 0x1d29e(%rip), %rsi     # 0x85c8b
callq 0x9770
cmpl $0x0, %eax
jne 0x68a0b
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x3, %edx
callq 0x77060
jmp 0x68a2f
movq -0x10(%rbp), %rdi
leaq 0x1d284(%rip), %rsi     # 0x85c9a
callq 0x9770
cmpl $0x0, %eax
jne 0x68a2d
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x77890
jmp 0x68a2f
jmp 0x68a31
jmp 0x68d4e
movq -0x10(%rbp), %rdi
leaq 0x19af9(%rip), %rsi     # 0x8253a
callq 0x9770
cmpl $0x0, %eax
jne 0x68a66
movq -0x20(%rbp), %rdi
callq 0x77af0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x77b70
jmp 0x68d4e
movq -0x10(%rbp), %rdi
leaq 0x1bf37(%rip), %rsi     # 0x849a8
callq 0x9770
cmpl $0x0, %eax
jne 0x68ab1
movq -0x20(%rbp), %rax
cmpb $0x0, 0xd088(%rax)
je 0x68a8d
jmp 0x68d4e
movq -0x20(%rbp), %rdi
callq 0x77af0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x77c10
movq -0x20(%rbp), %rdi
callq 0x78240
jmp 0x68d4c
movq -0x10(%rbp), %rdi
leaq 0x1d1e3(%rip), %rsi     # 0x85c9f
callq 0x9770
cmpl $0x0, %eax
jne 0x68aea
movq -0x20(%rbp), %rdi
callq 0x77af0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78270
movq -0x20(%rbp), %rdi
callq 0x78240
jmp 0x68d4a
movq -0x10(%rbp), %rdi
leaq 0x1d1af(%rip), %rsi     # 0x85ca4
callq 0x9770
cmpl $0x0, %eax
jne 0x68b23
movq -0x20(%rbp), %rdi
callq 0x77af0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x789c0
movq -0x20(%rbp), %rdi
callq 0x78240
jmp 0x68d48
movq -0x10(%rbp), %rdi
leaq 0x1d17d(%rip), %rsi     # 0x85cab
callq 0x9770
cmpl $0x0, %eax
jne 0x68b5c
movq -0x20(%rbp), %rdi
callq 0x77af0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78db0
movq -0x20(%rbp), %rdi
callq 0x78240
jmp 0x68d46
movq -0x10(%rbp), %rdi
leaq 0x1a4d8(%rip), %rsi     # 0x8303f
callq 0x9770
cmpl $0x0, %eax
jne 0x68b95
movq -0x20(%rbp), %rdi
callq 0x77af0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x79230
movq -0x20(%rbp), %rdi
callq 0x78240
jmp 0x68d44
movq -0x10(%rbp), %rdi
leaq 0x1d113(%rip), %rsi     # 0x85cb3
callq 0x9770
cmpl $0x0, %eax
jne 0x68bd0
movq -0x20(%rbp), %rdi
callq 0x77af0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x794d0
movq -0x20(%rbp), %rdi
callq 0x78240
jmp 0x68d42
movq -0x10(%rbp), %rdi
leaq 0x1d0e1(%rip), %rsi     # 0x85cbc
callq 0x9770
cmpl $0x0, %eax
jne 0x68c0e
movq -0x20(%rbp), %rdi
callq 0x77af0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x794d0
movq -0x20(%rbp), %rdi
callq 0x78240
jmp 0x68d40
movq -0x10(%rbp), %rdi
leaq 0x1d063(%rip), %rsi     # 0x85c7c
callq 0x9770
cmpl $0x0, %eax
jne 0x68c3a
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x2, %edx
callq 0x77060
jmp 0x68d3e
movq -0x10(%rbp), %rdi
leaq 0x1d046(%rip), %rsi     # 0x85c8b
callq 0x9770
cmpl $0x0, %eax
jne 0x68c66
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x3, %edx
callq 0x77060
jmp 0x68d3c
movq -0x10(%rbp), %rdi
leaq 0x1d029(%rip), %rsi     # 0x85c9a
callq 0x9770
cmpl $0x0, %eax
jne 0x68c8d
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x77890
jmp 0x68d3a
movq -0x10(%rbp), %rdi
leaq 0x1d02c(%rip), %rsi     # 0x85cc4
callq 0x9770
cmpl $0x0, %eax
jne 0x68cb2
movq -0x20(%rbp), %rax
movb $0x1, 0xd089(%rax)
jmp 0x68d38
movq -0x10(%rbp), %rdi
leaq 0x19626(%rip), %rsi     # 0x822e3
callq 0x9770
cmpl $0x0, %eax
jne 0x68cd6
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x79630
jmp 0x68d36
movq -0x10(%rbp), %rdi
leaq 0x1cfe8(%rip), %rsi     # 0x85cc9
callq 0x9770
cmpl $0x0, %eax
jne 0x68d05
movq 0x4f2ae(%rip), %rax     # 0xb7fa0
movq (%rax), %rdi
leaq 0x1cfd2(%rip), %rsi     # 0x85cce
movb $0x0, %al
callq 0x97c0
jmp 0x68d34
movq -0x10(%rbp), %rdi
leaq 0x1cff5(%rip), %rsi     # 0x85d05
callq 0x9770
cmpl $0x0, %eax
jne 0x68d32
movq 0x4f27f(%rip), %rax     # 0xb7fa0
movq (%rax), %rdi
leaq 0x1cfe0(%rip), %rsi     # 0x85d0b
movb $0x0, %al
callq 0x97c0
jmp 0x68d34
jmp 0x68d36
jmp 0x68d38
jmp 0x68d3a
jmp 0x68d3c
jmp 0x68d3e
jmp 0x68d40
jmp 0x68d42
jmp 0x68d44
jmp 0x68d46
jmp 0x68d48
jmp 0x68d4a
jmp 0x68d4c
jmp 0x68d4e
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)