int main(int argc, char **argv) {
  double inLat[100] = {
      40.677159, 40.677153, 40.677148, 40.677142, 40.677137, 40.677131,
      40.677126, 40.677121, 40.677115, 40.677110, 40.676348, 40.676342,
      40.676337, 40.676332, 40.676326, 40.676321, 40.676315, 40.676310,
      40.676304, 40.676299, 40.675537, 40.675532, 40.675526, 40.675521,
      40.675515, 40.675510, 40.675504, 40.675499, 40.675494, 40.675488,
      40.674726, 40.674721, 40.674715, 40.674710, 40.674705, 40.674699,
      40.674694, 40.674688, 40.674683, 40.674677, 40.673916, 40.673910,
      40.673905, 40.673899, 40.673894, 40.673888, 40.673883, 40.673877,
      40.673872, 40.673867, 40.673105, 40.673099, 40.673094, 40.673089,
      40.673083, 40.673078, 40.673072, 40.673067, 40.673061, 40.673056,
      40.672294, 40.672289, 40.672283, 40.672278, 40.672272, 40.672267,
      40.672261, 40.672256, 40.672251, 40.672245, 40.671483, 40.671478,
      40.671472, 40.671467, 40.671462, 40.671456, 40.671451, 40.671445,
      40.671440, 40.671434, 40.670673, 40.670667, 40.670662, 40.670656,
      40.670651, 40.670645, 40.670640, 40.670634, 40.670629, 40.670624,
      40.669862, 40.669856, 40.669851, 40.669846, 40.669840, 40.669835,
      40.669829, 40.669824, 40.669818, 40.669813};
  double inLon[100] = {
      -86.459595, -86.458530, -86.457466, -86.456401, -86.455336, -86.454271,
      -86.453206, -86.452141, -86.451076, -86.450011, -86.459602, -86.458537,
      -86.457472, -86.456407, -86.455342, -86.454277, -86.453213, -86.452148,
      -86.451083, -86.450018, -86.459608, -86.458544, -86.457479, -86.456414,
      -86.455349, -86.454284, -86.453219, -86.452154, -86.451089, -86.450025,
      -86.459615, -86.458550, -86.457485, -86.456420, -86.455356, -86.454291,
      -86.453226, -86.452161, -86.451096, -86.450031, -86.459621, -86.458557,
      -86.457492, -86.456427, -86.455362, -86.454297, -86.453232, -86.452168,
      -86.451103, -86.450038, -86.459628, -86.458563, -86.457498, -86.456434,
      -86.455369, -86.454304, -86.453239, -86.452174, -86.451109, -86.450045,
      -86.459635, -86.458570, -86.457505, -86.456440, -86.455375, -86.454310,
      -86.453246, -86.452181, -86.451116, -86.450051, -86.459641, -86.458576,
      -86.457511, -86.456447, -86.455382, -86.454317, -86.453252, -86.452187,
      -86.451123, -86.450058, -86.459648, -86.458583, -86.457518, -86.456453,
      -86.455388, -86.454324, -86.453259, -86.452194, -86.451129, -86.450064,
      -86.459654, -86.458589, -86.457525, -86.456460, -86.455395, -86.454330,
      -86.453265, -86.452201, -86.451136, -86.450071};
  double inVal[100] = {
      40.677159, 40.677153, 40.677148, 40.677142, 40.677137, 40.677131,
      40.677126, 40.677121, 40.677115, 40.677110, 40.676348, 40.676342,
      40.676337, 40.676332, 40.676326, 40.676321, 40.676315, 40.676310,
      40.676304, 40.676299, 40.675537, 40.675532, 40.675526, 40.675521,
      40.675515, 40.675510, 40.675504, 40.675499, 40.675494, 40.675488,
      40.674726, 40.674721, 40.674715, 40.674710, 40.674705, 40.674699,
      40.674694, 40.674688, 40.674683, 40.674677, 40.673916, 40.673910,
      40.673905, 40.673899, 40.673894, 40.673888, 40.673883, 40.673877,
      40.673872, 40.673867, 40.673105, 40.673099, 40.673094, 40.673089,
      40.673083, 40.673078, 40.673072, 40.673067, 40.673061, 40.673056,
      40.672294, 40.672289, 40.672283, 40.672278, 40.672272, 40.672267,
      40.672261, 40.672256, 40.672251, 40.672245, 40.671483, 40.671478,
      40.671472, 40.671467, 40.671462, 40.671456, 40.671451, 40.671445,
      40.671440, 40.671434, 40.670673, 40.670667, 40.670662, 40.670656,
      40.670651, 40.670645, 40.670640, 40.670634, 40.670629, 40.670624,
      40.669862, 40.669856, 40.669851, 40.669846, 40.669840, 40.669835,
      40.669829, 40.669824, 40.669818, 40.669813};
  int nIn = 100;
  double outLat[100] = {
      40.677159, 40.677154, 40.677149, 40.677144, 40.677139, 40.677134,
      40.677129, 40.677124, 40.677118, 40.677113, 40.676348, 40.676343,
      40.676338, 40.676333, 40.676328, 40.676323, 40.676318, 40.676313,
      40.676308, 40.676303, 40.675537, 40.675532, 40.675527, 40.675522,
      40.675517, 40.675512, 40.675507, 40.675502, 40.675497, 40.675492,
      40.674726, 40.674721, 40.674716, 40.674711, 40.674706, 40.674701,
      40.674696, 40.674691, 40.674686, 40.674681, 40.673916, 40.673911,
      40.673906, 40.673901, 40.673896, 40.673891, 40.673886, 40.673880,
      40.673875, 40.673870, 40.673105, 40.673100, 40.673095, 40.673090,
      40.673085, 40.673080, 40.673075, 40.673070, 40.673065, 40.673060,
      40.672294, 40.672289, 40.672284, 40.672279, 40.672274, 40.672269,
      40.672264, 40.672259, 40.672254, 40.672249, 40.671483, 40.671478,
      40.671473, 40.671468, 40.671463, 40.671458, 40.671453, 40.671448,
      40.671443, 40.671438, 40.670673, 40.670668, 40.670663, 40.670658,
      40.670653, 40.670648, 40.670643, 40.670637, 40.670632, 40.670627,
      40.669862, 40.669857, 40.669852, 40.669847, 40.669842, 40.669837,
      40.669832, 40.669827, 40.669822, 40.669817};
  double outLon[100] = {
      -86.459595, -86.458530, -86.457466, -86.456401, -86.455336, -86.454271,
      -86.453206, -86.452141, -86.451076, -86.450011, -86.459602, -86.458537,
      -86.457472, -86.456407, -86.455342, -86.454277, -86.453213, -86.452148,
      -86.451083, -86.450018, -86.459608, -86.458544, -86.457479, -86.456414,
      -86.455349, -86.454284, -86.453219, -86.452154, -86.451089, -86.450025,
      -86.459615, -86.458550, -86.457485, -86.456420, -86.455356, -86.454291,
      -86.453226, -86.452161, -86.451096, -86.450031, -86.459621, -86.458557,
      -86.457492, -86.456427, -86.455362, -86.454297, -86.453232, -86.452168,
      -86.451103, -86.450038, -86.459628, -86.458563, -86.457498, -86.456434,
      -86.455369, -86.454304, -86.453239, -86.452174, -86.451109, -86.450045,
      -86.459635, -86.458570, -86.457505, -86.456440, -86.455375, -86.454310,
      -86.453246, -86.452181, -86.451116, -86.450051, -86.459641, -86.458576,
      -86.457511, -86.456447, -86.455382, -86.454317, -86.453252, -86.452187,
      -86.451123, -86.450058, -86.459648, -86.458583, -86.457518, -86.456453,
      -86.455388, -86.454324, -86.453259, -86.452194, -86.451129, -86.450064,
      -86.459654, -86.458589, -86.457525, -86.456460, -86.455395, -86.454330,
      -86.453265, -86.452201, -86.451136, -86.450071};
  int nOut = 100;
  double maxR = 100;
  double *iLat, *iLon, *oLat, *oLon, *iVal, *oVal;
  double **piLat, **piLon;
  int *tarNNSouID;
  iLat = (double *)malloc(sizeof(double) * nIn);
  iLon = (double *)malloc(sizeof(double) * nIn);
  iVal = (double *)malloc(sizeof(double) * nIn);
  piLat = &iLat;
  piLon = &iLon;
  oLat = (double *)malloc(sizeof(double) * nOut);
  oLon = (double *)malloc(sizeof(double) * nOut);
  oVal = (double *)malloc(sizeof(double) * nOut);
  tarNNSouID = (int *)malloc(sizeof(int) * nOut);
  for (int i = 0; i < nIn; i++) {
    iLat[i] = inLat[i];
    iLon[i] = inLon[i];
    iVal[i] = inVal[i];
  }
  for (int i = 0; i < nOut; i++) {
    oLat[i] = outLat[i];
    oLon[i] = outLon[i];
  }
  double *tarNNDis;
  tarNNDis = (double *)malloc(sizeof(double) * nOut);
  nearestNeighbor(piLat, piLon, nIn, oLat, oLon, tarNNSouID, tarNNDis, nOut,
                  maxR);
  nnInterpolate(iVal, oVal, tarNNSouID, nOut);
  printf("InLat, InLon\n");
  for (int i = 0; i < nIn; i++) {
    printf("%lf,%lf\n", inLat[i], inLon[i]);
  }
  printf("OutLat, OutLon, Val\n");
  for (int i = 0; i < nOut; i++) {
    printf("%lf,\t%lf,\t%lf,\t%lf\n", outLat[i], outLon[i], oVal[i],
           tarNNDis[i]);
  }
  free(*piLat);
  free(*piLon);
  free(iVal);
  free(oLat);
  free(oLon);
  free(oVal);
  free(tarNNSouID);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1040,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x330(%rbp),%rdi
lea    0xe89(%rip),%rsi
mov    $0x320,%edx
call   1060 <memcpy@plt>
lea    -0x650(%rbp),%rdi
lea    0x1191(%rip),%rsi
mov    $0x320,%edx
call   1060 <memcpy@plt>
lea    -0x970(%rbp),%rdi
lea    0x1499(%rip),%rsi
mov    $0x320,%edx
call   1060 <memcpy@plt>
movl   $0x64,-0x974(%rbp)
lea    -0xca0(%rbp),%rdi
lea    0x1797(%rip),%rsi
mov    $0x320,%edx
call   1060 <memcpy@plt>
lea    -0xfc0(%rbp),%rdi
lea    0x1a9f(%rip),%rsi
mov    $0x320,%edx
call   1060 <memcpy@plt>
movl   $0x64,-0xfc4(%rbp)
movsd  0xdf3(%rip),%xmm0
movsd  %xmm0,-0xfd0(%rbp)
ff
movslq -0x974(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xfd8(%rbp)
movslq -0x974(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xfe0(%rbp)
movslq -0x974(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xff8(%rbp)
lea    -0xfd8(%rbp),%rax
mov    %rax,-0x1008(%rbp)
lea    -0xfe0(%rbp),%rax
mov    %rax,-0x1010(%rbp)
movslq -0xfc4(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xfe8(%rbp)
movslq -0xfc4(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xff0(%rbp)
movslq -0xfc4(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x1000(%rbp)
movslq -0xfc4(%rbp),%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x1018(%rbp)
movl   $0x0,-0x101c(%rbp)
mov    -0x101c(%rbp),%eax
cmp    -0x974(%rbp),%eax
jge    136b <main+0x20b>
movslq -0x101c(%rbp),%rax
movsd  -0x330(%rbp,%rax,8),%xmm0
ff ff
mov    -0xfd8(%rbp),%rax
movslq -0x101c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x101c(%rbp),%rax
movsd  -0x650(%rbp,%rax,8),%xmm0
ff ff
mov    -0xfe0(%rbp),%rax
movslq -0x101c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x101c(%rbp),%rax
movsd  -0x970(%rbp,%rax,8),%xmm0
ff ff
mov    -0xff8(%rbp),%rax
movslq -0x101c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x101c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x101c(%rbp)
jmp    12dc <main+0x17c>
movl   $0x0,-0x1020(%rbp)
mov    -0x1020(%rbp),%eax
cmp    -0xfc4(%rbp),%eax
jge    13e1 <main+0x281>
movslq -0x1020(%rbp),%rax
movsd  -0xca0(%rbp,%rax,8),%xmm0
ff ff
mov    -0xfe8(%rbp),%rax
movslq -0x1020(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x1020(%rbp),%rax
movsd  -0xfc0(%rbp,%rax,8),%xmm0
ff ff
mov    -0xff0(%rbp),%rax
movslq -0x1020(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1020(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1020(%rbp)
jmp    1375 <main+0x215>
movslq -0xfc4(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x1028(%rbp)
mov    -0x1008(%rbp),%rdi
mov    -0x1010(%rbp),%rsi
mov    -0x974(%rbp),%edx
mov    -0xfe8(%rbp),%rcx
mov    -0xff0(%rbp),%r8
mov    -0x1018(%rbp),%r9
mov    -0x1028(%rbp),%r10
mov    -0xfc4(%rbp),%eax
movsd  -0xfd0(%rbp),%xmm0
ff
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x1,%al
call   1080 <nearestNeighbor@plt>
mov    -0xff8(%rbp),%rdi
mov    -0x1000(%rbp),%rsi
mov    -0x1018(%rbp),%rdx
mov    -0xfc4(%rbp),%ecx
mov    $0x0,%al
call   1050 <nnInterpolate@plt>
lea    0x1b42(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x102c(%rbp)
mov    -0x102c(%rbp),%eax
cmp    -0x974(%rbp),%eax
jge    14d3 <main+0x373>
movslq -0x102c(%rbp),%rax
movsd  -0x330(%rbp,%rax,8),%xmm0
ff ff
movslq -0x102c(%rbp),%rax
movsd  -0x650(%rbp,%rax,8),%xmm1
ff ff
lea    0x1b06(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
mov    -0x102c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x102c(%rbp)
jmp    147f <main+0x31f>
lea    0x1aed(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x1030(%rbp)
mov    -0x1030(%rbp),%eax
cmp    -0xfc4(%rbp),%eax
jge    1565 <main+0x405>
movslq -0x1030(%rbp),%rax
movsd  -0xca0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x1030(%rbp),%rax
movsd  -0xfc0(%rbp,%rax,8),%xmm1
ff ff
mov    -0x1000(%rbp),%rax
movslq -0x1030(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x1028(%rbp),%rax
movslq -0x1030(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm3
lea    0x1a92(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
mov    -0x1030(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1030(%rbp)
jmp    14eb <main+0x38b>
mov    -0x1008(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x1010(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0xff8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xfe8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xff0(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1000(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1018(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x1040,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    $0x320,%edi
call   1080 <malloc@plt>
mov    %rax,%rbx
mov    %rax,0x28(%rsp)
mov    $0x320,%edi
call   1080 <malloc@plt>
mov    %rax,%rbp
mov    %rax,0x20(%rsp)
mov    $0x320,%edi
call   1080 <malloc@plt>
mov    %rax,%r13
mov    $0x320,%edi
call   1080 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    $0x320,%edi
call   1080 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    $0x320,%edi
call   1080 <malloc@plt>
mov    %rax,0x8(%rsp)
mov    $0x190,%edi
call   1080 <malloc@plt>
mov    %rax,(%rsp)
xor    %eax,%eax
lea    0xe1d(%rip),%r12
lea    0x1456(%rip),%r14
nopw   0x0(%rax,%rax,1)
movaps (%rax,%r12,1),%xmm0
movaps 0x10(%rax,%r12,1),%xmm1
movups %xmm0,(%rbx,%rax,1)
movaps (%rax,%r14,1),%xmm2
movaps 0x10(%rax,%r14,1),%xmm3
movups %xmm2,0x0(%rbp,%rax,1)
movups %xmm0,0x0(%r13,%rax,1)
movups %xmm1,0x10(%rbx,%rax,1)
movups %xmm3,0x10(%rbp,%rax,1)
movups %xmm1,0x10(%r13,%rax,1)
add    $0x20,%rax
cmp    $0x320,%rax
jne    1200 <main+0x90>
lea    0x10e8(%rip),%rsi
mov    $0x320,%edx
mov    0x18(%rsp),%r15
mov    %r15,%rdi
call   1070 <memcpy@plt>
mov    $0x320,%edx
mov    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    %r14,%rsi
call   1070 <memcpy@plt>
mov    $0x320,%edi
call   1080 <malloc@plt>
mov    %rax,%rbx
lea    0x28(%rsp),%rdi
lea    0x20(%rsp),%rsi
movsd  0xd72(%rip),%xmm0
mov    $0x64,%edx
mov    %r15,%rcx
mov    %rbp,%r8
mov    (%rsp),%rbp
mov    %rbp,%r9
mov    $0x1,%al
push   $0x64
mov    %rbx,0x38(%rsp)
push   %rbx
call   1090 <nearestNeighbor@plt>
add    $0x10,%rsp
xor    %ebx,%ebx
mov    %r13,%rdi
mov    0x8(%rsp),%rsi
mov    %rbp,%rdx
mov    $0x64,%ecx
xor    %eax,%eax
call   1060 <nnInterpolate@plt>
lea    0x16ba(%rip),%rdi
call   1040 <puts@plt>
lea    0x1691(%rip),%rbp
nop
movsd  (%rbx,%r12,1),%xmm0
movsd  (%rbx,%r14,1),%xmm1
mov    %rbp,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
add    $0x8,%rbx
cmp    $0x320,%rbx
jne    12e0 <main+0x170>
lea    0x1690(%rip),%rdi
call   1040 <puts@plt>
xor    %ebx,%ebx
mov    0x8(%rsp),%rbp
lea    0x1013(%rip),%r15
mov    0x30(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rbx,%r15,1),%xmm0
movsd  (%rbx,%r14,1),%xmm1
movsd  0x0(%rbp,%rbx,1),%xmm2
movsd  (%r12,%rbx,1),%xmm3
lea    0x162a(%rip),%rdi
mov    $0x4,%al
call   1050 <printf@plt>
add    $0x8,%rbx
cmp    $0x320,%rbx
jne    1330 <main+0x1c0>
mov    0x28(%rsp),%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.inLat = [100 x double] [double 0x404456AD25679896, double 0x404456ACF312B1B3, double 0x404456ACC92146A2, double 0x404456AC96CC5FC0, double 0x404456AC6CDAF4AE, double 0x404456AC3A860DCC, double 0x404456AC1094A2BA, double 0x404456ABE6A337A8, double 0x404456ABB44E50C6, double 0x404456AB8A5CE5B4, double 0x40445692923E5B85, double 0x404456925FE974A3, double 0x4044569235F80991, double 0x404456920C069E80, double 0x40445691D9B1B79E, double 0x40445691AFC04C8C, double 0x404456917D6B65AA, double 0x404456915379FA98, double 0x40445691212513B6, double 0x40445690F733A8A4, double 0x40445677FF151E75, double 0x40445677D523B363, double 0x40445677A2CECC81, double 0x4044567778DD6170, double 0x4044567746887A8D, double 0x404456771C970F7C, double 0x40445676EA422899, double 0x40445676C050BD88, double 0x40445676965F5276, double 0x40445676640A6B94, double 0x4044565D6BEBE165, double 0x4044565D41FA7653, double 0x4044565D0FA58F71, double 0x4044565CE5B4245F, double 0x4044565CBBC2B94E, double 0x4044565C896DD26B, double 0x4044565C5F7C675A, double 0x4044565C2D278078, double 0x4044565C03361566, double 0x4044565BD0E12E84, double 0x40445642E1262025, double 0x40445642AED13943, double 0x4044564284DFCE31, double 0x40445642528AE74F, double 0x4044564228997C3D, double 0x40445641F644955B, double 0x40445641CC532A49, double 0x4044564199FE4367, double 0x40445641700CD856, double 0x40445641461B6D44, double 0x404456284DFCE315, double 0x404456281BA7FC33, double 0x40445627F1B69121, double 0x40445627C7C5260F, double 0x4044562795703F2D, double 0x404456276B7ED41B, double 0x404456273929ED39, double 0x404456270F388228, double 0x40445626DCE39B45, double 0x40445626B2F23034, double 0x4044560DBAD3A605, double 0x4044560D90E23AF3, double 0x4044560D5E8D5411, double 0x4044560D349BE8FF, double 0x4044560D0247021D, double 0x4044560CD855970B, double 0x4044560CA600B029, double 0x4044560C7C0F4517, double 0x4044560C521DDA06, double 0x4044560C1FC8F323, double 0x404455F327AA68F5, double 0x404455F2FDB8FDE3, double 0x404455F2CB641701, double 0x404455F2A172ABEF, double 0x404455F2778140DD, double 0x404455F2452C59FB, double 0x404455F21B3AEEE9, double 0x404455F1E8E60807, double 0x404455F1BEF49CF5, double 0x404455F18C9FB613, double 0x404455D89CE4A7B5, double 0x404455D86A8FC0D3, double 0x404455D8409E55C1, double 0x404455D80E496EDF, double 0x404455D7E45803CD, double 0x404455D7B2031CEB, double 0x404455D78811B1D9, double 0x404455D755BCCAF7, double 0x404455D72BCB5FE5, double 0x404455D701D9F4D3, double 0x404455BE09BB6AA5, double 0x404455BDD76683C3, double 0x404455BDAD7518B1, double 0x404455BD8383AD9F, double 0x404455BD512EC6BD, double 0x404455BD273D5BAB, double 0x404455BCF4E874C9, double 0x404455BCCAF709B7, double 0x404455BC98A222D5, double 0x404455BC6EB0B7C3]
@__const.main.inLon = [100 x double] [double 0xC0559D6A012599ED, double 0xC0559D588E368F08, double 0xC0559D471F79420B, double 0xC0559D35AC8A3726, double 0xC0559D24399B2C41, double 0xC0559D12C6AC215C, double 0xC0559D0153BD1676, double 0xC0559CEFE0CE0B91, double 0xC0559CDE6DDF00AC, double 0xC0559CCCFAEFF5C7, double 0xC0559D6A1E81CB47, double 0xC0559D58AB92C062, double 0xC0559D4738A3B57C, double 0xC0559D35C5B4AA97, double 0xC0559D2452C59FB2, double 0xC0559D12DFD694CD, double 0xC0559D01711947D0, double 0xC0559CEFFE2A3CEA, double 0xC0559CDE8B3B3205, double 0xC0559CCD184C2720, double 0xC0559D6A37AC3EB8, double 0xC0559D58C8EEF1BB, double 0xC0559D4755FFE6D6, double 0xC0559D35E310DBF0, double 0xC0559D247021D10B, double 0xC0559D12FD32C626, double 0xC0559D018A43BB41, double 0xC0559CF01754B05B, double 0xC0559CDEA465A576, double 0xC0559CCD35A85879, double 0xC0559D6A55087011, double 0xC0559D58E219652C, double 0xC0559D476F2A5A47, double 0xC0559D35FC3B4F61, double 0xC0559D248D7E0264, double 0xC0559D131A8EF77F, double 0xC0559D01A79FEC9A, double 0xC0559CF034B0E1B5, double 0xC0559CDEC1C1D6D0, double 0xC0559CCD4ED2CBEA, double 0xC0559D6A6E32E382, double 0xC0559D58FF759685, double 0xC0559D478C868BA0, double 0xC0559D36199780BB, double 0xC0559D24A6A875D5, double 0xC0559D1333B96AF0, double 0xC0559D01C0CA600B, double 0xC0559CF0520D130E, double 0xC0559CDEDF1E0829, double 0xC0559CCD6C2EFD44, double 0xC0559D6A8B8F14DB, double 0xC0559D5918A009F6, double 0xC0559D47A5B0FF11, double 0xC0559D3636F3B214, double 0xC0559D24C404A72F, double 0xC0559D1351159C49, double 0xC0559D01DE269164, double 0xC0559CF06B37867F, double 0xC0559CDEF8487B9A, double 0xC0559CCD898B2E9D, double 0xC0559D6AA8EB4635, double 0xC0559D5935FC3B4F, double 0xC0559D47C30D306A, double 0xC0559D36501E2585, double 0xC0559D24DD2F1AA0, double 0xC0559D136A400FBB, double 0xC0559D01FB82C2BD, double 0xC0559CF08893B7D8, double 0xC0559CDF15A4ACF3, double 0xC0559CCDA2B5A20E, double 0xC0559D6AC215B9A6, double 0xC0559D594F26AEC0, double 0xC0559D47DC37A3DB, double 0xC0559D366D7A56DE, double 0xC0559D24FA8B4BF9, double 0xC0559D13879C4114, double 0xC0559D0214AD362F, double 0xC0559CF0A1BE2B49, double 0xC0559CDF3300DE4C, double 0xC0559CCDC011D367, double 0xC0559D6ADF71EAFF, double 0xC0559D596C82E01A, double 0xC0559D47F993D534, double 0xC0559D3686A4CA4F, double 0xC0559D2513B5BF6A, double 0xC0559D13A4F8726D, double 0xC0559D0232096788, double 0xC0559CF0BF1A5CA3, double 0xC0559CDF4C2B51BD, double 0xC0559CCDD93C46D8, double 0xC0559D6AF89C5E70, double 0xC0559D5985AD538B, double 0xC0559D4816F0068E, double 0xC0559D36A400FBA9, double 0xC0559D253111F0C3, double 0xC0559D13BE22E5DE, double 0xC0559D024B33DAF9, double 0xC0559CF0DC768DFC, double 0xC0559CDF69878317, double 0xC0559CCDF6987831]
@__const.main.inVal = [100 x double] [double 0x404456AD25679896, double 0x404456ACF312B1B3, double 0x404456ACC92146A2, double 0x404456AC96CC5FC0, double 0x404456AC6CDAF4AE, double 0x404456AC3A860DCC, double 0x404456AC1094A2BA, double 0x404456ABE6A337A8, double 0x404456ABB44E50C6, double 0x404456AB8A5CE5B4, double 0x40445692923E5B85, double 0x404456925FE974A3, double 0x4044569235F80991, double 0x404456920C069E80, double 0x40445691D9B1B79E, double 0x40445691AFC04C8C, double 0x404456917D6B65AA, double 0x404456915379FA98, double 0x40445691212513B6, double 0x40445690F733A8A4, double 0x40445677FF151E75, double 0x40445677D523B363, double 0x40445677A2CECC81, double 0x4044567778DD6170, double 0x4044567746887A8D, double 0x404456771C970F7C, double 0x40445676EA422899, double 0x40445676C050BD88, double 0x40445676965F5276, double 0x40445676640A6B94, double 0x4044565D6BEBE165, double 0x4044565D41FA7653, double 0x4044565D0FA58F71, double 0x4044565CE5B4245F, double 0x4044565CBBC2B94E, double 0x4044565C896DD26B, double 0x4044565C5F7C675A, double 0x4044565C2D278078, double 0x4044565C03361566, double 0x4044565BD0E12E84, double 0x40445642E1262025, double 0x40445642AED13943, double 0x4044564284DFCE31, double 0x40445642528AE74F, double 0x4044564228997C3D, double 0x40445641F644955B, double 0x40445641CC532A49, double 0x4044564199FE4367, double 0x40445641700CD856, double 0x40445641461B6D44, double 0x404456284DFCE315, double 0x404456281BA7FC33, double 0x40445627F1B69121, double 0x40445627C7C5260F, double 0x4044562795703F2D, double 0x404456276B7ED41B, double 0x404456273929ED39, double 0x404456270F388228, double 0x40445626DCE39B45, double 0x40445626B2F23034, double 0x4044560DBAD3A605, double 0x4044560D90E23AF3, double 0x4044560D5E8D5411, double 0x4044560D349BE8FF, double 0x4044560D0247021D, double 0x4044560CD855970B, double 0x4044560CA600B029, double 0x4044560C7C0F4517, double 0x4044560C521DDA06, double 0x4044560C1FC8F323, double 0x404455F327AA68F5, double 0x404455F2FDB8FDE3, double 0x404455F2CB641701, double 0x404455F2A172ABEF, double 0x404455F2778140DD, double 0x404455F2452C59FB, double 0x404455F21B3AEEE9, double 0x404455F1E8E60807, double 0x404455F1BEF49CF5, double 0x404455F18C9FB613, double 0x404455D89CE4A7B5, double 0x404455D86A8FC0D3, double 0x404455D8409E55C1, double 0x404455D80E496EDF, double 0x404455D7E45803CD, double 0x404455D7B2031CEB, double 0x404455D78811B1D9, double 0x404455D755BCCAF7, double 0x404455D72BCB5FE5, double 0x404455D701D9F4D3, double 0x404455BE09BB6AA5, double 0x404455BDD76683C3, double 0x404455BDAD7518B1, double 0x404455BD8383AD9F, double 0x404455BD512EC6BD, double 0x404455BD273D5BAB, double 0x404455BCF4E874C9, double 0x404455BCCAF709B7, double 0x404455BC98A222D5, double 0x404455BC6EB0B7C3]
@__const.main.outLat = [100 x double] [double 0x404456AD25679896, double 0x404456ACFB762D84, double 0x404456ACD184C272, double 0x404456ACA7935760, double 0x404456AC7DA1EC4E, double 0x404456AC53B0813D, double 0x404456AC29BF162B, double 0x404456ABFFCDAB19, double 0x404456ABCD78C437, double 0x404456ABA3875925, double 0x40445692923E5B85, double 0x40445692684CF074, double 0x404456923E5B8562, double 0x40445692146A1A50, double 0x40445691EA78AF3E, double 0x40445691C087442C, double 0x404456919695D91B, double 0x404456916CA46E09, double 0x4044569142B302F7, double 0x4044569118C197E5, double 0x40445677FF151E75, double 0x40445677D523B363, double 0x40445677AB324852, double 0x404456778140DD40, double 0x40445677574F722E, double 0x404456772D5E071C, double 0x40445677036C9C0B, double 0x40445676D97B30F9, double 0x40445676AF89C5E7, double 0x4044567685985AD5, double 0x4044565D6BEBE165, double 0x4044565D41FA7653, double 0x4044565D18090B41, double 0x4044565CEE17A030, double 0x4044565CC426351E, double 0x4044565C9A34CA0C, double 0x4044565C70435EFA, double 0x4044565C4651F3E9, double 0x4044565C1C6088D7, double 0x4044565BF26F1DC5, double 0x40445642E1262025, double 0x40445642B734B513, double 0x404456428D434A02, double 0x404456426351DEF0, double 0x40445642396073DE, double 0x404456420F6F08CC, double 0x40445641E57D9DBB, double 0x40445641B328B6D8, double 0x4044564189374BC7, double 0x404456415F45E0B5, double 0x404456284DFCE315, double 4.067310e+01, double 0x40445627FA1A0CF2, double 0x40445627D028A1E0, double 0x40445627A63736CE, double 0x404456277C45CBBC, double 0x40445627525460AA, double 0x404456272862F599, double 0x40445626FE718A87, double 0x40445626D4801F75, double 0x4044560DBAD3A605, double 0x4044560D90E23AF3, double 0x4044560D66F0CFE1, double 0x4044560D3CFF64D0, double 0x4044560D130DF9BE, double 0x4044560CE91C8EAC, double 0x4044560CBF2B239A, double 0x4044560C9539B888, double 0x4044560C6B484D77, double 0x4044560C4156E265, double 0x404455F327AA68F5, double 0x404455F2FDB8FDE3, double 0x404455F2D3C792D1, double 0x404455F2A9D627BF, double 0x404455F27FE4BCAE, double 0x404455F255F3519C, double 0x404455F22C01E68A, double 0x404455F202107B78, double 0x404455F1D81F1066, double 0x404455F1AE2DA555, double 0x404455D89CE4A7B5, double 0x404455D872F33CA3, double 0x404455D84901D191, double 0x404455D81F106680, double 0x404455D7F51EFB6E, double 0x404455D7CB2D905C, double 0x404455D7A13C254A, double 0x404455D76EE73E68, double 0x404455D744F5D356, double 0x404455D71B046845, double 0x404455BE09BB6AA5, double 0x404455BDDFC9FF93, double 0x404455BDB5D89481, double 0x404455BD8BE7296F, double 0x404455BD61F5BE5E, double 0x404455BD3804534C, double 0x404455BD0E12E83A, double 0x404455BCE4217D28, double 0x404455BCBA301217, double 0x404455BC903EA705]
@__const.main.outLon = [100 x double] [double 0xC0559D6A012599ED, double 0xC0559D588E368F08, double 0xC0559D471F79420B, double 0xC0559D35AC8A3726, double 0xC0559D24399B2C41, double 0xC0559D12C6AC215C, double 0xC0559D0153BD1676, double 0xC0559CEFE0CE0B91, double 0xC0559CDE6DDF00AC, double 0xC0559CCCFAEFF5C7, double 0xC0559D6A1E81CB47, double 0xC0559D58AB92C062, double 0xC0559D4738A3B57C, double 0xC0559D35C5B4AA97, double 0xC0559D2452C59FB2, double 0xC0559D12DFD694CD, double 0xC0559D01711947D0, double 0xC0559CEFFE2A3CEA, double 0xC0559CDE8B3B3205, double 0xC0559CCD184C2720, double 0xC0559D6A37AC3EB8, double 0xC0559D58C8EEF1BB, double 0xC0559D4755FFE6D6, double 0xC0559D35E310DBF0, double 0xC0559D247021D10B, double 0xC0559D12FD32C626, double 0xC0559D018A43BB41, double 0xC0559CF01754B05B, double 0xC0559CDEA465A576, double 0xC0559CCD35A85879, double 0xC0559D6A55087011, double 0xC0559D58E219652C, double 0xC0559D476F2A5A47, double 0xC0559D35FC3B4F61, double 0xC0559D248D7E0264, double 0xC0559D131A8EF77F, double 0xC0559D01A79FEC9A, double 0xC0559CF034B0E1B5, double 0xC0559CDEC1C1D6D0, double 0xC0559CCD4ED2CBEA, double 0xC0559D6A6E32E382, double 0xC0559D58FF759685, double 0xC0559D478C868BA0, double 0xC0559D36199780BB, double 0xC0559D24A6A875D5, double 0xC0559D1333B96AF0, double 0xC0559D01C0CA600B, double 0xC0559CF0520D130E, double 0xC0559CDEDF1E0829, double 0xC0559CCD6C2EFD44, double 0xC0559D6A8B8F14DB, double 0xC0559D5918A009F6, double 0xC0559D47A5B0FF11, double 0xC0559D3636F3B214, double 0xC0559D24C404A72F, double 0xC0559D1351159C49, double 0xC0559D01DE269164, double 0xC0559CF06B37867F, double 0xC0559CDEF8487B9A, double 0xC0559CCD898B2E9D, double 0xC0559D6AA8EB4635, double 0xC0559D5935FC3B4F, double 0xC0559D47C30D306A, double 0xC0559D36501E2585, double 0xC0559D24DD2F1AA0, double 0xC0559D136A400FBB, double 0xC0559D01FB82C2BD, double 0xC0559CF08893B7D8, double 0xC0559CDF15A4ACF3, double 0xC0559CCDA2B5A20E, double 0xC0559D6AC215B9A6, double 0xC0559D594F26AEC0, double 0xC0559D47DC37A3DB, double 0xC0559D366D7A56DE, double 0xC0559D24FA8B4BF9, double 0xC0559D13879C4114, double 0xC0559D0214AD362F, double 0xC0559CF0A1BE2B49, double 0xC0559CDF3300DE4C, double 0xC0559CCDC011D367, double 0xC0559D6ADF71EAFF, double 0xC0559D596C82E01A, double 0xC0559D47F993D534, double 0xC0559D3686A4CA4F, double 0xC0559D2513B5BF6A, double 0xC0559D13A4F8726D, double 0xC0559D0232096788, double 0xC0559CF0BF1A5CA3, double 0xC0559CDF4C2B51BD, double 0xC0559CCDD93C46D8, double 0xC0559D6AF89C5E70, double 0xC0559D5985AD538B, double 0xC0559D4816F0068E, double 0xC0559D36A400FBA9, double 0xC0559D253111F0C3, double 0xC0559D13BE22E5DE, double 0xC0559D024B33DAF9, double 0xC0559CF0DC768DFC, double 0xC0559CDF69878317, double 0xC0559CCDF6987831]
@.str = [14 x i8] c"InLat, InLon\0A\00"
@.str.1 = [9 x i8] c"%lf,%lf\0A\00"
@.str.2 = [21 x i8] c"OutLat, OutLon, Val\0A\00"
@.str.3 = [20 x i8] c"%lf,\09%lf,\09%lf,\09%lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [100 x double]
%7 = alloca [100 x double]
%8 = alloca [100 x double]
%9 = alloca i32
%10 = alloca [100 x double]
%11 = alloca [100 x double]
%12 = alloca i32
%13 = alloca double
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double**
%21 = alloca double**
%22 = alloca i32*
%23 = alloca i32
%24 = alloca i32
%25 = alloca double*
%26 = alloca i32
%27 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%28 = bitcast [100 x double]* %6 to i8*
%29 = bitcast [100 x double]* %7 to i8*
%30 = bitcast [100 x double]* %8 to i8*
store i32 100, i32* %9
%31 = bitcast [100 x double]* %10 to i8*
%32 = bitcast [100 x double]* %11 to i8*
store i32 100, i32* %12
store double 1.000000e+02, double* %13
%33 = load i32, i32* %9
%34 = sext i32 %33 to i64
%35 = mul i64 8, %34
%36 = call i8* @malloc(i64 %35)
%37 = bitcast i8* %36 to double*
store double* %37, double** %14
%38 = load i32, i32* %9
%39 = sext i32 %38 to i64
%40 = mul i64 8, %39
%41 = call i8* @malloc(i64 %40)
%42 = bitcast i8* %41 to double*
store double* %42, double** %15
%43 = load i32, i32* %9
%44 = sext i32 %43 to i64
%45 = mul i64 8, %44
%46 = call i8* @malloc(i64 %45)
%47 = bitcast i8* %46 to double*
store double* %47, double** %18
store double** %14, double*** %20
store double** %15, double*** %21
%48 = load i32, i32* %12
%49 = sext i32 %48 to i64
%50 = mul i64 8, %49
%51 = call i8* @malloc(i64 %50)
%52 = bitcast i8* %51 to double*
store double* %52, double** %16
%53 = load i32, i32* %12
%54 = sext i32 %53 to i64
%55 = mul i64 8, %54
%56 = call i8* @malloc(i64 %55)
%57 = bitcast i8* %56 to double*
store double* %57, double** %17
%58 = load i32, i32* %12
%59 = sext i32 %58 to i64
%60 = mul i64 8, %59
%61 = call i8* @malloc(i64 %60)
%62 = bitcast i8* %61 to double*
store double* %62, double** %19
%63 = load i32, i32* %12
%64 = sext i32 %63 to i64
%65 = mul i64 4, %64
%66 = call i8* @malloc(i64 %65)
%67 = bitcast i8* %66 to i32*
store i32* %67, i32** %22
store i32 0, i32* %23
br label %68
68: ; preds = %97, %2
%69 = load i32, i32* %23
%70 = load i32, i32* %9
%71 = icmp slt i32 %69, %70
br i1 %71, label %72, label %100
72: ; preds = %68
%73 = load i32, i32* %23
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [100 x double], [100 x double]* %6, i64 0, i64 %74
%76 = load double, double* %75
%77 = load double*, double** %14
%78 = load i32, i32* %23
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds double, double* %77, i64 %79
store double %76, double* %80
%81 = load i32, i32* %23
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [100 x double], [100 x double]* %7, i64 0, i64 %82
%84 = load double, double* %83
%85 = load double*, double** %15
%86 = load i32, i32* %23
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds double, double* %85, i64 %87
store double %84, double* %88
%89 = load i32, i32* %23
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [100 x double], [100 x double]* %8, i64 0, i64 %90
%92 = load double, double* %91
%93 = load double*, double** %18
%94 = load i32, i32* %23
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds double, double* %93, i64 %95
store double %92, double* %96
br label %97
97: ; preds = %72
%98 = load i32, i32* %23
%99 = add nsw i32 %98, 1
store i32 %99, i32* %23
br label %68
100: ; preds = %68
store i32 0, i32* %24
br label %101
101: ; preds = %122, %100
%102 = load i32, i32* %24
%103 = load i32, i32* %12
%104 = icmp slt i32 %102, %103
br i1 %104, label %105, label %125
105: ; preds = %101
%106 = load i32, i32* %24
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [100 x double], [100 x double]* %10, i64 0, i64 %107
%109 = load double, double* %108
%110 = load double*, double** %16
%111 = load i32, i32* %24
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds double, double* %110, i64 %112
store double %109, double* %113
%114 = load i32, i32* %24
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [100 x double], [100 x double]* %11, i64 0, i64 %115
%117 = load double, double* %116
%118 = load double*, double** %17
%119 = load i32, i32* %24
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds double, double* %118, i64 %120
store double %117, double* %121
br label %122
122: ; preds = %105
%123 = load i32, i32* %24
%124 = add nsw i32 %123, 1
store i32 %124, i32* %24
br label %101
125: ; preds = %101
%126 = load i32, i32* %12
%127 = sext i32 %126 to i64
%128 = mul i64 8, %127
%129 = call i8* @malloc(i64 %128)
%130 = bitcast i8* %129 to double*
store double* %130, double** %25
%131 = load double**, double*** %20
%132 = load double**, double*** %21
%133 = load i32, i32* %9
%134 = load double*, double** %16
%135 = load double*, double** %17
%136 = load i32*, i32** %22
%137 = load double*, double** %25
%138 = load i32, i32* %12
%139 = load double, double* %13
%140 = call i32 (double**, double**, i32, double*, double*, i32*, double*, i32, double, ...) bitcast (i32 (...)* @nearestNeighbor to i32 (double**, double**, i32, double*, double*, i32*, double*, i32, double, ...)*)(double** %131, double** %132, i32 %133, double* %134, double* %135, i32* %136, double* %137, i32 %138, double %139)
%141 = load double*, double** %18
%142 = load double*, double** %19
%143 = load i32*, i32** %22
%144 = load i32, i32* %12
%145 = call i32 (double*, double*, i32*, i32, ...) bitcast (i32 (...)* @nnInterpolate to i32 (double*, double*, i32*, i32, ...)*)(double* %141, double* %142, i32* %143, i32 %144)
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %26
br label %147
147: ; preds = %161, %125
%148 = load i32, i32* %26
%149 = load i32, i32* %9
%150 = icmp slt i32 %148, %149
br i1 %150, label %151, label %164
151: ; preds = %147
%152 = load i32, i32* %26
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds [100 x double], [100 x double]* %6, i64 0, i64 %153
%155 = load double, double* %154
%156 = load i32, i32* %26
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds [100 x double], [100 x double]* %7, i64 0, i64 %157
%159 = load double, double* %158
%160 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %155, double %159)
br label %161
161: ; preds = %151
%162 = load i32, i32* %26
%163 = add nsw i32 %162, 1
store i32 %163, i32* %26
br label %147
164: ; preds = %147
%165 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %27
br label %166
166: ; preds = %190, %164
%167 = load i32, i32* %27
%168 = load i32, i32* %12
%169 = icmp slt i32 %167, %168
br i1 %169, label %170, label %193
170: ; preds = %166
%171 = load i32, i32* %27
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds [100 x double], [100 x double]* %10, i64 0, i64 %172
%174 = load double, double* %173
%175 = load i32, i32* %27
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds [100 x double], [100 x double]* %11, i64 0, i64 %176
%178 = load double, double* %177
%179 = load double*, double** %19
%180 = load i32, i32* %27
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds double, double* %179, i64 %181
%183 = load double, double* %182
%184 = load double*, double** %25
%185 = load i32, i32* %27
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds double, double* %184, i64 %186
%188 = load double, double* %187
%189 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), double %174, double %178, double %183, double %188)
br label %190
190: ; preds = %170
%191 = load i32, i32* %27
%192 = add nsw i32 %191, 1
store i32 %192, i32* %27
br label %166
193: ; preds = %166
%194 = load double**, double*** %20
%195 = load double*, double** %194
%196 = bitcast double* %195 to i8*
%197 = load double**, double*** %21
%198 = load double*, double** %197
%199 = bitcast double* %198 to i8*
%200 = load double*, double** %18
%201 = bitcast double* %200 to i8*
%202 = load double*, double** %16
%203 = bitcast double* %202 to i8*
%204 = load double*, double** %17
%205 = bitcast double* %204 to i8*
%206 = load double*, double** %19
%207 = bitcast double* %206 to i8*
%208 = load i32*, i32** %22
%209 = bitcast i32* %208 to i8*
ret i32 0
}

LLVM IR (-O2):
@__const.main.inVal = [100 x double] [double 0x404456AD25679896, double 0x404456ACF312B1B3, double 0x404456ACC92146A2, double 0x404456AC96CC5FC0, double 0x404456AC6CDAF4AE, double 0x404456AC3A860DCC, double 0x404456AC1094A2BA, double 0x404456ABE6A337A8, double 0x404456ABB44E50C6, double 0x404456AB8A5CE5B4, double 0x40445692923E5B85, double 0x404456925FE974A3, double 0x4044569235F80991, double 0x404456920C069E80, double 0x40445691D9B1B79E, double 0x40445691AFC04C8C, double 0x404456917D6B65AA, double 0x404456915379FA98, double 0x40445691212513B6, double 0x40445690F733A8A4, double 0x40445677FF151E75, double 0x40445677D523B363, double 0x40445677A2CECC81, double 0x4044567778DD6170, double 0x4044567746887A8D, double 0x404456771C970F7C, double 0x40445676EA422899, double 0x40445676C050BD88, double 0x40445676965F5276, double 0x40445676640A6B94, double 0x4044565D6BEBE165, double 0x4044565D41FA7653, double 0x4044565D0FA58F71, double 0x4044565CE5B4245F, double 0x4044565CBBC2B94E, double 0x4044565C896DD26B, double 0x4044565C5F7C675A, double 0x4044565C2D278078, double 0x4044565C03361566, double 0x4044565BD0E12E84, double 0x40445642E1262025, double 0x40445642AED13943, double 0x4044564284DFCE31, double 0x40445642528AE74F, double 0x4044564228997C3D, double 0x40445641F644955B, double 0x40445641CC532A49, double 0x4044564199FE4367, double 0x40445641700CD856, double 0x40445641461B6D44, double 0x404456284DFCE315, double 0x404456281BA7FC33, double 0x40445627F1B69121, double 0x40445627C7C5260F, double 0x4044562795703F2D, double 0x404456276B7ED41B, double 0x404456273929ED39, double 0x404456270F388228, double 0x40445626DCE39B45, double 0x40445626B2F23034, double 0x4044560DBAD3A605, double 0x4044560D90E23AF3, double 0x4044560D5E8D5411, double 0x4044560D349BE8FF, double 0x4044560D0247021D, double 0x4044560CD855970B, double 0x4044560CA600B029, double 0x4044560C7C0F4517, double 0x4044560C521DDA06, double 0x4044560C1FC8F323, double 0x404455F327AA68F5, double 0x404455F2FDB8FDE3, double 0x404455F2CB641701, double 0x404455F2A172ABEF, double 0x404455F2778140DD, double 0x404455F2452C59FB, double 0x404455F21B3AEEE9, double 0x404455F1E8E60807, double 0x404455F1BEF49CF5, double 0x404455F18C9FB613, double 0x404455D89CE4A7B5, double 0x404455D86A8FC0D3, double 0x404455D8409E55C1, double 0x404455D80E496EDF, double 0x404455D7E45803CD, double 0x404455D7B2031CEB, double 0x404455D78811B1D9, double 0x404455D755BCCAF7, double 0x404455D72BCB5FE5, double 0x404455D701D9F4D3, double 0x404455BE09BB6AA5, double 0x404455BDD76683C3, double 0x404455BDAD7518B1, double 0x404455BD8383AD9F, double 0x404455BD512EC6BD, double 0x404455BD273D5BAB, double 0x404455BCF4E874C9, double 0x404455BCCAF709B7, double 0x404455BC98A222D5, double 0x404455BC6EB0B7C3]
@__const.main.outLat = [100 x double] [double 0x404456AD25679896, double 0x404456ACFB762D84, double 0x404456ACD184C272, double 0x404456ACA7935760, double 0x404456AC7DA1EC4E, double 0x404456AC53B0813D, double 0x404456AC29BF162B, double 0x404456ABFFCDAB19, double 0x404456ABCD78C437, double 0x404456ABA3875925, double 0x40445692923E5B85, double 0x40445692684CF074, double 0x404456923E5B8562, double 0x40445692146A1A50, double 0x40445691EA78AF3E, double 0x40445691C087442C, double 0x404456919695D91B, double 0x404456916CA46E09, double 0x4044569142B302F7, double 0x4044569118C197E5, double 0x40445677FF151E75, double 0x40445677D523B363, double 0x40445677AB324852, double 0x404456778140DD40, double 0x40445677574F722E, double 0x404456772D5E071C, double 0x40445677036C9C0B, double 0x40445676D97B30F9, double 0x40445676AF89C5E7, double 0x4044567685985AD5, double 0x4044565D6BEBE165, double 0x4044565D41FA7653, double 0x4044565D18090B41, double 0x4044565CEE17A030, double 0x4044565CC426351E, double 0x4044565C9A34CA0C, double 0x4044565C70435EFA, double 0x4044565C4651F3E9, double 0x4044565C1C6088D7, double 0x4044565BF26F1DC5, double 0x40445642E1262025, double 0x40445642B734B513, double 0x404456428D434A02, double 0x404456426351DEF0, double 0x40445642396073DE, double 0x404456420F6F08CC, double 0x40445641E57D9DBB, double 0x40445641B328B6D8, double 0x4044564189374BC7, double 0x404456415F45E0B5, double 0x404456284DFCE315, double 4.067310e+01, double 0x40445627FA1A0CF2, double 0x40445627D028A1E0, double 0x40445627A63736CE, double 0x404456277C45CBBC, double 0x40445627525460AA, double 0x404456272862F599, double 0x40445626FE718A87, double 0x40445626D4801F75, double 0x4044560DBAD3A605, double 0x4044560D90E23AF3, double 0x4044560D66F0CFE1, double 0x4044560D3CFF64D0, double 0x4044560D130DF9BE, double 0x4044560CE91C8EAC, double 0x4044560CBF2B239A, double 0x4044560C9539B888, double 0x4044560C6B484D77, double 0x4044560C4156E265, double 0x404455F327AA68F5, double 0x404455F2FDB8FDE3, double 0x404455F2D3C792D1, double 0x404455F2A9D627BF, double 0x404455F27FE4BCAE, double 0x404455F255F3519C, double 0x404455F22C01E68A, double 0x404455F202107B78, double 0x404455F1D81F1066, double 0x404455F1AE2DA555, double 0x404455D89CE4A7B5, double 0x404455D872F33CA3, double 0x404455D84901D191, double 0x404455D81F106680, double 0x404455D7F51EFB6E, double 0x404455D7CB2D905C, double 0x404455D7A13C254A, double 0x404455D76EE73E68, double 0x404455D744F5D356, double 0x404455D71B046845, double 0x404455BE09BB6AA5, double 0x404455BDDFC9FF93, double 0x404455BDB5D89481, double 0x404455BD8BE7296F, double 0x404455BD61F5BE5E, double 0x404455BD3804534C, double 0x404455BD0E12E83A, double 0x404455BCE4217D28, double 0x404455BCBA301217, double 0x404455BC903EA705]
@__const.main.outLon = [100 x double] [double 0xC0559D6A012599ED, double 0xC0559D588E368F08, double 0xC0559D471F79420B, double 0xC0559D35AC8A3726, double 0xC0559D24399B2C41, double 0xC0559D12C6AC215C, double 0xC0559D0153BD1676, double 0xC0559CEFE0CE0B91, double 0xC0559CDE6DDF00AC, double 0xC0559CCCFAEFF5C7, double 0xC0559D6A1E81CB47, double 0xC0559D58AB92C062, double 0xC0559D4738A3B57C, double 0xC0559D35C5B4AA97, double 0xC0559D2452C59FB2, double 0xC0559D12DFD694CD, double 0xC0559D01711947D0, double 0xC0559CEFFE2A3CEA, double 0xC0559CDE8B3B3205, double 0xC0559CCD184C2720, double 0xC0559D6A37AC3EB8, double 0xC0559D58C8EEF1BB, double 0xC0559D4755FFE6D6, double 0xC0559D35E310DBF0, double 0xC0559D247021D10B, double 0xC0559D12FD32C626, double 0xC0559D018A43BB41, double 0xC0559CF01754B05B, double 0xC0559CDEA465A576, double 0xC0559CCD35A85879, double 0xC0559D6A55087011, double 0xC0559D58E219652C, double 0xC0559D476F2A5A47, double 0xC0559D35FC3B4F61, double 0xC0559D248D7E0264, double 0xC0559D131A8EF77F, double 0xC0559D01A79FEC9A, double 0xC0559CF034B0E1B5, double 0xC0559CDEC1C1D6D0, double 0xC0559CCD4ED2CBEA, double 0xC0559D6A6E32E382, double 0xC0559D58FF759685, double 0xC0559D478C868BA0, double 0xC0559D36199780BB, double 0xC0559D24A6A875D5, double 0xC0559D1333B96AF0, double 0xC0559D01C0CA600B, double 0xC0559CF0520D130E, double 0xC0559CDEDF1E0829, double 0xC0559CCD6C2EFD44, double 0xC0559D6A8B8F14DB, double 0xC0559D5918A009F6, double 0xC0559D47A5B0FF11, double 0xC0559D3636F3B214, double 0xC0559D24C404A72F, double 0xC0559D1351159C49, double 0xC0559D01DE269164, double 0xC0559CF06B37867F, double 0xC0559CDEF8487B9A, double 0xC0559CCD898B2E9D, double 0xC0559D6AA8EB4635, double 0xC0559D5935FC3B4F, double 0xC0559D47C30D306A, double 0xC0559D36501E2585, double 0xC0559D24DD2F1AA0, double 0xC0559D136A400FBB, double 0xC0559D01FB82C2BD, double 0xC0559CF08893B7D8, double 0xC0559CDF15A4ACF3, double 0xC0559CCDA2B5A20E, double 0xC0559D6AC215B9A6, double 0xC0559D594F26AEC0, double 0xC0559D47DC37A3DB, double 0xC0559D366D7A56DE, double 0xC0559D24FA8B4BF9, double 0xC0559D13879C4114, double 0xC0559D0214AD362F, double 0xC0559CF0A1BE2B49, double 0xC0559CDF3300DE4C, double 0xC0559CCDC011D367, double 0xC0559D6ADF71EAFF, double 0xC0559D596C82E01A, double 0xC0559D47F993D534, double 0xC0559D3686A4CA4F, double 0xC0559D2513B5BF6A, double 0xC0559D13A4F8726D, double 0xC0559D0232096788, double 0xC0559CF0BF1A5CA3, double 0xC0559CDF4C2B51BD, double 0xC0559CCDD93C46D8, double 0xC0559D6AF89C5E70, double 0xC0559D5985AD538B, double 0xC0559D4816F0068E, double 0xC0559D36A400FBA9, double 0xC0559D253111F0C3, double 0xC0559D13BE22E5DE, double 0xC0559D024B33DAF9, double 0xC0559CF0DC768DFC, double 0xC0559CDF69878317, double 0xC0559CCDF6987831]
@.str.1 = [9 x i8] c"%lf,%lf\0A\00"
@.str.3 = [20 x i8] c"%lf,\09%lf,\09%lf,\09%lf\0A\00"
@str = [13 x i8] c"InLat, InLon\00"
@str.4 = [20 x i8] c"OutLat, OutLon, Val\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca double*
%4 = alloca double*
%5 = bitcast double** %3 to i8*
%6 = bitcast double** %4 to i8*
%7 = tail call dereferenceable_or_null(800) i8* @malloc(i64 800)
%8 = bitcast double** %3 to i8**
store i8* %7, i8** %8
%9 = tail call dereferenceable_or_null(800) i8* @malloc(i64 800)
%10 = bitcast double** %4 to i8**
store i8* %9, i8** %10
%11 = tail call dereferenceable_or_null(800) i8* @malloc(i64 800)
%12 = bitcast i8* %11 to double*
%13 = tail call dereferenceable_or_null(800) i8* @malloc(i64 800)
%14 = tail call dereferenceable_or_null(800) i8* @malloc(i64 800)
%15 = tail call dereferenceable_or_null(800) i8* @malloc(i64 800)
%16 = tail call dereferenceable_or_null(400) i8* @malloc(i64 400)
%17 = bitcast i8* %7 to double*
%18 = bitcast i8* %9 to double*
br label %19
19: ; preds = %19, %2
%20 = phi i64 [ 0, %2 ], [ %52, %19 ]
%21 = getelementptr inbounds [100 x double], [100 x double]* @__const.main.inVal, i64 0, i64 %20
%22 = bitcast double* %21 to <2 x double>*
%23 = load <2 x double>, <2 x double>* %22
%24 = getelementptr inbounds double, double* %17, i64 %20
%25 = bitcast double* %24 to <2 x double>*
store <2 x double> %23, <2 x double>* %25
%26 = getelementptr inbounds [100 x double], [100 x double]* @__const.main.outLon, i64 0, i64 %20
%27 = bitcast double* %26 to <2 x double>*
%28 = load <2 x double>, <2 x double>* %27
%29 = getelementptr inbounds double, double* %18, i64 %20
%30 = bitcast double* %29 to <2 x double>*
store <2 x double> %28, <2 x double>* %30
%31 = getelementptr inbounds [100 x double], [100 x double]* @__const.main.inVal, i64 0, i64 %20
%32 = bitcast double* %31 to <2 x double>*
%33 = load <2 x double>, <2 x double>* %32
%34 = getelementptr inbounds double, double* %12, i64 %20
%35 = bitcast double* %34 to <2 x double>*
store <2 x double> %33, <2 x double>* %35
%36 = or i64 %20, 2
%37 = getelementptr inbounds [100 x double], [100 x double]* @__const.main.inVal, i64 0, i64 %36
%38 = bitcast double* %37 to <2 x double>*
%39 = load <2 x double>, <2 x double>* %38
%40 = getelementptr inbounds double, double* %17, i64 %36
%41 = bitcast double* %40 to <2 x double>*
store <2 x double> %39, <2 x double>* %41
%42 = getelementptr inbounds [100 x double], [100 x double]* @__const.main.outLon, i64 0, i64 %36
%43 = bitcast double* %42 to <2 x double>*
%44 = load <2 x double>, <2 x double>* %43
%45 = getelementptr inbounds double, double* %18, i64 %36
%46 = bitcast double* %45 to <2 x double>*
store <2 x double> %44, <2 x double>* %46
%47 = getelementptr inbounds [100 x double], [100 x double]* @__const.main.inVal, i64 0, i64 %36
%48 = bitcast double* %47 to <2 x double>*
%49 = load <2 x double>, <2 x double>* %48
%50 = getelementptr inbounds double, double* %12, i64 %36
%51 = bitcast double* %50 to <2 x double>*
store <2 x double> %49, <2 x double>* %51
%52 = add nuw nsw i64 %20, 4
%53 = icmp eq i64 %52, 100
br i1 %53, label %54, label %19
54: ; preds = %19
%55 = bitcast i8* %13 to double*
%56 = bitcast i8* %15 to double*
%57 = bitcast i8* %14 to double*
%58 = bitcast i8* %16 to i32*
%59 = tail call dereferenceable_or_null(800) i8* @malloc(i64 800)
%60 = bitcast i8* %59 to double*
%61 = call i32 (double**, double**, i32, double*, double*, i32*, double*, i32, double, ...) bitcast (i32 (...)* @nearestNeighbor to i32 (double**, double**, i32, double*, double*, i32*, double*, i32, double, ...)*)(double** %3, double** %4, i32 100, double* %55, double* %57, i32* %58, double* %60, i32 100, double 1.000000e+02)
%62 = call i32 (double*, double*, i32*, i32, ...) bitcast (i32 (...)* @nnInterpolate to i32 (double*, double*, i32*, i32, ...)*)(double* %12, double* %56, i32* %58, i32 100)
%63 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
br label %66
64: ; preds = %66
%65 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.4, i64 0, i64 0))
br label %78
66: ; preds = %54, %66
%67 = phi i64 [ 0, %54 ], [ %73, %66 ]
%68 = getelementptr inbounds [100 x double], [100 x double]* @__const.main.inVal, i64 0, i64 %67
%69 = load double, double* %68
%70 = getelementptr inbounds [100 x double], [100 x double]* @__const.main.outLon, i64 0, i64 %67
%71 = load double, double* %70
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %69, double %71)
%73 = add nuw nsw i64 %67, 1
%74 = icmp eq i64 %73, 100
br i1 %74, label %64, label %66
75: ; preds = %78
%76 = load i8*, i8** %8
%77 = load i8*, i8** %10
ret i32 0
78: ; preds = %64, %78
%79 = phi i64 [ 0, %64 ], [ %89, %78 ]
%80 = getelementptr inbounds [100 x double], [100 x double]* @__const.main.outLat, i64 0, i64 %79
%81 = load double, double* %80
%82 = getelementptr inbounds [100 x double], [100 x double]* @__const.main.outLon, i64 0, i64 %79
%83 = load double, double* %82
%84 = getelementptr inbounds double, double* %56, i64 %79
%85 = load double, double* %84
%86 = getelementptr inbounds double, double* %60, i64 %79
%87 = load double, double* %86
%88 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), double %81, double %83, double %85, double %87)
%89 = add nuw nsw i64 %79, 1
%90 = icmp eq i64 %89, 100
br i1 %90, label %75, label %78
}