#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 BUFSIZ;
double M_PI;
double atan2(double, double);
double cos(double);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
double sin(double);
double sqrt(int);
int /*<<< orphan*/ sscanf(char *, char *, ...);
scalar_t__ strncmp(char *, char *, int);
int main(int argc, char *argv[]) {
  char key[10] = "";
  FILE *fp;
  char buffer[81] = "";
  char val[70] = "";
  int i, j;
  char flag = 0;
  double a1 = 1.7330e-4, a3 = -2.09e-7, a5 = 7.95e-10;
  int hh, dd, mm;
  float ss;
  double ZD0 = -1., ZD1 = -1.;
  double LST0 = -1., LST1 = -1.;
  double LST;
  double RA, DEC;
  char telname[BUFSIZ];
  double LATI, ZD, a, b, c, COSA, SINA, E, A;
  if (argc != 2) {
    printf("Usage: airmass2 FITS [dtheta]\n");
    exit(-1);
  }
  fp = fopen(argv[1], "r");
  if (NULL == fp) {
    printf("Cannot find file \"%s\"\n", argv[1]);
    exit(-1);
  }
  while (!feof(fp)) {
    if (80 != fread(buffer, 1, 80, fp)) {
      exit(-1);
    }
    if (strncmp("END     ", buffer, 8) == 0) {
      break;
    } else if (strncmp("LST-STR =", buffer, 9) == 0) {
      sscanf(buffer + 9, "%*[ \']%2d%*[:]%2d%*[:]%f", &hh, &mm, &ss);
      LST = (double)hh + (double)mm / 60. + ss / 3600.;
    } else if (strncmp("ZD-STR  =", buffer, 9) == 0) {
      sscanf(buffer + 9, "%lf", &ZD0);
    } else if (strncmp("ZD-END  =", buffer, 9) == 0) {
      sscanf(buffer + 9, "%lf", &ZD1);
    } else if (strncmp("RA      =", buffer, 9) == 0) {
      sscanf(buffer + 9, "%*[ \']%2d%*[:]%2d%*[:]%f", &hh, &mm, &ss);
      RA = (double)hh + (double)mm / 60. + ss / 3600.;
    } else if (strncmp("DEC     =", buffer, 9) == 0) {
      sscanf(buffer + 9, "%*[ \']%c%2d%*[:]%2d%*[:]%f", &flag, &dd, &mm, &ss);
      if (flag == '-')
        DEC = -((double)dd + (double)mm / 60. + ss / 3600.);
      else
        DEC = ((double)dd + (double)mm / 60. + ss / 3600.);
    } else if (strncmp("TELESCOP=", buffer, 9) == 0) {
      sscanf(buffer + 9, "%s", telname);
      if ((strncmp(telname, "'Subaru", 7) != 0) &&
          (strncmp(telname, "'SUBARU", 7) != 0)) {
        printf(" Error: TELESCOP=%s is not supported. quit.\n", telname);
        exit(-1);
      } else {
        LATI = +19. + 49. / 60. + 42.6 / 3600.;
      }
    }
  }
  if (ZD0 > 0 && ZD1 > 0) {
    ZD = 0.5 * (ZD0 + ZD1);
  }
  a = (90.0 - LATI) * M_PI / 180.0;
  b = ZD * M_PI / 180.0;
  c = (90.0 - DEC) * M_PI / 180.0;
  if (b == 0) {
    printf(" Error: Cannot calculate. ZD=0.\n");
    exit(-1);
  }
  if (c == 0) {
    printf(" Error: Cannot calculate. Dec=90.\n");
    exit(-1);
  }
  COSA = (cos(a) - cos(b) * cos(c)) / (sin(b) * sin(c));
  SINA = sqrt(1 - COSA * COSA);
  E = RA - LST + 24.0;
  while (E > 12.0) {
    E -= 24.0;
  }
  if (E > 0) {
    SINA = -SINA;
  };
  A = atan2(SINA, COSA) / M_PI * 180;
  printf("%f %f\n", A, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movw   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movaps %xmm0,-0x1b0(%rbp)
movaps %xmm0,-0x40(%rbp)
movaps %xmm0,-0x50(%rbp)
movaps %xmm0,-0x60(%rbp)
movaps %xmm0,-0x70(%rbp)
movaps %xmm0,-0x80(%rbp)
movb   $0x0,-0x30(%rbp)
movaps %xmm0,-0xa0(%rbp)
movaps %xmm0,-0xb0(%rbp)
movaps %xmm0,-0xc0(%rbp)
movaps %xmm0,-0xd0(%rbp)
movq   $0x0,-0x92(%rbp)
movb   $0x0,-0xd9(%rbp)
movabs $0x3f26b6fbaa2fe9d3,%rax
b6 26 3f
mov    %rax,-0xe8(%rbp)
movabs $0xbe8c0d2f710f6a5f,%rax
0d 8c be
mov    %rax,-0xf0(%rbp)
movabs $0x3e0b50e4da14caf2,%rax
50 0b 3e
mov    %rax,-0xf8(%rbp)
movabs $0xbff0000000000000,%rax
mov    %rax,-0x110(%rbp)
mov    %rax,-0x118(%rbp)
mov    %rax,-0x120(%rbp)
mov    %rax,-0x128(%rbp)
mov    0x2d51(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x148(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1a0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x150(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     12d7 <main+0x127>
lea    0xd82(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd81(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x28(%rbp)
xor    %eax,%eax
cmp    -0x28(%rbp),%rax
jne    131b <main+0x16b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xd5f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>
jmp    1320 <main+0x170>
mov    -0x28(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    133e <main+0x18e>
jmp    171b <main+0x56b>
lea    -0x80(%rbp),%rdi
mov    -0x28(%rbp),%rcx
mov    $0x1,%esi
mov    $0x50,%edx
call   1040 <fread@plt>
mov    %eax,%ecx
mov    $0x50,%eax
cmp    %ecx,%eax
je     136e <main+0x1be>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>
lea    -0x80(%rbp),%rsi
lea    0xd07(%rip),%rdi
mov    $0x8,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1392 <main+0x1e2>
jmp    171b <main+0x56b>
lea    -0x80(%rbp),%rsi
lea    0xcec(%rip),%rdi
mov    $0x9,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1425 <main+0x275>
lea    -0x80(%rbp),%rdi
add    $0x9,%rdi
lea    0xcd3(%rip),%rsi
lea    -0xfc(%rbp),%rdx
lea    -0x104(%rbp),%rcx
lea    -0x108(%rbp),%r8
mov    $0x0,%al
call   1090 <sscanf@plt>
cvtsi2sdl -0xfc(%rbp),%xmm0
ff
cvtsi2sdl -0x104(%rbp),%xmm1
ff
movsd  0xc1c(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movss  -0x108(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
movsd  0xbf8(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
jmp    1711 <main+0x561>
lea    -0x80(%rbp),%rsi
lea    0xc7c(%rip),%rdi
mov    $0x9,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1466 <main+0x2b6>
lea    -0x80(%rbp),%rdi
add    $0x9,%rdi
lea    0xc63(%rip),%rsi
lea    -0x110(%rbp),%rdx
mov    $0x0,%al
call   1090 <sscanf@plt>
jmp    170c <main+0x55c>
lea    -0x80(%rbp),%rsi
lea    0xc49(%rip),%rdi
mov    $0x9,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    14a7 <main+0x2f7>
lea    -0x80(%rbp),%rdi
add    $0x9,%rdi
lea    0xc22(%rip),%rsi
lea    -0x118(%rbp),%rdx
mov    $0x0,%al
call   1090 <sscanf@plt>
jmp    1707 <main+0x557>
lea    -0x80(%rbp),%rsi
lea    0xc12(%rip),%rdi
mov    $0x9,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    153a <main+0x38a>
lea    -0x80(%rbp),%rdi
add    $0x9,%rdi
lea    0xbbe(%rip),%rsi
lea    -0xfc(%rbp),%rdx
lea    -0x104(%rbp),%rcx
lea    -0x108(%rbp),%r8
mov    $0x0,%al
call   1090 <sscanf@plt>
cvtsi2sdl -0xfc(%rbp),%xmm0
ff
cvtsi2sdl -0x104(%rbp),%xmm1
movsd  0xb07(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movss  -0x108(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
movsd  0xae3(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
jmp    1702 <main+0x552>
lea    -0x80(%rbp),%rsi
lea    0xb89(%rip),%rdi
mov    $0x9,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1644 <main+0x494>
lea    -0x80(%rbp),%rdi
add    $0x9,%rdi
lea    0xb70(%rip),%rsi
lea    -0xd9(%rbp),%rdx
lea    -0x100(%rbp),%rcx
lea    -0x104(%rbp),%r8
lea    -0x108(%rbp),%r9
mov    $0x0,%al
call   1090 <sscanf@plt>
movsbl -0xd9(%rbp),%eax
cmp    $0x2d,%eax
jne    15fb <main+0x44b>
cvtsi2sdl -0x100(%rbp),%xmm0
ff
cvtsi2sdl -0x104(%rbp),%xmm1
ff
movsd  0xa5d(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movss  -0x108(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
movsd  0xa39(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
jmp    163f <main+0x48f>
cvtsi2sdl -0x100(%rbp),%xmm0
ff
cvtsi2sdl -0x104(%rbp),%xmm1
ff
movsd  0x9fd(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movss  -0x108(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
movsd  0x9d9(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
jmp    16fd <main+0x54d>
lea    -0x80(%rbp),%rsi
lea    0xaa4(%rip),%rdi
mov    $0x9,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    16f8 <main+0x548>
mov    -0x1a0(%rbp),%rdx
lea    -0x80(%rbp),%rdi
add    $0x9,%rdi
lea    0xa84(%rip),%rsi
mov    $0x0,%al
call   1090 <sscanf@plt>
mov    -0x1a0(%rbp),%rdi
lea    0xa72(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     16e3 <main+0x533>
mov    -0x1a0(%rbp),%rdi
lea    0xa58(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     16e3 <main+0x533>
mov    -0x1a0(%rbp),%rsi
lea    0xa3e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>
movsd  0x915(%rip),%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
jmp    16f8 <main+0x548>
jmp    16fd <main+0x54d>
jmp    1702 <main+0x552>
jmp    1707 <main+0x557>
jmp    170c <main+0x55c>
jmp    1711 <main+0x561>
jmp    1716 <main+0x566>
jmp    1320 <main+0x170>
movsd  -0x110(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1769 <main+0x5b9>
movsd  -0x118(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1769 <main+0x5b9>
movsd  -0x110(%rbp),%xmm1
ff
addsd  -0x118(%rbp),%xmm1
ff
movsd  0x8bb(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x160(%rbp)
ff
movsd  0x8b7(%rip),%xmm0
subsd  -0x158(%rbp),%xmm0
ff
mov    0x2868(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0x894(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
movsd  -0x160(%rbp),%xmm0
ff
mov    0x2841(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0x86d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x170(%rbp)
ff
movsd  0x861(%rip),%xmm0
subsd  -0x140(%rbp),%xmm0
ff
mov    0x2812(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0x83e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x178(%rbp)
ff
movsd  -0x170(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1821 <main+0x671>
jp     1821 <main+0x671>
lea    0x92d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>
movsd  -0x178(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1854 <main+0x6a4>
jp     1854 <main+0x6a4>
lea    0x91b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>
movsd  -0x168(%rbp),%xmm0
ff
call   10a0 <cos@plt>
movsd  %xmm0,-0x1d0(%rbp)
ff
movsd  -0x170(%rbp),%xmm0
ff
call   10a0 <cos@plt>
movsd  %xmm0,-0x1c8(%rbp)
ff
movsd  -0x178(%rbp),%xmm0
ff
call   10a0 <cos@plt>
movsd  -0x1d0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x1c8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1b8(%rbp)
ff
movsd  -0x170(%rbp),%xmm0
ff
call   1080 <sin@plt>
movsd  %xmm0,-0x1c0(%rbp)
ff
movsd  -0x178(%rbp),%xmm0
ff
call   1080 <sin@plt>
movsd  -0x1c0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x1b8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x180(%rbp)
ff
movsd  -0x180(%rbp),%xmm0
ff
movsd  -0x180(%rbp),%xmm1
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x6fb(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   10c0 <sqrt@plt>
movsd  %xmm0,-0x188(%rbp)
ff
movsd  -0x138(%rbp),%xmm0
ff
subsd  -0x130(%rbp),%xmm0
ff
movsd  0x6c6(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x190(%rbp)
ff
movsd  -0x190(%rbp),%xmm0
ff
movsd  0x6ba(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    19b1 <main+0x801>
movsd  -0x190(%rbp),%xmm0
ff
movsd  0x690(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x190(%rbp)
ff
jmp    1976 <main+0x7c6>
movsd  -0x190(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    19ed <main+0x83d>
movsd  -0x188(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x188(%rbp)
ff
movsd  -0x188(%rbp),%xmm0
ff
movsd  -0x180(%rbp),%xmm1
ff
call   1050 <atan2@plt>
mov    0x25df(%rip),%rax
divsd  (%rax),%xmm0
movsd  0x60b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x198(%rbp)
ff
movsd  -0x198(%rbp),%xmm0
ff
movsd  -0x170(%rbp),%xmm1
ff
lea    0x749(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x148(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %rsp,%r12
xorpd  %xmm0,%xmm0
movapd %xmm0,-0x90(%rbp)
ff
movapd %xmm0,-0xa0(%rbp)
ff
movapd %xmm0,-0xb0(%rbp)
ff
movapd %xmm0,-0xc0(%rbp)
ff
movapd %xmm0,-0xd0(%rbp)
ff
movb   $0x0,-0x80(%rbp)
movb   $0x0,-0x29(%rbp)
movabs $0xbff0000000000000,%rax
mov    %rax,-0x78(%rbp)
mov    %rax,-0x70(%rbp)
mov    0x2db4(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%r14
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r14
mov    %r14,%rsp
cmp    $0x2,%edi
jne    16f6 <main+0x536>
mov    %rsi,%r15
mov    0x8(%rsi),%rdi
lea    0xe22(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     16ff <main+0x53f>
mov    %rax,%rbx
mov    %rax,%rdi
call   1080 <feof@plt>
test   %eax,%eax
je     127c <main+0xbc>
movsd  0xd8d(%rip),%xmm3
movapd %xmm3,%xmm0
jmp    155d <main+0x39d>
mov    %r12,-0x40(%rbp)
lea    -0xd0(%rbp),%r12
lea    0xdfb(%rip),%r13
lea    0xdfd(%rip),%r15
jmp    130a <main+0x14a>
nopw   0x0(%rax,%rax,1)
lea    -0xc7(%rbp),%rdi
lea    0xdee(%rip),%rsi
lea    -0x38(%rbp),%rdx
lea    -0x34(%rbp),%rcx
lea    -0x30(%rbp),%r8
xor    %eax,%eax
call   10a0 <sscanf@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl -0x38(%rbp),%xmm0
xorps  %xmm2,%xmm2
cvtsi2sdl -0x34(%rbp),%xmm2
movss  -0x30(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
unpcklpd %xmm1,%xmm2
divpd  0xd6a(%rip),%xmm2
addsd  %xmm2,%xmm0
unpckhpd %xmm2,%xmm2
addsd  %xmm0,%xmm2
movapd %xmm2,-0xf0(%rbp)
ff
mov    %rbx,%rdi
call   1080 <feof@plt>
test   %eax,%eax
jne    154f <main+0x38f>
mov    %r12,%rdi
mov    $0x1,%esi
mov    $0x50,%edx
mov    %rbx,%rcx
call   1050 <fread@plt>
cmp    $0x50,%eax
jne    16ec <main+0x52c>
mov    %r13,%rdi
mov    %r12,%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     154f <main+0x38f>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12a0 <main+0xe0>
lea    0xd54(%rip),%rdi
mov    %r12,%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1450 <main+0x290>
lea    0xd45(%rip),%rdi
mov    %r12,%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1464 <main+0x2a4>
lea    0xd32(%rip),%rdi
mov    %r12,%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1482 <main+0x2c2>
lea    0xd1f(%rip),%rdi
mov    %r12,%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     14e1 <main+0x321>
lea    0xd27(%rip),%rdi
mov    %r12,%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    12fa <main+0x13a>
lea    -0xc7(%rbp),%rdi
lea    0xd0d(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   10a0 <sscanf@plt>
mov    %r14,%rdi
lea    0xcfc(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12fa <main+0x13a>
mov    %r14,%rdi
lea    0xce7(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12fa <main+0x13a>
jmp    173a <main+0x57a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0xc7(%rbp),%rdi
lea    0xc61(%rip),%rsi
lea    -0x78(%rbp),%rdx
jmp    1476 <main+0x2b6>
lea    -0xc7(%rbp),%rdi
lea    0xc4d(%rip),%rsi
lea    -0x70(%rbp),%rdx
xor    %eax,%eax
call   10a0 <sscanf@plt>
jmp    12fa <main+0x13a>
lea    -0xc7(%rbp),%rdi
lea    0xc0c(%rip),%rsi
lea    -0x38(%rbp),%rdx
lea    -0x34(%rbp),%rcx
lea    -0x30(%rbp),%r8
xor    %eax,%eax
call   10a0 <sscanf@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl -0x38(%rbp),%xmm0
xorps  %xmm2,%xmm2
cvtsi2sdl -0x34(%rbp),%xmm2
movss  -0x30(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
unpcklpd %xmm1,%xmm2
divpd  0xb88(%rip),%xmm2
addsd  %xmm2,%xmm0
unpckhpd %xmm2,%xmm2
addsd  %xmm0,%xmm2
movapd %xmm2,-0xe0(%rbp)
ff
jmp    12fa <main+0x13a>
lea    -0xc7(%rbp),%rdi
lea    0xbf2(%rip),%rsi
lea    -0x29(%rbp),%rdx
lea    -0x5c(%rbp),%rcx
lea    -0x34(%rbp),%r8
lea    -0x30(%rbp),%r9
xor    %eax,%eax
call   10a0 <sscanf@plt>
cmpb   $0x2d,-0x29(%rbp)
xorps  %xmm0,%xmm0
cvtsi2sdl -0x5c(%rbp),%xmm0
xorps  %xmm2,%xmm2
cvtsi2sdl -0x34(%rbp),%xmm2
movss  -0x30(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
unpcklpd %xmm1,%xmm2
divpd  0xb21(%rip),%xmm2
addsd  %xmm2,%xmm0
unpckhpd %xmm2,%xmm2
addsd  %xmm0,%xmm2
jne    1545 <main+0x385>
xorpd  0xb1b(%rip),%xmm2
movapd %xmm2,-0x50(%rbp)
jmp    12fa <main+0x13a>
movsd  -0x78(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm3
mov    -0x40(%rbp),%r12
addsd  %xmm0,%xmm3
mulsd  0xa9f(%rip),%xmm3
mov    0x2a78(%rip),%rbx
movsd  (%rbx),%xmm0
movsd  0xa9c(%rip),%xmm1
mulsd  %xmm0,%xmm3
divsd  %xmm1,%xmm3
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm3
jne    1594 <main+0x3d4>
jnp    171b <main+0x55b>
movsd  %xmm3,-0x40(%rbp)
movsd  0xa7f(%rip),%xmm3
subsd  -0x50(%rbp),%xmm3
mulsd  %xmm0,%xmm3
divsd  %xmm1,%xmm3
movsd  %xmm3,-0x68(%rbp)
ucomisd %xmm2,%xmm3
jne    15bf <main+0x3ff>
jnp    1724 <main+0x564>
mulsd  0xa49(%rip),%xmm0
divsd  %xmm1,%xmm0
call   10b0 <cos@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm0
call   10b0 <cos@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x68(%rbp),%xmm0
call   10b0 <cos@plt>
mulsd  -0x58(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1090 <sin@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x68(%rbp),%xmm0
call   1090 <sin@plt>
mulsd  -0x58(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,-0x50(%rbp)
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x9eb(%rip),%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   10d0 <sqrt@plt>
movapd -0xe0(%rbp),%xmm3
ff
subsd  -0xf0(%rbp),%xmm3
ff
addsd  0x9ce(%rip),%xmm3
ucomisd 0x9ce(%rip),%xmm3
jbe    168a <main+0x4ca>
movsd  0x9cc(%rip),%xmm1
movsd  0x9bc(%rip),%xmm2
nopl   0x0(%rax)
addsd  %xmm1,%xmm3
ucomisd %xmm2,%xmm3
ja     1680 <main+0x4c0>
movapd 0x9ce(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm1,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
movsd  -0x50(%rbp),%xmm1
call   1060 <atan2@plt>
divsd  (%rbx),%xmm0
mulsd  0x953(%rip),%xmm0
lea    0xa7a(%rip),%rdi
movsd  -0x40(%rbp),%xmm1
mov    $0x2,%al
call   1070 <printf@plt>
mov    %r12,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0xffffffff,%edi
call   10e0 <exit@plt>
lea    0xa92(%rip),%rdi
jmp    172b <main+0x56b>
mov    0x8(%r15),%rsi
lea    0x968(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xffffffff,%edi
call   10e0 <exit@plt>
lea    0xa4d(%rip),%rdi
jmp    172b <main+0x56b>
lea    0xa22(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%edi
call   10e0 <exit@plt>
lea    0x9d8(%rip),%rdi
mov    %r14,%rsi
jmp    170a <main+0x54a>

LLVM IR (-O0):
@BUFSIZ = global i32 0
@.str = [31 x i8] c"Usage: airmass2 FITS [dtheta]\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [23 x i8] c"Cannot find file \22%s\22\0A\00"
@.str.3 = [9 x i8] c"END \00"
@.str.4 = [10 x i8] c"LST-STR =\00"
@.str.5 = [25 x i8] c"%*[ ']%2d%*[:]%2d%*[:]%f\00"
@.str.6 = [10 x i8] c"ZD-STR =\00"
@.str.7 = [4 x i8] c"%lf\00"
@.str.8 = [10 x i8] c"ZD-END =\00"
@.str.9 = [10 x i8] c"RA =\00"
@.str.10 = [10 x i8] c"DEC =\00"
@.str.11 = [27 x i8] c"%*[ ']%c%2d%*[:]%2d%*[:]%f\00"
@.str.12 = [10 x i8] c"TELESCOP=\00"
@.str.13 = [3 x i8] c"%s\00"
@.str.14 = [8 x i8] c"'Subaru\00"
@.str.15 = [8 x i8] c"'SUBARU\00"
@.str.16 = [45 x i8] c" Error: TELESCOP=%s is not supported. quit.\0A\00"
@M_PI = global double 0.000000e+00
@.str.17 = [33 x i8] c" Error: Cannot calculate. ZD=0.\0A\00"
@.str.18 = [35 x i8] c" Error: Cannot calculate. Dec=90.\0A\00"
@.str.19 = [7 x i8] c"%f %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i8]
%7 = alloca i32*
%8 = alloca [81 x i8]
%9 = alloca [70 x i8]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca float
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca i8*
%28 = alloca i64
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca double
%37 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%38 = bitcast [10 x i8]* %6 to i8*
%39 = bitcast [81 x i8]* %8 to i8*
%40 = bitcast [70 x i8]* %9 to i8*
store i8 0, i8* %12
store double 1.733000e-04, double* %13
store double -2.090000e-07, double* %14
store double 7.950000e-10, double* %15
store double -1.000000e+00, double* %20
store double -1.000000e+00, double* %21
store double -1.000000e+00, double* %22
store double -1.000000e+00, double* %23
%41 = load i32, i32* @BUFSIZ
%42 = zext i32 %41 to i64
%43 = call i8* @llvm.stacksave()
store i8* %43, i8** %27
%44 = alloca i8, i64 %42
store i64 %42, i64* %28
%45 = load i32, i32* %4
%46 = icmp ne i32 %45, 2
br i1 %46, label %47, label %50
47: ; preds = %2
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%49 = call i32 @exit(i32 -1)
unreachable
50: ; preds = %2
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i64 1
%53 = load i8*, i8** %52
%54 = call i32* @fopen(i8* %53, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %54, i32** %7
%55 = load i32*, i32** %7
%56 = icmp eq i32* null, %55
br i1 %56, label %57, label %63
57: ; preds = %50
%58 = load i8**, i8*** %5
%59 = getelementptr inbounds i8*, i8** %58, i64 1
%60 = load i8*, i8** %59
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %60)
%62 = call i32 @exit(i32 -1)
unreachable
63: ; preds = %50
br label %64
64: ; preds = %192, %63
%65 = load i32*, i32** %7
%66 = call i32 @feof(i32* %65)
%67 = icmp ne i32 %66, 0
%68 = xor i1 %67, true
br i1 %68, label %69, label %193
69: ; preds = %64
%70 = getelementptr inbounds [81 x i8], [81 x i8]* %8, i64 0, i64 0
%71 = load i32*, i32** %7
%72 = call i32 @fread(i8* %70, i32 1, i32 80, i32* %71)
%73 = icmp ne i32 80, %72
br i1 %73, label %74, label %76
74: ; preds = %69
%75 = call i32 @exit(i32 -1)
unreachable
76: ; preds = %69
%77 = getelementptr inbounds [81 x i8], [81 x i8]* %8, i64 0, i64 0
%78 = call i64 @strncmp(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %77, i32 8)
%79 = icmp eq i64 %78, 0
br i1 %79, label %80, label %81
80: ; preds = %76
br label %193
81: ; preds = %76
%82 = getelementptr inbounds [81 x i8], [81 x i8]* %8, i64 0, i64 0
%83 = call i64 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* %82, i32 9)
%84 = icmp eq i64 %83, 0
br i1 %84, label %85, label %99
85: ; preds = %81
%86 = getelementptr inbounds [81 x i8], [81 x i8]* %8, i64 0, i64 0
%87 = getelementptr inbounds i8, i8* %86, i64 9
%88 = call i32 (i8*, i8*, ...) @sscanf(i8* %87, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32* %16, i32* %18, float* %19)
%89 = load i32, i32* %16
%90 = sitofp i32 %89 to double
%91 = load i32, i32* %18
%92 = sitofp i32 %91 to double
%93 = fdiv double %92, 6.000000e+01
%94 = fadd double %90, %93
%95 = load float, float* %19
%96 = fpext float %95 to double
%97 = fdiv double %96, 3.600000e+03
%98 = fadd double %94, %97
store double %98, double* %24
br label %191
99: ; preds = %81
%100 = getelementptr inbounds [81 x i8], [81 x i8]* %8, i64 0, i64 0
%101 = call i64 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8* %100, i32 9)
%102 = icmp eq i64 %101, 0
br i1 %102, label %103, label %107
103: ; preds = %99
%104 = getelementptr inbounds [81 x i8], [81 x i8]* %8, i64 0, i64 0
%105 = getelementptr inbounds i8, i8* %104, i64 9
%106 = call i32 (i8*, i8*, ...) @sscanf(i8* %105, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %20)
br label %190
107: ; preds = %99
%108 = getelementptr inbounds [81 x i8], [81 x i8]* %8, i64 0, i64 0
%109 = call i64 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i8* %108, i32 9)
%110 = icmp eq i64 %109, 0
br i1 %110, label %111, label %115
111: ; preds = %107
%112 = getelementptr inbounds [81 x i8], [81 x i8]* %8, i64 0, i64 0
%113 = getelementptr inbounds i8, i8* %112, i64 9
%114 = call i32 (i8*, i8*, ...) @sscanf(i8* %113, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %21)
br label %189
115: ; preds = %107
%116 = getelementptr inbounds [81 x i8], [81 x i8]* %8, i64 0, i64 0
%117 = call i64 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8* %116, i32 9)
%118 = icmp eq i64 %117, 0
br i1 %118, label %119, label %133
119: ; preds = %115
%120 = getelementptr inbounds [81 x i8], [81 x i8]* %8, i64 0, i64 0
%121 = getelementptr inbounds i8, i8* %120, i64 9
%122 = call i32 (i8*, i8*, ...) @sscanf(i8* %121, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32* %16, i32* %18, float* %19)
%123 = load i32, i32* %16
%124 = sitofp i32 %123 to double
%125 = load i32, i32* %18
%126 = sitofp i32 %125 to double
%127 = fdiv double %126, 6.000000e+01
%128 = fadd double %124, %127
%129 = load float, float* %19
%130 = fpext float %129 to double
%131 = fdiv double %130, 3.600000e+03
%132 = fadd double %128, %131
store double %132, double* %25
br label %188
133: ; preds = %115
%134 = getelementptr inbounds [81 x i8], [81 x i8]* %8, i64 0, i64 0
%135 = call i64 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i8* %134, i32 9)
%136 = icmp eq i64 %135, 0
br i1 %136, label %137, label %168
137: ; preds = %133
%138 = getelementptr inbounds [81 x i8], [81 x i8]* %8, i64 0, i64 0
%139 = getelementptr inbounds i8, i8* %138, i64 9
%140 = call i32 (i8*, i8*, ...) @sscanf(i8* %139, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0), i8* %12, i32* %17, i32* %18, float* %19)
%141 = load i8, i8* %12
%142 = sext i8 %141 to i32
%143 = icmp eq i32 %142, 45
br i1 %143, label %144, label %156
144: ; preds = %137
%145 = load i32, i32* %17
%146 = sitofp i32 %145 to double
%147 = load i32, i32* %18
%148 = sitofp i32 %147 to double
%149 = fdiv double %148, 6.000000e+01
%150 = fadd double %146, %149
%151 = load float, float* %19
%152 = fpext float %151 to double
%153 = fdiv double %152, 3.600000e+03
%154 = fadd double %150, %153
%155 = fneg double %154
store double %155, double* %26
br label %167
156: ; preds = %137
%157 = load i32, i32* %17
%158 = sitofp i32 %157 to double
%159 = load i32, i32* %18
%160 = sitofp i32 %159 to double
%161 = fdiv double %160, 6.000000e+01
%162 = fadd double %158, %161
%163 = load float, float* %19
%164 = fpext float %163 to double
%165 = fdiv double %164, 3.600000e+03
%166 = fadd double %162, %165
store double %166, double* %26
br label %167
167: ; preds = %156, %144
br label %187
168: ; preds = %133
%169 = getelementptr inbounds [81 x i8], [81 x i8]* %8, i64 0, i64 0
%170 = call i64 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i8* %169, i32 9)
%171 = icmp eq i64 %170, 0
br i1 %171, label %172, label %186
172: ; preds = %168
%173 = getelementptr inbounds [81 x i8], [81 x i8]* %8, i64 0, i64 0
%174 = getelementptr inbounds i8, i8* %173, i64 9
%175 = call i32 (i8*, i8*, ...) @sscanf(i8* %174, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8* %44)
%176 = call i64 @strncmp(i8* %44, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), i32 7)
%177 = icmp ne i64 %176, 0
br i1 %177, label %178, label %184
178: ; preds = %172
%179 = call i64 @strncmp(i8* %44, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i32 7)
%180 = icmp ne i64 %179, 0
br i1 %180, label %181, label %184
181: ; preds = %178
%182 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.16, i64 0, i64 0), i8* %44)
%183 = call i32 @exit(i32 -1)
unreachable
184: ; preds = %178, %172
store double 1.982850e+01, double* %29
br label %185
185: ; preds = %184
br label %186
186: ; preds = %185, %168
br label %187
187: ; preds = %186, %167
br label %188
188: ; preds = %187, %119
br label %189
189: ; preds = %188, %111
br label %190
190: ; preds = %189, %103
br label %191
191: ; preds = %190, %85
br label %192
192: ; preds = %191
br label %64
193: ; preds = %80, %64
%194 = load double, double* %20
%195 = fcmp ogt double %194, 0.000000e+00
br i1 %195, label %196, label %204
196: ; preds = %193
%197 = load double, double* %21
%198 = fcmp ogt double %197, 0.000000e+00
br i1 %198, label %199, label %204
199: ; preds = %196
%200 = load double, double* %20
%201 = load double, double* %21
%202 = fadd double %200, %201
%203 = fmul double 5.000000e-01, %202
store double %203, double* %30
br label %204
204: ; preds = %199, %196, %193
%205 = load double, double* %29
%206 = fsub double 9.000000e+01, %205
%207 = load double, double* @M_PI
%208 = fmul double %206, %207
%209 = fdiv double %208, 1.800000e+02
store double %209, double* %31
%210 = load double, double* %30
%211 = load double, double* @M_PI
%212 = fmul double %210, %211
%213 = fdiv double %212, 1.800000e+02
store double %213, double* %32
%214 = load double, double* %26
%215 = fsub double 9.000000e+01, %214
%216 = load double, double* @M_PI
%217 = fmul double %215, %216
%218 = fdiv double %217, 1.800000e+02
store double %218, double* %33
%219 = load double, double* %32
%220 = fcmp oeq double %219, 0.000000e+00
br i1 %220, label %221, label %224
221: ; preds = %204
%222 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.17, i64 0, i64 0))
%223 = call i32 @exit(i32 -1)
unreachable
224: ; preds = %204
%225 = load double, double* %33
%226 = fcmp oeq double %225, 0.000000e+00
br i1 %226, label %227, label %230
227: ; preds = %224
%228 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.18, i64 0, i64 0))
%229 = call i32 @exit(i32 -1)
unreachable
230: ; preds = %224
%231 = load double, double* %31
%232 = call double @cos(double %231)
%233 = load double, double* %32
%234 = call double @cos(double %233)
%235 = load double, double* %33
%236 = call double @cos(double %235)
%237 = fneg double %234
%238 = call double @llvm.fmuladd.f64(double %237, double %236, double %232)
%239 = load double, double* %32
%240 = call double @sin(double %239)
%241 = load double, double* %33
%242 = call double @sin(double %241)
%243 = fmul double %240, %242
%244 = fdiv double %238, %243
store double %244, double* %34
%245 = load double, double* %34
%246 = load double, double* %34
%247 = fneg double %245
%248 = call double @llvm.fmuladd.f64(double %247, double %246, double 1.000000e+00)
%249 = fptosi double %248 to i32
%250 = call double @sqrt(i32 %249)
store double %250, double* %35
%251 = load double, double* %25
%252 = load double, double* %24
%253 = fsub double %251, %252
%254 = fadd double %253, 2.400000e+01
store double %254, double* %36
br label %255
255: ; preds = %258, %230
%256 = load double, double* %36
%257 = fcmp ogt double %256, 1.200000e+01
br i1 %257, label %258, label %261
258: ; preds = %255
%259 = load double, double* %36
%260 = fsub double %259, 2.400000e+01
store double %260, double* %36
br label %255
261: ; preds = %255
%262 = load double, double* %36
%263 = fcmp ogt double %262, 0.000000e+00
br i1 %263, label %264, label %267
264: ; preds = %261
%265 = load double, double* %35
%266 = fneg double %265
store double %266, double* %35
br label %267
267: ; preds = %264, %261
%268 = load double, double* %35
%269 = load double, double* %34
%270 = call double @atan2(double %268, double %269)
%271 = load double, double* @M_PI
%272 = fdiv double %270, %271
%273 = fmul double %272, 1.800000e+02
store double %273, double* %37
%274 = load double, double* %37
%275 = load double, double* %32
%276 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i64 0, i64 0), double %274, double %275)
store i32 0, i32* %3
%277 = load i8*, i8** %27
%278 = load i32, i32* %3
ret i32 %278
}

LLVM IR (-O2):
@BUFSIZ = global i32 0
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [23 x i8] c"Cannot find file \22%s\22\0A\00"
@.str.3 = [9 x i8] c"END \00"
@.str.4 = [10 x i8] c"LST-STR =\00"
@.str.5 = [25 x i8] c"%*[ ']%2d%*[:]%2d%*[:]%f\00"
@.str.6 = [10 x i8] c"ZD-STR =\00"
@.str.7 = [4 x i8] c"%lf\00"
@.str.8 = [10 x i8] c"ZD-END =\00"
@.str.9 = [10 x i8] c"RA =\00"
@.str.10 = [10 x i8] c"DEC =\00"
@.str.11 = [27 x i8] c"%*[ ']%c%2d%*[:]%2d%*[:]%f\00"
@.str.12 = [10 x i8] c"TELESCOP=\00"
@.str.13 = [3 x i8] c"%s\00"
@.str.14 = [8 x i8] c"'Subaru\00"
@.str.15 = [8 x i8] c"'SUBARU\00"
@.str.16 = [45 x i8] c" Error: TELESCOP=%s is not supported. quit.\0A\00"
@M_PI = global double 0.000000e+00
@.str.19 = [7 x i8] c"%f %f\0A\00"
@str = [34 x i8] c" Error: Cannot calculate. Dec=90.\00"
@str.20 = [32 x i8] c" Error: Cannot calculate. ZD=0.\00"
@str.21 = [30 x i8] c"Usage: airmass2 FITS [dtheta]\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [81 x i8]
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca float
%9 = alloca double
%10 = alloca double
%11 = getelementptr inbounds [81 x i8], [81 x i8]* %3, i64 0, i64 0
store i8 0, i8* %4
%12 = bitcast i32* %5 to i8*
%13 = bitcast i32* %6 to i8*
%14 = bitcast i32* %7 to i8*
%15 = bitcast float* %8 to i8*
%16 = bitcast double* %9 to i8*
store double -1.000000e+00, double* %9
%17 = bitcast double* %10 to i8*
store double -1.000000e+00, double* %10
%18 = load i32, i32* @BUFSIZ
%19 = zext i32 %18 to i64
%20 = tail call i8* @llvm.stacksave()
%21 = alloca i8, i64 %19
%22 = icmp eq i32 %0, 2
br i1 %22, label %26, label %23
23: ; preds = %2
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.21, i64 0, i64 0))
%25 = tail call i32 @exit(i32 -1)
unreachable
26: ; preds = %2
%27 = getelementptr inbounds i8*, i8** %1, i64 1
%28 = load i8*, i8** %27
%29 = tail call i32* @fopen(i8* %28, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%30 = icmp eq i32* %29, null
br i1 %30, label %36, label %31
31: ; preds = %26
%32 = call i32 @feof(i32* %29)
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %144
34: ; preds = %31
%35 = getelementptr inbounds [81 x i8], [81 x i8]* %3, i64 0, i64 9
br label %40
36: ; preds = %26
%37 = load i8*, i8** %27
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %37)
%39 = tail call i32 @exit(i32 -1)
unreachable
40: ; preds = %34, %132
%41 = phi double [ undef, %34 ], [ %135, %132 ]
%42 = phi double [ undef, %34 ], [ %134, %132 ]
%43 = phi double [ undef, %34 ], [ %133, %132 ]
%44 = call i32 @fread(i8* %11, i32 1, i32 80, i32* %29)
%45 = icmp eq i32 %44, 80
br i1 %45, label %48, label %46
46: ; preds = %40
%47 = call i32 @exit(i32 -1)
unreachable
48: ; preds = %40
%49 = call i64 @strncmp(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %11, i32 8)
%50 = icmp eq i64 %49, 0
br i1 %50, label %138, label %51
51: ; preds = %48
%52 = call i64 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* %11, i32 9)
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %69
54: ; preds = %51
%55 = call i32 (i8*, i8*, ...) @sscanf(i8* %35, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32* %5, i32* %7, float* %8)
%56 = load i32, i32* %5
%57 = sitofp i32 %56 to double
%58 = load i32, i32* %7
%59 = sitofp i32 %58 to double
%60 = load float, float* %8
%61 = fpext float %60 to double
%62 = insertelement <2 x double> poison, double %59, i64 0
%63 = insertelement <2 x double> %62, double %61, i64 1
%64 = fdiv <2 x double> %63, <double 6.000000e+01, double 3.600000e+03>
%65 = extractelement <2 x double> %64, i64 0
%66 = fadd double %65, %57
%67 = extractelement <2 x double> %64, i64 1
%68 = fadd double %66, %67
br label %132
69: ; preds = %51
%70 = call i64 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8* %11, i32 9)
%71 = icmp eq i64 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %69
%73 = call i32 (i8*, i8*, ...) @sscanf(i8* %35, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %9)
br label %132
74: ; preds = %69
%75 = call i64 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i8* %11, i32 9)
%76 = icmp eq i64 %75, 0
br i1 %76, label %77, label %79
77: ; preds = %74
%78 = call i32 (i8*, i8*, ...) @sscanf(i8* %35, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %10)
br label %132
79: ; preds = %74
%80 = call i64 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8* %11, i32 9)
%81 = icmp eq i64 %80, 0
br i1 %81, label %82, label %97
82: ; preds = %79
%83 = call i32 (i8*, i8*, ...) @sscanf(i8* %35, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32* %5, i32* %7, float* %8)
%84 = load i32, i32* %5
%85 = sitofp i32 %84 to double
%86 = load i32, i32* %7
%87 = sitofp i32 %86 to double
%88 = load float, float* %8
%89 = fpext float %88 to double
%90 = insertelement <2 x double> poison, double %87, i64 0
%91 = insertelement <2 x double> %90, double %89, i64 1
%92 = fdiv <2 x double> %91, <double 6.000000e+01, double 3.600000e+03>
%93 = extractelement <2 x double> %92, i64 0
%94 = fadd double %93, %85
%95 = extractelement <2 x double> %92, i64 1
%96 = fadd double %94, %95
br label %132
97: ; preds = %79
%98 = call i64 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i8* %11, i32 9)
%99 = icmp eq i64 %98, 0
br i1 %99, label %100, label %119
100: ; preds = %97
%101 = call i32 (i8*, i8*, ...) @sscanf(i8* %35, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0), i8* %4, i32* %6, i32* %7, float* %8)
%102 = load i8, i8* %4
%103 = icmp eq i8 %102, 45
%104 = load i32, i32* %6
%105 = sitofp i32 %104 to double
%106 = load i32, i32* %7
%107 = sitofp i32 %106 to double
%108 = load float, float* %8
%109 = fpext float %108 to double
%110 = insertelement <2 x double> poison, double %107, i64 0
%111 = insertelement <2 x double> %110, double %109, i64 1
%112 = fdiv <2 x double> %111, <double 6.000000e+01, double 3.600000e+03>
%113 = extractelement <2 x double> %112, i64 0
%114 = fadd double %113, %105
%115 = extractelement <2 x double> %112, i64 1
%116 = fadd double %114, %115
%117 = fneg double %116
%118 = select i1 %103, double %117, double %116
br label %132
119: ; preds = %97
%120 = call i64 @strncmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i8* %11, i32 9)
%121 = icmp eq i64 %120, 0
br i1 %121, label %122, label %132
122: ; preds = %119
%123 = call i32 (i8*, i8*, ...) @sscanf(i8* %35, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8* %21)
%124 = call i64 @strncmp(i8* %21, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), i32 7)
%125 = icmp eq i64 %124, 0
br i1 %125, label %132, label %126
126: ; preds = %122
%127 = call i64 @strncmp(i8* %21, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i32 7)
%128 = icmp eq i64 %127, 0
br i1 %128, label %132, label %129
129: ; preds = %126
%130 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.16, i64 0, i64 0), i8* %21)
%131 = call i32 @exit(i32 -1)
unreachable
132: ; preds = %100, %122, %126, %54, %77, %119, %82, %72
%133 = phi double [ %43, %54 ], [ %43, %72 ], [ %43, %77 ], [ %43, %82 ], [ %43, %119 ], [ %43, %126 ], [ %43, %122 ], [ %118, %100 ]
%134 = phi double [ %42, %54 ], [ %42, %72 ], [ %42, %77 ], [ %96, %82 ], [ %42, %119 ], [ %42, %126 ], [ %42, %122 ], [ %42, %100 ]
%135 = phi double [ %68, %54 ], [ %41, %72 ], [ %41, %77 ], [ %41, %82 ], [ %41, %119 ], [ %41, %126 ], [ %41, %122 ], [ %41, %100 ]
%136 = call i32 @feof(i32* %29)
%137 = icmp eq i32 %136, 0
br i1 %137, label %40, label %138
138: ; preds = %48, %132
%139 = phi double [ %133, %132 ], [ %43, %48 ]
%140 = phi double [ %134, %132 ], [ %42, %48 ]
%141 = phi double [ %135, %132 ], [ %41, %48 ]
%142 = load double, double* %9
%143 = load double, double* %10
br label %144
144: ; preds = %138, %31
%145 = phi double [ -1.000000e+00, %31 ], [ %143, %138 ]
%146 = phi double [ -1.000000e+00, %31 ], [ %142, %138 ]
%147 = phi double [ undef, %31 ], [ %139, %138 ]
%148 = phi double [ undef, %31 ], [ %140, %138 ]
%149 = phi double [ undef, %31 ], [ %141, %138 ]
%150 = fcmp ogt double %146, 0.000000e+00
%151 = fcmp ogt double %145, 0.000000e+00
%152 = select i1 %150, i1 %151, i1 false
%153 = fadd double %146, %145
%154 = fmul double %153, 5.000000e-01
%155 = select i1 %152, double %154, double undef
%156 = load double, double* @M_PI
%157 = fmul double %156, 0x40518AF9DB22D0E6
%158 = fdiv double %157, 1.800000e+02
%159 = fmul double %156, %155
%160 = fdiv double %159, 1.800000e+02
%161 = fsub double 9.000000e+01, %147
%162 = fmul double %161, %156
%163 = fdiv double %162, 1.800000e+02
%164 = fcmp oeq double %160, 0.000000e+00
br i1 %164, label %165, label %168
165: ; preds = %144
%166 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.20, i64 0, i64 0))
%167 = call i32 @exit(i32 -1)
unreachable
168: ; preds = %144
%169 = fcmp oeq double %163, 0.000000e+00
br i1 %169, label %170, label %173
170: ; preds = %168
%171 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%172 = call i32 @exit(i32 -1)
unreachable
173: ; preds = %168
%174 = call double @cos(double %158)
%175 = call double @cos(double %160)
%176 = call double @cos(double %163)
%177 = fneg double %175
%178 = call double @llvm.fmuladd.f64(double %177, double %176, double %174)
%179 = call double @sin(double %160)
%180 = call double @sin(double %163)
%181 = fmul double %179, %180
%182 = fdiv double %178, %181
%183 = fneg double %182
%184 = call double @llvm.fmuladd.f64(double %183, double %182, double 1.000000e+00)
%185 = fptosi double %184 to i32
%186 = call double @sqrt(i32 %185)
%187 = fsub double %148, %149
%188 = fadd double %187, 2.400000e+01
%189 = fcmp ogt double %188, 1.200000e+01
br i1 %189, label %190, label %194
190: ; preds = %173, %190
%191 = phi double [ %192, %190 ], [ %188, %173 ]
%192 = fadd double %191, -2.400000e+01
%193 = fcmp ogt double %192, 1.200000e+01
br i1 %193, label %190, label %194
194: ; preds = %190, %173
%195 = phi double [ %188, %173 ], [ %192, %190 ]
%196 = fcmp ogt double %195, 0.000000e+00
%197 = fneg double %186
%198 = select i1 %196, double %197, double %186
%199 = call double @atan2(double %198, double %182)
%200 = load double, double* @M_PI
%201 = fdiv double %199, %200
%202 = fmul double %201, 1.800000e+02
%203 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i64 0, i64 0), double %202, double %160)
ret i32 0
}