#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 */
int M_PI;
double cos(double);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, ...);
scalar_t__ get_value(char *, double *);
scalar_t__ is_blank(char *);
int /*<<< orphan*/ shError(char *, ...);
double sin(double);
int /*<<< orphan*/ sprintf(char *, char *, char *, ...);
int sscanf(char *, char *, char *, char *, char *, char *, char *, char *,
           char *, char *, char *, char *, char *, char *, char *, char *,
           char *, char *, char *, char *, char *, char *);
int /*<<< orphan*/ stderr;
int proc_star_file(char *file, int racol, int deccol, double central_ra,
                   double central_dec, FILE *out_fp, int doASEC) {
  char line[300];
  char col[20 + 1][50 + 1];
  int i, ncol;
  int last_column = -1;
  double raval, decval;
  double cent_ra_rad, cent_dec_rad;
  double dec_rad;
  double delta_ra;
  double xx, yy, xi, eta;
  FILE *in_fp;
  if ((in_fp = fopen(file, "r")) == NULL) {
    shError("proc_star_file: can't open file %s for input", file);
    return (1);
  }
  last_column = (racol > deccol ? racol : deccol);
  cent_ra_rad = central_ra * (3.14159265359 / 180.0);
  cent_dec_rad = central_dec * (3.14159265359 / 180.0);
  while (fgets(line, 300, in_fp) != NULL) {
    if (line[0] == '#') {
      continue;
    }
    if (is_blank(line)) {
      continue;
    }
    if ((20 >= 20) != 1) {
      fprintf(stderr, "assertion fails in file %s, line %d\n",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/Starlink/match/refs/heads/master/"
              "project_coords.c",
              242);
      exit(1);
    };
    ncol = sscanf(line,
                  "%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s",
                  &(col[0][0]), &(col[1][0]), &(col[2][0]), &(col[3][0]),
                  &(col[4][0]), &(col[5][0]), &(col[6][0]), &(col[7][0]),
                  &(col[8][0]), &(col[9][0]), &(col[10][0]), &(col[11][0]),
                  &(col[12][0]), &(col[13][0]), &(col[14][0]), &(col[15][0]),
                  &(col[16][0]), &(col[17][0]), &(col[18][0]), &(col[19][0]));
    if (last_column > ncol) {
      shError("proc_star_file: not enough entries in following line; skipping");
      shError("  %s", line);
      continue;
    }
    if (get_value(col[racol], &raval) != 0) {
      shError("read_data_file: can't read RA value from %s; skipping",
              col[racol]);
      continue;
    }
    if (get_value(col[deccol], &decval) != 0) {
      shError("read_data_file: can't read Dec value from %s; skipping",
              col[deccol]);
      continue;
    }
    if ((raval < 10) && (central_ra > 350)) {
      delta_ra = (raval + 360) - central_ra;
    } else if ((raval > 350) && (central_ra < 10)) {
      delta_ra = (raval - 360) - central_ra;
    } else {
      delta_ra = raval - central_ra;
    }
    delta_ra *= (3.14159265359 / 180.0);
    dec_rad = decval * (3.14159265359 / 180.0);
    xx = cos(dec_rad) * sin(delta_ra);
    yy = sin(cent_dec_rad) * sin(dec_rad) +
         cos(cent_dec_rad) * cos(dec_rad) * cos(delta_ra);
    xi = (xx / yy);
    xx = cos(cent_dec_rad) * sin(dec_rad) -
         sin(cent_dec_rad) * cos(dec_rad) * cos(delta_ra);
    eta = (xx / yy);
    if (doASEC > 0) {
      xi *= (3600. * 180. / M_PI);
      eta *= (3600. * 180. / M_PI);
    }
    line[0] = '\0';
    for (i = 0; i < ncol; i++) {
      if (i == racol) {
        if (doASEC > 0) {
          sprintf(line, "%s %12.5f", line, xi);
        } else {
          sprintf(line, "%s %13.6e", line, xi);
        }
      } else if (i == deccol) {
        if (doASEC > 0) {
          sprintf(line, "%s %12.5f", line, eta);
        } else {
          sprintf(line, "%s %13.6e", line, eta);
        }
      } else {
        sprintf(line, "%s %s", line, col[i]);
      }
    }
    fprintf(out_fp, "%s\n", line);
  }
  fclose(in_fp);
  return (0);
}


x86 assembly (clang, -O0):
<proc_star_file>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x718,%rsp
mov    %rdi,-0x38(%rbp)
mov    %esi,-0x3c(%rbp)
mov    %edx,-0x40(%rbp)
movsd  %xmm0,-0x48(%rbp)
movsd  %xmm1,-0x50(%rbp)
mov    %rcx,-0x58(%rbp)
mov    %r8d,-0x5c(%rbp)
movl   $0xffffffff,-0x5cc(%rbp)
ff ff ff
mov    -0x38(%rbp),%rdi
lea    0xe33(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x628(%rbp)
cmp    $0x0,%rax
jne    1229 <proc_star_file+0x79>
mov    -0x38(%rbp),%rsi
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1030 <shError@plt>
movl   $0x1,-0x2c(%rbp)
jmp    1a05 <proc_star_file+0x855>
mov    -0x3c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jle    1243 <proc_star_file+0x93>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x62c(%rbp)
jmp    124c <proc_star_file+0x9c>
mov    -0x40(%rbp),%eax
mov    %eax,-0x62c(%rbp)
mov    -0x62c(%rbp),%eax
mov    %eax,-0x5cc(%rbp)
movsd  0xda0(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x5e8(%rbp)
ff
movsd  0xd8b(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x5f0(%rbp)
ff
lea    -0x190(%rbp),%rdi
mov    -0x628(%rbp),%rdx
mov    $0x12c,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     19f2 <proc_star_file+0x842>
movsbl -0x190(%rbp),%eax
cmp    $0x23,%eax
jne    12b9 <proc_star_file+0x109>
jmp    1282 <proc_star_file+0xd2>
lea    -0x190(%rbp),%rdi
call   1080 <is_blank@plt>
cmp    $0x0,%rax
je     12d4 <proc_star_file+0x124>
jmp    1282 <proc_star_file+0xd2>
lea    -0x190(%rbp),%rdi
lea    -0x5c0(%rbp),%rdx
lea    -0x5c0(%rbp),%rcx
add    $0x33,%rcx
lea    -0x5c0(%rbp),%r8
add    $0x66,%r8
lea    -0x5c0(%rbp),%r9
add    $0x99,%r9
lea    -0x5c0(%rbp),%rax
add    $0xcc,%rax
lea    -0x5c0(%rbp),%rsi
add    $0xff,%rsi
mov    %rsi,-0x670(%rbp)
lea    -0x5c0(%rbp),%rsi
add    $0x132,%rsi
mov    %rsi,-0x668(%rbp)
lea    -0x5c0(%rbp),%rsi
add    $0x165,%rsi
mov    %rsi,-0x660(%rbp)
lea    -0x5c0(%rbp),%rsi
add    $0x198,%rsi
mov    %rsi,-0x658(%rbp)
lea    -0x5c0(%rbp),%rsi
add    $0x1cb,%rsi
mov    %rsi,-0x650(%rbp)
lea    -0x5c0(%rbp),%rsi
add    $0x1fe,%rsi
mov    %rsi,-0x648(%rbp)
lea    -0x5c0(%rbp),%rsi
add    $0x231,%rsi
mov    %rsi,-0x640(%rbp)
lea    -0x5c0(%rbp),%r13
add    $0x264,%r13
lea    -0x5c0(%rbp),%r12
add    $0x297,%r12
lea    -0x5c0(%rbp),%r15
add    $0x2ca,%r15
lea    -0x5c0(%rbp),%r14
add    $0x2fd,%r14
lea    -0x5c0(%rbp),%rbx
add    $0x330,%rbx
lea    -0x5c0(%rbp),%r11
add    $0x363,%r11
lea    -0x5c0(%rbp),%r10
add    $0x396,%r10
lea    -0x5c0(%rbp),%rsi
add    $0x3c9,%rsi
mov    %rsi,-0x638(%rbp)
lea    0xc33(%rip),%rsi
mov    %rax,(%rsp)
mov    -0x670(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x668(%rbp),%rax
mov    %rax,0x10(%rsp)
mov    -0x660(%rbp),%rax
mov    %rax,0x18(%rsp)
mov    -0x658(%rbp),%rax
mov    %rax,0x20(%rsp)
mov    -0x650(%rbp),%rax
mov    %rax,0x28(%rsp)
mov    -0x648(%rbp),%rax
mov    %rax,0x30(%rsp)
mov    -0x640(%rbp),%rax
mov    %rax,0x38(%rsp)
mov    -0x638(%rbp),%rax
mov    %r13,0x40(%rsp)
mov    %r12,0x48(%rsp)
mov    %r15,0x50(%rsp)
mov    %r14,0x58(%rsp)
mov    %rbx,0x60(%rsp)
mov    %r11,0x68(%rsp)
mov    %r10,0x70(%rsp)
mov    %rax,0x78(%rsp)
call   1090 <sscanf@plt>
mov    %eax,-0x5c8(%rbp)
mov    -0x5cc(%rbp),%eax
cmp    -0x5c8(%rbp),%eax
jle    14f0 <proc_star_file+0x340>
lea    0xbc4(%rip),%rdi
mov    $0x0,%al
call   1030 <shError@plt>
lea    -0x190(%rbp),%rsi
lea    0xbee(%rip),%rdi
mov    $0x0,%al
call   1030 <shError@plt>
jmp    1282 <proc_star_file+0xd2>
movslq -0x3c(%rbp),%rax
lea    -0x5c0(%rbp),%rdi
imul   $0x33,%rax,%rax
add    %rax,%rdi
lea    -0x5d8(%rbp),%rsi
call   10a0 <get_value@plt>
cmp    $0x0,%rax
je     153d <proc_star_file+0x38d>
movslq -0x3c(%rbp),%rax
lea    -0x5c0(%rbp),%rsi
imul   $0x33,%rax,%rax
add    %rax,%rsi
lea    0xba6(%rip),%rdi
mov    $0x0,%al
call   1030 <shError@plt>
jmp    1282 <proc_star_file+0xd2>
movslq -0x40(%rbp),%rax
lea    -0x5c0(%rbp),%rdi
imul   $0x33,%rax,%rax
add    %rax,%rdi
lea    -0x5e0(%rbp),%rsi
call   10a0 <get_value@plt>
cmp    $0x0,%rax
je     158a <proc_star_file+0x3da>
movslq -0x40(%rbp),%rax
lea    -0x5c0(%rbp),%rsi
imul   $0x33,%rax,%rax
add    %rax,%rsi
lea    0xb8f(%rip),%rdi
mov    $0x0,%al
call   1030 <shError@plt>
jmp    1282 <proc_star_file+0xd2>
movsd  0xa76(%rip),%xmm0
ucomisd -0x5d8(%rbp),%xmm0
ff
jbe    15d9 <proc_star_file+0x429>
movsd  -0x48(%rbp),%xmm0
movsd  0xa63(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    15d9 <proc_star_file+0x429>
movsd  0xa59(%rip),%xmm0
addsd  -0x5d8(%rbp),%xmm0
ff
subsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x600(%rbp)
ff
jmp    1646 <proc_star_file+0x496>
movsd  -0x5d8(%rbp),%xmm0
ff
movsd  0xa27(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    162c <proc_star_file+0x47c>
movsd  0xa0d(%rip),%xmm0
ucomisd -0x48(%rbp),%xmm0
jbe    162c <proc_star_file+0x47c>
movsd  -0x5d8(%rbp),%xmm0
ff
movsd  0xa02(%rip),%xmm1
subsd  %xmm1,%xmm0
subsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x600(%rbp)
ff
jmp    1641 <proc_star_file+0x491>
movsd  -0x5d8(%rbp),%xmm0
ff
subsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x600(%rbp)
ff
jmp    1646 <proc_star_file+0x496>
movsd  0x9b2(%rip),%xmm0
mulsd  -0x600(%rbp),%xmm0
ff
movsd  %xmm0,-0x600(%rbp)
ff
movsd  0x99a(%rip),%xmm0
mulsd  -0x5e0(%rbp),%xmm0
ff
movsd  %xmm0,-0x5f8(%rbp)
ff
movsd  -0x5f8(%rbp),%xmm0
ff
call   10b0 <cos@plt>
movsd  %xmm0,-0x6b8(%rbp)
ff
movsd  -0x600(%rbp),%xmm0
ff
call   1070 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x6b8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x608(%rbp)
ff
movsd  -0x5f0(%rbp),%xmm0
ff
call   1070 <sin@plt>
movsd  %xmm0,-0x698(%rbp)
ff
movsd  -0x5f8(%rbp),%xmm0
ff
call   1070 <sin@plt>
movsd  %xmm0,-0x6a0(%rbp)
ff
movsd  -0x5f0(%rbp),%xmm0
ff
call   10b0 <cos@plt>
movsd  %xmm0,-0x6b0(%rbp)
ff
movsd  -0x5f8(%rbp),%xmm0
ff
call   10b0 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x6b0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x6a8(%rbp)
ff
movsd  -0x600(%rbp),%xmm0
ff
call   10b0 <cos@plt>
movsd  -0x6a8(%rbp),%xmm1
ff
movsd  -0x6a0(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x698(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x610(%rbp)
ff
movsd  -0x608(%rbp),%xmm0
ff
divsd  -0x610(%rbp),%xmm0
ff
movsd  %xmm0,-0x618(%rbp)
ff
movsd  -0x5f0(%rbp),%xmm0
ff
call   10b0 <cos@plt>
movsd  %xmm0,-0x678(%rbp)
ff
movsd  -0x5f8(%rbp),%xmm0
ff
call   1070 <sin@plt>
movsd  %xmm0,-0x680(%rbp)
ff
movsd  -0x5f0(%rbp),%xmm0
ff
call   1070 <sin@plt>
movsd  %xmm0,-0x690(%rbp)
ff
movsd  -0x5f8(%rbp),%xmm0
ff
call   10b0 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x690(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x688(%rbp)
ff
movsd  -0x600(%rbp),%xmm0
ff
call   10b0 <cos@plt>
movsd  -0x688(%rbp),%xmm1
ff
movsd  -0x680(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x678(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x608(%rbp)
ff
movsd  -0x608(%rbp),%xmm0
ff
divsd  -0x610(%rbp),%xmm0
ff
movsd  %xmm0,-0x620(%rbp)
ff
cmpl   $0x0,-0x5c(%rbp)
jle    188c <proc_star_file+0x6dc>
mov    0x27a3(%rip),%rax
cvtsi2sdl (%rax),%xmm1
movsd  0x7cf(%rip),%xmm0
divsd  %xmm1,%xmm0
mulsd  -0x618(%rbp),%xmm0
ff
movsd  %xmm0,-0x618(%rbp)
ff
mov    0x277c(%rip),%rax
cvtsi2sdl (%rax),%xmm1
movsd  0x7a8(%rip),%xmm0
divsd  %xmm1,%xmm0
mulsd  -0x620(%rbp),%xmm0
ff
movsd  %xmm0,-0x620(%rbp)
ff
movb   $0x0,-0x190(%rbp)
movl   $0x0,-0x5c4(%rbp)
mov    -0x5c4(%rbp),%eax
cmp    -0x5c8(%rbp),%eax
jge    19d4 <proc_star_file+0x824>
mov    -0x5c4(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jne    191a <proc_star_file+0x76a>
cmpl   $0x0,-0x5c(%rbp)
jle    18f1 <proc_star_file+0x741>
lea    -0x190(%rbp),%rdi
lea    -0x190(%rbp),%rdx
movsd  -0x618(%rbp),%xmm0
ff
lea    0x85f(%rip),%rsi
mov    $0x1,%al
call   10d0 <sprintf@plt>
jmp    1915 <proc_star_file+0x765>
lea    -0x190(%rbp),%rdi
lea    -0x190(%rbp),%rdx
movsd  -0x618(%rbp),%xmm0
ff
lea    0x840(%rip),%rsi
mov    $0x1,%al
call   10d0 <sprintf@plt>
jmp    19bb <proc_star_file+0x80b>
mov    -0x5c4(%rbp),%eax
cmp    -0x40(%rbp),%eax
jne    1985 <proc_star_file+0x7d5>
cmpl   $0x0,-0x5c(%rbp)
jle    195c <proc_star_file+0x7ac>
lea    -0x190(%rbp),%rdi
lea    -0x190(%rbp),%rdx
movsd  -0x620(%rbp),%xmm0
ff
lea    0x7f4(%rip),%rsi
mov    $0x1,%al
call   10d0 <sprintf@plt>
jmp    1980 <proc_star_file+0x7d0>
lea    -0x190(%rbp),%rdi
lea    -0x190(%rbp),%rdx
movsd  -0x620(%rbp),%xmm0
ff
lea    0x7d5(%rip),%rsi
mov    $0x1,%al
call   10d0 <sprintf@plt>
jmp    19b6 <proc_star_file+0x806>
lea    -0x190(%rbp),%rdi
lea    -0x190(%rbp),%rdx
movslq -0x5c4(%rbp),%rax
lea    -0x5c0(%rbp),%rcx
imul   $0x33,%rax,%rax
add    %rax,%rcx
lea    0x6de(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
jmp    19bb <proc_star_file+0x80b>
jmp    19c0 <proc_star_file+0x810>
mov    -0x5c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c4(%rbp)
jmp    189d <proc_star_file+0x6ed>
mov    -0x58(%rbp),%rdi
lea    -0x190(%rbp),%rdx
lea    0x772(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    1282 <proc_star_file+0xd2>
mov    -0x628(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x718,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc_star_file>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x658,%rsp
mov    %r8d,0x4(%rsp)
mov    %rcx,%rbx
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x38(%rsp)
mov    %edx,%r12d
mov    %esi,%r15d
mov    %rdi,%rbp
lea    0xe4b(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     1746 <proc_star_file+0x596>
mov    %rax,%r14
mov    %rbx,0x88(%rsp)
cmp    %r12d,%r15d
mov    %r12d,%r13d
cmovg  %r15d,%r13d
lea    0x520(%rsp),%rdi
mov    $0x12c,%esi
mov    %rax,%rdx
call   1050 <fgets@plt>
test   %rax,%rax
je     173a <proc_star_file+0x58a>
movsd  0x8(%rsp),%xmm0
mulsd  0xdcc(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movslq %r15d,%rax
imul   $0x33,%rax,%rax
add    %rsp,%rax
add    $0xf0,%rax
mov    %rax,0x98(%rsp)
movslq %r12d,%rax
imul   $0x33,%rax,%rax
add    %rsp,%rax
add    $0xf0,%rax
mov    %rax,0x90(%rsp)
mov    %r12d,%eax
mov    %r15d,%ecx
imul   $0x33,%rcx,%rcx
mov    %rcx,0xa8(%rsp)
imul   $0x33,%rax,%rax
mov    %rax,0xa0(%rsp)
movsd  0x38(%rsp),%xmm0
cmpltsd 0xd79(%rip),%xmm0
movapd %xmm0,0xe0(%rsp)
lea    0x354(%rsp),%rbp
lea    0x387(%rsp),%rbx
lea    0x520(%rsp),%r15
jmp    12f9 <proc_star_file+0x149>
lea    0xdda(%rip),%rdi
xor    %eax,%eax
call   1030 <shError@plt>
lea    0xe0b(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <shError@plt>
nopl   0x0(%rax)
mov    %r15,%rdi
mov    $0x12c,%esi
mov    %r14,%rdx
call   1050 <fgets@plt>
test   %rax,%rax
je     173a <proc_star_file+0x58a>
cmpb   $0x23,0x520(%rsp)
je     12e0 <proc_star_file+0x130>
mov    %r15,%rdi
call   1080 <is_blank@plt>
test   %rax,%rax
jne    12e0 <proc_star_file+0x130>
mov    %r15,%rdi
lea    0xd45(%rip),%rsi
lea    0xf0(%rsp),%rdx
lea    0x123(%rsp),%rcx
lea    0x156(%rsp),%r8
lea    0x189(%rsp),%r9
lea    0x4b9(%rsp),%rax
push   %rax
lea    0x48e(%rsp),%rax
push   %rax
lea    0x463(%rsp),%rax
push   %rax
lea    0x438(%rsp),%rax
push   %rax
lea    0x40d(%rsp),%rax
push   %rax
lea    0x3e2(%rsp),%rax
push   %rax
push   %rbx
push   %rbp
lea    0x361(%rsp),%rax
push   %rax
lea    0x336(%rsp),%rax
push   %rax
lea    0x30b(%rsp),%rax
push   %rax
lea    0x2e0(%rsp),%rax
push   %rax
lea    0x2b5(%rsp),%rax
push   %rax
lea    0x28a(%rsp),%rax
push   %rax
lea    0x25f(%rsp),%rax
push   %rax
lea    0x234(%rsp),%rax
push   %rax
call   1090 <sscanf@plt>
add    $0x80,%rsp
cmp    %eax,%r13d
jg     12ba <proc_star_file+0x10a>
mov    %eax,%r12d
mov    %r13d,%ebx
mov    0x98(%rsp),%r13
mov    %r13,%rdi
lea    0xb8(%rsp),%rsi
call   10a0 <get_value@plt>
test   %rax,%rax
je     1413 <proc_star_file+0x263>
lea    0xce6(%rip),%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1030 <shError@plt>
mov    %ebx,%r13d
lea    0x387(%rsp),%rbx
jmp    12e0 <proc_star_file+0x130>
mov    0x90(%rsp),%rbp
mov    %rbp,%rdi
lea    0xb0(%rsp),%rsi
call   10a0 <get_value@plt>
test   %rax,%rax
je     1449 <proc_star_file+0x299>
lea    0xcde(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1030 <shError@plt>
mov    %ebx,%r13d
jmp    1725 <proc_star_file+0x575>
movsd  0x38(%rsp),%xmm0
ucomisd 0xbb1(%rip),%xmm0
movsd  0xb8(%rsp),%xmm0
mov    %ebx,%r13d
jbe    1481 <proc_star_file+0x2d1>
movsd  0xba3(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1481 <proc_star_file+0x2d1>
addsd  0xba5(%rip),%xmm0
movapd %xmm0,%xmm1
jmp    14bb <proc_star_file+0x30b>
movapd %xmm0,%xmm1
addsd  0xb8b(%rip),%xmm1
movsd  0xb73(%rip),%xmm2
cmpltsd %xmm0,%xmm2
andpd  %xmm2,%xmm1
andnpd %xmm0,%xmm2
orpd   %xmm1,%xmm2
movapd 0xe0(%rsp),%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
subsd  0x38(%rsp),%xmm1
movsd  0xb37(%rip),%xmm2
mulsd  %xmm2,%xmm1
movapd %xmm1,0x40(%rsp)
movsd  0xb0(%rsp),%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x10(%rsp)
call   10b0 <cos@plt>
movsd  %xmm0,0x80(%rsp)
movaps 0x40(%rsp),%xmm0
call   1070 <sin@plt>
movaps %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   1070 <sin@plt>
movsd  %xmm0,0x78(%rsp)
movsd  0x10(%rsp),%xmm0
call   1070 <sin@plt>
movaps %xmm0,0xd0(%rsp)
movsd  0x8(%rsp),%xmm0
call   10b0 <cos@plt>
movsd  %xmm0,0x70(%rsp)
movsd  0x10(%rsp),%xmm0
call   10b0 <cos@plt>
movsd  %xmm0,0x60(%rsp)
movaps 0x40(%rsp),%xmm0
call   10b0 <cos@plt>
movsd  %xmm0,0x58(%rsp)
movsd  0x8(%rsp),%xmm0
call   10b0 <cos@plt>
movsd  %xmm0,0x68(%rsp)
movsd  0x10(%rsp),%xmm0
call   1070 <sin@plt>
movaps %xmm0,0xc0(%rsp)
movsd  0x8(%rsp),%xmm0
call   1070 <sin@plt>
movsd  %xmm0,0x50(%rsp)
movsd  0x10(%rsp),%xmm0
call   10b0 <cos@plt>
movsd  %xmm0,0x10(%rsp)
movapd 0x40(%rsp),%xmm0
call   10b0 <cos@plt>
movapd 0x20(%rsp),%xmm2
mulsd  0x80(%rsp),%xmm2
movsd  0x60(%rsp),%xmm1
mulsd  0x70(%rsp),%xmm1
mulsd  0x58(%rsp),%xmm1
movapd %xmm1,%xmm3
movapd 0xd0(%rsp),%xmm1
mulsd  0x78(%rsp),%xmm1
addsd  %xmm3,%xmm1
movsd  0x10(%rsp),%xmm3
mulsd  0x50(%rsp),%xmm3
mulsd  %xmm0,%xmm3
movapd 0xc0(%rsp),%xmm0
mulsd  0x68(%rsp),%xmm0
subsd  %xmm3,%xmm0
unpcklpd %xmm0,%xmm2
unpcklpd %xmm1,%xmm1
divpd  %xmm1,%xmm2
cmpl   $0x0,0x4(%rsp)
jle    163a <proc_star_file+0x48a>
mov    0x29c9(%rip),%rax
xorps  %xmm0,%xmm0
cvtsi2sdl (%rax),%xmm0
movsd  0x9fa(%rip),%xmm1
divsd  %xmm0,%xmm1
unpcklpd %xmm1,%xmm1
mulpd  %xmm1,%xmm2
movb   $0x0,0x520(%rsp)
test   %r12d,%r12d
jle    170c <proc_star_file+0x55c>
mov    %r12d,%eax
movapd %xmm2,%xmm0
unpckhpd %xmm2,%xmm0
movapd %xmm0,0x10(%rsp)
imul   $0x33,%rax,%rbx
xor    %ebp,%ebp
movapd %xmm2,0x20(%rsp)
jmp    169e <proc_star_file+0x4ee>
nopw   0x0(%rax,%rax,1)
lea    (%rsp,%rbp,1),%rcx
add    $0xf0,%rcx
mov    %r15,%rdi
lea    0xa10(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   10d0 <sprintf@plt>
movapd 0x20(%rsp),%xmm2
add    $0x33,%rbp
cmp    %rbp,%rbx
je     170c <proc_star_file+0x55c>
cmp    %rbp,0xa8(%rsp)
jne    16c0 <proc_star_file+0x510>
cmpl   $0x0,0x4(%rsp)
jle    16dd <proc_star_file+0x52d>
mov    %r15,%rdi
lea    0xa93(%rip),%rsi
jmp    16e7 <proc_star_file+0x537>
nopl   0x0(%rax,%rax,1)
cmp    %rbp,0xa0(%rsp)
jne    1670 <proc_star_file+0x4c0>
cmpl   $0x0,0x4(%rsp)
jle    16f0 <proc_star_file+0x540>
mov    %r15,%rdi
lea    0xa71(%rip),%rsi
jmp    16fa <proc_star_file+0x54a>
mov    %r15,%rdi
lea    0xa6f(%rip),%rsi
mov    %r15,%rdx
movapd %xmm2,%xmm0
jmp    1703 <proc_star_file+0x553>
mov    %r15,%rdi
lea    0xa5c(%rip),%rsi
mov    %r15,%rdx
movapd 0x10(%rsp),%xmm0
mov    $0x1,%al
call   10d0 <sprintf@plt>
jmp    168f <proc_star_file+0x4df>
mov    0x88(%rsp),%rdi
lea    0xa45(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0x354(%rsp),%rbp
lea    0x387(%rsp),%rbx
jmp    12e0 <proc_star_file+0x130>
mov    %r14,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
jmp    175c <proc_star_file+0x5ac>
lea    0x8e5(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1030 <shError@plt>
mov    $0x1,%eax
add    $0x658,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [45 x i8] c"proc_star_file: can't open file %s for input\00"
@.str.2 = [60 x i8] c"%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s\00"
@.str.3 = [63 x i8] c"proc_star_file: not enough entries in following line; skipping\00"
@.str.4 = [5 x i8] c" %s\00"
@.str.5 = [54 x i8] c"read_data_file: can't read RA value from %s; skipping\00"
@.str.6 = [55 x i8] c"read_data_file: can't read Dec value from %s; skipping\00"
@M_PI = global i32 0
@.str.7 = [10 x i8] c"%s %12.5f\00"
@.str.8 = [10 x i8] c"%s %13.6e\00"
@.str.9 = [6 x i8] c"%s %s\00"
@.str.10 = [4 x i8] c"%s\0A\00"
@stderr = global i32 0
define i32 @proc_star_file(i8* %0, i32 %1, i32 %2, double %3, double %4, i32* %5, i32 %6) {
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
%13 = alloca double
%14 = alloca i32*
%15 = alloca i32
%16 = alloca [300 x i8]
%17 = alloca [21 x [51 x i8]]
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%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 i32*
store i8* %0, i8** %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store double %3, double* %12
store double %4, double* %13
store i32* %5, i32** %14
store i32 %6, i32* %15
store i32 -1, i32* %20
%32 = load i8*, i8** %9
%33 = call i32* @fopen(i8* %32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %33, i32** %31
%34 = icmp eq i32* %33, null
br i1 %34, label %35, label %38
35: ; preds = %7
%36 = load i8*, i8** %9
%37 = call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* %36)
store i32 1, i32* %8
br label %289
38: ; preds = %7
%39 = load i32, i32* %10
%40 = load i32, i32* %11
%41 = icmp sgt i32 %39, %40
br i1 %41, label %42, label %44
42: ; preds = %38
%43 = load i32, i32* %10
br label %46
44: ; preds = %38
%45 = load i32, i32* %11
br label %46
46: ; preds = %44, %42
%47 = phi i32 [ %43, %42 ], [ %45, %44 ]
store i32 %47, i32* %20
%48 = load double, double* %12
%49 = fmul double %48, 0x3F91DF46A2529E84
store double %49, double* %23
%50 = load double, double* %13
%51 = fmul double %50, 0x3F91DF46A2529E84
store double %51, double* %24
br label %52
52: ; preds = %282, %138, %125, %114, %67, %62, %46
%53 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%54 = load i32*, i32** %31
%55 = call i32* @fgets(i8* %53, i32 300, i32* %54)
%56 = icmp ne i32* %55, null
br i1 %56, label %57, label %286
57: ; preds = %52
%58 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%59 = load i8, i8* %58
%60 = sext i8 %59 to i32
%61 = icmp eq i32 %60, 35
br i1 %61, label %62, label %63
62: ; preds = %57
br label %52
63: ; preds = %57
%64 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%65 = call i64 @is_blank(i8* %64)
%66 = icmp ne i64 %65, 0
br i1 %66, label %67, label %68
67: ; preds = %63
br label %52
68: ; preds = %63
%69 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%70 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 0
%71 = getelementptr inbounds [51 x i8], [51 x i8]* %70, i64 0, i64 0
%72 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 1
%73 = getelementptr inbounds [51 x i8], [51 x i8]* %72, i64 0, i64 0
%74 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 2
%75 = getelementptr inbounds [51 x i8], [51 x i8]* %74, i64 0, i64 0
%76 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 3
%77 = getelementptr inbounds [51 x i8], [51 x i8]* %76, i64 0, i64 0
%78 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 4
%79 = getelementptr inbounds [51 x i8], [51 x i8]* %78, i64 0, i64 0
%80 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 5
%81 = getelementptr inbounds [51 x i8], [51 x i8]* %80, i64 0, i64 0
%82 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 6
%83 = getelementptr inbounds [51 x i8], [51 x i8]* %82, i64 0, i64 0
%84 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 7
%85 = getelementptr inbounds [51 x i8], [51 x i8]* %84, i64 0, i64 0
%86 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 8
%87 = getelementptr inbounds [51 x i8], [51 x i8]* %86, i64 0, i64 0
%88 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 9
%89 = getelementptr inbounds [51 x i8], [51 x i8]* %88, i64 0, i64 0
%90 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 10
%91 = getelementptr inbounds [51 x i8], [51 x i8]* %90, i64 0, i64 0
%92 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 11
%93 = getelementptr inbounds [51 x i8], [51 x i8]* %92, i64 0, i64 0
%94 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 12
%95 = getelementptr inbounds [51 x i8], [51 x i8]* %94, i64 0, i64 0
%96 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 13
%97 = getelementptr inbounds [51 x i8], [51 x i8]* %96, i64 0, i64 0
%98 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 14
%99 = getelementptr inbounds [51 x i8], [51 x i8]* %98, i64 0, i64 0
%100 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 15
%101 = getelementptr inbounds [51 x i8], [51 x i8]* %100, i64 0, i64 0
%102 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 16
%103 = getelementptr inbounds [51 x i8], [51 x i8]* %102, i64 0, i64 0
%104 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 17
%105 = getelementptr inbounds [51 x i8], [51 x i8]* %104, i64 0, i64 0
%106 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 18
%107 = getelementptr inbounds [51 x i8], [51 x i8]* %106, i64 0, i64 0
%108 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 19
%109 = getelementptr inbounds [51 x i8], [51 x i8]* %108, i64 0, i64 0
%110 = call i32 @sscanf(i8* %69, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0), i8* %71, i8* %73, i8* %75, i8* %77, i8* %79, i8* %81, i8* %83, i8* %85, i8* %87, i8* %89, i8* %91, i8* %93, i8* %95, i8* %97, i8* %99, i8* %101, i8* %103, i8* %105, i8* %107, i8* %109)
store i32 %110, i32* %19
%111 = load i32, i32* %20
%112 = load i32, i32* %19
%113 = icmp sgt i32 %111, %112
br i1 %113, label %114, label %118
114: ; preds = %68
%115 = call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0))
%116 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%117 = call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %116)
br label %52
118: ; preds = %68
%119 = load i32, i32* %10
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 %120
%122 = getelementptr inbounds [51 x i8], [51 x i8]* %121, i64 0, i64 0
%123 = call i64 @get_value(i8* %122, double* %21)
%124 = icmp ne i64 %123, 0
br i1 %124, label %125, label %131
125: ; preds = %118
%126 = load i32, i32* %10
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 %127
%129 = getelementptr inbounds [51 x i8], [51 x i8]* %128, i64 0, i64 0
%130 = call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.5, i64 0, i64 0), i8* %129)
br label %52
131: ; preds = %118
%132 = load i32, i32* %11
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 %133
%135 = getelementptr inbounds [51 x i8], [51 x i8]* %134, i64 0, i64 0
%136 = call i64 @get_value(i8* %135, double* %22)
%137 = icmp ne i64 %136, 0
br i1 %137, label %138, label %144
138: ; preds = %131
%139 = load i32, i32* %11
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 %140
%142 = getelementptr inbounds [51 x i8], [51 x i8]* %141, i64 0, i64 0
%143 = call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.6, i64 0, i64 0), i8* %142)
br label %52
144: ; preds = %131
%145 = load double, double* %21
%146 = fcmp olt double %145, 1.000000e+01
br i1 %146, label %147, label %155
147: ; preds = %144
%148 = load double, double* %12
%149 = fcmp ogt double %148, 3.500000e+02
br i1 %149, label %150, label %155
150: ; preds = %147
%151 = load double, double* %21
%152 = fadd double %151, 3.600000e+02
%153 = load double, double* %12
%154 = fsub double %152, %153
store double %154, double* %26
br label %171
155: ; preds = %147, %144
%156 = load double, double* %21
%157 = fcmp ogt double %156, 3.500000e+02
br i1 %157, label %158, label %166
158: ; preds = %155
%159 = load double, double* %12
%160 = fcmp olt double %159, 1.000000e+01
br i1 %160, label %161, label %166
161: ; preds = %158
%162 = load double, double* %21
%163 = fsub double %162, 3.600000e+02
%164 = load double, double* %12
%165 = fsub double %163, %164
store double %165, double* %26
br label %170
166: ; preds = %158, %155
%167 = load double, double* %21
%168 = load double, double* %12
%169 = fsub double %167, %168
store double %169, double* %26
br label %170
170: ; preds = %166, %161
br label %171
171: ; preds = %170, %150
%172 = load double, double* %26
%173 = fmul double %172, 0x3F91DF46A2529E84
store double %173, double* %26
%174 = load double, double* %22
%175 = fmul double %174, 0x3F91DF46A2529E84
store double %175, double* %25
%176 = load double, double* %25
%177 = call double @cos(double %176)
%178 = load double, double* %26
%179 = call double @sin(double %178)
%180 = fmul double %177, %179
store double %180, double* %27
%181 = load double, double* %24
%182 = call double @sin(double %181)
%183 = load double, double* %25
%184 = call double @sin(double %183)
%185 = load double, double* %24
%186 = call double @cos(double %185)
%187 = load double, double* %25
%188 = call double @cos(double %187)
%189 = fmul double %186, %188
%190 = load double, double* %26
%191 = call double @cos(double %190)
%192 = fmul double %189, %191
%193 = call double @llvm.fmuladd.f64(double %182, double %184, double %192)
store double %193, double* %28
%194 = load double, double* %27
%195 = load double, double* %28
%196 = fdiv double %194, %195
store double %196, double* %29
%197 = load double, double* %24
%198 = call double @cos(double %197)
%199 = load double, double* %25
%200 = call double @sin(double %199)
%201 = load double, double* %24
%202 = call double @sin(double %201)
%203 = load double, double* %25
%204 = call double @cos(double %203)
%205 = fmul double %202, %204
%206 = load double, double* %26
%207 = call double @cos(double %206)
%208 = fmul double %205, %207
%209 = fneg double %208
%210 = call double @llvm.fmuladd.f64(double %198, double %200, double %209)
store double %210, double* %27
%211 = load double, double* %27
%212 = load double, double* %28
%213 = fdiv double %211, %212
store double %213, double* %30
%214 = load i32, i32* %15
%215 = icmp sgt i32 %214, 0
br i1 %215, label %216, label %227
216: ; preds = %171
%217 = load i32, i32* @M_PI
%218 = sitofp i32 %217 to double
%219 = fdiv double 6.480000e+05, %218
%220 = load double, double* %29
%221 = fmul double %220, %219
store double %221, double* %29
%222 = load i32, i32* @M_PI
%223 = sitofp i32 %222 to double
%224 = fdiv double 6.480000e+05, %223
%225 = load double, double* %30
%226 = fmul double %225, %224
store double %226, double* %30
br label %227
227: ; preds = %216, %171
%228 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
store i8 0, i8* %228
store i32 0, i32* %18
br label %229
229: ; preds = %279, %227
%230 = load i32, i32* %18
%231 = load i32, i32* %19
%232 = icmp slt i32 %230, %231
br i1 %232, label %233, label %282
233: ; preds = %229
%234 = load i32, i32* %18
%235 = load i32, i32* %10
%236 = icmp eq i32 %234, %235
br i1 %236, label %237, label %251
237: ; preds = %233
%238 = load i32, i32* %15
%239 = icmp sgt i32 %238, 0
br i1 %239, label %240, label %245
240: ; preds = %237
%241 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%242 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%243 = load double, double* %29
%244 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %241, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8* %242, double %243)
br label %250
245: ; preds = %237
%246 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%247 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%248 = load double, double* %29
%249 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %246, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i8* %247, double %248)
br label %250
250: ; preds = %245, %240
br label %278
251: ; preds = %233
%252 = load i32, i32* %18
%253 = load i32, i32* %11
%254 = icmp eq i32 %252, %253
br i1 %254, label %255, label %269
255: ; preds = %251
%256 = load i32, i32* %15
%257 = icmp sgt i32 %256, 0
br i1 %257, label %258, label %263
258: ; preds = %255
%259 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%260 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%261 = load double, double* %30
%262 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %259, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8* %260, double %261)
br label %268
263: ; preds = %255
%264 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%265 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%266 = load double, double* %30
%267 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %264, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i8* %265, double %266)
br label %268
268: ; preds = %263, %258
br label %277
269: ; preds = %251
%270 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%271 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%272 = load i32, i32* %18
%273 = sext i32 %272 to i64
%274 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %17, i64 0, i64 %273
%275 = getelementptr inbounds [51 x i8], [51 x i8]* %274, i64 0, i64 0
%276 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %270, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* %271, i8* %275)
br label %277
277: ; preds = %269, %268
br label %278
278: ; preds = %277, %250
br label %279
279: ; preds = %278
%280 = load i32, i32* %18
%281 = add nsw i32 %280, 1
store i32 %281, i32* %18
br label %229
282: ; preds = %229
%283 = load i32*, i32** %14
%284 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%285 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %283, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %284)
br label %52
286: ; preds = %52
%287 = load i32*, i32** %31
%288 = call i32 @fclose(i32* %287)
store i32 0, i32* %8
br label %289
289: ; preds = %286, %35
%290 = load i32, i32* %8
ret i32 %290
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [45 x i8] c"proc_star_file: can't open file %s for input\00"
@.str.2 = [60 x i8] c"%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s\00"
@.str.3 = [63 x i8] c"proc_star_file: not enough entries in following line; skipping\00"
@.str.4 = [5 x i8] c" %s\00"
@.str.5 = [54 x i8] c"read_data_file: can't read RA value from %s; skipping\00"
@.str.6 = [55 x i8] c"read_data_file: can't read Dec value from %s; skipping\00"
@M_PI = global i32 0
@.str.7 = [10 x i8] c"%s %12.5f\00"
@.str.8 = [10 x i8] c"%s %13.6e\00"
@.str.9 = [6 x i8] c"%s %s\00"
@.str.10 = [4 x i8] c"%s\0A\00"
@stderr = global i32 0
define i32 @proc_star_file(i8* %0, i32 %1, i32 %2, double %3, double %4, i32* nocapture %5, i32 %6) {
%8 = alloca [300 x i8]
%9 = alloca [21 x [51 x i8]]
%10 = alloca double
%11 = alloca double
%12 = getelementptr inbounds [300 x i8], [300 x i8]* %8, i64 0, i64 0
%13 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 0, i64 0
%14 = bitcast double* %10 to i8*
%15 = bitcast double* %11 to i8*
%16 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%17 = icmp eq i32* %16, null
br i1 %17, label %18, label %20
18: ; preds = %7
%19 = tail call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %163
20: ; preds = %7
%21 = icmp sgt i32 %1, %2
%22 = select i1 %21, i32 %1, i32 %2
%23 = fmul double %4, 0x3F91DF46A2529E84
%24 = call i32* @fgets(i8* %12, i32 300, i32* %16)
%25 = icmp eq i32* %24, null
br i1 %25, label %161, label %26
26: ; preds = %20
%27 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 1, i64 0
%28 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 2, i64 0
%29 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 3, i64 0
%30 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 4, i64 0
%31 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 5, i64 0
%32 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 6, i64 0
%33 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 7, i64 0
%34 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 8, i64 0
%35 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 9, i64 0
%36 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 10, i64 0
%37 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 11, i64 0
%38 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 12, i64 0
%39 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 13, i64 0
%40 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 14, i64 0
%41 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 15, i64 0
%42 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 16, i64 0
%43 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 17, i64 0
%44 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 18, i64 0
%45 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 19, i64 0
%46 = sext i32 %1 to i64
%47 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 %46, i64 0
%48 = sext i32 %2 to i64
%49 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 %48, i64 0
%50 = fcmp ogt double %3, 3.500000e+02
%51 = fcmp olt double %3, 1.000000e+01
%52 = icmp sgt i32 %6, 0
%53 = zext i32 %2 to i64
%54 = zext i32 %1 to i64
br label %55
55: ; preds = %26, %67
%56 = load i8, i8* %12
%57 = icmp eq i8 %56, 35
br i1 %57, label %67, label %58
58: ; preds = %55
%59 = call i64 @is_blank(i8* %12)
%60 = icmp eq i64 %59, 0
br i1 %60, label %61, label %67
61: ; preds = %58
%62 = call i32 @sscanf(i8* %12, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0), i8* %13, i8* %27, i8* %28, i8* %29, i8* %30, i8* %31, i8* %32, i8* %33, i8* %34, i8* %35, i8* %36, i8* %37, i8* %38, i8* %39, i8* %40, i8* %41, i8* %42, i8* %43, i8* %44, i8* %45)
%63 = icmp sgt i32 %22, %62
br i1 %63, label %64, label %70
64: ; preds = %61
%65 = call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0))
%66 = call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %12)
br label %67
67: ; preds = %64, %73, %78, %159, %55, %58
%68 = call i32* @fgets(i8* %12, i32 300, i32* %16)
%69 = icmp eq i32* %68, null
br i1 %69, label %161, label %55
70: ; preds = %61
%71 = call i64 @get_value(i8* %47, double* %10)
%72 = icmp eq i64 %71, 0
br i1 %72, label %75, label %73
73: ; preds = %70
%74 = call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.5, i64 0, i64 0), i8* %47)
br label %67
75: ; preds = %70
%76 = call i64 @get_value(i8* %49, double* %11)
%77 = icmp eq i64 %76, 0
br i1 %77, label %80, label %78
78: ; preds = %75
%79 = call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.6, i64 0, i64 0), i8* %49)
br label %67
80: ; preds = %75
%81 = load double, double* %10
%82 = fcmp olt double %81, 1.000000e+01
%83 = and i1 %50, %82
br i1 %83, label %84, label %86
84: ; preds = %80
%85 = fadd double %81, 3.600000e+02
br label %91
86: ; preds = %80
%87 = fcmp ogt double %81, 3.500000e+02
%88 = and i1 %51, %87
%89 = fadd double %81, -3.600000e+02
%90 = select i1 %88, double %89, double %81
br label %91
91: ; preds = %86, %84
%92 = phi double [ %85, %84 ], [ %90, %86 ]
%93 = fsub double %92, %3
%94 = fmul double %93, 0x3F91DF46A2529E84
%95 = load double, double* %11
%96 = fmul double %95, 0x3F91DF46A2529E84
%97 = call double @cos(double %96)
%98 = call double @sin(double %94)
%99 = fmul double %97, %98
%100 = call double @sin(double %23)
%101 = call double @sin(double %96)
%102 = call double @cos(double %23)
%103 = call double @cos(double %96)
%104 = fmul double %102, %103
%105 = call double @cos(double %94)
%106 = fmul double %104, %105
%107 = call double @llvm.fmuladd.f64(double %100, double %101, double %106)
%108 = call double @cos(double %23)
%109 = call double @sin(double %96)
%110 = call double @sin(double %23)
%111 = call double @cos(double %96)
%112 = call double @cos(double %94)
%113 = fneg double %110
%114 = fmul double %111, %113
%115 = fmul double %114, %112
%116 = call double @llvm.fmuladd.f64(double %108, double %109, double %115)
%117 = insertelement <2 x double> poison, double %99, i64 0
%118 = insertelement <2 x double> %117, double %116, i64 1
%119 = insertelement <2 x double> poison, double %107, i64 0
%120 = shufflevector <2 x double> %119, <2 x double> poison, <2 x i32> zeroinitializer
%121 = fdiv <2 x double> %118, %120
br i1 %52, label %122, label %129
122: ; preds = %91
%123 = load i32, i32* @M_PI
%124 = sitofp i32 %123 to double
%125 = fdiv double 6.480000e+05, %124
%126 = insertelement <2 x double> poison, double %125, i64 0
%127 = shufflevector <2 x double> %126, <2 x double> poison, <2 x i32> zeroinitializer
%128 = fmul <2 x double> %121, %127
br label %129
129: ; preds = %122, %91
%130 = phi <2 x double> [ %128, %122 ], [ %121, %91 ]
store i8 0, i8* %12
%131 = icmp sgt i32 %62, 0
br i1 %131, label %132, label %159
132: ; preds = %129
%133 = zext i32 %62 to i64
%134 = extractelement <2 x double> %130, i64 1
%135 = extractelement <2 x double> %130, i64 1
%136 = extractelement <2 x double> %130, i64 0
%137 = extractelement <2 x double> %130, i64 0
br label %138
138: ; preds = %132, %156
%139 = phi i64 [ 0, %132 ], [ %157, %156 ]
%140 = icmp eq i64 %139, %54
br i1 %140, label %141, label %146
141: ; preds = %138
br i1 %52, label %142, label %144
142: ; preds = %141
%143 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %12, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8* %12, double %137)
br label %156
144: ; preds = %141
%145 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %12, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i8* %12, double %136)
br label %156
146: ; preds = %138
%147 = icmp eq i64 %139, %53
br i1 %147, label %148, label %153
148: ; preds = %146
br i1 %52, label %149, label %151
149: ; preds = %148
%150 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %12, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8* %12, double %135)
br label %156
151: ; preds = %148
%152 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %12, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i8* %12, double %134)
br label %156
153: ; preds = %146
%154 = getelementptr inbounds [21 x [51 x i8]], [21 x [51 x i8]]* %9, i64 0, i64 %139, i64 0
%155 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %12, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* %12, i8* %154)
br label %156
156: ; preds = %144, %142, %149, %151, %153
%157 = add nuw nsw i64 %139, 1
%158 = icmp eq i64 %157, %133
br i1 %158, label %159, label %138
159: ; preds = %156, %129
%160 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %12)
br label %67
161: ; preds = %67, %20
%162 = call i32 @fclose(i32* %16)
br label %163
163: ; preds = %161, %18
%164 = phi i32 [ 1, %18 ], [ 0, %161 ]
ret i32 %164
}