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

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ assert(int);
int atoi(char *);
int /*<<< orphan*/ error_exit(char *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
char *find_telescope(char *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
scalar_t__ isdigit(char);
int /*<<< orphan*/ memcmp(char *, char *, int);
int /*<<< orphan*/ memcpy(char *, char *, size_t);
int /*<<< orphan*/ printf(char const *, char *);
int /*<<< orphan*/ remove_html_tags(char *);
char *strchr(char *, char);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strip_trailing_period_and_whitespace(char *);
int strlen(char *);
char *strstr(char *, char *);
int main(const int argc, const char **argv) {
  FILE *ifile = fopen(argv[1], "rb");
  char buff[1000], *tptr, mpec_name[15];
  if (argc < 2)
    error_exit("No input file specified");
  ifile = fopen(argv[1], "rb");
  if (!ifile)
    error_exit("Input file not found");
  while (fgets(buff, sizeof(buff), ifile))
    if (!memcmp(buff, "Observer details:", 17)) {
      while (fgets(buff, sizeof(buff), ifile) && *buff >= ' ') {
        char tbuff[90], *scope;
        remove_html_tags(buff);
        assert(buff[0] != ' ' && buff[1] != ' ' && buff[2] != ' ');
        assert(buff[3] == ' ');
        while (fgets(tbuff, sizeof(tbuff), ifile) && tbuff[0] == ' ') {
          size_t i = 1;
          while (tbuff[i] == ' ')
            i++;
          assert(i > 2 && i < 5);
          strcpy(buff + strlen(buff) - 1, tbuff + i - 1);
        }
        strip_trailing_period_and_whitespace(buff);
        scope = find_telescope(buff);
        if (scope) {
          int pass;
          printf("\nCOD %.3s\n", buff);
          scope[-1] = '\0';
          for (pass = 0; pass < 2 && strlen(buff); pass++) {
            const char *format = (pass ? "OBS %s\n" : "MEA %s\n");
            tptr = strstr(buff, (pass ? "Observer" : "Measurer"));
            if (tptr) {
              *tptr++ = '\0';
              while (*tptr > ' ')
                tptr++;
              while (*tptr == ' ' || *tptr == ',')
                tptr++;
              strip_trailing_period_and_whitespace(tptr);
              while (strlen(tptr) > 70) {
                size_t i = 70;
                while (i && tptr[i] != ',')
                  i--;
                tptr[i] = '\0';
                printf(format, tptr);
                tptr += i + 1;
                while (*tptr == ' ')
                  tptr++;
              }
              if (*tptr)
                printf(format, tptr);
            }
          }
          if (*mpec_name)
            printf("COM Default details extracted from %s\n", mpec_name);
          while ((tptr = strchr(scope, ',')) != NULL) {
            *tptr = '\0';
            printf("TEL %s\n", scope);
            scope = tptr + 1;
            while (*scope == ' ')
              scope++;
          }
          printf("TEL %s\n", scope);
        }
        fseek(ifile, -(long)strlen(tbuff), SEEK_CUR);
      }
      return (0);
    } else if ((tptr = strstr(buff, "MPEC ")) != NULL &&
               atoi(tptr + 5) > 1992 && atoi(tptr + 5) < 2090 &&
               tptr[9] == '-') {
      size_t len = 11;
      while (isdigit(tptr[len]))
        len++;
      assert(len < sizeof(mpec_name));
      memcpy(mpec_name, tptr, len);
      mpec_name[len] = '\0';
    }
  return (-1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4d0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdc8(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1257 <main+0x47>
lea    0xdb1(%rip),%rdi
call   10a0 <error_exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd9a(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1286 <main+0x76>
lea    0xd9a(%rip),%rdi
call   10a0 <error_exit@plt>
jmp    128b <main+0x7b>
lea    -0x400(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x3e8,%esi
call   10c0 <fgets@plt>
cmp    $0x0,%rax
je     1961 <main+0x751>
lea    -0x400(%rbp),%rdi
lea    0xd78(%rip),%rsi
mov    $0x11,%edx
call   10b0 <memcmp@plt>
cmp    $0x0,%eax
jne    1868 <main+0x658>
jmp    12d0 <main+0xc0>
lea    -0x400(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x3e8,%esi
call   10c0 <fgets@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x4b1(%rbp)
je     130d <main+0xfd>
movsbl -0x400(%rbp),%eax
cmp    $0x20,%eax
setge  %al
mov    %al,-0x4b1(%rbp)
mov    -0x4b1(%rbp),%al
test   $0x1,%al
jne    1320 <main+0x110>
jmp    185c <main+0x64c>
lea    -0x400(%rbp),%rdi
call   1090 <remove_html_tags@plt>
movsbl -0x400(%rbp),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x4b2(%rbp)
je     136f <main+0x15f>
movsbl -0x3ff(%rbp),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x4b2(%rbp)
je     136f <main+0x15f>
movsbl -0x3fe(%rbp),%eax
cmp    $0x20,%eax
setne  %al
mov    %al,-0x4b2(%rbp)
mov    -0x4b2(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   10d0 <assert@plt>
movsbl -0x3fd(%rbp),%eax
cmp    $0x20,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10d0 <assert@plt>
lea    -0x480(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x5a,%esi
call   10c0 <fgets@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x4b3(%rbp)
je     13d3 <main+0x1c3>
movsbl -0x480(%rbp),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x4b3(%rbp)
mov    -0x4b3(%rbp),%al
test   $0x1,%al
jne    13e6 <main+0x1d6>
jmp    149d <main+0x28d>
movq   $0x1,-0x490(%rbp)
mov    -0x490(%rbp),%rax
movsbl -0x480(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    1420 <main+0x210>
mov    -0x490(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x490(%rbp)
jmp    13f1 <main+0x1e1>
xor    %eax,%eax
cmpq   $0x2,-0x490(%rbp)
02
mov    %al,-0x4b4(%rbp)
jbe    1447 <main+0x237>
cmpq   $0x5,-0x490(%rbp)
05
setb   %al
mov    %al,-0x4b4(%rbp)
mov    -0x4b4(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   10d0 <assert@plt>
lea    -0x400(%rbp),%rax
mov    %rax,-0x4c0(%rbp)
lea    -0x400(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x4c0(%rbp),%rdi
cltq
add    %rax,%rdi
add    $0xffffffffffffffff,%rdi
lea    -0x480(%rbp),%rsi
add    -0x490(%rbp),%rsi
add    $0xffffffffffffffff,%rsi
call   1040 <strcpy@plt>
jmp    1396 <main+0x186>
lea    -0x400(%rbp),%rdi
call   1050 <strip_trailing_period_and_whitespace@plt>
lea    -0x400(%rbp),%rdi
call   10f0 <find_telescope@plt>
mov    %rax,-0x488(%rbp)
cmpq   $0x0,-0x488(%rbp)
je     1822 <main+0x612>
lea    -0x400(%rbp),%rsi
lea    0xb6a(%rip),%rdi
call   1080 <printf@plt>
mov    -0x488(%rbp),%rax
movb   $0x0,-0x1(%rax)
movl   $0x0,-0x494(%rbp)
xor    %eax,%eax
cmpl   $0x2,-0x494(%rbp)
mov    %al,-0x4c1(%rbp)
jge    151f <main+0x30f>
lea    -0x400(%rbp),%rdi
call   1060 <strlen@plt>
cmp    $0x0,%eax
setne  %al
mov    %al,-0x4c1(%rbp)
mov    -0x4c1(%rbp),%al
test   $0x1,%al
jne    1532 <main+0x322>
jmp    176a <main+0x55a>
mov    -0x494(%rbp),%edx
lea    0xb16(%rip),%rax
lea    0xb07(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x4a0(%rbp)
lea    -0x400(%rbp),%rdi
mov    -0x494(%rbp),%ecx
lea    0xafe(%rip),%rsi
lea    0xaee(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
call   1130 <strstr@plt>
mov    %rax,-0x408(%rbp)
cmpq   $0x0,-0x408(%rbp)
je     1751 <main+0x541>
mov    -0x408(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x408(%rbp)
movb   $0x0,(%rax)
mov    -0x408(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jle    15d2 <main+0x3c2>
mov    -0x408(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x408(%rbp)
jmp    15a8 <main+0x398>
jmp    15d7 <main+0x3c7>
mov    -0x408(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x4c2(%rbp)
je     1608 <main+0x3f8>
mov    -0x408(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2c,%eax
sete   %al
mov    %al,-0x4c2(%rbp)
mov    -0x4c2(%rbp),%al
test   $0x1,%al
jne    161b <main+0x40b>
jmp    1632 <main+0x422>
mov    -0x408(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x408(%rbp)
jmp    15d7 <main+0x3c7>
mov    -0x408(%rbp),%rdi
call   1050 <strip_trailing_period_and_whitespace@plt>
mov    -0x408(%rbp),%rdi
call   1060 <strlen@plt>
cmp    $0x46,%eax
jle    1729 <main+0x519>
movq   $0x46,-0x4a8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x4a8(%rbp)
mov    %al,-0x4c3(%rbp)
je     1692 <main+0x482>
mov    -0x408(%rbp),%rax
mov    -0x4a8(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2c,%eax
setne  %al
mov    %al,-0x4c3(%rbp)
mov    -0x4c3(%rbp),%al
test   $0x1,%al
jne    16a5 <main+0x495>
jmp    16bc <main+0x4ac>
mov    -0x4a8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x4a8(%rbp)
jmp    165e <main+0x44e>
mov    -0x408(%rbp),%rax
mov    -0x4a8(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x4a0(%rbp),%rdi
mov    -0x408(%rbp),%rsi
call   1080 <printf@plt>
mov    -0x4a8(%rbp),%rax
add    $0x1,%rax
add    -0x408(%rbp),%rax
mov    %rax,-0x408(%rbp)
mov    -0x408(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1724 <main+0x514>
mov    -0x408(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x408(%rbp)
jmp    16fa <main+0x4ea>
jmp    163e <main+0x42e>
mov    -0x408(%rbp),%rax
cmpb   $0x0,(%rax)
je     174c <main+0x53c>
mov    -0x4a0(%rbp),%rdi
mov    -0x408(%rbp),%rsi
call   1080 <printf@plt>
jmp    1751 <main+0x541>
jmp    1756 <main+0x546>
mov    -0x494(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x494(%rbp)
jmp    14f2 <main+0x2e2>
cmpb   $0x0,-0x417(%rbp)
je     178a <main+0x57a>
lea    -0x417(%rbp),%rsi
lea    0x8ea(%rip),%rdi
call   1080 <printf@plt>
jmp    178f <main+0x57f>
mov    -0x488(%rbp),%rdi
mov    $0x2c,%esi
call   1070 <strchr@plt>
mov    %rax,-0x408(%rbp)
cmp    $0x0,%rax
je     180f <main+0x5ff>
mov    -0x408(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x488(%rbp),%rsi
lea    0x8cd(%rip),%rdi
call   1080 <printf@plt>
mov    -0x408(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x488(%rbp)
mov    -0x488(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    180a <main+0x5fa>
mov    -0x488(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x488(%rbp)
jmp    17e0 <main+0x5d0>
jmp    178f <main+0x57f>
mov    -0x488(%rbp),%rsi
lea    0x879(%rip),%rdi
call   1080 <printf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x4d0(%rbp)
lea    -0x480(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x4d0(%rbp),%rdi
cltq
xor    %ecx,%ecx
mov    %ecx,%esi
sub    %rax,%rsi
mov    0x2798(%rip),%rax
mov    (%rax),%edx
call   1100 <fseek@plt>
jmp    12d0 <main+0xc0>
movl   $0x0,-0x4(%rbp)
jmp    1968 <main+0x758>
lea    -0x400(%rbp),%rdi
lea    0x828(%rip),%rsi
call   1130 <strstr@plt>
mov    %rax,-0x408(%rbp)
cmp    $0x0,%rax
je     1957 <main+0x747>
mov    -0x408(%rbp),%rdi
add    $0x5,%rdi
call   1120 <atoi@plt>
cmp    $0x7c8,%eax
jle    1957 <main+0x747>
mov    -0x408(%rbp),%rdi
add    $0x5,%rdi
call   1120 <atoi@plt>
cmp    $0x82a,%eax
jge    1957 <main+0x747>
mov    -0x408(%rbp),%rax
movsbl 0x9(%rax),%eax
cmp    $0x2d,%eax
jne    1957 <main+0x747>
movq   $0xb,-0x4b0(%rbp)
mov    -0x408(%rbp),%rax
mov    -0x4b0(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1919 <main+0x709>
mov    -0x4b0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x4b0(%rbp)
jmp    18e1 <main+0x6d1>
cmpq   $0xf,-0x4b0(%rbp)
0f
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   10d0 <assert@plt>
lea    -0x417(%rbp),%rdi
mov    -0x408(%rbp),%rsi
mov    -0x4b0(%rbp),%rdx
call   10e0 <memcpy@plt>
mov    -0x4b0(%rbp),%rax
movb   $0x0,-0x417(%rbp,%rax,1)
jmp    195c <main+0x74c>
jmp    128b <main+0x7b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x458,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x8(%rsi),%rdi
lea    0xdcf(%rip),%rsi
call   1110 <fopen@plt>
cmp    $0x1,%ebp
jg     1247 <main+0x37>
lea    0xdc1(%rip),%rdi
call   10a0 <error_exit@plt>
mov    0x8(%rbx),%rdi
lea    0xdae(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,%r13
test   %rax,%rax
jne    126b <main+0x5b>
lea    0xdb5(%rip),%rdi
call   10a0 <error_exit@plt>
lea    0x70(%rsp),%rdi
mov    $0x3e8,%esi
mov    %r13,%rdx
call   10c0 <fgets@plt>
mov    $0xffffffff,%ecx
test   %rax,%rax
je     17a5 <main+0x595>
lea    0xd9e(%rip),%rbp
lea    0x70(%rsp),%r14
lea    0xe00(%rip),%rbx
jmp    12b9 <main+0xa9>
mov    %r14,%rdi
mov    $0x3e8,%esi
mov    %r13,%rdx
call   10c0 <fgets@plt>
test   %rax,%rax
je     17a0 <main+0x590>
mov    %r14,%rdi
mov    %rbp,%rsi
mov    $0x11,%edx
call   10b0 <memcmp@plt>
test   %eax,%eax
je     134e <main+0x13e>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1130 <strstr@plt>
test   %rax,%rax
je     12a0 <main+0x90>
mov    %rax,%r12
lea    0x5(%rax),%rdi
call   1120 <atoi@plt>
add    $0xfffff837,%eax
cmp    $0x60,%eax
ja     12a0 <main+0x90>
cmpb   $0x2d,0x9(%r12)
jne    12a0 <main+0x90>
mov    $0xa,%r15d
cs nopw 0x0(%rax,%rax,1)
nop
movsbl 0x1(%r12,%r15,1),%edi
call   1030 <isdigit@plt>
add    $0x1,%r15
test   %rax,%rax
jne    1310 <main+0x100>
xor    %edi,%edi
cmp    $0xf,%r15
setb   %dil
call   10d0 <assert@plt>
lea    0x1(%rsp),%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   10e0 <memcpy@plt>
movb   $0x0,0x1(%rsp,%r15,1)
jmp    12a0 <main+0x90>
lea    0x70(%rsp),%rdi
mov    $0x3e8,%esi
mov    %r13,%rdx
call   10c0 <fgets@plt>
xor    %ecx,%ecx
test   %rax,%rax
je     17a5 <main+0x595>
cmpb   $0x20,0x70(%rsp)
jl     17a5 <main+0x595>
lea    0x70(%rsp),%r15
lea    0x10(%rsp),%r12
mov    %r15,%rdi
call   1090 <remove_html_tags@plt>
xor    %eax,%eax
cmpb   $0x20,0x70(%rsp)
je     13a0 <main+0x190>
cmpb   $0x20,0x71(%rsp)
je     13a0 <main+0x190>
cmpb   $0x20,0x72(%rsp)
setne  %al
movzbl %al,%edi
call   10d0 <assert@plt>
xor    %edi,%edi
cmpb   $0x20,0x73(%rsp)
sete   %dil
call   10d0 <assert@plt>
mov    %r12,%rdi
mov    $0x5a,%esi
mov    %r13,%rdx
call   10c0 <fgets@plt>
test   %rax,%rax
je     1441 <main+0x231>
cmpb   $0x20,0x10(%rsp)
jne    1441 <main+0x231>
mov    $0x1,%eax
nopl   0x0(%rax)
mov    %rax,%rbx
add    $0x1,%rax
cmpb   $0x20,0x10(%rsp,%rbx,1)
je     13e0 <main+0x1d0>
lea    -0x3(%rbx),%rax
xor    %edi,%edi
cmp    $0x2,%rax
setb   %dil
call   10d0 <assert@plt>
mov    %r15,%rdi
call   1060 <strlen@plt>
cltq
lea    (%rsp,%rax,1),%rdi
add    $0x6f,%rdi
lea    (%rsp,%rbx,1),%rsi
add    $0xf,%rsi
call   1040 <strcpy@plt>
mov    %r12,%rdi
mov    $0x5a,%esi
mov    %r13,%rdx
call   10c0 <fgets@plt>
test   %rax,%rax
je     1441 <main+0x231>
cmpb   $0x20,0x10(%rsp)
mov    $0x1,%eax
je     13e0 <main+0x1d0>
mov    %r15,%rdi
call   1050 <strip_trailing_period_and_whitespace@plt>
mov    %r15,%rdi
call   10f0 <find_telescope@plt>
test   %rax,%rax
je     175d <main+0x54d>
mov    %rax,%rbp
mov    %r12,%r14
lea    0xbdb(%rip),%rdi
mov    %r15,%rsi
call   1080 <printf@plt>
movb   $0x0,-0x1(%rbp)
mov    %r15,%rdi
call   1060 <strlen@plt>
test   %eax,%eax
je     16d0 <main+0x4c0>
mov    %r15,%rdi
lea    0xbd9(%rip),%rsi
call   1130 <strstr@plt>
test   %rax,%rax
je     1594 <main+0x384>
mov    %rax,%rbx
movb   $0x0,(%rax)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
cmp    $0x20,%al
jg     14b0 <main+0x2a0>
jmp    14c8 <main+0x2b8>
xchg   %ax,%ax
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
cmp    $0x2c,%al
je     14c0 <main+0x2b0>
cmp    $0x20,%al
je     14c0 <main+0x2b0>
mov    %rbx,%rdi
call   1050 <strip_trailing_period_and_whitespace@plt>
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1060 <strlen@plt>
cmp    $0x47,%eax
jl     1580 <main+0x370>
mov    $0x46,%eax
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x2c,(%rbx,%rax,1)
je     1550 <main+0x340>
cmpb   $0x2c,-0x1(%rbx,%rax,1)
je     152c <main+0x31c>
cmpb   $0x2c,-0x2(%rbx,%rax,1)
je     1532 <main+0x322>
cmpb   $0x2c,-0x3(%rbx,%rax,1)
je     1538 <main+0x328>
cmpb   $0x2c,-0x4(%rbx,%rax,1)
je     153e <main+0x32e>
add    $0xfffffffffffffffb,%rax
jne    1500 <main+0x2f0>
xor    %eax,%eax
jmp    1550 <main+0x340>
add    $0xffffffffffffffff,%rax
jmp    1550 <main+0x340>
add    $0xfffffffffffffffe,%rax
jmp    1550 <main+0x340>
add    $0xfffffffffffffffd,%rax
jmp    1550 <main+0x340>
add    $0xfffffffffffffffc,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%rbx,%rax,1),%r12
movb   $0x0,(%rbx,%rax,1)
lea    0xaf6(%rip),%rdi
mov    %rbx,%rsi
call   1080 <printf@plt>
mov    %r12,%rbx
nopw   0x0(%rax,%rax,1)
cmpb   $0x20,0x1(%rbx)
lea    0x1(%rbx),%rbx
je     1570 <main+0x360>
jmp    14e0 <main+0x2d0>
nop
cmpb   $0x0,(%rbx)
je     1594 <main+0x384>
lea    0xac9(%rip),%rdi
mov    %rbx,%rsi
call   1080 <printf@plt>
mov    %r15,%rdi
call   1060 <strlen@plt>
test   %eax,%eax
je     16d0 <main+0x4c0>
mov    %r15,%rdi
lea    0xaaf(%rip),%rsi
call   1130 <strstr@plt>
test   %rax,%rax
je     16d0 <main+0x4c0>
mov    %rax,%r12
movb   $0x0,(%rax)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl 0x1(%r12),%eax
add    $0x1,%r12
cmp    $0x20,%al
jg     15d0 <main+0x3c0>
jmp    15ea <main+0x3da>
movzbl 0x1(%r12),%eax
add    $0x1,%r12
cmp    $0x2c,%al
je     15e0 <main+0x3d0>
cmp    $0x20,%al
je     15e0 <main+0x3d0>
mov    %r12,%rdi
call   1050 <strip_trailing_period_and_whitespace@plt>
mov    %r12,%rdi
call   1060 <strlen@plt>
cmp    $0x47,%eax
jl     16ae <main+0x49e>
nopl   0x0(%rax,%rax,1)
mov    $0x46,%eax
cs nopw 0x0(%rax,%rax,1)
nop
cmpb   $0x2c,(%r12,%rax,1)
je     1670 <main+0x460>
cmpb   $0x2c,-0x1(%r12,%rax,1)
je     1651 <main+0x441>
cmpb   $0x2c,-0x2(%r12,%rax,1)
je     1657 <main+0x447>
cmpb   $0x2c,-0x3(%r12,%rax,1)
je     165d <main+0x44d>
cmpb   $0x2c,-0x4(%r12,%rax,1)
je     1663 <main+0x453>
add    $0xfffffffffffffffb,%rax
jne    1620 <main+0x410>
xor    %eax,%eax
jmp    1670 <main+0x460>
add    $0xffffffffffffffff,%rax
jmp    1670 <main+0x460>
add    $0xfffffffffffffffe,%rax
jmp    1670 <main+0x460>
add    $0xfffffffffffffffd,%rax
jmp    1670 <main+0x460>
add    $0xfffffffffffffffc,%rax
nopw   0x0(%rax,%rax,1)
lea    (%r12,%rax,1),%rbx
movb   $0x0,(%r12,%rax,1)
lea    0x9cd(%rip),%rdi
mov    %r12,%rsi
call   1080 <printf@plt>
mov    %rbx,%r12
nopl   0x0(%rax,%rax,1)
cmpb   $0x20,0x1(%r12)
lea    0x1(%r12),%r12
je     1690 <main+0x480>
mov    %r12,%rdi
call   1060 <strlen@plt>
cmp    $0x46,%eax
jg     1610 <main+0x400>
cmpb   $0x0,(%r12)
je     16d0 <main+0x4c0>
lea    0x991(%rip),%rdi
mov    %r12,%rsi
call   1080 <printf@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpb   $0x0,0x1(%rsp)
je     16e8 <main+0x4d8>
lea    0x991(%rip),%rdi
lea    0x1(%rsp),%rsi
call   1080 <printf@plt>
mov    %rbp,%rdi
mov    $0x2c,%esi
call   1070 <strchr@plt>
mov    %rax,%rbx
test   %rax,%rax
lea    0x994(%rip),%r12
je     174f <main+0x53f>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movb   $0x0,(%rbx)
mov    %r12,%rdi
mov    %rbp,%rsi
call   1080 <printf@plt>
mov    %rbx,%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmpb   $0x20,0x1(%rbp)
lea    0x1(%rbp),%rbp
je     1730 <main+0x520>
mov    %rbp,%rdi
mov    $0x2c,%esi
call   1070 <strchr@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1710 <main+0x500>
mov    %r12,%rdi
mov    %rbp,%rsi
call   1080 <printf@plt>
mov    %r14,%r12
mov    %r12,%rdi
call   1060 <strlen@plt>
movslq %eax,%rsi
neg    %rsi
mov    0x2876(%rip),%rax
mov    (%rax),%edx
mov    %r13,%rdi
call   1100 <fseek@plt>
mov    %r15,%rdi
mov    $0x3e8,%esi
mov    %r13,%rdx
call   10c0 <fgets@plt>
xor    %ecx,%ecx
test   %rax,%rax
je     17a5 <main+0x595>
cmpb   $0x1f,0x70(%rsp)
jg     1380 <main+0x170>
jmp    17a5 <main+0x595>
mov    $0xffffffff,%ecx
mov    %ecx,%eax
add    $0x458,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
@.str.1 = [24 x i8] c"No input file specified\00"
@.str.2 = [21 x i8] c"Input file not found\00"
@.str.3 = [18 x i8] c"Observer details:\00"
@.str.4 = [11 x i8] c"\0ACOD %.3s\0A\00"
@.str.5 = [8 x i8] c"OBS %s\0A\00"
@.str.6 = [8 x i8] c"MEA %s\0A\00"
@.str.7 = [9 x i8] c"Observer\00"
@.str.8 = [9 x i8] c"Measurer\00"
@.str.9 = [39 x i8] c"COM Default details extracted from %s\0A\00"
@.str.10 = [8 x i8] c"TEL %s\0A\00"
@SEEK_CUR = global i32 0
@.str.11 = [6 x i8] c"MPEC \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca [1000 x i8]
%8 = alloca i8*
%9 = alloca [15 x i8]
%10 = alloca [90 x i8]
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i32* @fopen(i8* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %20, i32** %6
%21 = load i32, i32* %4
%22 = icmp slt i32 %21, 2
br i1 %22, label %23, label %25
23: ; preds = %2
%24 = call i32 @error_exit(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %25
25: ; preds = %23, %2
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 1
%28 = load i8*, i8** %27
%29 = call i32* @fopen(i8* %28, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %29, i32** %6
%30 = load i32*, i32** %6
%31 = icmp ne i32* %30, null
br i1 %31, label %34, label %32
32: ; preds = %25
%33 = call i32 @error_exit(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %34
34: ; preds = %32, %25
br label %35
35: ; preds = %326, %34
%36 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%37 = load i32*, i32** %6
%38 = call i64 @fgets(i8* %36, i32 1000, i32* %37)
%39 = icmp ne i64 %38, 0
br i1 %39, label %40, label %327
40: ; preds = %35
%41 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%42 = call i32 @memcmp(i8* %41, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 17)
%43 = icmp ne i32 %42, 0
br i1 %43, label %283, label %44
44: ; preds = %40
br label %45
45: ; preds = %274, %44
%46 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%47 = load i32*, i32** %6
%48 = call i64 @fgets(i8* %46, i32 1000, i32* %47)
%49 = icmp ne i64 %48, 0
br i1 %49, label %50, label %55
50: ; preds = %45
%51 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = icmp sge i32 %53, 32
br label %55
55: ; preds = %50, %45
%56 = phi i1 [ false, %45 ], [ %54, %50 ]
br i1 %56, label %57, label %282
57: ; preds = %55
%58 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%59 = call i32 @remove_html_tags(i8* %58)
%60 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = icmp ne i32 %62, 32
br i1 %63, label %64, label %74
64: ; preds = %57
%65 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 1
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = icmp ne i32 %67, 32
br i1 %68, label %69, label %74
69: ; preds = %64
%70 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 2
%71 = load i8, i8* %70
%72 = sext i8 %71 to i32
%73 = icmp ne i32 %72, 32
br label %74
74: ; preds = %69, %64, %57
%75 = phi i1 [ false, %64 ], [ false, %57 ], [ %73, %69 ]
%76 = zext i1 %75 to i32
%77 = call i32 @assert(i32 %76)
%78 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 3
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = icmp eq i32 %80, 32
%82 = zext i1 %81 to i32
%83 = call i32 @assert(i32 %82)
br label %84
84: ; preds = %112, %74
%85 = getelementptr inbounds [90 x i8], [90 x i8]* %10, i64 0, i64 0
%86 = load i32*, i32** %6
%87 = call i64 @fgets(i8* %85, i32 90, i32* %86)
%88 = icmp ne i64 %87, 0
br i1 %88, label %89, label %94
89: ; preds = %84
%90 = getelementptr inbounds [90 x i8], [90 x i8]* %10, i64 0, i64 0
%91 = load i8, i8* %90
%92 = sext i8 %91 to i32
%93 = icmp eq i32 %92, 32
br label %94
94: ; preds = %89, %84
%95 = phi i1 [ false, %84 ], [ %93, %89 ]
br i1 %95, label %96, label %127
96: ; preds = %94
store i64 1, i64* %12
br label %97
97: ; preds = %103, %96
%98 = load i64, i64* %12
%99 = getelementptr inbounds [90 x i8], [90 x i8]* %10, i64 0, i64 %98
%100 = load i8, i8* %99
%101 = sext i8 %100 to i32
%102 = icmp eq i32 %101, 32
br i1 %102, label %103, label %106
103: ; preds = %97
%104 = load i64, i64* %12
%105 = add i64 %104, 1
store i64 %105, i64* %12
br label %97
106: ; preds = %97
%107 = load i64, i64* %12
%108 = icmp ugt i64 %107, 2
br i1 %108, label %109, label %112
109: ; preds = %106
%110 = load i64, i64* %12
%111 = icmp ult i64 %110, 5
br label %112
112: ; preds = %109, %106
%113 = phi i1 [ false, %106 ], [ %111, %109 ]
%114 = zext i1 %113 to i32
%115 = call i32 @assert(i32 %114)
%116 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%117 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%118 = call i32 @strlen(i8* %117)
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds i8, i8* %116, i64 %119
%121 = getelementptr inbounds i8, i8* %120, i64 -1
%122 = getelementptr inbounds [90 x i8], [90 x i8]* %10, i64 0, i64 0
%123 = load i64, i64* %12
%124 = getelementptr inbounds i8, i8* %122, i64 %123
%125 = getelementptr inbounds i8, i8* %124, i64 -1
%126 = call i32 @strcpy(i8* %121, i8* %125)
br label %84
127: ; preds = %94
%128 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%129 = call i32 @strip_trailing_period_and_whitespace(i8* %128)
%130 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%131 = call i8* @find_telescope(i8* %130)
store i8* %131, i8** %11
%132 = load i8*, i8** %11
%133 = icmp ne i8* %132, null
br i1 %133, label %134, label %274
134: ; preds = %127
%135 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%136 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* %135)
%137 = load i8*, i8** %11
%138 = getelementptr inbounds i8, i8* %137, i64 -1
store i8 0, i8* %138
store i32 0, i32* %13
br label %139
139: ; preds = %241, %134
%140 = load i32, i32* %13
%141 = icmp slt i32 %140, 2
br i1 %141, label %142, label %146
142: ; preds = %139
%143 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%144 = call i32 @strlen(i8* %143)
%145 = icmp ne i32 %144, 0
br label %146
146: ; preds = %142, %139
%147 = phi i1 [ false, %139 ], [ %145, %142 ]
br i1 %147, label %148, label %244
148: ; preds = %146
%149 = load i32, i32* %13
%150 = icmp ne i32 %149, 0
%151 = zext i1 %150 to i64
%152 = select i1 %150, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0)
store i8* %152, i8** %14
%153 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%154 = load i32, i32* %13
%155 = icmp ne i32 %154, 0
%156 = zext i1 %155 to i64
%157 = select i1 %155, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0)
%158 = call i8* @strstr(i8* %153, i8* %157)
store i8* %158, i8** %8
%159 = load i8*, i8** %8
%160 = icmp ne i8* %159, null
br i1 %160, label %161, label %240
161: ; preds = %148
%162 = load i8*, i8** %8
%163 = getelementptr inbounds i8, i8* %162, i32 1
store i8* %163, i8** %8
store i8 0, i8* %162
br label %164
164: ; preds = %169, %161
%165 = load i8*, i8** %8
%166 = load i8, i8* %165
%167 = sext i8 %166 to i32
%168 = icmp sgt i32 %167, 32
br i1 %168, label %169, label %172
169: ; preds = %164
%170 = load i8*, i8** %8
%171 = getelementptr inbounds i8, i8* %170, i32 1
store i8* %171, i8** %8
br label %164
172: ; preds = %164
br label %173
173: ; preds = %185, %172
%174 = load i8*, i8** %8
%175 = load i8, i8* %174
%176 = sext i8 %175 to i32
%177 = icmp eq i32 %176, 32
br i1 %177, label %183, label %178
178: ; preds = %173
%179 = load i8*, i8** %8
%180 = load i8, i8* %179
%181 = sext i8 %180 to i32
%182 = icmp eq i32 %181, 44
br label %183
183: ; preds = %178, %173
%184 = phi i1 [ true, %173 ], [ %182, %178 ]
br i1 %184, label %185, label %188
185: ; preds = %183
%186 = load i8*, i8** %8
%187 = getelementptr inbounds i8, i8* %186, i32 1
store i8* %187, i8** %8
br label %173
188: ; preds = %183
%189 = load i8*, i8** %8
%190 = call i32 @strip_trailing_period_and_whitespace(i8* %189)
br label %191
191: ; preds = %230, %188
%192 = load i8*, i8** %8
%193 = call i32 @strlen(i8* %192)
%194 = icmp sgt i32 %193, 70
br i1 %194, label %195, label %231
195: ; preds = %191
store i64 70, i64* %15
br label %196
196: ; preds = %208, %195
%197 = load i64, i64* %15
%198 = icmp ne i64 %197, 0
br i1 %198, label %199, label %206
199: ; preds = %196
%200 = load i8*, i8** %8
%201 = load i64, i64* %15
%202 = getelementptr inbounds i8, i8* %200, i64 %201
%203 = load i8, i8* %202
%204 = sext i8 %203 to i32
%205 = icmp ne i32 %204, 44
br label %206
206: ; preds = %199, %196
%207 = phi i1 [ false, %196 ], [ %205, %199 ]
br i1 %207, label %208, label %211
208: ; preds = %206
%209 = load i64, i64* %15
%210 = add i64 %209, -1
store i64 %210, i64* %15
br label %196
211: ; preds = %206
%212 = load i8*, i8** %8
%213 = load i64, i64* %15
%214 = getelementptr inbounds i8, i8* %212, i64 %213
store i8 0, i8* %214
%215 = load i8*, i8** %14
%216 = load i8*, i8** %8
%217 = call i32 @printf(i8* %215, i8* %216)
%218 = load i64, i64* %15
%219 = add i64 %218, 1
%220 = load i8*, i8** %8
%221 = getelementptr inbounds i8, i8* %220, i64 %219
store i8* %221, i8** %8
br label %222
222: ; preds = %227, %211
%223 = load i8*, i8** %8
%224 = load i8, i8* %223
%225 = sext i8 %224 to i32
%226 = icmp eq i32 %225, 32
br i1 %226, label %227, label %230
227: ; preds = %222
%228 = load i8*, i8** %8
%229 = getelementptr inbounds i8, i8* %228, i32 1
store i8* %229, i8** %8
br label %222
230: ; preds = %222
br label %191
231: ; preds = %191
%232 = load i8*, i8** %8
%233 = load i8, i8* %232
%234 = icmp ne i8 %233, 0
br i1 %234, label %235, label %239
235: ; preds = %231
%236 = load i8*, i8** %14
%237 = load i8*, i8** %8
%238 = call i32 @printf(i8* %236, i8* %237)
br label %239
239: ; preds = %235, %231
br label %240
240: ; preds = %239, %148
br label %241
241: ; preds = %240
%242 = load i32, i32* %13
%243 = add nsw i32 %242, 1
store i32 %243, i32* %13
br label %139
244: ; preds = %146
%245 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%246 = load i8, i8* %245
%247 = icmp ne i8 %246, 0
br i1 %247, label %248, label %251
248: ; preds = %244
%249 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%250 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0), i8* %249)
br label %251
251: ; preds = %248, %244
br label %252
252: ; preds = %270, %251
%253 = load i8*, i8** %11
%254 = call i8* @strchr(i8* %253, i8 signext 44)
store i8* %254, i8** %8
%255 = icmp ne i8* %254, null
br i1 %255, label %256, label %271
256: ; preds = %252
%257 = load i8*, i8** %8
store i8 0, i8* %257
%258 = load i8*, i8** %11
%259 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8* %258)
%260 = load i8*, i8** %8
%261 = getelementptr inbounds i8, i8* %260, i64 1
store i8* %261, i8** %11
br label %262
262: ; preds = %267, %256
%263 = load i8*, i8** %11
%264 = load i8, i8* %263
%265 = sext i8 %264 to i32
%266 = icmp eq i32 %265, 32
br i1 %266, label %267, label %270
267: ; preds = %262
%268 = load i8*, i8** %11
%269 = getelementptr inbounds i8, i8* %268, i32 1
store i8* %269, i8** %11
br label %262
270: ; preds = %262
br label %252
271: ; preds = %252
%272 = load i8*, i8** %11
%273 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8* %272)
br label %274
274: ; preds = %271, %127
%275 = load i32*, i32** %6
%276 = getelementptr inbounds [90 x i8], [90 x i8]* %10, i64 0, i64 0
%277 = call i32 @strlen(i8* %276)
%278 = sext i32 %277 to i64
%279 = sub nsw i64 0, %278
%280 = load i32, i32* @SEEK_CUR
%281 = call i32 @fseek(i32* %275, i64 %279, i32 %280)
br label %45
282: ; preds = %55
store i32 0, i32* %3
br label %328
283: ; preds = %40
%284 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%285 = call i8* @strstr(i8* %284, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
store i8* %285, i8** %8
%286 = icmp ne i8* %285, null
br i1 %286, label %287, label %325
287: ; preds = %283
%288 = load i8*, i8** %8
%289 = getelementptr inbounds i8, i8* %288, i64 5
%290 = call i32 @atoi(i8* %289)
%291 = icmp sgt i32 %290, 1992
br i1 %291, label %292, label %325
292: ; preds = %287
%293 = load i8*, i8** %8
%294 = getelementptr inbounds i8, i8* %293, i64 5
%295 = call i32 @atoi(i8* %294)
%296 = icmp slt i32 %295, 2090
br i1 %296, label %297, label %325
297: ; preds = %292
%298 = load i8*, i8** %8
%299 = getelementptr inbounds i8, i8* %298, i64 9
%300 = load i8, i8* %299
%301 = sext i8 %300 to i32
%302 = icmp eq i32 %301, 45
br i1 %302, label %303, label %325
303: ; preds = %297
store i64 11, i64* %16
br label %304
304: ; preds = %311, %303
%305 = load i8*, i8** %8
%306 = load i64, i64* %16
%307 = getelementptr inbounds i8, i8* %305, i64 %306
%308 = load i8, i8* %307
%309 = call i64 @isdigit(i8 signext %308)
%310 = icmp ne i64 %309, 0
br i1 %310, label %311, label %314
311: ; preds = %304
%312 = load i64, i64* %16
%313 = add i64 %312, 1
store i64 %313, i64* %16
br label %304
314: ; preds = %304
%315 = load i64, i64* %16
%316 = icmp ult i64 %315, 15
%317 = zext i1 %316 to i32
%318 = call i32 @assert(i32 %317)
%319 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%320 = load i8*, i8** %8
%321 = load i64, i64* %16
%322 = call i32 @memcpy(i8* %319, i8* %320, i64 %321)
%323 = load i64, i64* %16
%324 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 %323
store i8 0, i8* %324
br label %325
325: ; preds = %314, %297, %292, %287, %283
br label %326
326: ; preds = %325
br label %35
327: ; preds = %35
store i32 -1, i32* %3
br label %328
328: ; preds = %327, %282
%329 = load i32, i32* %3
ret i32 %329
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
@.str.1 = [24 x i8] c"No input file specified\00"
@.str.2 = [21 x i8] c"Input file not found\00"
@.str.3 = [18 x i8] c"Observer details:\00"
@.str.4 = [11 x i8] c"\0ACOD %.3s\0A\00"
@.str.5 = [8 x i8] c"OBS %s\0A\00"
@.str.6 = [8 x i8] c"MEA %s\0A\00"
@.str.7 = [9 x i8] c"Observer\00"
@.str.8 = [9 x i8] c"Measurer\00"
@.str.9 = [39 x i8] c"COM Default details extracted from %s\0A\00"
@.str.10 = [8 x i8] c"TEL %s\0A\00"
@SEEK_CUR = global i32 0
@.str.11 = [6 x i8] c"MPEC \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1000 x i8]
%4 = alloca [15 x i8]
%5 = alloca [90 x i8]
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32* @fopen(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 0
%11 = icmp slt i32 %0, 2
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = tail call i32 @error_exit(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %2
%15 = load i8*, i8** %6
%16 = tail call i32* @fopen(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%17 = icmp eq i32* %16, null
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = tail call i32 @error_exit(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %20
20: ; preds = %18, %14
%21 = call i64 @fgets(i8* %9, i32 1000, i32* %16)
%22 = icmp eq i64 %21, 0
br i1 %22, label %297, label %23
23: ; preds = %20, %294
%24 = call i32 @memcmp(i8* %9, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 17)
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %269
26: ; preds = %23
%27 = call i64 @fgets(i8* %9, i32 1000, i32* %16)
%28 = icmp ne i64 %27, 0
%29 = load i8, i8* %9
%30 = icmp sgt i8 %29, 31
%31 = select i1 %28, i1 %30, i1 false
br i1 %31, label %32, label %297
32: ; preds = %26
%33 = getelementptr inbounds [90 x i8], [90 x i8]* %5, i64 0, i64 0
%34 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 1
%35 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 2
%36 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 3
br label %37
37: ; preds = %32, %258
%38 = call i32 @remove_html_tags(i8* %9)
%39 = load i8, i8* %9
%40 = icmp ne i8 %39, 32
%41 = load i8, i8* %34
%42 = icmp ne i8 %41, 32
%43 = select i1 %40, i1 %42, i1 false
br i1 %43, label %44, label %47
44: ; preds = %37
%45 = load i8, i8* %35
%46 = icmp ne i8 %45, 32
br label %47
47: ; preds = %44, %37
%48 = phi i1 [ false, %37 ], [ %46, %44 ]
%49 = zext i1 %48 to i32
%50 = call i32 @assert(i32 %49)
%51 = load i8, i8* %36
%52 = icmp eq i8 %51, 32
%53 = zext i1 %52 to i32
%54 = call i32 @assert(i32 %53)
%55 = call i64 @fgets(i8* %33, i32 90, i32* %16)
%56 = icmp ne i64 %55, 0
%57 = load i8, i8* %33
%58 = icmp eq i8 %57, 32
%59 = select i1 %56, i1 %58, i1 false
br i1 %59, label %60, label %85
60: ; preds = %47, %66
%61 = phi i64 [ %67, %66 ], [ 1, %47 ]
%62 = getelementptr inbounds [90 x i8], [90 x i8]* %5, i64 0, i64 %61
%63 = load i8, i8* %62
%64 = icmp eq i8 %63, 32
%65 = add i64 %61, 1
br i1 %64, label %66, label %68
66: ; preds = %60, %68
%67 = phi i64 [ %65, %60 ], [ 1, %68 ]
br label %60
68: ; preds = %60
%69 = getelementptr inbounds [90 x i8], [90 x i8]* %5, i64 0, i64 %61
%70 = add i64 %61, -3
%71 = icmp ult i64 %70, 2
%72 = zext i1 %71 to i32
%73 = call i32 @assert(i32 %72)
%74 = call i32 @strlen(i8* %9)
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 %75
%77 = getelementptr inbounds i8, i8* %76, i64 -1
%78 = getelementptr inbounds i8, i8* %69, i64 -1
%79 = call i32 @strcpy(i8* %77, i8* %78)
%80 = call i64 @fgets(i8* %33, i32 90, i32* %16)
%81 = icmp ne i64 %80, 0
%82 = load i8, i8* %33
%83 = icmp eq i8 %82, 32
%84 = select i1 %81, i1 %83, i1 false
br i1 %84, label %66, label %85
85: ; preds = %68, %47
%86 = call i32 @strip_trailing_period_and_whitespace(i8* %9)
%87 = call i8* @find_telescope(i8* %9)
%88 = icmp eq i8* %87, null
br i1 %88, label %258, label %89
89: ; preds = %85
%90 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* %9)
%91 = getelementptr inbounds i8, i8* %87, i64 -1
store i8 0, i8* %91
%92 = call i32 @strlen(i8* %9)
%93 = icmp eq i32 %92, 0
br i1 %93, label %235, label %94
94: ; preds = %89
%95 = call i8* @strstr(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%96 = icmp eq i8* %95, null
br i1 %96, label %163, label %97
97: ; preds = %94
store i8 0, i8* %95
br label %98
98: ; preds = %98, %97
%99 = phi i8* [ %95, %97 ], [ %100, %98 ]
%100 = getelementptr inbounds i8, i8* %99, i64 1
%101 = load i8, i8* %100
%102 = icmp sgt i8 %101, 32
br i1 %102, label %98, label %103
103: ; preds = %98, %106
%104 = phi i8 [ %108, %106 ], [ %101, %98 ]
%105 = phi i8* [ %107, %106 ], [ %100, %98 ]
switch i8 %104, label %109 [
i8 32, label %106
i8 44, label %106
]
106: ; preds = %103, %103
%107 = getelementptr inbounds i8, i8* %105, i64 1
%108 = load i8, i8* %107
br label %103
109: ; preds = %103
%110 = call i32 @strip_trailing_period_and_whitespace(i8* %105)
%111 = call i32 @strlen(i8* %105)
%112 = icmp sgt i32 %111, 70
br i1 %112, label %116, label %157
113: ; preds = %152
%114 = call i32 @strlen(i8* %153)
%115 = icmp sgt i32 %114, 70
br i1 %115, label %116, label %157
116: ; preds = %109, %113
%117 = phi i8* [ %153, %113 ], [ %105, %109 ]
br label %118
118: ; preds = %143, %116
%119 = phi i64 [ 70, %116 ], [ %144, %143 ]
%120 = getelementptr inbounds i8, i8* %117, i64 %119
%121 = load i8, i8* %120
%122 = icmp eq i8 %121, 44
br i1 %122, label %146, label %123
123: ; preds = %118
%124 = add nsw i64 %119, -1
%125 = getelementptr inbounds i8, i8* %117, i64 %124
%126 = load i8, i8* %125
%127 = icmp eq i8 %126, 44
br i1 %127, label %146, label %128
128: ; preds = %123
%129 = add nsw i64 %119, -2
%130 = getelementptr inbounds i8, i8* %117, i64 %129
%131 = load i8, i8* %130
%132 = icmp eq i8 %131, 44
br i1 %132, label %146, label %133
133: ; preds = %128
%134 = add nsw i64 %119, -3
%135 = getelementptr inbounds i8, i8* %117, i64 %134
%136 = load i8, i8* %135
%137 = icmp eq i8 %136, 44
br i1 %137, label %146, label %138
138: ; preds = %133
%139 = add nsw i64 %119, -4
%140 = getelementptr inbounds i8, i8* %117, i64 %139
%141 = load i8, i8* %140
%142 = icmp eq i8 %141, 44
br i1 %142, label %146, label %143
143: ; preds = %138
%144 = add nsw i64 %119, -5
%145 = icmp eq i64 %144, 0
br i1 %145, label %146, label %118
146: ; preds = %143, %138, %133, %128, %123, %118
%147 = phi i64 [ %119, %118 ], [ %124, %123 ], [ %129, %128 ], [ %134, %133 ], [ %139, %138 ], [ 0, %143 ]
%148 = getelementptr inbounds i8, i8* %117, i64 %147
store i8 0, i8* %148
%149 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* %117)
%150 = add nsw i64 %147, 1
%151 = getelementptr inbounds i8, i8* %117, i64 %150
br label %152
152: ; preds = %152, %146
%153 = phi i8* [ %151, %146 ], [ %156, %152 ]
%154 = load i8, i8* %153
%155 = icmp eq i8 %154, 32
%156 = getelementptr inbounds i8, i8* %153, i64 1
br i1 %155, label %152, label %113
157: ; preds = %113, %109
%158 = phi i8* [ %105, %109 ], [ %153, %113 ]
%159 = load i8, i8* %158
%160 = icmp eq i8 %159, 0
br i1 %160, label %163, label %161
161: ; preds = %157
%162 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* %158)
br label %163
163: ; preds = %157, %161, %94
%164 = call i32 @strlen(i8* %9)
%165 = icmp eq i32 %164, 0
br i1 %165, label %235, label %166
166: ; preds = %163
%167 = call i8* @strstr(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%168 = icmp eq i8* %167, null
br i1 %168, label %235, label %169
169: ; preds = %166
store i8 0, i8* %167
br label %170
170: ; preds = %170, %169
%171 = phi i8* [ %167, %169 ], [ %172, %170 ]
%172 = getelementptr inbounds i8, i8* %171, i64 1
%173 = load i8, i8* %172
%174 = icmp sgt i8 %173, 32
br i1 %174, label %170, label %175
175: ; preds = %170, %178
%176 = phi i8 [ %180, %178 ], [ %173, %170 ]
%177 = phi i8* [ %179, %178 ], [ %172, %170 ]
switch i8 %176, label %181 [
i8 32, label %178
i8 44, label %178
]
178: ; preds = %175, %175
%179 = getelementptr inbounds i8, i8* %177, i64 1
%180 = load i8, i8* %179
br label %175
181: ; preds = %175
%182 = call i32 @strip_trailing_period_and_whitespace(i8* %177)
%183 = call i32 @strlen(i8* %177)
%184 = icmp sgt i32 %183, 70
br i1 %184, label %185, label %229
185: ; preds = %181, %226
%186 = phi i8* [ %222, %226 ], [ %177, %181 ]
br label %187
187: ; preds = %212, %185
%188 = phi i64 [ 70, %185 ], [ %213, %212 ]
%189 = getelementptr inbounds i8, i8* %186, i64 %188
%190 = load i8, i8* %189
%191 = icmp eq i8 %190, 44
br i1 %191, label %215, label %192
192: ; preds = %187
%193 = add nsw i64 %188, -1
%194 = getelementptr inbounds i8, i8* %186, i64 %193
%195 = load i8, i8* %194
%196 = icmp eq i8 %195, 44
br i1 %196, label %215, label %197
197: ; preds = %192
%198 = add nsw i64 %188, -2
%199 = getelementptr inbounds i8, i8* %186, i64 %198
%200 = load i8, i8* %199
%201 = icmp eq i8 %200, 44
br i1 %201, label %215, label %202
202: ; preds = %197
%203 = add nsw i64 %188, -3
%204 = getelementptr inbounds i8, i8* %186, i64 %203
%205 = load i8, i8* %204
%206 = icmp eq i8 %205, 44
br i1 %206, label %215, label %207
207: ; preds = %202
%208 = add nsw i64 %188, -4
%209 = getelementptr inbounds i8, i8* %186, i64 %208
%210 = load i8, i8* %209
%211 = icmp eq i8 %210, 44
br i1 %211, label %215, label %212
212: ; preds = %207
%213 = add nsw i64 %188, -5
%214 = icmp eq i64 %213, 0
br i1 %214, label %215, label %187
215: ; preds = %212, %207, %202, %197, %192, %187
%216 = phi i64 [ %188, %187 ], [ %193, %192 ], [ %198, %197 ], [ %203, %202 ], [ %208, %207 ], [ 0, %212 ]
%217 = getelementptr inbounds i8, i8* %186, i64 %216
store i8 0, i8* %217
%218 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* %186)
%219 = add nsw i64 %216, 1
%220 = getelementptr inbounds i8, i8* %186, i64 %219
br label %221
221: ; preds = %221, %215
%222 = phi i8* [ %220, %215 ], [ %225, %221 ]
%223 = load i8, i8* %222
%224 = icmp eq i8 %223, 32
%225 = getelementptr inbounds i8, i8* %222, i64 1
br i1 %224, label %221, label %226
226: ; preds = %221
%227 = call i32 @strlen(i8* %222)
%228 = icmp sgt i32 %227, 70
br i1 %228, label %185, label %229
229: ; preds = %226, %181
%230 = phi i8* [ %177, %181 ], [ %222, %226 ]
%231 = load i8, i8* %230
%232 = icmp eq i8 %231, 0
br i1 %232, label %235, label %233
233: ; preds = %229
%234 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* %230)
br label %235
235: ; preds = %166, %229, %233, %163, %89
%236 = load i8, i8* %10
%237 = icmp eq i8 %236, 0
br i1 %237, label %240, label %238
238: ; preds = %235
%239 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0), i8* %10)
br label %240
240: ; preds = %238, %235
%241 = call i8* @strchr(i8* %87, i8 signext 44)
%242 = icmp eq i8* %241, null
br i1 %242, label %255, label %246
243: ; preds = %250
%244 = call i8* @strchr(i8* %252, i8 signext 44)
%245 = icmp eq i8* %244, null
br i1 %245, label %255, label %246
246: ; preds = %240, %243
%247 = phi i8* [ %244, %243 ], [ %241, %240 ]
%248 = phi i8* [ %252, %243 ], [ %87, %240 ]
store i8 0, i8* %247
%249 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8* %248)
br label %250
250: ; preds = %250, %246
%251 = phi i8* [ %247, %246 ], [ %252, %250 ]
%252 = getelementptr inbounds i8, i8* %251, i64 1
%253 = load i8, i8* %252
%254 = icmp eq i8 %253, 32
br i1 %254, label %250, label %243
255: ; preds = %243, %240
%256 = phi i8* [ %87, %240 ], [ %252, %243 ]
%257 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8* %256)
br label %258
258: ; preds = %255, %85
%259 = call i32 @strlen(i8* %33)
%260 = sext i32 %259 to i64
%261 = sub nsw i64 0, %260
%262 = load i32, i32* @SEEK_CUR
%263 = call i32 @fseek(i32* %16, i64 %261, i32 %262)
%264 = call i64 @fgets(i8* %9, i32 1000, i32* %16)
%265 = icmp ne i64 %264, 0
%266 = load i8, i8* %9
%267 = icmp sgt i8 %266, 31
%268 = select i1 %265, i1 %267, i1 false
br i1 %268, label %37, label %297
269: ; preds = %23
%270 = call i8* @strstr(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
%271 = icmp eq i8* %270, null
br i1 %271, label %294, label %272
272: ; preds = %269
%273 = getelementptr inbounds i8, i8* %270, i64 5
%274 = call i32 @atoi(i8* %273)
%275 = add i32 %274, -1993
%276 = icmp ult i32 %275, 97
br i1 %276, label %277, label %294
277: ; preds = %272
%278 = getelementptr inbounds i8, i8* %270, i64 9
%279 = load i8, i8* %278
%280 = icmp eq i8 %279, 45
br i1 %280, label %281, label %294
281: ; preds = %277, %281
%282 = phi i64 [ %287, %281 ], [ 11, %277 ]
%283 = getelementptr inbounds i8, i8* %270, i64 %282
%284 = load i8, i8* %283
%285 = call i64 @isdigit(i8 signext %284)
%286 = icmp eq i64 %285, 0
%287 = add i64 %282, 1
br i1 %286, label %288, label %281
288: ; preds = %281
%289 = icmp ult i64 %282, 15
%290 = zext i1 %289 to i32
%291 = call i32 @assert(i32 %290)
%292 = call i32 @memcpy(i8* %10, i8* %270, i64 %282)
%293 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 %282
store i8 0, i8* %293
br label %294
294: ; preds = %269, %272, %277, %288
%295 = call i64 @fgets(i8* %9, i32 1000, i32* %16)
%296 = icmp eq i64 %295, 0
br i1 %296, label %297, label %23
297: ; preds = %294, %258, %20, %26
%298 = phi i32 [ 0, %26 ], [ -1, %20 ], [ 0, %258 ], [ -1, %294 ]
ret i32 %298
}