#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*/ bothexact(double, double, double *, int, double const,
                             double *, double *, double *, double *, double *,
                             double *, double *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(size_t);
int /*<<< orphan*/ printf(char *, ...);
int scanf(char *, double *);
int /*<<< orphan*/ stderr;
int main() {
  const double SperA = 31556926.0;
  const double Cp = 200.0;
  double year, r, HF, MF, HG, MG;
  double *z, *TF, *UF, *wF, *SigF, *SigcF, *TG, *UG, *wG, *SigG, *SigcG;
  int j, Mz, scanret;
  printf("Enter  t  and  r  separated by space (or newline)\n");
  printf("       (in yrs and km, resp.; e.g. 500 500):\n");
  scanret = scanf("%lf", &year);
  if (scanret != 1) {
    printf("... input error; exiting\n");
    return 1;
  }
  scanret = scanf("%lf", &r);
  if (scanret != 1) {
    printf("... input error; exiting\n");
    return 1;
  }
  printf("Enter  z  values sep by space (in m);");
  printf(" '-1' to end; e.g. 0 100 500 1500 -1:\n");
  z = (double *)malloc(501 * sizeof(double));
  if (z == NULL) {
    fprintf(stderr, "\nERROR simpleFG: couldn't allocate memory for z!\n\n");
    return -9999;
  }
  j = 0;
  do {
    scanret = scanf("%lf", &z[j]);
    if (scanret != 1) {
      printf("... input error; exiting\n");
      return 1;
    }
    j++;
    if (j > 490)
      printf("\n\n\nWARNING simpleFG: enter -1 to stop soon!!!\n");
  } while (z[j - 1] >= 0.0);
  Mz = j - 1;
  TF = (double *)malloc((size_t)Mz * sizeof(double));
  UF = (double *)malloc((size_t)Mz * sizeof(double));
  wF = (double *)malloc((size_t)Mz * sizeof(double));
  SigF = (double *)malloc((size_t)Mz * sizeof(double));
  SigcF = (double *)malloc((size_t)Mz * sizeof(double));
  TG = (double *)malloc((size_t)Mz * sizeof(double));
  UG = (double *)malloc((size_t)Mz * sizeof(double));
  wG = (double *)malloc((size_t)Mz * sizeof(double));
  SigG = (double *)malloc((size_t)Mz * sizeof(double));
  SigcG = (double *)malloc((size_t)Mz * sizeof(double));
  if ((TF == NULL) || (UF == NULL) || (wF == NULL) || (SigF == NULL) ||
      (SigcF == NULL) || (TG == NULL) || (UG == NULL) || (wG == NULL) ||
      (SigG == NULL) || (SigcG == NULL)) {
    fprintf(stderr, "\nERROR simpleFG: couldn't allocate memory!\n\n");
    return -9999;
  }
  bothexact(0.0, r * 1000.0, z, Mz, 0.0, &HF, &MF, TF, UF, wF, SigF, SigcF);
  bothexact(year * SperA, r * 1000.0, z, Mz, Cp, &HG, &MG, TG, UG, wG, SigG,
            SigcG);
  printf("\nResults:\n           Test F                         Test G\n");
  printf("(functions of r (resp. t and r) only):\n");
  printf("      H    = %12.6f (m)        H    = %12.6f (m)\n", HF, HG);
  printf("      M    = %12.6f (m/a)      M    = %12.6f (m/a)\n", MF * SperA,
         MG * SperA);
  for (j = 0; j < Mz; j++) {
    printf("(z=%10.3f):\n", z[j]);
    printf("      T    = %12.6f (K)        T    = %12.6f (K)\n", TF[j], TG[j]);
    printf("      U    = %12.6f (m/a)      U    = %12.6f (m/a)\n",
           UF[j] * SperA, UG[j] * SperA);
    printf("      w    = %12.6f (m/a)      w    = %12.6f (m/a)\n",
           wF[j] * SperA, wG[j] * SperA);
    printf("      Sig  = %12.6f (*)        Sig  = %12.6f (*)\n",
           SigF[j] * SperA * 1000.0, SigG[j] * SperA * 1000.0);
    printf("      Sigc = %12.6f (*)        Sigc = %12.6f (*)\n",
           SigcF[j] * SperA * 1000.0, SigcG[j] * SperA * 1000.0);
  }
  printf("(units: (*) = 10^-3 K/a)\n");
  free(z);
  free(TF);
  free(UF);
  free(wF);
  free(SigF);
  free(SigcF);
  free(TG);
  free(UG);
  free(wG);
  free(SigG);
  free(SigcG);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xe8e(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe79(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xeca(%rip),%rdi
lea    -0x20(%rbp),%rsi
call   1080 <scanf@plt>
mov    %eax,-0xac(%rbp)
cmpl   $0x1,-0xac(%rbp)
je     11e5 <main+0x85>
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    17e2 <main+0x682>
lea    0xe8d(%rip),%rdi
lea    -0x28(%rbp),%rsi
call   1080 <scanf@plt>
mov    %eax,-0xac(%rbp)
cmpl   $0x1,-0xac(%rbp)
je     1222 <main+0xc2>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    17e2 <main+0x682>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0xfa8,%edi
call   1070 <malloc@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
jne    1278 <main+0x118>
mov    0x2d82(%rip),%rax
mov    (%rax),%edi
lea    0xe7d(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0xffffd8f1,-0x4(%rbp)
jmp    17e2 <main+0x682>
movl   $0x0,-0xa4(%rbp)
mov    -0x50(%rbp),%rsi
movslq -0xa4(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
lea    0xdde(%rip),%rdi
call   1080 <scanf@plt>
mov    %eax,-0xac(%rbp)
cmpl   $0x1,-0xac(%rbp)
je     12cd <main+0x16d>
lea    0xdc3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    17e2 <main+0x682>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
cmpl   $0x1ea,-0xa4(%rbp)
jle    12fa <main+0x19a>
lea    0xe24(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    12ff <main+0x19f>
mov    -0x50(%rbp),%rax
mov    -0xa4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    1282 <main+0x122>
mov    -0xa4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xa8(%rbp)
movslq -0xa8(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x58(%rbp)
movslq -0xa8(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x60(%rbp)
movslq -0xa8(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x68(%rbp)
movslq -0xa8(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x70(%rbp)
movslq -0xa8(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x78(%rbp)
movslq -0xa8(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x80(%rbp)
movslq -0xa8(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x88(%rbp)
movslq -0xa8(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x90(%rbp)
movslq -0xa8(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x98(%rbp)
movslq -0xa8(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xa0(%rbp)
cmpq   $0x0,-0x58(%rbp)
je     147e <main+0x31e>
cmpq   $0x0,-0x60(%rbp)
je     147e <main+0x31e>
cmpq   $0x0,-0x68(%rbp)
je     147e <main+0x31e>
cmpq   $0x0,-0x70(%rbp)
je     147e <main+0x31e>
cmpq   $0x0,-0x78(%rbp)
je     147e <main+0x31e>
cmpq   $0x0,-0x80(%rbp)
je     147e <main+0x31e>
cmpq   $0x0,-0x88(%rbp)
je     147e <main+0x31e>
cmpq   $0x0,-0x90(%rbp)
je     147e <main+0x31e>
cmpq   $0x0,-0x98(%rbp)
je     147e <main+0x31e>
cmpq   $0x0,-0xa0(%rbp)
jne    149f <main+0x33f>
mov    0x2b5b(%rip),%rax
mov    (%rax),%edi
lea    0xcb8(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0xffffd8f1,-0x4(%rbp)
jmp    17e2 <main+0x682>
movsd  0xb69(%rip),%xmm1
mulsd  -0x28(%rbp),%xmm1
mov    -0x50(%rbp),%rdi
mov    -0xa8(%rbp),%esi
mov    -0x58(%rbp),%r8
mov    -0x60(%rbp),%r9
mov    -0x68(%rbp),%r11
mov    -0x70(%rbp),%r10
mov    -0x78(%rbp),%rax
xorps  %xmm2,%xmm2
lea    -0x30(%rbp),%rdx
lea    -0x38(%rbp),%rcx
movaps %xmm2,%xmm0
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1040 <bothexact@plt>
movsd  0xb15(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  0xb10(%rip),%xmm1
mulsd  -0x28(%rbp),%xmm1
mov    -0x50(%rbp),%rdi
mov    -0xa8(%rbp),%esi
mov    -0x80(%rbp),%r8
mov    -0x88(%rbp),%r9
mov    -0x90(%rbp),%r11
mov    -0x98(%rbp),%r10
mov    -0xa0(%rbp),%rax
movsd  0xac9(%rip),%xmm2
lea    -0x40(%rbp),%rdx
lea    -0x48(%rbp),%rcx
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1040 <bothexact@plt>
lea    0xc1a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xc48(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
lea    0xc58(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xa7a(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  0xa6d(%rip),%xmm1
mulsd  -0x48(%rbp),%xmm1
lea    0xc62(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movl   $0x0,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
cmp    -0xa8(%rbp),%eax
jge    175e <main+0x5fe>
mov    -0x50(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xc5c(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x58(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x80(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
lea    0xc3b(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    -0x60(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  0x9df(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x88(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  0x9c4(%rip),%xmm1
mulsd  (%rax,%rcx,8),%xmm1
lea    0xc2c(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    -0x68(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  0x99e(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x90(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  0x983(%rip),%xmm1
mulsd  (%rax,%rcx,8),%xmm1
lea    0xc1f(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    -0x70(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  0x95d(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  0x958(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x98(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  0x936(%rip),%xmm1
mulsd  (%rax,%rcx,8),%xmm1
movsd  0x931(%rip),%xmm2
mulsd  %xmm2,%xmm1
lea    0xbfa(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    -0x78(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  0x904(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  0x8ff(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0xa0(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  0x8dd(%rip),%xmm1
mulsd  (%rax,%rcx,8),%xmm1
movsd  0x8d8(%rip),%xmm2
mulsd  %xmm2,%xmm1
lea    0xbd3(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    15b8 <main+0x458>
lea    0xbe3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
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>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
mov    -0x80(%rbp),%rdi
call   1030 <free@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    -0x90(%rbp),%rdi
call   1030 <free@plt>
mov    -0x98(%rbp),%rdi
call   1030 <free@plt>
mov    -0xa0(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
lea    0x1093(%rip),%rdi
call   1050 <puts@plt>
lea    0x10b9(%rip),%rdi
call   1050 <puts@plt>
lea    0xe80(%rip),%rdi
lea    0x80(%rsp),%rsi
call   1090 <scanf@plt>
cmp    $0x1,%eax
jne    1260 <main+0xf0>
lea    0xe63(%rip),%rdi
lea    0x58(%rsp),%rsi
call   1090 <scanf@plt>
cmp    $0x1,%eax
jne    1260 <main+0xf0>
lea    0xe4d(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x1095(%rip),%rdi
call   1050 <puts@plt>
mov    $0xfa8,%edi
call   1080 <malloc@plt>
test   %rax,%rax
je     1283 <main+0x113>
mov    %rax,%r15
mov    $0xffffffffffffffff,%rbp
xor    %ebx,%ebx
lea    0xe10(%rip),%r12
lea    0x1104(%rip),%r14
jmp    1238 <main+0xc8>
nopl   0x0(%rax)
movsd  0x8(%r15,%rbp,8),%xmm0
add    $0x8,%rbx
ucomisd 0xde5(%rip),%xmm0
mov    %r13,%rbp
jb     1298 <main+0x128>
lea    (%r15,%rbx,1),%rsi
mov    %r12,%rdi
call   1090 <scanf@plt>
cmp    $0x1,%eax
jne    1260 <main+0xf0>
lea    0x1(%rbp),%r13
cmp    $0x1ea,%r13
jb     1220 <main+0xb0>
mov    %r14,%rdi
call   1050 <puts@plt>
jmp    1220 <main+0xb0>
lea    0x10e2(%rip),%rdi
call   1050 <puts@plt>
mov    $0x1,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2d56(%rip),%rax
mov    (%rax),%edi
lea    0xdb7(%rip),%rsi
jmp    166a <main+0x4fa>
mov    %r13d,%r14d
shl    $0x3,%r14
mov    %r14,%rdi
call   1080 <malloc@plt>
mov    %rax,0x30(%rsp)
mov    %r14,%rdi
call   1080 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    %r14,%rdi
call   1080 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    %r14,%rdi
call   1080 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %r14,%rdi
call   1080 <malloc@plt>
mov    %rax,0x28(%rsp)
mov    %r14,%rdi
call   1080 <malloc@plt>
mov    %rax,0x8(%rsp)
mov    %r14,%rdi
call   1080 <malloc@plt>
mov    %rax,%r12
mov    %r14,%rdi
call   1080 <malloc@plt>
mov    %rax,%rbp
mov    %r14,%rdi
call   1080 <malloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1080 <malloc@plt>
mov    %rbp,%r10
mov    0x28(%rsp),%r11
mov    0x20(%rsp),%rbp
mov    0x30(%rsp),%rcx
test   %rcx,%rcx
je     165a <main+0x4ea>
cmpq   $0x0,0x18(%rsp)
je     165a <main+0x4ea>
cmpq   $0x0,0x10(%rsp)
je     165a <main+0x4ea>
test   %rbp,%rbp
je     165a <main+0x4ea>
test   %r11,%r11
je     165a <main+0x4ea>
cmpq   $0x0,0x8(%rsp)
je     165a <main+0x4ea>
test   %r12,%r12
je     165a <main+0x4ea>
test   %r10,%r10
je     165a <main+0x4ea>
test   %rbx,%rbx
je     165a <main+0x4ea>
test   %rax,%rax
je     165a <main+0x4ea>
mov    %rcx,%r8
movsd  0x58(%rsp),%xmm1
mulsd  0xc64(%rip),%xmm1
sub    $0x8,%rsp
lea    0x80(%rsp),%rdx
lea    0x78(%rsp),%rcx
xorpd  %xmm0,%xmm0
xorps  %xmm2,%xmm2
mov    %r12,0x40(%rsp)
mov    %rbx,%r14
mov    %rax,%rbx
mov    %r15,%rdi
mov    %r13d,%esi
mov    0x20(%rsp),%r9
push   %r11
push   %rbp
push   0x28(%rsp)
mov    %r10,%rbp
call   1040 <bothexact@plt>
add    $0x20,%rsp
movsd  0x80(%rsp),%xmm0
mulsd  0xc1a(%rip),%xmm0
movsd  0x58(%rsp),%xmm1
mulsd  0xc04(%rip),%xmm1
sub    $0x8,%rsp
movsd  0xc08(%rip),%xmm2
lea    0x70(%rsp),%rdx
lea    0x68(%rsp),%rcx
mov    %r15,%rdi
mov    %r13d,%esi
mov    0x10(%rsp),%r8
mov    %r12,%r9
mov    %rbx,0x58(%rsp)
push   %rbx
mov    %r14,0x58(%rsp)
push   %r14
mov    %rbp,0x58(%rsp)
push   %rbp
call   1040 <bothexact@plt>
add    $0x20,%rsp
lea    0xe5d(%rip),%rdi
call   1050 <puts@plt>
lea    0xe8c(%rip),%rdi
call   1050 <puts@plt>
movsd  0x78(%rsp),%xmm0
movsd  0x68(%rsp),%xmm1
lea    0xc43(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
movsd  0x70(%rsp),%xmm0
movsd  0xb8c(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  0x60(%rsp),%xmm1
mulsd  %xmm2,%xmm1
lea    0xc4b(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
test   %r13d,%r13d
mov    0x18(%rsp),%rbp
mov    0x30(%rsp),%r12
je     15df <main+0x46f>
mov    %r13d,%r14d
shl    $0x3,%r14
xor    %ebx,%ebx
lea    0xd2e(%rip),%r13
nopl   0x0(%rax,%rax,1)
movsd  (%r15,%rbx,1),%xmm0
lea    0xc43(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  (%r12,%rbx,1),%xmm0
mov    0x8(%rsp),%rax
movsd  (%rax,%rbx,1),%xmm1
lea    0xc32(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
movsd  0x0(%rbp,%rbx,1),%xmm0
movsd  0xb08(%rip),%xmm2
mulsd  %xmm2,%xmm0
mov    0x38(%rsp),%rax
movsd  (%rax,%rbx,1),%xmm1
mulsd  %xmm2,%xmm1
lea    0xc36(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
mov    0x10(%rsp),%rax
movsd  (%rax,%rbx,1),%xmm0
movsd  0xad6(%rip),%xmm2
mulsd  %xmm2,%xmm0
mov    0x40(%rsp),%rax
movsd  (%rax,%rbx,1),%xmm1
mulsd  %xmm2,%xmm1
lea    0xc38(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
mov    0x20(%rsp),%rax
movsd  (%rax,%rbx,1),%xmm0
movsd  0xaa4(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xa90(%rip),%xmm3
mulsd  %xmm3,%xmm0
mov    0x48(%rsp),%rax
movsd  (%rax,%rbx,1),%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm3,%xmm1
lea    0xc2a(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
mov    0x28(%rsp),%rax
movsd  (%rax,%rbx,1),%xmm0
movsd  0xa62(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xa4e(%rip),%xmm3
mulsd  %xmm3,%xmm0
mov    0x50(%rsp),%rax
movsd  (%rax,%rbx,1),%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm3,%xmm1
mov    %r13,%rdi
mov    $0x2,%al
call   1060 <printf@plt>
add    $0x8,%rbx
cmp    %rbx,%r14
jne    14c0 <main+0x350>
lea    0xd1c(%rip),%rdi
call   1050 <puts@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rdi
call   1030 <free@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    0x38(%rsp),%rdi
call   1030 <free@plt>
mov    0x40(%rsp),%rdi
call   1030 <free@plt>
mov    0x48(%rsp),%rdi
call   1030 <free@plt>
mov    0x50(%rsp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
jmp    1271 <main+0x101>
mov    0x297f(%rip),%rax
mov    (%rax),%edi
lea    0xa13(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0xffffd8f1,%eax
jmp    1271 <main+0x101>

LLVM IR (-O0):
@.str = [51 x i8] c"Enter t and r separated by space (or newline)\0A\00"
@.str.1 = [46 x i8] c" (in yrs and km, resp.; e.g. 500 500):\0A\00"
@.str.2 = [4 x i8] c"%lf\00"
@.str.3 = [26 x i8] c"... input error; exiting\0A\00"
@.str.4 = [38 x i8] c"Enter z values sep by space (in m);\00"
@.str.5 = [39 x i8] c" '-1' to end; e.g. 0 100 500 1500 -1:\0A\00"
@stderr = global i32 0
@.str.6 = [51 x i8] c"\0AERROR simpleFG: couldn't allocate memory for z!\0A\0A\00"
@.str.7 = [47 x i8] c"\0A\0A\0AWARNING simpleFG: enter -1 to stop soon!!!\0A\00"
@.str.8 = [45 x i8] c"\0AERROR simpleFG: couldn't allocate memory!\0A\0A\00"
@.str.9 = [60 x i8] c"\0AResults:\0A Test F Test G\0A\00"
@.str.10 = [40 x i8] c"(functions of r (resp. t and r) only):\0A\00"
@.str.11 = [50 x i8] c" H = %12.6f (m) H = %12.6f (m)\0A\00"
@.str.12 = [52 x i8] c" M = %12.6f (m/a) M = %12.6f (m/a)\0A\00"
@.str.13 = [13 x i8] c"(z=%10.3f):\0A\00"
@.str.14 = [50 x i8] c" T = %12.6f (K) T = %12.6f (K)\0A\00"
@.str.15 = [52 x i8] c" U = %12.6f (m/a) U = %12.6f (m/a)\0A\00"
@.str.16 = [52 x i8] c" w = %12.6f (m/a) w = %12.6f (m/a)\0A\00"
@.str.17 = [50 x i8] c" Sig = %12.6f (*) Sig = %12.6f (*)\0A\00"
@.str.18 = [50 x i8] c" Sigc = %12.6f (*) Sigc = %12.6f (*)\0A\00"
@.str.19 = [26 x i8] c"(units: (*) = 10^-3 K/a)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%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 i32
%22 = alloca i32
%23 = alloca i32
store i32 0, i32* %1
store double 0x417E1853E0000000, double* %2
store double 2.000000e+02, double* %3
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%26 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %4)
store i32 %26, i32* %23
%27 = load i32, i32* %23
%28 = icmp ne i32 %27, 1
br i1 %28, label %29, label %31
29: ; preds = %0
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %1
br label %297
31: ; preds = %0
%32 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %5)
store i32 %32, i32* %23
%33 = load i32, i32* %23
%34 = icmp ne i32 %33, 1
br i1 %34, label %35, label %37
35: ; preds = %31
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %1
br label %297
37: ; preds = %31
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0))
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0))
%40 = call i64 @malloc(i64 4008)
%41 = inttoptr i64 %40 to double*
store double* %41, double** %10
%42 = load double*, double** %10
%43 = icmp eq double* %42, null
br i1 %43, label %44, label %47
44: ; preds = %37
%45 = load i32, i32* @stderr
%46 = call i32 @fprintf(i32 %45, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.6, i64 0, i64 0))
store i32 -9999, i32* %1
br label %297
47: ; preds = %37
store i32 0, i32* %21
br label %48
48: ; preds = %66, %47
%49 = load double*, double** %10
%50 = load i32, i32* %21
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds double, double* %49, i64 %51
%53 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %52)
store i32 %53, i32* %23
%54 = load i32, i32* %23
%55 = icmp ne i32 %54, 1
br i1 %55, label %56, label %58
56: ; preds = %48
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %1
br label %297
58: ; preds = %48
%59 = load i32, i32* %21
%60 = add nsw i32 %59, 1
store i32 %60, i32* %21
%61 = load i32, i32* %21
%62 = icmp sgt i32 %61, 490
br i1 %62, label %63, label %65
63: ; preds = %58
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
br label %65
65: ; preds = %63, %58
br label %66
66: ; preds = %65
%67 = load double*, double** %10
%68 = load i32, i32* %21
%69 = sub nsw i32 %68, 1
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %67, i64 %70
%72 = load double, double* %71
%73 = fcmp oge double %72, 0.000000e+00
br i1 %73, label %48, label %74
74: ; preds = %66
%75 = load i32, i32* %21
%76 = sub nsw i32 %75, 1
store i32 %76, i32* %22
%77 = load i32, i32* %22
%78 = sext i32 %77 to i64
%79 = mul i64 %78, 8
%80 = call i64 @malloc(i64 %79)
%81 = inttoptr i64 %80 to double*
store double* %81, double** %11
%82 = load i32, i32* %22
%83 = sext i32 %82 to i64
%84 = mul i64 %83, 8
%85 = call i64 @malloc(i64 %84)
%86 = inttoptr i64 %85 to double*
store double* %86, double** %12
%87 = load i32, i32* %22
%88 = sext i32 %87 to i64
%89 = mul i64 %88, 8
%90 = call i64 @malloc(i64 %89)
%91 = inttoptr i64 %90 to double*
store double* %91, double** %13
%92 = load i32, i32* %22
%93 = sext i32 %92 to i64
%94 = mul i64 %93, 8
%95 = call i64 @malloc(i64 %94)
%96 = inttoptr i64 %95 to double*
store double* %96, double** %14
%97 = load i32, i32* %22
%98 = sext i32 %97 to i64
%99 = mul i64 %98, 8
%100 = call i64 @malloc(i64 %99)
%101 = inttoptr i64 %100 to double*
store double* %101, double** %15
%102 = load i32, i32* %22
%103 = sext i32 %102 to i64
%104 = mul i64 %103, 8
%105 = call i64 @malloc(i64 %104)
%106 = inttoptr i64 %105 to double*
store double* %106, double** %16
%107 = load i32, i32* %22
%108 = sext i32 %107 to i64
%109 = mul i64 %108, 8
%110 = call i64 @malloc(i64 %109)
%111 = inttoptr i64 %110 to double*
store double* %111, double** %17
%112 = load i32, i32* %22
%113 = sext i32 %112 to i64
%114 = mul i64 %113, 8
%115 = call i64 @malloc(i64 %114)
%116 = inttoptr i64 %115 to double*
store double* %116, double** %18
%117 = load i32, i32* %22
%118 = sext i32 %117 to i64
%119 = mul i64 %118, 8
%120 = call i64 @malloc(i64 %119)
%121 = inttoptr i64 %120 to double*
store double* %121, double** %19
%122 = load i32, i32* %22
%123 = sext i32 %122 to i64
%124 = mul i64 %123, 8
%125 = call i64 @malloc(i64 %124)
%126 = inttoptr i64 %125 to double*
store double* %126, double** %20
%127 = load double*, double** %11
%128 = icmp eq double* %127, null
br i1 %128, label %156, label %129
129: ; preds = %74
%130 = load double*, double** %12
%131 = icmp eq double* %130, null
br i1 %131, label %156, label %132
132: ; preds = %129
%133 = load double*, double** %13
%134 = icmp eq double* %133, null
br i1 %134, label %156, label %135
135: ; preds = %132
%136 = load double*, double** %14
%137 = icmp eq double* %136, null
br i1 %137, label %156, label %138
138: ; preds = %135
%139 = load double*, double** %15
%140 = icmp eq double* %139, null
br i1 %140, label %156, label %141
141: ; preds = %138
%142 = load double*, double** %16
%143 = icmp eq double* %142, null
br i1 %143, label %156, label %144
144: ; preds = %141
%145 = load double*, double** %17
%146 = icmp eq double* %145, null
br i1 %146, label %156, label %147
147: ; preds = %144
%148 = load double*, double** %18
%149 = icmp eq double* %148, null
br i1 %149, label %156, label %150
150: ; preds = %147
%151 = load double*, double** %19
%152 = icmp eq double* %151, null
br i1 %152, label %156, label %153
153: ; preds = %150
%154 = load double*, double** %20
%155 = icmp eq double* %154, null
br i1 %155, label %156, label %159
156: ; preds = %153, %150, %147, %144, %141, %138, %135, %132, %129, %74
%157 = load i32, i32* @stderr
%158 = call i32 @fprintf(i32 %157, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0))
store i32 -9999, i32* %1
br label %297
159: ; preds = %153
%160 = load double, double* %5
%161 = fmul double %160, 1.000000e+03
%162 = load double*, double** %10
%163 = load i32, i32* %22
%164 = load double*, double** %11
%165 = load double*, double** %12
%166 = load double*, double** %13
%167 = load double*, double** %14
%168 = load double*, double** %15
%169 = call i32 @bothexact(double 0.000000e+00, double %161, double* %162, i32 %163, double 0.000000e+00, double* %6, double* %7, double* %164, double* %165, double* %166, double* %167, double* %168)
%170 = load double, double* %4
%171 = fmul double %170, 0x417E1853E0000000
%172 = load double, double* %5
%173 = fmul double %172, 1.000000e+03
%174 = load double*, double** %10
%175 = load i32, i32* %22
%176 = load double*, double** %16
%177 = load double*, double** %17
%178 = load double*, double** %18
%179 = load double*, double** %19
%180 = load double*, double** %20
%181 = call i32 @bothexact(double %171, double %173, double* %174, i32 %175, double 2.000000e+02, double* %8, double* %9, double* %176, double* %177, double* %178, double* %179, double* %180)
%182 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
%183 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0))
%184 = load double, double* %6
%185 = load double, double* %8
%186 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0), double %184, double %185)
%187 = load double, double* %7
%188 = fmul double %187, 0x417E1853E0000000
%189 = load double, double* %9
%190 = fmul double %189, 0x417E1853E0000000
%191 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), double %188, double %190)
store i32 0, i32* %21
br label %192
192: ; preds = %270, %159
%193 = load i32, i32* %21
%194 = load i32, i32* %22
%195 = icmp slt i32 %193, %194
br i1 %195, label %196, label %273
196: ; preds = %192
%197 = load double*, double** %10
%198 = load i32, i32* %21
%199 = sext i32 %198 to i64
%200 = getelementptr inbounds double, double* %197, i64 %199
%201 = load double, double* %200
%202 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), double %201)
%203 = load double*, double** %11
%204 = load i32, i32* %21
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds double, double* %203, i64 %205
%207 = load double, double* %206
%208 = load double*, double** %16
%209 = load i32, i32* %21
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds double, double* %208, i64 %210
%212 = load double, double* %211
%213 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.14, i64 0, i64 0), double %207, double %212)
%214 = load double*, double** %12
%215 = load i32, i32* %21
%216 = sext i32 %215 to i64
%217 = getelementptr inbounds double, double* %214, i64 %216
%218 = load double, double* %217
%219 = fmul double %218, 0x417E1853E0000000
%220 = load double*, double** %17
%221 = load i32, i32* %21
%222 = sext i32 %221 to i64
%223 = getelementptr inbounds double, double* %220, i64 %222
%224 = load double, double* %223
%225 = fmul double %224, 0x417E1853E0000000
%226 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.15, i64 0, i64 0), double %219, double %225)
%227 = load double*, double** %13
%228 = load i32, i32* %21
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds double, double* %227, i64 %229
%231 = load double, double* %230
%232 = fmul double %231, 0x417E1853E0000000
%233 = load double*, double** %18
%234 = load i32, i32* %21
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds double, double* %233, i64 %235
%237 = load double, double* %236
%238 = fmul double %237, 0x417E1853E0000000
%239 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.16, i64 0, i64 0), double %232, double %238)
%240 = load double*, double** %14
%241 = load i32, i32* %21
%242 = sext i32 %241 to i64
%243 = getelementptr inbounds double, double* %240, i64 %242
%244 = load double, double* %243
%245 = fmul double %244, 0x417E1853E0000000
%246 = fmul double %245, 1.000000e+03
%247 = load double*, double** %19
%248 = load i32, i32* %21
%249 = sext i32 %248 to i64
%250 = getelementptr inbounds double, double* %247, i64 %249
%251 = load double, double* %250
%252 = fmul double %251, 0x417E1853E0000000
%253 = fmul double %252, 1.000000e+03
%254 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.17, i64 0, i64 0), double %246, double %253)
%255 = load double*, double** %15
%256 = load i32, i32* %21
%257 = sext i32 %256 to i64
%258 = getelementptr inbounds double, double* %255, i64 %257
%259 = load double, double* %258
%260 = fmul double %259, 0x417E1853E0000000
%261 = fmul double %260, 1.000000e+03
%262 = load double*, double** %20
%263 = load i32, i32* %21
%264 = sext i32 %263 to i64
%265 = getelementptr inbounds double, double* %262, i64 %264
%266 = load double, double* %265
%267 = fmul double %266, 0x417E1853E0000000
%268 = fmul double %267, 1.000000e+03
%269 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.18, i64 0, i64 0), double %261, double %268)
br label %270
270: ; preds = %196
%271 = load i32, i32* %21
%272 = add nsw i32 %271, 1
store i32 %272, i32* %21
br label %192
273: ; preds = %192
%274 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.19, i64 0, i64 0))
%275 = load double*, double** %10
%276 = call i32 @free(double* %275)
%277 = load double*, double** %11
%278 = call i32 @free(double* %277)
%279 = load double*, double** %12
%280 = call i32 @free(double* %279)
%281 = load double*, double** %13
%282 = call i32 @free(double* %281)
%283 = load double*, double** %14
%284 = call i32 @free(double* %283)
%285 = load double*, double** %15
%286 = call i32 @free(double* %285)
%287 = load double*, double** %16
%288 = call i32 @free(double* %287)
%289 = load double*, double** %17
%290 = call i32 @free(double* %289)
%291 = load double*, double** %18
%292 = call i32 @free(double* %291)
%293 = load double*, double** %19
%294 = call i32 @free(double* %293)
%295 = load double*, double** %20
%296 = call i32 @free(double* %295)
store i32 0, i32* %1
br label %297
297: ; preds = %273, %156, %56, %44, %35, %29
%298 = load i32, i32* %1
ret i32 %298
}

LLVM IR (-O2):
@.str.2 = [4 x i8] c"%lf\00"
@.str.4 = [38 x i8] c"Enter z values sep by space (in m);\00"
@stderr = global i32 0
@.str.6 = [51 x i8] c"\0AERROR simpleFG: couldn't allocate memory for z!\0A\0A\00"
@.str.8 = [45 x i8] c"\0AERROR simpleFG: couldn't allocate memory!\0A\0A\00"
@.str.11 = [50 x i8] c" H = %12.6f (m) H = %12.6f (m)\0A\00"
@.str.12 = [52 x i8] c" M = %12.6f (m/a) M = %12.6f (m/a)\0A\00"
@.str.13 = [13 x i8] c"(z=%10.3f):\0A\00"
@.str.14 = [50 x i8] c" T = %12.6f (K) T = %12.6f (K)\0A\00"
@.str.15 = [52 x i8] c" U = %12.6f (m/a) U = %12.6f (m/a)\0A\00"
@.str.16 = [52 x i8] c" w = %12.6f (m/a) w = %12.6f (m/a)\0A\00"
@.str.17 = [50 x i8] c" Sig = %12.6f (*) Sig = %12.6f (*)\0A\00"
@.str.18 = [50 x i8] c" Sigc = %12.6f (*) Sigc = %12.6f (*)\0A\00"
@str = [50 x i8] c"Enter t and r separated by space (or newline)\00"
@str.20 = [45 x i8] c" (in yrs and km, resp.; e.g. 500 500):\00"
@str.21 = [38 x i8] c" '-1' to end; e.g. 0 100 500 1500 -1:\00"
@str.22 = [59 x i8] c"\0AResults:\0A Test F Test G\00"
@str.23 = [39 x i8] c"(functions of r (resp. t and r) only):\00"
@str.24 = [25 x i8] c"(units: (*) = 10^-3 K/a)\00"
@str.25 = [46 x i8] c"\0A\0A\0AWARNING simpleFG: enter -1 to stop soon!!!\00"
@str.28 = [25 x i8] c"... input error; exiting\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = bitcast double* %1 to i8*
%8 = bitcast double* %2 to i8*
%9 = bitcast double* %3 to i8*
%10 = bitcast double* %4 to i8*
%11 = bitcast double* %5 to i8*
%12 = bitcast double* %6 to i8*
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.20, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %1)
%16 = icmp eq i32 %15, 1
br i1 %16, label %19, label %17
17: ; preds = %0
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.28, i64 0, i64 0))
br label %171
19: ; preds = %0
%20 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %2)
%21 = icmp eq i32 %20, 1
br i1 %21, label %24, label %22
22: ; preds = %19
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.28, i64 0, i64 0))
br label %171
24: ; preds = %19
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0))
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.21, i64 0, i64 0))
%27 = call i64 @malloc(i64 4008)
%28 = inttoptr i64 %27 to double*
%29 = icmp eq i64 %27, 0
br i1 %29, label %30, label %33
30: ; preds = %24
%31 = load i32, i32* @stderr
%32 = call i32 @fprintf(i32 %31, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.6, i64 0, i64 0))
br label %171
33: ; preds = %24, %45
%34 = phi i64 [ %41, %45 ], [ 0, %24 ]
%35 = getelementptr inbounds double, double* %28, i64 %34
%36 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %35)
%37 = icmp eq i32 %36, 1
br i1 %37, label %40, label %38
38: ; preds = %33
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.28, i64 0, i64 0))
br label %171
40: ; preds = %33
%41 = add nuw i64 %34, 1
%42 = icmp ugt i64 %34, 489
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.25, i64 0, i64 0))
br label %45
45: ; preds = %40, %43
%46 = load double, double* %35
%47 = fcmp ult double %46, 0.000000e+00
br i1 %47, label %48, label %33
48: ; preds = %45
%49 = trunc i64 %34 to i32
%50 = and i64 %34, 4294967295
%51 = shl nuw nsw i64 %50, 3
%52 = call i64 @malloc(i64 %51)
%53 = inttoptr i64 %52 to double*
%54 = call i64 @malloc(i64 %51)
%55 = inttoptr i64 %54 to double*
%56 = call i64 @malloc(i64 %51)
%57 = inttoptr i64 %56 to double*
%58 = call i64 @malloc(i64 %51)
%59 = inttoptr i64 %58 to double*
%60 = call i64 @malloc(i64 %51)
%61 = inttoptr i64 %60 to double*
%62 = call i64 @malloc(i64 %51)
%63 = inttoptr i64 %62 to double*
%64 = call i64 @malloc(i64 %51)
%65 = inttoptr i64 %64 to double*
%66 = call i64 @malloc(i64 %51)
%67 = inttoptr i64 %66 to double*
%68 = call i64 @malloc(i64 %51)
%69 = inttoptr i64 %68 to double*
%70 = call i64 @malloc(i64 %51)
%71 = inttoptr i64 %70 to double*
%72 = icmp eq i64 %52, 0
%73 = icmp eq i64 %54, 0
%74 = select i1 %72, i1 true, i1 %73
%75 = icmp eq i64 %56, 0
%76 = select i1 %74, i1 true, i1 %75
%77 = icmp eq i64 %58, 0
%78 = select i1 %76, i1 true, i1 %77
%79 = icmp eq i64 %60, 0
%80 = select i1 %78, i1 true, i1 %79
%81 = icmp eq i64 %62, 0
%82 = select i1 %80, i1 true, i1 %81
%83 = icmp eq i64 %64, 0
%84 = select i1 %82, i1 true, i1 %83
%85 = icmp eq i64 %66, 0
%86 = select i1 %84, i1 true, i1 %85
%87 = icmp eq i64 %68, 0
%88 = select i1 %86, i1 true, i1 %87
%89 = icmp eq i64 %70, 0
%90 = select i1 %88, i1 true, i1 %89
br i1 %90, label %91, label %94
91: ; preds = %48
%92 = load i32, i32* @stderr
%93 = call i32 @fprintf(i32 %92, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0))
br label %171
94: ; preds = %48
%95 = load double, double* %2
%96 = fmul double %95, 1.000000e+03
%97 = call i32 @bothexact(double 0.000000e+00, double %96, double* %28, i32 %49, double 0.000000e+00, double* %3, double* %4, double* %53, double* %55, double* %57, double* %59, double* %61)
%98 = load double, double* %1
%99 = fmul double %98, 0x417E1853E0000000
%100 = load double, double* %2
%101 = fmul double %100, 1.000000e+03
%102 = call i32 @bothexact(double %99, double %101, double* %28, i32 %49, double 2.000000e+02, double* %5, double* %6, double* %63, double* %65, double* %67, double* %69, double* %71)
%103 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
%104 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.23, i64 0, i64 0))
%105 = load double, double* %3
%106 = load double, double* %5
%107 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0), double %105, double %106)
%108 = load double, double* %4
%109 = fmul double %108, 0x417E1853E0000000
%110 = load double, double* %6
%111 = fmul double %110, 0x417E1853E0000000
%112 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), double %109, double %111)
%113 = icmp eq i32 %49, 0
br i1 %113, label %158, label %114
114: ; preds = %94, %114
%115 = phi i64 [ %156, %114 ], [ 0, %94 ]
%116 = getelementptr inbounds double, double* %28, i64 %115
%117 = load double, double* %116
%118 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), double %117)
%119 = getelementptr inbounds double, double* %53, i64 %115
%120 = load double, double* %119
%121 = getelementptr inbounds double, double* %63, i64 %115
%122 = load double, double* %121
%123 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.14, i64 0, i64 0), double %120, double %122)
%124 = getelementptr inbounds double, double* %55, i64 %115
%125 = load double, double* %124
%126 = fmul double %125, 0x417E1853E0000000
%127 = getelementptr inbounds double, double* %65, i64 %115
%128 = load double, double* %127
%129 = fmul double %128, 0x417E1853E0000000
%130 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.15, i64 0, i64 0), double %126, double %129)
%131 = getelementptr inbounds double, double* %57, i64 %115
%132 = load double, double* %131
%133 = fmul double %132, 0x417E1853E0000000
%134 = getelementptr inbounds double, double* %67, i64 %115
%135 = load double, double* %134
%136 = fmul double %135, 0x417E1853E0000000
%137 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.16, i64 0, i64 0), double %133, double %136)
%138 = getelementptr inbounds double, double* %59, i64 %115
%139 = load double, double* %138
%140 = fmul double %139, 0x417E1853E0000000
%141 = fmul double %140, 1.000000e+03
%142 = getelementptr inbounds double, double* %69, i64 %115
%143 = load double, double* %142
%144 = fmul double %143, 0x417E1853E0000000
%145 = fmul double %144, 1.000000e+03
%146 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.17, i64 0, i64 0), double %141, double %145)
%147 = getelementptr inbounds double, double* %61, i64 %115
%148 = load double, double* %147
%149 = fmul double %148, 0x417E1853E0000000
%150 = fmul double %149, 1.000000e+03
%151 = getelementptr inbounds double, double* %71, i64 %115
%152 = load double, double* %151
%153 = fmul double %152, 0x417E1853E0000000
%154 = fmul double %153, 1.000000e+03
%155 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.18, i64 0, i64 0), double %150, double %154)
%156 = add nuw nsw i64 %115, 1
%157 = icmp eq i64 %156, %50
br i1 %157, label %158, label %114
158: ; preds = %114, %94
%159 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.24, i64 0, i64 0))
%160 = call i32 @free(double* %28)
%161 = call i32 @free(double* %53)
%162 = call i32 @free(double* %55)
%163 = call i32 @free(double* %57)
%164 = call i32 @free(double* %59)
%165 = call i32 @free(double* %61)
%166 = call i32 @free(double* %63)
%167 = call i32 @free(double* %65)
%168 = call i32 @free(double* %67)
%169 = call i32 @free(double* %69)
%170 = call i32 @free(double* %71)
br label %171
171: ; preds = %158, %91, %38, %30, %22, %17
%172 = phi i32 [ 1, %17 ], [ 1, %22 ], [ -9999, %30 ], [ 1, %38 ], [ -9999, %91 ], [ 0, %158 ]
ret i32 %172
}