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