#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 */
double atan(double);
double atan2(double, double);
double sqrt(double);
int /*<<< orphan*/ swi_cartpol(double *, double *);
void swi_cartpol_sp(double *x, double *l) {
  int i;
  double xx[6], ll[6];
  double rxy, coslon, sinlon, coslat, sinlat;
  if (x[0] == 0 && x[1] == 0 && x[2] == 0) {
    ll[0] = ll[1] = ll[3] = ll[4] = 0;
    ll[5] = sqrt(((x + 3)[0] * (x + 3)[0] + (x + 3)[1] * (x + 3)[1] +
                  (x + 3)[2] * (x + 3)[2]));
    swi_cartpol(x + 3, ll);
    ll[2] = 0;
    for (i = 0; i <= 5; i++)
      l[i] = ll[i];
    return;
  }
  if (x[3] == 0 && x[4] == 0 && x[5] == 0) {
    l[3] = l[4] = l[5] = 0;
    swi_cartpol(x, l);
    return;
  }
  rxy = x[0] * x[0] + x[1] * x[1];
  ll[2] = sqrt(rxy + x[2] * x[2]);
  rxy = sqrt(rxy);
  ll[0] = atan2(x[1], x[0]);
  if (ll[0] < 0.0)
    ll[0] += (2.0 * 3.14159265358979323846);
  ll[1] = atan(x[2] / rxy);
  coslon = x[0] / rxy;
  sinlon = x[1] / rxy;
  coslat = rxy / ll[2];
  sinlat = x[2] / ll[2];
  xx[3] = x[3] * coslon + x[4] * sinlon;
  xx[4] = -x[3] * sinlon + x[4] * coslon;
  l[3] = xx[4] / rxy;
  xx[4] = -sinlat * xx[3] + coslat * x[5];
  xx[5] = coslat * xx[3] + sinlat * x[5];
  l[4] = xx[4] / ll[2];
  l[5] = xx[5];
  l[0] = ll[0];
  l[1] = ll[1];
  l[2] = ll[2];
}


x86 assembly (clang, -O0):
<swi_cartpol_sp>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    126a <swi_cartpol_sp+0x12a>
jp     126a <swi_cartpol_sp+0x12a>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    126a <swi_cartpol_sp+0x12a>
jp     126a <swi_cartpol_sp+0x12a>
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    126a <swi_cartpol_sp+0x12a>
jp     126a <swi_cartpol_sp+0x12a>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x20(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <sqrt@plt>
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x18,%rdi
lea    -0x80(%rbp),%rsi
call   1040 <swi_cartpol@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jg     1265 <swi_cartpol_sp+0x125>
movslq -0x14(%rbp),%rax
movsd  -0x80(%rbp,%rax,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1236 <swi_cartpol_sp+0xf6>
jmp    155b <swi_cartpol_sp+0x41b>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12f4 <swi_cartpol_sp+0x1b4>
jp     12f4 <swi_cartpol_sp+0x1b4>
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12f4 <swi_cartpol_sp+0x1b4>
jp     12f4 <swi_cartpol_sp+0x1b4>
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12f4 <swi_cartpol_sp+0x1b4>
jp     12f4 <swi_cartpol_sp+0x1b4>
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x28(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x20(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <swi_cartpol@plt>
jmp    155b <swi_cartpol_sp+0x41b>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm1
ff
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <sqrt@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
call   1060 <sqrt@plt>
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
call   1030 <atan2@plt>
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x80(%rbp),%xmm0
jbe    13a2 <swi_cartpol_sp+0x262>
movsd  0xc68(%rip),%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
call   1050 <atan@plt>
movsd  %xmm0,-0x78(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  -0x90(%rbp),%xmm2
ff
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
mulsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x98(%rbp),%xmm2
ff
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
mulsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0xa8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mov    -0x8(%rbp),%rax
mulsd  0x28(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x38(%rbp),%xmm2
movsd  -0xa8(%rbp),%xmm1
ff
mov    -0x8(%rbp),%rax
mulsd  0x28(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
divsd  -0x70(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x80(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x78(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x70(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swi_cartpol_sp>:
push   %r15
push   %r14
push   %rbx
sub    $0x50,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  (%rdi),%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm3
jne    11c7 <swi_cartpol_sp+0x87>
jp     11c7 <swi_cartpol_sp+0x87>
movsd  0x8(%rbx),%xmm1
ucomisd %xmm0,%xmm1
jne    11c7 <swi_cartpol_sp+0x87>
jp     11c7 <swi_cartpol_sp+0x87>
movsd  0x10(%rbx),%xmm2
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm2
jne    11c7 <swi_cartpol_sp+0x87>
jp     11c7 <swi_cartpol_sp+0x87>
lea    0x18(%rbx),%r15
xorpd  %xmm0,%xmm0
movapd %xmm0,0x10(%rsp)
movupd %xmm0,0x28(%rsp)
movsd  0x18(%rbx),%xmm2
movsd  0x20(%rbx),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm2,%xmm2
addsd  %xmm0,%xmm2
movsd  0x28(%rbx),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     1372 <swi_cartpol_sp+0x232>
sqrtsd %xmm0,%xmm0
jmp    1377 <swi_cartpol_sp+0x237>
movsd  0x18(%rbx),%xmm1
ucomisd %xmm0,%xmm1
jne    1218 <swi_cartpol_sp+0xd8>
jp     1218 <swi_cartpol_sp+0xd8>
movsd  0x20(%rbx),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    1218 <swi_cartpol_sp+0xd8>
jp     1218 <swi_cartpol_sp+0xd8>
movsd  0x28(%rbx),%xmm1
ucomisd %xmm0,%xmm1
jne    1218 <swi_cartpol_sp+0xd8>
jp     1218 <swi_cartpol_sp+0xd8>
xorpd  %xmm0,%xmm0
movupd %xmm0,0x18(%r14)
movq   $0x0,0x28(%r14)
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x50,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <swi_cartpol@plt>
movsd  0x8(%rbx),%xmm1
movsd  0x10(%rbx),%xmm0
mulsd  %xmm1,%xmm1
mulsd  %xmm3,%xmm3
addsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm0
addsd  %xmm3,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1246 <swi_cartpol_sp+0x106>
sqrtsd %xmm0,%xmm0
jmp    1259 <swi_cartpol_sp+0x119>
movsd  %xmm3,(%rsp)
call   1060 <sqrt@plt>
xorpd  %xmm1,%xmm1
movsd  (%rsp),%xmm3
movsd  %xmm0,0x8(%rsp)
ucomisd %xmm1,%xmm3
jb     126e <swi_cartpol_sp+0x12e>
xorps  %xmm0,%xmm0
sqrtsd %xmm3,%xmm0
jmp    1277 <swi_cartpol_sp+0x137>
movapd %xmm3,%xmm0
call   1060 <sqrt@plt>
movsd  %xmm0,(%rsp)
movsd  (%rbx),%xmm1
movsd  0x8(%rbx),%xmm0
call   1030 <atan2@plt>
movsd  0xd6e(%rip),%xmm1
addsd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm3
cmpltsd %xmm2,%xmm3
andpd  %xmm3,%xmm1
andnpd %xmm0,%xmm3
orpd   %xmm1,%xmm3
movapd %xmm3,0x40(%rsp)
movsd  0x10(%rbx),%xmm0
divsd  (%rsp),%xmm0
call   1050 <atan@plt>
movsd  (%rbx),%xmm2
movsd  0x8(%rbx),%xmm3
movsd  (%rsp),%xmm8
divsd  %xmm8,%xmm2
divsd  %xmm8,%xmm3
movsd  0x10(%rbx),%xmm1
movsd  0x8(%rsp),%xmm7
divsd  %xmm7,%xmm1
movsd  0x18(%rbx),%xmm4
movsd  0x20(%rbx),%xmm5
movapd %xmm3,%xmm6
mulsd  %xmm5,%xmm6
mulsd  %xmm4,%xmm3
mulsd  %xmm2,%xmm4
addsd  %xmm6,%xmm4
mulsd  %xmm5,%xmm2
subsd  %xmm3,%xmm2
movapd %xmm8,%xmm6
divsd  %xmm8,%xmm2
divsd  %xmm7,%xmm6
movsd  %xmm2,0x18(%r14)
movsd  0x28(%rbx),%xmm2
movapd %xmm6,%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm1,%xmm5
mulsd  %xmm4,%xmm5
subsd  %xmm5,%xmm3
mulsd  %xmm2,%xmm1
mulsd  %xmm4,%xmm6
addsd  %xmm1,%xmm6
divsd  %xmm7,%xmm3
movsd  %xmm3,0x20(%r14)
movsd  %xmm6,0x28(%r14)
movaps 0x40(%rsp),%xmm1
movlps %xmm1,(%r14)
movsd  %xmm0,0x8(%r14)
movsd  %xmm7,0x10(%r14)
jmp    13ba <swi_cartpol_sp+0x27a>
call   1060 <sqrt@plt>
movsd  %xmm0,0x38(%rsp)
lea    0x10(%rsp),%rsi
mov    %r15,%rdi
call   1040 <swi_cartpol@plt>
movq   $0x0,0x20(%rsp)
movapd 0x10(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
movupd %xmm0,(%r14)
movups %xmm1,0x20(%r14)
mov    0x20(%rsp),%rax
mov    %rax,0x10(%r14)
mov    0x28(%rsp),%rax
mov    %rax,0x18(%r14)
add    $0x50,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @swi_cartpol_sp(double* %0, double* %1) {
%3 = bitcast double* %1 to i8*
%4 = alloca [6 x double]
%5 = bitcast [6 x double]* %4 to i8*
%6 = load double, double* %0
%7 = fcmp oeq double %6, 0.000000e+00
br i1 %7, label %8, label %34
8: ; preds = %2
%9 = getelementptr inbounds double, double* %0, i64 1
%10 = load double, double* %9
%11 = fcmp oeq double %10, 0.000000e+00
br i1 %11, label %12, label %34
12: ; preds = %8
%13 = getelementptr inbounds double, double* %0, i64 2
%14 = load double, double* %13
%15 = fcmp oeq double %14, 0.000000e+00
br i1 %15, label %16, label %34
16: ; preds = %12
%17 = getelementptr inbounds [6 x double], [6 x double]* %4, i64 0, i64 3
%18 = getelementptr inbounds [6 x double], [6 x double]* %4, i64 0, i64 0
%19 = getelementptr inbounds double, double* %0, i64 3
%20 = bitcast [6 x double]* %4 to i8*
%21 = bitcast double* %17 to i8*
%22 = load double, double* %19
%23 = getelementptr inbounds double, double* %0, i64 4
%24 = load double, double* %23
%25 = fmul double %24, %24
%26 = tail call double @llvm.fmuladd.f64(double %22, double %22, double %25)
%27 = getelementptr inbounds double, double* %0, i64 5
%28 = load double, double* %27
%29 = tail call double @llvm.fmuladd.f64(double %28, double %28, double %26)
%30 = tail call double @sqrt(double %29)
%31 = getelementptr inbounds [6 x double], [6 x double]* %4, i64 0, i64 5
store double %30, double* %31
%32 = call i32 @swi_cartpol(double* %19, double* %18)
%33 = getelementptr inbounds [6 x double], [6 x double]* %4, i64 0, i64 2
store double 0.000000e+00, double* %33
br label %98
34: ; preds = %12, %8, %2
%35 = getelementptr inbounds double, double* %0, i64 3
%36 = load double, double* %35
%37 = fcmp oeq double %36, 0.000000e+00
br i1 %37, label %38, label %50
38: ; preds = %34
%39 = getelementptr inbounds double, double* %0, i64 4
%40 = load double, double* %39
%41 = fcmp oeq double %40, 0.000000e+00
br i1 %41, label %42, label %50
42: ; preds = %38
%43 = getelementptr inbounds double, double* %0, i64 5
%44 = load double, double* %43
%45 = fcmp oeq double %44, 0.000000e+00
br i1 %45, label %46, label %50
46: ; preds = %42
%47 = getelementptr inbounds double, double* %1, i64 3
%48 = bitcast double* %47 to i8*
%49 = tail call i32 @swi_cartpol(double* %0, double* %1)
br label %98
50: ; preds = %42, %38, %34
%51 = getelementptr inbounds double, double* %0, i64 1
%52 = load double, double* %51
%53 = fmul double %52, %52
%54 = tail call double @llvm.fmuladd.f64(double %6, double %6, double %53)
%55 = getelementptr inbounds double, double* %0, i64 2
%56 = load double, double* %55
%57 = tail call double @llvm.fmuladd.f64(double %56, double %56, double %54)
%58 = tail call double @sqrt(double %57)
%59 = tail call double @sqrt(double %54)
%60 = load double, double* %51
%61 = load double, double* %0
%62 = tail call double @atan2(double %60, double %61)
%63 = fcmp olt double %62, 0.000000e+00
%64 = fadd double %62, 0x401921FB54442D18
%65 = select i1 %63, double %64, double %62
%66 = load double, double* %55
%67 = fdiv double %66, %59
%68 = tail call double @atan(double %67)
%69 = load double, double* %0
%70 = fdiv double %69, %59
%71 = load double, double* %51
%72 = fdiv double %71, %59
%73 = fdiv double %59, %58
%74 = load double, double* %55
%75 = fdiv double %74, %58
%76 = load double, double* %35
%77 = getelementptr inbounds double, double* %0, i64 4
%78 = load double, double* %77
%79 = fmul double %72, %78
%80 = tail call double @llvm.fmuladd.f64(double %76, double %70, double %79)
%81 = fneg double %76
%82 = fmul double %70, %78
%83 = tail call double @llvm.fmuladd.f64(double %81, double %72, double %82)
%84 = fdiv double %83, %59
%85 = getelementptr inbounds double, double* %1, i64 3
store double %84, double* %85
%86 = fneg double %75
%87 = getelementptr inbounds double, double* %0, i64 5
%88 = load double, double* %87
%89 = fmul double %73, %88
%90 = tail call double @llvm.fmuladd.f64(double %86, double %80, double %89)
%91 = fmul double %75, %88
%92 = tail call double @llvm.fmuladd.f64(double %73, double %80, double %91)
%93 = fdiv double %90, %58
%94 = getelementptr inbounds double, double* %1, i64 4
store double %93, double* %94
%95 = getelementptr inbounds double, double* %1, i64 5
store double %92, double* %95
store double %65, double* %1
%96 = getelementptr inbounds double, double* %1, i64 1
store double %68, double* %96
%97 = getelementptr inbounds double, double* %1, i64 2
store double %58, double* %97
br label %98
98: ; preds = %16, %50, %46
ret void
}