#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
double atof(int /*<<< orphan*/);
int atoi(int /*<<< orphan*/);
long atol(int /*<<< orphan*/);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ interp(double, double *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ r2d(double *, double *, int *, double *, int *, int *,
                       double *);
main() {
  char filenm[14], buff[20];
  double tobs, values[11], ramn, decmn, day;
  int id, ih, ians, flag, i, n, l;
  FILE *fpin;
  long int j, y, m;
  static char *vname[12] = {"  JAN ", "  FEB ", "  MAR ", "  APR ",
                            "  MAY ", "  JUNE", "  JULY", "  AUG ",
                            "  SEPT", "  OCT ", "  NOV ", "  DEC "};
  printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
l1:
  printf(" What is the name of your Comet Ephemeris File ? ");
  gets(filenm);
  if ((fpin = fopen(filenm, "r")) == NULL) {
    printf("Cannot open %s. Abort", filenm);
    exit(-1);
  }
l10:
  printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
  printf(" At the Prompt Please Input Epoch for Interpolation \n");
  printf(" Please Enter Year  of Interest (1985)  --> ");
  y = atol(gets(buff));
  printf(" Please Enter Month of Interest (09)    --> ");
  m = atol(gets(buff));
  printf(" Please Enter Day   of Interest (23.47) --> ");
  day = atof(gets(buff));
  j = 367 * y - 7 * (y + (m + 9) / 12) / 4 -
      3 * ((y + (m - 9) / 7) / 100 + 1) / 4 + 275 * m / 9 + 1721029l;
  tobs = day + (double)j - .5;
  printf("\nThe Date is: %4ld %s %10.5f = %16.7f \n\n", y, vname[m - 1], day,
         tobs);
  interp(tobs, values, fpin);
  r2d(&values[0], &values[1], &ih, &ramn, &flag, &id, &decmn);
  printf("\n RA= %4d, %7.3f   DEC= %c %3d, %6.2f ", ih, ramn, flag, id, decmn);
  printf("\n DELTA= %8.4f , DELDOT= %8.4f , R= %7.4f ", values[2], values[3],
         values[4]);
  printf(" \n RDOT = %8.4f THETA = %5.1f , BETA = %5.1f ", values[5], values[6],
         values[7]);
  printf(" \n MOON = %6.1f PSANG = %6.1f PSAMV= %6.1f \n\n", values[8],
         values[9], values[10]);
  printf(" Interpolate More Points With This Data Set ?? ");
  printf("  (1 = YES,   0 = NO) -----> ");
  ians = atoi(gets(buff));
  if (ians == 1) {
    goto l10;
  }
  fclose(fpin);
  printf(" Interpolate With A New Set of Data ?? -");
  printf("  (1 = YES,   0 = NO) -----> ");
  ians = atoi(gets(buff));
  if (ians == 1) {
    goto l1;
  }
  printf("\n\n\n\n\n\n\n\n\n\n\n\n\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x12(%rbp),%rdi
call   1070 <gets@plt>
lea    -0x12(%rbp),%rdi
lea    0xeac(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0xd0(%rbp)
cmp    $0x0,%rax
jne    1214 <main+0x74>
lea    -0x12(%rbp),%rsi
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>
jmp    1219 <main+0x79>
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1070 <gets@plt>
mov    %eax,%edi
call   1090 <atol@plt>
mov    %rax,-0xe0(%rbp)
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1070 <gets@plt>
mov    %eax,%edi
call   1090 <atol@plt>
mov    %rax,-0xe8(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1070 <gets@plt>
mov    %eax,%edi
call   1030 <atof@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
imul   $0x16f,-0xe0(%rbp),%rax
mov    %rax,-0x108(%rbp)
mov    -0xe0(%rbp),%rax
mov    %rax,-0x110(%rbp)
mov    -0xe8(%rbp),%rax
add    $0x9,%rax
mov    $0xc,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0x110(%rbp),%rax
add    %rcx,%rax
imul   $0x7,%rax,%rax
mov    $0x4,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0x108(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0xf8(%rbp)
mov    -0xe0(%rbp),%rax
mov    %rax,-0x100(%rbp)
mov    -0xe8(%rbp),%rax
sub    $0x9,%rax
mov    $0x7,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0x100(%rbp),%rax
add    %rcx,%rax
mov    $0x64,%ecx
cqto
idiv   %rcx
add    $0x1,%rax
imul   $0x3,%rax,%rax
mov    $0x4,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0xf8(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0xf0(%rbp)
imul   $0x113,-0xe8(%rbp),%rax
mov    $0x9,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0xf0(%rbp),%rax
add    %rcx,%rax
add    $0x1a42c5,%rax
mov    %rax,-0xd8(%rbp)
movsd  -0xa8(%rbp),%xmm0
ff
cvtsi2sdq -0xd8(%rbp),%xmm1
ff ff
addsd  %xmm1,%xmm0
movsd  0xc4b(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0xe0(%rbp),%rsi
mov    -0xe8(%rbp),%rcx
sub    $0x1,%rcx
lea    0x2ca9(%rip),%rax
mov    (%rax,%rcx,8),%rdx
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0x38(%rbp),%xmm1
lea    0xd8e(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  -0x38(%rbp),%xmm0
lea    -0x90(%rbp),%rdi
mov    -0xd0(%rbp),%rsi
call   1060 <interp@plt>
lea    -0x90(%rbp),%rdi
lea    -0x90(%rbp),%rsi
add    $0x8,%rsi
lea    -0xb0(%rbp),%rdx
lea    -0x98(%rbp),%rcx
lea    -0xb8(%rbp),%r8
lea    -0xac(%rbp),%r9
lea    -0xa0(%rbp),%rax
mov    %rax,(%rsp)
call   1080 <r2d@plt>
mov    -0xb0(%rbp),%esi
movsd  -0x98(%rbp),%xmm0
ff
mov    -0xb8(%rbp),%edx
mov    -0xac(%rbp),%ecx
movsd  -0xa0(%rbp),%xmm1
ff
lea    0xd31(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  -0x80(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
lea    0xd3b(%rip),%rdi
mov    $0x3,%al
call   1050 <printf@plt>
movsd  -0x68(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
lea    0xd49(%rip),%rdi
mov    $0x3,%al
call   1050 <printf@plt>
movsd  -0x50(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
lea    0xd5a(%rip),%rdi
mov    $0x3,%al
call   1050 <printf@plt>
lea    0xd7a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd9c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1070 <gets@plt>
mov    %eax,%edi
call   10b0 <atoi@plt>
mov    %eax,-0xb4(%rbp)
cmpl   $0x1,-0xb4(%rbp)
jne    1517 <main+0x377>
jmp    1219 <main+0x79>
mov    -0xd0(%rbp),%rdi
call   1040 <fclose@plt>
lea    0xd78(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd4c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1070 <gets@plt>
mov    %eax,%edi
call   10b0 <atoi@plt>
mov    %eax,-0xb4(%rbp)
cmpl   $0x1,-0xb4(%rbp)
jne    1567 <main+0x3c7>
jmp    11c0 <main+0x20>
lea    0xb44(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
lea    0x10e6(%rip),%rdi
call   1030 <puts@plt>
lea    0x10f0(%rip),%r13
lea    0xefb(%rip),%r12
lea    0xb0(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xe95(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x42(%rsp),%r14
mov    %r14,%rdi
call   1080 <gets@plt>
mov    %r14,%rdi
lea    0xea9(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,0x20(%rsp)
test   %rax,%rax
je     150f <main+0x35f>
nopl   0x0(%rax,%rax,1)
lea    0x1074(%rip),%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1080 <gets@plt>
mov    %eax,%edi
call   10a0 <atol@plt>
mov    %rax,%rbx
lea    0xe9c(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1080 <gets@plt>
mov    %eax,%edi
call   10a0 <atol@plt>
mov    %rax,%r14
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1080 <gets@plt>
mov    %eax,%edi
call   1040 <atof@plt>
imul   $0x16f,%rbx,%rsi
lea    0x9(%r14),%rax
movabs $0x2aaaaaaaaaaaaaab,%rcx
aa aa 2a
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    %rdx
add    %rax,%rdx
add    %rbx,%rdx
lea    0x0(,%rdx,8),%rax
sub    %rdx,%rax
lea    0x3(%rax),%rdi
test   %rax,%rax
cmovns %rax,%rdi
lea    -0x9(%r14),%rax
movabs $0x4924924924924925,%rcx
92 24 49
imul   %rcx
mov    %rdx,%rcx
sar    $0x2,%rdi
mov    %rdx,%rax
shr    $0x3f,%rax
sar    %rcx
add    %rax,%rcx
add    %rbx,%rcx
mov    %rcx,%rax
movabs $0xa3d70a3d70a3d70b,%rdx
0a d7 a3
imul   %rdx
add    %rcx,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x6,%rdx
add    %rax,%rdx
lea    (%rdx,%rdx,2),%rax
add    $0x3,%rax
lea    (%rdx,%rdx,2),%rcx
add    $0x6,%rcx
test   %rax,%rax
cmovns %rax,%rcx
sar    $0x2,%rcx
imul   $0x113,%r14,%rax
movabs $0x1c71c71c71c71c72,%rdx
c7 71 1c
imul   %rdx
mov    %rdx,%rax
shr    $0x3f,%rax
add    %rdx,%rax
add    %rsi,%rax
sub    %rdi,%rax
sub    %rcx,%rax
add    $0x1a42c5,%rax
cvtsi2sd %rax,%xmm1
addsd  %xmm0,%xmm1
addsd  0xc83(%rip),%xmm1
movsd  %xmm1,0x28(%rsp)
lea    0xc7e(%rip),%rax
movslq -0x4(%rax,%r14,4),%rdx
add    %rax,%rdx
lea    0xdc4(%rip),%rdi
mov    %rbx,%rsi
lea    0x58(%rsp),%rbx
mov    $0x2,%al
call   1060 <printf@plt>
movsd  0x28(%rsp),%xmm0
lea    0x50(%rsp),%rbp
mov    %rbp,%rdi
mov    0x20(%rsp),%rsi
call   1070 <interp@plt>
lea    0x30(%rsp),%rax
mov    %rax,(%rsp)
mov    %rbp,%rdi
mov    %rbx,%rsi
lea    0x18(%rsp),%rdx
lea    0x38(%rsp),%rcx
lea    0x14(%rsp),%r8
lea    0x1c(%rsp),%r9
call   1090 <r2d@plt>
mov    0x18(%rsp),%esi
movsd  0x38(%rsp),%xmm0
mov    0x14(%rsp),%edx
mov    0x1c(%rsp),%ecx
movsd  0x30(%rsp),%xmm1
lea    0xd7f(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
movsd  0x60(%rsp),%xmm0
movsd  0x68(%rsp),%xmm1
movsd  0x70(%rsp),%xmm2
lea    0xd86(%rip),%rdi
mov    $0x3,%al
call   1060 <printf@plt>
movsd  0x78(%rsp),%xmm0
movsd  0x80(%rsp),%xmm1
movsd  0x88(%rsp),%xmm2
lea    0xd8b(%rip),%rdi
mov    $0x3,%al
call   1060 <printf@plt>
movsd  0x90(%rsp),%xmm0
movsd  0x98(%rsp),%xmm1
movsd  0xa0(%rsp),%xmm2
lea    0xd90(%rip),%rdi
mov    $0x3,%al
call   1060 <printf@plt>
lea    0xdb0(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xdd2(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1080 <gets@plt>
mov    %eax,%edi
call   10c0 <atoi@plt>
cmp    $0x1,%eax
je     1230 <main+0x80>
mov    0x20(%rsp),%rdi
call   1050 <fclose@plt>
lea    0xdc0(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xd94(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1080 <gets@plt>
mov    %eax,%edi
call   10c0 <atoi@plt>
cmp    $0x1,%eax
je     11f0 <main+0x40>
lea    0xdc1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xbaa(%rip),%rdi
lea    0x42(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
@main.vname = internal global [12 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i32 0, i32 0)]
@.str = [7 x i8] c" JAN \00"
@.str.1 = [7 x i8] c" FEB \00"
@.str.2 = [7 x i8] c" MAR \00"
@.str.3 = [7 x i8] c" APR \00"
@.str.4 = [7 x i8] c" MAY \00"
@.str.5 = [7 x i8] c" JUNE\00"
@.str.6 = [7 x i8] c" JULY\00"
@.str.7 = [7 x i8] c" AUG \00"
@.str.8 = [7 x i8] c" SEPT\00"
@.str.9 = [7 x i8] c" OCT \00"
@.str.10 = [7 x i8] c" NOV \00"
@.str.11 = [7 x i8] c" DEC \00"
@.str.12 = [23 x i8] c"\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\00"
@.str.13 = [50 x i8] c" What is the name of your Comet Ephemeris File ? \00"
@.str.14 = [2 x i8] c"r\00"
@.str.15 = [22 x i8] c"Cannot open %s. Abort\00"
@.str.16 = [26 x i8] c"\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\00"
@.str.17 = [54 x i8] c" At the Prompt Please Input Epoch for Interpolation \0A\00"
@.str.18 = [45 x i8] c" Please Enter Year of Interest (1985) --> \00"
@.str.19 = [45 x i8] c" Please Enter Month of Interest (09) --> \00"
@.str.20 = [45 x i8] c" Please Enter Day of Interest (23.47) --> \00"
@.str.21 = [41 x i8] c"\0AThe Date is: %4ld %s %10.5f = %16.7f \0A\0A\00"
@.str.22 = [39 x i8] c"\0A RA= %4d, %7.3f DEC= %c %3d, %6.2f \00"
@.str.23 = [43 x i8] c"\0A DELTA= %8.4f , DELDOT= %8.4f , R= %7.4f \00"
@.str.24 = [46 x i8] c" \0A RDOT = %8.4f THETA = %5.1f , BETA = %5.1f \00"
@.str.25 = [46 x i8] c" \0A MOON = %6.1f PSANG = %6.1f PSAMV= %6.1f \0A\0A\00"
@.str.26 = [48 x i8] c" Interpolate More Points With This Data Set ?? \00"
@.str.27 = [30 x i8] c" (1 = YES, 0 = NO) -----> \00"
@.str.28 = [41 x i8] c" Interpolate With A New Set of Data ?? -\00"
@.str.29 = [14 x i8] c"\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [14 x i8]
%3 = alloca [20 x i8]
%4 = alloca double
%5 = alloca [11 x double]
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32*
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
store i32 0, i32* %1
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0))
br label %21
21: ; preds = %138, %0
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.13, i64 0, i64 0))
%23 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%24 = call i32 @gets(i8* %23)
%25 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%26 = call i32* @fopen(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
store i32* %26, i32** %16
%27 = icmp eq i32* %26, null
br i1 %27, label %28, label %32
28: ; preds = %21
%29 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.15, i64 0, i64 0), i8* %29)
%31 = call i32 @exit(i32 -1)
unreachable
32: ; preds = %21
br label %33
33: ; preds = %127, %32
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0))
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.17, i64 0, i64 0))
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.18, i64 0, i64 0))
%37 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%38 = call i32 @gets(i8* %37)
%39 = call i64 @atol(i32 %38)
store i64 %39, i64* %18
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.19, i64 0, i64 0))
%41 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%42 = call i32 @gets(i8* %41)
%43 = call i64 @atol(i32 %42)
store i64 %43, i64* %19
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.20, i64 0, i64 0))
%45 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%46 = call i32 @gets(i8* %45)
%47 = call double @atof(i32 %46)
store double %47, double* %8
%48 = load i64, i64* %18
%49 = mul nsw i64 367, %48
%50 = load i64, i64* %18
%51 = load i64, i64* %19
%52 = add nsw i64 %51, 9
%53 = sdiv i64 %52, 12
%54 = add nsw i64 %50, %53
%55 = mul nsw i64 7, %54
%56 = sdiv i64 %55, 4
%57 = sub nsw i64 %49, %56
%58 = load i64, i64* %18
%59 = load i64, i64* %19
%60 = sub nsw i64 %59, 9
%61 = sdiv i64 %60, 7
%62 = add nsw i64 %58, %61
%63 = sdiv i64 %62, 100
%64 = add nsw i64 %63, 1
%65 = mul nsw i64 3, %64
%66 = sdiv i64 %65, 4
%67 = sub nsw i64 %57, %66
%68 = load i64, i64* %19
%69 = mul nsw i64 275, %68
%70 = sdiv i64 %69, 9
%71 = add nsw i64 %67, %70
%72 = add nsw i64 %71, 1721029
store i64 %72, i64* %17
%73 = load double, double* %8
%74 = load i64, i64* %17
%75 = sitofp i64 %74 to double
%76 = fadd double %73, %75
%77 = fsub double %76, 5.000000e-01
store double %77, double* %4
%78 = load i64, i64* %18
%79 = load i64, i64* %19
%80 = sub nsw i64 %79, 1
%81 = getelementptr inbounds [12 x i8*], [12 x i8*]* @main.vname, i64 0, i64 %80
%82 = load i8*, i8** %81
%83 = load double, double* %8
%84 = load double, double* %4
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.21, i64 0, i64 0), i64 %78, i8* %82, double %83, double %84)
%86 = load double, double* %4
%87 = getelementptr inbounds [11 x double], [11 x double]* %5, i64 0, i64 0
%88 = load i32*, i32** %16
%89 = call i32 @interp(double %86, double* %87, i32* %88)
%90 = getelementptr inbounds [11 x double], [11 x double]* %5, i64 0, i64 0
%91 = getelementptr inbounds [11 x double], [11 x double]* %5, i64 0, i64 1
%92 = call i32 @r2d(double* %90, double* %91, i32* %10, double* %6, i32* %12, i32* %9, double* %7)
%93 = load i32, i32* %10
%94 = load double, double* %6
%95 = load i32, i32* %12
%96 = load i32, i32* %9
%97 = load double, double* %7
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.22, i64 0, i64 0), i32 %93, double %94, i32 %95, i32 %96, double %97)
%99 = getelementptr inbounds [11 x double], [11 x double]* %5, i64 0, i64 2
%100 = load double, double* %99
%101 = getelementptr inbounds [11 x double], [11 x double]* %5, i64 0, i64 3
%102 = load double, double* %101
%103 = getelementptr inbounds [11 x double], [11 x double]* %5, i64 0, i64 4
%104 = load double, double* %103
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.23, i64 0, i64 0), double %100, double %102, double %104)
%106 = getelementptr inbounds [11 x double], [11 x double]* %5, i64 0, i64 5
%107 = load double, double* %106
%108 = getelementptr inbounds [11 x double], [11 x double]* %5, i64 0, i64 6
%109 = load double, double* %108
%110 = getelementptr inbounds [11 x double], [11 x double]* %5, i64 0, i64 7
%111 = load double, double* %110
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.24, i64 0, i64 0), double %107, double %109, double %111)
%113 = getelementptr inbounds [11 x double], [11 x double]* %5, i64 0, i64 8
%114 = load double, double* %113
%115 = getelementptr inbounds [11 x double], [11 x double]* %5, i64 0, i64 9
%116 = load double, double* %115
%117 = getelementptr inbounds [11 x double], [11 x double]* %5, i64 0, i64 10
%118 = load double, double* %117
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.25, i64 0, i64 0), double %114, double %116, double %118)
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.26, i64 0, i64 0))
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.27, i64 0, i64 0))
%122 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%123 = call i32 @gets(i8* %122)
%124 = call i32 @atoi(i32 %123)
store i32 %124, i32* %11
%125 = load i32, i32* %11
%126 = icmp eq i32 %125, 1
br i1 %126, label %127, label %128
127: ; preds = %33
br label %33
128: ; preds = %33
%129 = load i32*, i32** %16
%130 = call i32 @fclose(i32* %129)
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.28, i64 0, i64 0))
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.27, i64 0, i64 0))
%133 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%134 = call i32 @gets(i8* %133)
%135 = call i32 @atoi(i32 %134)
store i32 %135, i32* %11
%136 = load i32, i32* %11
%137 = icmp eq i32 %136, 1
br i1 %137, label %138, label %139
138: ; preds = %128
br label %21
139: ; preds = %128
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.29, i64 0, i64 0))
%141 = load i32, i32* %1
ret i32 %141
}

LLVM IR (-O2):
@reltable.main = internal unnamed_addr constant [12 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.1 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.2 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.3 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.4 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.5 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.6 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.7 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.8 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.9 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.10 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.11 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32)]
@.str = [7 x i8] c" JAN \00"
@.str.1 = [7 x i8] c" FEB \00"
@.str.2 = [7 x i8] c" MAR \00"
@.str.3 = [7 x i8] c" APR \00"
@.str.4 = [7 x i8] c" MAY \00"
@.str.5 = [7 x i8] c" JUNE\00"
@.str.6 = [7 x i8] c" JULY\00"
@.str.7 = [7 x i8] c" AUG \00"
@.str.8 = [7 x i8] c" SEPT\00"
@.str.9 = [7 x i8] c" OCT \00"
@.str.10 = [7 x i8] c" NOV \00"
@.str.11 = [7 x i8] c" DEC \00"
@.str.13 = [50 x i8] c" What is the name of your Comet Ephemeris File ? \00"
@.str.14 = [2 x i8] c"r\00"
@.str.15 = [22 x i8] c"Cannot open %s. Abort\00"
@.str.18 = [45 x i8] c" Please Enter Year of Interest (1985) --> \00"
@.str.19 = [45 x i8] c" Please Enter Month of Interest (09) --> \00"
@.str.20 = [45 x i8] c" Please Enter Day of Interest (23.47) --> \00"
@.str.21 = [41 x i8] c"\0AThe Date is: %4ld %s %10.5f = %16.7f \0A\0A\00"
@.str.22 = [39 x i8] c"\0A RA= %4d, %7.3f DEC= %c %3d, %6.2f \00"
@.str.23 = [43 x i8] c"\0A DELTA= %8.4f , DELDOT= %8.4f , R= %7.4f \00"
@.str.24 = [46 x i8] c" \0A RDOT = %8.4f THETA = %5.1f , BETA = %5.1f \00"
@.str.25 = [46 x i8] c" \0A MOON = %6.1f PSANG = %6.1f PSAMV= %6.1f \0A\0A\00"
@.str.26 = [48 x i8] c" Interpolate More Points With This Data Set ?? \00"
@.str.27 = [30 x i8] c" (1 = YES, 0 = NO) -----> \00"
@.str.28 = [41 x i8] c" Interpolate With A New Set of Data ?? -\00"
@str = [22 x i8] c"\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\00"
@str.30 = [25 x i8] c"\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\00"
@str.31 = [53 x i8] c" At the Prompt Please Input Epoch for Interpolation \00"
@str.32 = [13 x i8] c"\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = alloca [20 x i8]
%3 = alloca [11 x double]
%4 = alloca double
%5 = alloca double
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%11 = bitcast [11 x double]* %3 to i8*
%12 = bitcast double* %4 to i8*
%13 = bitcast double* %5 to i8*
%14 = bitcast i32* %6 to i8*
%15 = bitcast i32* %7 to i8*
%16 = bitcast i32* %8 to i8*
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%18 = getelementptr inbounds [11 x double], [11 x double]* %3, i64 0, i64 0
%19 = getelementptr inbounds [11 x double], [11 x double]* %3, i64 0, i64 1
%20 = getelementptr inbounds [11 x double], [11 x double]* %3, i64 0, i64 2
%21 = getelementptr inbounds [11 x double], [11 x double]* %3, i64 0, i64 3
%22 = getelementptr inbounds [11 x double], [11 x double]* %3, i64 0, i64 4
%23 = getelementptr inbounds [11 x double], [11 x double]* %3, i64 0, i64 5
%24 = getelementptr inbounds [11 x double], [11 x double]* %3, i64 0, i64 6
%25 = getelementptr inbounds [11 x double], [11 x double]* %3, i64 0, i64 7
%26 = getelementptr inbounds [11 x double], [11 x double]* %3, i64 0, i64 8
%27 = getelementptr inbounds [11 x double], [11 x double]* %3, i64 0, i64 9
%28 = getelementptr inbounds [11 x double], [11 x double]* %3, i64 0, i64 10
br label %29
29: ; preds = %100, %0
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.13, i64 0, i64 0))
%31 = call i32 @gets(i8* %9)
%32 = call i32* @fopen(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%33 = icmp eq i32* %32, null
br i1 %33, label %34, label %37
34: ; preds = %29
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.15, i64 0, i64 0), i8* %9)
%36 = call i32 @exit(i32 -1)
unreachable
37: ; preds = %29, %37
%38 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.30, i64 0, i64 0))
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.31, i64 0, i64 0))
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.18, i64 0, i64 0))
%41 = call i32 @gets(i8* %10)
%42 = call i64 @atol(i32 %41)
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.19, i64 0, i64 0))
%44 = call i32 @gets(i8* %10)
%45 = call i64 @atol(i32 %44)
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.20, i64 0, i64 0))
%47 = call i32 @gets(i8* %10)
%48 = call double @atof(i32 %47)
%49 = mul nsw i64 %42, 367
%50 = add nsw i64 %45, 9
%51 = sdiv i64 %50, 12
%52 = add nsw i64 %51, %42
%53 = mul nsw i64 %52, 7
%54 = sdiv i64 %53, -4
%55 = add nsw i64 %45, -9
%56 = sdiv i64 %55, 7
%57 = add nsw i64 %56, %42
%58 = sdiv i64 %57, 100
%59 = mul nsw i64 %58, 3
%60 = add nsw i64 %59, 3
%61 = sdiv i64 %60, -4
%62 = mul nsw i64 %45, 275
%63 = sdiv i64 %62, 9
%64 = add i64 %49, 1721029
%65 = add i64 %64, %63
%66 = add i64 %65, %54
%67 = add i64 %66, %61
%68 = sitofp i64 %67 to double
%69 = fadd double %48, %68
%70 = fadd double %69, -5.000000e-01
%71 = add nsw i64 %45, -1
%72 = shl i64 %71, 2
%73 = call i8* @llvm.load.relative.i64(i8* bitcast ([12 x i32]* @reltable.main to i8*), i64 %72)
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.21, i64 0, i64 0), i64 %42, i8* %73, double %48, double %70)
%75 = call i32 @interp(double %70, double* %18, i32* %32)
%76 = call i32 @r2d(double* %18, double* %19, i32* %7, double* %4, i32* %8, i32* %6, double* %5)
%77 = load i32, i32* %7
%78 = load double, double* %4
%79 = load i32, i32* %8
%80 = load i32, i32* %6
%81 = load double, double* %5
%82 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.22, i64 0, i64 0), i32 %77, double %78, i32 %79, i32 %80, double %81)
%83 = load double, double* %20
%84 = load double, double* %21
%85 = load double, double* %22
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.23, i64 0, i64 0), double %83, double %84, double %85)
%87 = load double, double* %23
%88 = load double, double* %24
%89 = load double, double* %25
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.24, i64 0, i64 0), double %87, double %88, double %89)
%91 = load double, double* %26
%92 = load double, double* %27
%93 = load double, double* %28
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.25, i64 0, i64 0), double %91, double %92, double %93)
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.26, i64 0, i64 0))
%96 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.27, i64 0, i64 0))
%97 = call i32 @gets(i8* %10)
%98 = call i32 @atoi(i32 %97)
%99 = icmp eq i32 %98, 1
br i1 %99, label %37, label %100
100: ; preds = %37
%101 = call i32 @fclose(i32* %32)
%102 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.28, i64 0, i64 0))
%103 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.27, i64 0, i64 0))
%104 = call i32 @gets(i8* %10)
%105 = call i32 @atoi(i32 %104)
%106 = icmp eq i32 %105, 1
br i1 %106, label %29, label %107
107: ; preds = %100
%108 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.32, i64 0, i64 0))
ret i32 0
}