// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq (%rsi), %rsi
testq %rsi, %rsi
je 0x39842
movq %rdi, %r14
xorl %r15d, %r15d
leaq 0x787d(%rip), %rbp      # 0x40d55
movq 0x8(%rbx,%r15,8), %rdx
movq %r14, %rdi
callq 0x39851
testl %eax, %eax
je 0x394fc
movq 0x10(%rbx,%r15,8), %rsi
addq $0x2, %r15
testq %rsi, %rsi
jne 0x394d8
jmp 0x39842
movq %r15, %r12
orq $0x1, %r12
movq (%rbx,%r15,8), %r13
movq %r13, %rdi
movq %rbp, %rsi
callq 0x7590
testl %eax, %eax
je 0x3957f
movq %r13, %rdi
leaq 0x79c1(%rip), %rsi      # 0x40ee1
callq 0x7590
testl %eax, %eax
je 0x395a8
movq %r13, %rdi
leaq 0x79c2(%rip), %rsi      # 0x40ef5
callq 0x7590
testl %eax, %eax
je 0x395d2
movq %r13, %rdi
leaq 0x79b3(%rip), %rsi      # 0x40efd
callq 0x7590
testl %eax, %eax
jne 0x394e9
movq (%rbx,%r12,8), %r13
movq %r13, %rdi
leaq 0x77ca(%rip), %rsi      # 0x40d2b
callq 0x7100
testq %rax, %rax
je 0x39638
movl $0x0, 0xd078(%r14)
jmp 0x394e9
movq (%rbx,%r12,8), %rdi
callq 0x3a344
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %r14, %rdi
movl %eax, %esi
callq 0x3ad0d
movq 0xd038(%r14), %rax
movsd %xmm0, (%rax)
jmp 0x394e9
movq (%rbx,%r12,8), %rdi
callq 0x3a344
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %r14, %rdi
movl %eax, %esi
callq 0x3ad0d
movq 0xd038(%r14), %rax
movsd %xmm0, 0x8(%rax)
jmp 0x394e9
movq (%rbx,%r12,8), %rdi
movq %rsp, %r12
movq %r12, %rsi
callq 0x3af17
movq %rax, %r13
movq %r12, %rdi
callq 0x3ab74
movsd %xmm0, 0xd050(%r14)
movb (%r13), %r12b
testb %r12b, %r12b
sete %bpl
je 0x39842
movsbl %r12b, %esi
movl $0x7, %edx
leaq 0x75c1(%rip), %rdi      # 0x40bd7
callq 0x74a0
testq %rax, %rax
jne 0x3962f
cmpb $0x2c, %r12b
je 0x3962f
movzbl %r12b, %eax
cmpl $0x25, %eax
jne 0x39660
movb 0x1(%r13), %r12b
incq %r13
jmp 0x395f9
movq %r13, %rdi
leaq 0x78cf(%rip), %rsi      # 0x40f11
callq 0x7100
testq %rax, %rax
je 0x396d3
movl $0x0, 0xd070(%r14)
jmp 0x39713
testb $0x1, %bpl
jne 0x39842
movq %r13, %rdi
movq %rsp, %r12
movq %r12, %rsi
callq 0x3af17
movq %rax, %r13
movq %r12, %rdi
callq 0x3ab74
movsd %xmm0, 0xd058(%r14)
movb (%r13), %r12b
testb %r12b, %r12b
sete %bpl
je 0x39842
movsbl %r12b, %esi
movl $0x7, %edx
leaq 0x752a(%rip), %rdi      # 0x40bd7
callq 0x74a0
testq %rax, %rax
jne 0x396ca
cmpb $0x2c, %r12b
je 0x396ca
movzbl %r12b, %eax
cmpl $0x25, %eax
jne 0x397a6
movb 0x1(%r13), %r12b
incq %r13
jmp 0x39690
movq %r13, %rdi
leaq 0x7839(%rip), %rsi      # 0x40f16
callq 0x7100
testq %rax, %rax
je 0x396f4
movl $0x1, 0xd070(%r14)
jmp 0x39713
movq %r13, %rdi
leaq 0x781d(%rip), %rsi      # 0x40f1b
callq 0x7100
testq %rax, %rax
je 0x39713
movl $0x2, 0xd070(%r14)
movq %r13, %rdi
leaq 0x7803(%rip), %rsi      # 0x40f20
callq 0x7100
testq %rax, %rax
je 0x39734
movl $0x0, 0xd074(%r14)
jmp 0x39774
movq %r13, %rdi
leaq 0x77e7(%rip), %rsi      # 0x40f25
callq 0x7100
testq %rax, %rax
je 0x39755
movl $0x1, 0xd074(%r14)
jmp 0x39774
movq %r13, %rdi
leaq 0x77cb(%rip), %rsi      # 0x40f2a
callq 0x7100
testq %rax, %rax
je 0x39774
movl $0x2, 0xd074(%r14)
movl $0x1, 0xd078(%r14)
movq %r13, %rdi
leaq 0x77a6(%rip), %rsi      # 0x40f2f
callq 0x7100
cmpq $0x1, %rax
movl $0x2, %eax
sbbl $0x0, %eax
movl %eax, 0xd078(%r14)
jmp 0x394e9
testb $0x1, %bpl
jne 0x39842
movq %r13, %rdi
movq %rsp, %r12
movq %r12, %rsi
callq 0x3af17
movq %rax, %r13
movq %r12, %rdi
callq 0x3ab74
movsd %xmm0, 0xd060(%r14)
movb (%r13), %r12b
testb %r12b, %r12b
sete %bpl
je 0x39842
movsbl %r12b, %esi
movl $0x7, %edx
leaq 0x73e8(%rip), %rdi      # 0x40bd7
callq 0x74a0
testq %rax, %rax
jne 0x39808
cmpb $0x2c, %r12b
je 0x39808
movzbl %r12b, %eax
cmpl $0x25, %eax
jne 0x39811
movb 0x1(%r13), %r12b
incq %r13
jmp 0x397d6
testb $0x1, %bpl
jne 0x39842
movq %r13, %rdi
movq %rsp, %r12
movq %r12, %rsi
callq 0x3af17
movq %r12, %rdi
callq 0x3ab74
movsd %xmm0, 0xd068(%r14)
leaq 0x7518(%rip), %rbp      # 0x40d55
jmp 0x394e9
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq