#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*/ error(char *, ...);
scalar_t__ ifFail(int, int, char *);
char *nc_strerror(int);
scalar_t__ strcmp(char const *, char *);
void test_nc_strerror(void) {
  int i;
  const char *message;
  static struct {
    int status;
    char *msg;
  } ncerrs[] = {
      {0, "No error"},
      {(-33), "Not a netCDF id"},
      {(-34), "Too many netCDF files open"},
      {(-35), "netCDF file exists && NC_NOCLOBBER"},
      {(-36), "Invalid argument"},
      {(-37), "Write to read only"},
      {(-38), "Operation not allowed in data mode"},
      {(-39), "Operation not allowed in define mode"},
      {(-40), "Index exceeds dimension bound"},
      {(-41), "NC_MAX_DIMS exceeded"},
      {(-42), "String match to name in use"},
      {(-43), "Attribute not found"},
      {(-44), "NC_MAX_ATTRS exceeded"},
      {(-45), "Not a netCDF data type or _FillValue type mismatch"},
      {(-46), "Invalid dimension id or name"},
      {(-47), "NC_UNLIMITED in the wrong index"},
      {(-48), "NC_MAX_VARS exceeded"},
      {(-49), "Variable not found"},
      {(-50), "Action prohibited on NC_GLOBAL varid"},
      {(-51), "Not a netCDF file"},
      {(-52), "In Fortran, string too short"},
      {(-53), "NC_MAX_NAME exceeded"},
      {(-54), "NC_UNLIMITED size already in use"},
      {(-55), "nc_rec op when there are no record vars"},
      {(-56), "Attempt to convert between text & numbers"},
      {(-57), "Edge+start exceeds dimension bound"},
      {(-58), "Illegal stride"},
      {(-59), "Attribute or variable name contains illegal characters"},
      {(-60), "Numeric conversion not representable"},
      {(-61), "Memory allocation (malloc) failure"},
  };
  message = nc_strerror(-666);
  if (ifFail(strcmp(message, "Unknown Error") != 0, 58,
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/borismarin/genesis2.4gamma/refs/heads/"
             "master/genesis/src/diskio/interface/netcdf/netcdf-3.4/src/"
             "nc_test/test_read.c"))
    error("nc_strerror on bad error status returned: %s", message);
  for (i = 0; i < ((sizeof ncerrs) / (sizeof ncerrs[0])); i++) {
    const char *message = nc_strerror(ncerrs[i].status);
    if (ifFail(strcmp(message, ncerrs[i].msg) != 0, 64,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/borismarin/genesis2.4gamma/"
               "refs/heads/master/genesis/src/diskio/interface/netcdf/"
               "netcdf-3.4/src/nc_test/test_read.c"))
      error("nc_strerror(%d) should return `%s', not `%s'", ncerrs[i].status,
            ncerrs[i].msg, message);
  }
}


x86 assembly (clang, -O0):
<test_nc_strerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0xfffffd66,%edi
call   1060 <nc_strerror@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0x1200(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x3a,%esi
lea    0x11f1(%rip),%rdx
call   1030 <ifFail@plt>
cmp    $0x0,%rax
je     119f <test_nc_strerror+0x5f>
mov    -0x10(%rbp),%rsi
lea    0x12a5(%rip),%rdi
mov    $0x0,%al
call   1050 <error@plt>
movl   $0x0,-0x4(%rbp)
movslq -0x4(%rbp),%rax
cmp    $0x1e,%rax
jae    1266 <test_nc_strerror+0x126>
movslq -0x4(%rbp),%rcx
lea    0x2e91(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%edi
call   1060 <nc_strerror@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
movslq -0x4(%rbp),%rcx
lea    0x2e70(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x40,%esi
lea    0x1167(%rip),%rdx
call   1030 <ifFail@plt>
cmp    $0x0,%rax
je     1253 <test_nc_strerror+0x113>
movslq -0x4(%rbp),%rcx
lea    0x2e2e(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%esi
movslq -0x4(%rbp),%rcx
lea    0x2e1a(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rdx
mov    -0x18(%rbp),%rcx
lea    0x121e(%rip),%rdi
mov    $0x0,%al
call   1050 <error@plt>
jmp    1258 <test_nc_strerror+0x118>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11a6 <test_nc_strerror+0x66>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_nc_strerror>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0xfffffd66,%edi
call   1060 <nc_strerror@plt>
mov    %rax,%rbx
lea    0x1202(%rip),%rsi
mov    %rax,%rdi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
setne  %dil
lea    0x11f8(%rip),%rdx
mov    $0x3a,%esi
call   1030 <ifFail@plt>
test   %rax,%rax
je     1197 <test_nc_strerror+0x57>
lea    0x12b0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <error@plt>
mov    $0x8,%ebx
lea    0x2a9d(%rip),%r14
lea    0x11c5(%rip),%r15
jmp    11bd <test_nc_strerror+0x7d>
nopl   0x0(%rax)
add    $0x10,%rbx
cmp    $0x1e8,%rbx
je     1210 <test_nc_strerror+0xd0>
mov    -0x8(%rbx,%r14,1),%r12d
mov    %r12d,%edi
call   1060 <nc_strerror@plt>
mov    %rax,%r13
mov    (%rbx,%r14,1),%rbp
mov    %rax,%rdi
mov    %rbp,%rsi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
setne  %dil
mov    $0x40,%esi
mov    %r15,%rdx
call   1030 <ifFail@plt>
test   %rax,%rax
je     11b0 <test_nc_strerror+0x70>
lea    0x126c(%rip),%rdi
mov    %r12d,%esi
mov    %rbp,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1050 <error@plt>
jmp    11b0 <test_nc_strerror+0x70>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.anon = type { i32, i8* }
@test_nc_strerror.ncerrs = internal global [30 x %struct.anon] [%struct.anon { i32 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0) }, %struct.anon { i32 -33, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i32 0, i32 0) }, %struct.anon { i32 -34, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i32 0, i32 0) }, %struct.anon { i32 -35, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i32 0, i32 0) }, %struct.anon { i32 -36, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i32 0, i32 0) }, %struct.anon { i32 -37, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i32 0, i32 0) }, %struct.anon { i32 -38, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i32 0, i32 0) }, %struct.anon { i32 -39, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i32 0, i32 0) }, %struct.anon { i32 -40, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i32 0, i32 0) }, %struct.anon { i32 -41, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i32 0, i32 0) }, %struct.anon { i32 -42, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i32 0, i32 0) }, %struct.anon { i32 -43, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i32 0, i32 0) }, %struct.anon { i32 -44, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i32 0, i32 0) }, %struct.anon { i32 -45, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.13, i32 0, i32 0) }, %struct.anon { i32 -46, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i32 0, i32 0) }, %struct.anon { i32 -47, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i32 0, i32 0) }, %struct.anon { i32 -48, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i32 0, i32 0) }, %struct.anon { i32 -49, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i32 0, i32 0) }, %struct.anon { i32 -50, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.18, i32 0, i32 0) }, %struct.anon { i32 -51, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.19, i32 0, i32 0) }, %struct.anon { i32 -52, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.20, i32 0, i32 0) }, %struct.anon { i32 -53, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.21, i32 0, i32 0) }, %struct.anon { i32 -54, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.22, i32 0, i32 0) }, %struct.anon { i32 -55, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.23, i32 0, i32 0) }, %struct.anon { i32 -56, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.24, i32 0, i32 0) }, %struct.anon { i32 -57, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.25, i32 0, i32 0) }, %struct.anon { i32 -58, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.26, i32 0, i32 0) }, %struct.anon { i32 -59, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.27, i32 0, i32 0) }, %struct.anon { i32 -60, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i32 -61, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.29, i32 0, i32 0) }]
@.str = [9 x i8] c"No error\00"
@.str.1 = [16 x i8] c"Not a netCDF id\00"
@.str.2 = [27 x i8] c"Too many netCDF files open\00"
@.str.3 = [35 x i8] c"netCDF file exists && NC_NOCLOBBER\00"
@.str.4 = [17 x i8] c"Invalid argument\00"
@.str.5 = [19 x i8] c"Write to read only\00"
@.str.6 = [35 x i8] c"Operation not allowed in data mode\00"
@.str.7 = [37 x i8] c"Operation not allowed in define mode\00"
@.str.8 = [30 x i8] c"Index exceeds dimension bound\00"
@.str.9 = [21 x i8] c"NC_MAX_DIMS exceeded\00"
@.str.10 = [28 x i8] c"String match to name in use\00"
@.str.11 = [20 x i8] c"Attribute not found\00"
@.str.12 = [22 x i8] c"NC_MAX_ATTRS exceeded\00"
@.str.13 = [51 x i8] c"Not a netCDF data type or _FillValue type mismatch\00"
@.str.14 = [29 x i8] c"Invalid dimension id or name\00"
@.str.15 = [32 x i8] c"NC_UNLIMITED in the wrong index\00"
@.str.16 = [21 x i8] c"NC_MAX_VARS exceeded\00"
@.str.17 = [19 x i8] c"Variable not found\00"
@.str.18 = [37 x i8] c"Action prohibited on NC_GLOBAL varid\00"
@.str.19 = [18 x i8] c"Not a netCDF file\00"
@.str.20 = [29 x i8] c"In Fortran, string too short\00"
@.str.21 = [21 x i8] c"NC_MAX_NAME exceeded\00"
@.str.22 = [33 x i8] c"NC_UNLIMITED size already in use\00"
@.str.23 = [40 x i8] c"nc_rec op when there are no record vars\00"
@.str.24 = [42 x i8] c"Attempt to convert between text & numbers\00"
@.str.25 = [35 x i8] c"Edge+start exceeds dimension bound\00"
@.str.26 = [15 x i8] c"Illegal stride\00"
@.str.27 = [55 x i8] c"Attribute or variable name contains illegal characters\00"
@.str.28 = [37 x i8] c"Numeric conversion not representable\00"
@.str.29 = [35 x i8] c"Memory allocation (malloc) failure\00"
@.str.30 = [14 x i8] c"Unknown Error\00"
@.str.31 = [206 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/borismarin/genesis2.4gamma/refs/heads/master/genesis/src/diskio/interface/netcdf/netcdf-3.4/src/nc_test/test_read.c\00"
@.str.32 = [45 x i8] c"nc_strerror on bad error status returned: %s\00"
@.str.33 = [45 x i8] c"nc_strerror(%d) should return `%s', not `%s'\00"
define void @test_nc_strerror() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = call i8* @nc_strerror(i32 -666)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.30, i64 0, i64 0))
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
%9 = call i64 @ifFail(i32 %8, i32 58, i8* getelementptr inbounds ([206 x i8], [206 x i8]* @.str.31, i64 0, i64 0))
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %0
%12 = load i8*, i8** %2
%13 = call i32 (i8*, ...) @error(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.32, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %11, %0
store i32 0, i32* %1
br label %15
15: ; preds = %51, %14
%16 = load i32, i32* %1
%17 = sext i32 %16 to i64
%18 = icmp ult i64 %17, 30
br i1 %18, label %19, label %54
19: ; preds = %15
%20 = load i32, i32* %1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [30 x %struct.anon], [30 x %struct.anon]* @test_nc_strerror.ncerrs, i64 0, i64 %21
%23 = getelementptr inbounds %struct.anon, %struct.anon* %22, i32 0, i32 0
%24 = load i32, i32* %23
%25 = call i8* @nc_strerror(i32 %24)
store i8* %25, i8** %3
%26 = load i8*, i8** %3
%27 = load i32, i32* %1
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [30 x %struct.anon], [30 x %struct.anon]* @test_nc_strerror.ncerrs, i64 0, i64 %28
%30 = getelementptr inbounds %struct.anon, %struct.anon* %29, i32 0, i32 1
%31 = load i8*, i8** %30
%32 = call i64 @strcmp(i8* %26, i8* %31)
%33 = icmp ne i64 %32, 0
%34 = zext i1 %33 to i32
%35 = call i64 @ifFail(i32 %34, i32 64, i8* getelementptr inbounds ([206 x i8], [206 x i8]* @.str.31, i64 0, i64 0))
%36 = icmp ne i64 %35, 0
br i1 %36, label %37, label %50
37: ; preds = %19
%38 = load i32, i32* %1
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [30 x %struct.anon], [30 x %struct.anon]* @test_nc_strerror.ncerrs, i64 0, i64 %39
%41 = getelementptr inbounds %struct.anon, %struct.anon* %40, i32 0, i32 0
%42 = load i32, i32* %41
%43 = load i32, i32* %1
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [30 x %struct.anon], [30 x %struct.anon]* @test_nc_strerror.ncerrs, i64 0, i64 %44
%46 = getelementptr inbounds %struct.anon, %struct.anon* %45, i32 0, i32 1
%47 = load i8*, i8** %46
%48 = load i8*, i8** %3
%49 = call i32 (i8*, ...) @error(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.33, i64 0, i64 0), i32 %42, i8* %47, i8* %48)
br label %50
50: ; preds = %37, %19
br label %51
51: ; preds = %50
%52 = load i32, i32* %1
%53 = add nsw i32 %52, 1
store i32 %53, i32* %1
br label %15
54: ; preds = %15
ret void
}

LLVM IR (-O2):
%struct.anon = type { i32, i8* }
@test_nc_strerror.ncerrs = internal unnamed_addr constant [30 x %struct.anon] [%struct.anon { i32 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0) }, %struct.anon { i32 -33, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i32 0, i32 0) }, %struct.anon { i32 -34, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i32 0, i32 0) }, %struct.anon { i32 -35, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i32 0, i32 0) }, %struct.anon { i32 -36, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i32 0, i32 0) }, %struct.anon { i32 -37, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i32 0, i32 0) }, %struct.anon { i32 -38, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i32 0, i32 0) }, %struct.anon { i32 -39, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i32 0, i32 0) }, %struct.anon { i32 -40, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i32 0, i32 0) }, %struct.anon { i32 -41, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i32 0, i32 0) }, %struct.anon { i32 -42, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i32 0, i32 0) }, %struct.anon { i32 -43, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i32 0, i32 0) }, %struct.anon { i32 -44, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i32 0, i32 0) }, %struct.anon { i32 -45, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.13, i32 0, i32 0) }, %struct.anon { i32 -46, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i32 0, i32 0) }, %struct.anon { i32 -47, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i32 0, i32 0) }, %struct.anon { i32 -48, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i32 0, i32 0) }, %struct.anon { i32 -49, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i32 0, i32 0) }, %struct.anon { i32 -50, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.18, i32 0, i32 0) }, %struct.anon { i32 -51, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.19, i32 0, i32 0) }, %struct.anon { i32 -52, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.20, i32 0, i32 0) }, %struct.anon { i32 -53, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.21, i32 0, i32 0) }, %struct.anon { i32 -54, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.22, i32 0, i32 0) }, %struct.anon { i32 -55, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.23, i32 0, i32 0) }, %struct.anon { i32 -56, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.24, i32 0, i32 0) }, %struct.anon { i32 -57, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.25, i32 0, i32 0) }, %struct.anon { i32 -58, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.26, i32 0, i32 0) }, %struct.anon { i32 -59, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.27, i32 0, i32 0) }, %struct.anon { i32 -60, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i32 -61, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.29, i32 0, i32 0) }]
@.str = [9 x i8] c"No error\00"
@.str.1 = [16 x i8] c"Not a netCDF id\00"
@.str.2 = [27 x i8] c"Too many netCDF files open\00"
@.str.3 = [35 x i8] c"netCDF file exists && NC_NOCLOBBER\00"
@.str.4 = [17 x i8] c"Invalid argument\00"
@.str.5 = [19 x i8] c"Write to read only\00"
@.str.6 = [35 x i8] c"Operation not allowed in data mode\00"
@.str.7 = [37 x i8] c"Operation not allowed in define mode\00"
@.str.8 = [30 x i8] c"Index exceeds dimension bound\00"
@.str.9 = [21 x i8] c"NC_MAX_DIMS exceeded\00"
@.str.10 = [28 x i8] c"String match to name in use\00"
@.str.11 = [20 x i8] c"Attribute not found\00"
@.str.12 = [22 x i8] c"NC_MAX_ATTRS exceeded\00"
@.str.13 = [51 x i8] c"Not a netCDF data type or _FillValue type mismatch\00"
@.str.14 = [29 x i8] c"Invalid dimension id or name\00"
@.str.15 = [32 x i8] c"NC_UNLIMITED in the wrong index\00"
@.str.16 = [21 x i8] c"NC_MAX_VARS exceeded\00"
@.str.17 = [19 x i8] c"Variable not found\00"
@.str.18 = [37 x i8] c"Action prohibited on NC_GLOBAL varid\00"
@.str.19 = [18 x i8] c"Not a netCDF file\00"
@.str.20 = [29 x i8] c"In Fortran, string too short\00"
@.str.21 = [21 x i8] c"NC_MAX_NAME exceeded\00"
@.str.22 = [33 x i8] c"NC_UNLIMITED size already in use\00"
@.str.23 = [40 x i8] c"nc_rec op when there are no record vars\00"
@.str.24 = [42 x i8] c"Attempt to convert between text & numbers\00"
@.str.25 = [35 x i8] c"Edge+start exceeds dimension bound\00"
@.str.26 = [15 x i8] c"Illegal stride\00"
@.str.27 = [55 x i8] c"Attribute or variable name contains illegal characters\00"
@.str.28 = [37 x i8] c"Numeric conversion not representable\00"
@.str.29 = [35 x i8] c"Memory allocation (malloc) failure\00"
@.str.30 = [14 x i8] c"Unknown Error\00"
@.str.31 = [206 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/borismarin/genesis2.4gamma/refs/heads/master/genesis/src/diskio/interface/netcdf/netcdf-3.4/src/nc_test/test_read.c\00"
@.str.32 = [45 x i8] c"nc_strerror on bad error status returned: %s\00"
@.str.33 = [45 x i8] c"nc_strerror(%d) should return `%s', not `%s'\00"
define void @test_nc_strerror() {
%1 = tail call i8* @nc_strerror(i32 -666)
%2 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.30, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call i64 @ifFail(i32 %4, i32 58, i8* getelementptr inbounds ([206 x i8], [206 x i8]* @.str.31, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = tail call i32 (i8*, ...) @error(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.32, i64 0, i64 0), i8* %1)
br label %9
9: ; preds = %7, %0
br label %10
10: ; preds = %9, %24
%11 = phi i64 [ %25, %24 ], [ 0, %9 ]
%12 = getelementptr inbounds [30 x %struct.anon], [30 x %struct.anon]* @test_nc_strerror.ncerrs, i64 0, i64 %11, i32 0
%13 = load i32, i32* %12
%14 = tail call i8* @nc_strerror(i32 %13)
%15 = getelementptr inbounds [30 x %struct.anon], [30 x %struct.anon]* @test_nc_strerror.ncerrs, i64 0, i64 %11, i32 1
%16 = load i8*, i8** %15
%17 = tail call i64 @strcmp(i8* %14, i8* %16)
%18 = icmp ne i64 %17, 0
%19 = zext i1 %18 to i32
%20 = tail call i64 @ifFail(i32 %19, i32 64, i8* getelementptr inbounds ([206 x i8], [206 x i8]* @.str.31, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %24, label %22
22: ; preds = %10
%23 = tail call i32 (i8*, ...) @error(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.33, i64 0, i64 0), i32 %13, i8* %16, i8* %14)
br label %24
24: ; preds = %22, %10
%25 = add nuw nsw i64 %11, 1
%26 = icmp eq i64 %25, 30
br i1 %26, label %27, label %10
27: ; preds = %24
ret void
}