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

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ assert(int /*<<< orphan*/ *);
double atof(char *);
int atoi(char const *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char const *);
int main(const int argc, const char **argv) {
  const char *output_filename = "all_eops.txt";
  const char *input_filename = "finals.all";
  FILE *ifile, *ofile;
  char buff[200];
  int starting_mjd = 0, stepsize = 1, i;
  int n_iers = 0, n_part_iers = 0, n_predicts = 0, n_part_predicts = 0;
  double tdt_minus_utc = 44.184;
  double prev_ut1_minus_utc = 0.808;
  const char *header_line =
      " PM-x (arcsec) PM-y  TDT-UT1     dPsi (mas) dEps\n";
  for (i = 1; i < argc; i++)
    if (argv[i][0] == '-')
      switch (argv[i][1]) {
      case 'i':
        input_filename = argv[i] + 2;
        break;
      case 'o':
        output_filename = argv[i] + 2;
        break;
      case 's':
        stepsize = atoi(argv[i] + 2);
        break;
      default:
        printf("Command-line option '%s' unrecognized\n", argv[i]);
        return (-1);
      }
  ifile = fopen(input_filename, "rb");
  assert(ifile);
  ofile = fopen(output_filename, "wb");
  assert(ofile);
  fwrite(buff, 70, 1, ofile);
  fprintf(ofile, "%s", header_line);
  for (i = 0; fgets(buff, sizeof(buff), ifile) && buff[16] != ' '; i++)
    if (!(i % stepsize)) {
      const double ut1_minus_utc = atof(buff + 58);
      if (!i)
        starting_mjd = atoi(buff + 7);
      if (prev_ut1_minus_utc - ut1_minus_utc < -0.5)
        tdt_minus_utc += 1.;
      prev_ut1_minus_utc = ut1_minus_utc;
      fprintf(ofile, "%.9s %.9s %10.7f %.8s %.8s\n", buff + 18, buff + 37,
              tdt_minus_utc - ut1_minus_utc, buff + 98, buff + 117);
      if (buff[95] == 'I' || i < 2900)
        n_iers++;
      if (buff[16] == 'I')
        n_part_iers++;
      if (buff[95] != ' ')
        n_predicts++;
      n_part_predicts++;
    }
  fprintf(ofile, "%s", header_line);
  fprintf(ofile, "Above was derived from\n"
                 "ftp://maia.usno.navy.mil/ser7/finals.all\n"
                 "with only the five Bulletin A earth orientation parameters\n"
                 "extracted (no sigmas,  BullB,  etc.)\n"
                 "Run with 'eop_proc' version "
                 "Mar 15 2022"
                 " "
                 "20:43:41"
                 "\n");
  fseek(ofile, 0L, SEEK_SET);
  fprintf(ofile, "See bottom of file for description\n");
  fprintf(ofile, "%5d %5d %5d %5d %5d %5d\n", starting_mjd, stepsize,
          starting_mjd + stepsize * n_iers,
          starting_mjd + stepsize * n_part_iers,
          starting_mjd + stepsize * n_predicts,
          starting_mjd + stepsize * n_part_predicts);
  fclose(ofile);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe60(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xe62(%rip),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x104(%rbp)
movl   $0x1,-0x108(%rbp)
movl   $0x0,-0x110(%rbp)
movl   $0x0,-0x114(%rbp)
movl   $0x0,-0x118(%rbp)
movl   $0x0,-0x11c(%rbp)
movsd  0xdf5(%rip),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  0xddd(%rip),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
lea    0xe06(%rip),%rax
mov    %rax,-0x138(%rbp)
movl   $0x1,-0x10c(%rbp)
mov    -0x10c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    135c <main+0x1bc>
mov    -0x10(%rbp),%rax
movslq -0x10c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1343 <main+0x1a3>
mov    -0x10(%rbp),%rax
movslq -0x10c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
mov    %eax,-0x144(%rbp)
sub    $0x69,%eax
je     12bc <main+0x11c>
jmp    1294 <main+0xf4>
mov    -0x144(%rbp),%eax
sub    $0x6f,%eax
je     12d8 <main+0x138>
jmp    12a8 <main+0x108>
mov    -0x144(%rbp),%eax
sub    $0x73,%eax
je     12f4 <main+0x154>
jmp    1317 <main+0x177>
mov    -0x10(%rbp),%rax
movslq -0x10c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
add    $0x2,%rax
mov    %rax,-0x20(%rbp)
jmp    133e <main+0x19e>
mov    -0x10(%rbp),%rax
movslq -0x10c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
add    $0x2,%rax
mov    %rax,-0x18(%rbp)
jmp    133e <main+0x19e>
mov    -0x10(%rbp),%rax
movslq -0x10c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x2,%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x108(%rbp)
jmp    133e <main+0x19e>
mov    -0x10(%rbp),%rax
movslq -0x10c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xd3d(%rip),%rdi
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1684 <main+0x4e4>
jmp    1343 <main+0x1a3>
jmp    1348 <main+0x1a8>
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
jmp    1243 <main+0xa3>
mov    -0x20(%rbp),%rdi
lea    0xd2a(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1070 <assert@plt>
mov    -0x18(%rbp),%rdi
lea    0xd10(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
call   1070 <assert@plt>
lea    -0x100(%rbp),%rdi
mov    -0x30(%rbp),%rcx
mov    $0x46,%esi
mov    $0x1,%edx
call   10c0 <fwrite@plt>
mov    -0x30(%rbp),%rdi
mov    -0x138(%rbp),%rdx
lea    0xcd5(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x0,-0x10c(%rbp)
lea    -0x100(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    $0xc8,%esi
call   1060 <fgets@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x145(%rbp)
je     1410 <main+0x270>
movsbl -0xf0(%rbp),%eax
cmp    $0x20,%eax
setne  %al
mov    %al,-0x145(%rbp)
mov    -0x145(%rbp),%al
test   $0x1,%al
jne    1423 <main+0x283>
jmp    15a1 <main+0x401>
mov    -0x10c(%rbp),%eax
cltd
idivl  -0x108(%rbp)
cmp    $0x0,%edx
jne    1588 <main+0x3e8>
lea    -0x100(%rbp),%rdi
add    $0x3a,%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x140(%rbp)
ff
cmpl   $0x0,-0x10c(%rbp)
jne    1474 <main+0x2d4>
lea    -0x100(%rbp),%rdi
add    $0x7,%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x104(%rbp)
movsd  -0x130(%rbp),%xmm1
ff
subsd  -0x140(%rbp),%xmm1
ff
movsd  0xb84(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    14ae <main+0x30e>
movsd  0xb7a(%rip),%xmm0
addsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x140(%rbp),%xmm0
ff
movsd  %xmm0,-0x130(%rbp)
ff
mov    -0x30(%rbp),%rdi
lea    -0x100(%rbp),%rdx
add    $0x12,%rdx
lea    -0x100(%rbp),%rcx
add    $0x25,%rcx
movsd  -0x128(%rbp),%xmm0
ff
subsd  -0x140(%rbp),%xmm0
ff
lea    -0x100(%rbp),%r8
add    $0x62,%r8
lea    -0x100(%rbp),%r9
add    $0x75,%r9
lea    0xb95(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
movsbl -0xa1(%rbp),%eax
cmp    $0x49,%eax
je     152c <main+0x38c>
cmpl   $0xb54,-0x10c(%rbp)
jge    153b <main+0x39b>
mov    -0x110(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x110(%rbp)
movsbl -0xf0(%rbp),%eax
cmp    $0x49,%eax
jne    155a <main+0x3ba>
mov    -0x114(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x114(%rbp)
movsbl -0xa1(%rbp),%eax
cmp    $0x20,%eax
je     1579 <main+0x3d9>
mov    -0x118(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x118(%rbp)
mov    -0x11c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x11c(%rbp)
jmp    158d <main+0x3ed>
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
jmp    13d3 <main+0x233>
mov    -0x30(%rbp),%rdi
mov    -0x138(%rbp),%rdx
lea    0xae4(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xaf1(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x30(%rbp),%rdi
mov    0x2a09(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1090 <fseek@plt>
mov    -0x30(%rbp),%rdi
lea    0xb9b(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x104(%rbp),%edx
mov    -0x108(%rbp),%ecx
mov    -0x104(%rbp),%r8d
mov    -0x108(%rbp),%eax
imul   -0x110(%rbp),%eax
add    %eax,%r8d
mov    -0x104(%rbp),%r9d
mov    -0x108(%rbp),%eax
imul   -0x114(%rbp),%eax
add    %eax,%r9d
mov    -0x104(%rbp),%r10d
mov    -0x108(%rbp),%eax
imul   -0x118(%rbp),%eax
add    %eax,%r10d
mov    -0x104(%rbp),%eax
mov    -0x108(%rbp),%esi
imul   -0x11c(%rbp),%esi
add    %esi,%eax
lea    0xb47(%rip),%rsi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x30(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x108,%rsp
cmp    $0x2,%edi
jl     1225 <main+0x85>
mov    %rsi,%rbp
mov    %edi,%r12d
lea    0xe72(%rip),%r15
movl   $0x1,0x4(%rsp)
lea    0xe56(%rip),%r14
mov    $0x1,%ebx
jmp    11e9 <main+0x49>
add    $0x2,%rsi
mov    %rsi,%r14
add    $0x1,%rbx
cmp    %rbx,%r12
je     123b <main+0x9b>
mov    0x0(%rbp,%rbx,8),%rsi
cmpb   $0x2d,(%rsi)
jne    11e0 <main+0x40>
movsbl 0x1(%rsi),%eax
cmp    $0x73,%eax
je     1213 <main+0x73>
cmp    $0x6f,%eax
je     11d9 <main+0x39>
cmp    $0x69,%eax
jne    15c1 <main+0x421>
add    $0x2,%rsi
mov    %rsi,%r15
jmp    11e0 <main+0x40>
add    $0x2,%rsi
mov    %rsi,%rdi
call   10b0 <atoi@plt>
mov    %eax,0x4(%rsp)
jmp    11e0 <main+0x40>
lea    0xdfc(%rip),%r14
movl   $0x1,0x4(%rsp)
lea    0xdfa(%rip),%r15
lea    0xe57(%rip),%rsi
mov    %r15,%rdi
call   10a0 <fopen@plt>
mov    %rax,%rbp
mov    %rax,%rdi
call   1070 <assert@plt>
lea    0xe40(%rip),%rsi
mov    %r14,%rdi
call   10a0 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1070 <assert@plt>
lea    0x40(%rsp),%r14
mov    %r14,%rdi
mov    $0x46,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10c0 <fwrite@plt>
lea    0xdb0(%rip),%rdi
mov    $0x31,%esi
mov    $0x1,%edx
mov    %rbx,0x8(%rsp)
mov    %rbx,%rcx
call   10c0 <fwrite@plt>
mov    %r14,%rdi
mov    $0xc8,%esi
mov    %rbp,%rdx
call   1060 <fgets@plt>
mov    $0x0,%r12d
mov    $0x0,%r15d
mov    $0x0,%ebx
mov    $0x0,%r14d
mov    $0x0,%r13d
test   %rax,%rax
je     1501 <main+0x361>
cmpb   $0x20,0x50(%rsp)
mov    $0x0,%r12d
mov    $0x0,%r15d
mov    $0x0,%ebx
mov    $0x0,%r14d
mov    $0x0,%r13d
je     1501 <main+0x361>
lea    0x7a(%rsp),%rdi
lea    0x47(%rsp),%rbx
lea    0x52(%rsp),%r14
lea    0x65(%rsp),%r15
lea    0xa2(%rsp),%r12
lea    0xb5(%rsp),%r13
call   1030 <atof@plt>
movaps %xmm0,0x10(%rsp)
mov    %rbx,%rdi
call   10b0 <atoi@plt>
movsd  0xcbd(%rip),%xmm0
movapd 0x10(%rsp),%xmm2
subsd  %xmm2,%xmm0
movsd  0xcb3(%rip),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
mov    %eax,(%rsp)
lea    0xcb0(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
movapd %xmm0,0x30(%rsp)
subsd  %xmm2,%xmm0
lea    0xd21(%rip),%rsi
mov    0x8(%rsp),%rdi
mov    %r14,%rdx
mov    %r15,%rcx
mov    %r12,%r8
mov    %r13,%r9
mov    $0x1,%al
call   1080 <fprintf@plt>
xor    %ebx,%ebx
cmpb   $0x49,0x50(%rsp)
sete   %bl
xor    %r14d,%r14d
cmpb   $0x20,0x9f(%rsp)
20
setne  %r14b
lea    0x40(%rsp),%rdi
mov    $0xc8,%esi
mov    %rbp,%rdx
call   1060 <fgets@plt>
mov    $0x1,%r15d
test   %rax,%rax
je     14f7 <main+0x357>
cmpb   $0x20,0x50(%rsp)
je     14f7 <main+0x357>
mov    $0x1,%r13d
mov    $0x1,%r15d
mov    $0x1,%r12d
nopl   (%rax)
mov    %r12d,%eax
cltd
idivl  0x4(%rsp)
test   %edx,%edx
jne    14cf <main+0x32f>
lea    0x7a(%rsp),%rdi
call   1030 <atof@plt>
movapd 0x10(%rsp),%xmm3
subsd  %xmm0,%xmm3
movapd %xmm0,%xmm2
movsd  %xmm0,0x28(%rsp)
movapd 0x30(%rsp),%xmm1
movapd %xmm1,%xmm0
addsd  0xbe0(%rip),%xmm0
cmpltsd 0xbcf(%rip),%xmm3
andpd  %xmm3,%xmm0
andnpd %xmm1,%xmm3
orpd   %xmm0,%xmm3
movapd %xmm3,0x10(%rsp)
movapd %xmm3,%xmm0
subsd  %xmm2,%xmm0
mov    0x8(%rsp),%rdi
lea    0xc40(%rip),%rsi
lea    0x52(%rsp),%rdx
lea    0x65(%rsp),%rcx
lea    0xa2(%rsp),%r8
lea    0xb5(%rsp),%r9
mov    $0x1,%al
call   1080 <fprintf@plt>
movzbl 0x9f(%rsp),%eax
cmp    $0x49,%al
sete   %cl
cmp    $0xb54,%r12d
setb   %dl
or     %cl,%dl
movzbl %dl,%ecx
add    %ecx,%r15d
xor    %ecx,%ecx
cmpb   $0x49,0x50(%rsp)
sete   %cl
add    %ecx,%ebx
xor    %ecx,%ecx
cmp    $0x20,%al
setne  %cl
add    %ecx,%r14d
add    $0x1,%r13d
movaps 0x10(%rsp),%xmm0
movaps %xmm0,0x30(%rsp)
movsd  0x28(%rsp),%xmm0
movapd %xmm0,0x10(%rsp)
lea    0x40(%rsp),%rdi
mov    $0xc8,%esi
mov    %rbp,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     14fd <main+0x35d>
add    $0x1,%r12d
cmpb   $0x20,0x50(%rsp)
jne    13f0 <main+0x250>
jmp    14fd <main+0x35d>
mov    $0x1,%r13d
mov    (%rsp),%r12d
lea    0xb38(%rip),%rdi
mov    $0x31,%esi
mov    $0x1,%edx
mov    0x8(%rsp),%rbp
mov    %rbp,%rcx
call   10c0 <fwrite@plt>
lea    0xb95(%rip),%rdi
mov    $0xd1,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10c0 <fwrite@plt>
mov    0x2aa1(%rip),%rax
mov    (%rax),%edx
mov    %rbp,%rdi
xor    %esi,%esi
call   1090 <fseek@plt>
lea    0xc3b(%rip),%rdi
mov    $0x23,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10c0 <fwrite@plt>
mov    0x4(%rsp),%ecx
imul   %ecx,%r15d
add    %r12d,%r15d
imul   %ecx,%ebx
add    %r12d,%ebx
imul   %ecx,%r14d
add    %r12d,%r14d
imul   %ecx,%r13d
add    %r12d,%r13d
lea    0xc27(%rip),%rsi
mov    %rbp,%rdi
mov    %r12d,%edx
mov    %r15d,%r8d
mov    %ebx,%r9d
xor    %eax,%eax
push   %r13
push   %r14
call   1080 <fprintf@plt>
add    $0x10,%rsp
mov    %rbp,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x108,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xaaa(%rip),%rdi
call   1050 <printf@plt>
mov    $0xffffffff,%eax
jmp    15af <main+0x40f>

LLVM IR (-O0):
@.str = [13 x i8] c"all_eops.txt\00"
@.str.1 = [11 x i8] c"finals.all\00"
@.str.2 = [50 x i8] c" PM-x (arcsec) PM-y TDT-UT1 dPsi (mas) dEps\0A\00"
@.str.3 = [39 x i8] c"Command-line option '%s' unrecognized\0A\00"
@.str.4 = [3 x i8] c"rb\00"
@.str.5 = [3 x i8] c"wb\00"
@.str.6 = [3 x i8] c"%s\00"
@.str.7 = [28 x i8] c"%.9s %.9s %10.7f %.8s %.8s\0A\00"
@.str.8 = [210 x i8] c"Above was derived from\0Aftp://maia.usno.navy.mil/ser7/finals.all\0Awith only the five Bulletin A earth orientation parameters\0Aextracted (no sigmas, BullB, etc.)\0ARun with 'eop_proc' version Mar 15 2022 20:43:41\0A\00"
@SEEK_SET = global i32 0
@.str.9 = [36 x i8] c"See bottom of file for description\0A\00"
@.str.10 = [25 x i8] c"%5d %5d %5d %5d %5d %5d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca [200 x i8]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double
%19 = alloca double
%20 = alloca i8*
%21 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8** %7
store i32 0, i32* %11
store i32 1, i32* %12
store i32 0, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
store i32 0, i32* %17
store double 4.418400e+01, double* %18
store double 8.080000e-01, double* %19
store i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), i8** %20
store i32 1, i32* %13
br label %22
22: ; preds = %76, %2
%23 = load i32, i32* %13
%24 = load i32, i32* %4
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %79
26: ; preds = %22
%27 = load i8**, i8*** %5
%28 = load i32, i32* %13
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8*, i8** %27, i64 %29
%31 = load i8*, i8** %30
%32 = getelementptr inbounds i8, i8* %31, i64 0
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 45
br i1 %35, label %36, label %75
36: ; preds = %26
%37 = load i8**, i8*** %5
%38 = load i32, i32* %13
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i8*, i8** %37, i64 %39
%41 = load i8*, i8** %40
%42 = getelementptr inbounds i8, i8* %41, i64 1
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
switch i32 %44, label %67 [
i32 105, label %45
i32 111, label %52
i32 115, label %59
]
45: ; preds = %36
%46 = load i8**, i8*** %5
%47 = load i32, i32* %13
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds i8*, i8** %46, i64 %48
%50 = load i8*, i8** %49
%51 = getelementptr inbounds i8, i8* %50, i64 2
store i8* %51, i8** %7
br label %74
52: ; preds = %36
%53 = load i8**, i8*** %5
%54 = load i32, i32* %13
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i8*, i8** %53, i64 %55
%57 = load i8*, i8** %56
%58 = getelementptr inbounds i8, i8* %57, i64 2
store i8* %58, i8** %6
br label %74
59: ; preds = %36
%60 = load i8**, i8*** %5
%61 = load i32, i32* %13
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i8*, i8** %60, i64 %62
%64 = load i8*, i8** %63
%65 = getelementptr inbounds i8, i8* %64, i64 2
%66 = call i32 @atoi(i8* %65)
store i32 %66, i32* %12
br label %74
67: ; preds = %36
%68 = load i8**, i8*** %5
%69 = load i32, i32* %13
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i8*, i8** %68, i64 %70
%72 = load i8*, i8** %71
%73 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i8* %72)
store i32 -1, i32* %3
br label %214
74: ; preds = %59, %52, %45
br label %75
75: ; preds = %74, %26
br label %76
76: ; preds = %75
%77 = load i32, i32* %13
%78 = add nsw i32 %77, 1
store i32 %78, i32* %13
br label %22
79: ; preds = %22
%80 = load i8*, i8** %7
%81 = call i32* @fopen(i8* %80, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32* %81, i32** %8
%82 = load i32*, i32** %8
%83 = call i32 @assert(i32* %82)
%84 = load i8*, i8** %6
%85 = call i32* @fopen(i8* %84, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i32* %85, i32** %9
%86 = load i32*, i32** %9
%87 = call i32 @assert(i32* %86)
%88 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 0
%89 = load i32*, i32** %9
%90 = call i32 @fwrite(i8* %88, i32 70, i32 1, i32* %89)
%91 = load i32*, i32** %9
%92 = load i8*, i8** %20
%93 = call i32 (i32*, i8*, ...) @fprintf(i32* %91, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %92)
store i32 0, i32* %13
br label %94
94: ; preds = %174, %79
%95 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 0
%96 = load i32*, i32** %8
%97 = call i64 @fgets(i8* %95, i32 200, i32* %96)
%98 = icmp ne i64 %97, 0
br i1 %98, label %99, label %104
99: ; preds = %94
%100 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 16
%101 = load i8, i8* %100
%102 = sext i8 %101 to i32
%103 = icmp ne i32 %102, 32
br label %104
104: ; preds = %99, %94
%105 = phi i1 [ false, %94 ], [ %103, %99 ]
br i1 %105, label %106, label %177
106: ; preds = %104
%107 = load i32, i32* %13
%108 = load i32, i32* %12
%109 = srem i32 %107, %108
%110 = icmp ne i32 %109, 0
br i1 %110, label %173, label %111
111: ; preds = %106
%112 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 0
%113 = getelementptr inbounds i8, i8* %112, i64 58
%114 = call double @atof(i8* %113)
store double %114, double* %21
%115 = load i32, i32* %13
%116 = icmp ne i32 %115, 0
br i1 %116, label %121, label %117
117: ; preds = %111
%118 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 0
%119 = getelementptr inbounds i8, i8* %118, i64 7
%120 = call i32 @atoi(i8* %119)
store i32 %120, i32* %11
br label %121
121: ; preds = %117, %111
%122 = load double, double* %19
%123 = load double, double* %21
%124 = fsub double %122, %123
%125 = fcmp olt double %124, -5.000000e-01
br i1 %125, label %126, label %129
126: ; preds = %121
%127 = load double, double* %18
%128 = fadd double %127, 1.000000e+00
store double %128, double* %18
br label %129
129: ; preds = %126, %121
%130 = load double, double* %21
store double %130, double* %19
%131 = load i32*, i32** %9
%132 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 0
%133 = getelementptr inbounds i8, i8* %132, i64 18
%134 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 0
%135 = getelementptr inbounds i8, i8* %134, i64 37
%136 = load double, double* %18
%137 = load double, double* %21
%138 = fsub double %136, %137
%139 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 0
%140 = getelementptr inbounds i8, i8* %139, i64 98
%141 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 0
%142 = getelementptr inbounds i8, i8* %141, i64 117
%143 = call i32 (i32*, i8*, ...) @fprintf(i32* %131, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i8* %133, i8* %135, double %138, i8* %140, i8* %142)
%144 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 95
%145 = load i8, i8* %144
%146 = sext i8 %145 to i32
%147 = icmp eq i32 %146, 73
br i1 %147, label %151, label %148
148: ; preds = %129
%149 = load i32, i32* %13
%150 = icmp slt i32 %149, 2900
br i1 %150, label %151, label %154
151: ; preds = %148, %129
%152 = load i32, i32* %14
%153 = add nsw i32 %152, 1
store i32 %153, i32* %14
br label %154
154: ; preds = %151, %148
%155 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 16
%156 = load i8, i8* %155
%157 = sext i8 %156 to i32
%158 = icmp eq i32 %157, 73
br i1 %158, label %159, label %162
159: ; preds = %154
%160 = load i32, i32* %15
%161 = add nsw i32 %160, 1
store i32 %161, i32* %15
br label %162
162: ; preds = %159, %154
%163 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 95
%164 = load i8, i8* %163
%165 = sext i8 %164 to i32
%166 = icmp ne i32 %165, 32
br i1 %166, label %167, label %170
167: ; preds = %162
%168 = load i32, i32* %16
%169 = add nsw i32 %168, 1
store i32 %169, i32* %16
br label %170
170: ; preds = %167, %162
%171 = load i32, i32* %17
%172 = add nsw i32 %171, 1
store i32 %172, i32* %17
br label %173
173: ; preds = %170, %106
br label %174
174: ; preds = %173
%175 = load i32, i32* %13
%176 = add nsw i32 %175, 1
store i32 %176, i32* %13
br label %94
177: ; preds = %104
%178 = load i32*, i32** %9
%179 = load i8*, i8** %20
%180 = call i32 (i32*, i8*, ...) @fprintf(i32* %178, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %179)
%181 = load i32*, i32** %9
%182 = call i32 (i32*, i8*, ...) @fprintf(i32* %181, i8* getelementptr inbounds ([210 x i8], [210 x i8]* @.str.8, i64 0, i64 0))
%183 = load i32*, i32** %9
%184 = load i32, i32* @SEEK_SET
%185 = call i32 @fseek(i32* %183, i64 0, i32 %184)
%186 = load i32*, i32** %9
%187 = call i32 (i32*, i8*, ...) @fprintf(i32* %186, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
%188 = load i32*, i32** %9
%189 = load i32, i32* %11
%190 = load i32, i32* %12
%191 = load i32, i32* %11
%192 = load i32, i32* %12
%193 = load i32, i32* %14
%194 = mul nsw i32 %192, %193
%195 = add nsw i32 %191, %194
%196 = load i32, i32* %11
%197 = load i32, i32* %12
%198 = load i32, i32* %15
%199 = mul nsw i32 %197, %198
%200 = add nsw i32 %196, %199
%201 = load i32, i32* %11
%202 = load i32, i32* %12
%203 = load i32, i32* %16
%204 = mul nsw i32 %202, %203
%205 = add nsw i32 %201, %204
%206 = load i32, i32* %11
%207 = load i32, i32* %12
%208 = load i32, i32* %17
%209 = mul nsw i32 %207, %208
%210 = add nsw i32 %206, %209
%211 = call i32 (i32*, i8*, ...) @fprintf(i32* %188, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), i32 %189, i32 %190, i32 %195, i32 %200, i32 %205, i32 %210)
%212 = load i32*, i32** %9
%213 = call i32 @fclose(i32* %212)
store i32 0, i32* %3
br label %214
214: ; preds = %177, %67
%215 = load i32, i32* %3
ret i32 %215
}

LLVM IR (-O2):
@.str = [13 x i8] c"all_eops.txt\00"
@.str.1 = [11 x i8] c"finals.all\00"
@.str.2 = [50 x i8] c" PM-x (arcsec) PM-y TDT-UT1 dPsi (mas) dEps\0A\00"
@.str.3 = [39 x i8] c"Command-line option '%s' unrecognized\0A\00"
@.str.4 = [3 x i8] c"rb\00"
@.str.5 = [3 x i8] c"wb\00"
@.str.7 = [28 x i8] c"%.9s %.9s %10.7f %.8s %.8s\0A\00"
@.str.8 = [210 x i8] c"Above was derived from\0Aftp://maia.usno.navy.mil/ser7/finals.all\0Awith only the five Bulletin A earth orientation parameters\0Aextracted (no sigmas, BullB, etc.)\0ARun with 'eop_proc' version Mar 15 2022 20:43:41\0A\00"
@SEEK_SET = global i32 0
@.str.9 = [36 x i8] c"See bottom of file for description\0A\00"
@.str.10 = [25 x i8] c"%5d %5d %5d %5d %5d %5d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [200 x i8]
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %36
6: ; preds = %2
%7 = zext i32 %0 to i64
br label %8
8: ; preds = %6, %30
%9 = phi i64 [ 1, %6 ], [ %34, %30 ]
%10 = phi i8* [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), %6 ], [ %33, %30 ]
%11 = phi i32 [ 1, %6 ], [ %32, %30 ]
%12 = phi i8* [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), %6 ], [ %31, %30 ]
%13 = getelementptr inbounds i8*, i8** %1, i64 %9
%14 = load i8*, i8** %13
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 45
br i1 %16, label %17, label %30
17: ; preds = %8
%18 = getelementptr inbounds i8, i8* %14, i64 1
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
switch i32 %20, label %28 [
i32 105, label %21
i32 111, label %23
i32 115, label %25
]
21: ; preds = %17
%22 = getelementptr inbounds i8, i8* %14, i64 2
br label %30
23: ; preds = %17
%24 = getelementptr inbounds i8, i8* %14, i64 2
br label %30
25: ; preds = %17
%26 = getelementptr inbounds i8, i8* %14, i64 2
%27 = tail call i32 @atoi(i8* %26)
br label %30
28: ; preds = %17
%29 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i8* %14)
br label %144
30: ; preds = %8, %25, %23, %21
%31 = phi i8* [ %12, %25 ], [ %12, %23 ], [ %22, %21 ], [ %12, %8 ]
%32 = phi i32 [ %27, %25 ], [ %11, %23 ], [ %11, %21 ], [ %11, %8 ]
%33 = phi i8* [ %10, %25 ], [ %24, %23 ], [ %10, %21 ], [ %10, %8 ]
%34 = add nuw nsw i64 %9, 1
%35 = icmp eq i64 %34, %7
br i1 %35, label %36, label %8
36: ; preds = %30, %2
%37 = phi i8* [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), %2 ], [ %31, %30 ]
%38 = phi i32 [ 1, %2 ], [ %32, %30 ]
%39 = phi i8* [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), %2 ], [ %33, %30 ]
%40 = tail call i32* @fopen(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%41 = tail call i32 @assert(i32* %40)
%42 = tail call i32* @fopen(i8* %39, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%43 = tail call i32 @assert(i32* %42)
%44 = call i32 @fwrite(i8* %4, i32 70, i32 1, i32* %42)
%45 = tail call i64 bitcast (i32 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), i64 49, i64 1, i32* %42)
%46 = call i64 @fgets(i8* %4, i32 200, i32* %40)
%47 = icmp ne i64 %46, 0
%48 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 16
%49 = load i8, i8* %48
%50 = icmp ne i8 %49, 32
%51 = select i1 %47, i1 %50, i1 false
br i1 %51, label %52, label %123
52: ; preds = %36
%53 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 58
%54 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 7
%55 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 18
%56 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 37
%57 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 98
%58 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 117
%59 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 95
%60 = call double @atof(i8* %53)
%61 = call i32 @atoi(i8* %54)
%62 = fsub double 8.080000e-01, %60
%63 = fcmp olt double %62, -5.000000e-01
%64 = select i1 %63, double 4.518400e+01, double 4.418400e+01
%65 = fsub double %64, %60
%66 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i8* %55, i8* %56, double %65, i8* %57, i8* %58)
%67 = load i8, i8* %59
%68 = load i8, i8* %48
%69 = icmp eq i8 %68, 73
%70 = zext i1 %69 to i32
%71 = icmp ne i8 %67, 32
%72 = zext i1 %71 to i32
%73 = call i64 @fgets(i8* %4, i32 200, i32* %40)
%74 = icmp ne i64 %73, 0
%75 = load i8, i8* %48
%76 = icmp ne i8 %75, 32
%77 = select i1 %74, i1 %76, i1 false
br i1 %77, label %78, label %123
78: ; preds = %52, %110
%79 = phi double [ %116, %110 ], [ %60, %52 ]
%80 = phi double [ %115, %110 ], [ %64, %52 ]
%81 = phi i32 [ %114, %110 ], [ 1, %52 ]
%82 = phi i32 [ %113, %110 ], [ %72, %52 ]
%83 = phi i32 [ %112, %110 ], [ %70, %52 ]
%84 = phi i32 [ %111, %110 ], [ 1, %52 ]
%85 = phi i32 [ %117, %110 ], [ 1, %52 ]
%86 = srem i32 %85, %38
%87 = icmp eq i32 %86, 0
br i1 %87, label %88, label %110
88: ; preds = %78
%89 = call double @atof(i8* %53)
%90 = fsub double %79, %89
%91 = fcmp olt double %90, -5.000000e-01
%92 = fadd double %80, 1.000000e+00
%93 = select i1 %91, double %92, double %80
%94 = fsub double %93, %89
%95 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i8* %55, i8* %56, double %94, i8* %57, i8* %58)
%96 = load i8, i8* %59
%97 = icmp eq i8 %96, 73
%98 = icmp ult i32 %85, 2900
%99 = select i1 %97, i1 true, i1 %98
%100 = zext i1 %99 to i32
%101 = add nsw i32 %84, %100
%102 = load i8, i8* %48
%103 = icmp eq i8 %102, 73
%104 = zext i1 %103 to i32
%105 = add nsw i32 %83, %104
%106 = icmp ne i8 %96, 32
%107 = zext i1 %106 to i32
%108 = add nsw i32 %82, %107
%109 = add nsw i32 %81, 1
br label %110
110: ; preds = %78, %88
%111 = phi i32 [ %84, %78 ], [ %101, %88 ]
%112 = phi i32 [ %83, %78 ], [ %105, %88 ]
%113 = phi i32 [ %82, %78 ], [ %108, %88 ]
%114 = phi i32 [ %81, %78 ], [ %109, %88 ]
%115 = phi double [ %80, %78 ], [ %93, %88 ]
%116 = phi double [ %79, %78 ], [ %89, %88 ]
%117 = add nuw nsw i32 %85, 1
%118 = call i64 @fgets(i8* %4, i32 200, i32* %40)
%119 = icmp ne i64 %118, 0
%120 = load i8, i8* %48
%121 = icmp ne i8 %120, 32
%122 = select i1 %119, i1 %121, i1 false
br i1 %122, label %78, label %123
123: ; preds = %110, %52, %36
%124 = phi i32 [ 0, %36 ], [ %61, %52 ], [ %61, %110 ]
%125 = phi i32 [ 0, %36 ], [ 1, %52 ], [ %111, %110 ]
%126 = phi i32 [ 0, %36 ], [ %70, %52 ], [ %112, %110 ]
%127 = phi i32 [ 0, %36 ], [ %72, %52 ], [ %113, %110 ]
%128 = phi i32 [ 0, %36 ], [ 1, %52 ], [ %114, %110 ]
%129 = call i64 bitcast (i32 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), i64 49, i64 1, i32* %42)
%130 = call i64 bitcast (i32 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([210 x i8], [210 x i8]* @.str.8, i64 0, i64 0), i64 209, i64 1, i32* %42)
%131 = load i32, i32* @SEEK_SET
%132 = call i32 @fseek(i32* %42, i64 0, i32 %131)
%133 = call i64 bitcast (i32 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0), i64 35, i64 1, i32* %42)
%134 = mul nsw i32 %125, %38
%135 = add nsw i32 %134, %124
%136 = mul nsw i32 %126, %38
%137 = add nsw i32 %136, %124
%138 = mul nsw i32 %127, %38
%139 = add nsw i32 %138, %124
%140 = mul nsw i32 %128, %38
%141 = add nsw i32 %140, %124
%142 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), i32 %124, i32 %38, i32 %135, i32 %137, i32 %139, i32 %141)
%143 = call i32 @fclose(i32* %42)
br label %144
144: ; preds = %123, %28
%145 = phi i32 [ -1, %28 ], [ 0, %123 ]
ret i32 %145
}