#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ a2b_ord2(int, int, double const *, double const *,
                            double const *, double const *, double const *,
                            double *, int const, int const, int const,
                            int const);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
void grad_c2l(const int *nlon, const int *nlat, const double *pin,
              const double *dx, const double *dy, const double *area,
              const double *edge_w, const double *edge_e, const double *edge_s,
              const double *edge_n, const double *en_n, const double *en_e,
              const double *vlon, const double *vlat, double *grad_x,
              double *grad_y, const int *on_west_edge, const int *on_east_edge,
              const int *on_south_edge, const int *on_north_edge) {
  double *pb, *pdx, *pdy, *grad3;
  int nx, ny, nxp, nyp, i, j, m0, m1, n;
  nx = *nlon;
  ny = *nlat;
  nxp = nx + 1;
  nyp = ny + 1;
  pb = (double *)malloc(nxp * nyp * sizeof(double));
  pdx = (double *)malloc(3 * nx * (ny + 1) * sizeof(double));
  pdy = (double *)malloc(3 * (nx + 1) * ny * sizeof(double));
  grad3 = (double *)malloc(3 * nx * ny * sizeof(double));
  a2b_ord2(nx, ny, pin, edge_w, edge_e, edge_s, edge_n, pb, *on_west_edge,
           *on_east_edge, *on_south_edge, *on_north_edge);
  for (j = 0; j < nyp; j++)
    for (i = 0; i < nx; i++) {
      m0 = j * nx + i;
      m1 = j * nxp + i;
      for (n = 0; n < 3; n++) {
        pdx[3 * m0 + n] =
            0.5 * (pb[m1] + pb[m1 + 1]) * dx[m0] * en_n[3 * m0 + n];
      }
    }
  for (j = 0; j < ny; j++)
    for (i = 0; i < nxp; i++) {
      m0 = j * nxp + i;
      for (n = 0; n < 3; n++) {
        pdy[3 * m0 + n] =
            0.5 * (pb[m0] + pb[m0 + nxp]) * dy[m0] * en_e[3 * m0 + n];
      }
    }
  for (j = 0; j < ny; j++)
    for (i = 0; i < nx; i++) {
      m0 = 3 * (j * nx + i);
      for (n = 0; n < 3; n++) {
        grad3[m0 + n] = pdx[3 * ((j + 1) * nx + i) + n] - pdx[m0 + n] -
                        pdy[3 * (j * nxp + i) + n] +
                        pdy[3 * (j * nxp + i + 1) + n];
      }
    }
  for (j = 0; j < ny; j++)
    for (i = 0; i < nx; i++) {
      m0 = j * nx + i;
      m1 = 3 * m0;
      grad_x[m0] = (vlon[m1] * grad3[m1] + vlon[m1 + 1] * grad3[m1 + 1] +
                    vlon[m1 + 2] * grad3[m1 + 2]) /
                   area[m0];
      grad_x[m0] *= (6371000.);
      grad_y[m0] = (vlat[m1] * grad3[m1] + vlat[m1 + 1] * grad3[m1 + 1] +
                    vlat[m1 + 2] * grad3[m1 + 2]) /
                   area[m0];
      grad_y[m0] *= (6371000.);
    }
  free(pb);
  free(pdx);
  free(pdy);
  free(grad3);
}


x86 assembly (clang, -O0):
<grad_c2l>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0xa8,%rsp
mov    0x78(%rbp),%rax
mov    0x70(%rbp),%rax
mov    0x68(%rbp),%rax
mov    0x60(%rbp),%rax
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
mov    %r8,-0x40(%rbp)
mov    %r9,-0x48(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x70(%rbp)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
mov    -0x74(%rbp),%eax
imul   -0x78(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x50(%rbp)
imul   $0x3,-0x6c(%rbp),%eax
mov    -0x70(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
imul   $0x3,%eax,%eax
imul   -0x70(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x60(%rbp)
imul   $0x3,-0x6c(%rbp),%eax
imul   -0x70(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x68(%rbp)
mov    -0x6c(%rbp),%edi
mov    -0x70(%rbp),%esi
mov    -0x30(%rbp),%rdx
mov    0x10(%rbp),%rcx
mov    0x18(%rbp),%r8
mov    0x20(%rbp),%r9
mov    0x28(%rbp),%r15
mov    -0x50(%rbp),%r14
mov    0x60(%rbp),%rax
mov    (%rax),%ebx
mov    0x68(%rbp),%rax
mov    (%rax),%r11d
mov    0x70(%rbp),%rax
mov    (%rax),%r10d
mov    0x78(%rbp),%rax
mov    (%rax),%eax
mov    %r15,(%rsp)
mov    %r14,0x8(%rsp)
mov    %ebx,0x10(%rsp)
mov    %r11d,0x18(%rsp)
mov    %r10d,0x20(%rsp)
mov    %eax,0x28(%rsp)
call   1040 <a2b_ord2@plt>
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    1383 <grad_c2l+0x253>
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    1370 <grad_c2l+0x240>
mov    -0x80(%rbp),%eax
imul   -0x6c(%rbp),%eax
add    -0x7c(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x80(%rbp),%eax
imul   -0x74(%rbp),%eax
add    -0x7c(%rbp),%eax
mov    %eax,-0x88(%rbp)
movl   $0x0,-0x8c(%rbp)
cmpl   $0x3,-0x8c(%rbp)
jge    135d <grad_c2l+0x22d>
mov    -0x50(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x50(%rbp),%rax
mov    -0x88(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
movsd  0xd05(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x84(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
imul   $0x3,-0x84(%rbp),%ecx
add    -0x8c(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
imul   $0x3,-0x84(%rbp),%ecx
add    -0x8c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    12c9 <grad_c2l+0x199>
jmp    1362 <grad_c2l+0x232>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1293 <grad_c2l+0x163>
jmp    1375 <grad_c2l+0x245>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    1280 <grad_c2l+0x150>
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x70(%rbp),%eax
jge    147d <grad_c2l+0x34d>
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    146a <grad_c2l+0x33a>
mov    -0x80(%rbp),%eax
imul   -0x74(%rbp),%eax
add    -0x7c(%rbp),%eax
mov    %eax,-0x84(%rbp)
movl   $0x0,-0x8c(%rbp)
cmpl   $0x3,-0x8c(%rbp)
jge    1457 <grad_c2l+0x327>
mov    -0x50(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x50(%rbp),%rax
mov    -0x84(%rbp),%ecx
add    -0x74(%rbp),%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
movsd  0xc0b(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x40(%rbp),%rax
movslq -0x84(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x38(%rbp),%rax
imul   $0x3,-0x84(%rbp),%ecx
add    -0x8c(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
imul   $0x3,-0x84(%rbp),%ecx
add    -0x8c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    13c3 <grad_c2l+0x293>
jmp    145c <grad_c2l+0x32c>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    139d <grad_c2l+0x26d>
jmp    146f <grad_c2l+0x33f>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    138a <grad_c2l+0x25a>
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x70(%rbp),%eax
jge    159a <grad_c2l+0x46a>
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    1587 <grad_c2l+0x457>
mov    -0x80(%rbp),%eax
imul   -0x6c(%rbp),%eax
add    -0x7c(%rbp),%eax
imul   $0x3,%eax,%eax
mov    %eax,-0x84(%rbp)
movl   $0x0,-0x8c(%rbp)
cmpl   $0x3,-0x8c(%rbp)
jge    1574 <grad_c2l+0x444>
mov    -0x58(%rbp),%rax
mov    -0x80(%rbp),%ecx
add    $0x1,%ecx
imul   -0x6c(%rbp),%ecx
add    -0x7c(%rbp),%ecx
imul   $0x3,%ecx,%ecx
add    -0x8c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x84(%rbp),%ecx
add    -0x8c(%rbp),%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
mov    -0x80(%rbp),%ecx
imul   -0x74(%rbp),%ecx
add    -0x7c(%rbp),%ecx
imul   $0x3,%ecx,%ecx
add    -0x8c(%rbp),%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
mov    -0x80(%rbp),%ecx
imul   -0x74(%rbp),%ecx
add    -0x7c(%rbp),%ecx
add    $0x1,%ecx
imul   $0x3,%ecx,%ecx
add    -0x8c(%rbp),%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x68(%rbp),%rax
mov    -0x84(%rbp),%ecx
add    -0x8c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    14c0 <grad_c2l+0x390>
jmp    1579 <grad_c2l+0x449>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1497 <grad_c2l+0x367>
jmp    158c <grad_c2l+0x45c>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    1484 <grad_c2l+0x354>
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x70(%rbp),%eax
jge    1780 <grad_c2l+0x650>
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    176d <grad_c2l+0x63d>
mov    -0x80(%rbp),%eax
imul   -0x6c(%rbp),%eax
add    -0x7c(%rbp),%eax
mov    %eax,-0x84(%rbp)
imul   $0x3,-0x84(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    0x40(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x68(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x40(%rbp),%rax
mov    -0x88(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x68(%rbp),%rax
mov    -0x88(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    0x40(%rbp),%rax
mov    -0x88(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x68(%rbp),%rax
mov    -0x88(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
movslq -0x84(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    0x50(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x50(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  0x96c(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x48(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x68(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x48(%rbp),%rax
mov    -0x88(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x68(%rbp),%rax
mov    -0x88(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    0x48(%rbp),%rax
mov    -0x88(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x68(%rbp),%rax
mov    -0x88(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
movslq -0x84(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    0x58(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x58(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  0x8ab(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    15b4 <grad_c2l+0x484>
jmp    1772 <grad_c2l+0x642>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    15a1 <grad_c2l+0x471>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
add    $0xa8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<grad_c2l>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe8,%rsp
mov    %r9,0xd8(%rsp)
mov    %r8,0xa8(%rsp)
mov    %rcx,0x68(%rsp)
mov    %rdx,0x30(%rsp)
mov    0x168(%rsp),%rax
mov    %rax,0xd0(%rsp)
mov    0x160(%rsp),%rax
mov    %rax,0xc0(%rsp)
mov    0x158(%rsp),%rax
mov    %rax,0xb8(%rsp)
mov    0x150(%rsp),%rax
mov    %rax,0xb0(%rsp)
mov    0x148(%rsp),%r12
mov    (%rdi),%eax
mov    %rax,0x78(%rsp)
movslq %eax,%r14
mov    (%rsi),%r13d
lea    0x1(%r14),%r15
lea    0x1(%r13),%ebp
mov    %r15d,%edi
imul   %ebp,%edi
shl    $0x3,%edi
mov    0x140(%rsp),%rax
mov    %rax,0x88(%rsp)
mov    0x120(%rsp),%rax
mov    %rax,0x8(%rsp)
mov    0x128(%rsp),%rax
mov    %rax,(%rsp)
mov    0x130(%rsp),%rax
mov    %rax,0x18(%rsp)
mov    0x138(%rsp),%rax
mov    %rax,0x28(%rsp)
mov    0x188(%rsp),%rax
mov    %rax,0x10(%rsp)
mov    0x180(%rsp),%rax
mov    %rax,0x60(%rsp)
mov    0x178(%rsp),%rax
mov    %rax,0x58(%rsp)
mov    0x170(%rsp),%rax
mov    %rax,0x50(%rsp)
call   1050 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %r14d,%ebx
imul   %r13d,%ebx
mov    %r14d,%eax
mov    %ebp,0x48(%rsp)
imul   %ebp,%eax
shl    $0x3,%eax
lea    (%rax,%rax,2),%edi
call   1050 <malloc@plt>
mov    %rax,0x90(%rsp)
mov    %r15,0x38(%rsp)
mov    %r15d,%eax
imul   %r13d,%eax
shl    $0x3,%eax
lea    (%rax,%rax,2),%edi
call   1050 <malloc@plt>
mov    %rax,0x70(%rsp)
shl    $0x3,%ebx
lea    (%rbx,%rbx,2),%edi
call   1050 <malloc@plt>
mov    %rax,0xa0(%rsp)
mov    0x50(%rsp),%rax
mov    (%rax),%r10d
mov    0x58(%rsp),%rax
mov    (%rax),%r11d
mov    0x60(%rsp),%rax
mov    (%rax),%ebx
mov    0x10(%rsp),%rax
mov    (%rax),%eax
mov    %r14,0xc8(%rsp)
mov    %r14d,%edi
mov    %r13d,%esi
mov    0x30(%rsp),%rdx
mov    0x8(%rsp),%rcx
mov    (%rsp),%r8
mov    0x18(%rsp),%r9
push   %rax
push   %rbx
push   %r11
push   %r10
push   0x40(%rsp)
push   0x50(%rsp)
call   1040 <a2b_ord2@plt>
add    $0x30,%rsp
mov    %r13,0x28(%rsp)
test   %r13d,%r13d
js     1c13 <grad_c2l+0xae3>
mov    0x48(%rsp),%r13d
mov    0x38(%rsp),%rcx
lea    -0x1(%rcx),%rax
mov    %rax,0x60(%rsp)
lea    (%rax,%rax,2),%rax
mov    %rax,0x58(%rsp)
mov    0x78(%rsp),%r14
lea    (%r14,%r14,2),%rax
mov    %rax,0x50(%rsp)
lea    -0x8(,%rcx,8),%r15
ff
lea    0x8(%r15),%rax
mov    %rax,0x30(%rsp)
mov    0x20(%rsp),%r10
lea    (%r10,%r14,8),%rax
add    $0x8,%rax
mov    %rax,0x48(%rsp)
mov    %r14d,%eax
and    $0xfffffffe,%eax
mov    %rax,0x98(%rsp)
lea    (%r15,%r15,2),%rax
mov    %rax,0x18(%rsp)
lea    0x8(%r10),%r8
xor    %r9d,%r9d
movsd  0xca4(%rip),%xmm0
movapd 0xc8c(%rip),%xmm1
mov    0x68(%rsp),%r11
mov    0x88(%rsp),%rcx
mov    0x90(%rsp),%rdi
mov    %r15,0x40(%rsp)
mov    %r13,0x80(%rsp)
jmp    13c6 <grad_c2l+0x296>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r9
mov    0x18(%rsp),%rax
add    %rax,%rdi
add    %rax,%rcx
add    %r15,%r11
mov    0x30(%rsp),%rax
add    %rax,%r8
add    %rax,%r10
cmp    %r13,%r9
je     1600 <grad_c2l+0x4d0>
test   %r14d,%r14d
jle    13a0 <grad_c2l+0x270>
cmp    $0x1,%r14d
jne    13e0 <grad_c2l+0x2b0>
xor    %edx,%edx
jmp    1570 <grad_c2l+0x440>
nopl   0x0(%rax,%rax,1)
mov    0x58(%rsp),%rax
imul   %r9,%rax
mov    0x50(%rsp),%rdx
add    %rax,%rdx
mov    %rdx,(%rsp)
mov    0x30(%rsp),%rdx
imul   %r9,%rdx
mov    0x20(%rsp),%rsi
add    %rdx,%rsi
mov    %rsi,0x8(%rsp)
add    0x48(%rsp),%rdx
mov    0x60(%rsp),%rbp
imul   %r9,%rbp
mov    0x90(%rsp),%r13
lea    0x0(,%rax,8),%rsi
add    %r13,%rsi
mov    0x68(%rsp),%rbx
mov    %r14,%r15
lea    (%rbx,%rbp,8),%r14
mov    %r14,0x10(%rsp)
mov    %r15,%r14
add    %r15,%rbp
cmp    %rsi,%rdx
mov    (%rsp),%rdx
lea    0x0(%r13,%rdx,8),%rdx
seta   %r15b
cmp    %rdx,0x8(%rsp)
lea    (%rbx,%rbp,8),%rbx
setb   0x8(%rsp)
cmp    %rbx,%rsi
setb   %bpl
cmp    %rdx,0x10(%rsp)
mov    0x88(%rsp),%r13
mov    (%rsp),%rbx
lea    0x0(%r13,%rbx,8),%rbx
setb   (%rsp)
cmp    %rbx,%rsi
lea    0x0(%r13,%rax,8),%rsi
setb   %al
cmp    %rdx,%rsi
setb   %sil
test   %r15b,0x8(%rsp)
jne    155a <grad_c2l+0x42a>
and    (%rsp),%bpl
mov    0x80(%rsp),%r13
jne    1566 <grad_c2l+0x436>
mov    $0x0,%edx
and    %sil,%al
mov    0x40(%rsp),%r15
jne    1570 <grad_c2l+0x440>
xor    %eax,%eax
xor    %edx,%edx
mov    0x98(%rsp),%rsi
movupd -0x8(%r8,%rdx,8),%xmm2
movupd (%r8,%rdx,8),%xmm3
addpd  %xmm2,%xmm3
mulpd  %xmm1,%xmm3
movupd (%r11,%rdx,8),%xmm2
mulpd  %xmm3,%xmm2
movupd (%rcx,%rax,1),%xmm3
movupd 0x10(%rcx,%rax,1),%xmm4
movupd 0x20(%rcx,%rax,1),%xmm5
movapd %xmm4,%xmm6
movsd  %xmm3,%xmm6
shufpd $0x1,%xmm5,%xmm3
movsd  %xmm4,%xmm5
mulpd  %xmm2,%xmm6
mulpd  %xmm2,%xmm3
mulpd  %xmm2,%xmm5
movapd %xmm6,%xmm2
unpcklpd %xmm3,%xmm2
unpckhpd %xmm5,%xmm3
shufpd $0x2,%xmm6,%xmm5
movupd %xmm5,0x10(%rdi,%rax,1)
movupd %xmm3,0x20(%rdi,%rax,1)
movupd %xmm2,(%rdi,%rax,1)
add    $0x2,%rdx
add    $0x30,%rax
cmp    %rdx,%rsi
jne    14d0 <grad_c2l+0x3a0>
mov    %rsi,%rdx
cmp    %r14,%rsi
je     13a0 <grad_c2l+0x270>
jmp    1570 <grad_c2l+0x440>
xor    %edx,%edx
mov    0x80(%rsp),%r13
jmp    1568 <grad_c2l+0x438>
xor    %edx,%edx
mov    0x40(%rsp),%r15
nopl   (%rax)
mov    %r14,%rbx
sub    %rdx,%rbx
lea    (%r10,%rdx,8),%rax
lea    (%rdx,%rdx,2),%rbp
add    $0x2,%rbp
lea    (%r11,%rdx,8),%rdx
xor    %esi,%esi
nopl   0x0(%rax,%rax,1)
movsd  (%rax,%rsi,8),%xmm2
addsd  0x8(%rax,%rsi,8),%xmm2
mulsd  %xmm0,%xmm2
mulsd  (%rdx,%rsi,8),%xmm2
mulsd  -0x10(%rcx,%rbp,8),%xmm2
movsd  %xmm2,-0x10(%rdi,%rbp,8)
movsd  (%rax,%rsi,8),%xmm2
addsd  0x8(%rax,%rsi,8),%xmm2
mulsd  %xmm0,%xmm2
mulsd  (%rdx,%rsi,8),%xmm2
mulsd  -0x8(%rcx,%rbp,8),%xmm2
movsd  %xmm2,-0x8(%rdi,%rbp,8)
movsd  (%rax,%rsi,8),%xmm2
addsd  0x8(%rax,%rsi,8),%xmm2
mulsd  %xmm0,%xmm2
mulsd  (%rdx,%rsi,8),%xmm2
mulsd  (%rcx,%rbp,8),%xmm2
movsd  %xmm2,(%rdi,%rbp,8)
add    $0x1,%rsi
add    $0x3,%rbp
cmp    %rsi,%rbx
jne    1590 <grad_c2l+0x460>
jmp    13a0 <grad_c2l+0x270>
cmpl   $0x0,0x28(%rsp)
mov    0x38(%rsp),%rcx
jle    1c13 <grad_c2l+0xae3>
movslq %ecx,%rbx
mov    %ebx,%esi
lea    (%rcx,%rcx,2),%rax
add    $0xfffffffffffffffd,%rax
lea    0x18(,%rax,8),%rax
mov    %rax,0x88(%rsp)
lea    0x0(,%rsi,8),%r9
lea    (%r9,%r9,2),%rax
mov    0x70(%rsp),%rbp
lea    0x0(%rbp,%rax,1),%r8
mov    0x20(%rsp),%rdx
lea    (%rdx,%rcx,8),%rdi
mov    %rdi,0x58(%rsp)
add    %rsi,%rcx
lea    (%rdx,%rcx,8),%rcx
mov    %rcx,0x50(%rsp)
lea    (%rdx,%rsi,8),%rcx
mov    %rcx,0x48(%rsp)
mov    0xa8(%rsp),%r10
lea    (%r10,%rsi,8),%rcx
mov    %rcx,0x80(%rsp)
add    %r12,%rax
cmp    %rax,%rbp
setb   %al
mov    %r8,0x60(%rsp)
cmp    %r12,%r8
seta   %cl
and    %al,%cl
mov    %cl,0x40(%rsp)
mov    %rsi,(%rsp)
and    $0xfffffffe,%esi
mov    %rsi,0xe0(%rsp)
lea    (%rbx,%rbx,2),%rax
add    $0xfffffffffffffffd,%rax
lea    0x18(,%rax,8),%r13
lea    -0x8(,%rbx,8),%r15
ff
add    $0x8,%r15
lea    (%rdx,%rbx,8),%r14
and    $0xfffffffffffffff0,%r9
mov    %r9,0x98(%rsp)
xor    %r9d,%r9d
mov    %rbx,0x18(%rsp)
mov    %rbx,%rsi
jmp    1703 <grad_c2l+0x5d3>
nopl   0x0(%rax)
add    $0x1,%r9
add    %r13,%rbp
add    %r13,%r12
add    %r15,%r10
add    %r15,%r14
add    %r15,%rdx
add    0x18(%rsp),%rsi
cmp    0x28(%rsp),%r9
je     1937 <grad_c2l+0x807>
cmpl   $0x0,0x78(%rsp)
js     16e0 <grad_c2l+0x5b0>
cmpl   $0x2,0x38(%rsp)
jae    1720 <grad_c2l+0x5f0>
xor    %ecx,%ecx
jmp    1890 <grad_c2l+0x760>
nopl   0x0(%rax,%rax,1)
mov    %rsi,0x68(%rsp)
mov    %r15,%rsi
mov    %r13,%r15
mov    0x88(%rsp),%rax
imul   %r9,%rax
mov    0x70(%rsp),%rcx
add    %rax,%rcx
add    0x60(%rsp),%rax
mov    0x30(%rsp),%rdi
imul   %r9,%rdi
mov    0x58(%rsp),%rbx
lea    (%rbx,%rdi,1),%r8
mov    0x50(%rsp),%rbx
lea    (%rbx,%rdi,1),%r13
mov    0x20(%rsp),%rbx
add    %rdi,%rbx
mov    %rbx,0x10(%rsp)
mov    0x48(%rsp),%rbx
lea    (%rbx,%rdi,1),%r11
mov    0xa8(%rsp),%rbx
add    %rdi,%rbx
mov    %rbx,0x8(%rsp)
add    0x80(%rsp),%rdi
cmp    %r13,%rcx
setb   %bl
cmp    %rax,%r8
setb   %r8b
and    %bl,%r8b
cmp    %r11,%rcx
setb   %r11b
cmp    %rax,0x10(%rsp)
setb   %bl
and    %r11b,%bl
or     %r8b,%bl
cmp    %rdi,%rcx
setb   %cl
cmp    %rax,0x8(%rsp)
setb   %al
and    %cl,%al
or     %bl,%al
or     0x40(%rsp),%al
je     17dc <grad_c2l+0x6ac>
xor    %ecx,%ecx
mov    %r15,%r13
mov    %rsi,%r15
mov    0x68(%rsp),%rsi
jmp    1890 <grad_c2l+0x760>
xor    %eax,%eax
xor    %edi,%edi
mov    0x98(%rsp),%rcx
nopl   0x0(%rax,%rax,1)
movupd (%rdx,%rax,1),%xmm2
movupd (%r14,%rax,1),%xmm3
addpd  %xmm2,%xmm3
mulpd  %xmm1,%xmm3
movupd (%r10,%rax,1),%xmm2
mulpd  %xmm3,%xmm2
movupd (%r12,%rdi,1),%xmm3
movupd 0x10(%r12,%rdi,1),%xmm4
movupd 0x20(%r12,%rdi,1),%xmm5
movapd %xmm4,%xmm6
movsd  %xmm3,%xmm6
shufpd $0x1,%xmm5,%xmm3
movsd  %xmm4,%xmm5
mulpd  %xmm2,%xmm6
mulpd  %xmm2,%xmm3
mulpd  %xmm2,%xmm5
movapd %xmm6,%xmm2
unpcklpd %xmm3,%xmm2
unpckhpd %xmm5,%xmm3
shufpd $0x2,%xmm6,%xmm5
movupd %xmm5,0x10(%rbp,%rdi,1)
movupd %xmm3,0x20(%rbp,%rdi,1)
movupd %xmm2,0x0(%rbp,%rdi,1)
add    $0x30,%rdi
add    $0x10,%rax
cmp    %rax,%rcx
jne    17f0 <grad_c2l+0x6c0>
mov    0xe0(%rsp),%rax
mov    %rax,%rcx
cmp    (%rsp),%rax
mov    %r15,%r13
mov    %rsi,%r15
mov    0x68(%rsp),%rsi
je     16e0 <grad_c2l+0x5b0>
xchg   %ax,%ax
lea    (%rcx,%rcx,2),%rbx
add    $0x2,%rbx
lea    (%rcx,%rsi,1),%rax
mov    0x20(%rsp),%rdi
lea    (%rdi,%rax,8),%rax
lea    (%rdx,%rcx,8),%r11
lea    (%r10,%rcx,8),%r8
mov    (%rsp),%rdi
sub    %rcx,%rdi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
movsd  (%r11,%rcx,8),%xmm2
addsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm0,%xmm2
mulsd  (%r8,%rcx,8),%xmm2
mulsd  -0x10(%r12,%rbx,8),%xmm2
movsd  %xmm2,-0x10(%rbp,%rbx,8)
movsd  (%r11,%rcx,8),%xmm2
addsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm0,%xmm2
mulsd  (%r8,%rcx,8),%xmm2
mulsd  -0x8(%r12,%rbx,8),%xmm2
movsd  %xmm2,-0x8(%rbp,%rbx,8)
movsd  (%r11,%rcx,8),%xmm2
addsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm0,%xmm2
mulsd  (%r8,%rcx,8),%xmm2
mulsd  (%r12,%rbx,8),%xmm2
movsd  %xmm2,0x0(%rbp,%rbx,8)
add    $0x3,%rbx
add    $0x1,%rcx
cmp    %rcx,%rdi
jne    18c0 <grad_c2l+0x790>
jmp    16e0 <grad_c2l+0x5b0>
cmpl   $0x0,0x28(%rsp)
mov    0xc0(%rsp),%r8
mov    0xb8(%rsp),%rsi
mov    0xb0(%rsp),%rdx
mov    0x38(%rsp),%rax
jle    1c13 <grad_c2l+0xae3>
movabs $0x300000000,%r13
cltq
lea    (%rax,%rax,2),%rcx
mov    %rcx,0x30(%rsp)
lea    (%rax,%rax,2),%rcx
add    $0xfffffffffffffffd,%rcx
mov    %rcx,0x18(%rsp)
shl    $0x20,%rax
lea    (%rax,%rax,2),%rax
mov    %rax,(%rsp)
mov    0x70(%rsp),%rax
add    $0x10,%rax
mov    %rax,0x8(%rsp)
mov    0x90(%rsp),%rax
add    $0x10,%rax
mov    %rax,0x10(%rsp)
mov    0xa0(%rsp),%rax
add    $0x10,%rax
mov    0x78(%rsp),%rcx
lea    0x0(,%rcx,8),%rdi
mov    %rdi,0x38(%rsp)
lea    (%rdi,%rdi,2),%r15
xor    %ebx,%ebx
jmp    19f2 <grad_c2l+0x8c2>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rbx
mov    %rbx,%rdi
cmp    0x28(%rsp),%rdi
je     1b14 <grad_c2l+0x9e4>
test   %ecx,%ecx
jle    19e0 <grad_c2l+0x8b0>
lea    0x1(%rbx),%rdx
mov    (%rsp),%r14
imul   %rbx,%r14
movabs $0x500000000,%rcx
lea    (%r14,%rcx,1),%r8
movabs $0x400000000,%rcx
lea    (%r14,%rcx,1),%r12
add    %r13,%r14
mov    0x30(%rsp),%rdi
imul   %rbx,%rdi
mov    0x8(%rsp),%rcx
lea    (%rcx,%rdi,8),%r10
mov    0x18(%rsp),%rcx
mov    %rcx,%rdi
mov    %rdx,%rsi
imul   %rdx,%rdi
mov    0x10(%rsp),%rdx
lea    (%rdx,%rdi,8),%rdi
imul   %rcx,%rbx
lea    (%rax,%rbx,8),%rbp
lea    (%rdx,%rbx,8),%r11
xor    %ebx,%ebx
mov    0x70(%rsp),%rdx
xchg   %ax,%ax
movsd  -0x10(%rdi,%rbx,1),%xmm0
subsd  -0x10(%r11,%rbx,1),%xmm0
subsd  -0x10(%r10,%rbx,1),%xmm0
mov    %r14,%r9
sar    $0x1d,%r9
addsd  (%rdx,%r9,1),%xmm0
movsd  %xmm0,-0x10(%rbp,%rbx,1)
movsd  -0x8(%rdi,%rbx,1),%xmm0
subsd  -0x8(%r11,%rbx,1),%xmm0
subsd  -0x8(%r10,%rbx,1),%xmm0
mov    %r12,%rcx
sar    $0x1d,%rcx
addsd  (%rdx,%rcx,1),%xmm0
movsd  %xmm0,-0x8(%rbp,%rbx,1)
movsd  (%rdi,%rbx,1),%xmm0
subsd  (%r11,%rbx,1),%xmm0
subsd  (%r10,%rbx,1),%xmm0
mov    %r8,%rcx
sar    $0x1d,%rcx
addsd  (%rdx,%rcx,1),%xmm0
movsd  %xmm0,0x0(%rbp,%rbx,1)
add    %r13,%r8
add    %r13,%r12
add    %r13,%r14
add    $0x18,%rbx
cmp    %rbx,%r15
jne    1a60 <grad_c2l+0x930>
mov    %rsi,%rdi
mov    %rsi,%rbx
mov    0xc0(%rsp),%r8
mov    0xb8(%rsp),%rsi
mov    0xb0(%rsp),%rdx
mov    0x78(%rsp),%rcx
cmp    0x28(%rsp),%rdi
jne    19f2 <grad_c2l+0x8c2>
mov    0xc8(%rsp),%rcx
shl    $0x3,%rcx
add    $0x10,%rdx
mov    %rcx,%r11
lea    (%rcx,%rcx,2),%r9
add    $0x10,%rsi
xor    %r10d,%r10d
movsd  0x4de(%rip),%xmm0
mov    0xd8(%rsp),%rcx
mov    0xd0(%rsp),%rbx
mov    0x38(%rsp),%r14
jmp    1b84 <grad_c2l+0xa54>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r10
mov    %r11,%rdi
add    %r11,%rcx
add    %r11,%r8
add    %r11,%rbx
add    %r9,%rdx
add    %r9,%rax
add    %r9,%rsi
cmp    0x28(%rsp),%r10
je     1c13 <grad_c2l+0xae3>
cmpl   $0x0,0x78(%rsp)
jle    1b60 <grad_c2l+0xa30>
xor    %edi,%edi
xor    %ebp,%ebp
nop
movsd  -0x10(%rdx,%rdi,1),%xmm1
movsd  -0x8(%rdx,%rdi,1),%xmm2
mulsd  -0x8(%rax,%rdi,1),%xmm2
mulsd  -0x10(%rax,%rdi,1),%xmm1
movsd  (%rdx,%rdi,1),%xmm3
mulsd  (%rax,%rdi,1),%xmm3
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm3
divsd  (%rcx,%rbp,1),%xmm3
mulsd  %xmm0,%xmm3
movsd  %xmm3,(%r8,%rbp,1)
movsd  -0x10(%rsi,%rdi,1),%xmm1
movsd  -0x8(%rsi,%rdi,1),%xmm2
mulsd  -0x8(%rax,%rdi,1),%xmm2
mulsd  -0x10(%rax,%rdi,1),%xmm1
addsd  %xmm2,%xmm1
movsd  (%rsi,%rdi,1),%xmm2
mulsd  (%rax,%rdi,1),%xmm2
addsd  %xmm1,%xmm2
divsd  (%rcx,%rbp,1),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,(%rbx,%rbp,1)
add    $0x8,%rbp
add    $0x18,%rdi
cmp    %rbp,%r14
jne    1b90 <grad_c2l+0xa60>
jmp    1b60 <grad_c2l+0xa30>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    0x90(%rsp),%rdi
call   1030 <free@plt>
mov    0x70(%rsp),%rdi
call   1030 <free@plt>
mov    0xa0(%rsp),%rdi
add    $0xe8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @grad_c2l(i32* %0, i32* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, double* %8, double* %9, double* %10, double* %11, double* %12, double* %13, double* %14, double* %15, i32* %16, i32* %17, i32* %18, i32* %19) {
%21 = alloca i32*
%22 = alloca i32*
%23 = alloca double*
%24 = alloca double*
%25 = alloca double*
%26 = alloca double*
%27 = alloca double*
%28 = alloca double*
%29 = alloca double*
%30 = alloca double*
%31 = alloca double*
%32 = alloca double*
%33 = alloca double*
%34 = alloca double*
%35 = alloca double*
%36 = alloca double*
%37 = alloca i32*
%38 = alloca i32*
%39 = alloca i32*
%40 = alloca i32*
%41 = alloca double*
%42 = alloca double*
%43 = alloca double*
%44 = alloca double*
%45 = alloca i32
%46 = alloca i32
%47 = alloca i32
%48 = alloca i32
%49 = alloca i32
%50 = alloca i32
%51 = alloca i32
%52 = alloca i32
%53 = alloca i32
store i32* %0, i32** %21
store i32* %1, i32** %22
store double* %2, double** %23
store double* %3, double** %24
store double* %4, double** %25
store double* %5, double** %26
store double* %6, double** %27
store double* %7, double** %28
store double* %8, double** %29
store double* %9, double** %30
store double* %10, double** %31
store double* %11, double** %32
store double* %12, double** %33
store double* %13, double** %34
store double* %14, double** %35
store double* %15, double** %36
store i32* %16, i32** %37
store i32* %17, i32** %38
store i32* %18, i32** %39
store i32* %19, i32** %40
%54 = load i32*, i32** %21
%55 = load i32, i32* %54
store i32 %55, i32* %45
%56 = load i32*, i32** %22
%57 = load i32, i32* %56
store i32 %57, i32* %46
%58 = load i32, i32* %45
%59 = add nsw i32 %58, 1
store i32 %59, i32* %47
%60 = load i32, i32* %46
%61 = add nsw i32 %60, 1
store i32 %61, i32* %48
%62 = load i32, i32* %47
%63 = load i32, i32* %48
%64 = mul nsw i32 %62, %63
%65 = sext i32 %64 to i64
%66 = mul i64 %65, 8
%67 = trunc i64 %66 to i32
%68 = call i64 @malloc(i32 %67)
%69 = inttoptr i64 %68 to double*
store double* %69, double** %41
%70 = load i32, i32* %45
%71 = mul nsw i32 3, %70
%72 = load i32, i32* %46
%73 = add nsw i32 %72, 1
%74 = mul nsw i32 %71, %73
%75 = sext i32 %74 to i64
%76 = mul i64 %75, 8
%77 = trunc i64 %76 to i32
%78 = call i64 @malloc(i32 %77)
%79 = inttoptr i64 %78 to double*
store double* %79, double** %42
%80 = load i32, i32* %45
%81 = add nsw i32 %80, 1
%82 = mul nsw i32 3, %81
%83 = load i32, i32* %46
%84 = mul nsw i32 %82, %83
%85 = sext i32 %84 to i64
%86 = mul i64 %85, 8
%87 = trunc i64 %86 to i32
%88 = call i64 @malloc(i32 %87)
%89 = inttoptr i64 %88 to double*
store double* %89, double** %43
%90 = load i32, i32* %45
%91 = mul nsw i32 3, %90
%92 = load i32, i32* %46
%93 = mul nsw i32 %91, %92
%94 = sext i32 %93 to i64
%95 = mul i64 %94, 8
%96 = trunc i64 %95 to i32
%97 = call i64 @malloc(i32 %96)
%98 = inttoptr i64 %97 to double*
store double* %98, double** %44
%99 = load i32, i32* %45
%100 = load i32, i32* %46
%101 = load double*, double** %23
%102 = load double*, double** %27
%103 = load double*, double** %28
%104 = load double*, double** %29
%105 = load double*, double** %30
%106 = load double*, double** %41
%107 = load i32*, i32** %37
%108 = load i32, i32* %107
%109 = load i32*, i32** %38
%110 = load i32, i32* %109
%111 = load i32*, i32** %39
%112 = load i32, i32* %111
%113 = load i32*, i32** %40
%114 = load i32, i32* %113
%115 = call i32 @a2b_ord2(i32 %99, i32 %100, double* %101, double* %102, double* %103, double* %104, double* %105, double* %106, i32 %108, i32 %110, i32 %112, i32 %114)
store i32 0, i32* %50
br label %116
116: ; preds = %183, %20
%117 = load i32, i32* %50
%118 = load i32, i32* %48
%119 = icmp slt i32 %117, %118
br i1 %119, label %120, label %186
120: ; preds = %116
store i32 0, i32* %49
br label %121
121: ; preds = %179, %120
%122 = load i32, i32* %49
%123 = load i32, i32* %45
%124 = icmp slt i32 %122, %123
br i1 %124, label %125, label %182
125: ; preds = %121
%126 = load i32, i32* %50
%127 = load i32, i32* %45
%128 = mul nsw i32 %126, %127
%129 = load i32, i32* %49
%130 = add nsw i32 %128, %129
store i32 %130, i32* %51
%131 = load i32, i32* %50
%132 = load i32, i32* %47
%133 = mul nsw i32 %131, %132
%134 = load i32, i32* %49
%135 = add nsw i32 %133, %134
store i32 %135, i32* %52
store i32 0, i32* %53
br label %136
136: ; preds = %175, %125
%137 = load i32, i32* %53
%138 = icmp slt i32 %137, 3
br i1 %138, label %139, label %178
139: ; preds = %136
%140 = load double*, double** %41
%141 = load i32, i32* %52
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds double, double* %140, i64 %142
%144 = load double, double* %143
%145 = load double*, double** %41
%146 = load i32, i32* %52
%147 = add nsw i32 %146, 1
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds double, double* %145, i64 %148
%150 = load double, double* %149
%151 = fadd double %144, %150
%152 = fmul double 5.000000e-01, %151
%153 = load double*, double** %24
%154 = load i32, i32* %51
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds double, double* %153, i64 %155
%157 = load double, double* %156
%158 = fmul double %152, %157
%159 = load double*, double** %31
%160 = load i32, i32* %51
%161 = mul nsw i32 3, %160
%162 = load i32, i32* %53
%163 = add nsw i32 %161, %162
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds double, double* %159, i64 %164
%166 = load double, double* %165
%167 = fmul double %158, %166
%168 = load double*, double** %42
%169 = load i32, i32* %51
%170 = mul nsw i32 3, %169
%171 = load i32, i32* %53
%172 = add nsw i32 %170, %171
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds double, double* %168, i64 %173
store double %167, double* %174
br label %175
175: ; preds = %139
%176 = load i32, i32* %53
%177 = add nsw i32 %176, 1
store i32 %177, i32* %53
br label %136
178: ; preds = %136
br label %179
179: ; preds = %178
%180 = load i32, i32* %49
%181 = add nsw i32 %180, 1
store i32 %181, i32* %49
br label %121
182: ; preds = %121
br label %183
183: ; preds = %182
%184 = load i32, i32* %50
%185 = add nsw i32 %184, 1
store i32 %185, i32* %50
br label %116
186: ; preds = %116
store i32 0, i32* %50
br label %187
187: ; preds = %250, %186
%188 = load i32, i32* %50
%189 = load i32, i32* %46
%190 = icmp slt i32 %188, %189
br i1 %190, label %191, label %253
191: ; preds = %187
store i32 0, i32* %49
br label %192
192: ; preds = %246, %191
%193 = load i32, i32* %49
%194 = load i32, i32* %47
%195 = icmp slt i32 %193, %194
br i1 %195, label %196, label %249
196: ; preds = %192
%197 = load i32, i32* %50
%198 = load i32, i32* %47
%199 = mul nsw i32 %197, %198
%200 = load i32, i32* %49
%201 = add nsw i32 %199, %200
store i32 %201, i32* %51
store i32 0, i32* %53
br label %202
202: ; preds = %242, %196
%203 = load i32, i32* %53
%204 = icmp slt i32 %203, 3
br i1 %204, label %205, label %245
205: ; preds = %202
%206 = load double*, double** %41
%207 = load i32, i32* %51
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds double, double* %206, i64 %208
%210 = load double, double* %209
%211 = load double*, double** %41
%212 = load i32, i32* %51
%213 = load i32, i32* %47
%214 = add nsw i32 %212, %213
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds double, double* %211, i64 %215
%217 = load double, double* %216
%218 = fadd double %210, %217
%219 = fmul double 5.000000e-01, %218
%220 = load double*, double** %25
%221 = load i32, i32* %51
%222 = sext i32 %221 to i64
%223 = getelementptr inbounds double, double* %220, i64 %222
%224 = load double, double* %223
%225 = fmul double %219, %224
%226 = load double*, double** %32
%227 = load i32, i32* %51
%228 = mul nsw i32 3, %227
%229 = load i32, i32* %53
%230 = add nsw i32 %228, %229
%231 = sext i32 %230 to i64
%232 = getelementptr inbounds double, double* %226, i64 %231
%233 = load double, double* %232
%234 = fmul double %225, %233
%235 = load double*, double** %43
%236 = load i32, i32* %51
%237 = mul nsw i32 3, %236
%238 = load i32, i32* %53
%239 = add nsw i32 %237, %238
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds double, double* %235, i64 %240
store double %234, double* %241
br label %242
242: ; preds = %205
%243 = load i32, i32* %53
%244 = add nsw i32 %243, 1
store i32 %244, i32* %53
br label %202
245: ; preds = %202
br label %246
246: ; preds = %245
%247 = load i32, i32* %49
%248 = add nsw i32 %247, 1
store i32 %248, i32* %49
br label %192
249: ; preds = %192
br label %250
250: ; preds = %249
%251 = load i32, i32* %50
%252 = add nsw i32 %251, 1
store i32 %252, i32* %50
br label %187
253: ; preds = %187
store i32 0, i32* %50
br label %254
254: ; preds = %336, %253
%255 = load i32, i32* %50
%256 = load i32, i32* %46
%257 = icmp slt i32 %255, %256
br i1 %257, label %258, label %339
258: ; preds = %254
store i32 0, i32* %49
br label %259
259: ; preds = %332, %258
%260 = load i32, i32* %49
%261 = load i32, i32* %45
%262 = icmp slt i32 %260, %261
br i1 %262, label %263, label %335
263: ; preds = %259
%264 = load i32, i32* %50
%265 = load i32, i32* %45
%266 = mul nsw i32 %264, %265
%267 = load i32, i32* %49
%268 = add nsw i32 %266, %267
%269 = mul nsw i32 3, %268
store i32 %269, i32* %51
store i32 0, i32* %53
br label %270
270: ; preds = %328, %263
%271 = load i32, i32* %53
%272 = icmp slt i32 %271, 3
br i1 %272, label %273, label %331
273: ; preds = %270
%274 = load double*, double** %42
%275 = load i32, i32* %50
%276 = add nsw i32 %275, 1
%277 = load i32, i32* %45
%278 = mul nsw i32 %276, %277
%279 = load i32, i32* %49
%280 = add nsw i32 %278, %279
%281 = mul nsw i32 3, %280
%282 = load i32, i32* %53
%283 = add nsw i32 %281, %282
%284 = sext i32 %283 to i64
%285 = getelementptr inbounds double, double* %274, i64 %284
%286 = load double, double* %285
%287 = load double*, double** %42
%288 = load i32, i32* %51
%289 = load i32, i32* %53
%290 = add nsw i32 %288, %289
%291 = sext i32 %290 to i64
%292 = getelementptr inbounds double, double* %287, i64 %291
%293 = load double, double* %292
%294 = fsub double %286, %293
%295 = load double*, double** %43
%296 = load i32, i32* %50
%297 = load i32, i32* %47
%298 = mul nsw i32 %296, %297
%299 = load i32, i32* %49
%300 = add nsw i32 %298, %299
%301 = mul nsw i32 3, %300
%302 = load i32, i32* %53
%303 = add nsw i32 %301, %302
%304 = sext i32 %303 to i64
%305 = getelementptr inbounds double, double* %295, i64 %304
%306 = load double, double* %305
%307 = fsub double %294, %306
%308 = load double*, double** %43
%309 = load i32, i32* %50
%310 = load i32, i32* %47
%311 = mul nsw i32 %309, %310
%312 = load i32, i32* %49
%313 = add nsw i32 %311, %312
%314 = add nsw i32 %313, 1
%315 = mul nsw i32 3, %314
%316 = load i32, i32* %53
%317 = add nsw i32 %315, %316
%318 = sext i32 %317 to i64
%319 = getelementptr inbounds double, double* %308, i64 %318
%320 = load double, double* %319
%321 = fadd double %307, %320
%322 = load double*, double** %44
%323 = load i32, i32* %51
%324 = load i32, i32* %53
%325 = add nsw i32 %323, %324
%326 = sext i32 %325 to i64
%327 = getelementptr inbounds double, double* %322, i64 %326
store double %321, double* %327
br label %328
328: ; preds = %273
%329 = load i32, i32* %53
%330 = add nsw i32 %329, 1
store i32 %330, i32* %53
br label %270
331: ; preds = %270
br label %332
332: ; preds = %331
%333 = load i32, i32* %49
%334 = add nsw i32 %333, 1
store i32 %334, i32* %49
br label %259
335: ; preds = %259
br label %336
336: ; preds = %335
%337 = load i32, i32* %50
%338 = add nsw i32 %337, 1
store i32 %338, i32* %50
br label %254
339: ; preds = %254
store i32 0, i32* %50
br label %340
340: ; preds = %467, %339
%341 = load i32, i32* %50
%342 = load i32, i32* %46
%343 = icmp slt i32 %341, %342
br i1 %343, label %344, label %470
344: ; preds = %340
store i32 0, i32* %49
br label %345
345: ; preds = %463, %344
%346 = load i32, i32* %49
%347 = load i32, i32* %45
%348 = icmp slt i32 %346, %347
br i1 %348, label %349, label %466
349: ; preds = %345
%350 = load i32, i32* %50
%351 = load i32, i32* %45
%352 = mul nsw i32 %350, %351
%353 = load i32, i32* %49
%354 = add nsw i32 %352, %353
store i32 %354, i32* %51
%355 = load i32, i32* %51
%356 = mul nsw i32 3, %355
store i32 %356, i32* %52
%357 = load double*, double** %33
%358 = load i32, i32* %52
%359 = sext i32 %358 to i64
%360 = getelementptr inbounds double, double* %357, i64 %359
%361 = load double, double* %360
%362 = load double*, double** %44
%363 = load i32, i32* %52
%364 = sext i32 %363 to i64
%365 = getelementptr inbounds double, double* %362, i64 %364
%366 = load double, double* %365
%367 = load double*, double** %33
%368 = load i32, i32* %52
%369 = add nsw i32 %368, 1
%370 = sext i32 %369 to i64
%371 = getelementptr inbounds double, double* %367, i64 %370
%372 = load double, double* %371
%373 = load double*, double** %44
%374 = load i32, i32* %52
%375 = add nsw i32 %374, 1
%376 = sext i32 %375 to i64
%377 = getelementptr inbounds double, double* %373, i64 %376
%378 = load double, double* %377
%379 = fmul double %372, %378
%380 = call double @llvm.fmuladd.f64(double %361, double %366, double %379)
%381 = load double*, double** %33
%382 = load i32, i32* %52
%383 = add nsw i32 %382, 2
%384 = sext i32 %383 to i64
%385 = getelementptr inbounds double, double* %381, i64 %384
%386 = load double, double* %385
%387 = load double*, double** %44
%388 = load i32, i32* %52
%389 = add nsw i32 %388, 2
%390 = sext i32 %389 to i64
%391 = getelementptr inbounds double, double* %387, i64 %390
%392 = load double, double* %391
%393 = call double @llvm.fmuladd.f64(double %386, double %392, double %380)
%394 = load double*, double** %26
%395 = load i32, i32* %51
%396 = sext i32 %395 to i64
%397 = getelementptr inbounds double, double* %394, i64 %396
%398 = load double, double* %397
%399 = fdiv double %393, %398
%400 = load double*, double** %35
%401 = load i32, i32* %51
%402 = sext i32 %401 to i64
%403 = getelementptr inbounds double, double* %400, i64 %402
store double %399, double* %403
%404 = load double*, double** %35
%405 = load i32, i32* %51
%406 = sext i32 %405 to i64
%407 = getelementptr inbounds double, double* %404, i64 %406
%408 = load double, double* %407
%409 = fmul double %408, 6.371000e+06
store double %409, double* %407
%410 = load double*, double** %34
%411 = load i32, i32* %52
%412 = sext i32 %411 to i64
%413 = getelementptr inbounds double, double* %410, i64 %412
%414 = load double, double* %413
%415 = load double*, double** %44
%416 = load i32, i32* %52
%417 = sext i32 %416 to i64
%418 = getelementptr inbounds double, double* %415, i64 %417
%419 = load double, double* %418
%420 = load double*, double** %34
%421 = load i32, i32* %52
%422 = add nsw i32 %421, 1
%423 = sext i32 %422 to i64
%424 = getelementptr inbounds double, double* %420, i64 %423
%425 = load double, double* %424
%426 = load double*, double** %44
%427 = load i32, i32* %52
%428 = add nsw i32 %427, 1
%429 = sext i32 %428 to i64
%430 = getelementptr inbounds double, double* %426, i64 %429
%431 = load double, double* %430
%432 = fmul double %425, %431
%433 = call double @llvm.fmuladd.f64(double %414, double %419, double %432)
%434 = load double*, double** %34
%435 = load i32, i32* %52
%436 = add nsw i32 %435, 2
%437 = sext i32 %436 to i64
%438 = getelementptr inbounds double, double* %434, i64 %437
%439 = load double, double* %438
%440 = load double*, double** %44
%441 = load i32, i32* %52
%442 = add nsw i32 %441, 2
%443 = sext i32 %442 to i64
%444 = getelementptr inbounds double, double* %440, i64 %443
%445 = load double, double* %444
%446 = call double @llvm.fmuladd.f64(double %439, double %445, double %433)
%447 = load double*, double** %26
%448 = load i32, i32* %51
%449 = sext i32 %448 to i64
%450 = getelementptr inbounds double, double* %447, i64 %449
%451 = load double, double* %450
%452 = fdiv double %446, %451
%453 = load double*, double** %36
%454 = load i32, i32* %51
%455 = sext i32 %454 to i64
%456 = getelementptr inbounds double, double* %453, i64 %455
store double %452, double* %456
%457 = load double*, double** %36
%458 = load i32, i32* %51
%459 = sext i32 %458 to i64
%460 = getelementptr inbounds double, double* %457, i64 %459
%461 = load double, double* %460
%462 = fmul double %461, 6.371000e+06
store double %462, double* %460
br label %463
463: ; preds = %349
%464 = load i32, i32* %49
%465 = add nsw i32 %464, 1
store i32 %465, i32* %49
br label %345
466: ; preds = %345
br label %467
467: ; preds = %466
%468 = load i32, i32* %50
%469 = add nsw i32 %468, 1
store i32 %469, i32* %50
br label %340
470: ; preds = %340
%471 = load double*, double** %41
%472 = call i32 @free(double* %471)
%473 = load double*, double** %42
%474 = call i32 @free(double* %473)
%475 = load double*, double** %43
%476 = call i32 @free(double* %475)
%477 = load double*, double** %44
%478 = call i32 @free(double* %477)
ret void
}

LLVM IR (-O2):
define void @grad_c2l(i32* nocapture %0, i32* nocapture %1, double* %2, double* nocapture %3, double* nocapture %4, double* nocapture %5, double* %6, double* %7, double* %8, double* %9, double* nocapture %10, double* nocapture %11, double* nocapture %12, double* nocapture %13, double* nocapture writeonly %14, double* nocapture writeonly %15, i32* nocapture %16, i32* nocapture %17, i32* nocapture %18, i32* nocapture %19) {
%21 = bitcast double* %4 to i8*
%22 = load i32, i32* %0
%23 = load i32, i32* %1
%24 = add nsw i32 %22, 1
%25 = add i32 %23, 1
%26 = shl i32 %24, 3
%27 = mul i32 %26, %25
%28 = tail call i64 @malloc(i32 %27)
%29 = inttoptr i64 %28 to double*
%30 = inttoptr i64 %28 to i8*
%31 = mul nsw i32 %22, 3
%32 = mul i32 %22, 24
%33 = mul i32 %32, %25
%34 = tail call i64 @malloc(i32 %33)
%35 = inttoptr i64 %34 to double*
%36 = mul i32 %24, 24
%37 = mul i32 %36, %23
%38 = tail call i64 @malloc(i32 %37)
%39 = inttoptr i64 %38 to double*
%40 = inttoptr i64 %38 to i8*
%41 = shl i32 %23, 3
%42 = mul i32 %41, %31
%43 = tail call i64 @malloc(i32 %42)
%44 = inttoptr i64 %43 to double*
%45 = load i32, i32* %16
%46 = load i32, i32* %17
%47 = load i32, i32* %18
%48 = load i32, i32* %19
%49 = tail call i32 @a2b_ord2(i32 %22, i32 %23, double* %2, double* %6, double* %7, double* %8, double* %9, double* %29, i32 %45, i32 %46, i32 %47, i32 %48)
%50 = icmp slt i32 %23, 0
br i1 %50, label %495, label %51
51: ; preds = %20
%52 = icmp sgt i32 %22, 0
%53 = sext i32 %22 to i64
%54 = sext i32 %24 to i64
%55 = zext i32 %25 to i64
%56 = zext i32 %22 to i64
%57 = add nsw i64 %54, -1
%58 = mul nsw i64 %57, 3
%59 = mul nuw nsw i64 %56, 3
%60 = shl nsw i64 %57, 3
%61 = add nsw i64 %60, 8
%62 = add nuw nsw i64 %56, 1
%63 = getelementptr double, double* %29, i64 %62
%64 = bitcast double* %63 to i8*
%65 = icmp eq i32 %22, 1
%66 = and i64 %56, 4294967294
%67 = icmp eq i64 %66, %56
br label %68
68: ; preds = %51, %230
%69 = phi i64 [ 0, %51 ], [ %231, %230 ]
%70 = mul i64 %58, %69
%71 = getelementptr double, double* %35, i64 %70
%72 = bitcast double* %71 to i8*
%73 = add i64 %59, %70
%74 = getelementptr double, double* %35, i64 %73
%75 = bitcast double* %74 to i8*
%76 = mul i64 %61, %69
%77 = getelementptr i8, i8* %30, i64 %76
%78 = getelementptr i8, i8* %64, i64 %76
%79 = mul i64 %57, %69
%80 = getelementptr double, double* %3, i64 %79
%81 = add i64 %79, %56
%82 = getelementptr double, double* %3, i64 %81
%83 = getelementptr double, double* %10, i64 %70
%84 = getelementptr double, double* %10, i64 %73
br i1 %52, label %85, label %230
85: ; preds = %68
%86 = mul nsw i64 %69, %53
%87 = mul nsw i64 %69, %54
br i1 %65, label %153, label %88
88: ; preds = %85
%89 = icmp ugt i8* %78, %72
%90 = icmp ult i8* %77, %75
%91 = and i1 %89, %90
%92 = icmp ult double* %71, %82
%93 = icmp ult double* %80, %74
%94 = and i1 %92, %93
%95 = or i1 %91, %94
%96 = icmp ult double* %71, %84
%97 = icmp ult double* %83, %74
%98 = and i1 %96, %97
%99 = or i1 %95, %98
br i1 %99, label %153, label %100
100: ; preds = %88, %100
%101 = phi i64 [ %150, %100 ], [ 0, %88 ]
%102 = add nsw i64 %101, %86
%103 = add nsw i64 %101, %87
%104 = getelementptr inbounds double, double* %29, i64 %103
%105 = add nsw i64 %103, 1
%106 = getelementptr inbounds double, double* %29, i64 %105
%107 = getelementptr inbounds double, double* %3, i64 %102
%108 = mul nsw i64 %102, 3
%109 = bitcast double* %104 to <2 x double>*
%110 = load <2 x double>, <2 x double>* %109
%111 = bitcast double* %106 to <2 x double>*
%112 = load <2 x double>, <2 x double>* %111
%113 = fadd <2 x double> %110, %112
%114 = fmul <2 x double> %113, <double 5.000000e-01, double 5.000000e-01>
%115 = bitcast double* %107 to <2 x double>*
%116 = load <2 x double>, <2 x double>* %115
%117 = fmul <2 x double> %116, %114
%118 = getelementptr inbounds double, double* %10, i64 %108
%119 = bitcast double* %118 to <6 x double>*
%120 = load <6 x double>, <6 x double>* %119
%121 = shufflevector <6 x double> %120, <6 x double> poison, <2 x i32> <i32 0, i32 3>
%122 = shufflevector <6 x double> %120, <6 x double> poison, <2 x i32> <i32 1, i32 4>
%123 = shufflevector <6 x double> %120, <6 x double> poison, <2 x i32> <i32 2, i32 5>
%124 = fmul <2 x double> %121, %117
%125 = bitcast double* %104 to <2 x double>*
%126 = load <2 x double>, <2 x double>* %125
%127 = bitcast double* %106 to <2 x double>*
%128 = load <2 x double>, <2 x double>* %127
%129 = fadd <2 x double> %126, %128
%130 = fmul <2 x double> %129, <double 5.000000e-01, double 5.000000e-01>
%131 = bitcast double* %107 to <2 x double>*
%132 = load <2 x double>, <2 x double>* %131
%133 = fmul <2 x double> %132, %130
%134 = fmul <2 x double> %122, %133
%135 = bitcast double* %104 to <2 x double>*
%136 = load <2 x double>, <2 x double>* %135
%137 = bitcast double* %106 to <2 x double>*
%138 = load <2 x double>, <2 x double>* %137
%139 = fadd <2 x double> %136, %138
%140 = fmul <2 x double> %139, <double 5.000000e-01, double 5.000000e-01>
%141 = bitcast double* %107 to <2 x double>*
%142 = load <2 x double>, <2 x double>* %141
%143 = fmul <2 x double> %142, %140
%144 = fmul <2 x double> %123, %143
%145 = getelementptr inbounds double, double* %35, i64 %108
%146 = bitcast double* %145 to <6 x double>*
%147 = shufflevector <2 x double> %124, <2 x double> %134, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
%148 = shufflevector <2 x double> %144, <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
%149 = shufflevector <4 x double> %147, <4 x double> %148, <6 x i32> <i32 0, i32 2, i32 4, i32 1, i32 3, i32 5>
store <6 x double> %149, <6 x double>* %146
%150 = add nuw i64 %101, 2
%151 = icmp eq i64 %150, %66
br i1 %151, label %152, label %100
152: ; preds = %100
br i1 %67, label %230, label %153
153: ; preds = %88, %85, %152
%154 = phi i64 [ 0, %88 ], [ 0, %85 ], [ %66, %152 ]
br label %187
155: ; preds = %230
%156 = icmp sgt i32 %23, 0
br i1 %156, label %157, label %495
157: ; preds = %155
%158 = icmp slt i32 %22, 0
%159 = sext i32 %24 to i64
%160 = zext i32 %23 to i64
%161 = zext i32 %24 to i64
%162 = add nsw i64 %54, -1
%163 = mul nsw i64 %162, 24
%164 = add nsw i64 %163, 24
%165 = mul nuw nsw i64 %161, 3
%166 = getelementptr double, double* %39, i64 %165
%167 = bitcast double* %166 to i8*
%168 = getelementptr double, double* %29, i64 %54
%169 = bitcast double* %168 to i8*
%170 = shl nsw i64 %162, 3
%171 = add nsw i64 %170, 8
%172 = add nsw i64 %54, %161
%173 = getelementptr double, double* %29, i64 %172
%174 = bitcast double* %173 to i8*
%175 = getelementptr double, double* %29, i64 %161
%176 = bitcast double* %175 to i8*
%177 = getelementptr double, double* %4, i64 %161
%178 = bitcast double* %177 to i8*
%179 = getelementptr double, double* %11, i64 %165
%180 = bitcast double* %179 to i8*
%181 = icmp ult i32 %24, 2
%182 = icmp ult i8* %40, %180
%183 = icmp ugt double* %166, %11
%184 = and i1 %182, %183
%185 = and i64 %161, 4294967294
%186 = icmp eq i64 %185, %161
br label %233
187: ; preds = %153, %187
%188 = phi i64 [ %228, %187 ], [ %154, %153 ]
%189 = add nsw i64 %188, %86
%190 = add nsw i64 %188, %87
%191 = getelementptr inbounds double, double* %29, i64 %190
%192 = add nsw i64 %190, 1
%193 = getelementptr inbounds double, double* %29, i64 %192
%194 = getelementptr inbounds double, double* %3, i64 %189
%195 = mul nsw i64 %189, 3
%196 = load double, double* %191
%197 = load double, double* %193
%198 = fadd double %196, %197
%199 = fmul double %198, 5.000000e-01
%200 = load double, double* %194
%201 = fmul double %200, %199
%202 = getelementptr inbounds double, double* %10, i64 %195
%203 = load double, double* %202
%204 = fmul double %203, %201
%205 = getelementptr inbounds double, double* %35, i64 %195
store double %204, double* %205
%206 = load double, double* %191
%207 = load double, double* %193
%208 = fadd double %206, %207
%209 = fmul double %208, 5.000000e-01
%210 = load double, double* %194
%211 = fmul double %210, %209
%212 = add nsw i64 %195, 1
%213 = getelementptr inbounds double, double* %10, i64 %212
%214 = load double, double* %213
%215 = fmul double %214, %211
%216 = getelementptr inbounds double, double* %35, i64 %212
store double %215, double* %216
%217 = load double, double* %191
%218 = load double, double* %193
%219 = fadd double %217, %218
%220 = fmul double %219, 5.000000e-01
%221 = load double, double* %194
%222 = fmul double %221, %220
%223 = add nsw i64 %195, 2
%224 = getelementptr inbounds double, double* %10, i64 %223
%225 = load double, double* %224
%226 = fmul double %225, %222
%227 = getelementptr inbounds double, double* %35, i64 %223
store double %226, double* %227
%228 = add nuw nsw i64 %188, 1
%229 = icmp eq i64 %228, %56
br i1 %229, label %230, label %187
230: ; preds = %187, %152, %68
%231 = add nuw nsw i64 %69, 1
%232 = icmp eq i64 %231, %55
br i1 %232, label %155, label %68
233: ; preds = %157, %363
%234 = phi i64 [ 0, %157 ], [ %364, %363 ]
%235 = mul i64 %164, %234
%236 = getelementptr i8, i8* %40, i64 %235
%237 = getelementptr i8, i8* %167, i64 %235
%238 = mul i64 %171, %234
%239 = getelementptr i8, i8* %169, i64 %238
%240 = getelementptr i8, i8* %174, i64 %238
%241 = getelementptr i8, i8* %30, i64 %238
%242 = getelementptr i8, i8* %176, i64 %238
%243 = getelementptr i8, i8* %21, i64 %238
%244 = getelementptr i8, i8* %178, i64 %238
br i1 %158, label %363, label %245
245: ; preds = %233
%246 = mul nsw i64 %234, %159
br i1 %181, label %312, label %247
247: ; preds = %245
%248 = icmp ult i8* %236, %240
%249 = icmp ult i8* %239, %237
%250 = and i1 %248, %249
%251 = icmp ult i8* %236, %242
%252 = icmp ult i8* %241, %237
%253 = and i1 %251, %252
%254 = or i1 %250, %253
%255 = icmp ult i8* %236, %244
%256 = icmp ult i8* %243, %237
%257 = and i1 %255, %256
%258 = or i1 %254, %257
%259 = or i1 %258, %184
br i1 %259, label %312, label %260
260: ; preds = %247, %260
%261 = phi i64 [ %309, %260 ], [ 0, %247 ]
%262 = add nsw i64 %261, %246
%263 = getelementptr inbounds double, double* %29, i64 %262
%264 = add nsw i64 %262, %159
%265 = getelementptr inbounds double, double* %29, i64 %264
%266 = getelementptr inbounds double, double* %4, i64 %262
%267 = mul nsw i64 %262, 3
%268 = bitcast double* %263 to <2 x double>*
%269 = load <2 x double>, <2 x double>* %268
%270 = bitcast double* %265 to <2 x double>*
%271 = load <2 x double>, <2 x double>* %270
%272 = fadd <2 x double> %269, %271
%273 = fmul <2 x double> %272, <double 5.000000e-01, double 5.000000e-01>
%274 = bitcast double* %266 to <2 x double>*
%275 = load <2 x double>, <2 x double>* %274
%276 = fmul <2 x double> %275, %273
%277 = getelementptr inbounds double, double* %11, i64 %267
%278 = bitcast double* %277 to <6 x double>*
%279 = load <6 x double>, <6 x double>* %278
%280 = shufflevector <6 x double> %279, <6 x double> poison, <2 x i32> <i32 0, i32 3>
%281 = shufflevector <6 x double> %279, <6 x double> poison, <2 x i32> <i32 1, i32 4>
%282 = shufflevector <6 x double> %279, <6 x double> poison, <2 x i32> <i32 2, i32 5>
%283 = fmul <2 x double> %280, %276
%284 = bitcast double* %263 to <2 x double>*
%285 = load <2 x double>, <2 x double>* %284
%286 = bitcast double* %265 to <2 x double>*
%287 = load <2 x double>, <2 x double>* %286
%288 = fadd <2 x double> %285, %287
%289 = fmul <2 x double> %288, <double 5.000000e-01, double 5.000000e-01>
%290 = bitcast double* %266 to <2 x double>*
%291 = load <2 x double>, <2 x double>* %290
%292 = fmul <2 x double> %291, %289
%293 = fmul <2 x double> %281, %292
%294 = bitcast double* %263 to <2 x double>*
%295 = load <2 x double>, <2 x double>* %294
%296 = bitcast double* %265 to <2 x double>*
%297 = load <2 x double>, <2 x double>* %296
%298 = fadd <2 x double> %295, %297
%299 = fmul <2 x double> %298, <double 5.000000e-01, double 5.000000e-01>
%300 = bitcast double* %266 to <2 x double>*
%301 = load <2 x double>, <2 x double>* %300
%302 = fmul <2 x double> %301, %299
%303 = fmul <2 x double> %282, %302
%304 = getelementptr inbounds double, double* %39, i64 %267
%305 = bitcast double* %304 to <6 x double>*
%306 = shufflevector <2 x double> %283, <2 x double> %293, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
%307 = shufflevector <2 x double> %303, <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
%308 = shufflevector <4 x double> %306, <4 x double> %307, <6 x i32> <i32 0, i32 2, i32 4, i32 1, i32 3, i32 5>
store <6 x double> %308, <6 x double>* %305
%309 = add nuw i64 %261, 2
%310 = icmp eq i64 %309, %185
br i1 %310, label %311, label %260
311: ; preds = %260
br i1 %186, label %363, label %312
312: ; preds = %247, %245, %311
%313 = phi i64 [ 0, %247 ], [ 0, %245 ], [ %185, %311 ]
br label %321
314: ; preds = %363
br i1 %156, label %315, label %495
315: ; preds = %314
%316 = icmp sgt i32 %22, 0
%317 = sext i32 %22 to i64
%318 = sext i32 %24 to i64
%319 = zext i32 %23 to i64
%320 = zext i32 %22 to i64
br label %366
321: ; preds = %312, %321
%322 = phi i64 [ %361, %321 ], [ %313, %312 ]
%323 = add nsw i64 %322, %246
%324 = getelementptr inbounds double, double* %29, i64 %323
%325 = add nsw i64 %323, %159
%326 = getelementptr inbounds double, double* %29, i64 %325
%327 = getelementptr inbounds double, double* %4, i64 %323
%328 = mul nsw i64 %323, 3
%329 = load double, double* %324
%330 = load double, double* %326
%331 = fadd double %329, %330
%332 = fmul double %331, 5.000000e-01
%333 = load double, double* %327
%334 = fmul double %333, %332
%335 = getelementptr inbounds double, double* %11, i64 %328
%336 = load double, double* %335
%337 = fmul double %336, %334
%338 = getelementptr inbounds double, double* %39, i64 %328
store double %337, double* %338
%339 = load double, double* %324
%340 = load double, double* %326
%341 = fadd double %339, %340
%342 = fmul double %341, 5.000000e-01
%343 = load double, double* %327
%344 = fmul double %343, %342
%345 = add nsw i64 %328, 1
%346 = getelementptr inbounds double, double* %11, i64 %345
%347 = load double, double* %346
%348 = fmul double %347, %344
%349 = getelementptr inbounds double, double* %39, i64 %345
store double %348, double* %349
%350 = load double, double* %324
%351 = load double, double* %326
%352 = fadd double %350, %351
%353 = fmul double %352, 5.000000e-01
%354 = load double, double* %327
%355 = fmul double %354, %353
%356 = add nsw i64 %328, 2
%357 = getelementptr inbounds double, double* %11, i64 %356
%358 = load double, double* %357
%359 = fmul double %358, %355
%360 = getelementptr inbounds double, double* %39, i64 %356
store double %359, double* %360
%361 = add nuw nsw i64 %322, 1
%362 = icmp eq i64 %361, %161
br i1 %362, label %363, label %321
363: ; preds = %321, %311, %233
%364 = add nuw nsw i64 %234, 1
%365 = icmp eq i64 %364, %160
br i1 %365, label %314, label %233
366: ; preds = %315, %441
%367 = phi i64 [ 0, %315 ], [ %442, %441 ]
br i1 %316, label %370, label %368
368: ; preds = %366
%369 = add nuw nsw i64 %367, 1
br label %441
370: ; preds = %366
%371 = mul nsw i64 %367, %317
%372 = add nuw nsw i64 %367, 1
%373 = mul nsw i64 %372, %317
%374 = mul nsw i64 %367, %318
br label %380
375: ; preds = %441
%376 = icmp sgt i32 %22, 0
%377 = sext i32 %22 to i64
%378 = zext i32 %23 to i64
%379 = zext i32 %22 to i64
br label %444
380: ; preds = %370, %380
%381 = phi i64 [ 0, %370 ], [ %439, %380 ]
%382 = add nsw i64 %381, %371
%383 = mul nsw i64 %382, 3
%384 = add nsw i64 %381, %373
%385 = mul nsw i64 %384, 3
%386 = add nsw i64 %381, %374
%387 = mul nsw i64 %386, 3
%388 = getelementptr inbounds double, double* %35, i64 %385
%389 = load double, double* %388
%390 = getelementptr inbounds double, double* %35, i64 %383
%391 = load double, double* %390
%392 = fsub double %389, %391
%393 = getelementptr inbounds double, double* %39, i64 %387
%394 = load double, double* %393
%395 = fsub double %392, %394
%396 = mul i64 %386, 12884901888
%397 = add i64 %396, 12884901888
%398 = ashr exact i64 %397, 32
%399 = getelementptr inbounds double, double* %39, i64 %398
%400 = load double, double* %399
%401 = fadd double %395, %400
%402 = getelementptr inbounds double, double* %44, i64 %383
store double %401, double* %402
%403 = add nsw i64 %385, 1
%404 = getelementptr inbounds double, double* %35, i64 %403
%405 = load double, double* %404
%406 = add nsw i64 %383, 1
%407 = getelementptr inbounds double, double* %35, i64 %406
%408 = load double, double* %407
%409 = fsub double %405, %408
%410 = add nsw i64 %387, 1
%411 = getelementptr inbounds double, double* %39, i64 %410
%412 = load double, double* %411
%413 = fsub double %409, %412
%414 = mul i64 %386, 12884901888
%415 = add i64 %414, 17179869184
%416 = ashr exact i64 %415, 32
%417 = getelementptr inbounds double, double* %39, i64 %416
%418 = load double, double* %417
%419 = fadd double %413, %418
%420 = getelementptr inbounds double, double* %44, i64 %406
store double %419, double* %420
%421 = add nsw i64 %385, 2
%422 = getelementptr inbounds double, double* %35, i64 %421
%423 = load double, double* %422
%424 = add nsw i64 %383, 2
%425 = getelementptr inbounds double, double* %35, i64 %424
%426 = load double, double* %425
%427 = fsub double %423, %426
%428 = add nsw i64 %387, 2
%429 = getelementptr inbounds double, double* %39, i64 %428
%430 = load double, double* %429
%431 = fsub double %427, %430
%432 = mul i64 %386, 12884901888
%433 = add i64 %432, 21474836480
%434 = ashr exact i64 %433, 32
%435 = getelementptr inbounds double, double* %39, i64 %434
%436 = load double, double* %435
%437 = fadd double %431, %436
%438 = getelementptr inbounds double, double* %44, i64 %424
store double %437, double* %438
%439 = add nuw nsw i64 %381, 1
%440 = icmp eq i64 %439, %320
br i1 %440, label %441, label %380
441: ; preds = %380, %368
%442 = phi i64 [ %369, %368 ], [ %372, %380 ]
%443 = icmp eq i64 %442, %319
br i1 %443, label %375, label %366
444: ; preds = %375, %492
%445 = phi i64 [ 0, %375 ], [ %493, %492 ]
br i1 %376, label %446, label %492
446: ; preds = %444
%447 = mul nsw i64 %445, %377
br label %448
448: ; preds = %446, %448
%449 = phi i64 [ 0, %446 ], [ %490, %448 ]
%450 = add nsw i64 %449, %447
%451 = mul nsw i64 %450, 3
%452 = getelementptr inbounds double, double* %12, i64 %451
%453 = load double, double* %452
%454 = getelementptr inbounds double, double* %44, i64 %451
%455 = load double, double* %454
%456 = add nsw i64 %451, 1
%457 = getelementptr inbounds double, double* %12, i64 %456
%458 = load double, double* %457
%459 = getelementptr inbounds double, double* %44, i64 %456
%460 = load double, double* %459
%461 = fmul double %458, %460
%462 = tail call double @llvm.fmuladd.f64(double %453, double %455, double %461)
%463 = add nsw i64 %451, 2
%464 = getelementptr inbounds double, double* %12, i64 %463
%465 = load double, double* %464
%466 = getelementptr inbounds double, double* %44, i64 %463
%467 = load double, double* %466
%468 = tail call double @llvm.fmuladd.f64(double %465, double %467, double %462)
%469 = getelementptr inbounds double, double* %5, i64 %450
%470 = load double, double* %469
%471 = fdiv double %468, %470
%472 = getelementptr inbounds double, double* %14, i64 %450
%473 = fmul double %471, 6.371000e+06
store double %473, double* %472
%474 = getelementptr inbounds double, double* %13, i64 %451
%475 = load double, double* %474
%476 = load double, double* %454
%477 = getelementptr inbounds double, double* %13, i64 %456
%478 = load double, double* %477
%479 = load double, double* %459
%480 = fmul double %478, %479
%481 = tail call double @llvm.fmuladd.f64(double %475, double %476, double %480)
%482 = getelementptr inbounds double, double* %13, i64 %463
%483 = load double, double* %482
%484 = load double, double* %466
%485 = tail call double @llvm.fmuladd.f64(double %483, double %484, double %481)
%486 = load double, double* %469
%487 = fdiv double %485, %486
%488 = getelementptr inbounds double, double* %15, i64 %450
%489 = fmul double %487, 6.371000e+06
store double %489, double* %488
%490 = add nuw nsw i64 %449, 1
%491 = icmp eq i64 %490, %379
br i1 %491, label %492, label %448
492: ; preds = %448, %444
%493 = add nuw nsw i64 %445, 1
%494 = icmp eq i64 %493, %378
br i1 %494, label %495, label %444
495: ; preds = %492, %155, %20, %314
%496 = tail call i32 @free(double* %29)
%497 = tail call i32 @free(double* %35)
%498 = tail call i32 @free(double* %39)
%499 = tail call i32 @free(double* %44)
ret void
}