#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 /*<<< orphan*/ assert(int);
double **createVars(int, int);
int /*<<< orphan*/ destroyVars(double **);
int /*<<< orphan*/ readNcFile(char *, double **, int, int);
int /*<<< orphan*/ submitCdoCommand(char *);
int /*<<< orphan*/ writeNcFile(char *, double const *, int);
void testEcaGsl() {
  const double array1[] = {
      ((6.0) + 273.15),  ((6.0) + 273.15),  ((6.0) + 273.15),
      ((6.0) + 273.15),  ((6.0) + 273.15),  ((6.0) + 273.15),
      ((6.0) + 273.15),  ((-1.0) + 273.15), ((-1.0) + 273.15),
      ((-1.0) + 273.15), ((-1.0) + 273.15), ((-1.0) + 273.15),
      ((-1.0) + 273.15), ((-1.0) + 273.15)};
  const double array2[] = {0.5};
  int nvars = 2;
  int nts = 1;
  double **vars = createVars(nvars, nts);
  writeNcFile("in1.nc", array1, 14);
  writeNcFile("in2.nc", array2, 2);
  submitCdoCommand("eca_gsl in1.nc in2.nc out.nc");
  readNcFile("out.nc", vars, nvars, nts);
  assert((((vars[0][0]) != (vars[0][0])) || ((7.0) != (7.0))
              ? (((vars[0][0]) != (vars[0][0])) && ((7.0) != (7.0)) ? 1 : 0)
              : !(vars[0][0] < 7.0 || 7.0 < vars[0][0])));
  assert((((vars[1][0]) != (vars[1][0])) || ((181.0) != (181.0))
              ? (((vars[1][0]) != (vars[1][0])) && ((181.0) != (181.0)) ? 1 : 0)
              : !(vars[1][0] < 181.0 || 181.0 < vars[1][0])));
  writeNcFile("in1.nc", array1, 7);
  submitCdoCommand("eca_gsl in1.nc in2.nc out.nc");
  readNcFile("out.nc", vars, nvars, nts);
  assert((((vars[0][0]) != (vars[0][0])) || ((1.0) != (1.0))
              ? (((vars[0][0]) != (vars[0][0])) && ((1.0) != (1.0)) ? 1 : 0)
              : !(vars[0][0] < 1.0 || 1.0 < vars[0][0])));
  assert((((vars[1][0]) != (vars[1][0])) || ((181.0) != (181.0))
              ? (((vars[1][0]) != (vars[1][0])) && ((181.0) != (181.0)) ? 1 : 0)
              : !(vars[1][0] < 181.0 || 181.0 < vars[1][0])));
  writeNcFile("in1.nc", array1, 8);
  submitCdoCommand("eca_gsl in1.nc in2.nc out.nc");
  readNcFile("out.nc", vars, nvars, nts);
  assert((((vars[0][0]) != (vars[0][0])) || ((2.0) != (2.0))
              ? (((vars[0][0]) != (vars[0][0])) && ((2.0) != (2.0)) ? 1 : 0)
              : !(vars[0][0] < 2.0 || 2.0 < vars[0][0])));
  assert((((vars[1][0]) != (vars[1][0])) || ((181.0) != (181.0))
              ? (((vars[1][0]) != (vars[1][0])) && ((181.0) != (181.0)) ? 1 : 0)
              : !(vars[1][0] < 181.0 || 181.0 < vars[1][0])));
  destroyVars(vars);
}


x86 assembly (clang, -O0):
<testEcaGsl>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
lea    -0x70(%rbp),%rdi
lea    0xeaa(%rip),%rsi
mov    $0x70,%edx
call   1070 <memcpy@plt>
mov    0xe89(%rip),%rax
mov    %rax,-0x78(%rbp)
movl   $0x2,-0x7c(%rbp)
movl   $0x1,-0x80(%rbp)
mov    -0x7c(%rbp),%edi
mov    -0x80(%rbp),%esi
call   1030 <createVars@plt>
mov    %rax,-0x88(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xeda(%rip),%rdi
mov    $0xe,%edx
call   1080 <writeNcFile@plt>
lea    -0x78(%rbp),%rsi
lea    0xecc(%rip),%rdi
mov    $0x2,%edx
call   1080 <writeNcFile@plt>
lea    0xec2(%rip),%rdi
call   1060 <submitCdoCommand@plt>
mov    -0x88(%rbp),%rsi
mov    -0x7c(%rbp),%edx
mov    -0x80(%rbp),%ecx
lea    0xebf(%rip),%rdi
call   1090 <readNcFile@plt>
mov    -0x88(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
mov    -0x88(%rbp),%rax
mov    (%rax),%rax
ucomisd (%rax),%xmm0
jne    1237 <testEcaGsl+0xc7>
jp     1237 <testEcaGsl+0xc7>
jmp    1297 <testEcaGsl+0x127>
mov    -0x88(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
mov    -0x88(%rbp),%rax
mov    (%rax),%rcx
xor    %eax,%eax
ucomisd (%rcx),%xmm0
mov    %al,-0x89(%rbp)
jne    126c <testEcaGsl+0xfc>
jp     126c <testEcaGsl+0xfc>
jmp    1279 <testEcaGsl+0x109>
xor    %eax,%eax
mov    %al,-0x89(%rbp)
jmp    1279 <testEcaGsl+0x109>
mov    -0x89(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x90(%rbp)
jmp    12f1 <testEcaGsl+0x181>
mov    -0x88(%rbp),%rax
mov    (%rax),%rcx
mov    $0x1,%al
movsd  0xd55(%rip),%xmm0
ucomisd (%rcx),%xmm0
mov    %al,-0x91(%rbp)
ja     12de <testEcaGsl+0x16e>
mov    -0x88(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
movsd  0xd2f(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x91(%rbp)
mov    -0x91(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x90(%rbp)
mov    -0x90(%rbp),%edi
call   1050 <assert@plt>
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rax
movsd  (%rax),%xmm0
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rax
ucomisd (%rax),%xmm0
jne    132b <testEcaGsl+0x1bb>
jp     132b <testEcaGsl+0x1bb>
jmp    138d <testEcaGsl+0x21d>
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rax
movsd  (%rax),%xmm0
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rcx
xor    %eax,%eax
ucomisd (%rcx),%xmm0
mov    %al,-0x92(%rbp)
jne    1362 <testEcaGsl+0x1f2>
jp     1362 <testEcaGsl+0x1f2>
jmp    136f <testEcaGsl+0x1ff>
xor    %eax,%eax
mov    %al,-0x92(%rbp)
jmp    136f <testEcaGsl+0x1ff>
mov    -0x92(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x98(%rbp)
jmp    13e9 <testEcaGsl+0x279>
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rcx
mov    $0x1,%al
movsd  0xc66(%rip),%xmm0
ucomisd (%rcx),%xmm0
mov    %al,-0x99(%rbp)
ja     13d6 <testEcaGsl+0x266>
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rax
movsd  (%rax),%xmm0
movsd  0xc3f(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x99(%rbp)
mov    -0x99(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x98(%rbp)
mov    -0x98(%rbp),%edi
call   1050 <assert@plt>
lea    -0x70(%rbp),%rsi
lea    0xca1(%rip),%rdi
mov    $0x7,%edx
call   1080 <writeNcFile@plt>
lea    0xc9e(%rip),%rdi
call   1060 <submitCdoCommand@plt>
mov    -0x88(%rbp),%rsi
mov    -0x7c(%rbp),%edx
mov    -0x80(%rbp),%ecx
lea    0xc9b(%rip),%rdi
call   1090 <readNcFile@plt>
mov    -0x88(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
mov    -0x88(%rbp),%rax
mov    (%rax),%rax
ucomisd (%rax),%xmm0
jne    145b <testEcaGsl+0x2eb>
jp     145b <testEcaGsl+0x2eb>
jmp    14bb <testEcaGsl+0x34b>
mov    -0x88(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
mov    -0x88(%rbp),%rax
mov    (%rax),%rcx
xor    %eax,%eax
ucomisd (%rcx),%xmm0
mov    %al,-0x9a(%rbp)
jne    1490 <testEcaGsl+0x320>
jp     1490 <testEcaGsl+0x320>
jmp    149d <testEcaGsl+0x32d>
xor    %eax,%eax
mov    %al,-0x9a(%rbp)
jmp    149d <testEcaGsl+0x32d>
mov    -0x9a(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0xa0(%rbp)
jmp    1515 <testEcaGsl+0x3a5>
mov    -0x88(%rbp),%rax
mov    (%rax),%rcx
mov    $0x1,%al
movsd  0xb41(%rip),%xmm0
ucomisd (%rcx),%xmm0
mov    %al,-0xa1(%rbp)
ja     1502 <testEcaGsl+0x392>
mov    -0x88(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
movsd  0xb1b(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0xa1(%rbp)
mov    -0xa1(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xa0(%rbp)
mov    -0xa0(%rbp),%edi
call   1050 <assert@plt>
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rax
movsd  (%rax),%xmm0
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rax
ucomisd (%rax),%xmm0
jne    154f <testEcaGsl+0x3df>
jp     154f <testEcaGsl+0x3df>
jmp    15b1 <testEcaGsl+0x441>
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rax
movsd  (%rax),%xmm0
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rcx
xor    %eax,%eax
ucomisd (%rcx),%xmm0
mov    %al,-0xa2(%rbp)
jne    1586 <testEcaGsl+0x416>
jp     1586 <testEcaGsl+0x416>
jmp    1593 <testEcaGsl+0x423>
xor    %eax,%eax
mov    %al,-0xa2(%rbp)
jmp    1593 <testEcaGsl+0x423>
mov    -0xa2(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0xa8(%rbp)
jmp    160d <testEcaGsl+0x49d>
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rcx
mov    $0x1,%al
movsd  0xa42(%rip),%xmm0
ucomisd (%rcx),%xmm0
mov    %al,-0xa9(%rbp)
ja     15fa <testEcaGsl+0x48a>
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rax
movsd  (%rax),%xmm0
movsd  0xa1b(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0xa9(%rbp)
mov    -0xa9(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xa8(%rbp)
mov    -0xa8(%rbp),%edi
call   1050 <assert@plt>
lea    -0x70(%rbp),%rsi
lea    0xa7d(%rip),%rdi
mov    $0x8,%edx
call   1080 <writeNcFile@plt>
lea    0xa7a(%rip),%rdi
call   1060 <submitCdoCommand@plt>
mov    -0x88(%rbp),%rsi
mov    -0x7c(%rbp),%edx
mov    -0x80(%rbp),%ecx
lea    0xa77(%rip),%rdi
call   1090 <readNcFile@plt>
mov    -0x88(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
mov    -0x88(%rbp),%rax
mov    (%rax),%rax
ucomisd (%rax),%xmm0
jne    167f <testEcaGsl+0x50f>
jp     167f <testEcaGsl+0x50f>
jmp    16df <testEcaGsl+0x56f>
mov    -0x88(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
mov    -0x88(%rbp),%rax
mov    (%rax),%rcx
xor    %eax,%eax
ucomisd (%rcx),%xmm0
mov    %al,-0xaa(%rbp)
jne    16b4 <testEcaGsl+0x544>
jp     16b4 <testEcaGsl+0x544>
jmp    16c1 <testEcaGsl+0x551>
xor    %eax,%eax
mov    %al,-0xaa(%rbp)
jmp    16c1 <testEcaGsl+0x551>
mov    -0xaa(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0xb0(%rbp)
jmp    1739 <testEcaGsl+0x5c9>
mov    -0x88(%rbp),%rax
mov    (%rax),%rcx
mov    $0x1,%al
movsd  0x925(%rip),%xmm0
ucomisd (%rcx),%xmm0
mov    %al,-0xb1(%rbp)
ja     1726 <testEcaGsl+0x5b6>
mov    -0x88(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
movsd  0x8ff(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0xb1(%rbp)
mov    -0xb1(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xb0(%rbp)
mov    -0xb0(%rbp),%edi
call   1050 <assert@plt>
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rax
movsd  (%rax),%xmm0
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rax
ucomisd (%rax),%xmm0
jne    1773 <testEcaGsl+0x603>
jp     1773 <testEcaGsl+0x603>
jmp    17d5 <testEcaGsl+0x665>
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rax
movsd  (%rax),%xmm0
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rcx
xor    %eax,%eax
ucomisd (%rcx),%xmm0
mov    %al,-0xb2(%rbp)
jne    17aa <testEcaGsl+0x63a>
jp     17aa <testEcaGsl+0x63a>
jmp    17b7 <testEcaGsl+0x647>
xor    %eax,%eax
mov    %al,-0xb2(%rbp)
jmp    17b7 <testEcaGsl+0x647>
mov    -0xb2(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0xb8(%rbp)
jmp    1831 <testEcaGsl+0x6c1>
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rcx
mov    $0x1,%al
movsd  0x81e(%rip),%xmm0
ucomisd (%rcx),%xmm0
mov    %al,-0xb9(%rbp)
ja     181e <testEcaGsl+0x6ae>
mov    -0x88(%rbp),%rax
mov    0x8(%rax),%rax
movsd  (%rax),%xmm0
movsd  0x7f7(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0xb9(%rbp)
mov    -0xb9(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xb8(%rbp)
mov    -0xb8(%rbp),%edi
call   1050 <assert@plt>
mov    -0x88(%rbp),%rdi
call   1040 <destroyVars@plt>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testEcaGsl>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x80,%rsp
movaps 0xf09(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xeed(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xeb5(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xe99(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe7d(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe61(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0x3fe0000000000000,%rax
mov    %rax,0x8(%rsp)
mov    $0x2,%edi
mov    $0x1,%esi
call   1030 <createVars@plt>
mov    %rax,%rbx
lea    0xea4(%rip),%r14
lea    0x10(%rsp),%r15
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0xe,%edx
call   1070 <writeNcFile@plt>
lea    0xe8f(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    $0x2,%edx
call   1070 <writeNcFile@plt>
lea    0xe80(%rip),%r12
mov    %r12,%rdi
call   1060 <submitCdoCommand@plt>
lea    0xe87(%rip),%r13
mov    %r13,%rdi
mov    %rbx,%rsi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1080 <readNcFile@plt>
mov    (%rbx),%rax
movsd  (%rax),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
movsd  0xda8(%rip),%xmm1
ucomisd %xmm0,%xmm1
sete   %cl
and    %al,%cl
movzbl %cl,%edi
call   1050 <assert@plt>
mov    0x8(%rbx),%rax
movsd  (%rax),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
movsd  0xd88(%rip),%xmm1
ucomisd %xmm0,%xmm1
sete   %cl
and    %al,%cl
movzbl %cl,%edi
call   1050 <assert@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x7,%edx
call   1070 <writeNcFile@plt>
mov    %r12,%rdi
call   1060 <submitCdoCommand@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1080 <readNcFile@plt>
mov    (%rbx),%rax
movsd  (%rax),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
movsd  0xd3c(%rip),%xmm1
ucomisd %xmm0,%xmm1
sete   %cl
and    %al,%cl
movzbl %cl,%edi
call   1050 <assert@plt>
mov    0x8(%rbx),%rax
movsd  (%rax),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
movsd  0xd0c(%rip),%xmm1
ucomisd %xmm0,%xmm1
sete   %cl
and    %al,%cl
movzbl %cl,%edi
call   1050 <assert@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x8,%edx
call   1070 <writeNcFile@plt>
mov    %r12,%rdi
call   1060 <submitCdoCommand@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1080 <readNcFile@plt>
mov    (%rbx),%rax
movsd  (%rax),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
movsd  0xcc8(%rip),%xmm1
ucomisd %xmm0,%xmm1
sete   %cl
and    %al,%cl
movzbl %cl,%edi
call   1050 <assert@plt>
mov    0x8(%rbx),%rax
movsd  (%rax),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
movsd  0xc90(%rip),%xmm1
ucomisd %xmm0,%xmm1
sete   %cl
and    %al,%cl
movzbl %cl,%edi
call   1050 <assert@plt>
mov    %rbx,%rdi
call   1040 <destroyVars@plt>
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.testEcaGsl.array1 = [14 x double] [double 2.791500e+02, double 2.791500e+02, double 2.791500e+02, double 2.791500e+02, double 2.791500e+02, double 2.791500e+02, double 2.791500e+02, double 2.721500e+02, double 2.721500e+02, double 2.721500e+02, double 2.721500e+02, double 2.721500e+02, double 2.721500e+02, double 2.721500e+02]
@__const.testEcaGsl.array2 = [1 x double] [double 5.000000e-01]
@.str = [7 x i8] c"in1.nc\00"
@.str.1 = [7 x i8] c"in2.nc\00"
@.str.2 = [29 x i8] c"eca_gsl in1.nc in2.nc out.nc\00"
@.str.3 = [7 x i8] c"out.nc\00"
define void @testEcaGsl() {
%1 = alloca [14 x double]
%2 = alloca [1 x double]
%3 = alloca i32
%4 = alloca i32
%5 = alloca double**
%6 = bitcast [14 x double]* %1 to i8*
%7 = bitcast [1 x double]* %2 to i8*
store i32 2, i32* %3
store i32 1, i32* %4
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call double** @createVars(i32 %8, i32 %9)
store double** %10, double*** %5
%11 = getelementptr inbounds [14 x double], [14 x double]* %1, i64 0, i64 0
%12 = call i32 @writeNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %11, i32 14)
%13 = getelementptr inbounds [1 x double], [1 x double]* %2, i64 0, i64 0
%14 = call i32 @writeNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double* %13, i32 2)
%15 = call i32 @submitCdoCommand(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%16 = load double**, double*** %5
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = call i32 @readNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double** %16, i32 %17, i32 %18)
%20 = load double**, double*** %5
%21 = getelementptr inbounds double*, double** %20, i64 0
%22 = load double*, double** %21
%23 = getelementptr inbounds double, double* %22, i64 0
%24 = load double, double* %23
%25 = load double**, double*** %5
%26 = getelementptr inbounds double*, double** %25, i64 0
%27 = load double*, double** %26
%28 = getelementptr inbounds double, double* %27, i64 0
%29 = load double, double* %28
%30 = fcmp une double %24, %29
br i1 %30, label %31, label %48
31: ; preds = %0
%32 = load double**, double*** %5
%33 = getelementptr inbounds double*, double** %32, i64 0
%34 = load double*, double** %33
%35 = getelementptr inbounds double, double* %34, i64 0
%36 = load double, double* %35
%37 = load double**, double*** %5
%38 = getelementptr inbounds double*, double** %37, i64 0
%39 = load double*, double** %38
%40 = getelementptr inbounds double, double* %39, i64 0
%41 = load double, double* %40
%42 = fcmp une double %36, %41
br i1 %42, label %43, label %44
43: ; preds = %31
br label %44
44: ; preds = %43, %31
%45 = phi i1 [ false, %31 ], [ false, %43 ]
%46 = zext i1 %45 to i64
%47 = select i1 %45, i32 1, i32 0
br label %66
48: ; preds = %0
%49 = load double**, double*** %5
%50 = getelementptr inbounds double*, double** %49, i64 0
%51 = load double*, double** %50
%52 = getelementptr inbounds double, double* %51, i64 0
%53 = load double, double* %52
%54 = fcmp olt double %53, 7.000000e+00
br i1 %54, label %62, label %55
55: ; preds = %48
%56 = load double**, double*** %5
%57 = getelementptr inbounds double*, double** %56, i64 0
%58 = load double*, double** %57
%59 = getelementptr inbounds double, double* %58, i64 0
%60 = load double, double* %59
%61 = fcmp olt double 7.000000e+00, %60
br label %62
62: ; preds = %55, %48
%63 = phi i1 [ true, %48 ], [ %61, %55 ]
%64 = xor i1 %63, true
%65 = zext i1 %64 to i32
br label %66
66: ; preds = %62, %44
%67 = phi i32 [ %47, %44 ], [ %65, %62 ]
%68 = call i32 @assert(i32 %67)
%69 = load double**, double*** %5
%70 = getelementptr inbounds double*, double** %69, i64 1
%71 = load double*, double** %70
%72 = getelementptr inbounds double, double* %71, i64 0
%73 = load double, double* %72
%74 = load double**, double*** %5
%75 = getelementptr inbounds double*, double** %74, i64 1
%76 = load double*, double** %75
%77 = getelementptr inbounds double, double* %76, i64 0
%78 = load double, double* %77
%79 = fcmp une double %73, %78
br i1 %79, label %80, label %97
80: ; preds = %66
%81 = load double**, double*** %5
%82 = getelementptr inbounds double*, double** %81, i64 1
%83 = load double*, double** %82
%84 = getelementptr inbounds double, double* %83, i64 0
%85 = load double, double* %84
%86 = load double**, double*** %5
%87 = getelementptr inbounds double*, double** %86, i64 1
%88 = load double*, double** %87
%89 = getelementptr inbounds double, double* %88, i64 0
%90 = load double, double* %89
%91 = fcmp une double %85, %90
br i1 %91, label %92, label %93
92: ; preds = %80
br label %93
93: ; preds = %92, %80
%94 = phi i1 [ false, %80 ], [ false, %92 ]
%95 = zext i1 %94 to i64
%96 = select i1 %94, i32 1, i32 0
br label %115
97: ; preds = %66
%98 = load double**, double*** %5
%99 = getelementptr inbounds double*, double** %98, i64 1
%100 = load double*, double** %99
%101 = getelementptr inbounds double, double* %100, i64 0
%102 = load double, double* %101
%103 = fcmp olt double %102, 1.810000e+02
br i1 %103, label %111, label %104
104: ; preds = %97
%105 = load double**, double*** %5
%106 = getelementptr inbounds double*, double** %105, i64 1
%107 = load double*, double** %106
%108 = getelementptr inbounds double, double* %107, i64 0
%109 = load double, double* %108
%110 = fcmp olt double 1.810000e+02, %109
br label %111
111: ; preds = %104, %97
%112 = phi i1 [ true, %97 ], [ %110, %104 ]
%113 = xor i1 %112, true
%114 = zext i1 %113 to i32
br label %115
115: ; preds = %111, %93
%116 = phi i32 [ %96, %93 ], [ %114, %111 ]
%117 = call i32 @assert(i32 %116)
%118 = getelementptr inbounds [14 x double], [14 x double]* %1, i64 0, i64 0
%119 = call i32 @writeNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %118, i32 7)
%120 = call i32 @submitCdoCommand(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%121 = load double**, double*** %5
%122 = load i32, i32* %3
%123 = load i32, i32* %4
%124 = call i32 @readNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double** %121, i32 %122, i32 %123)
%125 = load double**, double*** %5
%126 = getelementptr inbounds double*, double** %125, i64 0
%127 = load double*, double** %126
%128 = getelementptr inbounds double, double* %127, i64 0
%129 = load double, double* %128
%130 = load double**, double*** %5
%131 = getelementptr inbounds double*, double** %130, i64 0
%132 = load double*, double** %131
%133 = getelementptr inbounds double, double* %132, i64 0
%134 = load double, double* %133
%135 = fcmp une double %129, %134
br i1 %135, label %136, label %153
136: ; preds = %115
%137 = load double**, double*** %5
%138 = getelementptr inbounds double*, double** %137, i64 0
%139 = load double*, double** %138
%140 = getelementptr inbounds double, double* %139, i64 0
%141 = load double, double* %140
%142 = load double**, double*** %5
%143 = getelementptr inbounds double*, double** %142, i64 0
%144 = load double*, double** %143
%145 = getelementptr inbounds double, double* %144, i64 0
%146 = load double, double* %145
%147 = fcmp une double %141, %146
br i1 %147, label %148, label %149
148: ; preds = %136
br label %149
149: ; preds = %148, %136
%150 = phi i1 [ false, %136 ], [ false, %148 ]
%151 = zext i1 %150 to i64
%152 = select i1 %150, i32 1, i32 0
br label %171
153: ; preds = %115
%154 = load double**, double*** %5
%155 = getelementptr inbounds double*, double** %154, i64 0
%156 = load double*, double** %155
%157 = getelementptr inbounds double, double* %156, i64 0
%158 = load double, double* %157
%159 = fcmp olt double %158, 1.000000e+00
br i1 %159, label %167, label %160
160: ; preds = %153
%161 = load double**, double*** %5
%162 = getelementptr inbounds double*, double** %161, i64 0
%163 = load double*, double** %162
%164 = getelementptr inbounds double, double* %163, i64 0
%165 = load double, double* %164
%166 = fcmp olt double 1.000000e+00, %165
br label %167
167: ; preds = %160, %153
%168 = phi i1 [ true, %153 ], [ %166, %160 ]
%169 = xor i1 %168, true
%170 = zext i1 %169 to i32
br label %171
171: ; preds = %167, %149
%172 = phi i32 [ %152, %149 ], [ %170, %167 ]
%173 = call i32 @assert(i32 %172)
%174 = load double**, double*** %5
%175 = getelementptr inbounds double*, double** %174, i64 1
%176 = load double*, double** %175
%177 = getelementptr inbounds double, double* %176, i64 0
%178 = load double, double* %177
%179 = load double**, double*** %5
%180 = getelementptr inbounds double*, double** %179, i64 1
%181 = load double*, double** %180
%182 = getelementptr inbounds double, double* %181, i64 0
%183 = load double, double* %182
%184 = fcmp une double %178, %183
br i1 %184, label %185, label %202
185: ; preds = %171
%186 = load double**, double*** %5
%187 = getelementptr inbounds double*, double** %186, i64 1
%188 = load double*, double** %187
%189 = getelementptr inbounds double, double* %188, i64 0
%190 = load double, double* %189
%191 = load double**, double*** %5
%192 = getelementptr inbounds double*, double** %191, i64 1
%193 = load double*, double** %192
%194 = getelementptr inbounds double, double* %193, i64 0
%195 = load double, double* %194
%196 = fcmp une double %190, %195
br i1 %196, label %197, label %198
197: ; preds = %185
br label %198
198: ; preds = %197, %185
%199 = phi i1 [ false, %185 ], [ false, %197 ]
%200 = zext i1 %199 to i64
%201 = select i1 %199, i32 1, i32 0
br label %220
202: ; preds = %171
%203 = load double**, double*** %5
%204 = getelementptr inbounds double*, double** %203, i64 1
%205 = load double*, double** %204
%206 = getelementptr inbounds double, double* %205, i64 0
%207 = load double, double* %206
%208 = fcmp olt double %207, 1.810000e+02
br i1 %208, label %216, label %209
209: ; preds = %202
%210 = load double**, double*** %5
%211 = getelementptr inbounds double*, double** %210, i64 1
%212 = load double*, double** %211
%213 = getelementptr inbounds double, double* %212, i64 0
%214 = load double, double* %213
%215 = fcmp olt double 1.810000e+02, %214
br label %216
216: ; preds = %209, %202
%217 = phi i1 [ true, %202 ], [ %215, %209 ]
%218 = xor i1 %217, true
%219 = zext i1 %218 to i32
br label %220
220: ; preds = %216, %198
%221 = phi i32 [ %201, %198 ], [ %219, %216 ]
%222 = call i32 @assert(i32 %221)
%223 = getelementptr inbounds [14 x double], [14 x double]* %1, i64 0, i64 0
%224 = call i32 @writeNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %223, i32 8)
%225 = call i32 @submitCdoCommand(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%226 = load double**, double*** %5
%227 = load i32, i32* %3
%228 = load i32, i32* %4
%229 = call i32 @readNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double** %226, i32 %227, i32 %228)
%230 = load double**, double*** %5
%231 = getelementptr inbounds double*, double** %230, i64 0
%232 = load double*, double** %231
%233 = getelementptr inbounds double, double* %232, i64 0
%234 = load double, double* %233
%235 = load double**, double*** %5
%236 = getelementptr inbounds double*, double** %235, i64 0
%237 = load double*, double** %236
%238 = getelementptr inbounds double, double* %237, i64 0
%239 = load double, double* %238
%240 = fcmp une double %234, %239
br i1 %240, label %241, label %258
241: ; preds = %220
%242 = load double**, double*** %5
%243 = getelementptr inbounds double*, double** %242, i64 0
%244 = load double*, double** %243
%245 = getelementptr inbounds double, double* %244, i64 0
%246 = load double, double* %245
%247 = load double**, double*** %5
%248 = getelementptr inbounds double*, double** %247, i64 0
%249 = load double*, double** %248
%250 = getelementptr inbounds double, double* %249, i64 0
%251 = load double, double* %250
%252 = fcmp une double %246, %251
br i1 %252, label %253, label %254
253: ; preds = %241
br label %254
254: ; preds = %253, %241
%255 = phi i1 [ false, %241 ], [ false, %253 ]
%256 = zext i1 %255 to i64
%257 = select i1 %255, i32 1, i32 0
br label %276
258: ; preds = %220
%259 = load double**, double*** %5
%260 = getelementptr inbounds double*, double** %259, i64 0
%261 = load double*, double** %260
%262 = getelementptr inbounds double, double* %261, i64 0
%263 = load double, double* %262
%264 = fcmp olt double %263, 2.000000e+00
br i1 %264, label %272, label %265
265: ; preds = %258
%266 = load double**, double*** %5
%267 = getelementptr inbounds double*, double** %266, i64 0
%268 = load double*, double** %267
%269 = getelementptr inbounds double, double* %268, i64 0
%270 = load double, double* %269
%271 = fcmp olt double 2.000000e+00, %270
br label %272
272: ; preds = %265, %258
%273 = phi i1 [ true, %258 ], [ %271, %265 ]
%274 = xor i1 %273, true
%275 = zext i1 %274 to i32
br label %276
276: ; preds = %272, %254
%277 = phi i32 [ %257, %254 ], [ %275, %272 ]
%278 = call i32 @assert(i32 %277)
%279 = load double**, double*** %5
%280 = getelementptr inbounds double*, double** %279, i64 1
%281 = load double*, double** %280
%282 = getelementptr inbounds double, double* %281, i64 0
%283 = load double, double* %282
%284 = load double**, double*** %5
%285 = getelementptr inbounds double*, double** %284, i64 1
%286 = load double*, double** %285
%287 = getelementptr inbounds double, double* %286, i64 0
%288 = load double, double* %287
%289 = fcmp une double %283, %288
br i1 %289, label %290, label %307
290: ; preds = %276
%291 = load double**, double*** %5
%292 = getelementptr inbounds double*, double** %291, i64 1
%293 = load double*, double** %292
%294 = getelementptr inbounds double, double* %293, i64 0
%295 = load double, double* %294
%296 = load double**, double*** %5
%297 = getelementptr inbounds double*, double** %296, i64 1
%298 = load double*, double** %297
%299 = getelementptr inbounds double, double* %298, i64 0
%300 = load double, double* %299
%301 = fcmp une double %295, %300
br i1 %301, label %302, label %303
302: ; preds = %290
br label %303
303: ; preds = %302, %290
%304 = phi i1 [ false, %290 ], [ false, %302 ]
%305 = zext i1 %304 to i64
%306 = select i1 %304, i32 1, i32 0
br label %325
307: ; preds = %276
%308 = load double**, double*** %5
%309 = getelementptr inbounds double*, double** %308, i64 1
%310 = load double*, double** %309
%311 = getelementptr inbounds double, double* %310, i64 0
%312 = load double, double* %311
%313 = fcmp olt double %312, 1.810000e+02
br i1 %313, label %321, label %314
314: ; preds = %307
%315 = load double**, double*** %5
%316 = getelementptr inbounds double*, double** %315, i64 1
%317 = load double*, double** %316
%318 = getelementptr inbounds double, double* %317, i64 0
%319 = load double, double* %318
%320 = fcmp olt double 1.810000e+02, %319
br label %321
321: ; preds = %314, %307
%322 = phi i1 [ true, %307 ], [ %320, %314 ]
%323 = xor i1 %322, true
%324 = zext i1 %323 to i32
br label %325
325: ; preds = %321, %303
%326 = phi i32 [ %306, %303 ], [ %324, %321 ]
%327 = call i32 @assert(i32 %326)
%328 = load double**, double*** %5
%329 = call i32 @destroyVars(double** %328)
ret void
}

LLVM IR (-O2):
@__const.testEcaGsl.array1 = [14 x double] [double 2.791500e+02, double 2.791500e+02, double 2.791500e+02, double 2.791500e+02, double 2.791500e+02, double 2.791500e+02, double 2.791500e+02, double 2.721500e+02, double 2.721500e+02, double 2.721500e+02, double 2.721500e+02, double 2.721500e+02, double 2.721500e+02, double 2.721500e+02]
@.str = [7 x i8] c"in1.nc\00"
@.str.1 = [7 x i8] c"in2.nc\00"
@.str.2 = [29 x i8] c"eca_gsl in1.nc in2.nc out.nc\00"
@.str.3 = [7 x i8] c"out.nc\00"
define void @testEcaGsl() {
%1 = alloca [14 x double]
%2 = alloca [1 x double]
%3 = bitcast [14 x double]* %1 to i8*
%4 = bitcast [1 x double]* %2 to i8*
%5 = bitcast [1 x double]* %2 to i64*
store i64 4602678819172646912, i64* %5
%6 = tail call double** @createVars(i32 2, i32 1)
%7 = getelementptr inbounds [14 x double], [14 x double]* %1, i64 0, i64 0
%8 = call i32 @writeNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %7, i32 14)
%9 = getelementptr inbounds [1 x double], [1 x double]* %2, i64 0, i64 0
%10 = call i32 @writeNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double* %9, i32 2)
%11 = call i32 @submitCdoCommand(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @readNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double** %6, i32 2, i32 1)
%13 = load double*, double** %6
%14 = load double, double* %13
%15 = fcmp ord double %14, 0.000000e+00
%16 = fcmp ueq double %14, 7.000000e+00
%17 = and i1 %15, %16
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = getelementptr inbounds double*, double** %6, i64 1
%21 = load double*, double** %20
%22 = load double, double* %21
%23 = fcmp ord double %22, 0.000000e+00
%24 = fcmp ueq double %22, 1.810000e+02
%25 = and i1 %23, %24
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
%28 = call i32 @writeNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %7, i32 7)
%29 = call i32 @submitCdoCommand(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%30 = call i32 @readNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double** %6, i32 2, i32 1)
%31 = load double*, double** %6
%32 = load double, double* %31
%33 = fcmp ord double %32, 0.000000e+00
%34 = fcmp ueq double %32, 1.000000e+00
%35 = and i1 %33, %34
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36)
%38 = load double*, double** %20
%39 = load double, double* %38
%40 = fcmp ord double %39, 0.000000e+00
%41 = fcmp ueq double %39, 1.810000e+02
%42 = and i1 %40, %41
%43 = zext i1 %42 to i32
%44 = call i32 @assert(i32 %43)
%45 = call i32 @writeNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %7, i32 8)
%46 = call i32 @submitCdoCommand(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%47 = call i32 @readNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double** %6, i32 2, i32 1)
%48 = load double*, double** %6
%49 = load double, double* %48
%50 = fcmp ord double %49, 0.000000e+00
%51 = fcmp ueq double %49, 2.000000e+00
%52 = and i1 %50, %51
%53 = zext i1 %52 to i32
%54 = call i32 @assert(i32 %53)
%55 = load double*, double** %20
%56 = load double, double* %55
%57 = fcmp ord double %56, 0.000000e+00
%58 = fcmp ueq double %56, 1.810000e+02
%59 = and i1 %57, %58
%60 = zext i1 %59 to i32
%61 = call i32 @assert(i32 %60)
%62 = call i32 @destroyVars(double** %6)
ret void
}