#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 testTimcount() {
  const double array[] = {-9.0E33, -9.0E33,          ((1.0) + 273.15),
                          -9.0E33, ((1.0) + 273.15), ((1.0) + 273.15)};
  int nvars = 1;
  int nts = 1;
  double **vars = createVars(nvars, nts);
  writeNcFile("in.nc", array, 2);
  submitCdoCommand("timcount in.nc out.nc");
  readNcFile("out.nc", vars, nvars, nts);
  assert((
      ((vars[0][0]) != (vars[0][0])) || ((-9.0E33) != (-9.0E33))
          ? (((vars[0][0]) != (vars[0][0])) && ((-9.0E33) != (-9.0E33)) ? 1 : 0)
          : !(vars[0][0] < -9.0E33 || -9.0E33 < vars[0][0])));
  writeNcFile("in.nc", array, 3);
  submitCdoCommand("timcount in.nc out.nc");
  readNcFile("out.nc", vars, nvars, nts);
  assert((((vars[0][0]) != (vars[0][0])) || ((1.) != (1.))
              ? (((vars[0][0]) != (vars[0][0])) && ((1.) != (1.)) ? 1 : 0)
              : !(vars[0][0] < 1. || 1. < vars[0][0])));
  writeNcFile("in.nc", array, 5);
  submitCdoCommand("timcount in.nc out.nc");
  readNcFile("out.nc", vars, nvars, nts);
  assert((((vars[0][0]) != (vars[0][0])) || ((2.) != (2.))
              ? (((vars[0][0]) != (vars[0][0])) && ((2.) != (2.)) ? 1 : 0)
              : !(vars[0][0] < 2. || 2. < vars[0][0])));
  writeNcFile("in.nc", array, 6);
  submitCdoCommand("timcount in.nc out.nc");
  readNcFile("out.nc", vars, nvars, nts);
  assert((((vars[0][0]) != (vars[0][0])) || ((3.) != (3.))
              ? (((vars[0][0]) != (vars[0][0])) && ((3.) != (3.)) ? 1 : 0)
              : !(vars[0][0] < 3. || 3. < vars[0][0])));
  destroyVars(vars);
}


x86 assembly (clang, -O0):
<testTimcount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1050 <memset@plt>
movsd  0xe78(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe6b(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe56(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe51(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe3c(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe2f(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movl   $0x1,-0x34(%rbp)
movl   $0x1,-0x38(%rbp)
mov    -0x34(%rbp),%edi
mov    -0x38(%rbp),%esi
call   1030 <createVars@plt>
mov    %rax,-0x40(%rbp)
lea    -0x30(%rbp),%rsi
lea    0xe2a(%rip),%rdi
mov    $0x2,%edx
call   1080 <writeNcFile@plt>
lea    0xe1f(%rip),%rdi
call   1070 <submitCdoCommand@plt>
mov    -0x40(%rbp),%rsi
mov    -0x34(%rbp),%edx
mov    -0x38(%rbp),%ecx
lea    0xe18(%rip),%rdi
call   1090 <readNcFile@plt>
mov    -0x40(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
mov    -0x40(%rbp),%rax
mov    (%rax),%rax
ucomisd (%rax),%xmm0
jne    1251 <testTimcount+0xe1>
jp     1251 <testTimcount+0xe1>
jmp    129f <testTimcount+0x12f>
mov    -0x40(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
mov    -0x40(%rbp),%rax
mov    (%rax),%rcx
xor    %eax,%eax
ucomisd (%rcx),%xmm0
mov    %al,-0x41(%rbp)
jne    127d <testTimcount+0x10d>
jp     127d <testTimcount+0x10d>
jmp    1287 <testTimcount+0x117>
xor    %eax,%eax
mov    %al,-0x41(%rbp)
jmp    1287 <testTimcount+0x117>
mov    -0x41(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x48(%rbp)
jmp    12e7 <testTimcount+0x177>
mov    -0x40(%rbp),%rax
mov    (%rax),%rcx
mov    $0x1,%al
movsd  0xd58(%rip),%xmm0
ucomisd (%rcx),%xmm0
mov    %al,-0x49(%rbp)
ja     12da <testTimcount+0x16a>
mov    -0x40(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
movsd  0xd38(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x49(%rbp)
mov    -0x49(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%edi
call   1060 <assert@plt>
lea    -0x30(%rbp),%rsi
lea    0xd2e(%rip),%rdi
mov    $0x3,%edx
call   1080 <writeNcFile@plt>
lea    0xd23(%rip),%rdi
call   1070 <submitCdoCommand@plt>
mov    -0x40(%rbp),%rsi
mov    -0x34(%rbp),%edx
mov    -0x38(%rbp),%ecx
lea    0xd1c(%rip),%rdi
call   1090 <readNcFile@plt>
mov    -0x40(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
mov    -0x40(%rbp),%rax
mov    (%rax),%rax
ucomisd (%rax),%xmm0
jne    134d <testTimcount+0x1dd>
jp     134d <testTimcount+0x1dd>
jmp    139b <testTimcount+0x22b>
mov    -0x40(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
mov    -0x40(%rbp),%rax
mov    (%rax),%rcx
xor    %eax,%eax
ucomisd (%rcx),%xmm0
mov    %al,-0x4a(%rbp)
jne    1379 <testTimcount+0x209>
jp     1379 <testTimcount+0x209>
jmp    1383 <testTimcount+0x213>
xor    %eax,%eax
mov    %al,-0x4a(%rbp)
jmp    1383 <testTimcount+0x213>
mov    -0x4a(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x50(%rbp)
jmp    13e3 <testTimcount+0x273>
mov    -0x40(%rbp),%rax
mov    (%rax),%rcx
mov    $0x1,%al
movsd  0xc64(%rip),%xmm0
ucomisd (%rcx),%xmm0
mov    %al,-0x51(%rbp)
ja     13d6 <testTimcount+0x266>
mov    -0x40(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
movsd  0xc44(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x51(%rbp)
mov    -0x51(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%edi
call   1060 <assert@plt>
lea    -0x30(%rbp),%rsi
lea    0xc32(%rip),%rdi
mov    $0x5,%edx
call   1080 <writeNcFile@plt>
lea    0xc27(%rip),%rdi
call   1070 <submitCdoCommand@plt>
mov    -0x40(%rbp),%rsi
mov    -0x34(%rbp),%edx
mov    -0x38(%rbp),%ecx
lea    0xc20(%rip),%rdi
call   1090 <readNcFile@plt>
mov    -0x40(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
mov    -0x40(%rbp),%rax
mov    (%rax),%rax
ucomisd (%rax),%xmm0
jne    1449 <testTimcount+0x2d9>
jp     1449 <testTimcount+0x2d9>
jmp    1497 <testTimcount+0x327>
mov    -0x40(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
mov    -0x40(%rbp),%rax
mov    (%rax),%rcx
xor    %eax,%eax
ucomisd (%rcx),%xmm0
mov    %al,-0x52(%rbp)
jne    1475 <testTimcount+0x305>
jp     1475 <testTimcount+0x305>
jmp    147f <testTimcount+0x30f>
xor    %eax,%eax
mov    %al,-0x52(%rbp)
jmp    147f <testTimcount+0x30f>
mov    -0x52(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x58(%rbp)
jmp    14df <testTimcount+0x36f>
mov    -0x40(%rbp),%rax
mov    (%rax),%rcx
mov    $0x1,%al
movsd  0xb70(%rip),%xmm0
ucomisd (%rcx),%xmm0
mov    %al,-0x59(%rbp)
ja     14d2 <testTimcount+0x362>
mov    -0x40(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
movsd  0xb50(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x59(%rbp)
mov    -0x59(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%edi
call   1060 <assert@plt>
lea    -0x30(%rbp),%rsi
lea    0xb36(%rip),%rdi
mov    $0x6,%edx
call   1080 <writeNcFile@plt>
lea    0xb2b(%rip),%rdi
call   1070 <submitCdoCommand@plt>
mov    -0x40(%rbp),%rsi
mov    -0x34(%rbp),%edx
mov    -0x38(%rbp),%ecx
lea    0xb24(%rip),%rdi
call   1090 <readNcFile@plt>
mov    -0x40(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
mov    -0x40(%rbp),%rax
mov    (%rax),%rax
ucomisd (%rax),%xmm0
jne    1545 <testTimcount+0x3d5>
jp     1545 <testTimcount+0x3d5>
jmp    1593 <testTimcount+0x423>
mov    -0x40(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
mov    -0x40(%rbp),%rax
mov    (%rax),%rcx
xor    %eax,%eax
ucomisd (%rcx),%xmm0
mov    %al,-0x5a(%rbp)
jne    1571 <testTimcount+0x401>
jp     1571 <testTimcount+0x401>
jmp    157b <testTimcount+0x40b>
xor    %eax,%eax
mov    %al,-0x5a(%rbp)
jmp    157b <testTimcount+0x40b>
mov    -0x5a(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x60(%rbp)
jmp    15db <testTimcount+0x46b>
mov    -0x40(%rbp),%rax
mov    (%rax),%rcx
mov    $0x1,%al
movsd  0xa7c(%rip),%xmm0
ucomisd (%rcx),%xmm0
mov    %al,-0x61(%rbp)
ja     15ce <testTimcount+0x45e>
mov    -0x40(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
movsd  0xa5c(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x61(%rbp)
mov    -0x61(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x60(%rbp)
mov    -0x60(%rbp),%edi
call   1060 <assert@plt>
mov    -0x40(%rbp),%rdi
call   1040 <destroyVars@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testTimcount>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x30,%rsp
movaps 0xe8c(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xe91(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe95(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <createVars@plt>
mov    %rax,%rbx
lea    0xea7(%rip),%r14
mov    %rsp,%r15
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x2,%edx
call   1070 <writeNcFile@plt>
lea    0xe93(%rip),%r12
mov    %r12,%rdi
call   1060 <submitCdoCommand@plt>
lea    0xe93(%rip),%r13
mov    %r13,%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1080 <readNcFile@plt>
mov    (%rbx),%rax
movsd  (%rax),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
movsd  0xe33(%rip),%xmm1
ucomisd %xmm0,%xmm1
sete   %cl
and    %al,%cl
movzbl %cl,%edi
call   1050 <assert@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x3,%edx
call   1070 <writeNcFile@plt>
mov    %r12,%rdi
call   1060 <submitCdoCommand@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1080 <readNcFile@plt>
mov    (%rbx),%rax
movsd  (%rax),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
movsd  0xde7(%rip),%xmm1
ucomisd %xmm0,%xmm1
sete   %cl
and    %al,%cl
movzbl %cl,%edi
call   1050 <assert@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x5,%edx
call   1070 <writeNcFile@plt>
mov    %r12,%rdi
call   1060 <submitCdoCommand@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1080 <readNcFile@plt>
mov    (%rbx),%rax
movsd  (%rax),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
movsd  0xd9b(%rip),%xmm1
ucomisd %xmm0,%xmm1
sete   %cl
and    %al,%cl
movzbl %cl,%edi
call   1050 <assert@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x6,%edx
call   1070 <writeNcFile@plt>
mov    %r12,%rdi
call   1060 <submitCdoCommand@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1080 <readNcFile@plt>
mov    (%rbx),%rax
movsd  (%rax),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
movsd  0xd4f(%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    $0x30,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"in.nc\00"
@.str.1 = [22 x i8] c"timcount in.nc out.nc\00"
@.str.2 = [7 x i8] c"out.nc\00"
define void @testTimcount() {
%1 = alloca [6 x double]
%2 = bitcast [6 x double]* %1 to i8*
%3 = getelementptr inbounds [6 x double], [6 x double]* %1, i64 0, i64 0
%4 = bitcast [6 x double]* %1 to <2 x double>*
store <2 x double> <double -9.000000e+33, double -9.000000e+33>, <2 x double>* %4
%5 = getelementptr inbounds [6 x double], [6 x double]* %1, i64 0, i64 2
%6 = bitcast double* %5 to <2 x double>*
store <2 x double> <double 2.741500e+02, double -9.000000e+33>, <2 x double>* %6
%7 = getelementptr inbounds [6 x double], [6 x double]* %1, i64 0, i64 4
%8 = bitcast double* %7 to <2 x double>*
store <2 x double> <double 2.741500e+02, double 2.741500e+02>, <2 x double>* %8
%9 = tail call double** @createVars(i32 1, i32 1)
%10 = call i32 @writeNcFile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double* %3, i32 2)
%11 = call i32 @submitCdoCommand(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @readNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double** %9, i32 1, i32 1)
%13 = load double*, double** %9
%14 = load double, double* %13
%15 = fcmp ord double %14, 0.000000e+00
%16 = fcmp ueq double %14, -9.000000e+33
%17 = and i1 %15, %16
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = call i32 @writeNcFile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double* %3, i32 3)
%21 = call i32 @submitCdoCommand(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%22 = call i32 @readNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double** %9, i32 1, i32 1)
%23 = load double*, double** %9
%24 = load double, double* %23
%25 = fcmp ord double %24, 0.000000e+00
%26 = fcmp ueq double %24, 1.000000e+00
%27 = and i1 %25, %26
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
%30 = call i32 @writeNcFile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double* %3, i32 5)
%31 = call i32 @submitCdoCommand(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%32 = call i32 @readNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double** %9, i32 1, i32 1)
%33 = load double*, double** %9
%34 = load double, double* %33
%35 = fcmp ord double %34, 0.000000e+00
%36 = fcmp ueq double %34, 2.000000e+00
%37 = and i1 %35, %36
%38 = zext i1 %37 to i32
%39 = call i32 @assert(i32 %38)
%40 = call i32 @writeNcFile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double* %3, i32 6)
%41 = call i32 @submitCdoCommand(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%42 = call i32 @readNcFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double** %9, i32 1, i32 1)
%43 = load double*, double** %9
%44 = load double, double* %43
%45 = fcmp ord double %44, 0.000000e+00
%46 = fcmp ueq double %44, 3.000000e+00
%47 = and i1 %45, %46
%48 = zext i1 %47 to i32
%49 = call i32 @assert(i32 %48)
%50 = call i32 @destroyVars(double** %9)
ret void
}