#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 UCHAR_MAX;
double sqrt(double);
double specsurf(double *h, double *Delta) {
  int kl[13][2] = {{1, 2},  {1, 4},  {1, 16}, {1, 8},  {2, 4},
                   {1, 32}, {2, 16}, {1, 64}, {4, 16}, {1, 128},
                   {2, 64}, {4, 32}, {8, 16}};
  double c[13] = {0.045778, 0.045778, 0.045778, 0.036981, 0.036981,
                  0.036981, 0.036981, 0.036981, 0.036981, 0.035196,
                  0.035196, 0.035196, 0.035196};
  double S_V = 0.0;
  int l, ny;
  double iVol = 0.0;
  double r[13];
  r[0] = Delta[0];
  r[1] = Delta[1];
  r[2] = Delta[2];
  r[3] = r[4] = sqrt(Delta[0] * Delta[0] + Delta[1] * Delta[1]);
  r[5] = r[6] = sqrt(Delta[0] * Delta[0] + Delta[2] * Delta[2]);
  r[7] = r[8] = sqrt(Delta[1] * Delta[1] + Delta[2] * Delta[2]);
  r[9] = r[10] = r[11] = r[12] =
      sqrt(Delta[0] * Delta[0] + Delta[1] * Delta[1] + Delta[2] * Delta[2]);
  for (l = 0; l <= UCHAR_MAX; l++) {
    iVol += h[l];
    for (ny = 0; ny < 13; ny++)
      S_V += h[l] * c[ny] / r[ny] *
             ((l == (l | kl[ny][0])) * (0 == (l & kl[ny][1])) +
              (l == (l | kl[ny][1])) * (0 == (l & kl[ny][0])));
  }
  return 4.0 * S_V / iVol;
}


x86 assembly (clang, -O0):
<specsurf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x170,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
lea    0xed2(%rip),%rsi
mov    $0x68,%edx
call   1030 <memcpy@plt>
lea    -0xf0(%rbp),%rdi
lea    0xf2a(%rip),%rsi
mov    $0x68,%edx
call   1030 <memcpy@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x170(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x160(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x150(%rbp)
ff
movsd  %xmm0,-0x158(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x140(%rbp)
ff
movsd  %xmm0,-0x148(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x130(%rbp)
ff
movsd  %xmm0,-0x138(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x110(%rbp)
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  %xmm0,-0x120(%rbp)
ff
movsd  %xmm0,-0x128(%rbp)
ff
movl   $0x0,-0xfc(%rbp)
mov    -0xfc(%rbp),%eax
mov    0x2d09(%rip),%rcx
cmp    (%rcx),%eax
jg     1426 <specsurf+0x306>
mov    -0x8(%rbp),%rax
movslq -0xfc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x108(%rbp),%xmm0
ff
movsd  %xmm0,-0x108(%rbp)
ff
movl   $0x0,-0x100(%rbp)
cmpl   $0xd,-0x100(%rbp)
jge    140d <specsurf+0x2ed>
mov    -0x8(%rbp),%rax
movslq -0xfc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x100(%rbp),%rax
mulsd  -0xf0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x100(%rbp),%rax
divsd  -0x170(%rbp,%rax,8),%xmm0
ff ff
mov    -0xfc(%rbp),%eax
mov    -0xfc(%rbp),%ecx
movslq -0x100(%rbp),%rdx
or     -0x80(%rbp,%rdx,8),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0xfc(%rbp),%edx
movslq -0x100(%rbp),%rcx
and    -0x7c(%rbp,%rcx,8),%edx
xor    %ecx,%ecx
cmp    %edx,%ecx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
imul   %ecx,%eax
mov    -0xfc(%rbp),%ecx
mov    -0xfc(%rbp),%edx
movslq -0x100(%rbp),%rsi
or     -0x7c(%rbp,%rsi,8),%edx
cmp    %edx,%ecx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    -0xfc(%rbp),%esi
movslq -0x100(%rbp),%rdx
and    -0x80(%rbp,%rdx,8),%esi
xor    %edx,%edx
cmp    %esi,%edx
sete   %dl
and    $0x1,%dl
movzbl %dl,%edx
imul   %edx,%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm2
movsd  -0xf8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
mov    -0x100(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100(%rbp)
jmp    1319 <specsurf+0x1f9>
jmp    1412 <specsurf+0x2f2>
mov    -0xfc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfc(%rbp)
jmp    12da <specsurf+0x1ba>
movsd  0xbd2(%rip),%xmm0
mulsd  -0xf8(%rbp),%xmm0
ff
divsd  -0x108(%rbp),%xmm0
ff
add    $0x170,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<specsurf>:
push   %r15
push   %r14
push   %rbx
sub    $0x70,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
movupd (%rsi),%xmm0
movapd %xmm0,(%rsp)
movsd  0x10(%rsi),%xmm1
movsd  %xmm1,0x10(%rsp)
movapd %xmm0,%xmm1
mulpd  %xmm0,%xmm1
unpckhpd %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jb     1157 <specsurf+0x47>
sqrtsd %xmm0,%xmm0
jmp    1160 <specsurf+0x50>
call   1030 <sqrt@plt>
xorpd  %xmm2,%xmm2
movsd  %xmm0,0x20(%rsp)
movsd  %xmm0,0x18(%rsp)
movsd  (%r14),%xmm0
movsd  0x10(%r14),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jb     118f <specsurf+0x7f>
sqrtsd %xmm0,%xmm0
jmp    1194 <specsurf+0x84>
call   1030 <sqrt@plt>
movsd  %xmm0,0x30(%rsp)
movsd  %xmm0,0x28(%rsp)
movsd  0x8(%r14),%xmm0
movsd  0x10(%r14),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jb     11c8 <specsurf+0xb8>
sqrtsd %xmm0,%xmm0
jmp    11d1 <specsurf+0xc1>
call   1030 <sqrt@plt>
xorpd  %xmm2,%xmm2
movsd  %xmm0,0x40(%rsp)
movsd  %xmm0,0x38(%rsp)
movsd  (%r14),%xmm1
movsd  0x8(%r14),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%r14),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jb     120e <specsurf+0xfe>
sqrtsd %xmm0,%xmm0
jmp    1213 <specsurf+0x103>
call   1030 <sqrt@plt>
movsd  %xmm0,0x60(%rsp)
movsd  %xmm0,0x58(%rsp)
movsd  %xmm0,0x50(%rsp)
movsd  %xmm0,0x48(%rsp)
mov    0x2dbe(%rip),%rax
mov    (%rax),%r8d
test   %r8d,%r8d
js     12e4 <specsurf+0x1d4>
add    $0x1,%r8
xorpd  %xmm1,%xmm1
xor    %esi,%esi
lea    0xe31(%rip),%r9
lea    0xdba(%rip),%r10
xorpd  %xmm0,%xmm0
nopw   0x0(%rax,%rax,1)
movsd  (%r15,%rsi,8),%xmm2
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
movsd  (%rdi,%r9,1),%xmm3
mulsd  %xmm2,%xmm3
divsd  (%rsp,%rdi,1),%xmm3
mov    (%rdi,%r10,1),%ebx
mov    0x4(%rdi,%r10,1),%eax
mov    %ebx,%edx
or     %esi,%edx
cmp    %rdx,%rsi
sete   %dl
test   %esi,%eax
sete   %cl
and    %dl,%cl
movzbl %cl,%ecx
or     %esi,%eax
cmp    %rax,%rsi
sete   %al
test   %esi,%ebx
sete   %dl
and    %al,%dl
movzbl %dl,%eax
add    %ecx,%eax
xorps  %xmm4,%xmm4
cvtsi2sd %eax,%xmm4
mulsd  %xmm3,%xmm4
addsd  %xmm4,%xmm0
add    $0x8,%rdi
cmp    $0x68,%rdi
jne    1270 <specsurf+0x160>
addsd  %xmm2,%xmm1
add    $0x1,%rsi
cmp    %r8,%rsi
jne    1260 <specsurf+0x150>
mulsd  0xd2a(%rip),%xmm0
divsd  %xmm1,%xmm0
jmp    12ec <specsurf+0x1dc>
movsd  0xd14(%rip),%xmm0
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.specsurf.kl = [13 x [2 x i32]] [[2 x i32] [i32 1, i32 2], [2 x i32] [i32 1, i32 4], [2 x i32] [i32 1, i32 16], [2 x i32] [i32 1, i32 8], [2 x i32] [i32 2, i32 4], [2 x i32] [i32 1, i32 32], [2 x i32] [i32 2, i32 16], [2 x i32] [i32 1, i32 64], [2 x i32] [i32 4, i32 16], [2 x i32] [i32 1, i32 128], [2 x i32] [i32 2, i32 64], [2 x i32] [i32 4, i32 32], [2 x i32] [i32 8, i32 16]]
@__const.specsurf.c = [13 x double] [double 4.577800e-02, double 4.577800e-02, double 4.577800e-02, double 3.698100e-02, double 3.698100e-02, double 3.698100e-02, double 3.698100e-02, double 3.698100e-02, double 3.698100e-02, double 3.519600e-02, double 3.519600e-02, double 3.519600e-02, double 3.519600e-02]
@UCHAR_MAX = global i32 0
define double @specsurf(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca [13 x [2 x i32]]
%6 = alloca [13 x double]
%7 = alloca double
%8 = alloca i32
%9 = alloca i32
%10 = alloca double
%11 = alloca [13 x double]
store double* %0, double** %3
store double* %1, double** %4
%12 = bitcast [13 x [2 x i32]]* %5 to i8*
%13 = bitcast [13 x double]* %6 to i8*
store double 0.000000e+00, double* %7
store double 0.000000e+00, double* %10
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 0
%16 = load double, double* %15
%17 = getelementptr inbounds [13 x double], [13 x double]* %11, i64 0, i64 0
store double %16, double* %17
%18 = load double*, double** %4
%19 = getelementptr inbounds double, double* %18, i64 1
%20 = load double, double* %19
%21 = getelementptr inbounds [13 x double], [13 x double]* %11, i64 0, i64 1
store double %20, double* %21
%22 = load double*, double** %4
%23 = getelementptr inbounds double, double* %22, i64 2
%24 = load double, double* %23
%25 = getelementptr inbounds [13 x double], [13 x double]* %11, i64 0, i64 2
store double %24, double* %25
%26 = load double*, double** %4
%27 = getelementptr inbounds double, double* %26, i64 0
%28 = load double, double* %27
%29 = load double*, double** %4
%30 = getelementptr inbounds double, double* %29, i64 0
%31 = load double, double* %30
%32 = load double*, double** %4
%33 = getelementptr inbounds double, double* %32, i64 1
%34 = load double, double* %33
%35 = load double*, double** %4
%36 = getelementptr inbounds double, double* %35, i64 1
%37 = load double, double* %36
%38 = fmul double %34, %37
%39 = call double @llvm.fmuladd.f64(double %28, double %31, double %38)
%40 = call double @sqrt(double %39)
%41 = getelementptr inbounds [13 x double], [13 x double]* %11, i64 0, i64 4
store double %40, double* %41
%42 = getelementptr inbounds [13 x double], [13 x double]* %11, i64 0, i64 3
store double %40, double* %42
%43 = load double*, double** %4
%44 = getelementptr inbounds double, double* %43, i64 0
%45 = load double, double* %44
%46 = load double*, double** %4
%47 = getelementptr inbounds double, double* %46, i64 0
%48 = load double, double* %47
%49 = load double*, double** %4
%50 = getelementptr inbounds double, double* %49, i64 2
%51 = load double, double* %50
%52 = load double*, double** %4
%53 = getelementptr inbounds double, double* %52, i64 2
%54 = load double, double* %53
%55 = fmul double %51, %54
%56 = call double @llvm.fmuladd.f64(double %45, double %48, double %55)
%57 = call double @sqrt(double %56)
%58 = getelementptr inbounds [13 x double], [13 x double]* %11, i64 0, i64 6
store double %57, double* %58
%59 = getelementptr inbounds [13 x double], [13 x double]* %11, i64 0, i64 5
store double %57, double* %59
%60 = load double*, double** %4
%61 = getelementptr inbounds double, double* %60, i64 1
%62 = load double, double* %61
%63 = load double*, double** %4
%64 = getelementptr inbounds double, double* %63, i64 1
%65 = load double, double* %64
%66 = load double*, double** %4
%67 = getelementptr inbounds double, double* %66, i64 2
%68 = load double, double* %67
%69 = load double*, double** %4
%70 = getelementptr inbounds double, double* %69, i64 2
%71 = load double, double* %70
%72 = fmul double %68, %71
%73 = call double @llvm.fmuladd.f64(double %62, double %65, double %72)
%74 = call double @sqrt(double %73)
%75 = getelementptr inbounds [13 x double], [13 x double]* %11, i64 0, i64 8
store double %74, double* %75
%76 = getelementptr inbounds [13 x double], [13 x double]* %11, i64 0, i64 7
store double %74, double* %76
%77 = load double*, double** %4
%78 = getelementptr inbounds double, double* %77, i64 0
%79 = load double, double* %78
%80 = load double*, double** %4
%81 = getelementptr inbounds double, double* %80, i64 0
%82 = load double, double* %81
%83 = load double*, double** %4
%84 = getelementptr inbounds double, double* %83, i64 1
%85 = load double, double* %84
%86 = load double*, double** %4
%87 = getelementptr inbounds double, double* %86, i64 1
%88 = load double, double* %87
%89 = fmul double %85, %88
%90 = call double @llvm.fmuladd.f64(double %79, double %82, double %89)
%91 = load double*, double** %4
%92 = getelementptr inbounds double, double* %91, i64 2
%93 = load double, double* %92
%94 = load double*, double** %4
%95 = getelementptr inbounds double, double* %94, i64 2
%96 = load double, double* %95
%97 = call double @llvm.fmuladd.f64(double %93, double %96, double %90)
%98 = call double @sqrt(double %97)
%99 = getelementptr inbounds [13 x double], [13 x double]* %11, i64 0, i64 12
store double %98, double* %99
%100 = getelementptr inbounds [13 x double], [13 x double]* %11, i64 0, i64 11
store double %98, double* %100
%101 = getelementptr inbounds [13 x double], [13 x double]* %11, i64 0, i64 10
store double %98, double* %101
%102 = getelementptr inbounds [13 x double], [13 x double]* %11, i64 0, i64 9
store double %98, double* %102
store i32 0, i32* %8
br label %103
103: ; preds = %182, %2
%104 = load i32, i32* %8
%105 = load i32, i32* @UCHAR_MAX
%106 = icmp sle i32 %104, %105
br i1 %106, label %107, label %185
107: ; preds = %103
%108 = load double*, double** %3
%109 = load i32, i32* %8
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds double, double* %108, i64 %110
%112 = load double, double* %111
%113 = load double, double* %10
%114 = fadd double %113, %112
store double %114, double* %10
store i32 0, i32* %9
br label %115
115: ; preds = %178, %107
%116 = load i32, i32* %9
%117 = icmp slt i32 %116, 13
br i1 %117, label %118, label %181
118: ; preds = %115
%119 = load double*, double** %3
%120 = load i32, i32* %8
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds double, double* %119, i64 %121
%123 = load double, double* %122
%124 = load i32, i32* %9
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds [13 x double], [13 x double]* %6, i64 0, i64 %125
%127 = load double, double* %126
%128 = fmul double %123, %127
%129 = load i32, i32* %9
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds [13 x double], [13 x double]* %11, i64 0, i64 %130
%132 = load double, double* %131
%133 = fdiv double %128, %132
%134 = load i32, i32* %8
%135 = load i32, i32* %8
%136 = load i32, i32* %9
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds [13 x [2 x i32]], [13 x [2 x i32]]* %5, i64 0, i64 %137
%139 = getelementptr inbounds [2 x i32], [2 x i32]* %138, i64 0, i64 0
%140 = load i32, i32* %139
%141 = or i32 %135, %140
%142 = icmp eq i32 %134, %141
%143 = zext i1 %142 to i32
%144 = load i32, i32* %8
%145 = load i32, i32* %9
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds [13 x [2 x i32]], [13 x [2 x i32]]* %5, i64 0, i64 %146
%148 = getelementptr inbounds [2 x i32], [2 x i32]* %147, i64 0, i64 1
%149 = load i32, i32* %148
%150 = and i32 %144, %149
%151 = icmp eq i32 0, %150
%152 = zext i1 %151 to i32
%153 = mul nsw i32 %143, %152
%154 = load i32, i32* %8
%155 = load i32, i32* %8
%156 = load i32, i32* %9
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds [13 x [2 x i32]], [13 x [2 x i32]]* %5, i64 0, i64 %157
%159 = getelementptr inbounds [2 x i32], [2 x i32]* %158, i64 0, i64 1
%160 = load i32, i32* %159
%161 = or i32 %155, %160
%162 = icmp eq i32 %154, %161
%163 = zext i1 %162 to i32
%164 = load i32, i32* %8
%165 = load i32, i32* %9
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds [13 x [2 x i32]], [13 x [2 x i32]]* %5, i64 0, i64 %166
%168 = getelementptr inbounds [2 x i32], [2 x i32]* %167, i64 0, i64 0
%169 = load i32, i32* %168
%170 = and i32 %164, %169
%171 = icmp eq i32 0, %170
%172 = zext i1 %171 to i32
%173 = mul nsw i32 %163, %172
%174 = add nsw i32 %153, %173
%175 = sitofp i32 %174 to double
%176 = load double, double* %7
%177 = call double @llvm.fmuladd.f64(double %133, double %175, double %176)
store double %177, double* %7
br label %178
178: ; preds = %118
%179 = load i32, i32* %9
%180 = add nsw i32 %179, 1
store i32 %180, i32* %9
br label %115
181: ; preds = %115
br label %182
182: ; preds = %181
%183 = load i32, i32* %8
%184 = add nsw i32 %183, 1
store i32 %184, i32* %8
br label %103
185: ; preds = %103
%186 = load double, double* %7
%187 = fmul double 4.000000e+00, %186
%188 = load double, double* %10
%189 = fdiv double %187, %188
ret double %189
}

LLVM IR (-O2):
@__const.specsurf.kl = [13 x [2 x i32]] [[2 x i32] [i32 1, i32 2], [2 x i32] [i32 1, i32 4], [2 x i32] [i32 1, i32 16], [2 x i32] [i32 1, i32 8], [2 x i32] [i32 2, i32 4], [2 x i32] [i32 1, i32 32], [2 x i32] [i32 2, i32 16], [2 x i32] [i32 1, i32 64], [2 x i32] [i32 4, i32 16], [2 x i32] [i32 1, i32 128], [2 x i32] [i32 2, i32 64], [2 x i32] [i32 4, i32 32], [2 x i32] [i32 8, i32 16]]
@__const.specsurf.c = [13 x double] [double 4.577800e-02, double 4.577800e-02, double 4.577800e-02, double 3.698100e-02, double 3.698100e-02, double 3.698100e-02, double 3.698100e-02, double 3.698100e-02, double 3.698100e-02, double 3.519600e-02, double 3.519600e-02, double 3.519600e-02, double 3.519600e-02]
@UCHAR_MAX = global i32 0
define double @specsurf(double* nocapture %0, double* nocapture %1) {
%3 = alloca [13 x double]
%4 = bitcast [13 x double]* %3 to i8*
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = bitcast double* %1 to <2 x double>*
%7 = load <2 x double>, <2 x double>* %6
%8 = bitcast [13 x double]* %3 to <2 x double>*
store <2 x double> %7, <2 x double>* %8
%9 = getelementptr inbounds double, double* %1, i64 2
%10 = load double, double* %9
%11 = getelementptr inbounds [13 x double], [13 x double]* %3, i64 0, i64 2
store double %10, double* %11
%12 = fmul <2 x double> %7, %7
%13 = extractelement <2 x double> %12, i64 1
%14 = extractelement <2 x double> %7, i64 0
%15 = tail call double @llvm.fmuladd.f64(double %14, double %14, double %13)
%16 = tail call double @sqrt(double %15)
%17 = getelementptr inbounds [13 x double], [13 x double]* %3, i64 0, i64 4
store double %16, double* %17
%18 = getelementptr inbounds [13 x double], [13 x double]* %3, i64 0, i64 3
store double %16, double* %18
%19 = load double, double* %1
%20 = load double, double* %9
%21 = fmul double %20, %20
%22 = tail call double @llvm.fmuladd.f64(double %19, double %19, double %21)
%23 = tail call double @sqrt(double %22)
%24 = getelementptr inbounds [13 x double], [13 x double]* %3, i64 0, i64 6
store double %23, double* %24
%25 = getelementptr inbounds [13 x double], [13 x double]* %3, i64 0, i64 5
store double %23, double* %25
%26 = load double, double* %5
%27 = load double, double* %9
%28 = fmul double %27, %27
%29 = tail call double @llvm.fmuladd.f64(double %26, double %26, double %28)
%30 = tail call double @sqrt(double %29)
%31 = getelementptr inbounds [13 x double], [13 x double]* %3, i64 0, i64 8
store double %30, double* %31
%32 = getelementptr inbounds [13 x double], [13 x double]* %3, i64 0, i64 7
store double %30, double* %32
%33 = load double, double* %1
%34 = load double, double* %5
%35 = fmul double %34, %34
%36 = tail call double @llvm.fmuladd.f64(double %33, double %33, double %35)
%37 = load double, double* %9
%38 = tail call double @llvm.fmuladd.f64(double %37, double %37, double %36)
%39 = tail call double @sqrt(double %38)
%40 = getelementptr inbounds [13 x double], [13 x double]* %3, i64 0, i64 12
store double %39, double* %40
%41 = getelementptr inbounds [13 x double], [13 x double]* %3, i64 0, i64 11
store double %39, double* %41
%42 = getelementptr inbounds [13 x double], [13 x double]* %3, i64 0, i64 10
store double %39, double* %42
%43 = getelementptr inbounds [13 x double], [13 x double]* %3, i64 0, i64 9
store double %39, double* %43
%44 = load i32, i32* @UCHAR_MAX
%45 = icmp slt i32 %44, 0
br i1 %45, label %95, label %46
46: ; preds = %2
%47 = add nuw i32 %44, 1
%48 = zext i32 %47 to i64
br label %49
49: ; preds = %46, %88
%50 = phi i64 [ 0, %46 ], [ %90, %88 ]
%51 = phi double [ 0.000000e+00, %46 ], [ %89, %88 ]
%52 = phi double [ 0.000000e+00, %46 ], [ %85, %88 ]
%53 = getelementptr inbounds double, double* %0, i64 %50
%54 = load double, double* %53
%55 = trunc i64 %50 to i32
br label %56
56: ; preds = %49, %56
%57 = phi i64 [ 0, %49 ], [ %86, %56 ]
%58 = phi double [ %52, %49 ], [ %85, %56 ]
%59 = getelementptr inbounds [13 x double], [13 x double]* @__const.specsurf.c, i64 0, i64 %57
%60 = load double, double* %59
%61 = fmul double %54, %60
%62 = getelementptr inbounds [13 x double], [13 x double]* %3, i64 0, i64 %57
%63 = load double, double* %62
%64 = fdiv double %61, %63
%65 = getelementptr inbounds [13 x [2 x i32]], [13 x [2 x i32]]* @__const.specsurf.kl, i64 0, i64 %57, i64 0
%66 = load i32, i32* %65
%67 = or i32 %66, %55
%68 = zext i32 %67 to i64
%69 = icmp eq i64 %50, %68
%70 = getelementptr inbounds [13 x [2 x i32]], [13 x [2 x i32]]* @__const.specsurf.kl, i64 0, i64 %57, i64 1
%71 = load i32, i32* %70
%72 = and i32 %71, %55
%73 = icmp eq i32 %72, 0
%74 = and i1 %69, %73
%75 = zext i1 %74 to i32
%76 = or i32 %71, %55
%77 = zext i32 %76 to i64
%78 = icmp eq i64 %50, %77
%79 = and i32 %66, %55
%80 = icmp eq i32 %79, 0
%81 = and i1 %80, %78
%82 = zext i1 %81 to i32
%83 = add nuw nsw i32 %75, %82
%84 = sitofp i32 %83 to double
%85 = tail call double @llvm.fmuladd.f64(double %64, double %84, double %58)
%86 = add nuw nsw i64 %57, 1
%87 = icmp eq i64 %86, 13
br i1 %87, label %88, label %56
88: ; preds = %56
%89 = fadd double %51, %54
%90 = add nuw nsw i64 %50, 1
%91 = icmp eq i64 %90, %48
br i1 %91, label %92, label %49
92: ; preds = %88
%93 = fmul double %85, 4.000000e+00
%94 = fdiv double %93, %89
br label %95
95: ; preds = %92, %2
%96 = phi double [ %94, %92 ], [ 0x7FF8000000000000, %2 ]
ret double %96
}