// File: /workspace/github_cpp_makefile_star2_O3/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 0x38abe
movq %rdi, %r14
xorl %r15d, %r15d
leaq 0x74bf(%rip), %rbp      # 0x3fc73
movq 0x8(%rbx,%r15,8), %rdx
movq %r14, %rdi
callq 0x38acd
testl %eax, %eax
je 0x387d8
movq 0x10(%rbx,%r15,8), %rsi
addq $0x2, %r15
testq %rsi, %rsi
jne 0x387b4
jmp 0x38abe
movq %r15, %r12
orq $0x1, %r12
movq (%rbx,%r15,8), %r13
movq %r13, %rdi
leaq 0x75ec(%rip), %rsi      # 0x3fdd9
callq 0x75a0
testl %eax, %eax
je 0x3885f
movq %r13, %rdi
leaq 0x7765(%rip), %rsi      # 0x3ff65
callq 0x75a0
testl %eax, %eax
je 0x38888
movq %r13, %rdi
leaq 0x7760(%rip), %rsi      # 0x3ff73
callq 0x75a0
testl %eax, %eax
je 0x388b2
movq %r13, %rdi
leaq 0x7751(%rip), %rsi      # 0x3ff7b
callq 0x75a0
testl %eax, %eax
jne 0x387c5
movq (%rbx,%r12,8), %r13
movq %r13, %rdi
leaq 0x756e(%rip), %rsi      # 0x3fdaf
callq 0x7100
testq %rax, %rax
je 0x38914
movl $0x0, 0xd078(%r14)
jmp 0x387c5
movq (%rbx,%r12,8), %rdi
callq 0x39560
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %r14, %rdi
movl %eax, %esi
callq 0x39e80
movq 0xd038(%r14), %rax
movsd %xmm0, (%rax)
jmp 0x387c5
movq (%rbx,%r12,8), %rdi
callq 0x39560
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %r14, %rdi
movl %eax, %esi
callq 0x39e80
movq 0xd038(%r14), %rax
movsd %xmm0, 0x8(%rax)
jmp 0x387c5
movq (%rbx,%r12,8), %rdi
movq %rsp, %r12
movq %r12, %rsi
callq 0x3a087
movq %rax, %r13
movq %r12, %rdi
callq 0x39d04
movsd %xmm0, 0xd050(%r14)
movb (%r13), %r12b
testb %r12b, %r12b
je 0x38abe
movsbl %r12b, %esi
movl $0x7, %edx
movq %rbp, %rdi
callq 0x74b0
testq %rax, %rax
jne 0x3890b
cmpb $0x2c, %r12b
je 0x3890b
movzbl %r12b, %eax
cmpl $0x25, %eax
jne 0x389e4
movb 0x1(%r13), %r12b
incq %r13
jmp 0x388d9
movq %r13, %rdi
leaq 0x7671(%rip), %rsi      # 0x3ff8f
callq 0x7100
xorl %ecx, %ecx
testq %rax, %rax
jne 0x3895c
movq %r13, %rdi
leaq 0x7660(%rip), %rsi      # 0x3ff94
callq 0x7100
movl $0x1, %ecx
testq %rax, %rax
jne 0x3895c
movq %r13, %rdi
leaq 0x764c(%rip), %rsi      # 0x3ff99
callq 0x7100
movl $0x2, %ecx
testq %rax, %rax
je 0x38963
movl %ecx, 0xd070(%r14)
movq %r13, %rdi
leaq 0x7631(%rip), %rsi      # 0x3ff9e
callq 0x7100
xorl %ecx, %ecx
testq %rax, %rax
jne 0x389ab
movq %r13, %rdi
leaq 0x7620(%rip), %rsi      # 0x3ffa3
callq 0x7100
movl $0x1, %ecx
testq %rax, %rax
jne 0x389ab
movq %r13, %rdi
leaq 0x760c(%rip), %rsi      # 0x3ffa8
callq 0x7100
movl $0x2, %ecx
testq %rax, %rax
je 0x389b2
movl %ecx, 0xd074(%r14)
movl $0x1, 0xd078(%r14)
movq %r13, %rdi
leaq 0x75e6(%rip), %rsi      # 0x3ffad
callq 0x7100
cmpq $0x1, %rax
movl $0x2, %eax
sbbl $0x0, %eax
movl %eax, 0xd078(%r14)
jmp 0x387c5
movq %r13, %rdi
movq %rsp, %r12
movq %r12, %rsi
callq 0x3a087
movq %rax, %r13
movq %r12, %rdi
callq 0x39d04
movsd %xmm0, 0xd058(%r14)
movb (%r13), %r12b
testb %r12b, %r12b
je 0x38abe
movsbl %r12b, %esi
movl $0x7, %edx
movq %rbp, %rdi
callq 0x74b0
testq %rax, %rax
jne 0x38a38
cmpb $0x2c, %r12b
je 0x38a38
movzbl %r12b, %eax
cmpl $0x25, %eax
jne 0x38a41
movb 0x1(%r13), %r12b
incq %r13
jmp 0x38a0a
movq %r13, %rdi
movq %rsp, %r12
movq %r12, %rsi
callq 0x3a087
movq %rax, %r13
movq %r12, %rdi
callq 0x39d04
movsd %xmm0, 0xd060(%r14)
movb (%r13), %r12b
testb %r12b, %r12b
je 0x38abe
movsbl %r12b, %esi
movl $0x7, %edx
movq %rbp, %rdi
callq 0x74b0
testq %rax, %rax
jne 0x38a91
cmpb $0x2c, %r12b
je 0x38a91
movzbl %r12b, %eax
cmpl $0x25, %eax
jne 0x38a9a
movb 0x1(%r13), %r12b
incq %r13
jmp 0x38a67
movq %r13, %rdi
movq %rsp, %r12
movq %r12, %rsi
callq 0x3a087
movq %r12, %rdi
callq 0x39d04
movsd %xmm0, 0xd068(%r14)
jmp 0x387c5
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq