#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 cos(double const);
int /*<<< orphan*/ matinv(double *, int);
int /*<<< orphan*/ matmul(char *, int, int, int, double, double *, double *,
                          double, double *);
double sin(double const);
double sqrt(double);
extern void dops(int ns, const double *azel, double elmin, double *dop) {
  double H[4 * ((32 - 1 + 1) + 0 + 0 + 0 + 0 + (142 - 120 + 1))], Q[16], cosel,
      sinel;
  int i, n;
  for (i = 0; i < 4; i++)
    dop[i] = 0.0;
  for (i = n = 0;
       i < ns && i < ((32 - 1 + 1) + 0 + 0 + 0 + 0 + (142 - 120 + 1)); i++) {
    if (azel[1 + i * 2] < elmin || azel[1 + i * 2] <= 0.0)
      continue;
    cosel = cos(azel[1 + i * 2]);
    sinel = sin(azel[1 + i * 2]);
    H[4 * n] = cosel * sin(azel[i * 2]);
    H[1 + 4 * n] = cosel * cos(azel[i * 2]);
    H[2 + 4 * n] = sinel;
    H[3 + 4 * n++] = 1.0;
  }
  if (n < 4)
    return;
  matmul("NT", 4, 4, n, 1.0, H, H, 0.0, Q);
  if (!matinv(Q, 4)) {
    dop[0] = ((Q[0] + Q[5] + Q[10] + Q[15]) < 0.0
                  ? 0.0
                  : sqrt(Q[0] + Q[5] + Q[10] + Q[15]));
    dop[1] = ((Q[0] + Q[5] + Q[10]) < 0.0 ? 0.0 : sqrt(Q[0] + Q[5] + Q[10]));
    dop[2] = ((Q[0] + Q[5]) < 0.0 ? 0.0 : sqrt(Q[0] + Q[5]));
    dop[3] = ((Q[10]) < 0.0 ? 0.0 : sqrt(Q[10]));
  }
}


x86 assembly (clang, -O0):
<dops>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7e0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0x0,-0x794(%rbp)
cmpl   $0x4,-0x794(%rbp)
jge    11a9 <dops+0x59>
mov    -0x20(%rbp),%rax
movslq -0x794(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x794(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x794(%rbp)
jmp    1175 <dops+0x25>
movl   $0x0,-0x798(%rbp)
movl   $0x0,-0x794(%rbp)
mov    -0x794(%rbp),%ecx
xor    %eax,%eax
cmp    -0x4(%rbp),%ecx
mov    %al,-0x799(%rbp)
jge    11e4 <dops+0x94>
cmpl   $0x37,-0x794(%rbp)
setl   %al
mov    %al,-0x799(%rbp)
mov    -0x799(%rbp),%al
test   $0x1,%al
jne    11f7 <dops+0xa7>
jmp    1388 <dops+0x238>
mov    -0x10(%rbp),%rax
mov    -0x794(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
ja     123f <dops+0xef>
mov    -0x10(%rbp),%rax
mov    -0x794(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jb     1244 <dops+0xf4>
jmp    1374 <dops+0x224>
mov    -0x10(%rbp),%rax
mov    -0x794(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1050 <cos@plt>
movsd  %xmm0,-0x788(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    -0x794(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x790(%rbp)
ff
movsd  -0x788(%rbp),%xmm0
ff
movsd  %xmm0,-0x7b0(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    -0x794(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x7b0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mov    -0x798(%rbp),%eax
shl    $0x2,%eax
cltq
movsd  %xmm0,-0x700(%rbp,%rax,8)
ff ff
movsd  -0x788(%rbp),%xmm0
ff
movsd  %xmm0,-0x7a8(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    -0x794(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x7a8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mov    -0x798(%rbp),%eax
shl    $0x2,%eax
add    $0x1,%eax
cltq
movsd  %xmm0,-0x700(%rbp,%rax,8)
ff ff
movsd  -0x790(%rbp),%xmm0
ff
mov    -0x798(%rbp),%eax
shl    $0x2,%eax
add    $0x2,%eax
cltq
movsd  %xmm0,-0x700(%rbp,%rax,8)
ff ff
mov    -0x798(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x798(%rbp)
shl    $0x2,%eax
add    $0x3,%eax
cltq
movsd  0xc95(%rip),%xmm0
movsd  %xmm0,-0x700(%rbp,%rax,8)
ff ff
mov    -0x794(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x794(%rbp)
jmp    11bd <dops+0x6d>
cmpl   $0x4,-0x798(%rbp)
jge    139a <dops+0x24a>
jmp    1578 <dops+0x428>
mov    -0x798(%rbp),%ecx
lea    -0x700(%rbp),%r8
lea    -0x700(%rbp),%r9
lea    -0x780(%rbp),%rax
lea    0xc4c(%rip),%rdi
mov    $0x4,%edx
movsd  0xc37(%rip),%xmm0
xorps  %xmm1,%xmm1
mov    %edx,%esi
mov    %rax,(%rsp)
call   1060 <matmul@plt>
lea    -0x780(%rbp),%rdi
mov    $0x4,%esi
call   1030 <matinv@plt>
cmp    $0x0,%eax
jne    1578 <dops+0x428>
movsd  -0x780(%rbp),%xmm1
ff
addsd  -0x758(%rbp),%xmm1
addsd  -0x730(%rbp),%xmm1
ff
addsd  -0x708(%rbp),%xmm1
ff
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    142e <dops+0x2de>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x7b8(%rbp)
ff
jmp    145b <dops+0x30b>
movsd  -0x780(%rbp),%xmm0
ff
addsd  -0x758(%rbp),%xmm0
ff
addsd  -0x730(%rbp),%xmm0
ff
addsd  -0x708(%rbp),%xmm0
ff
call   1070 <sqrt@plt>
movsd  %xmm0,-0x7b8(%rbp)
ff
movsd  -0x7b8(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x780(%rbp),%xmm1
ff
addsd  -0x758(%rbp),%xmm1
ff
addsd  -0x730(%rbp),%xmm1
ff
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    14a0 <dops+0x350>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x7c0(%rbp)
ff
jmp    14c5 <dops+0x375>
movsd  -0x780(%rbp),%xmm0
ff
addsd  -0x758(%rbp),%xmm0
ff
addsd  -0x730(%rbp),%xmm0
ff
call   1070 <sqrt@plt>
movsd  %xmm0,-0x7c0(%rbp)
ff
movsd  -0x7c0(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x780(%rbp),%xmm1
ff
addsd  -0x758(%rbp),%xmm1
ff
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1503 <dops+0x3b3>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x7c8(%rbp)
ff
jmp    1520 <dops+0x3d0>
movsd  -0x780(%rbp),%xmm0
ff
addsd  -0x758(%rbp),%xmm0
ff
call   1070 <sqrt@plt>
movsd  %xmm0,-0x7c8(%rbp)
ff
movsd  -0x7c8(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
xorps  %xmm0,%xmm0
ucomisd -0x730(%rbp),%xmm0
ff
jbe    1552 <dops+0x402>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x7d0(%rbp)
ff
jmp    1567 <dops+0x417>
movsd  -0x730(%rbp),%xmm0
ff
call   1070 <sqrt@plt>
movsd  %xmm0,-0x7d0(%rbp)
ff
movsd  -0x7d0(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x18(%rax)
add    $0x7e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dops>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x7a8,%rsp
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
movupd %xmm0,0x10(%rdx)
mov    %rdx,0x8(%rsp)
movupd %xmm0,(%rdx)
test   %edi,%edi
jle    13f4 <dops+0x2a4>
mov    %rsi,%r15
add    $0xffffffff,%edi
cmp    $0x36,%edi
mov    $0x36,%r12d
cmovb  %edi,%r12d
shl    $0x4,%r12
add    $0x10,%r12
xor    %ebx,%ebx
movabs $0x3ff0000000000000,%rbp
xor    %r13d,%r13d
movsd  %xmm1,0x10(%rsp)
jmp    11cd <dops+0x7d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x10,%rbx
cmp    %rbx,%r12
je     1288 <dops+0x138>
movsd  0x8(%r15,%rbx,1),%xmm0
ucomisd %xmm0,%xmm1
ja     11c0 <dops+0x70>
xorpd  %xmm2,%xmm2
ucomisd %xmm0,%xmm2
jae    11c0 <dops+0x70>
call   1050 <cos@plt>
movapd %xmm0,0x30(%rsp)
movsd  0x8(%r15,%rbx,1),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,0x18(%rsp)
movsd  (%r15,%rbx,1),%xmm0
call   1040 <sin@plt>
movaps %xmm0,0x20(%rsp)
lea    0x0(,%r13,4),%eax
movslq %eax,%r14
movsd  (%r15,%rbx,1),%xmm0
call   1050 <cos@plt>
movsd  0x10(%rsp),%xmm1
movapd 0x30(%rsp),%xmm2
unpcklpd %xmm2,%xmm2
movapd 0x20(%rsp),%xmm3
unpcklpd %xmm0,%xmm3
mulpd  %xmm2,%xmm3
movapd %xmm3,0xc0(%rsp,%r14,8)
lea    0x2(,%r13,4),%eax
cltq
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0xc0(%rsp,%rax,8)
lea    0x3(,%r13,4),%eax
mov    %r13d,%ecx
add    $0x1,%ecx
cltq
mov    %rbp,0xc0(%rsp,%rax,8)
mov    %ecx,%r13d
jmp    11c0 <dops+0x70>
cmp    $0x4,%r13d
jl     13f4 <dops+0x2a4>
lea    0x40(%rsp),%r15
mov    %r15,(%rsp)
lea    0xd6e(%rip),%rdi
movsd  0xd56(%rip),%xmm0
lea    0xc0(%rsp),%r8
xorpd  %xmm1,%xmm1
mov    $0x4,%esi
mov    $0x4,%edx
mov    %r13d,%ecx
mov    %r8,%r9
call   1060 <matmul@plt>
mov    %r15,%rdi
mov    $0x4,%esi
call   1030 <matinv@plt>
test   %eax,%eax
jne    13f4 <dops+0x2a4>
movsd  0x40(%rsp),%xmm0
addsd  0x68(%rsp),%xmm0
movsd  0x90(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  0xb8(%rsp),%xmm2
addsd  %xmm1,%xmm2
xorpd  %xmm3,%xmm3
ucomisd %xmm2,%xmm3
mov    0x8(%rsp),%rbx
xorpd  %xmm3,%xmm3
ja     1352 <dops+0x202>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jb     132c <dops+0x1dc>
xorps  %xmm3,%xmm3
sqrtsd %xmm2,%xmm3
jmp    1339 <dops+0x1e9>
movapd %xmm2,%xmm0
call   1070 <sqrt@plt>
movapd %xmm0,%xmm3
movsd  0x40(%rsp),%xmm0
addsd  0x68(%rsp),%xmm0
movsd  0x90(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm3,(%rbx)
xorpd  %xmm3,%xmm3
ucomisd %xmm1,%xmm3
xorpd  %xmm2,%xmm2
ja     1394 <dops+0x244>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jb     1377 <dops+0x227>
xorps  %xmm2,%xmm2
sqrtsd %xmm1,%xmm2
jmp    1388 <dops+0x238>
movapd %xmm1,%xmm0
call   1070 <sqrt@plt>
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm2
movsd  0x40(%rsp),%xmm0
addsd  0x68(%rsp),%xmm0
movsd  %xmm2,0x8(%rbx)
ucomisd %xmm0,%xmm3
ja     13bb <dops+0x26b>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     13b2 <dops+0x262>
xorps  %xmm3,%xmm3
sqrtsd %xmm0,%xmm3
jmp    13bb <dops+0x26b>
call   1070 <sqrt@plt>
movapd %xmm0,%xmm3
movsd  %xmm3,0x10(%rbx)
movsd  0x90(%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     13ef <dops+0x29f>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     13e6 <dops+0x296>
xorps  %xmm1,%xmm1
sqrtsd %xmm0,%xmm1
jmp    13ef <dops+0x29f>
call   1070 <sqrt@plt>
movapd %xmm0,%xmm1
movsd  %xmm1,0x18(%rbx)
add    $0x7a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"NT\00"
define void @dops(i32 %0, double* nocapture %1, double %2, double* nocapture writeonly %3) {
%5 = bitcast double* %3 to i8*
%6 = alloca [220 x double]
%7 = alloca [16 x double]
%8 = bitcast [220 x double]* %6 to i8*
%9 = bitcast [16 x double]* %7 to i8*
%10 = icmp sgt i32 %0, 0
br i1 %10, label %11, label %109
11: ; preds = %4
%12 = add nsw i32 %0, -1
%13 = call i32 @llvm.umin.i32(i32 %12, i32 54)
%14 = add nuw nsw i32 %13, 1
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %11, %51
%17 = phi i64 [ 0, %11 ], [ %53, %51 ]
%18 = phi i32 [ 0, %11 ], [ %52, %51 ]
%19 = shl nuw nsw i64 %17, 1
%20 = or i64 %19, 1
%21 = getelementptr inbounds double, double* %1, i64 %20
%22 = load double, double* %21
%23 = fcmp uge double %22, %2
%24 = fcmp ugt double %22, 0.000000e+00
%25 = and i1 %23, %24
br i1 %25, label %26, label %51
26: ; preds = %16
%27 = tail call double @cos(double %22)
%28 = load double, double* %21
%29 = tail call double @sin(double %28)
%30 = getelementptr inbounds double, double* %1, i64 %19
%31 = load double, double* %30
%32 = tail call double @sin(double %31)
%33 = shl nsw i32 %18, 2
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [220 x double], [220 x double]* %6, i64 0, i64 %34
%36 = load double, double* %30
%37 = tail call double @cos(double %36)
%38 = insertelement <2 x double> poison, double %27, i64 0
%39 = shufflevector <2 x double> %38, <2 x double> poison, <2 x i32> zeroinitializer
%40 = insertelement <2 x double> poison, double %32, i64 0
%41 = insertelement <2 x double> %40, double %37, i64 1
%42 = fmul <2 x double> %39, %41
%43 = bitcast double* %35 to <2 x double>*
store <2 x double> %42, <2 x double>* %43
%44 = or i32 %33, 2
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [220 x double], [220 x double]* %6, i64 0, i64 %45
store double %29, double* %46
%47 = add nsw i32 %18, 1
%48 = or i32 %33, 3
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [220 x double], [220 x double]* %6, i64 0, i64 %49
store double 1.000000e+00, double* %50
br label %51
51: ; preds = %16, %26
%52 = phi i32 [ %18, %16 ], [ %47, %26 ]
%53 = add nuw nsw i64 %17, 1
%54 = icmp eq i64 %53, %15
br i1 %54, label %55, label %16
55: ; preds = %51
%56 = icmp slt i32 %52, 4
br i1 %56, label %109, label %57
57: ; preds = %55
%58 = getelementptr inbounds [220 x double], [220 x double]* %6, i64 0, i64 0
%59 = getelementptr inbounds [16 x double], [16 x double]* %7, i64 0, i64 0
%60 = call i32 @matmul(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 4, i32 4, i32 %52, double 1.000000e+00, double* %58, double* %58, double 0.000000e+00, double* %59)
%61 = call i32 @matinv(double* %59, i32 4)
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %109
63: ; preds = %57
%64 = load double, double* %59
%65 = getelementptr inbounds [16 x double], [16 x double]* %7, i64 0, i64 5
%66 = load double, double* %65
%67 = fadd double %64, %66
%68 = getelementptr inbounds [16 x double], [16 x double]* %7, i64 0, i64 10
%69 = load double, double* %68
%70 = fadd double %67, %69
%71 = getelementptr inbounds [16 x double], [16 x double]* %7, i64 0, i64 15
%72 = load double, double* %71
%73 = fadd double %70, %72
%74 = fcmp olt double %73, 0.000000e+00
br i1 %74, label %82, label %75
75: ; preds = %63
%76 = call double @sqrt(double %73)
%77 = load double, double* %59
%78 = load double, double* %65
%79 = load double, double* %68
%80 = fadd double %77, %78
%81 = fadd double %80, %79
br label %82
82: ; preds = %63, %75
%83 = phi double [ %70, %63 ], [ %81, %75 ]
%84 = phi double [ %67, %63 ], [ %80, %75 ]
%85 = phi double [ 0.000000e+00, %63 ], [ %76, %75 ]
store double %85, double* %3
%86 = fcmp olt double %83, 0.000000e+00
br i1 %86, label %92, label %87
87: ; preds = %82
%88 = call double @sqrt(double %83)
%89 = load double, double* %59
%90 = load double, double* %65
%91 = fadd double %89, %90
br label %92
92: ; preds = %82, %87
%93 = phi double [ %84, %82 ], [ %91, %87 ]
%94 = phi double [ 0.000000e+00, %82 ], [ %88, %87 ]
%95 = getelementptr inbounds double, double* %3, i64 1
store double %94, double* %95
%96 = fcmp olt double %93, 0.000000e+00
br i1 %96, label %99, label %97
97: ; preds = %92
%98 = call double @sqrt(double %93)
br label %99
99: ; preds = %92, %97
%100 = phi double [ %98, %97 ], [ 0.000000e+00, %92 ]
%101 = getelementptr inbounds double, double* %3, i64 2
store double %100, double* %101
%102 = load double, double* %68
%103 = fcmp olt double %102, 0.000000e+00
br i1 %103, label %106, label %104
104: ; preds = %99
%105 = call double @sqrt(double %102)
br label %106
106: ; preds = %99, %104
%107 = phi double [ %105, %104 ], [ 0.000000e+00, %99 ]
%108 = getelementptr inbounds double, double* %3, i64 3
store double %107, double* %108
br label %109
109: ; preds = %4, %57, %106, %55
ret void
}