// File: thierry7100[P]CutOptim/include/nanosvg.h
// Function: nsvg__parseEllipse(NSVGparser*, char const**)
static void nsvg__parseEllipse(NSVGparser* p, const char** attr)
{
	double cx = 0.0;
	double cy = 0.0;
	double rx = 0.0;
	double ry = 0.0;
	int i;

	for (i = 0; attr[i]; i += 2) {
		if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
			if (strcmp(attr[i], "cx") == 0) cx = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigX(p), nsvg__actualWidth(p));
			if (strcmp(attr[i], "cy") == 0) cy = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigY(p), nsvg__actualHeight(p));
			if (strcmp(attr[i], "rx") == 0) rx = fabs(nsvg__parseCoordinate(p, attr[i+1], 0.0, nsvg__actualWidth(p)));
			if (strcmp(attr[i], "ry") == 0) ry = fabs(nsvg__parseCoordinate(p, attr[i+1], 0.0, nsvg__actualHeight(p)));
		}
	}

	if (rx > 0.0 && ry > 0.0) {

		nsvg__resetPath(p);

		nsvg__moveTo(p, cx+rx, cy);
		nsvg__cubicBezTo(p, cx+rx, cy+ry*NSVG_KAPPA90, cx+rx*NSVG_KAPPA90, cy+ry, cx, cy+ry);
		nsvg__cubicBezTo(p, cx-rx*NSVG_KAPPA90, cy+ry, cx-rx, cy+ry*NSVG_KAPPA90, cx-rx, cy);
		nsvg__cubicBezTo(p, cx-rx, cy-ry*NSVG_KAPPA90, cx-rx*NSVG_KAPPA90, cy-ry, cx, cy-ry);
		nsvg__cubicBezTo(p, cx+rx*NSVG_KAPPA90, cy-ry, cx+rx, cy-ry*NSVG_KAPPA90, cx+rx, cy);

		nsvg__addPath(p, 1);

		nsvg__addShape(p);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x78fe6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
callq 0x79b90
cmpl $0x0, %eax
jne 0x78fd6
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xcf39(%rip), %rsi      # 0x85d78
callq 0x9770
cmpl $0x0, %eax
jne 0x78e97
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7f9f0
movsd %xmm0, -0x40(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7b2c0
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movaps %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
callq 0x7a650
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xced1(%rip), %rsi      # 0x85d7b
callq 0x9770
cmpl $0x0, %eax
jne 0x78f02
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7fa10
movsd %xmm0, -0x58(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7b2e0
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
movaps %xmm0, %xmm1
movsd -0x58(%rbp), %xmm0
callq 0x7a650
movsd %xmm0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xd071(%rip), %rsi      # 0x85f86
callq 0x9770
cmpl $0x0, %eax
jne 0x78f68
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7b2c0
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
callq 0x7a650
movaps 0xb151(%rip), %xmm1     # 0x840b0
pand %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xd00e(%rip), %rsi      # 0x85f89
callq 0x9770
cmpl $0x0, %eax
jne 0x78fd4
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x80(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7b2e0
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
callq 0x7a650
movaps 0xb0e5(%rip), %xmm1     # 0x840b0
pand %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0x78fd6
jmp 0x78fd8
movl -0x34(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x34(%rbp)
jmp 0x78dea
movsd -0x28(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x7921e
movsd -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x7921e
movq -0x8(%rbp), %rdi
callq 0x7c0d0
movq -0x8(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
addsd -0x28(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
callq 0x7dc30
movq -0x8(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
addsd -0x28(%rbp), %xmm0
movsd -0x20(%rbp), %xmm2
movsd -0x30(%rbp), %xmm1
movsd 0xb1bd(%rip), %xmm3     # 0x84208
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
movsd -0x18(%rbp), %xmm3
movsd -0x28(%rbp), %xmm2
movsd 0xb1a3(%rip), %xmm4     # 0x84208
mulsd %xmm4, %xmm2
addsd %xmm3, %xmm2
movsd -0x20(%rbp), %xmm3
addsd -0x30(%rbp), %xmm3
movsd -0x18(%rbp), %xmm4
movsd -0x20(%rbp), %xmm5
addsd -0x30(%rbp), %xmm5
callq 0x7e3a0
movq -0x8(%rbp), %rdi
movsd -0x18(%rbp), %xmm1
movsd -0x28(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0xb150(%rip), %xmm2     # 0x84208
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x20(%rbp), %xmm1
addsd -0x30(%rbp), %xmm1
movsd -0x18(%rbp), %xmm2
subsd -0x28(%rbp), %xmm2
movsd -0x20(%rbp), %xmm4
movsd -0x30(%rbp), %xmm3
movsd 0xb122(%rip), %xmm5     # 0x84208
mulsd %xmm5, %xmm3
addsd %xmm4, %xmm3
movsd -0x18(%rbp), %xmm4
subsd -0x28(%rbp), %xmm4
movsd -0x20(%rbp), %xmm5
callq 0x7e3a0
movq -0x8(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
subsd -0x28(%rbp), %xmm0
movsd -0x20(%rbp), %xmm2
movsd -0x30(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0xb0cf(%rip), %xmm3     # 0x84208
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
movsd -0x18(%rbp), %xmm3
movsd -0x28(%rbp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movsd 0xb09e(%rip), %xmm4     # 0x84208
mulsd %xmm4, %xmm2
addsd %xmm3, %xmm2
movsd -0x20(%rbp), %xmm3
subsd -0x30(%rbp), %xmm3
movsd -0x18(%rbp), %xmm4
movsd -0x20(%rbp), %xmm5
subsd -0x30(%rbp), %xmm5
callq 0x7e3a0
movq -0x8(%rbp), %rdi
movsd -0x18(%rbp), %xmm1
movsd -0x28(%rbp), %xmm0
movsd 0xb062(%rip), %xmm2     # 0x84208
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x20(%rbp), %xmm1
subsd -0x30(%rbp), %xmm1
movsd -0x18(%rbp), %xmm2
addsd -0x28(%rbp), %xmm2
movsd -0x20(%rbp), %xmm4
movsd -0x30(%rbp), %xmm3
movq %xmm3, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm3
movsd 0xb01d(%rip), %xmm5     # 0x84208
mulsd %xmm5, %xmm3
addsd %xmm4, %xmm3
movsd -0x18(%rbp), %xmm4
addsd -0x28(%rbp), %xmm4
movsd -0x20(%rbp), %xmm5
callq 0x7e3a0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x7d6b0
movq -0x8(%rbp), %rdi
callq 0x7dca0
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)