void dailyGribLoop(int start, int end, int yrLow, double latitude,
                   double longitude, float *lati, float *longi, char *site,
                   char *directory, char *grib_argv[]) {
  int i;
  char temp[4096], temp2[4096], temp3[4096], tempMo[4096];
  for (i = start; i < end; i++) {
    int yr = (i / 36) + yrLow;
    int mo = 1 + (i / (3 * (yr - yrLow + 1)));
    if (mo > 9)
      sprintf(tempMo, "%d", mo);
    else
      sprintf(tempMo, "0%d", mo);
    if (i % 3 == 0) {
      sprintf(temp, "%s%s%d%s.grb2", "griblargeC2//", "tmax//tmax.gdas.", yr,
              tempMo);
      sprintf(temp2, "%s//tmax//%d//tmax_%d%s.csv", directory, yr, yr, tempMo);
    } else if (i % 2 == 0) {
      sprintf(temp, "%s%s%d%s.grb2", "griblargeC2//", "tmin//tmin.gdas.", yr,
              tempMo);
      sprintf(temp2, "%s//tmin//%d//tmin_%d%s.csv", directory, yr, yr, tempMo);
    } else {
      sprintf(temp, "%s%s%d%s.grb2", "griblargeC2//", "ppt//prate.gdas.", yr,
              tempMo);
      sprintf(temp2, "%s//ppt//%d//ppt_%d%s.csv", directory, yr, yr, tempMo);
    }
    if (*lati == -999 || *longi == -999) {
      getCoords(strdup(temp), strdup(site), longitude, latitude, longi, lati);
      sprintf(temp3, "%5.4f:%5.4f", *longi - 0.0001, *longi + 0.0001);
      grib_argv[6] = strdup(temp3);
      sprintf(temp3, "%5.4f:%5.4f", *lati - 0.0001, *lati + 0.0001);
      grib_argv[7] = strdup(temp3);
    }
    grib_argv[1] = strdup(temp);
    grib_argv[9] = strdup(temp2);
    wgrib2(grib_argv);
  }
}


x86 assembly (clang, -O0):
<dailyGribLoop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4050,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    14d0 <dailyGribLoop+0x390>
mov    -0x3c(%rbp),%eax
mov    $0x24,%ecx
cltd
idiv   %ecx
add    -0xc(%rbp),%eax
mov    %eax,-0x4044(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x4044(%rbp),%ecx
sub    -0xc(%rbp),%ecx
add    $0x1,%ecx
imul   $0x3,%ecx,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
mov    %eax,-0x4048(%rbp)
cmpl   $0x9,-0x4048(%rbp)
jle    11e3 <dailyGribLoop+0xa3>
lea    -0x4040(%rbp),%rdi
mov    -0x4048(%rbp),%edx
lea    0xe3a(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    11fe <dailyGribLoop+0xbe>
lea    -0x4040(%rbp),%rdi
mov    -0x4048(%rbp),%edx
lea    0xe19(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
mov    -0x3c(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1275 <dailyGribLoop+0x135>
lea    -0x1040(%rbp),%rdi
mov    -0x4044(%rbp),%r8d
lea    -0x4040(%rbp),%r9
lea    0xde6(%rip),%rsi
lea    0xded(%rip),%rdx
lea    0xdf4(%rip),%rcx
mov    $0x0,%al
call   1050 <sprintf@plt>
lea    -0x2040(%rbp),%rdi
mov    0x10(%rbp),%rdx
mov    -0x4044(%rbp),%ecx
mov    -0x4044(%rbp),%r8d
lea    -0x4040(%rbp),%r9
lea    0xdd8(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    134f <dailyGribLoop+0x20f>
mov    -0x3c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    12ec <dailyGribLoop+0x1ac>
lea    -0x1040(%rbp),%rdi
mov    -0x4044(%rbp),%r8d
lea    -0x4040(%rbp),%r9
lea    0xd6f(%rip),%rsi
lea    0xd76(%rip),%rdx
lea    0xdaa(%rip),%rcx
mov    $0x0,%al
call   1050 <sprintf@plt>
lea    -0x2040(%rbp),%rdi
mov    0x10(%rbp),%rdx
mov    -0x4044(%rbp),%ecx
mov    -0x4044(%rbp),%r8d
lea    -0x4040(%rbp),%r9
lea    0xd8e(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    134a <dailyGribLoop+0x20a>
lea    -0x1040(%rbp),%rdi
mov    -0x4044(%rbp),%r8d
lea    -0x4040(%rbp),%r9
lea    0xd0c(%rip),%rsi
lea    0xd13(%rip),%rdx
lea    0xd74(%rip),%rcx
mov    $0x0,%al
call   1050 <sprintf@plt>
lea    -0x2040(%rbp),%rdi
mov    0x10(%rbp),%rdx
mov    -0x4044(%rbp),%ecx
mov    -0x4044(%rbp),%r8d
lea    -0x4040(%rbp),%r9
lea    0xd58(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    134f <dailyGribLoop+0x20f>
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm0
movss  0xca1(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    1373 <dailyGribLoop+0x233>
jp     1373 <dailyGribLoop+0x233>
jmp    1392 <dailyGribLoop+0x252>
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
movss  0xc7d(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    1489 <dailyGribLoop+0x349>
jp     1489 <dailyGribLoop+0x349>
lea    -0x1040(%rbp),%rdi
call   1060 <strdup@plt>
mov    %rax,-0x4050(%rbp)
mov    -0x38(%rbp),%rdi
call   1060 <strdup@plt>
mov    -0x4050(%rbp),%rdi
mov    %rax,%rsi
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x2,%al
call   1030 <getCoords@plt>
lea    -0x3040(%rbp),%rdi
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc1c(%rip),%xmm1
subsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xc04(%rip),%xmm2
addsd  %xmm2,%xmm1
lea    0xca6(%rip),%rsi
mov    $0x2,%al
call   1050 <sprintf@plt>
lea    -0x3040(%rbp),%rdi
call   1060 <strdup@plt>
mov    %rax,%rcx
mov    0x18(%rbp),%rax
mov    %rcx,0x30(%rax)
lea    -0x3040(%rbp),%rdi
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xbc0(%rip),%xmm1
subsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xba8(%rip),%xmm2
addsd  %xmm2,%xmm1
lea    0xc4a(%rip),%rsi
mov    $0x2,%al
call   1050 <sprintf@plt>
lea    -0x3040(%rbp),%rdi
call   1060 <strdup@plt>
mov    %rax,%rcx
mov    0x18(%rbp),%rax
mov    %rcx,0x38(%rax)
lea    -0x1040(%rbp),%rdi
call   1060 <strdup@plt>
mov    %rax,%rcx
mov    0x18(%rbp),%rax
mov    %rcx,0x8(%rax)
lea    -0x2040(%rbp),%rdi
call   1060 <strdup@plt>
mov    %rax,%rcx
mov    0x18(%rbp),%rax
mov    %rcx,0x48(%rax)
mov    0x18(%rbp),%rdi
mov    $0x0,%al
call   1040 <wgrib2@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1178 <dailyGribLoop+0x38>
add    $0x4050,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dailyGribLoop>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4038,%rsp
mov    %r9,0x28(%rsp)
mov    %r8,0x8(%rsp)
mov    %rcx,0x10(%rsp)
movsd  %xmm1,0x20(%rsp)
movsd  %xmm0,0x18(%rsp)
mov    %edx,0x4(%rsp)
mov    %esi,(%rsp)
cmp    %esi,%edi
jge    13ba <dailyGribLoop+0x27a>
mov    %edi,%r15d
lea    0x3030(%rsp),%r13
lea    0x30(%rsp),%rbp
jmp    129b <dailyGribLoop+0x15b>
mov    %r13,%rdi
call   1060 <strdup@plt>
mov    %rax,%rbx
mov    0x28(%rsp),%rdi
call   1060 <strdup@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
movsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
mov    0x8(%rsp),%rbx
mov    %rbx,%rdx
mov    0x10(%rsp),%rbp
mov    %rbp,%rcx
mov    $0x2,%al
call   1030 <getCoords@plt>
movss  (%rbx),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movaps %xmm1,%xmm0
movsd  0xe24(%rip),%xmm2
addsd  %xmm2,%xmm0
movsd  0xe20(%rip),%xmm2
addsd  %xmm2,%xmm1
lea    0x2030(%rsp),%rbx
mov    %rbx,%rdi
lea    0xeb7(%rip),%r14
mov    %r14,%rsi
mov    $0x2,%al
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1060 <strdup@plt>
mov    0x4078(%rsp),%r12
mov    %rax,0x30(%r12)
movss  0x0(%rbp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movaps %xmm1,%xmm0
addsd  0xdcc(%rip),%xmm0
addsd  0xdcc(%rip),%xmm1
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x2,%al
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1060 <strdup@plt>
mov    %rax,0x38(%r12)
mov    %r13,%rdi
call   1060 <strdup@plt>
mov    0x4078(%rsp),%rbx
mov    %rax,0x8(%rbx)
lea    0x30(%rsp),%rbp
mov    %rbp,%rdi
call   1060 <strdup@plt>
mov    %rax,0x48(%rbx)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <wgrib2@plt>
add    $0x1,%r15d
cmp    %r15d,(%rsp)
je     13ba <dailyGribLoop+0x27a>
mov    %r13,%rbx
movslq %r15d,%r13
imul   $0x38e38e39,%r13,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x23,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%ecx
add    $0x3,%ecx
mov    %eax,%r12d
add    0x4(%rsp),%r12d
mov    %r13d,%eax
cltd
idiv   %ecx
lea    0x1(%rax),%edx
cmp    $0x9,%eax
lea    0xd42(%rip),%rsi
lea    0xd3c(%rip),%rax
cmovge %rax,%rsi
lea    0x1030(%rsp),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <sprintf@plt>
imul   $0xaaaaaaab,%r13d,%eax
add    $0x2aaaaaaa,%eax
test   $0x1,%r13b
mov    %rbx,%r13
lea    0xd85(%rip),%rcx
lea    0xd51(%rip),%rdx
cmove  %rdx,%rcx
lea    0xd84(%rip),%rbx
lea    0xd50(%rip),%rdx
cmove  %rdx,%rbx
cmp    $0x55555555,%eax
lea    0xd02(%rip),%rax
cmovb  %rax,%rcx
lea    0xd08(%rip),%rax
cmovb  %rax,%rbx
mov    %r13,%rdi
lea    0xccd(%rip),%rsi
lea    0xcd4(%rip),%rdx
mov    %r12d,%r8d
mov    %r14,%r9
xor    %eax,%eax
call   1050 <sprintf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    0x4070(%rsp),%rdx
mov    %r12d,%ecx
mov    %r12d,%r8d
mov    %r14,%r9
xor    %eax,%eax
call   1050 <sprintf@plt>
mov    0x10(%rsp),%rax
movss  (%rax),%xmm0
ucomiss 0xc6f(%rip),%xmm0
jne    1399 <dailyGribLoop+0x259>
jnp    1190 <dailyGribLoop+0x50>
mov    0x8(%rsp),%rax
movss  (%rax),%xmm0
ucomiss 0xc57(%rip),%xmm0
jne    125e <dailyGribLoop+0x11e>
jnp    1190 <dailyGribLoop+0x50>
jmp    125e <dailyGribLoop+0x11e>
add    $0x4038,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"0%d\00"
@.str.2 = [14 x i8] c"%s%s%d%s.grb2\00"
@.str.3 = [14 x i8] c"griblargeC2//\00"
@.str.4 = [17 x i8] c"tmax//tmax.gdas.\00"
@.str.5 = [28 x i8] c"%s//tmax//%d//tmax_%d%s.csv\00"
@.str.6 = [17 x i8] c"tmin//tmin.gdas.\00"
@.str.7 = [28 x i8] c"%s//tmin//%d//tmin_%d%s.csv\00"
@.str.8 = [17 x i8] c"ppt//prate.gdas.\00"
@.str.9 = [26 x i8] c"%s//ppt//%d//ppt_%d%s.csv\00"
@.str.10 = [12 x i8] c"%5.4f:%5.4f\00"
define void @dailyGribLoop(i32 %0, i32 %1, i32 %2, double %3, double %4, float* %5, float* %6, i8* %7, i8* %8, i8** %9) {
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca double
%15 = alloca double
%16 = alloca float*
%17 = alloca float*
%18 = alloca i8*
%19 = alloca i8*
%20 = alloca i8**
%21 = alloca i32
%22 = alloca [4096 x i8]
%23 = alloca [4096 x i8]
%24 = alloca [4096 x i8]
%25 = alloca [4096 x i8]
%26 = alloca i32
%27 = alloca i32
store i32 %0, i32* %11
store i32 %1, i32* %12
store i32 %2, i32* %13
store double %3, double* %14
store double %4, double* %15
store float* %5, float** %16
store float* %6, float** %17
store i8* %7, i8** %18
store i8* %8, i8** %19
store i8** %9, i8*** %20
%28 = load i32, i32* %11
store i32 %28, i32* %21
br label %29
29: ; preds = %155, %10
%30 = load i32, i32* %21
%31 = load i32, i32* %12
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %158
33: ; preds = %29
%34 = load i32, i32* %21
%35 = sdiv i32 %34, 36
%36 = load i32, i32* %13
%37 = add nsw i32 %35, %36
store i32 %37, i32* %26
%38 = load i32, i32* %21
%39 = load i32, i32* %26
%40 = load i32, i32* %13
%41 = sub nsw i32 %39, %40
%42 = add nsw i32 %41, 1
%43 = mul nsw i32 3, %42
%44 = sdiv i32 %38, %43
%45 = add nsw i32 1, %44
store i32 %45, i32* %27
%46 = load i32, i32* %27
%47 = icmp sgt i32 %46, 9
br i1 %47, label %48, label %52
48: ; preds = %33
%49 = getelementptr inbounds [4096 x i8], [4096 x i8]* %25, i64 0, i64 0
%50 = load i32, i32* %27
%51 = call i32 (i8*, i8*, ...) @sprintf(i8* %49, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %50)
br label %56
52: ; preds = %33
%53 = getelementptr inbounds [4096 x i8], [4096 x i8]* %25, i64 0, i64 0
%54 = load i32, i32* %27
%55 = call i32 (i8*, i8*, ...) @sprintf(i8* %53, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %54)
br label %56
56: ; preds = %52, %48
%57 = load i32, i32* %21
%58 = srem i32 %57, 3
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %71
60: ; preds = %56
%61 = getelementptr inbounds [4096 x i8], [4096 x i8]* %22, i64 0, i64 0
%62 = load i32, i32* %26
%63 = getelementptr inbounds [4096 x i8], [4096 x i8]* %25, i64 0, i64 0
%64 = call i32 (i8*, i8*, ...) @sprintf(i8* %61, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %62, i8* %63)
%65 = getelementptr inbounds [4096 x i8], [4096 x i8]* %23, i64 0, i64 0
%66 = load i8*, i8** %19
%67 = load i32, i32* %26
%68 = load i32, i32* %26
%69 = getelementptr inbounds [4096 x i8], [4096 x i8]* %25, i64 0, i64 0
%70 = call i32 (i8*, i8*, ...) @sprintf(i8* %65, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i8* %66, i32 %67, i32 %68, i8* %69)
br label %98
71: ; preds = %56
%72 = load i32, i32* %21
%73 = srem i32 %72, 2
%74 = icmp eq i32 %73, 0
br i1 %74, label %75, label %86
75: ; preds = %71
%76 = getelementptr inbounds [4096 x i8], [4096 x i8]* %22, i64 0, i64 0
%77 = load i32, i32* %26
%78 = getelementptr inbounds [4096 x i8], [4096 x i8]* %25, i64 0, i64 0
%79 = call i32 (i8*, i8*, ...) @sprintf(i8* %76, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %77, i8* %78)
%80 = getelementptr inbounds [4096 x i8], [4096 x i8]* %23, i64 0, i64 0
%81 = load i8*, i8** %19
%82 = load i32, i32* %26
%83 = load i32, i32* %26
%84 = getelementptr inbounds [4096 x i8], [4096 x i8]* %25, i64 0, i64 0
%85 = call i32 (i8*, i8*, ...) @sprintf(i8* %80, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i8* %81, i32 %82, i32 %83, i8* %84)
br label %97
86: ; preds = %71
%87 = getelementptr inbounds [4096 x i8], [4096 x i8]* %22, i64 0, i64 0
%88 = load i32, i32* %26
%89 = getelementptr inbounds [4096 x i8], [4096 x i8]* %25, i64 0, i64 0
%90 = call i32 (i8*, i8*, ...) @sprintf(i8* %87, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i32 %88, i8* %89)
%91 = getelementptr inbounds [4096 x i8], [4096 x i8]* %23, i64 0, i64 0
%92 = load i8*, i8** %19
%93 = load i32, i32* %26
%94 = load i32, i32* %26
%95 = getelementptr inbounds [4096 x i8], [4096 x i8]* %25, i64 0, i64 0
%96 = call i32 (i8*, i8*, ...) @sprintf(i8* %91, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i8* %92, i32 %93, i32 %94, i8* %95)
br label %97
97: ; preds = %86, %75
br label %98
98: ; preds = %97, %60
%99 = load float*, float** %16
%100 = load float, float* %99
%101 = fcmp oeq float %100, -9.990000e+02
br i1 %101, label %106, label %102
102: ; preds = %98
%103 = load float*, float** %17
%104 = load float, float* %103
%105 = fcmp oeq float %104, -9.990000e+02
br i1 %105, label %106, label %144
106: ; preds = %102, %98
%107 = getelementptr inbounds [4096 x i8], [4096 x i8]* %22, i64 0, i64 0
%108 = call i8* @strdup(i8* %107)
%109 = load i8*, i8** %18
%110 = call i8* @strdup(i8* %109)
%111 = load double, double* %15
%112 = load double, double* %14
%113 = load float*, float** %17
%114 = load float*, float** %16
%115 = call i32 (i8*, i8*, double, double, float*, float*, ...) bitcast (i32 (...)* @getCoords to i32 (i8*, i8*, double, double, float*, float*, ...)*)(i8* %108, i8* %110, double %111, double %112, float* %113, float* %114)
%116 = getelementptr inbounds [4096 x i8], [4096 x i8]* %24, i64 0, i64 0
%117 = load float*, float** %17
%118 = load float, float* %117
%119 = fpext float %118 to double
%120 = fsub double %119, 1.000000e-04
%121 = load float*, float** %17
%122 = load float, float* %121
%123 = fpext float %122 to double
%124 = fadd double %123, 1.000000e-04
%125 = call i32 (i8*, i8*, ...) @sprintf(i8* %116, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), double %120, double %124)
%126 = getelementptr inbounds [4096 x i8], [4096 x i8]* %24, i64 0, i64 0
%127 = call i8* @strdup(i8* %126)
%128 = load i8**, i8*** %20
%129 = getelementptr inbounds i8*, i8** %128, i64 6
store i8* %127, i8** %129
%130 = getelementptr inbounds [4096 x i8], [4096 x i8]* %24, i64 0, i64 0
%131 = load float*, float** %16
%132 = load float, float* %131
%133 = fpext float %132 to double
%134 = fsub double %133, 1.000000e-04
%135 = load float*, float** %16
%136 = load float, float* %135
%137 = fpext float %136 to double
%138 = fadd double %137, 1.000000e-04
%139 = call i32 (i8*, i8*, ...) @sprintf(i8* %130, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), double %134, double %138)
%140 = getelementptr inbounds [4096 x i8], [4096 x i8]* %24, i64 0, i64 0
%141 = call i8* @strdup(i8* %140)
%142 = load i8**, i8*** %20
%143 = getelementptr inbounds i8*, i8** %142, i64 7
store i8* %141, i8** %143
br label %144
144: ; preds = %106, %102
%145 = getelementptr inbounds [4096 x i8], [4096 x i8]* %22, i64 0, i64 0
%146 = call i8* @strdup(i8* %145)
%147 = load i8**, i8*** %20
%148 = getelementptr inbounds i8*, i8** %147, i64 1
store i8* %146, i8** %148
%149 = getelementptr inbounds [4096 x i8], [4096 x i8]* %23, i64 0, i64 0
%150 = call i8* @strdup(i8* %149)
%151 = load i8**, i8*** %20
%152 = getelementptr inbounds i8*, i8** %151, i64 9
store i8* %150, i8** %152
%153 = load i8**, i8*** %20
%154 = call i32 (i8**, ...) bitcast (i32 (...)* @wgrib2 to i32 (i8**, ...)*)(i8** %153)
br label %155
155: ; preds = %144
%156 = load i32, i32* %21
%157 = add nsw i32 %156, 1
store i32 %157, i32* %21
br label %29
158: ; preds = %29
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"0%d\00"
@.str.2 = [14 x i8] c"%s%s%d%s.grb2\00"
@.str.3 = [14 x i8] c"griblargeC2//\00"
@.str.4 = [17 x i8] c"tmax//tmax.gdas.\00"
@.str.5 = [28 x i8] c"%s//tmax//%d//tmax_%d%s.csv\00"
@.str.6 = [17 x i8] c"tmin//tmin.gdas.\00"
@.str.7 = [28 x i8] c"%s//tmin//%d//tmin_%d%s.csv\00"
@.str.8 = [17 x i8] c"ppt//prate.gdas.\00"
@.str.9 = [26 x i8] c"%s//ppt//%d//ppt_%d%s.csv\00"
@.str.10 = [12 x i8] c"%5.4f:%5.4f\00"
define void @dailyGribLoop(i32 %0, i32 %1, i32 %2, double %3, double %4, float* %5, float* %6, i8* nocapture %7, i8* %8, i8** %9) {
%11 = alloca [4096 x i8]
%12 = alloca [4096 x i8]
%13 = alloca [4096 x i8]
%14 = alloca [4096 x i8]
%15 = getelementptr inbounds [4096 x i8], [4096 x i8]* %11, i64 0, i64 0
%16 = getelementptr inbounds [4096 x i8], [4096 x i8]* %12, i64 0, i64 0
%17 = getelementptr inbounds [4096 x i8], [4096 x i8]* %13, i64 0, i64 0
%18 = getelementptr inbounds [4096 x i8], [4096 x i8]* %14, i64 0, i64 0
%19 = icmp slt i32 %0, %1
br i1 %19, label %20, label %73
20: ; preds = %10
%21 = getelementptr inbounds i8*, i8** %9, i64 6
%22 = getelementptr inbounds i8*, i8** %9, i64 7
%23 = getelementptr inbounds i8*, i8** %9, i64 1
%24 = getelementptr inbounds i8*, i8** %9, i64 9
br label %25
25: ; preds = %20, %67
%26 = phi i32 [ %0, %20 ], [ %71, %67 ]
%27 = sdiv i32 %26, 36
%28 = add nsw i32 %27, %2
%29 = mul nsw i32 %27, 3
%30 = add nsw i32 %29, 3
%31 = sdiv i32 %26, %30
%32 = add nsw i32 %31, 1
%33 = icmp sgt i32 %31, 8
%34 = select i1 %33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%35 = call i32 (i8*, i8*, ...) @sprintf(i8* %18, i8* dereferenceable(1) %34, i32 %32)
%36 = srem i32 %26, 3
%37 = icmp eq i32 %36, 0
%38 = and i32 %26, 1
%39 = icmp eq i32 %38, 0
%40 = select i1 %39, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0)
%41 = select i1 %39, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0)
%42 = select i1 %37, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8* %40
%43 = select i1 %37, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i8* %41
%44 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* %42, i32 %28, i8* %18)
%45 = call i32 (i8*, i8*, ...) @sprintf(i8* %16, i8* dereferenceable(1) %43, i8* %8, i32 %28, i32 %28, i8* %18)
%46 = load float, float* %5
%47 = fcmp oeq float %46, -9.990000e+02
br i1 %47, label %51, label %48
48: ; preds = %25
%49 = load float, float* %6
%50 = fcmp oeq float %49, -9.990000e+02
br i1 %50, label %51, label %67
51: ; preds = %48, %25
%52 = call i8* @strdup(i8* %15)
%53 = call i8* @strdup(i8* %7)
%54 = call i32 (i8*, i8*, double, double, float*, float*, ...) bitcast (i32 (...)* @getCoords to i32 (i8*, i8*, double, double, float*, float*, ...)*)(i8* %52, i8* %53, double %4, double %3, float* %6, float* %5)
%55 = load float, float* %6
%56 = fpext float %55 to double
%57 = fadd double %56, -1.000000e-04
%58 = fadd double %56, 1.000000e-04
%59 = call i32 (i8*, i8*, ...) @sprintf(i8* %17, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), double %57, double %58)
%60 = call i8* @strdup(i8* %17)
store i8* %60, i8** %21
%61 = load float, float* %5
%62 = fpext float %61 to double
%63 = fadd double %62, -1.000000e-04
%64 = fadd double %62, 1.000000e-04
%65 = call i32 (i8*, i8*, ...) @sprintf(i8* %17, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), double %63, double %64)
%66 = call i8* @strdup(i8* %17)
store i8* %66, i8** %22
br label %67
67: ; preds = %51, %48
%68 = call i8* @strdup(i8* %15)
store i8* %68, i8** %23
%69 = call i8* @strdup(i8* %16)
store i8* %69, i8** %24
%70 = call i32 (i8**, ...) bitcast (i32 (...)* @wgrib2 to i32 (i8**, ...)*)(i8** %9)
%71 = add i32 %26, 1
%72 = icmp eq i32 %71, %1
br i1 %72, label %73, label %25
73: ; preds = %67, %10
ret void
}