// File: thierry7100[P]CutOptim/include/nanosvg.h
// Function: nsvg__parseSVG(NSVGparser*, char const**)
static void nsvg__parseSVG(NSVGparser* p, const char** attr)
{
	int i;
	for (i = 0; attr[i]; i += 2) {
		if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
			if (strcmp(attr[i], "width") == 0) {
				p->image->width = nsvg__parseCoordinate(p, attr[i + 1], 0.0, 0.0);
			} else if (strcmp(attr[i], "height") == 0) {
				p->image->height = nsvg__parseCoordinate(p, attr[i + 1], 0.0, 0.0);
			} else if (strcmp(attr[i], "viewBox") == 0) {
				const char *s = attr[i + 1];
				char buf[64];
				s = nsvg__parseNumber(s, buf, 64);
				p->viewMinx = nsvg__atof(buf);
				while (*s && (nsvg__isspace(*s) || *s == '%' || *s == ',')) s++;
				if (!*s) return;
				s = nsvg__parseNumber(s, buf, 64);
				p->viewMiny = nsvg__atof(buf);
				while (*s && (nsvg__isspace(*s) || *s == '%' || *s == ',')) s++;
				if (!*s) return;
				s = nsvg__parseNumber(s, buf, 64);
				p->viewWidth = nsvg__atof(buf);
				while (*s && (nsvg__isspace(*s) || *s == '%' || *s == ',')) s++;
				if (!*s) return;
				s = nsvg__parseNumber(s, buf, 64);
				p->viewHeight = nsvg__atof(buf);
			} else if (strcmp(attr[i], "preserveAspectRatio") == 0) {
				if (strstr(attr[i + 1], "none") != 0) {
					// No uniform scaling
					p->alignType = NSVG_ALIGN_NONE;
				} else {
					// Parse X align
					if (strstr(attr[i + 1], "xMin") != 0)
						p->alignX = NSVG_ALIGN_MIN;
					else if (strstr(attr[i + 1], "xMid") != 0)
						p->alignX = NSVG_ALIGN_MID;
					else if (strstr(attr[i + 1], "xMax") != 0)
						p->alignX = NSVG_ALIGN_MAX;
					// Parse X align
					if (strstr(attr[i + 1], "yMin") != 0)
						p->alignY = NSVG_ALIGN_MIN;
					else if (strstr(attr[i + 1], "yMid") != 0)
						p->alignY = NSVG_ALIGN_MID;
					else if (strstr(attr[i + 1], "yMax") != 0)
						p->alignY = NSVG_ALIGN_MAX;
					// Parse meet/slice
					p->alignType = NSVG_ALIGN_MEET;
					if (strstr(attr[i + 1], "slice") != 0)
						p->alignType = NSVG_ALIGN_SLICE;
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x79b51
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
callq 0x79b90
cmpl $0x0, %eax
jne 0x79b41
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc757(%rip), %rsi      # 0x85df3
callq 0x9770
cmpl $0x0, %eax
jne 0x796da
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x7a650
movq -0x8(%rbp), %rax
movq 0xd038(%rax), %rax
movsd %xmm0, (%rax)
jmp 0x79b3f
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc892(%rip), %rsi      # 0x85f7f
callq 0x9770
cmpl $0x0, %eax
jne 0x7972c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x7a650
movq -0x8(%rbp), %rax
movq 0xd038(%rax), %rax
movsd %xmm0, 0x8(%rax)
jmp 0x79b3d
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc854(%rip), %rsi      # 0x85f93
callq 0x9770
cmpl $0x0, %eax
jne 0x79969
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x40, %edx
callq 0x7bab0
movq %rax, -0x20(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x7aed0
movq -0x8(%rbp), %rax
movsd %xmm0, 0xd050(%rax)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x61(%rbp)
je 0x797da
movq -0x20(%rbp), %rax
movsbl (%rax), %edi
callq 0x76fd0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x62(%rbp)
jne 0x797d4
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x25, %ecx
movb %al, -0x62(%rbp)
je 0x797d4
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
sete %al
movb %al, -0x62(%rbp)
movb -0x62(%rbp), %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x797e3
jmp 0x797f1
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x7978d
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x797ff
jmp 0x79b51
movq -0x20(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x40, %edx
callq 0x7bab0
movq %rax, -0x20(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x7aed0
movq -0x8(%rbp), %rax
movsd %xmm0, 0xd058(%rax)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x63(%rbp)
je 0x79877
movq -0x20(%rbp), %rax
movsbl (%rax), %edi
callq 0x76fd0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x64(%rbp)
jne 0x79871
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x25, %ecx
movb %al, -0x64(%rbp)
je 0x79871
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
sete %al
movb %al, -0x64(%rbp)
movb -0x64(%rbp), %al
movb %al, -0x63(%rbp)
movb -0x63(%rbp), %al
testb $0x1, %al
jne 0x79880
jmp 0x7988e
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x7982a
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x7989c
jmp 0x79b51
movq -0x20(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x40, %edx
callq 0x7bab0
movq %rax, -0x20(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x7aed0
movq -0x8(%rbp), %rax
movsd %xmm0, 0xd060(%rax)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x65(%rbp)
je 0x79914
movq -0x20(%rbp), %rax
movsbl (%rax), %edi
callq 0x76fd0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x66(%rbp)
jne 0x7990e
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x25, %ecx
movb %al, -0x66(%rbp)
je 0x7990e
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
sete %al
movb %al, -0x66(%rbp)
movb -0x66(%rbp), %al
movb %al, -0x65(%rbp)
movb -0x65(%rbp), %al
testb $0x1, %al
jne 0x7991d
jmp 0x7992b
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x798c7
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x79939
jmp 0x79b51
movq -0x20(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x40, %edx
callq 0x7bab0
movq %rax, -0x20(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x7aed0
movq -0x8(%rbp), %rax
movsd %xmm0, 0xd068(%rax)
jmp 0x79b3b
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc61f(%rip), %rsi      # 0x85f9b
callq 0x9770
cmpl $0x0, %eax
jne 0x79b39
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc427(%rip), %rsi      # 0x85dc9
callq 0x9130
cmpq $0x0, %rax
je 0x799c0
movq -0x8(%rbp), %rax
movl $0x0, 0xd078(%rax)
jmp 0x79b37
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc5d7(%rip), %rsi      # 0x85faf
callq 0x9130
cmpq $0x0, %rax
je 0x799f3
movq -0x8(%rbp), %rax
movl $0x0, 0xd070(%rax)
jmp 0x79a5b
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc5a9(%rip), %rsi      # 0x85fb4
callq 0x9130
cmpq $0x0, %rax
je 0x79a26
movq -0x8(%rbp), %rax
movl $0x1, 0xd070(%rax)
jmp 0x79a59
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc57b(%rip), %rsi      # 0x85fb9
callq 0x9130
cmpq $0x0, %rax
je 0x79a57
movq -0x8(%rbp), %rax
movl $0x2, 0xd070(%rax)
jmp 0x79a59
jmp 0x79a5b
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc54b(%rip), %rsi      # 0x85fbe
callq 0x9130
cmpq $0x0, %rax
je 0x79a8e
movq -0x8(%rbp), %rax
movl $0x0, 0xd074(%rax)
jmp 0x79af6
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc51d(%rip), %rsi      # 0x85fc3
callq 0x9130
cmpq $0x0, %rax
je 0x79ac1
movq -0x8(%rbp), %rax
movl $0x1, 0xd074(%rax)
jmp 0x79af4
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc4ef(%rip), %rsi      # 0x85fc8
callq 0x9130
cmpq $0x0, %rax
je 0x79af2
movq -0x8(%rbp), %rax
movl $0x2, 0xd074(%rax)
jmp 0x79af4
jmp 0x79af6
movq -0x8(%rbp), %rax
movl $0x1, 0xd078(%rax)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc4b1(%rip), %rsi      # 0x85fcd
callq 0x9130
cmpq $0x0, %rax
je 0x79b35
movq -0x8(%rbp), %rax
movl $0x2, 0xd078(%rax)
jmp 0x79b37
jmp 0x79b39
jmp 0x79b3b
jmp 0x79b3d
jmp 0x79b3f
jmp 0x79b41
jmp 0x79b43
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0x79647
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)