#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 M_PI;
double cos(double);
int /*<<< orphan*/ dphidxsi3D_lin(double, double, double, double *, double *,
                                  double *);
void dxdxsi3D_lin(double *px, double *py, double *pz, double xsi, double eta,
                  double zet, double *jacM, int sphere_mesh) {
  double dphidxsi[8], dphideta[8], dphidzet[8];
  dphidxsi3D_lin(xsi, eta, zet, dphidxsi, dphideta, dphidzet);
  int i;
  for (i = 0; i < 9; ++i)
    jacM[i] = 0;
  double deg2m = 1852 * 60.;
  double rad = M_PI / 180.;
  double lat = (1 - xsi) * (1 - eta) * py[0] + xsi * (1 - eta) * py[1] +
               xsi * eta * py[2] + (1 - xsi) * eta * py[3];
  double jac_lon = (sphere_mesh == 1) ? (deg2m * cos(rad * lat)) : 1;
  double jac_lat = (sphere_mesh == 1) ? deg2m : 1;
  for (i = 0; i < 8; ++i) {
    jacM[3 * 0 + 0] += px[i] * dphidxsi[i] * jac_lon;
    jacM[3 * 0 + 1] += px[i] * dphideta[i] * jac_lon;
    jacM[3 * 0 + 2] += px[i] * dphidzet[i] * jac_lon;
    jacM[3 * 1 + 0] += py[i] * dphidxsi[i] * jac_lat;
    jacM[3 * 1 + 1] += py[i] * dphideta[i] * jac_lat;
    jacM[3 * 1 + 2] += py[i] * dphidzet[i] * jac_lat;
    jacM[3 * 2 + 0] += pz[i] * dphidxsi[i];
    jacM[3 * 2 + 1] += pz[i] * dphideta[i];
    jacM[3 * 2 + 2] += pz[i] * dphidzet[i];
  }
}


x86 assembly (clang, -O0):
<dxdxsi3D_lin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
mov    %r8d,-0x3c(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
lea    -0x80(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
lea    -0x100(%rbp),%rdx
call   1030 <dphidxsi3D_lin@plt>
movl   $0x0,-0x104(%rbp)
cmpl   $0x9,-0x104(%rbp)
jge    11b2 <dxdxsi3D_lin+0x92>
mov    -0x38(%rbp),%rax
movslq -0x104(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x104(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x104(%rbp)
jmp    117e <dxdxsi3D_lin+0x5e>
movsd  0xe56(%rip),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
mov    0x2e1f(%rip),%rax
cvtsi2sdl (%rax),%xmm0
movsd  0xe33(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  0xe17(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  0xe0a(%rip),%xmm1
subsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0x20(%rbp),%xmm1
movsd  0xdec(%rip),%xmm3
subsd  -0x28(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xdaf(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
cmpl   $0x1,-0x3c(%rbp)
jne    12bf <dxdxsi3D_lin+0x19f>
movsd  -0x110(%rbp),%xmm0
ff
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0x118(%rbp),%xmm0
ff
mulsd  -0x120(%rbp),%xmm0
ff
call   1040 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x140(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
jmp    12d4 <dxdxsi3D_lin+0x1b4>
movsd  0xd39(%rip),%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
jmp    12d4 <dxdxsi3D_lin+0x1b4>
movsd  -0x138(%rbp),%xmm0
ff
movsd  %xmm0,-0x128(%rbp)
ff
cmpl   $0x1,-0x3c(%rbp)
jne    1303 <dxdxsi3D_lin+0x1e3>
movsd  -0x110(%rbp),%xmm0
ff
movsd  %xmm0,-0x148(%rbp)
ff
jmp    1318 <dxdxsi3D_lin+0x1f8>
movsd  0xcf5(%rip),%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
jmp    1318 <dxdxsi3D_lin+0x1f8>
movsd  -0x148(%rbp),%xmm0
ff
movsd  %xmm0,-0x130(%rbp)
ff
movl   $0x0,-0x104(%rbp)
cmpl   $0x8,-0x104(%rbp)
jge    155e <dxdxsi3D_lin+0x43e>
mov    -0x8(%rbp),%rax
movslq -0x104(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x104(%rbp),%rax
mulsd  -0x80(%rbp,%rax,8),%xmm0
movsd  -0x128(%rbp),%xmm2
ff
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movslq -0x104(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x104(%rbp),%rax
mulsd  -0xc0(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x128(%rbp),%xmm2
ff
mov    -0x38(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movslq -0x104(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x104(%rbp),%rax
mulsd  -0x100(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x128(%rbp),%xmm2
ff
mov    -0x38(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
movslq -0x104(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x104(%rbp),%rax
mulsd  -0x80(%rbp,%rax,8),%xmm0
movsd  -0x130(%rbp),%xmm2
ff
mov    -0x38(%rbp),%rax
movsd  0x18(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x10(%rbp),%rax
movslq -0x104(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x104(%rbp),%rax
mulsd  -0xc0(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x130(%rbp),%xmm2
ff
mov    -0x38(%rbp),%rax
movsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x20(%rax)
mov    -0x10(%rbp),%rax
movslq -0x104(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x104(%rbp),%rax
mulsd  -0x100(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x130(%rbp),%xmm2
ff
mov    -0x38(%rbp),%rax
movsd  0x28(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x28(%rax)
mov    -0x18(%rbp),%rax
movslq -0x104(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x104(%rbp),%rax
movsd  -0x80(%rbp,%rax,8),%xmm2
mov    -0x38(%rbp),%rax
movsd  0x30(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x30(%rax)
mov    -0x18(%rbp),%rax
movslq -0x104(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x104(%rbp),%rax
movsd  -0xc0(%rbp,%rax,8),%xmm2
ff ff
mov    -0x38(%rbp),%rax
movsd  0x38(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x38(%rax)
mov    -0x18(%rbp),%rax
movslq -0x104(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x104(%rbp),%rax
movsd  -0x100(%rbp,%rax,8),%xmm2
ff ff
mov    -0x38(%rbp),%rax
movsd  0x40(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x40(%rax)
mov    -0x104(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x104(%rbp)
jmp    1332 <dxdxsi3D_lin+0x212>
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dxdxsi3D_lin>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xd0,%rsp
mov    %r8d,%ebp
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
lea    0x90(%rsp),%rdi
lea    0x50(%rsp),%rsi
lea    0x10(%rsp),%rdx
movsd  %xmm0,(%rsp)
movsd  %xmm1,0x8(%rsp)
call   1030 <dphidxsi3D_lin@plt>
xorps  %xmm0,%xmm0
movups %xmm0,(%rbx)
movups %xmm0,0x10(%rbx)
movups %xmm0,0x20(%rbx)
movups %xmm0,0x30(%rbx)
movq   $0x0,0x40(%rbx)
movsd  0xe7d(%rip),%xmm8
xorpd  %xmm9,%xmm9
cmp    $0x1,%ebp
jne    1245 <dxdxsi3D_lin+0x125>
movapd %xmm8,%xmm0
movsd  (%rsp),%xmm3
subsd  %xmm3,%xmm0
movsd  0x8(%rsp),%xmm2
subsd  %xmm2,%xmm8
movapd %xmm0,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm8,%xmm0
mulsd  %xmm3,%xmm8
mulsd  0x8(%r15),%xmm8
mulsd  %xmm3,%xmm2
mulsd  (%r15),%xmm0
addsd  %xmm8,%xmm0
mulsd  0x10(%r15),%xmm2
mulsd  0x18(%r15),%xmm1
addsd  %xmm0,%xmm2
mov    0x2e01(%rip),%rax
xorps  %xmm0,%xmm0
cvtsi2sdl (%rax),%xmm0
addsd  %xmm2,%xmm1
divsd  0xe0e(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <cos@plt>
movsd  0xe04(%rip),%xmm8
mulsd  %xmm8,%xmm0
movsd  (%rbx),%xmm10
movsd  0x8(%rbx),%xmm12
movsd  0x10(%rbx),%xmm11
movsd  0x18(%rbx),%xmm7
movsd  0x20(%rbx),%xmm6
movsd  0x28(%rbx),%xmm5
movsd  0x30(%rbx),%xmm14
movsd  0x38(%rbx),%xmm13
movsd  0x40(%rbx),%xmm9
jmp    126f <dxdxsi3D_lin+0x14f>
xorpd  %xmm13,%xmm13
xorpd  %xmm14,%xmm14
xorpd  %xmm5,%xmm5
xorpd  %xmm6,%xmm6
xorpd  %xmm7,%xmm7
xorpd  %xmm11,%xmm11
xorpd  %xmm12,%xmm12
xorpd  %xmm10,%xmm10
movapd %xmm8,%xmm0
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x90(%rsp,%rax,1),%xmm1
movsd  (%r12,%rax,1),%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm2,%xmm10
movsd  %xmm10,(%rbx)
movsd  0x50(%rsp,%rax,1),%xmm2
movsd  (%r12,%rax,1),%xmm3
mulsd  %xmm2,%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm3,%xmm12
movsd  %xmm12,0x8(%rbx)
movsd  0x10(%rsp,%rax,1),%xmm3
movsd  (%r12,%rax,1),%xmm4
mulsd  %xmm3,%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm4,%xmm11
movsd  %xmm11,0x10(%rbx)
movsd  (%r15,%rax,1),%xmm4
mulsd  %xmm1,%xmm4
mulsd  %xmm8,%xmm4
addsd  %xmm4,%xmm7
movsd  %xmm7,0x18(%rbx)
movsd  (%r15,%rax,1),%xmm4
mulsd  %xmm2,%xmm4
mulsd  %xmm8,%xmm4
addsd  %xmm4,%xmm6
movsd  %xmm6,0x20(%rbx)
movsd  (%r15,%rax,1),%xmm4
mulsd  %xmm3,%xmm4
mulsd  %xmm8,%xmm4
addsd  %xmm4,%xmm5
movsd  %xmm5,0x28(%rbx)
mulsd  (%r14,%rax,1),%xmm1
addsd  %xmm1,%xmm14
movsd  %xmm14,0x30(%rbx)
mulsd  (%r14,%rax,1),%xmm2
addsd  %xmm2,%xmm13
movsd  %xmm13,0x38(%rbx)
mulsd  (%r14,%rax,1),%xmm3
addsd  %xmm3,%xmm9
movsd  %xmm9,0x40(%rbx)
add    $0x8,%rax
cmp    $0x40,%rax
jne    1280 <dxdxsi3D_lin+0x160>
add    $0xd0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@M_PI = global i32 0
define void @dxdxsi3D_lin(double* nocapture %0, double* nocapture %1, double* nocapture %2, double %3, double %4, double %5, double* nocapture %6, i32 %7) {
%9 = bitcast double* %6 to i8*
%10 = alloca [8 x double]
%11 = alloca [8 x double]
%12 = alloca [8 x double]
%13 = bitcast [8 x double]* %10 to i8*
%14 = bitcast [8 x double]* %11 to i8*
%15 = bitcast [8 x double]* %12 to i8*
%16 = getelementptr inbounds [8 x double], [8 x double]* %10, i64 0, i64 0
%17 = getelementptr inbounds [8 x double], [8 x double]* %11, i64 0, i64 0
%18 = getelementptr inbounds [8 x double], [8 x double]* %12, i64 0, i64 0
%19 = call i32 @dphidxsi3D_lin(double %3, double %4, double %5, double* %16, double* %17, double* %18)
%20 = fsub double 1.000000e+00, %3
%21 = fsub double 1.000000e+00, %4
%22 = icmp eq i32 %7, 1
br i1 %22, label %23, label %62
23: ; preds = %8
%24 = fmul double %20, %4
%25 = getelementptr inbounds double, double* %1, i64 3
%26 = load double, double* %25
%27 = fmul double %3, %4
%28 = getelementptr inbounds double, double* %1, i64 2
%29 = load double, double* %28
%30 = fmul double %20, %21
%31 = load double, double* %1
%32 = fmul double %21, %3
%33 = getelementptr inbounds double, double* %1, i64 1
%34 = load double, double* %33
%35 = fmul double %32, %34
%36 = call double @llvm.fmuladd.f64(double %30, double %31, double %35)
%37 = call double @llvm.fmuladd.f64(double %27, double %29, double %36)
%38 = call double @llvm.fmuladd.f64(double %24, double %26, double %37)
%39 = load i32, i32* @M_PI
%40 = sitofp i32 %39 to double
%41 = fdiv double %40, 1.800000e+02
%42 = fmul double %41, %38
%43 = call double @cos(double %42)
%44 = fmul double %43, 1.111200e+05
%45 = load double, double* %6
%46 = getelementptr inbounds double, double* %6, i64 1
%47 = load double, double* %46
%48 = getelementptr inbounds double, double* %6, i64 2
%49 = load double, double* %48
%50 = getelementptr inbounds double, double* %6, i64 3
%51 = load double, double* %50
%52 = getelementptr inbounds double, double* %6, i64 4
%53 = load double, double* %52
%54 = getelementptr inbounds double, double* %6, i64 5
%55 = load double, double* %54
%56 = getelementptr inbounds double, double* %6, i64 6
%57 = load double, double* %56
%58 = getelementptr inbounds double, double* %6, i64 7
%59 = load double, double* %58
%60 = getelementptr inbounds double, double* %6, i64 8
%61 = load double, double* %60
br label %62
62: ; preds = %8, %23
%63 = phi double [ 0.000000e+00, %8 ], [ %61, %23 ]
%64 = phi double [ 0.000000e+00, %8 ], [ %59, %23 ]
%65 = phi double [ 0.000000e+00, %8 ], [ %57, %23 ]
%66 = phi double [ 0.000000e+00, %8 ], [ %55, %23 ]
%67 = phi double [ 0.000000e+00, %8 ], [ %53, %23 ]
%68 = phi double [ 0.000000e+00, %8 ], [ %51, %23 ]
%69 = phi double [ 0.000000e+00, %8 ], [ %49, %23 ]
%70 = phi double [ 0.000000e+00, %8 ], [ %47, %23 ]
%71 = phi double [ 0.000000e+00, %8 ], [ %45, %23 ]
%72 = phi double [ 1.000000e+00, %8 ], [ 1.111200e+05, %23 ]
%73 = phi double [ 1.000000e+00, %8 ], [ %44, %23 ]
%74 = getelementptr inbounds double, double* %6, i64 1
%75 = getelementptr inbounds double, double* %6, i64 2
%76 = getelementptr inbounds double, double* %6, i64 3
%77 = getelementptr inbounds double, double* %6, i64 4
%78 = getelementptr inbounds double, double* %6, i64 5
%79 = getelementptr inbounds double, double* %6, i64 6
%80 = getelementptr inbounds double, double* %6, i64 7
%81 = getelementptr inbounds double, double* %6, i64 8
br label %82
82: ; preds = %62, %82
%83 = phi double [ %63, %62 ], [ %125, %82 ]
%84 = phi double [ %64, %62 ], [ %123, %82 ]
%85 = phi double [ %65, %62 ], [ %121, %82 ]
%86 = phi double [ %66, %62 ], [ %118, %82 ]
%87 = phi double [ %67, %62 ], [ %115, %82 ]
%88 = phi double [ %68, %62 ], [ %112, %82 ]
%89 = phi double [ %69, %62 ], [ %108, %82 ]
%90 = phi double [ %70, %62 ], [ %103, %82 ]
%91 = phi double [ %71, %62 ], [ %98, %82 ]
%92 = phi i64 [ 0, %62 ], [ %126, %82 ]
%93 = getelementptr inbounds double, double* %0, i64 %92
%94 = load double, double* %93
%95 = getelementptr inbounds [8 x double], [8 x double]* %10, i64 0, i64 %92
%96 = load double, double* %95
%97 = fmul double %94, %96
%98 = call double @llvm.fmuladd.f64(double %97, double %73, double %91)
store double %98, double* %6
%99 = load double, double* %93
%100 = getelementptr inbounds [8 x double], [8 x double]* %11, i64 0, i64 %92
%101 = load double, double* %100
%102 = fmul double %99, %101
%103 = call double @llvm.fmuladd.f64(double %102, double %73, double %90)
store double %103, double* %74
%104 = load double, double* %93
%105 = getelementptr inbounds [8 x double], [8 x double]* %12, i64 0, i64 %92
%106 = load double, double* %105
%107 = fmul double %104, %106
%108 = call double @llvm.fmuladd.f64(double %107, double %73, double %89)
store double %108, double* %75
%109 = getelementptr inbounds double, double* %1, i64 %92
%110 = load double, double* %109
%111 = fmul double %96, %110
%112 = call double @llvm.fmuladd.f64(double %111, double %72, double %88)
store double %112, double* %76
%113 = load double, double* %109
%114 = fmul double %101, %113
%115 = call double @llvm.fmuladd.f64(double %114, double %72, double %87)
store double %115, double* %77
%116 = load double, double* %109
%117 = fmul double %106, %116
%118 = call double @llvm.fmuladd.f64(double %117, double %72, double %86)
store double %118, double* %78
%119 = getelementptr inbounds double, double* %2, i64 %92
%120 = load double, double* %119
%121 = call double @llvm.fmuladd.f64(double %120, double %96, double %85)
store double %121, double* %79
%122 = load double, double* %119
%123 = call double @llvm.fmuladd.f64(double %122, double %101, double %84)
store double %123, double* %80
%124 = load double, double* %119
%125 = call double @llvm.fmuladd.f64(double %124, double %106, double %83)
store double %125, double* %81
%126 = add nuw nsw i64 %92, 1
%127 = icmp eq i64 %126, 8
br i1 %127, label %128, label %82
128: ; preds = %82
ret void
}