#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int fabs(double);
double nsvg__evalBezier(double, float, float, float, float);
float nsvg__maxf(float, float);
float nsvg__minf(float, float);
scalar_t__ nsvg__ptInBounds(float *, float *);
double sqrt(double);
void nsvg__curveBounds(float *bounds, float *curve) {
  int i, j, count;
  double roots[2], a, b, c, b2ac, t, v;
  float *v0 = &curve[0];
  float *v1 = &curve[2];
  float *v2 = &curve[4];
  float *v3 = &curve[6];
  bounds[0] = nsvg__minf(v0[0], v3[0]);
  bounds[1] = nsvg__minf(v0[1], v3[1]);
  bounds[2] = nsvg__maxf(v0[0], v3[0]);
  bounds[3] = nsvg__maxf(v0[1], v3[1]);
  if (nsvg__ptInBounds(v1, bounds) && nsvg__ptInBounds(v2, bounds))
    return;
  for (i = 0; i < 2; i++) {
    a = -3.0 * v0[i] + 9.0 * v1[i] - 9.0 * v2[i] + 3.0 * v3[i];
    b = 6.0 * v0[i] - 12.0 * v1[i] + 6.0 * v2[i];
    c = 3.0 * v1[i] - 3.0 * v0[i];
    count = 0;
    if (fabs(a) < (1e-12)) {
      if (fabs(b) > (1e-12)) {
        t = -c / b;
        if (t > (1e-12) && t < 1.0 - (1e-12))
          roots[count++] = t;
      }
    } else {
      b2ac = b * b - 4.0 * c * a;
      if (b2ac > (1e-12)) {
        t = (-b + sqrt(b2ac)) / (2.0 * a);
        if (t > (1e-12) && t < 1.0 - (1e-12))
          roots[count++] = t;
        t = (-b - sqrt(b2ac)) / (2.0 * a);
        if (t > (1e-12) && t < 1.0 - (1e-12))
          roots[count++] = t;
      }
    }
    for (j = 0; j < count; j++) {
      v = nsvg__evalBezier(roots[j], v0[i], v1[i], v2[i], v3[i]);
      bounds[0 + i] = nsvg__minf(bounds[0 + i], (float)v);
      bounds[2 + i] = nsvg__maxf(bounds[2 + i], (float)v);
    }
  }
}


x86 assembly (clang, -O0):
<nsvg__curveBounds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x70(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x78(%rbp)
mov    -0x10(%rbp),%rax
add    $0x18,%rax
mov    %rax,-0x80(%rbp)
mov    -0x68(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x80(%rbp),%rax
movss  (%rax),%xmm1
call   1060 <nsvg__minf@plt>
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x68(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x80(%rbp),%rax
movss  0x4(%rax),%xmm1
call   1060 <nsvg__minf@plt>
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x68(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x80(%rbp),%rax
movss  (%rax),%xmm1
call   1080 <nsvg__maxf@plt>
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x68(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x80(%rbp),%rax
movss  0x4(%rax),%xmm1
call   1080 <nsvg__maxf@plt>
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
mov    -0x70(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <nsvg__ptInBounds@plt>
cmp    $0x0,%rax
je     124d <nsvg__curveBounds+0xed>
mov    -0x78(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <nsvg__ptInBounds@plt>
cmp    $0x0,%rax
je     124d <nsvg__curveBounds+0xed>
jmp    16dc <nsvg__curveBounds+0x57c>
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    16dc <nsvg__curveBounds+0x57c>
mov    -0x68(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x70(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xda8(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xd94(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x78(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xd6b(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x80(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd32(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x68(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm1
mov    -0x70(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xd0b(%rip),%xmm0
mulsd  %xmm2,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xce0(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x78(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xcbf(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x70(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x68(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xc80(%rip),%xmm1
mulsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xc5d(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0x1c(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1040 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xc2b(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1471 <nsvg__curveBounds+0x311>
movsd  -0x40(%rbp),%xmm0
call   1040 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xc0b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    146c <nsvg__curveBounds+0x30c>
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xbce(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1467 <nsvg__curveBounds+0x307>
movsd  0xc04(%rip),%xmm0
ucomisd -0x58(%rbp),%xmm0
jbe    1467 <nsvg__curveBounds+0x307>
movsd  -0x58(%rbp),%xmm0
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
cltq
movsd  %xmm0,-0x30(%rbp,%rax,8)
jmp    146c <nsvg__curveBounds+0x30c>
jmp    15fc <nsvg__curveBounds+0x49c>
movsd  -0x40(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  0xbb5(%rip),%xmm1
mulsd  -0x48(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0xb42(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    15f7 <nsvg__curveBounds+0x497>
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
call   1070 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  0xb33(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xad8(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    155d <nsvg__curveBounds+0x3fd>
movsd  0xb0e(%rip),%xmm0
ucomisd -0x58(%rbp),%xmm0
jbe    155d <nsvg__curveBounds+0x3fd>
movsd  -0x58(%rbp),%xmm0
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
cltq
movsd  %xmm0,-0x30(%rbp,%rax,8)
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
call   1070 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  0xa9e(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xa43(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    15f2 <nsvg__curveBounds+0x492>
movsd  0xa79(%rip),%xmm0
ucomisd -0x58(%rbp),%xmm0
jbe    15f2 <nsvg__curveBounds+0x492>
movsd  -0x58(%rbp),%xmm0
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
cltq
movsd  %xmm0,-0x30(%rbp,%rax,8)
jmp    15f7 <nsvg__curveBounds+0x497>
jmp    15fc <nsvg__curveBounds+0x49c>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    16c9 <nsvg__curveBounds+0x569>
movslq -0x18(%rbp),%rax
movsd  -0x30(%rbp,%rax,8),%xmm0
mov    -0x68(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
mov    -0x70(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
mov    -0x78(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm3
mov    -0x80(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm4
call   1030 <nsvg__evalBezier@plt>
movsd  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
movsd  -0x60(%rbp),%xmm1
cvtsd2ss %xmm1,%xmm1
call   1060 <nsvg__minf@plt>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
movsd  -0x60(%rbp),%xmm1
cvtsd2ss %xmm1,%xmm1
call   1080 <nsvg__maxf@plt>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1603 <nsvg__curveBounds+0x4a3>
jmp    16ce <nsvg__curveBounds+0x56e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1254 <nsvg__curveBounds+0xf4>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsvg__curveBounds>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rsi,%r12
mov    %rdi,%r14
lea    0x8(%rsi),%r15
movss  (%rsi),%xmm0
movss  0x18(%rsi),%xmm1
call   1060 <nsvg__minf@plt>
movss  %xmm0,(%r14)
movss  0x4(%r12),%xmm0
movss  0x1c(%r12),%xmm1
call   1060 <nsvg__minf@plt>
movss  %xmm0,0x4(%r14)
movss  (%r12),%xmm0
movss  0x18(%r12),%xmm1
call   1080 <nsvg__maxf@plt>
movss  %xmm0,0x8(%r14)
movss  0x4(%r12),%xmm0
movss  0x1c(%r12),%xmm1
call   1080 <nsvg__maxf@plt>
movss  %xmm0,0xc(%r14)
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <nsvg__ptInBounds@plt>
test   %rax,%rax
je     1206 <nsvg__curveBounds+0xa6>
lea    0x10(%r12),%rdi
mov    %r14,%rsi
call   1050 <nsvg__ptInBounds@plt>
test   %rax,%rax
je     1206 <nsvg__curveBounds+0xa6>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%bl
xor    %r15d,%r15d
jmp    1222 <nsvg__curveBounds+0xc2>
nopl   (%rax)
mov    $0x1,%r15d
testb  $0x1,0x2c(%rsp)
mov    $0x0,%ebx
je     11f7 <nsvg__curveBounds+0x97>
movss  (%r12,%r15,4),%xmm0
movss  0x8(%r12,%r15,4),%xmm1
xorps  %xmm7,%xmm7
cvtss2sd %xmm0,%xmm7
xorps  %xmm5,%xmm5
cvtss2sd %xmm1,%xmm5
movaps %xmm5,%xmm1
mulsd  0xdb8(%rip),%xmm1
movaps %xmm7,%xmm2
mulsd  0xdb5(%rip),%xmm2
addsd  %xmm2,%xmm1
movss  0x10(%r12,%r15,4),%xmm3
xorps  %xmm6,%xmm6
cvtss2sd %xmm3,%xmm6
movaps %xmm6,%xmm3
mulsd  0xda0(%rip),%xmm3
addsd  %xmm1,%xmm3
movss  0x18(%r12,%r15,4),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  0xd8e(%rip),%xmm4
mulsd  %xmm4,%xmm0
addsd  %xmm3,%xmm0
movaps %xmm5,%xmm1
mulsd  0xd83(%rip),%xmm1
movsd  0xd83(%rip),%xmm3
mulsd  %xmm3,%xmm7
addsd  %xmm1,%xmm7
mulsd  %xmm3,%xmm6
addsd  %xmm7,%xmm6
movapd %xmm6,0x10(%rsp)
mulsd  %xmm4,%xmm5
addsd  %xmm2,%xmm5
movapd %xmm5,0x30(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1040 <fabs@plt>
test   %eax,%eax
mov    %ebx,0x2c(%rsp)
jle    1330 <nsvg__curveBounds+0x1d0>
movapd 0x30(%rsp),%xmm0
mulsd  0xd46(%rip),%xmm0
movsd  0x8(%rsp),%xmm3
mulsd  %xmm3,%xmm0
movapd 0x10(%rsp),%xmm2
movapd %xmm2,%xmm4
mulsd  %xmm2,%xmm4
addsd  %xmm0,%xmm4
ucomisd 0xd2a(%rip),%xmm4
jbe    1210 <nsvg__curveBounds+0xb0>
ucomisd 0xd2c(%rip),%xmm4
jb     138a <nsvg__curveBounds+0x22a>
xorps  %xmm0,%xmm0
sqrtsd %xmm4,%xmm0
jmp    13ab <nsvg__curveBounds+0x24b>
nopw   0x0(%rax,%rax,1)
movaps 0x10(%rsp),%xmm0
call   1040 <fabs@plt>
test   %eax,%eax
movapd 0x10(%rsp),%xmm0
movapd 0x30(%rsp),%xmm1
jle    1210 <nsvg__curveBounds+0xb0>
xorpd  0xcfa(%rip),%xmm1
divsd  %xmm0,%xmm1
ucomisd 0xcd6(%rip),%xmm1
jbe    1210 <nsvg__curveBounds+0xb0>
movsd  0xcd0(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1210 <nsvg__curveBounds+0xb0>
movsd  %xmm1,0x40(%rsp)
mov    $0x1,%ebx
jmp    1459 <nsvg__curveBounds+0x2f9>
movapd %xmm4,%xmm0
movapd %xmm4,0x30(%rsp)
call   1070 <sqrt@plt>
movapd 0x30(%rsp),%xmm4
movsd  0x8(%rsp),%xmm3
movapd 0x10(%rsp),%xmm2
subsd  %xmm2,%xmm0
addsd  %xmm3,%xmm3
divsd  %xmm3,%xmm0
ucomisd 0xc79(%rip),%xmm0
seta   %al
movsd  0xc76(%rip),%xmm1
ucomisd %xmm0,%xmm1
seta   %r13b
and    %al,%r13b
xor    %ebx,%ebx
cmp    $0x1,%r13b
jne    13e8 <nsvg__curveBounds+0x288>
movsd  %xmm0,0x40(%rsp)
mov    $0x1,%ebx
ucomisd 0xc58(%rip),%xmm4
jb     13fb <nsvg__curveBounds+0x29b>
xorps  %xmm0,%xmm0
sqrtsd %xmm4,%xmm0
jmp    1416 <nsvg__curveBounds+0x2b6>
movapd %xmm4,%xmm0
movsd  %xmm3,0x8(%rsp)
call   1070 <sqrt@plt>
movsd  0x8(%rsp),%xmm3
movapd 0x10(%rsp),%xmm2
xorpd  0xc32(%rip),%xmm2
subsd  %xmm0,%xmm2
divsd  %xmm3,%xmm2
ucomisd 0xc0a(%rip),%xmm2
jbe    144b <nsvg__curveBounds+0x2eb>
movsd  0xc08(%rip),%xmm0
ucomisd %xmm2,%xmm0
jbe    144b <nsvg__curveBounds+0x2eb>
mov    %ebx,%eax
add    $0x1,%ebx
movsd  %xmm2,0x40(%rsp,%rax,8)
jmp    1459 <nsvg__curveBounds+0x2f9>
mov    $0x1,%ebx
test   %r13b,%r13b
je     1210 <nsvg__curveBounds+0xb0>
mov    %r15,%rbp
or     $0x2,%rbp
mov    %ebx,%r13d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  0x40(%rsp,%rbx,8),%xmm0
movss  (%r12,%r15,4),%xmm1
movss  0x8(%r12,%r15,4),%xmm2
movss  0x10(%r12,%r15,4),%xmm3
movss  0x18(%r12,%r15,4),%xmm4
call   1030 <nsvg__evalBezier@plt>
movss  (%r14,%r15,4),%xmm2
xorps  %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm1
movss  %xmm1,0x10(%rsp)
movapd %xmm2,%xmm0
call   1060 <nsvg__minf@plt>
movss  %xmm0,(%r14,%r15,4)
movss  (%r14,%rbp,4),%xmm0
movss  0x10(%rsp),%xmm1
call   1080 <nsvg__maxf@plt>
movss  %xmm0,(%r14,%rbp,4)
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1470 <nsvg__curveBounds+0x310>
jmp    1210 <nsvg__curveBounds+0xb0>

LLVM IR (-O0):
define void @nsvg__curveBounds(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [2 x double]
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca float*
%16 = alloca float*
%17 = alloca float*
%18 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%19 = load float*, float** %4
%20 = getelementptr inbounds float, float* %19, i64 0
store float* %20, float** %15
%21 = load float*, float** %4
%22 = getelementptr inbounds float, float* %21, i64 2
store float* %22, float** %16
%23 = load float*, float** %4
%24 = getelementptr inbounds float, float* %23, i64 4
store float* %24, float** %17
%25 = load float*, float** %4
%26 = getelementptr inbounds float, float* %25, i64 6
store float* %26, float** %18
%27 = load float*, float** %15
%28 = getelementptr inbounds float, float* %27, i64 0
%29 = load float, float* %28
%30 = load float*, float** %18
%31 = getelementptr inbounds float, float* %30, i64 0
%32 = load float, float* %31
%33 = call float @nsvg__minf(float %29, float %32)
%34 = load float*, float** %3
%35 = getelementptr inbounds float, float* %34, i64 0
store float %33, float* %35
%36 = load float*, float** %15
%37 = getelementptr inbounds float, float* %36, i64 1
%38 = load float, float* %37
%39 = load float*, float** %18
%40 = getelementptr inbounds float, float* %39, i64 1
%41 = load float, float* %40
%42 = call float @nsvg__minf(float %38, float %41)
%43 = load float*, float** %3
%44 = getelementptr inbounds float, float* %43, i64 1
store float %42, float* %44
%45 = load float*, float** %15
%46 = getelementptr inbounds float, float* %45, i64 0
%47 = load float, float* %46
%48 = load float*, float** %18
%49 = getelementptr inbounds float, float* %48, i64 0
%50 = load float, float* %49
%51 = call float @nsvg__maxf(float %47, float %50)
%52 = load float*, float** %3
%53 = getelementptr inbounds float, float* %52, i64 2
store float %51, float* %53
%54 = load float*, float** %15
%55 = getelementptr inbounds float, float* %54, i64 1
%56 = load float, float* %55
%57 = load float*, float** %18
%58 = getelementptr inbounds float, float* %57, i64 1
%59 = load float, float* %58
%60 = call float @nsvg__maxf(float %56, float %59)
%61 = load float*, float** %3
%62 = getelementptr inbounds float, float* %61, i64 3
store float %60, float* %62
%63 = load float*, float** %16
%64 = load float*, float** %3
%65 = call i64 @nsvg__ptInBounds(float* %63, float* %64)
%66 = icmp ne i64 %65, 0
br i1 %66, label %67, label %73
67: ; preds = %2
%68 = load float*, float** %17
%69 = load float*, float** %3
%70 = call i64 @nsvg__ptInBounds(float* %68, float* %69)
%71 = icmp ne i64 %70, 0
br i1 %71, label %72, label %73
72: ; preds = %67
br label %289
73: ; preds = %67, %2
store i32 0, i32* %5
br label %74
74: ; preds = %286, %73
%75 = load i32, i32* %5
%76 = icmp slt i32 %75, 2
br i1 %76, label %77, label %289
77: ; preds = %74
%78 = load float*, float** %15
%79 = load i32, i32* %5
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds float, float* %78, i64 %80
%82 = load float, float* %81
%83 = fpext float %82 to double
%84 = load float*, float** %16
%85 = load i32, i32* %5
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds float, float* %84, i64 %86
%88 = load float, float* %87
%89 = fpext float %88 to double
%90 = fmul double 9.000000e+00, %89
%91 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %83, double %90)
%92 = load float*, float** %17
%93 = load i32, i32* %5
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds float, float* %92, i64 %94
%96 = load float, float* %95
%97 = fpext float %96 to double
%98 = call double @llvm.fmuladd.f64(double -9.000000e+00, double %97, double %91)
%99 = load float*, float** %18
%100 = load i32, i32* %5
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds float, float* %99, i64 %101
%103 = load float, float* %102
%104 = fpext float %103 to double
%105 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %104, double %98)
store double %105, double* %9
%106 = load float*, float** %15
%107 = load i32, i32* %5
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds float, float* %106, i64 %108
%110 = load float, float* %109
%111 = fpext float %110 to double
%112 = load float*, float** %16
%113 = load i32, i32* %5
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds float, float* %112, i64 %114
%116 = load float, float* %115
%117 = fpext float %116 to double
%118 = fmul double 1.200000e+01, %117
%119 = fneg double %118
%120 = call double @llvm.fmuladd.f64(double 6.000000e+00, double %111, double %119)
%121 = load float*, float** %17
%122 = load i32, i32* %5
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds float, float* %121, i64 %123
%125 = load float, float* %124
%126 = fpext float %125 to double
%127 = call double @llvm.fmuladd.f64(double 6.000000e+00, double %126, double %120)
store double %127, double* %10
%128 = load float*, float** %16
%129 = load i32, i32* %5
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds float, float* %128, i64 %130
%132 = load float, float* %131
%133 = fpext float %132 to double
%134 = load float*, float** %15
%135 = load i32, i32* %5
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds float, float* %134, i64 %136
%138 = load float, float* %137
%139 = fpext float %138 to double
%140 = fmul double 3.000000e+00, %139
%141 = fneg double %140
%142 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %133, double %141)
store double %142, double* %11
store i32 0, i32* %7
%143 = load double, double* %9
%144 = call i32 @fabs(double %143)
%145 = sitofp i32 %144 to double
%146 = fcmp olt double %145, 0x3D719799812DEA11
br i1 %146, label %147, label %170
147: ; preds = %77
%148 = load double, double* %10
%149 = call i32 @fabs(double %148)
%150 = sitofp i32 %149 to double
%151 = fcmp ogt double %150, 0x3D719799812DEA11
br i1 %151, label %152, label %169
152: ; preds = %147
%153 = load double, double* %11
%154 = fneg double %153
%155 = load double, double* %10
%156 = fdiv double %154, %155
store double %156, double* %13
%157 = load double, double* %13
%158 = fcmp ogt double %157, 0x3D719799812DEA11
br i1 %158, label %159, label %168
159: ; preds = %152
%160 = load double, double* %13
%161 = fcmp olt double %160, 0x3FEFFFFFFFFFDCD1
br i1 %161, label %162, label %168
162: ; preds = %159
%163 = load double, double* %13
%164 = load i32, i32* %7
%165 = add nsw i32 %164, 1
store i32 %165, i32* %7
%166 = sext i32 %164 to i64
%167 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 %166
store double %163, double* %167
br label %168
168: ; preds = %162, %159, %152
br label %169
169: ; preds = %168, %147
br label %223
170: ; preds = %77
%171 = load double, double* %10
%172 = load double, double* %10
%173 = load double, double* %11
%174 = fmul double 4.000000e+00, %173
%175 = load double, double* %9
%176 = fmul double %174, %175
%177 = fneg double %176
%178 = call double @llvm.fmuladd.f64(double %171, double %172, double %177)
store double %178, double* %12
%179 = load double, double* %12
%180 = fcmp ogt double %179, 0x3D719799812DEA11
br i1 %180, label %181, label %222
181: ; preds = %170
%182 = load double, double* %10
%183 = fneg double %182
%184 = load double, double* %12
%185 = call double @sqrt(double %184)
%186 = fadd double %183, %185
%187 = load double, double* %9
%188 = fmul double 2.000000e+00, %187
%189 = fdiv double %186, %188
store double %189, double* %13
%190 = load double, double* %13
%191 = fcmp ogt double %190, 0x3D719799812DEA11
br i1 %191, label %192, label %201
192: ; preds = %181
%193 = load double, double* %13
%194 = fcmp olt double %193, 0x3FEFFFFFFFFFDCD1
br i1 %194, label %195, label %201
195: ; preds = %192
%196 = load double, double* %13
%197 = load i32, i32* %7
%198 = add nsw i32 %197, 1
store i32 %198, i32* %7
%199 = sext i32 %197 to i64
%200 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 %199
store double %196, double* %200
br label %201
201: ; preds = %195, %192, %181
%202 = load double, double* %10
%203 = fneg double %202
%204 = load double, double* %12
%205 = call double @sqrt(double %204)
%206 = fsub double %203, %205
%207 = load double, double* %9
%208 = fmul double 2.000000e+00, %207
%209 = fdiv double %206, %208
store double %209, double* %13
%210 = load double, double* %13
%211 = fcmp ogt double %210, 0x3D719799812DEA11
br i1 %211, label %212, label %221
212: ; preds = %201
%213 = load double, double* %13
%214 = fcmp olt double %213, 0x3FEFFFFFFFFFDCD1
br i1 %214, label %215, label %221
215: ; preds = %212
%216 = load double, double* %13
%217 = load i32, i32* %7
%218 = add nsw i32 %217, 1
store i32 %218, i32* %7
%219 = sext i32 %217 to i64
%220 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 %219
store double %216, double* %220
br label %221
221: ; preds = %215, %212, %201
br label %222
222: ; preds = %221, %170
br label %223
223: ; preds = %222, %169
store i32 0, i32* %6
br label %224
224: ; preds = %282, %223
%225 = load i32, i32* %6
%226 = load i32, i32* %7
%227 = icmp slt i32 %225, %226
br i1 %227, label %228, label %285
228: ; preds = %224
%229 = load i32, i32* %6
%230 = sext i32 %229 to i64
%231 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 %230
%232 = load double, double* %231
%233 = load float*, float** %15
%234 = load i32, i32* %5
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds float, float* %233, i64 %235
%237 = load float, float* %236
%238 = load float*, float** %16
%239 = load i32, i32* %5
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds float, float* %238, i64 %240
%242 = load float, float* %241
%243 = load float*, float** %17
%244 = load i32, i32* %5
%245 = sext i32 %244 to i64
%246 = getelementptr inbounds float, float* %243, i64 %245
%247 = load float, float* %246
%248 = load float*, float** %18
%249 = load i32, i32* %5
%250 = sext i32 %249 to i64
%251 = getelementptr inbounds float, float* %248, i64 %250
%252 = load float, float* %251
%253 = call double @nsvg__evalBezier(double %232, float %237, float %242, float %247, float %252)
store double %253, double* %14
%254 = load float*, float** %3
%255 = load i32, i32* %5
%256 = add nsw i32 0, %255
%257 = sext i32 %256 to i64
%258 = getelementptr inbounds float, float* %254, i64 %257
%259 = load float, float* %258
%260 = load double, double* %14
%261 = fptrunc double %260 to float
%262 = call float @nsvg__minf(float %259, float %261)
%263 = load float*, float** %3
%264 = load i32, i32* %5
%265 = add nsw i32 0, %264
%266 = sext i32 %265 to i64
%267 = getelementptr inbounds float, float* %263, i64 %266
store float %262, float* %267
%268 = load float*, float** %3
%269 = load i32, i32* %5
%270 = add nsw i32 2, %269
%271 = sext i32 %270 to i64
%272 = getelementptr inbounds float, float* %268, i64 %271
%273 = load float, float* %272
%274 = load double, double* %14
%275 = fptrunc double %274 to float
%276 = call float @nsvg__maxf(float %273, float %275)
%277 = load float*, float** %3
%278 = load i32, i32* %5
%279 = add nsw i32 2, %278
%280 = sext i32 %279 to i64
%281 = getelementptr inbounds float, float* %277, i64 %280
store float %276, float* %281
br label %282
282: ; preds = %228
%283 = load i32, i32* %6
%284 = add nsw i32 %283, 1
store i32 %284, i32* %6
br label %224
285: ; preds = %224
br label %286
286: ; preds = %285
%287 = load i32, i32* %5
%288 = add nsw i32 %287, 1
store i32 %288, i32* %5
br label %74
289: ; preds = %72, %74
ret void
}

LLVM IR (-O2):
define void @nsvg__curveBounds(float* %0, float* %1) {
%3 = alloca [2 x double]
%4 = bitcast [2 x double]* %3 to i8*
%5 = getelementptr inbounds float, float* %1, i64 2
%6 = getelementptr inbounds float, float* %1, i64 4
%7 = getelementptr inbounds float, float* %1, i64 6
%8 = load float, float* %1
%9 = load float, float* %7
%10 = tail call float @nsvg__minf(float %8, float %9)
store float %10, float* %0
%11 = getelementptr inbounds float, float* %1, i64 1
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %1, i64 7
%14 = load float, float* %13
%15 = tail call float @nsvg__minf(float %12, float %14)
%16 = getelementptr inbounds float, float* %0, i64 1
store float %15, float* %16
%17 = load float, float* %1
%18 = load float, float* %7
%19 = tail call float @nsvg__maxf(float %17, float %18)
%20 = getelementptr inbounds float, float* %0, i64 2
store float %19, float* %20
%21 = load float, float* %11
%22 = load float, float* %13
%23 = tail call float @nsvg__maxf(float %21, float %22)
%24 = getelementptr inbounds float, float* %0, i64 3
store float %23, float* %24
%25 = tail call i64 @nsvg__ptInBounds(float* %5, float* %0)
%26 = icmp eq i64 %25, 0
br i1 %26, label %30, label %27
27: ; preds = %2
%28 = tail call i64 @nsvg__ptInBounds(float* %6, float* %0)
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %119
30: ; preds = %27, %2
%31 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 0
br label %32
32: ; preds = %30, %118
%33 = phi i1 [ true, %30 ], [ false, %118 ]
%34 = phi i64 [ 0, %30 ], [ 1, %118 ]
%35 = getelementptr inbounds float, float* %1, i64 %34
%36 = load float, float* %35
%37 = fpext float %36 to double
%38 = getelementptr inbounds float, float* %5, i64 %34
%39 = load float, float* %38
%40 = fpext float %39 to double
%41 = fmul double %40, 9.000000e+00
%42 = tail call double @llvm.fmuladd.f64(double %37, double -3.000000e+00, double %41)
%43 = getelementptr inbounds float, float* %6, i64 %34
%44 = load float, float* %43
%45 = fpext float %44 to double
%46 = tail call double @llvm.fmuladd.f64(double %45, double -9.000000e+00, double %42)
%47 = getelementptr inbounds float, float* %7, i64 %34
%48 = load float, float* %47
%49 = fpext float %48 to double
%50 = tail call double @llvm.fmuladd.f64(double %49, double 3.000000e+00, double %46)
%51 = fmul double %40, -1.200000e+01
%52 = tail call double @llvm.fmuladd.f64(double %37, double 6.000000e+00, double %51)
%53 = tail call double @llvm.fmuladd.f64(double %45, double 6.000000e+00, double %52)
%54 = fmul double %37, -3.000000e+00
%55 = tail call double @llvm.fmuladd.f64(double %40, double 3.000000e+00, double %54)
%56 = tail call i32 @fabs(double %50)
%57 = icmp slt i32 %56, 1
br i1 %57, label %58, label %68
58: ; preds = %32
%59 = tail call i32 @fabs(double %53)
%60 = icmp sgt i32 %59, 0
br i1 %60, label %61, label %118
61: ; preds = %58
%62 = fneg double %55
%63 = fdiv double %62, %53
%64 = fcmp ogt double %63, 0x3D719799812DEA11
%65 = fcmp olt double %63, 0x3FEFFFFFFFFFDCD1
%66 = and i1 %64, %65
br i1 %66, label %67, label %118
67: ; preds = %61
store double %63, double* %31
br label %96
68: ; preds = %32
%69 = fmul double %55, -4.000000e+00
%70 = fmul double %69, %50
%71 = tail call double @llvm.fmuladd.f64(double %53, double %53, double %70)
%72 = fcmp ogt double %71, 0x3D719799812DEA11
br i1 %72, label %73, label %118
73: ; preds = %68
%74 = fneg double %53
%75 = tail call double @sqrt(double %71)
%76 = fsub double %75, %53
%77 = fmul double %50, 2.000000e+00
%78 = fdiv double %76, %77
%79 = fcmp ogt double %78, 0x3D719799812DEA11
%80 = fcmp olt double %78, 0x3FEFFFFFFFFFDCD1
%81 = and i1 %79, %80
br i1 %81, label %82, label %83
82: ; preds = %73
store double %78, double* %31
br label %83
83: ; preds = %82, %73
%84 = phi i32 [ 1, %82 ], [ 0, %73 ]
%85 = tail call double @sqrt(double %71)
%86 = fsub double %74, %85
%87 = fdiv double %86, %77
%88 = fcmp ogt double %87, 0x3D719799812DEA11
%89 = fcmp olt double %87, 0x3FEFFFFFFFFFDCD1
%90 = and i1 %88, %89
br i1 %90, label %91, label %95
91: ; preds = %83
%92 = add nuw nsw i32 %84, 1
%93 = zext i32 %84 to i64
%94 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 %93
store double %87, double* %94
br label %96
95: ; preds = %83
br i1 %81, label %96, label %118
96: ; preds = %91, %67, %95
%97 = phi i32 [ 1, %95 ], [ %92, %91 ], [ 1, %67 ]
%98 = getelementptr inbounds float, float* %0, i64 %34
%99 = or i64 %34, 2
%100 = getelementptr inbounds float, float* %0, i64 %99
%101 = zext i32 %97 to i64
br label %102
102: ; preds = %96, %102
%103 = phi i64 [ 0, %96 ], [ %116, %102 ]
%104 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 %103
%105 = load double, double* %104
%106 = load float, float* %35
%107 = load float, float* %38
%108 = load float, float* %43
%109 = load float, float* %47
%110 = tail call double @nsvg__evalBezier(double %105, float %106, float %107, float %108, float %109)
%111 = load float, float* %98
%112 = fptrunc double %110 to float
%113 = tail call float @nsvg__minf(float %111, float %112)
store float %113, float* %98
%114 = load float, float* %100
%115 = tail call float @nsvg__maxf(float %114, float %112)
store float %115, float* %100
%116 = add nuw nsw i64 %103, 1
%117 = icmp eq i64 %116, %101
br i1 %117, label %118, label %102
118: ; preds = %102, %68, %58, %61, %95
br i1 %33, label %32, label %119
119: ; preds = %118, %27
ret void
}