#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 atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
scalar_t__ isspace(char);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, char *, ...);
int /*<<< orphan*/ strcpy(char *, char *);
char *strdup(char *);
int strlen(char *);
char *strtok(char *, char *);
int /*<<< orphan*/ system(char *);
main(int argc, char *argv[]) {
  int line, i, iflag;
  char buf[1024];
  char tokbuf[1024];
  int f, x, y, scale, ref, dw;
  char *valp;
  char *units;
  char *description;
  char file_in[70], file_out[70];
  FILE *fp_in, *fp_out;
  if (argc != 2) {
    printf(" ERROR:  no arguments\n");
    printf(" convert <filename:\n");
    exit(-1);
  }
  sprintf(file_in, "%s.old", argv[1]);
  printf(" full input file name =%s\n", file_in);
  sprintf(file_out, "%s", argv[1]);
  printf(" full output file name =%s\n", file_out);
  sprintf(buf, "mv %s %s.old\n", argv[1], argv[1]);
  system(buf);
  if ((fp_in = fopen(file_in, "r")) == NULL) {
    sprintf(buf, "Can't open input file \"%s\"\n", file_in);
    exit(1);
  }
  if ((fp_out = fopen(file_out, "w")) == NULL) {
    sprintf(buf, "Can't open output file \"%s\"\n", file_in);
    exit(1);
  }
  for (line = 1; fgets(buf, 1024, fp_in) != NULL; line++) {
    iflag = 0;
    valp = buf;
    if (*valp == '#') {
      fprintf(fp_out, "%s", buf);
    } else if (strlen(buf) == 1) {
      fprintf(fp_out, "\n");
    } else {
      strcpy(tokbuf, buf);
      for (valp = &tokbuf[strlen(tokbuf) - 1]; isspace(*valp); valp--)
        *valp = (char)NULL;
      if ((valp = strtok(tokbuf, " -\t")) == NULL) {
        printf("Line %d: Missing F descriptor\n", line);
        iflag = 1;
      } else
        f = atoi(valp);
      if (iflag == 0) {
        if ((valp = strtok(NULL, " -\t")) == NULL) {
          printf("Line %d: Missing X descriptor\n", line);
          iflag = 1;
        } else
          x = atoi(valp);
      }
      if (iflag == 0) {
        if ((valp = strtok(NULL, " \t")) == NULL) {
          printf("%Line %d: Missing Y descriptor\n", line);
          iflag = 1;
        } else
          y = atoi(valp);
      }
      if (iflag == 0) {
        if ((valp = strtok(NULL, " \t")) == NULL) {
          printf("Line %d: Missing Scale value\n", line);
        } else
          scale = atoi(valp);
      }
      if (iflag == 0) {
        if ((valp = strtok(NULL, " \t")) == NULL) {
          printf("Line %d: Missing Reference Value\n", line);
          iflag = 1;
        } else
          ref = atoi(valp);
      }
      if (iflag == 0) {
        if ((valp = strtok(NULL, " \t")) == NULL) {
          printf(" Line %d: Missing Data Width value\n", line);
          iflag = 1;
        } else
          dw = atoi(valp);
      }
      if (iflag == 0) {
        if ((units = strtok(NULL, " \t\n")) == NULL) {
          printf("Line %d: Missing Units description\n", line);
          iflag == 1;
        }
      }
      for (valp = units + strlen(units) + 1; *valp != (char)NULL; valp++) {
        if (!isspace(*valp))
          break;
      }
      if (*valp == '\n' || *valp == (char)NULL)
        description = strdup("???");
      else
        description = strdup(valp);
      if (iflag == 0) {
        fprintf(fp_out, "%3d;%5d;%7d;%7d;%12d;%5d; %12s; %s\n", f, x, y, scale,
                ref, dw, units, description);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x938,%rsp
movl   $0x0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpl   $0x2,-0x10(%rbp)
je     121a <main+0x4a>
lea    0xe05(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe0e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0xffffffff,%edi
call   10e0 <exit@plt>
lea    -0x8b0(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xdfc(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
lea    -0x8b0(%rbp),%rsi
lea    0xdee(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x900(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xdec(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
lea    -0x900(%rbp),%rsi
lea    0xdda(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x430(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rcx
lea    0xdd1(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
lea    -0x430(%rbp),%rdi
call   1050 <system@plt>
lea    -0x8b0(%rbp),%rdi
lea    0xdbe(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x908(%rbp)
cmp    $0x0,%rax
jne    12f9 <main+0x129>
lea    -0x430(%rbp),%rdi
lea    -0x8b0(%rbp),%rdx
lea    0xd95(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
lea    -0x900(%rbp),%rdi
lea    0xd92(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x910(%rbp)
cmp    $0x0,%rax
jne    1343 <main+0x173>
lea    -0x430(%rbp),%rdi
lea    -0x8b0(%rbp),%rdx
lea    0xd69(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
movl   $0x1,-0x1c(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x908(%rbp),%rdx
mov    $0x400,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
je     1811 <main+0x641>
movl   $0x0,-0x24(%rbp)
lea    -0x430(%rbp),%rax
mov    %rax,-0x850(%rbp)
mov    -0x850(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    13b5 <main+0x1e5>
mov    -0x910(%rbp),%rdi
lea    -0x430(%rbp),%rdx
lea    0xca5(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    17fe <main+0x62e>
lea    -0x430(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x1,%eax
jne    13e4 <main+0x214>
mov    -0x910(%rbp),%rdi
lea    0xdab(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    17f9 <main+0x629>
lea    -0x830(%rbp),%rdi
lea    -0x430(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x830(%rbp),%rdi
call   1040 <strlen@plt>
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0x830(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x850(%rbp)
mov    -0x850(%rbp),%rax
movsbl (%rax),%edi
call   1070 <isspace@plt>
cmp    $0x0,%rax
je     1454 <main+0x284>
mov    -0x850(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x850(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x850(%rbp)
jmp    141a <main+0x24a>
lea    -0x830(%rbp),%rdi
lea    0xc56(%rip),%rsi
call   10b0 <strtok@plt>
mov    %rax,-0x850(%rbp)
cmp    $0x0,%rax
jne    1495 <main+0x2c5>
mov    -0x1c(%rbp),%esi
lea    0xc3a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x24(%rbp)
jmp    14a7 <main+0x2d7>
mov    -0x850(%rbp),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x834(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    1506 <main+0x336>
xor    %eax,%eax
mov    %eax,%edi
lea    0xbfc(%rip),%rsi
call   10b0 <strtok@plt>
mov    %rax,-0x850(%rbp)
cmp    $0x0,%rax
jne    14ef <main+0x31f>
mov    -0x1c(%rbp),%esi
lea    0xbff(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x24(%rbp)
jmp    1501 <main+0x331>
mov    -0x850(%rbp),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x838(%rbp)
jmp    1506 <main+0x336>
cmpl   $0x0,-0x24(%rbp)
jne    1565 <main+0x395>
xor    %eax,%eax
mov    %eax,%edi
lea    0xbdf(%rip),%rsi
call   10b0 <strtok@plt>
mov    %rax,-0x850(%rbp)
cmp    $0x0,%rax
jne    154e <main+0x37e>
mov    -0x1c(%rbp),%esi
lea    0xbc2(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x24(%rbp)
jmp    1560 <main+0x390>
mov    -0x850(%rbp),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x83c(%rbp)
jmp    1565 <main+0x395>
cmpl   $0x0,-0x24(%rbp)
jne    15bd <main+0x3ed>
xor    %eax,%eax
mov    %eax,%edi
lea    0xb80(%rip),%rsi
call   10b0 <strtok@plt>
mov    %rax,-0x850(%rbp)
cmp    $0x0,%rax
jne    15a6 <main+0x3d6>
mov    -0x1c(%rbp),%esi
lea    0xb83(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    15b8 <main+0x3e8>
mov    -0x850(%rbp),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x840(%rbp)
jmp    15bd <main+0x3ed>
cmpl   $0x0,-0x24(%rbp)
jne    161c <main+0x44c>
xor    %eax,%eax
mov    %eax,%edi
lea    0xb28(%rip),%rsi
call   10b0 <strtok@plt>
mov    %rax,-0x850(%rbp)
cmp    $0x0,%rax
jne    1605 <main+0x435>
mov    -0x1c(%rbp),%esi
lea    0xb49(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x24(%rbp)
jmp    1617 <main+0x447>
mov    -0x850(%rbp),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x844(%rbp)
jmp    161c <main+0x44c>
cmpl   $0x0,-0x24(%rbp)
jne    167b <main+0x4ab>
xor    %eax,%eax
mov    %eax,%edi
lea    0xac9(%rip),%rsi
call   10b0 <strtok@plt>
mov    %rax,-0x850(%rbp)
cmp    $0x0,%rax
jne    1664 <main+0x494>
mov    -0x1c(%rbp),%esi
lea    0xb0c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x24(%rbp)
jmp    1676 <main+0x4a6>
mov    -0x850(%rbp),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x848(%rbp)
jmp    167b <main+0x4ab>
cmpl   $0x0,-0x24(%rbp)
jne    16bc <main+0x4ec>
xor    %eax,%eax
mov    %eax,%edi
lea    0xaf1(%rip),%rsi
call   10b0 <strtok@plt>
mov    %rax,-0x858(%rbp)
cmp    $0x0,%rax
jne    16b7 <main+0x4e7>
mov    -0x1c(%rbp),%esi
lea    0xad5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    16bc <main+0x4ec>
mov    -0x858(%rbp),%rax
mov    %rax,-0x918(%rbp)
mov    -0x858(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x918(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x1,%rax
mov    %rax,-0x850(%rbp)
mov    -0x850(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     173d <main+0x56d>
mov    -0x850(%rbp),%rax
movsbl (%rax),%edi
call   1070 <isspace@plt>
cmp    $0x0,%rax
jne    1721 <main+0x551>
jmp    173d <main+0x56d>
jmp    1726 <main+0x556>
mov    -0x850(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x850(%rbp)
jmp    16f0 <main+0x520>
mov    -0x850(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     1763 <main+0x593>
mov    -0x850(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    177b <main+0x5ab>
lea    0xa3f(%rip),%rdi
call   10f0 <strdup@plt>
mov    %rax,-0x860(%rbp)
jmp    178e <main+0x5be>
mov    -0x850(%rbp),%rdi
call   10f0 <strdup@plt>
mov    %rax,-0x860(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    17f4 <main+0x624>
mov    -0x910(%rbp),%rdi
mov    -0x834(%rbp),%edx
mov    -0x838(%rbp),%ecx
mov    -0x83c(%rbp),%r8d
mov    -0x840(%rbp),%r9d
mov    -0x844(%rbp),%ebx
mov    -0x848(%rbp),%r11d
mov    -0x858(%rbp),%r10
mov    -0x860(%rbp),%rax
lea    0x9d2(%rip),%rsi
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    17f9 <main+0x629>
jmp    17fe <main+0x62e>
jmp    1803 <main+0x633>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    134a <main+0x17a>
xor    %eax,%eax
add    $0x938,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x8d8,%rsp
cmp    $0x2,%edi
jne    15c7 <main+0x3c7>
mov    %rsi,%rbp
mov    0x8(%rsi),%rdx
lea    0xdd8(%rip),%rsi
lea    0x30(%rsp),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1100 <sprintf@plt>
lea    0xdc9(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x8(%rbp),%rsi
lea    0x80(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xdbf(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x8(%rbp),%rcx
lea    0xdc6(%rip),%rsi
lea    0xd0(%rsp),%rbx
mov    %rbx,%rdi
mov    %rcx,%rdx
xor    %eax,%eax
call   1100 <sprintf@plt>
mov    %rbx,%rdi
call   1060 <system@plt>
lea    0xdb0(%rip),%rsi
mov    %r14,%rdi
call   10d0 <fopen@plt>
test   %rax,%rax
je     15e9 <main+0x3e9>
mov    %rax,%rbx
lea    0xdb3(%rip),%rsi
lea    0x80(%rsp),%rdi
call   10d0 <fopen@plt>
test   %rax,%rax
je     15f2 <main+0x3f2>
mov    %rax,%r15
lea    0xd0(%rsp),%rdi
mov    $0x400,%esi
mov    %rbx,%rdx
call   10b0 <fgets@plt>
test   %rax,%rax
je     15b3 <main+0x3b3>
mov    $0x1,%ebp
lea    0xd0(%rsp),%r14
lea    0x4d0(%rsp),%r13
mov    %rax,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    %rbx,0x28(%rsp)
mov    %r15,0x20(%rsp)
jmp    1347 <main+0x147>
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15,%rsi
call   1080 <fputs@plt>
add    $0x1,%ebp
mov    %r14,%rdi
mov    $0x400,%esi
mov    %rbx,%rdx
call   10b0 <fgets@plt>
test   %rax,%rax
je     15b3 <main+0x3b3>
cmpb   $0x23,0xd0(%rsp)
23
je     1320 <main+0x120>
mov    %r14,%rdi
call   1050 <strlen@plt>
cmp    $0x1,%eax
jne    1370 <main+0x170>
mov    $0xa,%edi
mov    %r15,%rsi
call   10a0 <fputc@plt>
jmp    132b <main+0x12b>
nopl   (%rax)
mov    %r13,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %r13,%rdi
call   1050 <strlen@plt>
movslq %eax,%rbx
movsbl -0x1(%rbx,%r13,1),%edi
call   1090 <isspace@plt>
test   %rax,%rax
je     13b5 <main+0x1b5>
add    %r13,%rbx
add    $0xffffffffffffffff,%rbx
nopl   (%rax)
movb   $0x0,(%rbx)
movsbl -0x1(%rbx),%edi
add    $0xffffffffffffffff,%rbx
call   1090 <isspace@plt>
test   %rax,%rax
jne    13a0 <main+0x1a0>
mov    %r13,%rdi
lea    0xcca(%rip),%rbx
mov    %rbx,%rsi
call   10e0 <strtok@plt>
test   %rax,%rax
je     1437 <main+0x237>
mov    %rax,%rdi
call   10f0 <atoi@plt>
mov    %eax,0xc(%rsp)
xor    %r15d,%r15d
xor    %edi,%edi
mov    %rbx,%rsi
call   10e0 <strtok@plt>
test   %rax,%rax
je     1446 <main+0x246>
mov    %rax,%rdi
call   10f0 <atoi@plt>
mov    %eax,0x8(%rsp)
xor    %r15d,%r15d
xor    %edi,%edi
lea    0xcc9(%rip),%rbx
mov    %rbx,%rsi
call   10e0 <strtok@plt>
test   %rax,%rax
je     1452 <main+0x252>
mov    %rax,%rdi
call   10f0 <atoi@plt>
mov    %eax,0x4(%rsp)
xor    %edi,%edi
mov    %rbx,%rsi
call   10e0 <strtok@plt>
test   %rax,%rax
je     145e <main+0x25e>
mov    %rax,%rdi
call   10f0 <atoi@plt>
mov    %eax,(%rsp)
jmp    146e <main+0x26e>
xor    %r15d,%r15d
lea    0xc4c(%rip),%rdi
jmp    14f0 <main+0x2f0>
lea    0xc5f(%rip),%rdi
jmp    14f0 <main+0x2f0>
lea    0xc75(%rip),%rdi
jmp    14f0 <main+0x2f0>
lea    0xc89(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %r15d,%r15d
xor    %edi,%edi
mov    %rbx,%rsi
call   10e0 <strtok@plt>
test   %rax,%rax
je     14d4 <main+0x2d4>
mov    %rax,%rdi
call   10f0 <atoi@plt>
mov    %rax,0x18(%rsp)
xor    %r15d,%r15d
xor    %edi,%edi
mov    %rbx,%rsi
call   10e0 <strtok@plt>
test   %rax,%rax
je     14dd <main+0x2dd>
mov    %rax,%rdi
call   10f0 <atoi@plt>
mov    %rax,0x10(%rsp)
xor    %edi,%edi
lea    0xc9d(%rip),%rsi
call   10e0 <strtok@plt>
mov    %rax,%r13
mov    $0x1,%r15b
lea    0xc8f(%rip),%rdi
mov    $0x0,%r12d
test   %rax,%rax
jne    14fc <main+0x2fc>
jmp    14f0 <main+0x2f0>
lea    0xc31(%rip),%rdi
jmp    14f0 <main+0x2f0>
lea    0xc4a(%rip),%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebp,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r12,%r13
mov    %r13,%rdi
call   1050 <strlen@plt>
movslq %eax,%r12
add    %r13,%r12
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%r12),%eax
test   %al,%al
je     1540 <main+0x340>
add    $0x1,%r12
movsbl %al,%edi
call   1090 <isspace@plt>
test   %rax,%rax
jne    1510 <main+0x310>
mov    (%r12),%al
cmp    $0xa,%al
je     1540 <main+0x340>
test   %al,%al
jne    15ae <main+0x3ae>
nopw   0x0(%rax,%rax,1)
lea    0xc33(%rip),%rdi
call   1120 <strdup@plt>
mov    %rax,%rbx
test   %r15b,%r15b
je     1594 <main+0x394>
mov    0x20(%rsp),%r15
mov    %r15,%rdi
lea    0xc1b(%rip),%rsi
mov    0xc(%rsp),%edx
mov    0x8(%rsp),%ecx
mov    0x4(%rsp),%r8d
mov    (%rsp),%r9d
xor    %eax,%eax
push   %rbx
push   %r13
push   0x20(%rsp)
push   0x30(%rsp)
call   10c0 <fprintf@plt>
add    $0x20,%rsp
mov    %r13,%r12
mov    0x28(%rsp),%rbx
jmp    15a1 <main+0x3a1>
mov    %r13,%r12
mov    0x28(%rsp),%rbx
mov    0x20(%rsp),%r15
lea    0x4d0(%rsp),%r13
jmp    132b <main+0x12b>
mov    %r12,%rdi
jmp    1547 <main+0x347>
xor    %eax,%eax
add    $0x8d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xbd4(%rip),%rdi
call   1040 <puts@plt>
lea    0xbde(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%edi
call   1110 <exit@plt>
lea    0xa5e(%rip),%rsi
jmp    15f9 <main+0x3f9>
lea    0xa73(%rip),%rsi
lea    0xd0(%rsp),%rdi
lea    0x30(%rsp),%rdx
xor    %eax,%eax
call   1100 <sprintf@plt>
mov    $0x1,%edi
call   1110 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c" ERROR: no arguments\0A\00"
@.str.1 = [21 x i8] c" convert <filename:\0A\00"
@.str.2 = [7 x i8] c"%s.old\00"
@.str.3 = [27 x i8] c" full input file name =%s\0A\00"
@.str.4 = [3 x i8] c"%s\00"
@.str.5 = [28 x i8] c" full output file name =%s\0A\00"
@.str.6 = [14 x i8] c"mv %s %s.old\0A\00"
@.str.7 = [2 x i8] c"r\00"
@.str.8 = [28 x i8] c"Can't open input file \22%s\22\0A\00"
@.str.9 = [2 x i8] c"w\00"
@.str.10 = [29 x i8] c"Can't open output file \22%s\22\0A\00"
@.str.11 = [2 x i8] c"\0A\00"
@.str.12 = [4 x i8] c" -\09\00"
@.str.13 = [31 x i8] c"Line %d: Missing F descriptor\0A\00"
@.str.14 = [31 x i8] c"Line %d: Missing X descriptor\0A\00"
@.str.15 = [3 x i8] c" \09\00"
@.str.16 = [32 x i8] c"%Line %d: Missing Y descriptor\0A\00"
@.str.17 = [30 x i8] c"Line %d: Missing Scale value\0A\00"
@.str.18 = [34 x i8] c"Line %d: Missing Reference Value\0A\00"
@.str.19 = [36 x i8] c" Line %d: Missing Data Width value\0A\00"
@.str.20 = [4 x i8] c" \09\0A\00"
@.str.21 = [36 x i8] c"Line %d: Missing Units description\0A\00"
@.str.22 = [4 x i8] c"???\00"
@.str.23 = [36 x i8] c"%3d;%5d;%7d;%7d;%12d;%5d; %12s; %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [1024 x i8]
%10 = alloca [1024 x i8]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i8*
%18 = alloca i8*
%19 = alloca i8*
%20 = alloca [70 x i8]
%21 = alloca [70 x i8]
%22 = alloca i32*
%23 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%24 = load i32, i32* %4
%25 = icmp ne i32 %24, 2
br i1 %25, label %26, label %30
26: ; preds = %2
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%29 = call i32 @exit(i32 -1)
unreachable
30: ; preds = %2
%31 = getelementptr inbounds [70 x i8], [70 x i8]* %20, i64 0, i64 0
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 1
%34 = load i8*, i8** %33
%35 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %31, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %34)
%36 = getelementptr inbounds [70 x i8], [70 x i8]* %20, i64 0, i64 0
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* %36)
%38 = getelementptr inbounds [70 x i8], [70 x i8]* %21, i64 0, i64 0
%39 = load i8**, i8*** %5
%40 = getelementptr inbounds i8*, i8** %39, i64 1
%41 = load i8*, i8** %40
%42 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %38, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %41)
%43 = getelementptr inbounds [70 x i8], [70 x i8]* %21, i64 0, i64 0
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i8* %43)
%45 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%46 = load i8**, i8*** %5
%47 = getelementptr inbounds i8*, i8** %46, i64 1
%48 = load i8*, i8** %47
%49 = load i8**, i8*** %5
%50 = getelementptr inbounds i8*, i8** %49, i64 1
%51 = load i8*, i8** %50
%52 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %45, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* %48, i8* %51)
%53 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%54 = call i32 @system(i8* %53)
%55 = getelementptr inbounds [70 x i8], [70 x i8]* %20, i64 0, i64 0
%56 = call i32* @fopen(i8* %55, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
store i32* %56, i32** %22
%57 = icmp eq i32* %56, null
br i1 %57, label %58, label %63
58: ; preds = %30
%59 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%60 = getelementptr inbounds [70 x i8], [70 x i8]* %20, i64 0, i64 0
%61 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %59, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i8* %60)
%62 = call i32 @exit(i32 1)
unreachable
63: ; preds = %30
%64 = getelementptr inbounds [70 x i8], [70 x i8]* %21, i64 0, i64 0
%65 = call i32* @fopen(i8* %64, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
store i32* %65, i32** %23
%66 = icmp eq i32* %65, null
br i1 %66, label %67, label %72
67: ; preds = %63
%68 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%69 = getelementptr inbounds [70 x i8], [70 x i8]* %20, i64 0, i64 0
%70 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %68, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0), i8* %69)
%71 = call i32 @exit(i32 1)
unreachable
72: ; preds = %63
store i32 1, i32* %6
br label %73
73: ; preds = %256, %72
%74 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%75 = load i32*, i32** %22
%76 = call i32* @fgets(i8* %74, i32 1024, i32* %75)
%77 = icmp ne i32* %76, null
br i1 %77, label %78, label %259
78: ; preds = %73
store i32 0, i32* %8
%79 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
store i8* %79, i8** %17
%80 = load i8*, i8** %17
%81 = load i8, i8* %80
%82 = sext i8 %81 to i32
%83 = icmp eq i32 %82, 35
br i1 %83, label %84, label %88
84: ; preds = %78
%85 = load i32*, i32** %23
%86 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%87 = call i32 (i32*, i8*, ...) @fprintf(i32* %85, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %86)
br label %255
88: ; preds = %78
%89 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%90 = call i32 @strlen(i8* %89)
%91 = icmp eq i32 %90, 1
br i1 %91, label %92, label %95
92: ; preds = %88
%93 = load i32*, i32** %23
%94 = call i32 (i32*, i8*, ...) @fprintf(i32* %93, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
br label %254
95: ; preds = %88
%96 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%97 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%98 = call i32 @strcpy(i8* %96, i8* %97)
%99 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%100 = call i32 @strlen(i8* %99)
%101 = sub nsw i32 %100, 1
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 %102
store i8* %103, i8** %17
br label %104
104: ; preds = %111, %95
%105 = load i8*, i8** %17
%106 = load i8, i8* %105
%107 = call i64 @isspace(i8 signext %106)
%108 = icmp ne i64 %107, 0
br i1 %108, label %109, label %114
109: ; preds = %104
%110 = load i8*, i8** %17
store i8 0, i8* %110
br label %111
111: ; preds = %109
%112 = load i8*, i8** %17
%113 = getelementptr inbounds i8, i8* %112, i32 -1
store i8* %113, i8** %17
br label %104
114: ; preds = %104
%115 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%116 = call i8* @strtok(i8* %115, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
store i8* %116, i8** %17
%117 = icmp eq i8* %116, null
br i1 %117, label %118, label %121
118: ; preds = %114
%119 = load i32, i32* %6
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.13, i64 0, i64 0), i32 %119)
store i32 1, i32* %8
br label %124
121: ; preds = %114
%122 = load i8*, i8** %17
%123 = call i32 @atoi(i8* %122)
store i32 %123, i32* %11
br label %124
124: ; preds = %121, %118
%125 = load i32, i32* %8
%126 = icmp eq i32 %125, 0
br i1 %126, label %127, label %137
127: ; preds = %124
%128 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
store i8* %128, i8** %17
%129 = icmp eq i8* %128, null
br i1 %129, label %130, label %133
130: ; preds = %127
%131 = load i32, i32* %6
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0), i32 %131)
store i32 1, i32* %8
br label %136
133: ; preds = %127
%134 = load i8*, i8** %17
%135 = call i32 @atoi(i8* %134)
store i32 %135, i32* %12
br label %136
136: ; preds = %133, %130
br label %137
137: ; preds = %136, %124
%138 = load i32, i32* %8
%139 = icmp eq i32 %138, 0
br i1 %139, label %140, label %150
140: ; preds = %137
%141 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0))
store i8* %141, i8** %17
%142 = icmp eq i8* %141, null
br i1 %142, label %143, label %146
143: ; preds = %140
%144 = load i32, i32* %6
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.16, i64 0, i64 0), i32 %144)
store i32 1, i32* %8
br label %149
146: ; preds = %140
%147 = load i8*, i8** %17
%148 = call i32 @atoi(i8* %147)
store i32 %148, i32* %13
br label %149
149: ; preds = %146, %143
br label %150
150: ; preds = %149, %137
%151 = load i32, i32* %8
%152 = icmp eq i32 %151, 0
br i1 %152, label %153, label %163
153: ; preds = %150
%154 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0))
store i8* %154, i8** %17
%155 = icmp eq i8* %154, null
br i1 %155, label %156, label %159
156: ; preds = %153
%157 = load i32, i32* %6
%158 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.17, i64 0, i64 0), i32 %157)
br label %162
159: ; preds = %153
%160 = load i8*, i8** %17
%161 = call i32 @atoi(i8* %160)
store i32 %161, i32* %14
br label %162
162: ; preds = %159, %156
br label %163
163: ; preds = %162, %150
%164 = load i32, i32* %8
%165 = icmp eq i32 %164, 0
br i1 %165, label %166, label %176
166: ; preds = %163
%167 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0))
store i8* %167, i8** %17
%168 = icmp eq i8* %167, null
br i1 %168, label %169, label %172
169: ; preds = %166
%170 = load i32, i32* %6
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.18, i64 0, i64 0), i32 %170)
store i32 1, i32* %8
br label %175
172: ; preds = %166
%173 = load i8*, i8** %17
%174 = call i32 @atoi(i8* %173)
store i32 %174, i32* %15
br label %175
175: ; preds = %172, %169
br label %176
176: ; preds = %175, %163
%177 = load i32, i32* %8
%178 = icmp eq i32 %177, 0
br i1 %178, label %179, label %189
179: ; preds = %176
%180 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0))
store i8* %180, i8** %17
%181 = icmp eq i8* %180, null
br i1 %181, label %182, label %185
182: ; preds = %179
%183 = load i32, i32* %6
%184 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.19, i64 0, i64 0), i32 %183)
store i32 1, i32* %8
br label %188
185: ; preds = %179
%186 = load i8*, i8** %17
%187 = call i32 @atoi(i8* %186)
store i32 %187, i32* %16
br label %188
188: ; preds = %185, %182
br label %189
189: ; preds = %188, %176
%190 = load i32, i32* %8
%191 = icmp eq i32 %190, 0
br i1 %191, label %192, label %202
192: ; preds = %189
%193 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0))
store i8* %193, i8** %18
%194 = icmp eq i8* %193, null
br i1 %194, label %195, label %201
195: ; preds = %192
%196 = load i32, i32* %6
%197 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.21, i64 0, i64 0), i32 %196)
%198 = load i32, i32* %8
%199 = icmp eq i32 %198, 1
%200 = zext i1 %199 to i32
br label %201
201: ; preds = %195, %192
br label %202
202: ; preds = %201, %189
%203 = load i8*, i8** %18
%204 = load i8*, i8** %18
%205 = call i32 @strlen(i8* %204)
%206 = sext i32 %205 to i64
%207 = getelementptr inbounds i8, i8* %203, i64 %206
%208 = getelementptr inbounds i8, i8* %207, i64 1
store i8* %208, i8** %17
br label %209
209: ; preds = %221, %202
%210 = load i8*, i8** %17
%211 = load i8, i8* %210
%212 = sext i8 %211 to i32
%213 = icmp ne i32 %212, 0
br i1 %213, label %214, label %224
214: ; preds = %209
%215 = load i8*, i8** %17
%216 = load i8, i8* %215
%217 = call i64 @isspace(i8 signext %216)
%218 = icmp ne i64 %217, 0
br i1 %218, label %220, label %219
219: ; preds = %214
br label %224
220: ; preds = %214
br label %221
221: ; preds = %220
%222 = load i8*, i8** %17
%223 = getelementptr inbounds i8, i8* %222, i32 1
store i8* %223, i8** %17
br label %209
224: ; preds = %219, %209
%225 = load i8*, i8** %17
%226 = load i8, i8* %225
%227 = sext i8 %226 to i32
%228 = icmp eq i32 %227, 10
br i1 %228, label %234, label %229
229: ; preds = %224
%230 = load i8*, i8** %17
%231 = load i8, i8* %230
%232 = sext i8 %231 to i32
%233 = icmp eq i32 %232, 0
br i1 %233, label %234, label %236
234: ; preds = %229, %224
%235 = call i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0))
store i8* %235, i8** %19
br label %239
236: ; preds = %229
%237 = load i8*, i8** %17
%238 = call i8* @strdup(i8* %237)
store i8* %238, i8** %19
br label %239
239: ; preds = %236, %234
%240 = load i32, i32* %8
%241 = icmp eq i32 %240, 0
br i1 %241, label %242, label %253
242: ; preds = %239
%243 = load i32*, i32** %23
%244 = load i32, i32* %11
%245 = load i32, i32* %12
%246 = load i32, i32* %13
%247 = load i32, i32* %14
%248 = load i32, i32* %15
%249 = load i32, i32* %16
%250 = load i8*, i8** %18
%251 = load i8*, i8** %19
%252 = call i32 (i32*, i8*, ...) @fprintf(i32* %243, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.23, i64 0, i64 0), i32 %244, i32 %245, i32 %246, i32 %247, i32 %248, i32 %249, i8* %250, i8* %251)
br label %253
253: ; preds = %242, %239
br label %254
254: ; preds = %253, %92
br label %255
255: ; preds = %254, %84
br label %256
256: ; preds = %255
%257 = load i32, i32* %6
%258 = add nsw i32 %257, 1
store i32 %258, i32* %6
br label %73
259: ; preds = %73
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [7 x i8] c"%s.old\00"
@.str.3 = [27 x i8] c" full input file name =%s\0A\00"
@.str.5 = [28 x i8] c" full output file name =%s\0A\00"
@.str.6 = [14 x i8] c"mv %s %s.old\0A\00"
@.str.7 = [2 x i8] c"r\00"
@.str.8 = [28 x i8] c"Can't open input file \22%s\22\0A\00"
@.str.9 = [2 x i8] c"w\00"
@.str.10 = [29 x i8] c"Can't open output file \22%s\22\0A\00"
@.str.12 = [4 x i8] c" -\09\00"
@.str.13 = [31 x i8] c"Line %d: Missing F descriptor\0A\00"
@.str.14 = [31 x i8] c"Line %d: Missing X descriptor\0A\00"
@.str.15 = [3 x i8] c" \09\00"
@.str.16 = [32 x i8] c"%Line %d: Missing Y descriptor\0A\00"
@.str.17 = [30 x i8] c"Line %d: Missing Scale value\0A\00"
@.str.18 = [34 x i8] c"Line %d: Missing Reference Value\0A\00"
@.str.19 = [36 x i8] c" Line %d: Missing Data Width value\0A\00"
@.str.20 = [4 x i8] c" \09\0A\00"
@.str.21 = [36 x i8] c"Line %d: Missing Units description\0A\00"
@.str.22 = [4 x i8] c"???\00"
@.str.23 = [36 x i8] c"%3d;%5d;%7d;%7d;%12d;%5d; %12s; %s\0A\00"
@str = [22 x i8] c" ERROR: no arguments\00"
@str.24 = [20 x i8] c" convert <filename:\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = alloca [1024 x i8]
%5 = alloca [70 x i8]
%6 = alloca [70 x i8]
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%9 = getelementptr inbounds [70 x i8], [70 x i8]* %5, i64 0, i64 0
%10 = getelementptr inbounds [70 x i8], [70 x i8]* %6, i64 0, i64 0
%11 = icmp eq i32 %0, 2
br i1 %11, label %16, label %12
12: ; preds = %2
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.24, i64 0, i64 0))
%15 = tail call i32 @exit(i32 -1)
unreachable
16: ; preds = %2
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = load i8*, i8** %17
%19 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %18)
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* %9)
%21 = load i8*, i8** %17
%22 = call i8* bitcast (i32 (i8*, i8*)* @strcpy to i8* (i8*, i8*)*)(i8* %10, i8* %21)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i8* %10)
%24 = load i8*, i8** %17
%25 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* %24, i8* %24)
%26 = call i32 @system(i8* %7)
%27 = call i32* @fopen(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%28 = icmp eq i32* %27, null
br i1 %28, label %29, label %32
29: ; preds = %16
%30 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i8* %9)
%31 = call i32 @exit(i32 1)
unreachable
32: ; preds = %16
%33 = call i32* @fopen(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%34 = icmp eq i32* %33, null
br i1 %34, label %38, label %35
35: ; preds = %32
%36 = call i32* @fgets(i8* %7, i32 1024, i32* %27)
%37 = icmp eq i32* %36, null
br i1 %37, label %157, label %41
38: ; preds = %32
%39 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0), i8* %9)
%40 = call i32 @exit(i32 1)
unreachable
41: ; preds = %35, %146
%42 = phi i32 [ %154, %146 ], [ 1, %35 ]
%43 = phi i8* [ %153, %146 ], [ undef, %35 ]
%44 = phi i32 [ %152, %146 ], [ undef, %35 ]
%45 = phi i32 [ %151, %146 ], [ undef, %35 ]
%46 = phi i32 [ %150, %146 ], [ undef, %35 ]
%47 = phi i32 [ %149, %146 ], [ undef, %35 ]
%48 = phi i32 [ %148, %146 ], [ undef, %35 ]
%49 = phi i32 [ %147, %146 ], [ undef, %35 ]
%50 = load i8, i8* %7
%51 = icmp eq i8 %50, 35
br i1 %51, label %52, label %54
52: ; preds = %41
%53 = call i32 @fputs(i8* %7, i32* %33)
br label %146
54: ; preds = %41
%55 = call i32 @strlen(i8* %7)
%56 = icmp eq i32 %55, 1
br i1 %56, label %57, label %59
57: ; preds = %54
%58 = call i32 @fputc(i32 10, i32* %33)
br label %146
59: ; preds = %54
%60 = call i32 @strcpy(i8* %8, i8* %7)
%61 = call i32 @strlen(i8* %8)
%62 = add nsw i32 %61, -1
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %63
%65 = load i8, i8* %64
%66 = call i64 @isspace(i8 signext %65)
%67 = icmp eq i64 %66, 0
br i1 %67, label %74, label %68
68: ; preds = %59, %68
%69 = phi i8* [ %70, %68 ], [ %64, %59 ]
store i8 0, i8* %69
%70 = getelementptr inbounds i8, i8* %69, i64 -1
%71 = load i8, i8* %70
%72 = call i64 @isspace(i8 signext %71)
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %68
74: ; preds = %68, %59
%75 = call i8* @strtok(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%76 = icmp eq i8* %75, null
br i1 %76, label %105, label %77
77: ; preds = %74
%78 = call i32 @atoi(i8* %75)
%79 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%80 = icmp eq i8* %79, null
br i1 %80, label %105, label %81
81: ; preds = %77
%82 = call i32 @atoi(i8* %79)
%83 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0))
%84 = icmp eq i8* %83, null
br i1 %84, label %105, label %85
85: ; preds = %81
%86 = call i32 @atoi(i8* %83)
%87 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0))
%88 = icmp eq i8* %87, null
br i1 %88, label %89, label %91
89: ; preds = %85
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.17, i64 0, i64 0), i32 %42)
br label %93
91: ; preds = %85
%92 = call i32 @atoi(i8* %87)
br label %93
93: ; preds = %89, %91
%94 = phi i32 [ %92, %91 ], [ %46, %89 ]
%95 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0))
%96 = icmp eq i8* %95, null
br i1 %96, label %105, label %97
97: ; preds = %93
%98 = call i32 @atoi(i8* %95)
%99 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0))
%100 = icmp eq i8* %99, null
br i1 %100, label %105, label %101
101: ; preds = %97
%102 = call i32 @atoi(i8* %99)
%103 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0))
%104 = icmp eq i8* %103, null
br i1 %104, label %105, label %116
105: ; preds = %101, %97, %93, %81, %77, %74
%106 = phi i8* [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.13, i64 0, i64 0), %74 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0), %77 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.16, i64 0, i64 0), %81 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.18, i64 0, i64 0), %93 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.19, i64 0, i64 0), %97 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.21, i64 0, i64 0), %101 ]
%107 = phi i1 [ false, %74 ], [ false, %77 ], [ false, %81 ], [ false, %93 ], [ false, %97 ], [ true, %101 ]
%108 = phi i32 [ %44, %74 ], [ %44, %77 ], [ %44, %81 ], [ %44, %93 ], [ %44, %97 ], [ %102, %101 ]
%109 = phi i32 [ %46, %74 ], [ %46, %77 ], [ %46, %81 ], [ %94, %93 ], [ %94, %97 ], [ %94, %101 ]
%110 = phi i32 [ %48, %74 ], [ %48, %77 ], [ %82, %81 ], [ %82, %93 ], [ %82, %97 ], [ %82, %101 ]
%111 = phi i32 [ %49, %74 ], [ %78, %77 ], [ %78, %81 ], [ %78, %93 ], [ %78, %97 ], [ %78, %101 ]
%112 = phi i32 [ %47, %74 ], [ %47, %77 ], [ %47, %81 ], [ %86, %93 ], [ %86, %97 ], [ %86, %101 ]
%113 = phi i32 [ %45, %74 ], [ %45, %77 ], [ %45, %81 ], [ %45, %93 ], [ %98, %97 ], [ %98, %101 ]
%114 = phi i8* [ %43, %74 ], [ %43, %77 ], [ %43, %81 ], [ %43, %93 ], [ %43, %97 ], [ null, %101 ]
%115 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %106, i32 %42)
br label %116
116: ; preds = %105, %101
%117 = phi i1 [ true, %101 ], [ %107, %105 ]
%118 = phi i32 [ %102, %101 ], [ %108, %105 ]
%119 = phi i32 [ %94, %101 ], [ %109, %105 ]
%120 = phi i32 [ %82, %101 ], [ %110, %105 ]
%121 = phi i32 [ %78, %101 ], [ %111, %105 ]
%122 = phi i32 [ %86, %101 ], [ %112, %105 ]
%123 = phi i32 [ %98, %101 ], [ %113, %105 ]
%124 = phi i8* [ %103, %101 ], [ %114, %105 ]
%125 = call i32 @strlen(i8* %124)
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds i8, i8* %124, i64 %126
br label %128
128: ; preds = %133, %116
%129 = phi i8* [ %127, %116 ], [ %130, %133 ]
%130 = getelementptr inbounds i8, i8* %129, i64 1
%131 = load i8, i8* %130
%132 = icmp eq i8 %131, 0
br i1 %132, label %138, label %133
133: ; preds = %128
%134 = call i64 @isspace(i8 signext %131)
%135 = icmp eq i64 %134, 0
br i1 %135, label %136, label %128
136: ; preds = %133
%137 = load i8, i8* %130
switch i8 %137, label %140 [
i8 10, label %138
i8 0, label %138
]
138: ; preds = %128, %136, %136
%139 = call dereferenceable_or_null(4) i8* @strdup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0))
br label %142
140: ; preds = %136
%141 = call i8* @strdup(i8* %130)
br label %142
142: ; preds = %140, %138
%143 = phi i8* [ %139, %138 ], [ %141, %140 ]
br i1 %117, label %144, label %146
144: ; preds = %142
%145 = call i32 (i32*, i8*, ...) @fprintf(i32* %33, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.23, i64 0, i64 0), i32 %121, i32 %120, i32 %122, i32 %119, i32 %123, i32 %118, i8* %124, i8* %143)
br label %146
146: ; preds = %52, %142, %144, %57
%147 = phi i32 [ %49, %52 ], [ %49, %57 ], [ %121, %144 ], [ %121, %142 ]
%148 = phi i32 [ %48, %52 ], [ %48, %57 ], [ %120, %144 ], [ %120, %142 ]
%149 = phi i32 [ %47, %52 ], [ %47, %57 ], [ %122, %144 ], [ %122, %142 ]
%150 = phi i32 [ %46, %52 ], [ %46, %57 ], [ %119, %144 ], [ %119, %142 ]
%151 = phi i32 [ %45, %52 ], [ %45, %57 ], [ %123, %144 ], [ %123, %142 ]
%152 = phi i32 [ %44, %52 ], [ %44, %57 ], [ %118, %144 ], [ %118, %142 ]
%153 = phi i8* [ %43, %52 ], [ %43, %57 ], [ %124, %144 ], [ %124, %142 ]
%154 = add nuw nsw i32 %42, 1
%155 = call i32* @fgets(i8* %7, i32 1024, i32* %27)
%156 = icmp eq i32* %155, null
br i1 %156, label %157, label %41
157: ; preds = %146, %35
ret i32 0
}