#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 /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char const *);
int fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ get_cmc1x_ra_dec(long *, long *, char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ strcat(char *, char const *);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char *);
int /*<<< orphan*/ xvt_record(char *, int);
int extract_cmc1x_stars(FILE *ofile, const double ra_in_degrees,
                        const double dec_in_degrees,
                        const double width_in_degrees,
                        const double height_in_degrees, const char *path,
                        const int rejected) {
  const double dec1 = dec_in_degrees - height_in_degrees / 2.;
  const double dec2 = dec_in_degrees + height_in_degrees / 2.;
  const double ra1 = ra_in_degrees - width_in_degrees / 2.;
  const double ra2 = ra_in_degrees + width_in_degrees / 2.;
  const double zone_height = 5.;
  int zone = (int)((dec1 + 90.) / zone_height) + 1;
  const int end_zone = (int)((dec2 + 90.) / zone_height) + 1;
  long ra_start = (long)(ra1 * 10000. * 3600. / 15.);
  const long ra_end = (long)(ra2 * 10000. * 3600. / 15.);
  const long dec_start = (long)(dec1 * 1000. * 3600);
  const long dec_end = (long)(dec2 * 1000. * 3600);
  char tbuff[103];
  int record_size = 0;
  int rval = 0, pass;
  const char *path_separator = "/", *read_only_permits = "r";
  if (zone < 0)
    zone = 0;
  if (ra_start < 0)
    ra_start = 0;
  while (rval >= 0 && zone <= end_zone) {
    FILE *ifile = NULL;
    char base_name[40];
    if (zone < 19)
      sprintf(base_name, "cmc15s%x", 18 - zone);
    else
      sprintf(base_name, "cmc15n%x", zone - 19);
    if (rejected)
      strcat(base_name, "r");
    for (pass = 0; !ifile && pass < 8; pass++) {
      char filename[180];
      base_name[4] = ((pass & 4) ? '4' : '5');
      if ((pass & 3) < 2 || !path)
        *filename = '\0';
      else {
        strcpy(filename, path);
        if (filename[strlen(filename) - 1] != path_separator[0])
          strcat(filename, path_separator);
      }
      strcat(filename, base_name);
      strcat(filename, (pass & 1) ? ".cmc" : ".dat");
      ifile = fopen(filename, read_only_permits);
      if (ifile)
        record_size = ((pass & 1) ? 25 : 102);
    }
    if (ifile) {
      int n_recs, loc = 0, loc1, step;
      long ra, dec;
      fseek(ifile, 0L, SEEK_END);
      n_recs = ftell(ifile) / record_size;
      for (step = 0x8000000; step; step >>= 1)
        if ((loc1 = loc + step) < n_recs) {
          fseek(ifile, loc1 * record_size, SEEK_SET);
          if (fread(tbuff, record_size, 1, ifile) != 1) {
            fclose(ifile);
            return (0);
          }
          xvt_record(tbuff, record_size);
          get_cmc1x_ra_dec(&ra, NULL, tbuff);
          if (ra < ra_start)
            loc = loc1;
        }
      fseek(ifile, loc * record_size, SEEK_SET);
      ra = 0;
      while (ra < ra_end && fread(tbuff, record_size, 1, ifile)) {
        xvt_record(tbuff, record_size);
        get_cmc1x_ra_dec(&ra, &dec, tbuff);
        if (ra >= ra_start && ra < ra_end && dec > dec_start && dec < dec_end) {
          fwrite(tbuff, 102, 1, ofile);
          rval++;
        }
      }
      fclose(ifile);
    }
    zone++;
  }
  if (rval >= 0 && ra_in_degrees > 0. && ra_in_degrees < 360.) {
    if (ra1 < 0.)
      rval += extract_cmc1x_stars(ofile, ra_in_degrees + 360., dec_in_degrees,
                                  width_in_degrees, height_in_degrees, path,
                                  rejected);
    if (ra2 > 360.)
      rval += extract_cmc1x_stars(ofile, ra_in_degrees - 360., dec_in_degrees,
                                  width_in_degrees, height_in_degrees, path,
                                  rejected);
  }
  return (rval);
}


x86 assembly (clang, -O0):
<extract_cmc1x_stars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x240,%rsp
mov    %rdi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %edx,-0x3c(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  0xe24(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  0xe05(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xde6(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xdc7(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xda2(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xd9d(%rip),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  0xd88(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
movsd  0xd7a(%rip),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  0xd65(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
movsd  0xd47(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  0xd22(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd26(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x78(%rbp)
movsd  0xd19(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  0xcf4(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcf8(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x80(%rbp)
movsd  0xcdb(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  0xcc6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x88(%rbp)
movsd  0xcb6(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  0xca1(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x90(%rbp)
movl   $0x0,-0x104(%rbp)
movl   $0x0,-0x108(%rbp)
lea    0xcb6(%rip),%rax
mov    %rax,-0x118(%rbp)
lea    0xcaa(%rip),%rax
mov    %rax,-0x120(%rbp)
cmpl   $0x0,-0x6c(%rbp)
jge    13b0 <extract_cmc1x_stars+0x1e0>
movl   $0x0,-0x6c(%rbp)
cmpq   $0x0,-0x78(%rbp)
jge    13c3 <extract_cmc1x_stars+0x1f3>
movq   $0x0,-0x78(%rbp)
jmp    13c8 <extract_cmc1x_stars+0x1f8>
xor    %eax,%eax
cmpl   $0x0,-0x108(%rbp)
mov    %al,-0x231(%rbp)
jl     13ec <extract_cmc1x_stars+0x21c>
mov    -0x6c(%rbp),%eax
cmp    -0x70(%rbp),%eax
setle  %al
mov    %al,-0x231(%rbp)
mov    -0x231(%rbp),%al
test   $0x1,%al
jne    13ff <extract_cmc1x_stars+0x22f>
jmp    1868 <extract_cmc1x_stars+0x698>
movq   $0x0,-0x128(%rbp)
cmpl   $0x13,-0x6c(%rbp)
jge    1434 <extract_cmc1x_stars+0x264>
lea    -0x150(%rbp),%rdi
mov    $0x12,%edx
sub    -0x6c(%rbp),%edx
lea    0xc1a(%rip),%rsi
call   10c0 <sprintf@plt>
jmp    144d <extract_cmc1x_stars+0x27d>
lea    -0x150(%rbp),%rdi
mov    -0x6c(%rbp),%edx
sub    $0x13,%edx
lea    0xc05(%rip),%rsi
call   10c0 <sprintf@plt>
cmpl   $0x0,-0x3c(%rbp)
je     146a <extract_cmc1x_stars+0x29a>
lea    -0x150(%rbp),%rdi
lea    0xbdd(%rip),%rsi
call   10b0 <strcat@plt>
movl   $0x0,-0x10c(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x128(%rbp)
mov    %al,-0x232(%rbp)
jne    149a <extract_cmc1x_stars+0x2ca>
cmpl   $0x8,-0x10c(%rbp)
setl   %al
mov    %al,-0x232(%rbp)
mov    -0x232(%rbp),%al
test   $0x1,%al
jne    14ad <extract_cmc1x_stars+0x2dd>
jmp    15e5 <extract_cmc1x_stars+0x415>
mov    -0x10c(%rbp),%edx
and    $0x4,%edx
mov    $0x35,%eax
mov    $0x34,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,-0x14c(%rbp)
mov    -0x10c(%rbp),%eax
and    $0x3,%eax
cmp    $0x2,%eax
jl     14e9 <extract_cmc1x_stars+0x319>
cmpq   $0x0,-0x38(%rbp)
jne    14f5 <extract_cmc1x_stars+0x325>
movb   $0x0,-0x210(%rbp)
jmp    1548 <extract_cmc1x_stars+0x378>
lea    -0x210(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x210(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%eax
cltq
movsbl -0x210(%rbp,%rax,1),%eax
ff
mov    -0x118(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1543 <extract_cmc1x_stars+0x373>
lea    -0x210(%rbp),%rdi
mov    -0x118(%rbp),%rsi
call   10b0 <strcat@plt>
jmp    1548 <extract_cmc1x_stars+0x378>
lea    -0x210(%rbp),%rdi
lea    -0x150(%rbp),%rsi
call   10b0 <strcat@plt>
lea    -0x210(%rbp),%rdi
mov    -0x10c(%rbp),%ecx
and    $0x1,%ecx
lea    0xae9(%rip),%rsi
lea    0xadd(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
call   10b0 <strcat@plt>
lea    -0x210(%rbp),%rdi
mov    -0x120(%rbp),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x128(%rbp)
cmpq   $0x0,-0x128(%rbp)
je     15cc <extract_cmc1x_stars+0x3fc>
mov    -0x10c(%rbp),%edx
and    $0x1,%edx
mov    $0x66,%eax
mov    $0x19,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x104(%rbp)
jmp    15d1 <extract_cmc1x_stars+0x401>
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
jmp    1474 <extract_cmc1x_stars+0x2a4>
cmpq   $0x0,-0x128(%rbp)
je     185a <extract_cmc1x_stars+0x68a>
movl   $0x0,-0x218(%rbp)
mov    -0x128(%rbp),%rdi
mov    0x29dd(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1090 <fseek@plt>
mov    -0x128(%rbp),%rdi
call   1070 <ftell@plt>
cltd
idivl  -0x104(%rbp)
mov    %eax,-0x214(%rbp)
movl   $0x8000000,-0x220(%rbp)
cmpl   $0x0,-0x220(%rbp)
je     1727 <extract_cmc1x_stars+0x557>
mov    -0x218(%rbp),%eax
add    -0x220(%rbp),%eax
mov    %eax,-0x21c(%rbp)
cmp    -0x214(%rbp),%eax
jge    170e <extract_cmc1x_stars+0x53e>
mov    -0x128(%rbp),%rdi
mov    -0x21c(%rbp),%esi
imul   -0x104(%rbp),%esi
mov    0x295b(%rip),%rax
mov    (%rax),%edx
call   1090 <fseek@plt>
lea    -0x100(%rbp),%rdi
mov    -0x104(%rbp),%esi
mov    -0x128(%rbp),%rcx
mov    $0x1,%edx
call   1040 <fread@plt>
cmp    $0x1,%eax
je     16c3 <extract_cmc1x_stars+0x4f3>
mov    -0x128(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x0,-0x4(%rbp)
jmp    1941 <extract_cmc1x_stars+0x771>
lea    -0x100(%rbp),%rdi
mov    -0x104(%rbp),%esi
call   10f0 <xvt_record@plt>
lea    -0x100(%rbp),%rdx
lea    -0x228(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1080 <get_cmc1x_ra_dec@plt>
mov    -0x228(%rbp),%rax
cmp    -0x78(%rbp),%rax
jge    1709 <extract_cmc1x_stars+0x539>
mov    -0x21c(%rbp),%eax
mov    %eax,-0x218(%rbp)
jmp    170e <extract_cmc1x_stars+0x53e>
jmp    1713 <extract_cmc1x_stars+0x543>
mov    -0x220(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x220(%rbp)
jmp    1637 <extract_cmc1x_stars+0x467>
mov    -0x128(%rbp),%rdi
mov    -0x218(%rbp),%esi
imul   -0x104(%rbp),%esi
mov    0x2896(%rip),%rax
mov    (%rax),%edx
call   1090 <fseek@plt>
movq   $0x0,-0x228(%rbp)
mov    -0x228(%rbp),%rcx
xor    %eax,%eax
cmp    -0x80(%rbp),%rcx
mov    %al,-0x233(%rbp)
jge    1797 <extract_cmc1x_stars+0x5c7>
lea    -0x100(%rbp),%rdi
mov    -0x104(%rbp),%esi
mov    -0x128(%rbp),%rcx
mov    $0x1,%edx
call   1040 <fread@plt>
cmp    $0x0,%eax
setne  %al
mov    %al,-0x233(%rbp)
mov    -0x233(%rbp),%al
test   $0x1,%al
jne    17aa <extract_cmc1x_stars+0x5da>
jmp    184e <extract_cmc1x_stars+0x67e>
lea    -0x100(%rbp),%rdi
mov    -0x104(%rbp),%esi
call   10f0 <xvt_record@plt>
lea    -0x100(%rbp),%rdx
lea    -0x228(%rbp),%rdi
lea    -0x230(%rbp),%rsi
call   1080 <get_cmc1x_ra_dec@plt>
mov    -0x228(%rbp),%rax
cmp    -0x78(%rbp),%rax
jl     1849 <extract_cmc1x_stars+0x679>
mov    -0x228(%rbp),%rax
cmp    -0x80(%rbp),%rax
jge    1849 <extract_cmc1x_stars+0x679>
mov    -0x230(%rbp),%rax
cmp    -0x88(%rbp),%rax
jle    1849 <extract_cmc1x_stars+0x679>
mov    -0x230(%rbp),%rax
cmp    -0x90(%rbp),%rax
jge    1849 <extract_cmc1x_stars+0x679>
lea    -0x100(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x66,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
jmp    1754 <extract_cmc1x_stars+0x584>
mov    -0x128(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    13c8 <extract_cmc1x_stars+0x1f8>
cmpl   $0x0,-0x108(%rbp)
jl     1938 <extract_cmc1x_stars+0x768>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1938 <extract_cmc1x_stars+0x768>
movsd  0x7a9(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1938 <extract_cmc1x_stars+0x768>
xorps  %xmm0,%xmm0
ucomisd -0x58(%rbp),%xmm0
jbe    18e0 <extract_cmc1x_stars+0x710>
mov    -0x10(%rbp),%rdi
movsd  0x784(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
mov    -0x38(%rbp),%rsi
mov    -0x3c(%rbp),%edx
call   10e0 <extract_cmc1x_stars@plt>
add    -0x108(%rbp),%eax
mov    %eax,-0x108(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  0x74b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1933 <extract_cmc1x_stars+0x763>
mov    -0x10(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
movsd  0x730(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
mov    -0x38(%rbp),%rsi
mov    -0x3c(%rbp),%edx
call   10e0 <extract_cmc1x_stars@plt>
add    -0x108(%rbp),%eax
mov    %eax,-0x108(%rbp)
jmp    1938 <extract_cmc1x_stars+0x768>
mov    -0x108(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x240,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_cmc1x_stars>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1e8,%rsp
mov    %edx,%r15d
mov    %rsi,%r13
mov    %rdi,0x8(%rsp)
movsd  0xe0c(%rip),%xmm4
movsd  %xmm3,0x38(%rsp)
movapd %xmm3,%xmm7
mulsd  %xmm4,%xmm7
movapd %xmm1,%xmm6
subsd  %xmm7,%xmm6
movsd  %xmm1,0x28(%rsp)
addsd  %xmm1,%xmm7
movsd  %xmm2,0x30(%rsp)
mulsd  %xmm2,%xmm4
movapd %xmm0,%xmm5
subsd  %xmm4,%xmm5
movsd  %xmm0,0x48(%rsp)
addsd  %xmm0,%xmm4
movsd  %xmm4,0x50(%rsp)
movsd  0xdca(%rip),%xmm2
movapd %xmm6,%xmm3
addsd  %xmm2,%xmm3
movsd  0xdc2(%rip),%xmm4
divsd  %xmm4,%xmm3
cvttsd2si %xmm3,%eax
addsd  %xmm7,%xmm2
divsd  %xmm4,%xmm2
cvttsd2si %xmm2,%ecx
movsd  0xdae(%rip),%xmm3
movsd  %xmm5,0x70(%rsp)
mulsd  %xmm3,%xmm5
movsd  0xda4(%rip),%xmm2
mulsd  %xmm2,%xmm5
movsd  0xda0(%rip),%xmm4
divsd  %xmm4,%xmm5
cvttsd2si %xmm5,%rdx
test   %eax,%eax
mov    $0xffffffff,%ebp
cmovns %eax,%ebp
xor    %ebx,%ebx
test   %rdx,%rdx
cmovs  %rbx,%rdx
mov    %rdx,0x68(%rsp)
mov    $0x1,%al
mov    %ecx,0x1c(%rsp)
cmp    %ecx,%ebp
jle    1370 <extract_cmc1x_stars+0x1a0>
movsd  0xd79(%rip),%xmm0
movsd  0x48(%rsp),%xmm1
ucomisd %xmm1,%xmm0
jbe    172d <extract_cmc1x_stars+0x55d>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jbe    172d <extract_cmc1x_stars+0x55d>
test   %al,%al
je     172d <extract_cmc1x_stars+0x55d>
xorpd  %xmm0,%xmm0
ucomisd 0x70(%rsp),%xmm0
jbe    1323 <extract_cmc1x_stars+0x153>
movsd  0xd3f(%rip),%xmm0
addsd  %xmm1,%xmm0
mov    0x8(%rsp),%rdi
movsd  0x28(%rsp),%xmm1
movsd  0x30(%rsp),%xmm2
movsd  0x38(%rsp),%xmm3
mov    %r13,%rsi
mov    %r15d,%edx
call   10e0 <extract_cmc1x_stars@plt>
add    %ebx,%eax
mov    %eax,%ebx
movsd  0x50(%rsp),%xmm0
ucomisd 0xd07(%rip),%xmm0
jbe    172d <extract_cmc1x_stars+0x55d>
movsd  0x48(%rsp),%xmm0
addsd  0xcfb(%rip),%xmm0
mov    0x8(%rsp),%rdi
movsd  0x28(%rsp),%xmm1
movsd  0x30(%rsp),%xmm2
movsd  0x38(%rsp),%xmm3
mov    %r13,%rsi
mov    %r15d,%edx
call   10e0 <extract_cmc1x_stars@plt>
add    %ebx,%eax
mov    %eax,%ebx
jmp    172d <extract_cmc1x_stars+0x55d>
mulsd  0x50(%rsp),%xmm3
mulsd  %xmm2,%xmm3
divsd  %xmm4,%xmm3
cvttsd2si %xmm3,%rax
mov    %rax,0x58(%rsp)
movsd  0xca0(%rip),%xmm3
mulsd  %xmm3,%xmm6
mulsd  %xmm2,%xmm6
cvttsd2si %xmm6,%rax
mov    %rax,0x80(%rsp)
mulsd  %xmm3,%xmm7
mulsd  %xmm2,%xmm7
cvttsd2si %xmm7,%rax
mov    %rax,0x78(%rsp)
xor    %r14d,%r14d
xor    %ebx,%ebx
mov    %r13,0x40(%rsp)
mov    %r15d,0x4(%rsp)
cmp    $0x11,%ebp
jg     13f0 <extract_cmc1x_stars+0x220>
mov    $0x11,%edx
sub    %ebp,%edx
lea    0x90(%rsp),%rdi
lea    0xc6b(%rip),%rsi
jmp    1402 <extract_cmc1x_stars+0x232>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    -0x12(%rbp),%edx
lea    0x90(%rsp),%rdi
lea    0xc53(%rip),%rsi
call   10c0 <sprintf@plt>
mov    %rbx,0x10(%rsp)
test   %r15d,%r15d
je     1425 <extract_cmc1x_stars+0x255>
lea    0x90(%rsp),%rdi
lea    0xc2a(%rip),%rsi
call   10b0 <strcat@plt>
mov    %rbp,0x60(%rsp)
lea    0x1(%rbp),%eax
mov    %eax,0x20(%rsp)
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
test   $0x4,%r15b
sete   %al
or     $0x34,%al
mov    %al,0x94(%rsp)
test   %r13,%r13
je     14a0 <extract_cmc1x_stars+0x2d0>
mov    %r15d,%eax
and    $0x2,%eax
je     14a0 <extract_cmc1x_stars+0x2d0>
lea    0xc0(%rsp),%rbx
mov    %rbx,%rdi
mov    %r13,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
cltq
cmpb   $0x2f,-0x1(%rax,%rbx,1)
je     14b0 <extract_cmc1x_stars+0x2e0>
mov    %rbx,%rdi
lea    0xbbd(%rip),%rsi
call   10b0 <strcat@plt>
jmp    14b0 <extract_cmc1x_stars+0x2e0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x0,0xc0(%rsp)
lea    0xc0(%rsp),%rbx
mov    %rbx,%rdi
lea    0x90(%rsp),%rsi
call   10b0 <strcat@plt>
test   $0x1,%r15b
lea    0xb93(%rip),%rsi
lea    0xb91(%rip),%rax
cmove  %rax,%rsi
mov    $0x19,%ebp
mov    $0x66,%eax
cmove  %eax,%ebp
mov    %rbx,%rdi
call   10b0 <strcat@plt>
mov    %rbx,%rdi
lea    0xb55(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%r12
test   %rax,%rax
cmovne %ebp,%r14d
jne    1517 <extract_cmc1x_stars+0x347>
lea    0x1(%r15),%eax
cmp    $0x7,%r15d
mov    %eax,%r15d
jb     1440 <extract_cmc1x_stars+0x270>
test   %r12,%r12
je     16e0 <extract_cmc1x_stars+0x510>
mov    0x2ac1(%rip),%rax
mov    (%rax),%edx
xor    %r13d,%r13d
mov    %r12,%rdi
xor    %esi,%esi
call   1090 <fseek@plt>
mov    %r12,%rdi
call   1070 <ftell@plt>
cltd
idiv   %r14d
mov    $0x8000000,%ebx
mov    %eax,0x24(%rsp)
jmp    155f <extract_cmc1x_stars+0x38f>
nopl   (%rax)
mov    %ebx,%ecx
shr    %ecx
cmp    $0x1,%ebx
mov    %ecx,%ebx
jbe    15e0 <extract_cmc1x_stars+0x410>
lea    (%rbx,%r13,1),%r15d
cmp    %eax,%r15d
jge    1550 <extract_cmc1x_stars+0x380>
mov    %r15d,%esi
imul   %r14d,%esi
mov    0x2a62(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
call   1090 <fseek@plt>
lea    0x180(%rsp),%rbp
mov    %rbp,%rdi
mov    %r14d,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1040 <fread@plt>
cmp    $0x1,%eax
jne    1723 <extract_cmc1x_stars+0x553>
mov    %rbp,%rdi
mov    %r14d,%esi
call   10f0 <xvt_record@plt>
lea    0xc0(%rsp),%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1080 <get_cmc1x_ra_dec@plt>
mov    0x68(%rsp),%rax
cmp    %rax,0xc0(%rsp)
cmovl  %r15d,%r13d
mov    0x24(%rsp),%eax
jmp    1550 <extract_cmc1x_stars+0x380>
nopl   0x0(%rax,%rax,1)
imul   %r14d,%r13d
mov    0x29ed(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
mov    %r13d,%esi
call   1090 <fseek@plt>
movq   $0x0,0xc0(%rsp)
cmpq   $0x0,0x58(%rsp)
jle    16e7 <extract_cmc1x_stars+0x517>
mov    0x40(%rsp),%r13
mov    0x10(%rsp),%rbx
mov    0x58(%rsp),%rbp
jmp    1639 <extract_cmc1x_stars+0x469>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    %rbp,%rax
jge    16f1 <extract_cmc1x_stars+0x521>
lea    0x180(%rsp),%r15
mov    %r15,%rdi
mov    %r14d,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1040 <fread@plt>
test   %eax,%eax
je     16f1 <extract_cmc1x_stars+0x521>
mov    %r15,%rdi
mov    %r14d,%esi
call   10f0 <xvt_record@plt>
lea    0xc0(%rsp),%rdi
lea    0x88(%rsp),%rsi
mov    %r15,%rdx
call   1080 <get_cmc1x_ra_dec@plt>
mov    0xc0(%rsp),%rax
cmp    0x68(%rsp),%rax
jl     1630 <extract_cmc1x_stars+0x460>
cmp    %rbp,%rax
jge    1630 <extract_cmc1x_stars+0x460>
mov    0x88(%rsp),%rcx
cmp    0x80(%rsp),%rcx
jle    1630 <extract_cmc1x_stars+0x460>
cmp    0x78(%rsp),%rcx
jge    1630 <extract_cmc1x_stars+0x460>
lea    0x180(%rsp),%rdi
mov    $0x66,%esi
mov    $0x1,%edx
mov    0x8(%rsp),%rcx
call   10d0 <fwrite@plt>
add    $0x1,%ebx
mov    0xc0(%rsp),%rax
jmp    1630 <extract_cmc1x_stars+0x460>
nopl   0x0(%rax,%rax,1)
mov    0x10(%rsp),%rbx
jmp    16f9 <extract_cmc1x_stars+0x529>
mov    0x40(%rsp),%r13
mov    0x10(%rsp),%rbx
mov    %r12,%rdi
call   1050 <fclose@plt>
mov    0x60(%rsp),%rcx
mov    0x4(%rsp),%r15d
test   %ebx,%ebx
setns  %al
js     12b7 <extract_cmc1x_stars+0xe7>
cmp    0x1c(%rsp),%ecx
mov    0x20(%rsp),%ecx
mov    %ecx,%ebp
jl     13c6 <extract_cmc1x_stars+0x1f6>
jmp    12b7 <extract_cmc1x_stars+0xe7>
mov    %r12,%rdi
call   1050 <fclose@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x1e8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [9 x i8] c"cmc15s%x\00"
@.str.3 = [9 x i8] c"cmc15n%x\00"
@.str.4 = [5 x i8] c".cmc\00"
@.str.5 = [5 x i8] c".dat\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @extract_cmc1x_stars(i32* %0, double %1, double %2, double %3, double %4, i8* %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32*
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca i8*
%15 = alloca i32
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca i32
%22 = alloca i32
%23 = alloca i64
%24 = alloca i64
%25 = alloca i64
%26 = alloca i64
%27 = alloca [103 x i8]
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i8*
%32 = alloca i8*
%33 = alloca i32*
%34 = alloca [40 x i8]
%35 = alloca [180 x i8]
%36 = alloca i32
%37 = alloca i32
%38 = alloca i32
%39 = alloca i32
%40 = alloca i64
%41 = alloca i64
store i32* %0, i32** %9
store double %1, double* %10
store double %2, double* %11
store double %3, double* %12
store double %4, double* %13
store i8* %5, i8** %14
store i32 %6, i32* %15
%42 = load double, double* %11
%43 = load double, double* %13
%44 = fdiv double %43, 2.000000e+00
%45 = fsub double %42, %44
store double %45, double* %16
%46 = load double, double* %11
%47 = load double, double* %13
%48 = fdiv double %47, 2.000000e+00
%49 = fadd double %46, %48
store double %49, double* %17
%50 = load double, double* %10
%51 = load double, double* %12
%52 = fdiv double %51, 2.000000e+00
%53 = fsub double %50, %52
store double %53, double* %18
%54 = load double, double* %10
%55 = load double, double* %12
%56 = fdiv double %55, 2.000000e+00
%57 = fadd double %54, %56
store double %57, double* %19
store double 5.000000e+00, double* %20
%58 = load double, double* %16
%59 = fadd double %58, 9.000000e+01
%60 = fdiv double %59, 5.000000e+00
%61 = fptosi double %60 to i32
%62 = add nsw i32 %61, 1
store i32 %62, i32* %21
%63 = load double, double* %17
%64 = fadd double %63, 9.000000e+01
%65 = fdiv double %64, 5.000000e+00
%66 = fptosi double %65 to i32
%67 = add nsw i32 %66, 1
store i32 %67, i32* %22
%68 = load double, double* %18
%69 = fmul double %68, 1.000000e+04
%70 = fmul double %69, 3.600000e+03
%71 = fdiv double %70, 1.500000e+01
%72 = fptosi double %71 to i64
store i64 %72, i64* %23
%73 = load double, double* %19
%74 = fmul double %73, 1.000000e+04
%75 = fmul double %74, 3.600000e+03
%76 = fdiv double %75, 1.500000e+01
%77 = fptosi double %76 to i64
store i64 %77, i64* %24
%78 = load double, double* %16
%79 = fmul double %78, 1.000000e+03
%80 = fmul double %79, 3.600000e+03
%81 = fptosi double %80 to i64
store i64 %81, i64* %25
%82 = load double, double* %17
%83 = fmul double %82, 1.000000e+03
%84 = fmul double %83, 3.600000e+03
%85 = fptosi double %84 to i64
store i64 %85, i64* %26
store i32 0, i32* %28
store i32 0, i32* %29
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %31
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %32
%86 = load i32, i32* %21
%87 = icmp slt i32 %86, 0
br i1 %87, label %88, label %89
88: ; preds = %7
store i32 0, i32* %21
br label %89
89: ; preds = %88, %7
%90 = load i64, i64* %23
%91 = icmp slt i64 %90, 0
br i1 %91, label %92, label %93
92: ; preds = %89
store i64 0, i64* %23
br label %93
93: ; preds = %92, %89
br label %94
94: ; preds = %295, %93
%95 = load i32, i32* %29
%96 = icmp sge i32 %95, 0
br i1 %96, label %97, label %101
97: ; preds = %94
%98 = load i32, i32* %21
%99 = load i32, i32* %22
%100 = icmp sle i32 %98, %99
br label %101
101: ; preds = %97, %94
%102 = phi i1 [ false, %94 ], [ %100, %97 ]
br i1 %102, label %103, label %298
103: ; preds = %101
store i32* null, i32** %33
%104 = load i32, i32* %21
%105 = icmp slt i32 %104, 19
br i1 %105, label %106, label %111
106: ; preds = %103
%107 = getelementptr inbounds [40 x i8], [40 x i8]* %34, i64 0, i64 0
%108 = load i32, i32* %21
%109 = sub nsw i32 18, %108
%110 = call i32 @sprintf(i8* %107, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %109)
br label %116
111: ; preds = %103
%112 = getelementptr inbounds [40 x i8], [40 x i8]* %34, i64 0, i64 0
%113 = load i32, i32* %21
%114 = sub nsw i32 %113, 19
%115 = call i32 @sprintf(i8* %112, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %114)
br label %116
116: ; preds = %111, %106
%117 = load i32, i32* %15
%118 = icmp ne i32 %117, 0
br i1 %118, label %119, label %122
119: ; preds = %116
%120 = getelementptr inbounds [40 x i8], [40 x i8]* %34, i64 0, i64 0
%121 = call i32 @strcat(i8* %120, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %122
122: ; preds = %119, %116
store i32 0, i32* %30
br label %123
123: ; preds = %191, %122
%124 = load i32*, i32** %33
%125 = icmp ne i32* %124, null
br i1 %125, label %129, label %126
126: ; preds = %123
%127 = load i32, i32* %30
%128 = icmp slt i32 %127, 8
br label %129
129: ; preds = %126, %123
%130 = phi i1 [ false, %123 ], [ %128, %126 ]
br i1 %130, label %131, label %194
131: ; preds = %129
%132 = load i32, i32* %30
%133 = and i32 %132, 4
%134 = icmp ne i32 %133, 0
%135 = zext i1 %134 to i64
%136 = select i1 %134, i32 52, i32 53
%137 = trunc i32 %136 to i8
%138 = getelementptr inbounds [40 x i8], [40 x i8]* %34, i64 0, i64 4
store i8 %137, i8* %138
%139 = load i32, i32* %30
%140 = and i32 %139, 3
%141 = icmp slt i32 %140, 2
br i1 %141, label %145, label %142
142: ; preds = %131
%143 = load i8*, i8** %14
%144 = icmp ne i8* %143, null
br i1 %144, label %147, label %145
145: ; preds = %142, %131
%146 = getelementptr inbounds [180 x i8], [180 x i8]* %35, i64 0, i64 0
store i8 0, i8* %146
br label %168
147: ; preds = %142
%148 = getelementptr inbounds [180 x i8], [180 x i8]* %35, i64 0, i64 0
%149 = load i8*, i8** %14
%150 = call i32 @strcpy(i8* %148, i8* %149)
%151 = getelementptr inbounds [180 x i8], [180 x i8]* %35, i64 0, i64 0
%152 = call i32 @strlen(i8* %151)
%153 = sub nsw i32 %152, 1
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds [180 x i8], [180 x i8]* %35, i64 0, i64 %154
%156 = load i8, i8* %155
%157 = sext i8 %156 to i32
%158 = load i8*, i8** %31
%159 = getelementptr inbounds i8, i8* %158, i64 0
%160 = load i8, i8* %159
%161 = sext i8 %160 to i32
%162 = icmp ne i32 %157, %161
br i1 %162, label %163, label %167
163: ; preds = %147
%164 = getelementptr inbounds [180 x i8], [180 x i8]* %35, i64 0, i64 0
%165 = load i8*, i8** %31
%166 = call i32 @strcat(i8* %164, i8* %165)
br label %167
167: ; preds = %163, %147
br label %168
168: ; preds = %167, %145
%169 = getelementptr inbounds [180 x i8], [180 x i8]* %35, i64 0, i64 0
%170 = getelementptr inbounds [40 x i8], [40 x i8]* %34, i64 0, i64 0
%171 = call i32 @strcat(i8* %169, i8* %170)
%172 = getelementptr inbounds [180 x i8], [180 x i8]* %35, i64 0, i64 0
%173 = load i32, i32* %30
%174 = and i32 %173, 1
%175 = icmp ne i32 %174, 0
%176 = zext i1 %175 to i64
%177 = select i1 %175, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0)
%178 = call i32 @strcat(i8* %172, i8* %177)
%179 = getelementptr inbounds [180 x i8], [180 x i8]* %35, i64 0, i64 0
%180 = load i8*, i8** %32
%181 = call i32* @fopen(i8* %179, i8* %180)
store i32* %181, i32** %33
%182 = load i32*, i32** %33
%183 = icmp ne i32* %182, null
br i1 %183, label %184, label %190
184: ; preds = %168
%185 = load i32, i32* %30
%186 = and i32 %185, 1
%187 = icmp ne i32 %186, 0
%188 = zext i1 %187 to i64
%189 = select i1 %187, i32 25, i32 102
store i32 %189, i32* %28
br label %190
190: ; preds = %184, %168
br label %191
191: ; preds = %190
%192 = load i32, i32* %30
%193 = add nsw i32 %192, 1
store i32 %193, i32* %30
br label %123
194: ; preds = %129
%195 = load i32*, i32** %33
%196 = icmp ne i32* %195, null
br i1 %196, label %197, label %295
197: ; preds = %194
store i32 0, i32* %37
%198 = load i32*, i32** %33
%199 = load i32, i32* @SEEK_END
%200 = call i32 @fseek(i32* %198, i32 0, i32 %199)
%201 = load i32*, i32** %33
%202 = call i32 @ftell(i32* %201)
%203 = load i32, i32* %28
%204 = sdiv i32 %202, %203
store i32 %204, i32* %36
store i32 134217728, i32* %39
br label %205
205: ; preds = %242, %197
%206 = load i32, i32* %39
%207 = icmp ne i32 %206, 0
br i1 %207, label %208, label %245
208: ; preds = %205
%209 = load i32, i32* %37
%210 = load i32, i32* %39
%211 = add nsw i32 %209, %210
store i32 %211, i32* %38
%212 = load i32, i32* %36
%213 = icmp slt i32 %211, %212
br i1 %213, label %214, label %241
214: ; preds = %208
%215 = load i32*, i32** %33
%216 = load i32, i32* %38
%217 = load i32, i32* %28
%218 = mul nsw i32 %216, %217
%219 = load i32, i32* @SEEK_SET
%220 = call i32 @fseek(i32* %215, i32 %218, i32 %219)
%221 = getelementptr inbounds [103 x i8], [103 x i8]* %27, i64 0, i64 0
%222 = load i32, i32* %28
%223 = load i32*, i32** %33
%224 = call i32 @fread(i8* %221, i32 %222, i32 1, i32* %223)
%225 = icmp ne i32 %224, 1
br i1 %225, label %226, label %229
226: ; preds = %214
%227 = load i32*, i32** %33
%228 = call i32 @fclose(i32* %227)
store i32 0, i32* %8
br label %340
229: ; preds = %214
%230 = getelementptr inbounds [103 x i8], [103 x i8]* %27, i64 0, i64 0
%231 = load i32, i32* %28
%232 = call i32 @xvt_record(i8* %230, i32 %231)
%233 = getelementptr inbounds [103 x i8], [103 x i8]* %27, i64 0, i64 0
%234 = call i32 @get_cmc1x_ra_dec(i64* %40, i64* null, i8* %233)
%235 = load i64, i64* %40
%236 = load i64, i64* %23
%237 = icmp slt i64 %235, %236
br i1 %237, label %238, label %240
238: ; preds = %229
%239 = load i32, i32* %38
store i32 %239, i32* %37
br label %240
240: ; preds = %238, %229
br label %241
241: ; preds = %240, %208
br label %242
242: ; preds = %241
%243 = load i32, i32* %39
%244 = ashr i32 %243, 1
store i32 %244, i32* %39
br label %205
245: ; preds = %205
%246 = load i32*, i32** %33
%247 = load i32, i32* %37
%248 = load i32, i32* %28
%249 = mul nsw i32 %247, %248
%250 = load i32, i32* @SEEK_SET
%251 = call i32 @fseek(i32* %246, i32 %249, i32 %250)
store i64 0, i64* %40
br label %252
252: ; preds = %291, %245
%253 = load i64, i64* %40
%254 = load i64, i64* %24
%255 = icmp slt i64 %253, %254
br i1 %255, label %256, label %262
256: ; preds = %252
%257 = getelementptr inbounds [103 x i8], [103 x i8]* %27, i64 0, i64 0
%258 = load i32, i32* %28
%259 = load i32*, i32** %33
%260 = call i32 @fread(i8* %257, i32 %258, i32 1, i32* %259)
%261 = icmp ne i32 %260, 0
br label %262
262: ; preds = %256, %252
%263 = phi i1 [ false, %252 ], [ %261, %256 ]
br i1 %263, label %264, label %292
264: ; preds = %262
%265 = getelementptr inbounds [103 x i8], [103 x i8]* %27, i64 0, i64 0
%266 = load i32, i32* %28
%267 = call i32 @xvt_record(i8* %265, i32 %266)
%268 = getelementptr inbounds [103 x i8], [103 x i8]* %27, i64 0, i64 0
%269 = call i32 @get_cmc1x_ra_dec(i64* %40, i64* %41, i8* %268)
%270 = load i64, i64* %40
%271 = load i64, i64* %23
%272 = icmp sge i64 %270, %271
br i1 %272, label %273, label %291
273: ; preds = %264
%274 = load i64, i64* %40
%275 = load i64, i64* %24
%276 = icmp slt i64 %274, %275
br i1 %276, label %277, label %291
277: ; preds = %273
%278 = load i64, i64* %41
%279 = load i64, i64* %25
%280 = icmp sgt i64 %278, %279
br i1 %280, label %281, label %291
281: ; preds = %277
%282 = load i64, i64* %41
%283 = load i64, i64* %26
%284 = icmp slt i64 %282, %283
br i1 %284, label %285, label %291
285: ; preds = %281
%286 = getelementptr inbounds [103 x i8], [103 x i8]* %27, i64 0, i64 0
%287 = load i32*, i32** %9
%288 = call i32 @fwrite(i8* %286, i32 102, i32 1, i32* %287)
%289 = load i32, i32* %29
%290 = add nsw i32 %289, 1
store i32 %290, i32* %29
br label %291
291: ; preds = %285, %281, %277, %273, %264
br label %252
292: ; preds = %262
%293 = load i32*, i32** %33
%294 = call i32 @fclose(i32* %293)
br label %295
295: ; preds = %292, %194
%296 = load i32, i32* %21
%297 = add nsw i32 %296, 1
store i32 %297, i32* %21
br label %94
298: ; preds = %101
%299 = load i32, i32* %29
%300 = icmp sge i32 %299, 0
br i1 %300, label %301, label %338
301: ; preds = %298
%302 = load double, double* %10
%303 = fcmp ogt double %302, 0.000000e+00
br i1 %303, label %304, label %338
304: ; preds = %301
%305 = load double, double* %10
%306 = fcmp olt double %305, 3.600000e+02
br i1 %306, label %307, label %338
307: ; preds = %304
%308 = load double, double* %18
%309 = fcmp olt double %308, 0.000000e+00
br i1 %309, label %310, label %322
310: ; preds = %307
%311 = load i32*, i32** %9
%312 = load double, double* %10
%313 = fadd double %312, 3.600000e+02
%314 = load double, double* %11
%315 = load double, double* %12
%316 = load double, double* %13
%317 = load i8*, i8** %14
%318 = load i32, i32* %15
%319 = call i32 @extract_cmc1x_stars(i32* %311, double %313, double %314, double %315, double %316, i8* %317, i32 %318)
%320 = load i32, i32* %29
%321 = add nsw i32 %320, %319
store i32 %321, i32* %29
br label %322
322: ; preds = %310, %307
%323 = load double, double* %19
%324 = fcmp ogt double %323, 3.600000e+02
br i1 %324, label %325, label %337
325: ; preds = %322
%326 = load i32*, i32** %9
%327 = load double, double* %10
%328 = fsub double %327, 3.600000e+02
%329 = load double, double* %11
%330 = load double, double* %12
%331 = load double, double* %13
%332 = load i8*, i8** %14
%333 = load i32, i32* %15
%334 = call i32 @extract_cmc1x_stars(i32* %326, double %328, double %329, double %330, double %331, i8* %332, i32 %333)
%335 = load i32, i32* %29
%336 = add nsw i32 %335, %334
store i32 %336, i32* %29
br label %337
337: ; preds = %325, %322
br label %338
338: ; preds = %337, %304, %301, %298
%339 = load i32, i32* %29
store i32 %339, i32* %8
br label %340
340: ; preds = %338, %226
%341 = load i32, i32* %8
ret i32 %341
}

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [9 x i8] c"cmc15s%x\00"
@.str.3 = [9 x i8] c"cmc15n%x\00"
@.str.4 = [5 x i8] c".cmc\00"
@.str.5 = [5 x i8] c".dat\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @extract_cmc1x_stars(i32* %0, double %1, double %2, double %3, double %4, i8* %5, i32 %6) {
%8 = alloca [103 x i8]
%9 = alloca [40 x i8]
%10 = alloca [180 x i8]
%11 = alloca i64
%12 = alloca i64
%13 = fmul double %4, 5.000000e-01
%14 = fsub double %2, %13
%15 = fadd double %13, %2
%16 = fmul double %3, 5.000000e-01
%17 = fsub double %1, %16
%18 = fadd double %16, %1
%19 = fadd double %14, 9.000000e+01
%20 = fdiv double %19, 5.000000e+00
%21 = fptosi double %20 to i32
%22 = fadd double %15, 9.000000e+01
%23 = fdiv double %22, 5.000000e+00
%24 = fptosi double %23 to i32
%25 = fmul double %17, 1.000000e+04
%26 = fmul double %25, 3.600000e+03
%27 = fdiv double %26, 1.500000e+01
%28 = fptosi double %27 to i64
%29 = fmul double %18, 1.000000e+04
%30 = fmul double %29, 3.600000e+03
%31 = fdiv double %30, 1.500000e+01
%32 = fptosi double %31 to i64
%33 = fmul double %14, 1.000000e+03
%34 = fmul double %33, 3.600000e+03
%35 = fptosi double %34 to i64
%36 = fmul double %15, 1.000000e+03
%37 = fmul double %36, 3.600000e+03
%38 = fptosi double %37 to i64
%39 = getelementptr inbounds [103 x i8], [103 x i8]* %8, i64 0, i64 0
%40 = icmp sgt i32 %21, -1
%41 = select i1 %40, i32 %21, i32 -1
%42 = icmp sgt i64 %28, 0
%43 = select i1 %42, i64 %28, i64 0
%44 = icmp sgt i32 %41, %24
br i1 %44, label %168, label %45
45: ; preds = %7
%46 = getelementptr inbounds [40 x i8], [40 x i8]* %9, i64 0, i64 0
%47 = icmp eq i32 %6, 0
%48 = getelementptr inbounds [180 x i8], [180 x i8]* %10, i64 0, i64 0
%49 = getelementptr inbounds [40 x i8], [40 x i8]* %9, i64 0, i64 4
%50 = icmp ne i8* %5, null
%51 = bitcast i64* %11 to i8*
%52 = bitcast i64* %12 to i8*
%53 = icmp sgt i64 %32, 0
br label %54
54: ; preds = %45, %163
%55 = phi i32 [ %41, %45 ], [ %58, %163 ]
%56 = phi i32 [ 0, %45 ], [ %99, %163 ]
%57 = phi i32 [ 0, %45 ], [ %164, %163 ]
%58 = add nsw i32 %55, 1
%59 = icmp slt i32 %55, 18
br i1 %59, label %60, label %63
60: ; preds = %54
%61 = sub i32 17, %55
%62 = call i32 @sprintf(i8* %46, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %61)
br label %66
63: ; preds = %54
%64 = add nsw i32 %55, -18
%65 = call i32 @sprintf(i8* %46, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %64)
br label %66
66: ; preds = %63, %60
br i1 %47, label %69, label %67
67: ; preds = %66
%68 = call i32 @strcat(i8* %46, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %69
69: ; preds = %67, %66
br label %70
70: ; preds = %69, %90
%71 = phi i32 [ %99, %90 ], [ %56, %69 ]
%72 = phi i32 [ %100, %90 ], [ 0, %69 ]
%73 = and i32 %72, 4
%74 = icmp eq i32 %73, 0
%75 = select i1 %74, i8 53, i8 52
store i8 %75, i8* %49
%76 = and i32 %72, 2
%77 = icmp ne i32 %76, 0
%78 = and i1 %50, %77
br i1 %78, label %80, label %79
79: ; preds = %70
store i8 0, i8* %48
br label %90
80: ; preds = %70
%81 = call i32 @strcpy(i8* %48, i8* %5)
%82 = call i32 @strlen(i8* %48)
%83 = add nsw i32 %82, -1
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [180 x i8], [180 x i8]* %10, i64 0, i64 %84
%86 = load i8, i8* %85
%87 = icmp eq i8 %86, 47
br i1 %87, label %90, label %88
88: ; preds = %80
%89 = call i32 @strcat(i8* %48, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %90
90: ; preds = %80, %88, %79
%91 = call i32 @strcat(i8* %48, i8* %46)
%92 = and i32 %72, 1
%93 = icmp eq i32 %92, 0
%94 = select i1 %93, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0)
%95 = call i32 @strcat(i8* %48, i8* %94)
%96 = call i32* @fopen(i8* %48, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%97 = icmp eq i32* %96, null
%98 = select i1 %93, i32 102, i32 25
%99 = select i1 %97, i32 %71, i32 %98
%100 = add nuw nsw i32 %72, 1
%101 = icmp ult i32 %72, 7
%102 = select i1 %97, i1 %101, i1 false
br i1 %102, label %70, label %103
103: ; preds = %90
br i1 %97, label %163, label %104
104: ; preds = %103
%105 = load i32, i32* @SEEK_END
%106 = call i32 @fseek(i32* %96, i32 0, i32 %105)
%107 = call i32 @ftell(i32* %96)
%108 = sdiv i32 %107, %99
br label %109
109: ; preds = %104, %126
%110 = phi i32 [ 134217728, %104 ], [ %128, %126 ]
%111 = phi i32 [ 0, %104 ], [ %127, %126 ]
%112 = add nsw i32 %110, %111
%113 = icmp slt i32 %112, %108
br i1 %113, label %114, label %126
114: ; preds = %109
%115 = mul nsw i32 %112, %99
%116 = load i32, i32* @SEEK_SET
%117 = call i32 @fseek(i32* %96, i32 %115, i32 %116)
%118 = call i32 @fread(i8* %39, i32 %99, i32 1, i32* %96)
%119 = icmp eq i32 %118, 1
br i1 %119, label %120, label %161
120: ; preds = %114
%121 = call i32 @xvt_record(i8* %39, i32 %99)
%122 = call i32 @get_cmc1x_ra_dec(i64* %11, i64* null, i8* %39)
%123 = load i64, i64* %11
%124 = icmp slt i64 %123, %43
%125 = select i1 %124, i32 %112, i32 %111
br label %126
126: ; preds = %120, %109
%127 = phi i32 [ %111, %109 ], [ %125, %120 ]
%128 = lshr i32 %110, 1
%129 = icmp ult i32 %110, 2
br i1 %129, label %130, label %109
130: ; preds = %126
%131 = mul nsw i32 %127, %99
%132 = load i32, i32* @SEEK_SET
%133 = call i32 @fseek(i32* %96, i32 %131, i32 %132)
store i64 0, i64* %11
br i1 %53, label %134, label %158
134: ; preds = %130, %154
%135 = phi i32 [ %156, %154 ], [ %57, %130 ]
%136 = call i32 @fread(i8* %39, i32 %99, i32 1, i32* %96)
%137 = icmp eq i32 %136, 0
br i1 %137, label %158, label %138
138: ; preds = %134
%139 = call i32 @xvt_record(i8* %39, i32 %99)
%140 = call i32 @get_cmc1x_ra_dec(i64* %11, i64* %12, i8* %39)
%141 = load i64, i64* %11
%142 = icmp sge i64 %141, %43
%143 = icmp slt i64 %141, %32
%144 = select i1 %142, i1 %143, i1 false
br i1 %144, label %145, label %154
145: ; preds = %138
%146 = load i64, i64* %12
%147 = icmp sgt i64 %146, %35
%148 = icmp slt i64 %146, %38
%149 = select i1 %147, i1 %148, i1 false
br i1 %149, label %150, label %154
150: ; preds = %145
%151 = call i32 @fwrite(i8* %39, i32 102, i32 1, i32* %0)
%152 = add nsw i32 %135, 1
%153 = load i64, i64* %11
br label %154
154: ; preds = %150, %145, %138
%155 = phi i64 [ %153, %150 ], [ %141, %145 ], [ %141, %138 ]
%156 = phi i32 [ %152, %150 ], [ %135, %145 ], [ %135, %138 ]
%157 = icmp slt i64 %155, %32
br i1 %157, label %134, label %158
158: ; preds = %154, %134, %130
%159 = phi i32 [ %57, %130 ], [ %135, %134 ], [ %156, %154 ]
%160 = call i32 @fclose(i32* %96)
br label %163
161: ; preds = %114
%162 = call i32 @fclose(i32* %96)
br label %188
163: ; preds = %158, %103
%164 = phi i32 [ %159, %158 ], [ %57, %103 ]
%165 = icmp sgt i32 %164, -1
%166 = icmp slt i32 %55, %24
%167 = select i1 %165, i1 %166, i1 false
br i1 %167, label %54, label %168
168: ; preds = %163, %7
%169 = phi i32 [ 0, %7 ], [ %164, %163 ]
%170 = phi i1 [ true, %7 ], [ %165, %163 ]
%171 = fcmp ogt double %1, 0.000000e+00
%172 = and i1 %171, %170
%173 = fcmp olt double %1, 3.600000e+02
%174 = and i1 %173, %172
br i1 %174, label %175, label %188
175: ; preds = %168
%176 = fcmp olt double %17, 0.000000e+00
br i1 %176, label %177, label %181
177: ; preds = %175
%178 = fadd double %1, 3.600000e+02
%179 = call i32 @extract_cmc1x_stars(i32* %0, double %178, double %2, double %3, double %4, i8* %5, i32 %6)
%180 = add nsw i32 %179, %169
br label %181
181: ; preds = %177, %175
%182 = phi i32 [ %180, %177 ], [ %169, %175 ]
%183 = fcmp ogt double %18, 3.600000e+02
br i1 %183, label %184, label %188
184: ; preds = %181
%185 = fadd double %1, -3.600000e+02
%186 = call i32 @extract_cmc1x_stars(i32* %0, double %185, double %2, double %3, double %4, i8* %5, i32 %6)
%187 = add nsw i32 %186, %182
br label %188
188: ; preds = %161, %168, %184, %181
%189 = phi i32 [ %187, %184 ], [ %182, %181 ], [ %169, %168 ], [ 0, %161 ]
ret i32 %189
}