void rot_uv_back(int gridID, double *us, double *vs) {
  long i, ilat, ilon, nlat, nlon;
  double u, v;
  double xval, yval;
  double xpole, ypole, angle;
  double *xvals, *yvals;
  nlon = gridInqXsize(gridID);
  nlat = gridInqYsize(gridID);
  xpole = gridInqXpole(gridID);
  ypole = gridInqYpole(gridID);
  angle = gridInqAngle(gridID);
  xvals = (double *)Malloc(
      __func__,
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/Rotuv.c",
      49, (nlon * sizeof(double)));
  yvals = (double *)Malloc(
      __func__,
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/Rotuv.c",
      50, (nlat * sizeof(double)));
  gridInqXvals(gridID, xvals);
  gridInqYvals(gridID, yvals);
  {
    char units[256];
    gridInqXunits(gridID, units);
    grid_to_degree(units, 1, &xpole, "xpole");
    grid_to_degree(units, nlon, xvals, "grid center lon");
    gridInqYunits(gridID, units);
    grid_to_degree(units, 1, &ypole, "ypole");
    grid_to_degree(units, nlat, yvals, "grid center lat");
  }
  for (ilat = 0; ilat < nlat; ilat++)
    for (ilon = 0; ilon < nlon; ilon++) {
      i = ilat * nlon + ilon;
      xval = lamrot_to_lam(yvals[ilat], xvals[ilon], ypole, xpole, angle);
      yval = phirot_to_phi(yvals[ilat], xvals[ilon], ypole, angle);
      usvs_to_uv(us[i], vs[i], yval, xval, ypole, xpole, &u, &v);
      us[i] = u;
      vs[i] = v;
    }
  Free(__func__,
       "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
       "2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/Rotuv.c",
       84, (xvals));
  Free(__func__,
       "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
       "2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/Rotuv.c",
       85, (yvals));
}


x86 assembly (clang, -O0):
<rot_uv_back>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   10b0 <gridInqXsize@plt>
cltq
mov    %rax,-0x40(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1090 <gridInqYsize@plt>
cltq
mov    %rax,-0x38(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <gridInqXpole@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1080 <gridInqYpole@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1070 <gridInqAngle@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x40(%rbp),%rcx
shl    $0x3,%rcx
lea    0xd92(%rip),%rdi
lea    0xd97(%rip),%rsi
mov    $0x31,%edx
mov    $0x0,%al
call   1050 <Malloc@plt>
cltq
mov    %rax,-0x80(%rbp)
mov    -0x38(%rbp),%rcx
shl    $0x3,%rcx
lea    0xd6a(%rip),%rdi
lea    0xd6f(%rip),%rsi
mov    $0x32,%edx
mov    $0x0,%al
call   1050 <Malloc@plt>
cltq
mov    %rax,-0x88(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x80(%rbp),%rsi
mov    $0x0,%al
call   10d0 <gridInqXvals@plt>
mov    -0x4(%rbp),%edi
mov    -0x88(%rbp),%rsi
mov    $0x0,%al
call   10a0 <gridInqYvals@plt>
mov    -0x4(%rbp),%edi
lea    -0x190(%rbp),%rsi
mov    $0x0,%al
call   1100 <gridInqXunits@plt>
lea    -0x190(%rbp),%rdi
mov    $0x1,%esi
lea    -0x68(%rbp),%rdx
lea    0xd94(%rip),%rcx
mov    $0x0,%al
call   10c0 <grid_to_degree@plt>
lea    -0x190(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x80(%rbp),%rdx
lea    0xd7d(%rip),%rcx
mov    $0x0,%al
call   10c0 <grid_to_degree@plt>
mov    -0x4(%rbp),%edi
lea    -0x190(%rbp),%rsi
mov    $0x0,%al
call   10f0 <gridInqYunits@plt>
lea    -0x190(%rbp),%rdi
mov    $0x1,%esi
lea    -0x70(%rbp),%rdx
lea    0xd5e(%rip),%rcx
mov    $0x0,%al
call   10c0 <grid_to_degree@plt>
lea    -0x190(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x88(%rbp),%rdx
lea    0xd44(%rip),%rcx
mov    $0x0,%al
call   10c0 <grid_to_degree@plt>
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x38(%rbp),%rax
jge    14a4 <rot_uv_back+0x2b4>
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x40(%rbp),%rax
jge    148e <rot_uv_back+0x29e>
mov    -0x28(%rbp),%rax
imul   -0x40(%rbp),%rax
add    -0x30(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x88(%rbp),%rax
mov    -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x80(%rbp),%rax
mov    -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x70(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm3
movsd  -0x78(%rbp),%xmm4
mov    $0x5,%al
call   1060 <lamrot_to_lam@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x88(%rbp),%rax
mov    -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x80(%rbp),%rax
mov    -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x70(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm3
mov    $0x4,%al
call   1030 <phirot_to_phi@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x60(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm3
movsd  -0x70(%rbp),%xmm4
movsd  -0x68(%rbp),%xmm5
lea    -0x48(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    $0x6,%al
call   1110 <usvs_to_uv@plt>
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x50(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    138a <rot_uv_back+0x19a>
jmp    1493 <rot_uv_back+0x2a3>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1374 <rot_uv_back+0x184>
mov    -0x80(%rbp),%rcx
lea    0xb51(%rip),%rdi
lea    0xb56(%rip),%rsi
mov    $0x54,%edx
mov    $0x0,%al
call   10e0 <Free@plt>
mov    -0x88(%rbp),%rcx
lea    0xb30(%rip),%rdi
lea    0xb35(%rip),%rsi
mov    $0x55,%edx
mov    $0x0,%al
call   10e0 <Free@plt>
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot_uv_back>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x168,%rsp
mov    %rdx,%rbp
mov    %rsi,0x18(%rsp)
mov    %edi,%r13d
xor    %eax,%eax
call   10b0 <gridInqXsize@plt>
mov    %eax,0x2c(%rsp)
movslq %eax,%rbx
mov    %rbx,0x40(%rsp)
mov    %r13d,%edi
xor    %eax,%eax
call   1090 <gridInqYsize@plt>
movslq %eax,%r14
mov    %r14,0x38(%rsp)
mov    %r13d,%edi
xor    %eax,%eax
call   1040 <gridInqXpole@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x20(%rsp)
mov    %r13d,%edi
xor    %eax,%eax
call   1080 <gridInqYpole@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x10(%rsp)
mov    %r13d,%edi
xor    %eax,%eax
call   1070 <gridInqAngle@plt>
mov    %eax,0x8(%rsp)
lea    0x0(,%rbx,8),%rcx
lea    0xd87(%rip),%rbx
lea    0xd8c(%rip),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x31,%edx
mov    %rcx,0x50(%rsp)
xor    %eax,%eax
call   1050 <Malloc@plt>
movslq %eax,%r15
lea    0x0(,%r14,8),%rcx
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x32,%edx
xor    %eax,%eax
call   1050 <Malloc@plt>
movslq %eax,%rbx
mov    %r13d,%edi
mov    %r15,%rsi
xor    %eax,%eax
call   10d0 <gridInqXvals@plt>
mov    %r13d,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   10a0 <gridInqYvals@plt>
lea    0x60(%rsp),%r14
mov    %r13d,%edi
mov    %r14,%rsi
xor    %eax,%eax
call   1100 <gridInqXunits@plt>
lea    0xda3(%rip),%rcx
lea    0x20(%rsp),%rdx
mov    %r14,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   10c0 <grid_to_degree@plt>
lea    0xd8e(%rip),%rcx
mov    %r14,%rdi
mov    0x40(%rsp),%rsi
mov    %r15,0x30(%rsp)
mov    %r15,%rdx
xor    %eax,%eax
call   10c0 <grid_to_degree@plt>
mov    %r13d,%edi
mov    %r14,%rsi
xor    %eax,%eax
call   10f0 <gridInqYunits@plt>
lea    0xd73(%rip),%rcx
lea    0x10(%rsp),%rdx
mov    %r14,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   10c0 <grid_to_degree@plt>
lea    0xd5e(%rip),%rcx
mov    %r14,%rdi
mov    0x38(%rsp),%r14
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10c0 <grid_to_degree@plt>
mov    0x18(%rsp),%rcx
test   %r14d,%r14d
jle    147f <rot_uv_back+0x28f>
cvtsi2sdl 0x8(%rsp),%xmm1
xor    %r14d,%r14d
movsd  %xmm1,0x8(%rsp)
mov    %rbx,0x48(%rsp)
mov    0x40(%rsp),%r13
mov    0x30(%rsp),%r15
jmp    13ad <rot_uv_back+0x1bd>
xchg   %ax,%ax
add    $0x1,%r14
mov    0x50(%rsp),%rax
add    %rax,%rcx
add    %rax,%r12
cmp    0x38(%rsp),%r14
mov    %r12,%rbp
je     147f <rot_uv_back+0x28f>
cmpl   $0x0,0x2c(%rsp)
mov    %rbp,%r12
jle    1390 <rot_uv_back+0x1a0>
xor    %ebp,%ebp
nopl   0x0(%rax)
movsd  (%rbx,%r14,8),%xmm0
movsd  (%r15,%rbp,8),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
movsd  0x8(%rsp),%xmm4
mov    $0x5,%al
mov    %rcx,%rbx
call   1060 <lamrot_to_lam@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x18(%rsp)
mov    0x48(%rsp),%rax
movsd  (%rax,%r14,8),%xmm0
movsd  (%r15,%rbp,8),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
mov    $0x4,%al
call   1030 <phirot_to_phi@plt>
xorps  %xmm2,%xmm2
cvtsi2sd %eax,%xmm2
movsd  (%rbx,%rbp,8),%xmm0
movsd  (%r12,%rbp,8),%xmm1
movsd  0x10(%rsp),%xmm4
movsd  0x20(%rsp),%xmm5
movsd  0x18(%rsp),%xmm3
lea    0x60(%rsp),%rdi
lea    0x58(%rsp),%rsi
mov    $0x6,%al
call   1110 <usvs_to_uv@plt>
mov    %rbx,%rcx
mov    0x48(%rsp),%rbx
movsd  0x60(%rsp),%xmm0
movsd  %xmm0,(%rcx,%rbp,8)
movsd  0x58(%rsp),%xmm0
movsd  %xmm0,(%r12,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r13
jne    13c0 <rot_uv_back+0x1d0>
jmp    1390 <rot_uv_back+0x1a0>
lea    0xb7a(%rip),%r14
lea    0xb7f(%rip),%rbp
mov    %r14,%rdi
mov    %rbp,%rsi
mov    $0x54,%edx
mov    0x30(%rsp),%rcx
xor    %eax,%eax
call   10e0 <Free@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
mov    $0x55,%edx
mov    %rbx,%rcx
xor    %eax,%eax
call   10e0 <Free@plt>
add    $0x168,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__func__.rot_uv_back = [12 x i8] c"rot_uv_back\00"
@.str = [129 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/Rotuv.c\00"
@.str.1 = [6 x i8] c"xpole\00"
@.str.2 = [16 x i8] c"grid center lon\00"
@.str.3 = [6 x i8] c"ypole\00"
@.str.4 = [16 x i8] c"grid center lat\00"
define void @rot_uv_back(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca double
%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 [256 x i8]
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
%22 = load i32, i32* %4
%23 = call i32 (i32, ...) bitcast (i32 (...)* @gridInqXsize to i32 (i32, ...)*)(i32 %22)
%24 = sext i32 %23 to i64
store i64 %24, i64* %11
%25 = load i32, i32* %4
%26 = call i32 (i32, ...) bitcast (i32 (...)* @gridInqYsize to i32 (i32, ...)*)(i32 %25)
%27 = sext i32 %26 to i64
store i64 %27, i64* %10
%28 = load i32, i32* %4
%29 = call i32 (i32, ...) bitcast (i32 (...)* @gridInqXpole to i32 (i32, ...)*)(i32 %28)
%30 = sitofp i32 %29 to double
store double %30, double* %16
%31 = load i32, i32* %4
%32 = call i32 (i32, ...) bitcast (i32 (...)* @gridInqYpole to i32 (i32, ...)*)(i32 %31)
%33 = sitofp i32 %32 to double
store double %33, double* %17
%34 = load i32, i32* %4
%35 = call i32 (i32, ...) bitcast (i32 (...)* @gridInqAngle to i32 (i32, ...)*)(i32 %34)
%36 = sitofp i32 %35 to double
store double %36, double* %18
%37 = load i64, i64* %11
%38 = mul i64 %37, 8
%39 = call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rot_uv_back, i64 0, i64 0), i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 49, i64 %38)
%40 = sext i32 %39 to i64
%41 = inttoptr i64 %40 to double*
store double* %41, double** %19
%42 = load i64, i64* %10
%43 = mul i64 %42, 8
%44 = call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rot_uv_back, i64 0, i64 0), i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 50, i64 %43)
%45 = sext i32 %44 to i64
%46 = inttoptr i64 %45 to double*
store double* %46, double** %20
%47 = load i32, i32* %4
%48 = load double*, double** %19
%49 = call i32 (i32, double*, ...) bitcast (i32 (...)* @gridInqXvals to i32 (i32, double*, ...)*)(i32 %47, double* %48)
%50 = load i32, i32* %4
%51 = load double*, double** %20
%52 = call i32 (i32, double*, ...) bitcast (i32 (...)* @gridInqYvals to i32 (i32, double*, ...)*)(i32 %50, double* %51)
%53 = load i32, i32* %4
%54 = getelementptr inbounds [256 x i8], [256 x i8]* %21, i64 0, i64 0
%55 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @gridInqXunits to i32 (i32, i8*, ...)*)(i32 %53, i8* %54)
%56 = getelementptr inbounds [256 x i8], [256 x i8]* %21, i64 0, i64 0
%57 = call i32 (i8*, i32, double*, i8*, ...) bitcast (i32 (...)* @grid_to_degree to i32 (i8*, i32, double*, i8*, ...)*)(i8* %56, i32 1, double* %16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%58 = getelementptr inbounds [256 x i8], [256 x i8]* %21, i64 0, i64 0
%59 = load i64, i64* %11
%60 = load double*, double** %19
%61 = call i32 (i8*, i64, double*, i8*, ...) bitcast (i32 (...)* @grid_to_degree to i32 (i8*, i64, double*, i8*, ...)*)(i8* %58, i64 %59, double* %60, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%62 = load i32, i32* %4
%63 = getelementptr inbounds [256 x i8], [256 x i8]* %21, i64 0, i64 0
%64 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @gridInqYunits to i32 (i32, i8*, ...)*)(i32 %62, i8* %63)
%65 = getelementptr inbounds [256 x i8], [256 x i8]* %21, i64 0, i64 0
%66 = call i32 (i8*, i32, double*, i8*, ...) bitcast (i32 (...)* @grid_to_degree to i32 (i8*, i32, double*, i8*, ...)*)(i8* %65, i32 1, double* %17, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%67 = getelementptr inbounds [256 x i8], [256 x i8]* %21, i64 0, i64 0
%68 = load i64, i64* %10
%69 = load double*, double** %20
%70 = call i32 (i8*, i64, double*, i8*, ...) bitcast (i32 (...)* @grid_to_degree to i32 (i8*, i64, double*, i8*, ...)*)(i8* %67, i64 %68, double* %69, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
store i64 0, i64* %8
br label %71
71: ; preds = %136, %3
%72 = load i64, i64* %8
%73 = load i64, i64* %10
%74 = icmp slt i64 %72, %73
br i1 %74, label %75, label %139
75: ; preds = %71
store i64 0, i64* %9
br label %76
76: ; preds = %132, %75
%77 = load i64, i64* %9
%78 = load i64, i64* %11
%79 = icmp slt i64 %77, %78
br i1 %79, label %80, label %135
80: ; preds = %76
%81 = load i64, i64* %8
%82 = load i64, i64* %11
%83 = mul nsw i64 %81, %82
%84 = load i64, i64* %9
%85 = add nsw i64 %83, %84
store i64 %85, i64* %7
%86 = load double*, double** %20
%87 = load i64, i64* %8
%88 = getelementptr inbounds double, double* %86, i64 %87
%89 = load double, double* %88
%90 = load double*, double** %19
%91 = load i64, i64* %9
%92 = getelementptr inbounds double, double* %90, i64 %91
%93 = load double, double* %92
%94 = load double, double* %17
%95 = load double, double* %16
%96 = load double, double* %18
%97 = call i32 (double, double, double, double, double, ...) bitcast (i32 (...)* @lamrot_to_lam to i32 (double, double, double, double, double, ...)*)(double %89, double %93, double %94, double %95, double %96)
%98 = sitofp i32 %97 to double
store double %98, double* %14
%99 = load double*, double** %20
%100 = load i64, i64* %8
%101 = getelementptr inbounds double, double* %99, i64 %100
%102 = load double, double* %101
%103 = load double*, double** %19
%104 = load i64, i64* %9
%105 = getelementptr inbounds double, double* %103, i64 %104
%106 = load double, double* %105
%107 = load double, double* %17
%108 = load double, double* %18
%109 = call i32 (double, double, double, double, ...) bitcast (i32 (...)* @phirot_to_phi to i32 (double, double, double, double, ...)*)(double %102, double %106, double %107, double %108)
%110 = sitofp i32 %109 to double
store double %110, double* %15
%111 = load double*, double** %5
%112 = load i64, i64* %7
%113 = getelementptr inbounds double, double* %111, i64 %112
%114 = load double, double* %113
%115 = load double*, double** %6
%116 = load i64, i64* %7
%117 = getelementptr inbounds double, double* %115, i64 %116
%118 = load double, double* %117
%119 = load double, double* %15
%120 = load double, double* %14
%121 = load double, double* %17
%122 = load double, double* %16
%123 = call i32 (double, double, double, double, double, double, double*, double*, ...) bitcast (i32 (...)* @usvs_to_uv to i32 (double, double, double, double, double, double, double*, double*, ...)*)(double %114, double %118, double %119, double %120, double %121, double %122, double* %12, double* %13)
%124 = load double, double* %12
%125 = load double*, double** %5
%126 = load i64, i64* %7
%127 = getelementptr inbounds double, double* %125, i64 %126
store double %124, double* %127
%128 = load double, double* %13
%129 = load double*, double** %6
%130 = load i64, i64* %7
%131 = getelementptr inbounds double, double* %129, i64 %130
store double %128, double* %131
br label %132
132: ; preds = %80
%133 = load i64, i64* %9
%134 = add nsw i64 %133, 1
store i64 %134, i64* %9
br label %76
135: ; preds = %76
br label %136
136: ; preds = %135
%137 = load i64, i64* %8
%138 = add nsw i64 %137, 1
store i64 %138, i64* %8
br label %71
139: ; preds = %71
%140 = load double*, double** %19
%141 = call i32 (i8*, i8*, i32, double*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, double*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rot_uv_back, i64 0, i64 0), i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 84, double* %140)
%142 = load double*, double** %20
%143 = call i32 (i8*, i8*, i32, double*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, double*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rot_uv_back, i64 0, i64 0), i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 85, double* %142)
ret void
}

LLVM IR (-O2):
@__func__.rot_uv_back = [12 x i8] c"rot_uv_back\00"
@.str = [129 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/Rotuv.c\00"
@.str.1 = [6 x i8] c"xpole\00"
@.str.2 = [16 x i8] c"grid center lon\00"
@.str.3 = [6 x i8] c"ypole\00"
@.str.4 = [16 x i8] c"grid center lat\00"
define void @rot_uv_back(i32 %0, double* nocapture %1, double* nocapture %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca [256 x i8]
%9 = bitcast double* %4 to i8*
%10 = bitcast double* %5 to i8*
%11 = bitcast double* %6 to i8*
%12 = bitcast double* %7 to i8*
%13 = tail call i32 (i32, ...) bitcast (i32 (...)* @gridInqXsize to i32 (i32, ...)*)(i32 %0)
%14 = sext i32 %13 to i64
%15 = tail call i32 (i32, ...) bitcast (i32 (...)* @gridInqYsize to i32 (i32, ...)*)(i32 %0)
%16 = sext i32 %15 to i64
%17 = tail call i32 (i32, ...) bitcast (i32 (...)* @gridInqXpole to i32 (i32, ...)*)(i32 %0)
%18 = sitofp i32 %17 to double
store double %18, double* %6
%19 = tail call i32 (i32, ...) bitcast (i32 (...)* @gridInqYpole to i32 (i32, ...)*)(i32 %0)
%20 = sitofp i32 %19 to double
store double %20, double* %7
%21 = tail call i32 (i32, ...) bitcast (i32 (...)* @gridInqAngle to i32 (i32, ...)*)(i32 %0)
%22 = sitofp i32 %21 to double
%23 = shl nsw i64 %14, 3
%24 = tail call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rot_uv_back, i64 0, i64 0), i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 49, i64 %23)
%25 = sext i32 %24 to i64
%26 = inttoptr i64 %25 to double*
%27 = shl nsw i64 %16, 3
%28 = tail call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rot_uv_back, i64 0, i64 0), i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 50, i64 %27)
%29 = sext i32 %28 to i64
%30 = inttoptr i64 %29 to double*
%31 = tail call i32 (i32, double*, ...) bitcast (i32 (...)* @gridInqXvals to i32 (i32, double*, ...)*)(i32 %0, double* %26)
%32 = tail call i32 (i32, double*, ...) bitcast (i32 (...)* @gridInqYvals to i32 (i32, double*, ...)*)(i32 %0, double* %30)
%33 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%34 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @gridInqXunits to i32 (i32, i8*, ...)*)(i32 %0, i8* %33)
%35 = call i32 (i8*, i32, double*, i8*, ...) bitcast (i32 (...)* @grid_to_degree to i32 (i8*, i32, double*, i8*, ...)*)(i8* %33, i32 1, double* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%36 = call i32 (i8*, i64, double*, i8*, ...) bitcast (i32 (...)* @grid_to_degree to i32 (i8*, i64, double*, i8*, ...)*)(i8* %33, i64 %14, double* %26, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%37 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @gridInqYunits to i32 (i32, i8*, ...)*)(i32 %0, i8* %33)
%38 = call i32 (i8*, i32, double*, i8*, ...) bitcast (i32 (...)* @grid_to_degree to i32 (i8*, i32, double*, i8*, ...)*)(i8* %33, i32 1, double* %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%39 = call i32 (i8*, i64, double*, i8*, ...) bitcast (i32 (...)* @grid_to_degree to i32 (i8*, i64, double*, i8*, ...)*)(i8* %33, i64 %16, double* %30, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%40 = icmp sgt i32 %15, 0
br i1 %40, label %41, label %77
41: ; preds = %3
%42 = icmp sgt i32 %13, 0
br label %43
43: ; preds = %41, %74
%44 = phi i64 [ 0, %41 ], [ %75, %74 ]
br i1 %42, label %45, label %74
45: ; preds = %43
%46 = mul nsw i64 %44, %14
%47 = getelementptr inbounds double, double* %30, i64 %44
br label %48
48: ; preds = %45, %48
%49 = phi i64 [ 0, %45 ], [ %72, %48 ]
%50 = add nsw i64 %49, %46
%51 = load double, double* %47
%52 = getelementptr inbounds double, double* %26, i64 %49
%53 = load double, double* %52
%54 = load double, double* %7
%55 = load double, double* %6
%56 = call i32 (double, double, double, double, double, ...) bitcast (i32 (...)* @lamrot_to_lam to i32 (double, double, double, double, double, ...)*)(double %51, double %53, double %54, double %55, double %22)
%57 = sitofp i32 %56 to double
%58 = load double, double* %47
%59 = load double, double* %52
%60 = load double, double* %7
%61 = call i32 (double, double, double, double, ...) bitcast (i32 (...)* @phirot_to_phi to i32 (double, double, double, double, ...)*)(double %58, double %59, double %60, double %22)
%62 = sitofp i32 %61 to double
%63 = getelementptr inbounds double, double* %1, i64 %50
%64 = load double, double* %63
%65 = getelementptr inbounds double, double* %2, i64 %50
%66 = load double, double* %65
%67 = load double, double* %7
%68 = load double, double* %6
%69 = call i32 (double, double, double, double, double, double, double*, double*, ...) bitcast (i32 (...)* @usvs_to_uv to i32 (double, double, double, double, double, double, double*, double*, ...)*)(double %64, double %66, double %62, double %57, double %67, double %68, double* %4, double* %5)
%70 = load double, double* %4
store double %70, double* %63
%71 = load double, double* %5
store double %71, double* %65
%72 = add nuw nsw i64 %49, 1
%73 = icmp eq i64 %72, %14
br i1 %73, label %74, label %48
74: ; preds = %48, %43
%75 = add nuw nsw i64 %44, 1
%76 = icmp eq i64 %75, %16
br i1 %76, label %77, label %43
77: ; preds = %74, %3
%78 = call i32 (i8*, i8*, i32, double*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, double*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rot_uv_back, i64 0, i64 0), i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 84, double* %26)
%79 = call i32 (i8*, i8*, i32, double*, ...) bitcast (i32 (...)* @Free to i32 (i8*, i8*, i32, double*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rot_uv_back, i64 0, i64 0), i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 85, double* %30)
ret void
}