#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 */
double asin(int);
double atan(double);
int /*<<< orphan*/ axes_earth(unsigned char **, double *, double *);
int /*<<< orphan*/ fatal_error(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(double *);
int /*<<< orphan*/ get_nxny(unsigned char **, int *, int *, unsigned int *,
                            int *, int *);
double int4(unsigned char *);
scalar_t__ malloc(int);
double sin(double);
double sqrt(double);
int /*<<< orphan*/ stderr;
int uint4(unsigned char *);
int space_view2ll(unsigned char **sec, double **lat, double **lon) {
  double major, minor, r_eq, r_pol, sat_height;
  double lap, lop, orient_angle, angular_size;
  double xp, yp, dx, dy, rx, ry, x, y;
  double cos_x, cos_y, sin_x, sin_y;
  double factor_1, factor_2, tmp1, Sd, Sn, Sxy, S1, S2, S3;
  int x0, y0, i, ix, iy;
  double *llat, *llon;
  double *s_x, *c_x;
  int nnx, nny, nres, nscan;
  unsigned int nnpnts;
  get_nxny(sec, &nnx, &nny, &nnpnts, &nres, &nscan);
  axes_earth(sec, &major, &minor);
  r_eq = major * 0.001;
  r_pol = minor * 0.001;
  angular_size = 2.0 * asin(1e6 / uint4(sec[3] + 68));
  sat_height = uint4(sec[3] + 68) * 1e-6 * r_eq;
  lap = int4(sec[3] + 38);
  lop = int4(sec[3] + 42);
  lap *= 1e-6;
  lop *= 1e-6;
  if (lap != 0.0)
    return 0;
  lap *= (180.0 / 3.14159265358979323846);
  orient_angle = int4(sec[3] + 64);
  orient_angle *= 1e-6;
  if (orient_angle != 0.0)
    return 0;
  xp = int4(sec[3] + 55) * 0.001;
  yp = int4(sec[3] + 59) * 0.001;
  x0 = int4(sec[3] + 72);
  y0 = int4(sec[3] + 76);
  dx = int4(sec[3] + 47);
  dy = int4(sec[3] + 51);
  rx = angular_size / dx;
  ry = (r_pol / r_eq) * angular_size / dy;
  if (nnx < 1 || nny < 1 || nnx * nny != nnpnts) {
    fprintf(stderr, "space_view2ll need rectangular grid\n");
    return 0;
  }
  if ((*lat = (double *)malloc(sizeof(double) * (size_t)nnpnts)) == NULL) {
    fatal_error("space_view2ll memory allocation failed", "");
  }
  if ((*lon = (double *)malloc(sizeof(double) * (size_t)nnpnts)) == NULL) {
    fatal_error("space_view2ll memory allocation failed", "");
  }
  llat = *lat;
  llon = *lon;
  if (((nscan & 128) == 0)) {
    xp = xp - x0;
  } else {
    xp = (nnx - 1) - (xp - x0);
  }
  if (((nscan & 64) == 64)) {
    yp = yp - y0;
  } else {
    yp = (nny - 1) - (yp - y0);
  }
  i = 0;
  factor_2 = (r_eq / r_pol) * (r_eq / r_pol);
  factor_1 = sat_height * sat_height - r_eq * r_eq;
  s_x = (double *)malloc(sizeof(double) * (size_t)nnx);
  c_x = (double *)malloc(sizeof(double) * (size_t)nnx);
  if (s_x == NULL || c_x == NULL)
    fatal_error("space_view: memory allocation", "");
  for (ix = 0; ix < nnx; ix++) {
    x = (ix - xp) * rx;
    s_x[ix] = sin(x);
    c_x[ix] = sqrt(1.0 - s_x[ix] * s_x[ix]);
  }
  for (iy = 0; iy < nny; iy++) {
    y = (iy - yp) * ry;
    sin_y = sin(y);
    cos_y = sqrt(1.0 - sin_y * sin_y);
    tmp1 = (1 + (factor_2 - 1.0) * sin_y * sin_y);
    for (ix = 0; ix < nnx; ix++, i++) {
      x = (ix - xp) * rx;
      sin_x = s_x[ix];
      cos_x = c_x[ix];
      Sd = sat_height * cos_x * cos_y;
      Sd = Sd * Sd - tmp1 * factor_1;
      if (Sd <= 0.0) {
        llat[i] = llon[i] = 999.0;
      } else {
        Sd = sqrt(Sd);
        Sn = (sat_height * cos_x * cos_y - Sd) / tmp1;
        S1 = sat_height - Sn * cos_x * cos_y;
        S2 = Sn * sin_x * cos_y;
        S3 = Sn * sin_y;
        Sxy = sqrt(S1 * S1 + S2 * S2);
        llon[i] = atan(S2 / S1) * (180.0 / 3.14159265358979323846) + lop;
        if (llon[i] > 360.0)
          llon[i] -= 360.0;
        llat[i] = atan(factor_2 * S3 / Sxy) * (180.0 / 3.14159265358979323846);
      }
    }
  }
  free(s_x);
  free(c_x);
  return 0;
}


x86 assembly (clang, -O0):
<space_view2ll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14c(%rbp),%rsi
lea    -0x150(%rbp),%rdx
lea    -0x15c(%rbp),%rcx
lea    -0x154(%rbp),%r8
lea    -0x158(%rbp),%r9
call   10d0 <get_nxny@plt>
mov    -0x10(%rbp),%rdi
lea    -0x28(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   10c0 <axes_earth@plt>
movsd  0xdfc(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xdea(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
add    $0x44,%rdi
call   1050 <uint4@plt>
cvtsi2sd %eax,%xmm1
movsd  0xdbb(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   10a0 <asin@plt>
movaps %xmm0,%xmm1
movsd  0xd9b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
add    $0x44,%rdi
call   1050 <uint4@plt>
cvtsi2sd %eax,%xmm0
movsd  0xd6d(%rip),%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
add    $0x26,%rdi
call   1040 <int4@plt>
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
add    $0x2a,%rdi
call   1040 <int4@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  0xd2b(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xd19(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    130e <space_view2ll+0x14e>
jp     130e <space_view2ll+0x14e>
jmp    131a <space_view2ll+0x15a>
movl   $0x0,-0x4(%rbp)
jmp    1b94 <space_view2ll+0x9d4>
movsd  0xcfe(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
add    $0x40,%rdi
call   1040 <int4@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  0xcb6(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1371 <space_view2ll+0x1b1>
jp     1371 <space_view2ll+0x1b1>
jmp    137d <space_view2ll+0x1bd>
movl   $0x0,-0x4(%rbp)
jmp    1b94 <space_view2ll+0x9d4>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
add    $0x37,%rdi
call   1040 <int4@plt>
movsd  0xc82(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
add    $0x3b,%rdi
call   1040 <int4@plt>
movsd  0xc60(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
add    $0x48,%rdi
call   1040 <int4@plt>
cvttsd2si %xmm0,%eax
mov    %eax,-0x114(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
add    $0x4c,%rdi
call   1040 <int4@plt>
cvttsd2si %xmm0,%eax
mov    %eax,-0x118(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
add    $0x2f,%rdi
call   1040 <int4@plt>
movsd  %xmm0,-0x80(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
add    $0x33,%rdi
call   1040 <int4@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
divsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
cmpl   $0x1,-0x14c(%rbp)
jl     148a <space_view2ll+0x2ca>
cmpl   $0x1,-0x150(%rbp)
jl     148a <space_view2ll+0x2ca>
mov    -0x14c(%rbp),%eax
imul   -0x150(%rbp),%eax
cmp    -0x15c(%rbp),%eax
je     14ab <space_view2ll+0x2eb>
mov    0x2b4f(%rip),%rax
mov    (%rax),%edi
lea    0xba6(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1b94 <space_view2ll+0x9d4>
mov    -0x15c(%rbp),%eax
shl    $0x3,%rax
mov    %eax,%edi
call   10b0 <malloc@plt>
mov    -0x18(%rbp),%rcx
mov    %rax,(%rcx)
cmp    $0x0,%rax
jne    14e0 <space_view2ll+0x320>
lea    0xb91(%rip),%rdi
lea    0xb89(%rip),%rsi
call   1090 <fatal_error@plt>
mov    -0x15c(%rbp),%eax
shl    $0x3,%rax
mov    %eax,%edi
call   10b0 <malloc@plt>
mov    -0x20(%rbp),%rcx
mov    %rax,(%rcx)
cmp    $0x0,%rax
jne    1515 <space_view2ll+0x355>
lea    0xb5c(%rip),%rdi
lea    0xb54(%rip),%rsi
call   1090 <fatal_error@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x130(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x138(%rbp)
mov    -0x158(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
jne    1560 <space_view2ll+0x3a0>
movsd  -0x70(%rbp),%xmm0
cvtsi2sdl -0x114(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    1587 <space_view2ll+0x3c7>
mov    -0x14c(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x70(%rbp),%xmm1
cvtsi2sdl -0x114(%rbp),%xmm2
ff
subsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x158(%rbp),%eax
and    $0x40,%eax
cmp    $0x40,%eax
jne    15b4 <space_view2ll+0x3f4>
movsd  -0x78(%rbp),%xmm0
cvtsi2sdl -0x118(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    15db <space_view2ll+0x41b>
mov    -0x150(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x78(%rbp),%xmm1
cvtsi2sdl -0x118(%rbp),%xmm2
ff
subsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x0,-0x11c(%rbp)
movsd  -0x38(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
divsd  -0x40(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movslq -0x14c(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x140(%rbp)
movslq -0x14c(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x148(%rbp)
cmpq   $0x0,-0x140(%rbp)
je     168e <space_view2ll+0x4ce>
cmpq   $0x0,-0x148(%rbp)
jne    16a1 <space_view2ll+0x4e1>
lea    0x9f7(%rip),%rdi
lea    0x9c8(%rip),%rsi
call   1090 <fatal_error@plt>
movl   $0x0,-0x120(%rbp)
mov    -0x120(%rbp),%eax
cmp    -0x14c(%rbp),%eax
jge    1773 <space_view2ll+0x5b3>
cvtsi2sdl -0x120(%rbp),%xmm0
ff
subsd  -0x70(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1070 <sin@plt>
mov    -0x140(%rbp),%rax
movslq -0x120(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x140(%rbp),%rax
movslq -0x120(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x140(%rbp),%rax
movslq -0x120(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x8e5(%rip),%xmm1
addsd  %xmm1,%xmm0
call   10e0 <sqrt@plt>
mov    -0x148(%rbp),%rax
movslq -0x120(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x120(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x120(%rbp)
jmp    16ab <space_view2ll+0x4eb>
movl   $0x0,-0x124(%rbp)
mov    -0x124(%rbp),%eax
cmp    -0x150(%rbp),%eax
jge    1b75 <space_view2ll+0x9b5>
cvtsi2sdl -0x124(%rbp),%xmm0
ff
subsd  -0x78(%rbp),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
call   1070 <sin@plt>
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm1
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x834(%rip),%xmm1
addsd  %xmm1,%xmm0
call   10e0 <sqrt@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
movsd  0x813(%rip),%xmm1
subsd  %xmm1,%xmm0
mulsd  -0xc8(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  0x7f3(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movl   $0x0,-0x120(%rbp)
mov    -0x120(%rbp),%eax
cmp    -0x14c(%rbp),%eax
jge    1b5c <space_view2ll+0x99c>
cvtsi2sdl -0x120(%rbp),%xmm0
ff
subsd  -0x70(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x140(%rbp),%rax
movslq -0x120(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x148(%rbp),%rax
movslq -0x120(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
mulsd  -0xb0(%rbp),%xmm0
ff
mulsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xe8(%rbp),%xmm2
ff
movsd  -0xe0(%rbp),%xmm1
ff
mulsd  -0xd0(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0xe8(%rbp),%xmm0
ff
jb     1960 <space_view2ll+0x7a0>
mov    -0x138(%rbp),%rax
movslq -0x11c(%rbp),%rcx
movsd  0x6fd(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x130(%rbp),%rax
movslq -0x11c(%rbp),%rcx
movsd  0x6e2(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1b34 <space_view2ll+0x974>
movsd  -0xe8(%rbp),%xmm0
ff
call   10e0 <sqrt@plt>
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0xe8(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x48(%rbp),%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  -0xc0(%rbp),%xmm0
ff
mulsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x100(%rbp),%xmm0
ff
movsd  -0x100(%rbp),%xmm2
ff
movsd  -0x108(%rbp),%xmm1
ff
mulsd  -0x108(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   10e0 <sqrt@plt>
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x108(%rbp),%xmm0
ff
divsd  -0x100(%rbp),%xmm0
ff
call   1080 <atan@plt>
movsd  -0x58(%rbp),%xmm1
movsd  0x58c(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x138(%rbp),%rax
movslq -0x11c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x138(%rbp),%rax
movslq -0x11c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0x566(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1af8 <space_view2ll+0x938>
mov    -0x138(%rbp),%rax
movslq -0x11c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0x541(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  -0x110(%rbp),%xmm0
ff
divsd  -0xf8(%rbp),%xmm0
ff
call   1080 <atan@plt>
movsd  0x503(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x130(%rbp),%rax
movslq -0x11c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1b39 <space_view2ll+0x979>
mov    -0x120(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x120(%rbp)
mov    -0x11c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x11c(%rbp)
jmp    184b <space_view2ll+0x68b>
jmp    1b61 <space_view2ll+0x9a1>
mov    -0x124(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x124(%rbp)
jmp    177d <space_view2ll+0x5bd>
mov    -0x140(%rbp),%rdi
call   1030 <free@plt>
mov    -0x148(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<space_view2ll>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe8,%rsp
mov    %rdx,%rbp
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xc(%rsp),%rsi
lea    0x1c(%rsp),%rdx
lea    0x4c(%rsp),%rcx
lea    0xcc(%rsp),%r8
lea    0x74(%rsp),%r9
call   10d0 <get_nxny@plt>
lea    0xc0(%rsp),%rsi
lea    0xb8(%rsp),%rdx
mov    %rbx,%rdi
call   10c0 <axes_earth@plt>
movsd  0xde5(%rip),%xmm1
movsd  0xc0(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x40(%rsp)
movsd  0xb8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x60(%rsp)
mov    0x18(%rbx),%rdi
add    $0x44,%rdi
call   1050 <uint4@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xdab(%rip),%xmm1
divsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   10a0 <asin@plt>
movsd  %xmm0,0x28(%rsp)
mov    0x18(%rbx),%rdi
add    $0x44,%rdi
call   1050 <uint4@plt>
mov    %eax,%r12d
mov    0x18(%rbx),%rdi
add    $0x26,%rdi
call   1040 <int4@plt>
movsd  %xmm0,0x10(%rsp)
mov    0x18(%rbx),%rdi
add    $0x2a,%rdi
call   1040 <int4@plt>
movsd  %xmm0,0x68(%rsp)
movsd  0x10(%rsp),%xmm1
mulsd  0xd5c(%rip),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    18eb <space_view2ll+0x72b>
jp     18eb <space_view2ll+0x72b>
mov    0x18(%rbx),%rdi
add    $0x40,%rdi
call   1040 <int4@plt>
mulsd  0xd33(%rip),%xmm0
ucomisd 0xd63(%rip),%xmm0
jne    18eb <space_view2ll+0x72b>
jp     18eb <space_view2ll+0x72b>
mov    0x18(%rbx),%rdi
add    $0x37,%rdi
call   1040 <int4@plt>
movsd  %xmm0,0x10(%rsp)
mov    0x18(%rbx),%rdi
add    $0x3b,%rdi
call   1040 <int4@plt>
movsd  %xmm0,0x30(%rsp)
mov    0x18(%rbx),%rdi
add    $0x48,%rdi
call   1040 <int4@plt>
movsd  %xmm0,0x20(%rsp)
mov    0x18(%rbx),%rdi
add    $0x4c,%rdi
call   1040 <int4@plt>
movsd  %xmm0,0x38(%rsp)
mov    0x18(%rbx),%rdi
add    $0x2f,%rdi
call   1040 <int4@plt>
movsd  %xmm0,0x50(%rsp)
mov    0x18(%rbx),%rdi
add    $0x33,%rdi
call   1040 <int4@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    1411 <space_view2ll+0x251>
mov    0x1c(%rsp),%edi
test   %edi,%edi
jle    1411 <space_view2ll+0x251>
imul   %eax,%edi
cmp    0x4c(%rsp),%edi
jne    1411 <space_view2ll+0x251>
movsd  %xmm0,0x80(%rsp)
shl    $0x3,%edi
call   10b0 <malloc@plt>
mov    %rax,(%r15)
test   %rax,%rax
jne    13ae <space_view2ll+0x1ee>
lea    0xce3(%rip),%rdi
lea    0xcdb(%rip),%rsi
call   1090 <fatal_error@plt>
mov    0x4c(%rsp),%edi
shl    $0x3,%edi
call   10b0 <malloc@plt>
mov    %rax,0x0(%rbp)
mov    %rax,0x78(%rsp)
test   %rax,%rax
jne    13e4 <space_view2ll+0x224>
lea    0xcb6(%rip),%rdi
lea    0xcae(%rip),%rsi
call   1090 <fatal_error@plt>
mov    0x0(%rbp),%rax
mov    %rax,0x78(%rsp)
movsd  0x10(%rsp),%xmm2
movsd  0xc0e(%rip),%xmm3
mulsd  %xmm3,%xmm2
cvttsd2si 0x20(%rsp),%ecx
mov    0x74(%rsp),%eax
test   $0x80,%al
jne    142b <space_view2ll+0x26b>
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
subsd  %xmm0,%xmm2
jmp    1449 <space_view2ll+0x289>
mov    0x2bc8(%rip),%rax
mov    (%rax),%edi
lea    0xc3f(%rip),%rsi
call   1060 <fprintf@plt>
jmp    18eb <space_view2ll+0x72b>
mov    0xc(%rsp),%edx
add    $0xffffffff,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
cvtsi2sd %ecx,%xmm1
subsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm2
movsd  0x30(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
mulsd  %xmm3,%xmm0
cvttsd2si %xmm1,%ecx
test   $0x40,%al
movsd  %xmm2,0x10(%rsp)
jne    148a <space_view2ll+0x2ca>
mov    0x1c(%rsp),%eax
add    $0xffffffff,%eax
movapd %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
subsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
jmp    1499 <space_view2ll+0x2d9>
movapd %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
subsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%rsp)
mov    (%r15),%rax
mov    %rax,0x98(%rsp)
mov    0xc(%rsp),%edi
shl    $0x3,%edi
call   10b0 <malloc@plt>
mov    %rax,%rbp
mov    0xc(%rsp),%edi
shl    $0x3,%edi
call   10b0 <malloc@plt>
mov    %rax,%rbx
mov    %rbp,0x58(%rsp)
test   %rbp,%rbp
je     14d7 <space_view2ll+0x317>
test   %rbx,%rbx
jne    14ea <space_view2ll+0x32a>
lea    0xbce(%rip),%rdi
lea    0xb9f(%rip),%rsi
call   1090 <fatal_error@plt>
movsd  0x28(%rsp),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x28(%rsp)
cmpl   $0x0,0xc(%rsp)
movsd  0x10(%rsp),%xmm1
jle    1582 <space_view2ll+0x3c2>
movsd  0x28(%rsp),%xmm0
divsd  0x50(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
xor    %ebp,%ebp
jmp    153e <space_view2ll+0x37e>
nopl   (%rax)
call   10e0 <sqrt@plt>
movsd  %xmm0,(%rbx,%rbp,8)
add    $0x1,%rbp
movslq 0xc(%rsp),%rax
cmp    %rax,%rbp
movsd  0x10(%rsp),%xmm1
jge    1582 <space_view2ll+0x3c2>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
subsd  %xmm1,%xmm0
mulsd  0x20(%rsp),%xmm0
call   1070 <sin@plt>
movapd %xmm0,%xmm1
mov    0x58(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,8)
mulsd  %xmm0,%xmm1
movsd  0xaaa(%rip),%xmm0
subsd  %xmm1,%xmm0
ucomisd 0xace(%rip),%xmm0
jb     1520 <space_view2ll+0x360>
sqrtsd %xmm0,%xmm0
jmp    1525 <space_view2ll+0x365>
cmpl   $0x0,0x1c(%rsp)
jle    18d9 <space_view2ll+0x719>
xorps  %xmm3,%xmm3
cvtsi2sd %r12d,%xmm3
movsd  0xa73(%rip),%xmm2
mulsd  %xmm2,%xmm3
movsd  0x40(%rsp),%xmm1
movapd %xmm1,%xmm4
movsd  0x60(%rsp),%xmm0
divsd  %xmm0,%xmm4
divsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm3
mulsd  0x28(%rsp),%xmm0
mulsd  %xmm1,%xmm1
movsd  %xmm3,0x28(%rsp)
mulsd  %xmm3,%xmm3
subsd  %xmm1,%xmm3
movsd  %xmm3,0x90(%rsp)
movsd  0x68(%rsp),%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,0x68(%rsp)
divsd  0x80(%rsp),%xmm0
movsd  %xmm0,0x60(%rsp)
mulsd  %xmm4,%xmm4
movsd  0xa17(%rip),%xmm0
movsd  %xmm4,0xb0(%rsp)
addsd  %xmm4,%xmm0
movsd  %xmm0,0xa0(%rsp)
xor    %r15d,%r15d
xor    %ebp,%ebp
jmp    1646 <space_view2ll+0x486>
cs nopw 0x0(%rax,%rax,1)
mov    0x70(%rsp),%ebp
add    %r13d,%ebp
add    $0x1,%r15d
cmp    0x1c(%rsp),%r15d
jge    18d9 <space_view2ll+0x719>
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
subsd  0x30(%rsp),%xmm0
mulsd  0x60(%rsp),%xmm0
call   1070 <sin@plt>
xorpd  %xmm2,%xmm2
movsd  %xmm0,0x50(%rsp)
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0x99f(%rip),%xmm0
subsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jb     1690 <space_view2ll+0x4d0>
xorps  %xmm1,%xmm1
sqrtsd %xmm0,%xmm1
jmp    169d <space_view2ll+0x4dd>
nopl   0x0(%rax)
call   10e0 <sqrt@plt>
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm1
movsd  0xa0(%rsp),%xmm3
movsd  0x50(%rsp),%xmm0
mulsd  %xmm0,%xmm3
mulsd  %xmm0,%xmm3
movapd %xmm3,%xmm0
addsd  0x958(%rip),%xmm0
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    1637 <space_view2ll+0x477>
movapd %xmm0,0x80(%rsp)
movapd %xmm0,%xmm3
xorpd  0x96f(%rip),%xmm3
mulsd  0x90(%rsp),%xmm3
mov    %ebp,0x70(%rsp)
movslq %ebp,%rcx
mov    0x98(%rsp),%rdx
lea    (%rdx,%rcx,8),%r14
mov    0x78(%rsp),%rdx
lea    (%rdx,%rcx,8),%r12
xor    %r13d,%r13d
mov    0x58(%rsp),%rbp
movsd  %xmm1,0x38(%rsp)
movapd %xmm3,0xd0(%rsp)
jmp    174c <space_view2ll+0x58c>
nop
movabs $0x408f380000000000,%rcx
38 8f 40
mov    %rcx,(%r12,%r13,8)
movsd  0x8f2(%rip),%xmm0
movsd  %xmm0,(%r14,%r13,8)
add    $0x1,%r13
movslq %eax,%rcx
cmp    %rcx,%r13
jge    1630 <space_view2ll+0x470>
movsd  (%rbx,%r13,8),%xmm5
movsd  0x28(%rsp),%xmm4
mulsd  %xmm5,%xmm4
mulsd  %xmm1,%xmm4
movapd %xmm4,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm3,%xmm0
ucomisd %xmm0,%xmm2
jae    1720 <space_view2ll+0x560>
movsd  0x0(%rbp,%r13,8),%xmm3
ucomisd %xmm2,%xmm0
jb     1790 <space_view2ll+0x5d0>
sqrtsd %xmm0,%xmm0
jmp    17c3 <space_view2ll+0x603>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  %xmm4,0x10(%rsp)
movsd  %xmm3,0x40(%rsp)
movsd  %xmm5,0x20(%rsp)
call   10e0 <sqrt@plt>
movsd  0x20(%rsp),%xmm5
movsd  0x40(%rsp),%xmm3
movsd  0x10(%rsp),%xmm4
movsd  0x38(%rsp),%xmm1
xorpd  %xmm2,%xmm2
subsd  %xmm0,%xmm4
divsd  0x80(%rsp),%xmm4
mulsd  %xmm4,%xmm5
mulsd  %xmm1,%xmm5
movsd  0x28(%rsp),%xmm6
subsd  %xmm5,%xmm6
mulsd  %xmm4,%xmm3
mulsd  %xmm1,%xmm3
movapd %xmm3,%xmm1
mulsd  %xmm3,%xmm1
movapd %xmm6,%xmm0
mulsd  %xmm6,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jb     1810 <space_view2ll+0x650>
sqrtsd %xmm0,%xmm0
jmp    183f <space_view2ll+0x67f>
nopw   0x0(%rax,%rax,1)
movsd  %xmm4,0x10(%rsp)
movsd  %xmm3,0x40(%rsp)
movsd  %xmm6,0xa8(%rsp)
call   10e0 <sqrt@plt>
movsd  0xa8(%rsp),%xmm6
movsd  0x40(%rsp),%xmm3
movsd  0x10(%rsp),%xmm4
movsd  %xmm0,0x20(%rsp)
mulsd  0x50(%rsp),%xmm4
movsd  %xmm4,0x10(%rsp)
divsd  %xmm6,%xmm3
movapd %xmm3,%xmm0
call   1080 <atan@plt>
movsd  0x7ca(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  0x68(%rsp),%xmm0
movapd %xmm0,%xmm1
addsd  0x7bc(%rip),%xmm1
movsd  0x7bc(%rip),%xmm2
cmpltsd %xmm0,%xmm2
andpd  %xmm2,%xmm1
andnpd %xmm0,%xmm2
orpd   %xmm1,%xmm2
movlpd %xmm2,(%r12,%r13,8)
movsd  0x10(%rsp),%xmm0
mulsd  0xb0(%rsp),%xmm0
divsd  0x20(%rsp),%xmm0
call   1080 <atan@plt>
mulsd  0x773(%rip),%xmm0
mov    0xc(%rsp),%eax
xorpd  %xmm2,%xmm2
movsd  0x38(%rsp),%xmm1
movapd 0xd0(%rsp),%xmm3
jmp    1736 <space_view2ll+0x576>
mov    0x58(%rsp),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0xe8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"space_view2ll need rectangular grid\0A\00"
@.str.1 = [39 x i8] c"space_view2ll memory allocation failed\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [30 x i8] c"space_view: memory allocation\00"
define i32 @space_view2ll(i8** %0, double** nocapture %1, double** nocapture %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = bitcast double* %4 to i8*
%12 = bitcast double* %5 to i8*
%13 = bitcast i32* %6 to i8*
%14 = bitcast i32* %7 to i8*
%15 = bitcast i32* %8 to i8*
%16 = bitcast i32* %9 to i8*
%17 = bitcast i32* %10 to i8*
%18 = call i32 @get_nxny(i8** %0, i32* %6, i32* %7, i32* %10, i32* %8, i32* %9)
%19 = call i32 @axes_earth(i8** %0, double* %4, double* %5)
%20 = load double, double* %4
%21 = fmul double %20, 1.000000e-03
%22 = load double, double* %5
%23 = fmul double %22, 1.000000e-03
%24 = getelementptr inbounds i8*, i8** %0, i64 3
%25 = load i8*, i8** %24
%26 = getelementptr inbounds i8, i8* %25, i64 68
%27 = call i32 @uint4(i8* %26)
%28 = sitofp i32 %27 to double
%29 = fdiv double 1.000000e+06, %28
%30 = fptosi double %29 to i32
%31 = call double @asin(i32 %30)
%32 = fmul double %31, 2.000000e+00
%33 = load i8*, i8** %24
%34 = getelementptr inbounds i8, i8* %33, i64 68
%35 = call i32 @uint4(i8* %34)
%36 = sitofp i32 %35 to double
%37 = fmul double %36, 0x3EB0C6F7A0B5ED8D
%38 = fmul double %21, %37
%39 = load i8*, i8** %24
%40 = getelementptr inbounds i8, i8* %39, i64 38
%41 = call double @int4(i8* %40)
%42 = load i8*, i8** %24
%43 = getelementptr inbounds i8, i8* %42, i64 42
%44 = call double @int4(i8* %43)
%45 = fmul double %41, 0x3EB0C6F7A0B5ED8D
%46 = fmul double %44, 0x3EB0C6F7A0B5ED8D
%47 = fcmp une double %45, 0.000000e+00
br i1 %47, label %259, label %48
48: ; preds = %3
%49 = load i8*, i8** %24
%50 = getelementptr inbounds i8, i8* %49, i64 64
%51 = call double @int4(i8* %50)
%52 = fmul double %51, 0x3EB0C6F7A0B5ED8D
%53 = fcmp une double %52, 0.000000e+00
br i1 %53, label %259, label %54
54: ; preds = %48
%55 = load i8*, i8** %24
%56 = getelementptr inbounds i8, i8* %55, i64 55
%57 = call double @int4(i8* %56)
%58 = fmul double %57, 1.000000e-03
%59 = load i8*, i8** %24
%60 = getelementptr inbounds i8, i8* %59, i64 59
%61 = call double @int4(i8* %60)
%62 = fmul double %61, 1.000000e-03
%63 = load i8*, i8** %24
%64 = getelementptr inbounds i8, i8* %63, i64 72
%65 = call double @int4(i8* %64)
%66 = fptosi double %65 to i32
%67 = load i8*, i8** %24
%68 = getelementptr inbounds i8, i8* %67, i64 76
%69 = call double @int4(i8* %68)
%70 = fptosi double %69 to i32
%71 = load i8*, i8** %24
%72 = getelementptr inbounds i8, i8* %71, i64 47
%73 = call double @int4(i8* %72)
%74 = load i8*, i8** %24
%75 = getelementptr inbounds i8, i8* %74, i64 51
%76 = call double @int4(i8* %75)
%77 = fdiv double %32, %73
%78 = fdiv double %23, %21
%79 = fmul double %78, %32
%80 = fdiv double %79, %76
%81 = load i32, i32* %6
%82 = icmp slt i32 %81, 1
%83 = load i32, i32* %7
%84 = icmp slt i32 %83, 1
%85 = select i1 %82, i1 true, i1 %84
br i1 %85, label %90, label %86
86: ; preds = %54
%87 = mul nsw i32 %83, %81
%88 = load i32, i32* %10
%89 = icmp eq i32 %87, %88
br i1 %89, label %93, label %90
90: ; preds = %86, %54
%91 = load i32, i32* @stderr
%92 = call i32 @fprintf(i32 %91, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
br label %259
93: ; preds = %86
%94 = shl i32 %87, 3
%95 = call i64 @malloc(i32 %94)
%96 = inttoptr i64 %95 to double*
store double* %96, double** %1
%97 = icmp eq i64 %95, 0
br i1 %97, label %98, label %100
98: ; preds = %93
%99 = call i32 @fatal_error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
br label %100
100: ; preds = %98, %93
%101 = load i32, i32* %10
%102 = shl i32 %101, 3
%103 = call i64 @malloc(i32 %102)
%104 = inttoptr i64 %103 to double*
store double* %104, double** %2
%105 = icmp eq i64 %103, 0
br i1 %105, label %106, label %109
106: ; preds = %100
%107 = call i32 @fatal_error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%108 = load double*, double** %2
br label %109
109: ; preds = %106, %100
%110 = phi double* [ %108, %106 ], [ %104, %100 ]
%111 = load double*, double** %1
%112 = load i32, i32* %9
%113 = and i32 %112, 128
%114 = icmp eq i32 %113, 0
br i1 %114, label %115, label %118
115: ; preds = %109
%116 = sitofp i32 %66 to double
%117 = fsub double %58, %116
br label %125
118: ; preds = %109
%119 = load i32, i32* %6
%120 = add nsw i32 %119, -1
%121 = sitofp i32 %120 to double
%122 = sitofp i32 %66 to double
%123 = fsub double %122, %58
%124 = fadd double %123, %121
br label %125
125: ; preds = %118, %115
%126 = phi double [ %117, %115 ], [ %124, %118 ]
%127 = and i32 %112, 64
%128 = icmp eq i32 %127, 0
br i1 %128, label %132, label %129
129: ; preds = %125
%130 = sitofp i32 %70 to double
%131 = fsub double %62, %130
br label %139
132: ; preds = %125
%133 = load i32, i32* %7
%134 = add nsw i32 %133, -1
%135 = sitofp i32 %134 to double
%136 = sitofp i32 %70 to double
%137 = fsub double %136, %62
%138 = fadd double %137, %135
br label %139
139: ; preds = %132, %129
%140 = phi double [ %131, %129 ], [ %138, %132 ]
%141 = fdiv double %21, %23
%142 = fmul double %141, %141
%143 = fneg double %21
%144 = fmul double %21, %143
%145 = call double @llvm.fmuladd.f64(double %38, double %38, double %144)
%146 = load i32, i32* %6
%147 = shl i32 %146, 3
%148 = call i64 @malloc(i32 %147)
%149 = inttoptr i64 %148 to double*
%150 = load i32, i32* %6
%151 = shl i32 %150, 3
%152 = call i64 @malloc(i32 %151)
%153 = inttoptr i64 %152 to double*
%154 = icmp eq i64 %148, 0
%155 = icmp eq i64 %152, 0
%156 = select i1 %154, i1 true, i1 %155
br i1 %156, label %157, label %159
157: ; preds = %139
%158 = call i32 @fatal_error(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
br label %159
159: ; preds = %139, %157
%160 = load i32, i32* %6
%161 = icmp sgt i32 %160, 0
br i1 %161, label %167, label %162
162: ; preds = %167, %159
%163 = load i32, i32* %7
%164 = icmp sgt i32 %163, 0
br i1 %164, label %165, label %256
165: ; preds = %162
%166 = fadd double %142, -1.000000e+00
br label %183
167: ; preds = %159, %167
%168 = phi i64 [ %179, %167 ], [ 0, %159 ]
%169 = trunc i64 %168 to i32
%170 = sitofp i32 %169 to double
%171 = fsub double %170, %126
%172 = fmul double %77, %171
%173 = call double @sin(double %172)
%174 = getelementptr inbounds double, double* %149, i64 %168
store double %173, double* %174
%175 = fneg double %173
%176 = call double @llvm.fmuladd.f64(double %175, double %173, double 1.000000e+00)
%177 = call double @sqrt(double %176)
%178 = getelementptr inbounds double, double* %153, i64 %168
store double %177, double* %178
%179 = add nuw nsw i64 %168, 1
%180 = load i32, i32* %6
%181 = sext i32 %180 to i64
%182 = icmp slt i64 %179, %181
br i1 %182, label %167, label %162
183: ; preds = %165, %251
%184 = phi i32 [ 0, %165 ], [ %253, %251 ]
%185 = phi i32 [ 0, %165 ], [ %252, %251 ]
%186 = sitofp i32 %184 to double
%187 = fsub double %186, %140
%188 = fmul double %80, %187
%189 = call double @sin(double %188)
%190 = fneg double %189
%191 = call double @llvm.fmuladd.f64(double %190, double %189, double 1.000000e+00)
%192 = call double @sqrt(double %191)
%193 = fmul double %166, %189
%194 = call double @llvm.fmuladd.f64(double %193, double %189, double 1.000000e+00)
%195 = load i32, i32* %6
%196 = icmp sgt i32 %195, 0
br i1 %196, label %197, label %251
197: ; preds = %183
%198 = fneg double %194
%199 = fmul double %145, %198
%200 = sext i32 %185 to i64
br label %201
201: ; preds = %197, %241
%202 = phi i32 [ %195, %197 ], [ %242, %241 ]
%203 = phi i64 [ %200, %197 ], [ %246, %241 ]
%204 = phi i64 [ 0, %197 ], [ %245, %241 ]
%205 = getelementptr inbounds double, double* %153, i64 %204
%206 = load double, double* %205
%207 = fmul double %38, %206
%208 = fmul double %192, %207
%209 = call double @llvm.fmuladd.f64(double %208, double %208, double %199)
%210 = fcmp ugt double %209, 0.000000e+00
br i1 %210, label %213, label %211
211: ; preds = %201
%212 = getelementptr inbounds double, double* %110, i64 %203
store double 9.990000e+02, double* %212
br label %241
213: ; preds = %201
%214 = getelementptr inbounds double, double* %149, i64 %204
%215 = load double, double* %214
%216 = call double @sqrt(double %209)
%217 = fneg double %216
%218 = call double @llvm.fmuladd.f64(double %207, double %192, double %217)
%219 = fdiv double %218, %194
%220 = fneg double %219
%221 = fmul double %206, %220
%222 = call double @llvm.fmuladd.f64(double %221, double %192, double %38)
%223 = fmul double %215, %219
%224 = fmul double %192, %223
%225 = fmul double %189, %219
%226 = fmul double %224, %224
%227 = call double @llvm.fmuladd.f64(double %222, double %222, double %226)
%228 = call double @sqrt(double %227)
%229 = fdiv double %224, %222
%230 = call double @atan(double %229)
%231 = call double @llvm.fmuladd.f64(double %230, double 0x404CA5DC1A63C1F8, double %46)
%232 = getelementptr inbounds double, double* %110, i64 %203
%233 = fcmp ogt double %231, 3.600000e+02
%234 = fadd double %231, -3.600000e+02
%235 = select i1 %233, double %234, double %231
store double %235, double* %232
%236 = fmul double %142, %225
%237 = fdiv double %236, %228
%238 = call double @atan(double %237)
%239 = fmul double %238, 0x404CA5DC1A63C1F8
%240 = load i32, i32* %6
br label %241
241: ; preds = %211, %213
%242 = phi i32 [ %240, %213 ], [ %202, %211 ]
%243 = phi double [ %239, %213 ], [ 9.990000e+02, %211 ]
%244 = getelementptr inbounds double, double* %111, i64 %203
store double %243, double* %244
%245 = add nuw nsw i64 %204, 1
%246 = add nsw i64 %203, 1
%247 = sext i32 %242 to i64
%248 = icmp slt i64 %245, %247
br i1 %248, label %201, label %249
249: ; preds = %241
%250 = trunc i64 %246 to i32
br label %251
251: ; preds = %249, %183
%252 = phi i32 [ %185, %183 ], [ %250, %249 ]
%253 = add nuw nsw i32 %184, 1
%254 = load i32, i32* %7
%255 = icmp slt i32 %253, %254
br i1 %255, label %183, label %256
256: ; preds = %251, %162
%257 = call i32 @free(double* %149)
%258 = call i32 @free(double* %153)
br label %259
259: ; preds = %48, %3, %256, %90
ret i32 0
}