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

/* Variables and functions */
int BUFSIZ;
scalar_t__ EOF;
int atoi(int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
scalar_t__ fputs(char *, int /*<<< orphan*/);
int getopt(int, char **, char *);
int /*<<< orphan*/ optarg;
scalar_t__ optind;
int /*<<< orphan*/ output_accumulated_spaces(int *, char **);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ stdout;
scalar_t__ strcmp(char *, char *);
char *strerror(int /*<<< orphan*/);
char *strrchr(char *, char);
int /*<<< orphan*/ trim_trailing_whitespace(int *, char **, char *);
int main(int argc, char **argv) {
  int tab_size = 8, min_spaces = 2, only_comment_periods = 0,
      protect_quotes = 0, protect_leading_whitespace = 0, del_tabs = 0,
      clip_lines = 0, in_comment = 0, was_period = 0, prv_spaces, col_in_tab,
      escaped, nxt_spaces, in_leading_whitespace;
  char in_line[BUFSIZ], out_line[BUFSIZ], *src, *dst, quote_char, *cp;
  int ch;
  FILE *in_file;
  if ((cp = strrchr(argv[0], '/')) != NULL)
    ++cp;
  else
    cp = argv[0];
  if (strcmp(cp, "detab") == 0)
    del_tabs = 1;
  while ((ch = getopt(argc, argv, "cdhlmqs:t:")) != -1)
    switch (ch) {
    case 'c':
      clip_lines = 1;
      break;
    case 'd':
      del_tabs = 1;
      break;
    case 'l':
      protect_leading_whitespace = 1;
      break;
    case 'm':
      only_comment_periods = 1;
      break;
    case 'q':
      protect_quotes = 1;
      break;
    case 's':
      min_spaces = atoi(optarg);
      break;
    case 't':
      tab_size = atoi(optarg);
      break;
    case 'h':
    case '?':
      fprintf(stderr,
              "USAGE: %s [ -cdqst ] [file ...]\n	-c (clip trailing "
              "whitespace)\n	-d (delete tabs)\n	-l (protect leading "
              "whitespace)\n	-m (only C comment periods)\n	-q (protect "
              "quotes)\n	-s minimum_spaces\n	-t tab_width\n",
              cp);
      exit(0);
    }
  argv += optind;
  argc -= optind;
  do {
    if (argc < 1)
      in_file = stdin;
    else {
      if ((in_file = fopen(*argv, "r")) == NULL) {
        fprintf(stderr, "Cannot open file %s: %s\n", argv[0], strerror(errno));
        exit(1);
      }
      argv++;
    }
    escaped = 0;
    while (fgets(in_line, sizeof(in_line), in_file) != NULL) {
      col_in_tab = 0;
      prv_spaces = 0;
      src = in_line;
      dst = out_line;
      if (escaped == 0)
        quote_char = ' ';
      escaped = 0;
      in_leading_whitespace = 1;
      while (*src != '\0') {
        col_in_tab++;
        if (!in_comment && src > in_line && *(src - 1) == '/' && *src == '*')
          in_comment = 1;
        else if (in_comment && *src == '*' && *(src + 1) == '/')
          in_comment = 0;
        if ((!only_comment_periods || (in_comment && was_period)) &&
            (!protect_leading_whitespace || !in_leading_whitespace) &&
            quote_char == ' ' && (*src == ' ' || *src == '\t')) {
          if (*src == '\t') {
            prv_spaces += tab_size - col_in_tab + 1;
            col_in_tab = tab_size;
          } else
            prv_spaces++;
          if (col_in_tab == tab_size) {
            nxt_spaces = 0;
            while (1) {
              if (*(src + nxt_spaces + 1) == '\0' ||
                  (*(src + nxt_spaces + 1) != ' ' &&
                   *(src + nxt_spaces + 1) != '\t'))
                break;
              if (*(src + nxt_spaces + 1) == ' ')
                ++nxt_spaces;
              if (*(src + nxt_spaces + 1) == '\t' || nxt_spaces == tab_size) {
                nxt_spaces = tab_size;
                break;
              }
            }
            if ((prv_spaces >= min_spaces || nxt_spaces == tab_size) &&
                del_tabs == 0) {
              *(dst++) = '\t';
              prv_spaces = 0;
            } else
              output_accumulated_spaces(&prv_spaces, &dst);
          }
        } else {
          if (in_leading_whitespace && *src != ' ' && *src != '\t' &&
              (!in_comment || *src != '*'))
            in_leading_whitespace = 0;
          was_period = (*src == '.');
          output_accumulated_spaces(&prv_spaces, &dst);
          if (*src == '\t')
            col_in_tab = 0;
          if (*src == '\b')
            col_in_tab -= 2;
          if (escaped == 0 && protect_quotes == 1) {
            if (*src == '\\')
              escaped = 1;
            if (*src == '"' || *src == '\'') {
              if (quote_char == ' ')
                quote_char = *src;
              else if (*src == quote_char)
                quote_char = ' ';
            }
          } else if (*src != '\r' && *src != '\n')
            escaped = 0;
          if ((*src == '\r' || *src == '\n') && clip_lines == 1 &&
              quote_char == ' ' && escaped == 0)
            trim_trailing_whitespace(&prv_spaces, &dst, out_line);
          *(dst++) = *src;
        }
        col_in_tab %= tab_size;
        ++src;
      }
      if (clip_lines == 1 && escaped == 0)
        trim_trailing_whitespace(&prv_spaces, &dst, out_line);
      output_accumulated_spaces(&prv_spaces, &dst);
      *dst = '\0';
      if (fputs(out_line, stdout) == EOF) {
        fprintf(stderr, "Cannot write to output file %s: %s\n", argv[0],
                strerror(errno));
        exit(1);
      }
    }
  } while (--argc > 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x8,-0x14(%rbp)
movl   $0x2,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    0x2d99(%rip),%rax
mov    (%rax),%ecx
mov    %rcx,-0xa8(%rbp)
mov    %rsp,%rdx
mov    %rdx,-0x50(%rbp)
mov    %rcx,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0xa0(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x58(%rbp)
mov    (%rax),%eax
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x98(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x60(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x2f,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x80(%rbp)
cmp    $0x0,%rax
je     129f <main+0xdf>
mov    -0x80(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x80(%rbp)
jmp    12aa <main+0xea>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rdi
lea    0xe23(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    12cb <main+0x10b>
movl   $0x1,-0x28(%rbp)
jmp    12d0 <main+0x110>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe00(%rip),%rdx
call   10b0 <getopt@plt>
mov    %eax,-0x84(%rbp)
cmp    $0xffffffff,%eax
je     13b3 <main+0x1f3>
mov    -0x84(%rbp),%eax
add    $0xffffffc1,%eax
mov    %eax,%ecx
mov    %rcx,-0xb0(%rbp)
sub    $0x35,%eax
ja     13ae <main+0x1ee>
mov    -0xb0(%rbp),%rax
lea    0xce5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x2c(%rbp)
jmp    13ae <main+0x1ee>
movl   $0x1,-0x28(%rbp)
jmp    13ae <main+0x1ee>
movl   $0x1,-0x24(%rbp)
jmp    13ae <main+0x1ee>
movl   $0x1,-0x1c(%rbp)
jmp    13ae <main+0x1ee>
movl   $0x1,-0x20(%rbp)
jmp    13ae <main+0x1ee>
mov    0x2c91(%rip),%rax
mov    (%rax),%edi
call   10c0 <atoi@plt>
mov    %eax,-0x18(%rbp)
jmp    13ae <main+0x1ee>
mov    0x2c7b(%rip),%rax
mov    (%rax),%edi
call   10c0 <atoi@plt>
mov    %eax,-0x14(%rbp)
jmp    13ae <main+0x1ee>
mov    0x2c2d(%rip),%rax
mov    (%rax),%edi
mov    -0x80(%rbp),%rdx
lea    0xd49(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
xor    %edi,%edi
call   10d0 <exit@plt>
jmp    12d0 <main+0x110>
mov    0x2c16(%rip),%rax
mov    (%rax),%rax
shl    $0x3,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2c00(%rip),%rax
mov    (%rax),%rcx
movslq -0x8(%rbp),%rax
sub    %rcx,%rax
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    13fd <main+0x23d>
mov    0x2bf2(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x90(%rbp)
jmp    1480 <main+0x2c0>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xda4(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x90(%rbp)
cmp    $0x0,%rax
jne    1474 <main+0x2b4>
mov    0x2b98(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xbc(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0xb8(%rbp)
mov    0x2b6b(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0xbc(%rbp),%edi
mov    -0xb8(%rbp),%rdx
mov    %rax,%rcx
lea    0xd4e(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0xa0(%rbp),%rdi
mov    -0xa8(%rbp),%rax
mov    %eax,%esi
mov    -0x90(%rbp),%rdx
call   1060 <fgets@plt>
cmp    $0x0,%rax
je     19b5 <main+0x7f5>
mov    -0x98(%rbp),%rax
mov    -0xa0(%rbp),%rcx
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x38(%rbp)
mov    %rcx,-0x68(%rbp)
mov    %rax,-0x70(%rbp)
cmpl   $0x0,-0x40(%rbp)
jne    14df <main+0x31f>
movb   $0x20,-0x71(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x1,-0x48(%rbp)
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     18fc <main+0x73c>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x30(%rbp)
jne    154e <main+0x38e>
mov    -0xa0(%rbp),%rax
cmp    %rax,-0x68(%rbp)
jbe    154e <main+0x38e>
mov    -0x68(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0x2f,%eax
jne    154e <main+0x38e>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2a,%eax
jne    154e <main+0x38e>
movl   $0x1,-0x30(%rbp)
jmp    1585 <main+0x3c5>
cmpl   $0x0,-0x30(%rbp)
je     1580 <main+0x3c0>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2a,%eax
jne    1580 <main+0x3c0>
mov    -0x68(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2f,%eax
jne    1580 <main+0x3c0>
movl   $0x0,-0x30(%rbp)
jmp    1585 <main+0x3c5>
cmpl   $0x0,-0x1c(%rbp)
je     15a3 <main+0x3e3>
cmpl   $0x0,-0x30(%rbp)
je     171e <main+0x55e>
cmpl   $0x0,-0x34(%rbp)
je     171e <main+0x55e>
cmpl   $0x0,-0x24(%rbp)
je     15b7 <main+0x3f7>
cmpl   $0x0,-0x48(%rbp)
jne    171e <main+0x55e>
movsbl -0x71(%rbp),%eax
cmp    $0x20,%eax
jne    171e <main+0x55e>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     15e4 <main+0x424>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
jne    171e <main+0x55e>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
jne    160e <main+0x44e>
mov    -0x14(%rbp),%eax
sub    -0x3c(%rbp),%eax
add    $0x1,%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x3c(%rbp)
jmp    1617 <main+0x457>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    1719 <main+0x559>
movl   $0x0,-0x44(%rbp)
jmp    162f <main+0x46f>
mov    -0x68(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsbl 0x1(%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1671 <main+0x4b1>
mov    -0x68(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsbl 0x1(%rax,%rcx,1),%eax
cmp    $0x20,%eax
je     1676 <main+0x4b6>
mov    -0x68(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsbl 0x1(%rax,%rcx,1),%eax
cmp    $0x9,%eax
je     1676 <main+0x4b6>
jmp    16c7 <main+0x507>
mov    -0x68(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsbl 0x1(%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    1695 <main+0x4d5>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x68(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsbl 0x1(%rax,%rcx,1),%eax
cmp    $0x9,%eax
je     16b7 <main+0x4f7>
mov    -0x44(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    16c2 <main+0x502>
mov    -0x14(%rbp),%eax
mov    %eax,-0x44(%rbp)
jmp    16c7 <main+0x507>
jmp    162a <main+0x46a>
mov    -0x38(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    16df <main+0x51f>
mov    -0x44(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    1707 <main+0x547>
cmpl   $0x0,-0x28(%rbp)
jne    1707 <main+0x547>
mov    -0x70(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x70(%rbp)
movb   $0x9,(%rax)
movl   $0x0,-0x38(%rbp)
jmp    1714 <main+0x554>
lea    -0x38(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1030 <output_accumulated_spaces@plt>
jmp    1719 <main+0x559>
jmp    18df <main+0x71f>
cmpl   $0x0,-0x48(%rbp)
je     1769 <main+0x5a9>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1769 <main+0x5a9>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
je     1769 <main+0x5a9>
cmpl   $0x0,-0x30(%rbp)
je     1762 <main+0x5a2>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2a,%eax
je     1769 <main+0x5a9>
movl   $0x0,-0x48(%rbp)
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x34(%rbp)
lea    -0x38(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1030 <output_accumulated_spaces@plt>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
jne    17a2 <main+0x5e2>
movl   $0x0,-0x3c(%rbp)
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x8,%eax
jne    17bb <main+0x5fb>
mov    -0x3c(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x40(%rbp)
jne    1847 <main+0x687>
cmpl   $0x1,-0x20(%rbp)
jne    1847 <main+0x687>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    17e6 <main+0x626>
movl   $0x1,-0x40(%rbp)
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
je     1806 <main+0x646>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x27,%eax
jne    1842 <main+0x682>
movsbl -0x71(%rbp),%eax
cmp    $0x20,%eax
jne    1821 <main+0x661>
mov    -0x68(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x71(%rbp)
jmp    183d <main+0x67d>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x71(%rbp),%ecx
cmp    %ecx,%eax
jne    1838 <main+0x678>
movb   $0x20,-0x71(%rbp)
jmp    183d <main+0x67d>
jmp    1842 <main+0x682>
jmp    1873 <main+0x6b3>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
je     186e <main+0x6ae>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     186e <main+0x6ae>
movl   $0x0,-0x40(%rbp)
jmp    1873 <main+0x6b3>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
je     1893 <main+0x6d3>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    18c8 <main+0x708>
cmpl   $0x1,-0x2c(%rbp)
jne    18c8 <main+0x708>
movsbl -0x71(%rbp),%eax
cmp    $0x20,%eax
jne    18c8 <main+0x708>
cmpl   $0x0,-0x40(%rbp)
jne    18c8 <main+0x708>
mov    -0x98(%rbp),%rdx
lea    -0x38(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1090 <trim_trailing_whitespace@plt>
mov    -0x68(%rbp),%rax
mov    (%rax),%cl
mov    -0x70(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x70(%rbp)
mov    %cl,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x3c(%rbp),%eax
cltd
idiv   %ecx
mov    %edx,-0x3c(%rbp)
mov    -0x68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
jmp    14ed <main+0x32d>
cmpl   $0x1,-0x2c(%rbp)
jne    1924 <main+0x764>
cmpl   $0x0,-0x40(%rbp)
jne    1924 <main+0x764>
mov    -0x98(%rbp),%rdx
lea    -0x38(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1090 <trim_trailing_whitespace@plt>
lea    -0x38(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1030 <output_accumulated_spaces@plt>
mov    -0x98(%rbp),%rdi
mov    -0x70(%rbp),%rax
movb   $0x0,(%rax)
mov    0x2662(%rip),%rax
mov    (%rax),%esi
call   1050 <fputs@plt>
mov    0x2684(%rip),%rcx
cmp    (%rcx),%rax
jne    19b0 <main+0x7f0>
mov    0x265c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xcc(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0xc8(%rbp)
mov    0x262f(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0xcc(%rbp),%edi
mov    -0xc8(%rbp),%rdx
mov    %rax,%rcx
lea    0x82b(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
jmp    1487 <main+0x2c7>
jmp    19ba <main+0x7fa>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jg     13dd <main+0x21d>
movl   $0x0,-0x4(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %rsi,%r12
mov    %edi,%r13d
mov    %rsp,-0x88(%rbp)
mov    0x2dd3(%rip),%rax
mov    (%rax),%ecx
mov    %rsp,%rdx
mov    %rcx,-0x98(%rbp)
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%rdx
mov    %rdx,-0x78(%rbp)
mov    %rdx,%rsp
mov    (%rax),%eax
mov    %rsp,%rcx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,-0x68(%rbp)
mov    %rcx,%rsp
mov    (%rsi),%r15
mov    %r15,%rdi
mov    $0x2f,%esi
call   1040 <strrchr@plt>
lea    0x1(%rax),%rdi
test   %rax,%rax
cmove  %r15,%rdi
lea    0xe9c(%rip),%rsi
mov    %rdi,-0x48(%rbp)
call   1070 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,-0x4c(%rbp)
mov    $0x8,%r14d
movl   $0x0,-0x60(%rbp)
movl   $0x2,-0x54(%rbp)
lea    0xd95(%rip),%rbx
mov    0x2d86(%rip),%r15
movl   $0x0,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
movl   $0x0,-0x3c(%rbp)
jmp    12a0 <main+0xe0>
mov    (%r15),%edi
call   10c0 <atoi@plt>
mov    %eax,%r14d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r13d,%edi
mov    %r12,%rsi
lea    0xe31(%rip),%rdx
call   10b0 <getopt@plt>
lea    -0x3f(%rax),%ecx
cmp    $0x35,%ecx
ja     12fd <main+0x13d>
movslq (%rbx,%rcx,4),%rax
add    %rbx,%rax
jmp    *%rax
movl   $0x1,-0x3c(%rbp)
jmp    12a0 <main+0xe0>
movl   $0x1,-0x4c(%rbp)
jmp    12a0 <main+0xe0>
movl   $0x1,-0x5c(%rbp)
jmp    12a0 <main+0xe0>
movl   $0x1,-0x60(%rbp)
jmp    12a0 <main+0xe0>
movl   $0x1,-0x58(%rbp)
jmp    12a0 <main+0xe0>
mov    (%r15),%edi
call   10c0 <atoi@plt>
mov    %eax,-0x54(%rbp)
jmp    12a0 <main+0xe0>
cmp    $0xffffffff,%eax
jne    12a0 <main+0xe0>
mov    0x2cc7(%rip),%rax
mov    (%rax),%rax
lea    (%r12,%rax,8),%rcx
sub    %eax,%r13d
xor    %r12d,%r12d
movl   $0x0,-0x48(%rbp)
mov    %r14d,-0x50(%rbp)
jmp    134a <main+0x18a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    -0x90(%rbp),%rcx
lea    -0x1(%rcx),%eax
cmp    $0x1,%ecx
mov    %eax,%r13d
mov    -0x70(%rbp),%rcx
jle    175d <main+0x59d>
mov    %r13,-0x90(%rbp)
test   %r13d,%r13d
jle    1390 <main+0x1d0>
mov    (%rcx),%rdi
lea    0xe4f(%rip),%rsi
mov    %rcx,%rbx
call   10a0 <fopen@plt>
mov    %rax,-0x80(%rbp)
test   %rax,%rax
mov    -0x78(%rbp),%r13
je     17d5 <main+0x615>
add    $0x8,%rbx
mov    %rbx,-0x70(%rbp)
jmp    13a6 <main+0x1e6>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rcx,-0x70(%rbp)
mov    0x2c45(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x80(%rbp)
mov    -0x78(%rbp),%r13
xor    %ebx,%ebx
jmp    13e6 <main+0x226>
nopw   0x0(%rax,%rax,1)
lea    -0x2c(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   1030 <output_accumulated_spaces@plt>
mov    -0x38(%rbp),%rax
movb   $0x0,(%rax)
mov    0x2bdd(%rip),%rax
mov    (%rax),%esi
mov    -0x68(%rbp),%rdi
call   1050 <fputs@plt>
mov    0x2bfb(%rip),%rcx
cmp    (%rcx),%rax
je     1775 <main+0x5b5>
mov    %r13,%rdi
mov    -0x98(%rbp),%rsi
mov    -0x80(%rbp),%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     1330 <main+0x170>
movl   $0x0,-0x2c(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0x38(%rbp)
test   %ebx,%ebx
mov    %r15d,%r9d
movzbl %r9b,%r9d
mov    $0x20,%eax
cmove  %eax,%r9d
mov    0x0(%r13),%bl
test   %bl,%bl
je     1720 <main+0x560>
movl   $0x0,-0x40(%rbp)
mov    $0x1,%r10d
mov    %r13,%r15
xor    %edx,%edx
mov    -0x48(%rbp),%r8d
jmp    1483 <main+0x2c3>
mov    $0xd,%al
nopl   0x0(%rax)
mov    %edx,-0x40(%rbp)
mov    %bl,%r8b
mov    -0x38(%rbp),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,-0x38(%rbp)
mov    %al,(%rcx)
mov    -0x78(%rbp),%r13
mov    %r12d,%eax
cltd
idiv   %r14d
mov    0x1(%r15),%bl
add    $0x1,%r15
test   %bl,%bl
mov    -0x48(%rbp),%r12d
je     172b <main+0x56b>
test   %r12d,%r12d
jne    14b0 <main+0x2f0>
cmp    %r13,%r15
jbe    14b0 <main+0x2f0>
mov    -0x1(%r15),%cl
xor    $0x2f,%cl
mov    %ebx,%eax
xor    $0x2a,%al
xor    %esi,%esi
or     %cl,%al
setne  %dil
sete   %sil
mov    %esi,%eax
jmp    14d9 <main+0x319>
nopl   0x0(%rax,%rax,1)
test   %r12d,%r12d
je     14d2 <main+0x312>
mov    $0x1,%eax
mov    $0x1,%sil
xor    %edi,%edi
cmp    $0x2a,%bl
jne    14d9 <main+0x319>
cmpb   $0x2f,0x1(%r15)
jne    14d9 <main+0x319>
mov    $0x1,%dil
xor    %esi,%esi
jmp    14d7 <main+0x317>
xor    %esi,%esi
mov    $0x1,%dil
xor    %eax,%eax
mov    %eax,-0x48(%rbp)
lea    0x1(%rdx),%r12d
cmpl   $0x0,-0x60(%rbp)
je     14f5 <main+0x335>
test   %r8d,%r8d
setne  %al
and    %al,%sil
cmp    $0x1,%sil
jne    1530 <main+0x370>
cmpl   $0x0,-0x5c(%rbp)
sete   %al
test   %r10d,%r10d
sete   %cl
or     %al,%cl
cmp    $0x1,%cl
jne    1530 <main+0x370>
cmp    $0x20,%r9b
jne    1530 <main+0x370>
cmp    $0x20,%bl
je     1681 <main+0x4c1>
cmp    $0x9,%bl
jne    1530 <main+0x370>
mov    %r14d,%eax
sub    %edx,%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    1696 <main+0x4d6>
nopl   (%rax)
test   %r10d,%r10d
je     1560 <main+0x3a0>
mov    $0x1,%r13d
mov    %r9d,%r14d
cmp    $0x9,%bl
je     1566 <main+0x3a6>
cmp    $0x20,%bl
je     1566 <main+0x3a6>
not    %dil
cmp    $0x2a,%bl
sete   %al
and    %dil,%al
movzbl %al,%r13d
jmp    1566 <main+0x3a6>
nopw   0x0(%rax,%rax,1)
mov    %r9d,%r14d
xor    %r13d,%r13d
cmp    $0x2e,%bl
sete   %bl
lea    -0x2c(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   1030 <output_accumulated_spaces@plt>
mov    (%r15),%al
cmp    $0x9,%al
mov    %r12d,%ecx
mov    $0x0,%edx
cmove  %edx,%ecx
lea    -0x2(%rcx),%r12d
cmp    $0x8,%al
cmovne %ecx,%r12d
mov    -0x40(%rbp),%edx
test   %edx,%edx
jne    15e0 <main+0x420>
cmpl   $0x1,-0x58(%rbp)
jne    15e0 <main+0x420>
xor    %edx,%edx
cmp    $0x5c,%al
sete   %dl
cmp    $0x27,%al
je     15af <main+0x3ef>
cmp    $0x22,%al
jne    1600 <main+0x440>
mov    %r14d,%r9d
cmp    $0x20,%r9b
mov    $0x0,%r8d
mov    %r13d,%r10d
jne    1668 <main+0x4a8>
mov    %eax,%r9d
mov    -0x50(%rbp),%r14d
jmp    1450 <main+0x290>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    $0xa,%al
je     1600 <main+0x440>
cmp    $0xd,%al
mov    $0x0,%r8d
mov    %r14d,%r9d
mov    %r13d,%r10d
je     1609 <main+0x449>
xor    %edx,%edx
jmp    1609 <main+0x449>
nopl   0x0(%rax,%rax,1)
xor    %r8d,%r8d
mov    %r14d,%r9d
mov    %r13d,%r10d
cmp    $0xd,%al
mov    -0x50(%rbp),%r14d
jne    1620 <main+0x460>
cmpl   $0x1,-0x3c(%rbp)
jne    1447 <main+0x287>
jmp    1632 <main+0x472>
nopl   (%rax)
cmp    $0xa,%al
jne    1450 <main+0x290>
cmpl   $0x1,-0x3c(%rbp)
jne    1450 <main+0x290>
cmp    $0x20,%r9b
jne    1450 <main+0x290>
test   %edx,%edx
jne    1450 <main+0x290>
lea    -0x2c(%rbp),%rdi
lea    -0x38(%rbp),%rsi
mov    -0x68(%rbp),%rdx
call   1090 <trim_trailing_whitespace@plt>
mov    %r13d,%r10d
xor    %r8d,%r8d
mov    (%r15),%al
xor    %edx,%edx
mov    $0x20,%r9b
jmp    1450 <main+0x290>
cmp    %r9b,%al
movzbl %r9b,%r9d
mov    $0x20,%ecx
cmove  %ecx,%r9d
mov    -0x50(%rbp),%r14d
jmp    1450 <main+0x290>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    $0x20,%r9b
cmp    %r14d,%r12d
jne    1468 <main+0x2a8>
mov    0x1(%r15),%dl
xor    %ecx,%ecx
nopl   0x0(%rax)
cmp    $0x20,%dl
je     16aa <main+0x4ea>
cmp    $0x9,%dl
jne    16cd <main+0x50d>
xor    %esi,%esi
cmp    $0x20,%dl
sete   %sil
mov    %ecx,%ecx
add    %rcx,%rsi
movzbl 0x1(%r15,%rsi,1),%edx
cmp    $0x9,%dl
je     16ca <main+0x50a>
mov    %esi,%ecx
cmp    %r14d,%esi
jne    16a0 <main+0x4e0>
mov    %r14d,%ecx
cmp    -0x54(%rbp),%eax
jge    16d7 <main+0x517>
cmp    %r14d,%ecx
jne    16f5 <main+0x535>
cmpl   $0x0,-0x4c(%rbp)
jne    16f5 <main+0x535>
mov    -0x38(%rbp),%rax
lea    0x1(%rax),%rcx
mov    %rcx,-0x38(%rbp)
movb   $0x9,(%rax)
movl   $0x0,-0x2c(%rbp)
jmp    170e <main+0x54e>
lea    -0x2c(%rbp),%rdi
lea    -0x38(%rbp),%rsi
mov    %r8d,%r12d
mov    %r10d,%ebx
call   1030 <output_accumulated_spaces@plt>
mov    %ebx,%r10d
mov    %r12d,%r8d
mov    $0x20,%r9b
mov    %r14d,%r12d
jmp    1468 <main+0x2a8>
nopl   0x0(%rax)
movl   $0x0,-0x40(%rbp)
mov    -0x48(%rbp),%r8d
mov    %r9d,%r15d
mov    %r8d,-0x48(%rbp)
cmpl   $0x1,-0x3c(%rbp)
mov    -0x40(%rbp),%ebx
jne    13b0 <main+0x1f0>
test   %ebx,%ebx
jne    13b0 <main+0x1f0>
lea    -0x2c(%rbp),%rdi
lea    -0x38(%rbp),%rsi
mov    -0x68(%rbp),%rdx
call   1090 <trim_trailing_whitespace@plt>
jmp    13b0 <main+0x1f0>
mov    -0x88(%rbp),%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2844(%rip),%rax
mov    (%rax),%ebx
mov    -0x70(%rbp),%rax
mov    (%rax),%r14
mov    0x2824(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
lea    0xa30(%rip),%rsi
mov    %ebx,%edi
mov    %r14,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    0x2806(%rip),%rax
mov    (%rax),%edi
lea    0x926(%rip),%rsi
mov    -0x48(%rbp),%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
xor    %edi,%edi
call   10d0 <exit@plt>
mov    0x27e4(%rip),%rax
mov    (%rax),%r15d
mov    (%rbx),%r14
mov    0x27c7(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
lea    0x9ba(%rip),%rsi
mov    %r15d,%edi
jmp    179c <main+0x5dc>

LLVM IR (-O0):
@BUFSIZ = global i32 0
@.str = [6 x i8] c"detab\00"
@.str.1 = [11 x i8] c"cdhlmqs:t:\00"
@optarg = global i32 0
@stderr = global i32 0
@.str.2 = [198 x i8] c"USAGE: %s [ -cdqst ] [file ...]\0A\09-c (clip trailing whitespace)\0A\09-d (delete tabs)\0A\09-l (protect leading whitespace)\0A\09-m (only C comment periods)\0A\09-q (protect quotes)\0A\09-s minimum_spaces\0A\09-t tab_width\0A\00"
@optind = global i64 0
@stdin = global i32* null
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [25 x i8] c"Cannot open file %s: %s\0A\00"
@errno = global i32 0
@stdout = global i32 0
@EOF = global i64 0
@.str.5 = [36 x i8] c"Cannot write to output file %s: %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 i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i8*
%21 = alloca i64
%22 = alloca i64
%23 = alloca i8*
%24 = alloca i8*
%25 = alloca i8
%26 = alloca i8*
%27 = alloca i32
%28 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 8, i32* %6
store i32 2, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
%29 = load i32, i32* @BUFSIZ
%30 = zext i32 %29 to i64
%31 = call i8* @llvm.stacksave()
store i8* %31, i8** %20
%32 = alloca i8, i64 %30
store i64 %30, i64* %21
%33 = load i32, i32* @BUFSIZ
%34 = zext i32 %33 to i64
%35 = alloca i8, i64 %34
store i64 %34, i64* %22
%36 = load i8**, i8*** %5
%37 = getelementptr inbounds i8*, i8** %36, i64 0
%38 = load i8*, i8** %37
%39 = call i8* @strrchr(i8* %38, i8 signext 47)
store i8* %39, i8** %26
%40 = icmp ne i8* %39, null
br i1 %40, label %41, label %44
41: ; preds = %2
%42 = load i8*, i8** %26
%43 = getelementptr inbounds i8, i8* %42, i32 1
store i8* %43, i8** %26
br label %48
44: ; preds = %2
%45 = load i8**, i8*** %5
%46 = getelementptr inbounds i8*, i8** %45, i64 0
%47 = load i8*, i8** %46
store i8* %47, i8** %26
br label %48
48: ; preds = %44, %41
%49 = load i8*, i8** %26
%50 = call i64 @strcmp(i8* %49, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %53
52: ; preds = %48
store i32 1, i32* %11
br label %53
53: ; preds = %52, %48
br label %54
54: ; preds = %77, %53
%55 = load i32, i32* %4
%56 = load i8**, i8*** %5
%57 = call i32 @getopt(i32 %55, i8** %56, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
store i32 %57, i32* %27
%58 = icmp ne i32 %57, -1
br i1 %58, label %59, label %78
59: ; preds = %54
%60 = load i32, i32* %27
switch i32 %60, label %77 [
i32 99, label %61
i32 100, label %62
i32 108, label %63
i32 109, label %64
i32 113, label %65
i32 115, label %66
i32 116, label %69
i32 104, label %72
i32 63, label %72
]
61: ; preds = %59
store i32 1, i32* %12
br label %77
62: ; preds = %59
store i32 1, i32* %11
br label %77
63: ; preds = %59
store i32 1, i32* %10
br label %77
64: ; preds = %59
store i32 1, i32* %8
br label %77
65: ; preds = %59
store i32 1, i32* %9
br label %77
66: ; preds = %59
%67 = load i32, i32* @optarg
%68 = call i32 @atoi(i32 %67)
store i32 %68, i32* %7
br label %77
69: ; preds = %59
%70 = load i32, i32* @optarg
%71 = call i32 @atoi(i32 %70)
store i32 %71, i32* %6
br label %77
72: ; preds = %59, %59
%73 = load i32, i32* @stderr
%74 = load i8*, i8** %26
%75 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %73, i8* getelementptr inbounds ([198 x i8], [198 x i8]* @.str.2, i64 0, i64 0), i8* %74)
%76 = call i32 @exit(i32 0)
unreachable
77: ; preds = %59, %69, %66, %65, %64, %63, %62, %61
br label %54
78: ; preds = %54
%79 = load i64, i64* @optind
%80 = load i8**, i8*** %5
%81 = getelementptr inbounds i8*, i8** %80, i64 %79
store i8** %81, i8*** %5
%82 = load i64, i64* @optind
%83 = load i32, i32* %4
%84 = sext i32 %83 to i64
%85 = sub nsw i64 %84, %82
%86 = trunc i64 %85 to i32
store i32 %86, i32* %4
br label %87
87: ; preds = %439, %78
%88 = load i32, i32* %4
%89 = icmp slt i32 %88, 1
br i1 %89, label %90, label %92
90: ; preds = %87
%91 = load i32*, i32** @stdin
store i32* %91, i32** %28
br label %109
92: ; preds = %87
%93 = load i8**, i8*** %5
%94 = load i8*, i8** %93
%95 = call i32* @fopen(i8* %94, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %95, i32** %28
%96 = icmp eq i32* %95, null
br i1 %96, label %97, label %106
97: ; preds = %92
%98 = load i32, i32* @stderr
%99 = load i8**, i8*** %5
%100 = getelementptr inbounds i8*, i8** %99, i64 0
%101 = load i8*, i8** %100
%102 = load i32, i32* @errno
%103 = call i8* @strerror(i32 %102)
%104 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %101, i8* %103)
%105 = call i32 @exit(i32 1)
unreachable
106: ; preds = %92
%107 = load i8**, i8*** %5
%108 = getelementptr inbounds i8*, i8** %107, i32 1
store i8** %108, i8*** %5
br label %109
109: ; preds = %106, %90
store i32 0, i32* %17
br label %110
110: ; preds = %437, %109
%111 = trunc i64 %30 to i32
%112 = load i32*, i32** %28
%113 = call i32* @fgets(i8* %32, i32 %111, i32* %112)
%114 = icmp ne i32* %113, null
br i1 %114, label %115, label %438
115: ; preds = %110
store i32 0, i32* %16
store i32 0, i32* %15
store i8* %32, i8** %23
store i8* %35, i8** %24
%116 = load i32, i32* %17
%117 = icmp eq i32 %116, 0
br i1 %117, label %118, label %119
118: ; preds = %115
store i8 32, i8* %25
br label %119
119: ; preds = %118, %115
store i32 0, i32* %17
store i32 1, i32* %19
br label %120
120: ; preds = %407, %119
%121 = load i8*, i8** %23
%122 = load i8, i8* %121
%123 = sext i8 %122 to i32
%124 = icmp ne i32 %123, 0
br i1 %124, label %125, label %413
125: ; preds = %120
%126 = load i32, i32* %16
%127 = add nsw i32 %126, 1
store i32 %127, i32* %16
%128 = load i32, i32* %13
%129 = icmp ne i32 %128, 0
br i1 %129, label %145, label %130
130: ; preds = %125
%131 = load i8*, i8** %23
%132 = icmp ugt i8* %131, %32
br i1 %132, label %133, label %145
133: ; preds = %130
%134 = load i8*, i8** %23
%135 = getelementptr inbounds i8, i8* %134, i64 -1
%136 = load i8, i8* %135
%137 = sext i8 %136 to i32
%138 = icmp eq i32 %137, 47
br i1 %138, label %139, label %145
139: ; preds = %133
%140 = load i8*, i8** %23
%141 = load i8, i8* %140
%142 = sext i8 %141 to i32
%143 = icmp eq i32 %142, 42
br i1 %143, label %144, label %145
144: ; preds = %139
store i32 1, i32* %13
br label %161
145: ; preds = %139, %133, %130, %125
%146 = load i32, i32* %13
%147 = icmp ne i32 %146, 0
br i1 %147, label %148, label %160
148: ; preds = %145
%149 = load i8*, i8** %23
%150 = load i8, i8* %149
%151 = sext i8 %150 to i32
%152 = icmp eq i32 %151, 42
br i1 %152, label %153, label %160
153: ; preds = %148
%154 = load i8*, i8** %23
%155 = getelementptr inbounds i8, i8* %154, i64 1
%156 = load i8, i8* %155
%157 = sext i8 %156 to i32
%158 = icmp eq i32 %157, 47
br i1 %158, label %159, label %160
159: ; preds = %153
store i32 0, i32* %13
br label %160
160: ; preds = %159, %153, %148, %145
br label %161
161: ; preds = %160, %144
%162 = load i32, i32* %8
%163 = icmp ne i32 %162, 0
br i1 %163, label %164, label %170
164: ; preds = %161
%165 = load i32, i32* %13
%166 = icmp ne i32 %165, 0
br i1 %166, label %167, label %286
167: ; preds = %164
%168 = load i32, i32* %14
%169 = icmp ne i32 %168, 0
br i1 %169, label %170, label %286
170: ; preds = %167, %161
%171 = load i32, i32* %10
%172 = icmp ne i32 %171, 0
br i1 %172, label %173, label %176
173: ; preds = %170
%174 = load i32, i32* %19
%175 = icmp ne i32 %174, 0
br i1 %175, label %286, label %176
176: ; preds = %173, %170
%177 = load i8, i8* %25
%178 = sext i8 %177 to i32
%179 = icmp eq i32 %178, 32
br i1 %179, label %180, label %286
180: ; preds = %176
%181 = load i8*, i8** %23
%182 = load i8, i8* %181
%183 = sext i8 %182 to i32
%184 = icmp eq i32 %183, 32
br i1 %184, label %190, label %185
185: ; preds = %180
%186 = load i8*, i8** %23
%187 = load i8, i8* %186
%188 = sext i8 %187 to i32
%189 = icmp eq i32 %188, 9
br i1 %189, label %190, label %286
190: ; preds = %185, %180
%191 = load i8*, i8** %23
%192 = load i8, i8* %191
%193 = sext i8 %192 to i32
%194 = icmp eq i32 %193, 9
br i1 %194, label %195, label %203
195: ; preds = %190
%196 = load i32, i32* %6
%197 = load i32, i32* %16
%198 = sub nsw i32 %196, %197
%199 = add nsw i32 %198, 1
%200 = load i32, i32* %15
%201 = add nsw i32 %200, %199
store i32 %201, i32* %15
%202 = load i32, i32* %6
store i32 %202, i32* %16
br label %206
203: ; preds = %190
%204 = load i32, i32* %15
%205 = add nsw i32 %204, 1
store i32 %205, i32* %15
br label %206
206: ; preds = %203, %195
%207 = load i32, i32* %16
%208 = load i32, i32* %6
%209 = icmp eq i32 %207, %208
br i1 %209, label %210, label %285
210: ; preds = %206
store i32 0, i32* %18
br label %211
211: ; preds = %267, %210
br label %212
212: ; preds = %211
%213 = load i8*, i8** %23
%214 = load i32, i32* %18
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds i8, i8* %213, i64 %215
%217 = getelementptr inbounds i8, i8* %216, i64 1
%218 = load i8, i8* %217
%219 = sext i8 %218 to i32
%220 = icmp eq i32 %219, 0
br i1 %220, label %239, label %221
221: ; preds = %212
%222 = load i8*, i8** %23
%223 = load i32, i32* %18
%224 = sext i32 %223 to i64
%225 = getelementptr inbounds i8, i8* %222, i64 %224
%226 = getelementptr inbounds i8, i8* %225, i64 1
%227 = load i8, i8* %226
%228 = sext i8 %227 to i32
%229 = icmp ne i32 %228, 32
br i1 %229, label %230, label %240
230: ; preds = %221
%231 = load i8*, i8** %23
%232 = load i32, i32* %18
%233 = sext i32 %232 to i64
%234 = getelementptr inbounds i8, i8* %231, i64 %233
%235 = getelementptr inbounds i8, i8* %234, i64 1
%236 = load i8, i8* %235
%237 = sext i8 %236 to i32
%238 = icmp ne i32 %237, 9
br i1 %238, label %239, label %240
239: ; preds = %230, %212
br label %268
240: ; preds = %230, %221
%241 = load i8*, i8** %23
%242 = load i32, i32* %18
%243 = sext i32 %242 to i64
%244 = getelementptr inbounds i8, i8* %241, i64 %243
%245 = getelementptr inbounds i8, i8* %244, i64 1
%246 = load i8, i8* %245
%247 = sext i8 %246 to i32
%248 = icmp eq i32 %247, 32
br i1 %248, label %249, label %252
249: ; preds = %240
%250 = load i32, i32* %18
%251 = add nsw i32 %250, 1
store i32 %251, i32* %18
br label %252
252: ; preds = %249, %240
%253 = load i8*, i8** %23
%254 = load i32, i32* %18
%255 = sext i32 %254 to i64
%256 = getelementptr inbounds i8, i8* %253, i64 %255
%257 = getelementptr inbounds i8, i8* %256, i64 1
%258 = load i8, i8* %257
%259 = sext i8 %258 to i32
%260 = icmp eq i32 %259, 9
br i1 %260, label %265, label %261
261: ; preds = %252
%262 = load i32, i32* %18
%263 = load i32, i32* %6
%264 = icmp eq i32 %262, %263
br i1 %264, label %265, label %267
265: ; preds = %261, %252
%266 = load i32, i32* %6
store i32 %266, i32* %18
br label %268
267: ; preds = %261
br label %211
268: ; preds = %265, %239
%269 = load i32, i32* %15
%270 = load i32, i32* %7
%271 = icmp sge i32 %269, %270
br i1 %271, label %276, label %272
272: ; preds = %268
%273 = load i32, i32* %18
%274 = load i32, i32* %6
%275 = icmp eq i32 %273, %274
br i1 %275, label %276, label %282
276: ; preds = %272, %268
%277 = load i32, i32* %11
%278 = icmp eq i32 %277, 0
br i1 %278, label %279, label %282
279: ; preds = %276
%280 = load i8*, i8** %24
%281 = getelementptr inbounds i8, i8* %280, i32 1
store i8* %281, i8** %24
store i8 9, i8* %280
store i32 0, i32* %15
br label %284
282: ; preds = %276, %272
%283 = call i32 @output_accumulated_spaces(i32* %15, i8** %24)
br label %284
284: ; preds = %282, %279
br label %285
285: ; preds = %284, %206
br label %407
286: ; preds = %185, %176, %173, %167, %164
%287 = load i32, i32* %19
%288 = icmp ne i32 %287, 0
br i1 %288, label %289, label %308
289: ; preds = %286
%290 = load i8*, i8** %23
%291 = load i8, i8* %290
%292 = sext i8 %291 to i32
%293 = icmp ne i32 %292, 32
br i1 %293, label %294, label %308
294: ; preds = %289
%295 = load i8*, i8** %23
%296 = load i8, i8* %295
%297 = sext i8 %296 to i32
%298 = icmp ne i32 %297, 9
br i1 %298, label %299, label %308
299: ; preds = %294
%300 = load i32, i32* %13
%301 = icmp ne i32 %300, 0
br i1 %301, label %302, label %307
302: ; preds = %299
%303 = load i8*, i8** %23
%304 = load i8, i8* %303
%305 = sext i8 %304 to i32
%306 = icmp ne i32 %305, 42
br i1 %306, label %307, label %308
307: ; preds = %302, %299
store i32 0, i32* %19
br label %308
308: ; preds = %307, %302, %294, %289, %286
%309 = load i8*, i8** %23
%310 = load i8, i8* %309
%311 = sext i8 %310 to i32
%312 = icmp eq i32 %311, 46
%313 = zext i1 %312 to i32
store i32 %313, i32* %14
%314 = call i32 @output_accumulated_spaces(i32* %15, i8** %24)
%315 = load i8*, i8** %23
%316 = load i8, i8* %315
%317 = sext i8 %316 to i32
%318 = icmp eq i32 %317, 9
br i1 %318, label %319, label %320
319: ; preds = %308
store i32 0, i32* %16
br label %320
320: ; preds = %319, %308
%321 = load i8*, i8** %23
%322 = load i8, i8* %321
%323 = sext i8 %322 to i32
%324 = icmp eq i32 %323, 8
br i1 %324, label %325, label %328
325: ; preds = %320
%326 = load i32, i32* %16
%327 = sub nsw i32 %326, 2
store i32 %327, i32* %16
br label %328
328: ; preds = %325, %320
%329 = load i32, i32* %17
%330 = icmp eq i32 %329, 0
br i1 %330, label %331, label %368
331: ; preds = %328
%332 = load i32, i32* %9
%333 = icmp eq i32 %332, 1
br i1 %333, label %334, label %368
334: ; preds = %331
%335 = load i8*, i8** %23
%336 = load i8, i8* %335
%337 = sext i8 %336 to i32
%338 = icmp eq i32 %337, 92
br i1 %338, label %339, label %340
339: ; preds = %334
store i32 1, i32* %17
br label %340
340: ; preds = %339, %334
%341 = load i8*, i8** %23
%342 = load i8, i8* %341
%343 = sext i8 %342 to i32
%344 = icmp eq i32 %343, 34
br i1 %344, label %350, label %345
345: ; preds = %340
%346 = load i8*, i8** %23
%347 = load i8, i8* %346
%348 = sext i8 %347 to i32
%349 = icmp eq i32 %348, 39
br i1 %349, label %350, label %367
350: ; preds = %345, %340
%351 = load i8, i8* %25
%352 = sext i8 %351 to i32
%353 = icmp eq i32 %352, 32
br i1 %353, label %354, label %357
354: ; preds = %350
%355 = load i8*, i8** %23
%356 = load i8, i8* %355
store i8 %356, i8* %25
br label %366
357: ; preds = %350
%358 = load i8*, i8** %23
%359 = load i8, i8* %358
%360 = sext i8 %359 to i32
%361 = load i8, i8* %25
%362 = sext i8 %361 to i32
%363 = icmp eq i32 %360, %362
br i1 %363, label %364, label %365
364: ; preds = %357
store i8 32, i8* %25
br label %365
365: ; preds = %364, %357
br label %366
366: ; preds = %365, %354
br label %367
367: ; preds = %366, %345
br label %380
368: ; preds = %331, %328
%369 = load i8*, i8** %23
%370 = load i8, i8* %369
%371 = sext i8 %370 to i32
%372 = icmp ne i32 %371, 13
br i1 %372, label %373, label %379
373: ; preds = %368
%374 = load i8*, i8** %23
%375 = load i8, i8* %374
%376 = sext i8 %375 to i32
%377 = icmp ne i32 %376, 10
br i1 %377, label %378, label %379
378: ; preds = %373
store i32 0, i32* %17
br label %379
379: ; preds = %378, %373, %368
br label %380
380: ; preds = %379, %367
%381 = load i8*, i8** %23
%382 = load i8, i8* %381
%383 = sext i8 %382 to i32
%384 = icmp eq i32 %383, 13
br i1 %384, label %390, label %385
385: ; preds = %380
%386 = load i8*, i8** %23
%387 = load i8, i8* %386
%388 = sext i8 %387 to i32
%389 = icmp eq i32 %388, 10
br i1 %389, label %390, label %402
390: ; preds = %385, %380
%391 = load i32, i32* %12
%392 = icmp eq i32 %391, 1
br i1 %392, label %393, label %402
393: ; preds = %390
%394 = load i8, i8* %25
%395 = sext i8 %394 to i32
%396 = icmp eq i32 %395, 32
br i1 %396, label %397, label %402
397: ; preds = %393
%398 = load i32, i32* %17
%399 = icmp eq i32 %398, 0
br i1 %399, label %400, label %402
400: ; preds = %397
%401 = call i32 @trim_trailing_whitespace(i32* %15, i8** %24, i8* %35)
br label %402
402: ; preds = %400, %397, %393, %390, %385
%403 = load i8*, i8** %23
%404 = load i8, i8* %403
%405 = load i8*, i8** %24
%406 = getelementptr inbounds i8, i8* %405, i32 1
store i8* %406, i8** %24
store i8 %404, i8* %405
br label %407
407: ; preds = %402, %285
%408 = load i32, i32* %6
%409 = load i32, i32* %16
%410 = srem i32 %409, %408
store i32 %410, i32* %16
%411 = load i8*, i8** %23
%412 = getelementptr inbounds i8, i8* %411, i32 1
store i8* %412, i8** %23
br label %120
413: ; preds = %120
%414 = load i32, i32* %12
%415 = icmp eq i32 %414, 1
br i1 %415, label %416, label %421
416: ; preds = %413
%417 = load i32, i32* %17
%418 = icmp eq i32 %417, 0
br i1 %418, label %419, label %421
419: ; preds = %416
%420 = call i32 @trim_trailing_whitespace(i32* %15, i8** %24, i8* %35)
br label %421
421: ; preds = %419, %416, %413
%422 = call i32 @output_accumulated_spaces(i32* %15, i8** %24)
%423 = load i8*, i8** %24
store i8 0, i8* %423
%424 = load i32, i32* @stdout
%425 = call i64 @fputs(i8* %35, i32 %424)
%426 = load i64, i64* @EOF
%427 = icmp eq i64 %425, %426
br i1 %427, label %428, label %437
428: ; preds = %421
%429 = load i32, i32* @stderr
%430 = load i8**, i8*** %5
%431 = getelementptr inbounds i8*, i8** %430, i64 0
%432 = load i8*, i8** %431
%433 = load i32, i32* @errno
%434 = call i8* @strerror(i32 %433)
%435 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %429, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), i8* %432, i8* %434)
%436 = call i32 @exit(i32 1)
unreachable
437: ; preds = %421
br label %110
438: ; preds = %110
br label %439
439: ; preds = %438
%440 = load i32, i32* %4
%441 = add nsw i32 %440, -1
store i32 %441, i32* %4
%442 = icmp sgt i32 %441, 0
br i1 %442, label %87, label %443
443: ; preds = %439
store i32 0, i32* %3
%444 = load i8*, i8** %20
%445 = load i32, i32* %3
ret i32 %445
}

LLVM IR (-O2):
@BUFSIZ = global i32 0
@.str = [6 x i8] c"detab\00"
@.str.1 = [11 x i8] c"cdhlmqs:t:\00"
@optarg = global i32 0
@stderr = global i32 0
@.str.2 = [198 x i8] c"USAGE: %s [ -cdqst ] [file ...]\0A\09-c (clip trailing whitespace)\0A\09-d (delete tabs)\0A\09-l (protect leading whitespace)\0A\09-m (only C comment periods)\0A\09-q (protect quotes)\0A\09-s minimum_spaces\0A\09-t tab_width\0A\00"
@optind = global i64 0
@stdin = global i32* null
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [25 x i8] c"Cannot open file %s: %s\0A\00"
@errno = global i32 0
@stdout = global i32 0
@EOF = global i64 0
@.str.5 = [36 x i8] c"Cannot write to output file %s: %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = bitcast i32* %3 to i8*
%6 = load i32, i32* @BUFSIZ
%7 = zext i32 %6 to i64
%8 = tail call i8* @llvm.stacksave()
%9 = alloca i8, i64 %7
%10 = load i32, i32* @BUFSIZ
%11 = zext i32 %10 to i64
%12 = alloca i8, i64 %11
%13 = bitcast i8** %4 to i8*
%14 = load i8*, i8** %1
%15 = tail call i8* @strrchr(i8* dereferenceable(1) %14, i8 signext 47)
%16 = icmp eq i8* %15, null
%17 = getelementptr inbounds i8, i8* %15, i64 1
%18 = select i1 %16, i8* %14, i8* %17
%19 = tail call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
%21 = zext i1 %20 to i32
br label %22
22: ; preds = %31, %2
%23 = phi i32 [ 2, %2 ], [ %32, %31 ]
%24 = phi i32 [ 0, %2 ], [ %33, %31 ]
%25 = phi i32 [ 0, %2 ], [ %34, %31 ]
%26 = phi i32 [ 0, %2 ], [ %35, %31 ]
%27 = phi i32 [ %21, %2 ], [ %36, %31 ]
%28 = phi i32 [ 0, %2 ], [ %37, %31 ]
%29 = phi i32 [ 8, %2 ], [ %38, %31 ]
%30 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
switch i32 %30, label %31 [
i32 -1, label %54
i32 99, label %39
i32 100, label %40
i32 108, label %41
i32 109, label %42
i32 113, label %43
i32 115, label %44
i32 116, label %47
i32 104, label %50
i32 63, label %50
]
31: ; preds = %22, %47, %44, %43, %42, %41, %40, %39
%32 = phi i32 [ %23, %47 ], [ %46, %44 ], [ %23, %43 ], [ %23, %42 ], [ %23, %41 ], [ %23, %40 ], [ %23, %39 ], [ %23, %22 ]
%33 = phi i32 [ %24, %47 ], [ %24, %44 ], [ %24, %43 ], [ 1, %42 ], [ %24, %41 ], [ %24, %40 ], [ %24, %39 ], [ %24, %22 ]
%34 = phi i32 [ %25, %47 ], [ %25, %44 ], [ 1, %43 ], [ %25, %42 ], [ %25, %41 ], [ %25, %40 ], [ %25, %39 ], [ %25, %22 ]
%35 = phi i32 [ %26, %47 ], [ %26, %44 ], [ %26, %43 ], [ %26, %42 ], [ 1, %41 ], [ %26, %40 ], [ %26, %39 ], [ %26, %22 ]
%36 = phi i32 [ %27, %47 ], [ %27, %44 ], [ %27, %43 ], [ %27, %42 ], [ %27, %41 ], [ 1, %40 ], [ %27, %39 ], [ %27, %22 ]
%37 = phi i32 [ %28, %47 ], [ %28, %44 ], [ %28, %43 ], [ %28, %42 ], [ %28, %41 ], [ %28, %40 ], [ 1, %39 ], [ %28, %22 ]
%38 = phi i32 [ %49, %47 ], [ %29, %44 ], [ %29, %43 ], [ %29, %42 ], [ %29, %41 ], [ %29, %40 ], [ %29, %39 ], [ %29, %22 ]
br label %22
39: ; preds = %22
br label %31
40: ; preds = %22
br label %31
41: ; preds = %22
br label %31
42: ; preds = %22
br label %31
43: ; preds = %22
br label %31
44: ; preds = %22
%45 = load i32, i32* @optarg
%46 = tail call i32 @atoi(i32 %45)
br label %31
47: ; preds = %22
%48 = load i32, i32* @optarg
%49 = tail call i32 @atoi(i32 %48)
br label %31
50: ; preds = %22, %22
%51 = load i32, i32* @stderr
%52 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([198 x i8], [198 x i8]* @.str.2, i64 0, i64 0), i8* %18)
%53 = tail call i32 @exit(i32 0)
unreachable
54: ; preds = %22
%55 = load i64, i64* @optind
%56 = getelementptr inbounds i8*, i8** %1, i64 %55
%57 = trunc i64 %55 to i32
%58 = sub i32 %0, %57
%59 = icmp eq i32 %24, 0
%60 = icmp eq i32 %26, 0
%61 = icmp eq i32 %27, 0
%62 = icmp eq i32 %25, 1
%63 = icmp eq i32 %28, 1
br label %64
64: ; preds = %265, %54
%65 = phi i32 [ 0, %54 ], [ %90, %265 ]
%66 = phi i32 [ 0, %54 ], [ %91, %265 ]
%67 = phi i8** [ %56, %54 ], [ %87, %265 ]
%68 = phi i32 [ %58, %54 ], [ %266, %265 ]
%69 = phi i8 [ undef, %54 ], [ %93, %265 ]
%70 = icmp slt i32 %68, 1
br i1 %70, label %71, label %73
71: ; preds = %64
%72 = load i32*, i32** @stdin
br label %86
73: ; preds = %64
%74 = load i8*, i8** %67
%75 = call i32* @fopen(i8* %74, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%76 = icmp eq i32* %75, null
br i1 %76, label %77, label %84
77: ; preds = %73
%78 = load i32, i32* @stderr
%79 = load i8*, i8** %67
%80 = load i32, i32* @errno
%81 = call i8* @strerror(i32 %80)
%82 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %78, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %79, i8* %81)
%83 = call i32 @exit(i32 1)
unreachable
84: ; preds = %73
%85 = getelementptr inbounds i8*, i8** %67, i64 1
br label %86
86: ; preds = %84, %71
%87 = phi i8** [ %67, %71 ], [ %85, %84 ]
%88 = phi i32* [ %72, %71 ], [ %75, %84 ]
br label %89
89: ; preds = %251, %86
%90 = phi i32 [ %65, %86 ], [ %243, %251 ]
%91 = phi i32 [ %66, %86 ], [ %244, %251 ]
%92 = phi i32 [ 0, %86 ], [ %245, %251 ]
%93 = phi i8 [ %69, %86 ], [ %246, %251 ]
%94 = call i32* @fgets(i8* %9, i32 %6, i32* %88)
%95 = icmp eq i32* %94, null
br i1 %95, label %265, label %96
96: ; preds = %89
store i32 0, i32* %3
store i8* %12, i8** %4
%97 = icmp eq i32 %92, 0
%98 = select i1 %97, i8 32, i8 %93
%99 = load i8, i8* %9
%100 = icmp eq i8 %99, 0
br i1 %100, label %242, label %101
101: ; preds = %96, %232
%102 = phi i8 [ %240, %232 ], [ %99, %96 ]
%103 = phi i8 [ %237, %232 ], [ %98, %96 ]
%104 = phi i8* [ %239, %232 ], [ %9, %96 ]
%105 = phi i32 [ %236, %232 ], [ 1, %96 ]
%106 = phi i32 [ %235, %232 ], [ 0, %96 ]
%107 = phi i32 [ %238, %232 ], [ 0, %96 ]
%108 = phi i32 [ %233, %232 ], [ %91, %96 ]
%109 = phi i32 [ %133, %232 ], [ %90, %96 ]
%110 = add nsw i32 %107, 1
%111 = icmp eq i32 %109, 0
%112 = icmp ugt i8* %104, %9
%113 = and i1 %111, %112
br i1 %113, label %114, label %122
114: ; preds = %101
%115 = getelementptr inbounds i8, i8* %104, i64 -1
%116 = load i8, i8* %115
%117 = icmp eq i8 %116, 47
%118 = icmp eq i8 %102, 42
%119 = select i1 %117, i1 %118, i1 false
%120 = xor i1 %119, true
%121 = zext i1 %119 to i32
br label %130
122: ; preds = %101
br i1 %111, label %130, label %123
123: ; preds = %122
%124 = icmp eq i8 %102, 42
br i1 %124, label %125, label %130
125: ; preds = %123
%126 = getelementptr inbounds i8, i8* %104, i64 1
%127 = load i8, i8* %126
%128 = icmp eq i8 %127, 47
br i1 %128, label %129, label %130
129: ; preds = %125
br label %130
130: ; preds = %114, %122, %123, %125, %129
%131 = phi i1 [ true, %122 ], [ false, %123 ], [ false, %125 ], [ true, %129 ], [ %120, %114 ]
%132 = phi i1 [ false, %122 ], [ true, %123 ], [ true, %125 ], [ false, %129 ], [ %119, %114 ]
%133 = phi i32 [ 0, %122 ], [ 1, %123 ], [ 1, %125 ], [ 0, %129 ], [ %121, %114 ]
br i1 %59, label %137, label %134
134: ; preds = %130
%135 = icmp ne i32 %108, 0
%136 = select i1 %132, i1 %135, i1 false
br i1 %136, label %137, label %181
137: ; preds = %134, %130
%138 = icmp eq i32 %105, 0
%139 = select i1 %60, i1 true, i1 %138
%140 = icmp eq i8 %103, 32
%141 = select i1 %139, i1 %140, i1 false
br i1 %141, label %142, label %181
142: ; preds = %137
switch i8 %102, label %181 [
i8 9, label %143
i8 32, label %147
]
143: ; preds = %142
%144 = load i32, i32* %3
%145 = sub i32 %29, %107
%146 = add i32 %145, %144
store i32 %146, i32* %3
br label %151
147: ; preds = %142
%148 = load i32, i32* %3
%149 = add nsw i32 %148, 1
store i32 %149, i32* %3
%150 = icmp eq i32 %110, %29
br i1 %150, label %151, label %232
151: ; preds = %143, %147
%152 = phi i32 [ %146, %143 ], [ %149, %147 ]
%153 = getelementptr inbounds i8, i8* %104, i64 1
%154 = load i8, i8* %153
%155 = getelementptr inbounds i8, i8* %104, i64 1
br label %156
156: ; preds = %151, %159
%157 = phi i8 [ %165, %159 ], [ %154, %151 ]
%158 = phi i32 [ %162, %159 ], [ 0, %151 ]
switch i8 %157, label %169 [
i8 9, label %159
i8 32, label %159
]
159: ; preds = %156, %156
%160 = icmp eq i8 %157, 32
%161 = zext i1 %160 to i32
%162 = add nuw nsw i32 %158, %161
%163 = zext i32 %162 to i64
%164 = getelementptr inbounds i8, i8* %155, i64 %163
%165 = load i8, i8* %164
%166 = icmp eq i8 %165, 9
%167 = icmp eq i32 %162, %29
%168 = select i1 %166, i1 true, i1 %167
br i1 %168, label %169, label %156
169: ; preds = %159, %156
%170 = phi i32 [ %158, %156 ], [ %29, %159 ]
%171 = icmp slt i32 %152, %23
br i1 %171, label %172, label %175
172: ; preds = %169
%173 = icmp eq i32 %170, %29
%174 = select i1 %173, i1 %61, i1 false
br i1 %174, label %176, label %179
175: ; preds = %169
br i1 %61, label %176, label %179
176: ; preds = %172, %175
%177 = load i8*, i8** %4
%178 = getelementptr inbounds i8, i8* %177, i64 1
store i8* %178, i8** %4
store i8 9, i8* %177
store i32 0, i32* %3
br label %232
179: ; preds = %175, %172
%180 = call i32 @output_accumulated_spaces(i32* %3, i8** %4)
br label %232
181: ; preds = %142, %137, %134
%182 = icmp eq i32 %105, 0
br i1 %182, label %189, label %183
183: ; preds = %181
switch i8 %102, label %184 [
i8 32, label %189
i8 9, label %189
]
184: ; preds = %183
%185 = xor i1 %131, true
%186 = icmp eq i8 %102, 42
%187 = select i1 %185, i1 %186, i1 false
%188 = zext i1 %187 to i32
br label %189
189: ; preds = %184, %183, %183, %181
%190 = phi i32 [ 1, %183 ], [ 0, %181 ], [ 1, %183 ], [ %188, %184 ]
%191 = icmp eq i8 %102, 46
%192 = zext i1 %191 to i32
%193 = call i32 @output_accumulated_spaces(i32* %3, i8** %4)
%194 = load i8, i8* %104
%195 = icmp eq i8 %194, 9
%196 = select i1 %195, i32 0, i32 %110
%197 = icmp eq i8 %194, 8
%198 = add nsw i32 %196, -2
%199 = select i1 %197, i32 %198, i32 %196
%200 = icmp eq i32 %106, 0
%201 = select i1 %200, i1 %62, i1 false
br i1 %201, label %202, label %210
202: ; preds = %189
%203 = icmp eq i8 %194, 92
%204 = zext i1 %203 to i32
switch i8 %194, label %212 [
i8 34, label %205
i8 39, label %205
]
205: ; preds = %202, %202
%206 = icmp eq i8 %103, 32
br i1 %206, label %226, label %207
207: ; preds = %205
%208 = icmp eq i8 %194, %103
%209 = select i1 %208, i8 32, i8 %103
br label %226
210: ; preds = %189
switch i8 %194, label %211 [
i8 13, label %212
i8 10, label %212
]
211: ; preds = %210
br label %212
212: ; preds = %210, %210, %202, %211
%213 = phi i32 [ 0, %211 ], [ %106, %210 ], [ %204, %202 ], [ %106, %210 ]
%214 = icmp eq i8 %194, 13
br i1 %214, label %218, label %215
215: ; preds = %212
%216 = icmp eq i8 %194, 10
%217 = select i1 %216, i1 %63, i1 false
br i1 %217, label %219, label %226
218: ; preds = %212
br i1 %63, label %219, label %226
219: ; preds = %215, %218
%220 = icmp eq i8 %103, 32
%221 = icmp eq i32 %213, 0
%222 = select i1 %220, i1 %221, i1 false
br i1 %222, label %223, label %226
223: ; preds = %219
%224 = call i32 @trim_trailing_whitespace(i32* %3, i8** %4, i8* %12)
%225 = load i8, i8* %104
br label %226
226: ; preds = %205, %207, %223, %219, %218, %215
%227 = phi i8 [ %225, %223 ], [ %194, %219 ], [ 13, %218 ], [ %194, %215 ], [ %194, %205 ], [ %194, %207 ]
%228 = phi i8 [ 32, %223 ], [ %103, %219 ], [ %103, %218 ], [ %103, %215 ], [ %194, %205 ], [ %209, %207 ]
%229 = phi i32 [ 0, %223 ], [ %213, %219 ], [ %213, %218 ], [ %213, %215 ], [ %204, %205 ], [ %204, %207 ]
%230 = load i8*, i8** %4
%231 = getelementptr inbounds i8, i8* %230, i64 1
store i8* %231, i8** %4
store i8 %227, i8* %230
br label %232
232: ; preds = %147, %179, %176, %226
%233 = phi i32 [ %108, %176 ], [ %108, %179 ], [ %108, %147 ], [ %192, %226 ]
%234 = phi i32 [ %29, %176 ], [ %29, %179 ], [ %110, %147 ], [ %199, %226 ]
%235 = phi i32 [ %106, %176 ], [ %106, %179 ], [ %106, %147 ], [ %229, %226 ]
%236 = phi i32 [ %105, %176 ], [ %105, %179 ], [ %105, %147 ], [ %190, %226 ]
%237 = phi i8 [ 32, %176 ], [ 32, %179 ], [ 32, %147 ], [ %228, %226 ]
%238 = srem i32 %234, %29
%239 = getelementptr inbounds i8, i8* %104, i64 1
%240 = load i8, i8* %239
%241 = icmp eq i8 %240, 0
br i1 %241, label %242, label %101
242: ; preds = %232, %96
%243 = phi i32 [ %90, %96 ], [ %133, %232 ]
%244 = phi i32 [ %91, %96 ], [ %233, %232 ]
%245 = phi i32 [ 0, %96 ], [ %235, %232 ]
%246 = phi i8 [ %98, %96 ], [ %237, %232 ]
%247 = icmp eq i32 %245, 0
%248 = select i1 %63, i1 %247, i1 false
br i1 %248, label %249, label %251
249: ; preds = %242
%250 = call i32 @trim_trailing_whitespace(i32* %3, i8** %4, i8* %12)
br label %251
251: ; preds = %249, %242
%252 = call i32 @output_accumulated_spaces(i32* %3, i8** %4)
%253 = load i8*, i8** %4
store i8 0, i8* %253
%254 = load i32, i32* @stdout
%255 = call i64 @fputs(i8* %12, i32 %254)
%256 = load i64, i64* @EOF
%257 = icmp eq i64 %255, %256
br i1 %257, label %258, label %89
258: ; preds = %251
%259 = load i32, i32* @stderr
%260 = load i8*, i8** %87
%261 = load i32, i32* @errno
%262 = call i8* @strerror(i32 %261)
%263 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %259, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), i8* %260, i8* %262)
%264 = call i32 @exit(i32 1)
unreachable
265: ; preds = %89
%266 = add nsw i32 %68, -1
%267 = icmp sgt i32 %68, 1
br i1 %267, label %64, label %268
268: ; preds = %265
ret i32 0
}