#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 */

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int FILENAME_MAX;
int /*<<< orphan*/ check_typos(char);
int /*<<< orphan*/ disable_autokw();
int /*<<< orphan*/ enable_autofunc();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free_trees();
int /*<<< orphan*/ generate_index(char);
int /*<<< orphan*/ generate_list();
int get_mode();
int getopt(int, char **, char *);
int /*<<< orphan*/ load_index(char *);
int /*<<< orphan*/ load_stop(char *);
int /*<<< orphan*/ *optarg;
int optind;
int process_pptx(char *);
int /*<<< orphan*/ remove_words();
int /*<<< orphan*/ set_kw(int /*<<< orphan*/);
int /*<<< orphan*/ set_mode(int);
int /*<<< orphan*/ set_pages(short);
int /*<<< orphan*/ set_sep(int /*<<< orphan*/);
int /*<<< orphan*/ setup_sqlite(char);
int /*<<< orphan*/ sscanf(int /*<<< orphan*/ *, char *, short *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stem_words();
int /*<<< orphan*/ strncpy(char *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ usage(char *);
int main(int argc, char *argv[]) {
  int k;
  int slidecount = 0;
  int num_slides;
  int ch;
  char keyword_file[FILENAME_MAX];
  char stop_file[FILENAME_MAX];
  char failure = 0;
  short slides_per_page = 0;
  char debug = 0;
  char typos = 0;
  while ((ch = getopt(argc, argv, "fxrI:tS:s:p:k:dw")) != -1) {
    switch (ch) {
    case 'x':
      debug = 1;
      break;
    case 'w':
      typos = 1;
      break;
    case 'd':
      disable_autokw();
      break;
    case 'f':
      enable_autofunc();
      break;
    case 'k':
      set_kw(*optarg);
      break;
    case 's':
      set_sep(*optarg);
      break;
    case 'r':
      set_mode(8);
      break;
    case 'p':
      if (sscanf(optarg, "%hd", &slides_per_page)) {
        if (slides_per_page < 1) {
          failure = 1;
        }
        switch (slides_per_page) {
        case 1:
        case 2:
        case 3:
        case 4:
        case 6:
        case 9:
          break;
        default:
          failure = 1;
          break;
        }
      } else {
        failure = 1;
      }
      if (failure) {
        fprintf(stderr, "-p must be followed by a positive integer\n");
        fprintf(stderr, "(number of slides per page in the handout)\n");
        fprintf(stderr, "This number can only be one of 1,2,3,4,6 or 9.\n");
        return 1;
      }
      set_pages(slides_per_page);
      break;
    case 'I':
      if ((get_mode() == 0) || (get_mode() == (0 | 8))) {
        strncpy(keyword_file, optarg, FILENAME_MAX);
        set_mode(2);
      } else {
        fprintf(stderr, "Option -I is incompatible with -%c\n",
                (get_mode() & 1 ? 'S' : (get_mode() & 4 ? 't' : '?')));
        return 1;
      }
      break;
    case 'S':
      if (get_mode() == 0) {
        strncpy(stop_file, optarg, FILENAME_MAX);
        set_mode(1);
      } else {
        fprintf(stderr, "Option -S is incompatible with -%c\n",
                (get_mode() & 2 ? 'I' : (get_mode() & 4 ? 't' : 'r')));
        return 1;
      }
      break;
    case 't':
      if ((get_mode() == 0) || (get_mode() == (0 | 8))) {
        set_mode(4);
      } else {
        fprintf(stderr, "Option -t is incompatible with -%c\n",
                (get_mode() & 2 ? 'I' : (get_mode() & 1 ? 'S' : '?')));
        return 1;
      }
      break;
    case '?':
    default:
      usage(argv[0]);
      return 1;
      break;
    }
  }
  if (get_mode() & 8 & 1) {
    fprintf(stderr, "Options -r and -s are incompatible\n");
    return 1;
  }
  setup_sqlite(debug);
  if (get_mode() & 2) {
    load_index(keyword_file);
  }
  if (get_mode() & 1) {
    load_stop(stop_file);
  }
  for (k = optind; k < argc; k++) {
    num_slides = process_pptx(argv[k]);
    if (num_slides < 0) {
      exit(EXIT_FAILURE);
    }
    slidecount += num_slides;
    fprintf(stderr, "%d slide%s\n", num_slides, (num_slides == 1 ? "" : "s"));
    fflush(stderr);
  }
  if (slidecount > 0) {
    fprintf(stderr, "Total: %4d slides\n", slidecount);
    fflush(stderr);
    switch (get_mode()) {
    case 0:
    case 1:
      fprintf(stderr, "Stemming and cleaning up words\n");
      stem_words();
      remove_words();
      generate_list();
      break;
    default:
      if (!typos) {
        generate_index(debug);
      } else {
        check_typos(debug);
      }
      break;
    }
  } else {
    usage(argv[0]);
  }
  free_trees();
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    0x2d31(%rip),%rax
mov    (%rax),%ecx
mov    %rsp,%rdx
mov    %rdx,-0x28(%rbp)
mov    %rcx,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x58(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x30(%rbp)
mov    (%rax),%eax
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
movb   $0x0,-0x39(%rbp)
movw   $0x0,-0x3c(%rbp)
movb   $0x0,-0x3d(%rbp)
movb   $0x0,-0x3e(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xdde(%rip),%rdx
call   1150 <getopt@plt>
mov    %eax,-0x20(%rbp)
cmp    $0xffffffff,%eax
je     16dc <main+0x45c>
mov    -0x20(%rbp),%eax
add    $0xffffffc1,%eax
mov    %eax,%ecx
mov    %rcx,-0x60(%rbp)
sub    $0x39,%eax
ja     16b8 <main+0x438>
mov    -0x60(%rbp),%rax
lea    0xcc5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x1,-0x3d(%rbp)
jmp    16d7 <main+0x457>
movb   $0x1,-0x3e(%rbp)
jmp    16d7 <main+0x457>
mov    $0x0,%al
call   1070 <disable_autokw@plt>
jmp    16d7 <main+0x457>
mov    $0x0,%al
call   11a0 <enable_autofunc@plt>
jmp    16d7 <main+0x457>
mov    0x2c83(%rip),%rax
mov    (%rax),%rax
mov    (%rax),%edi
call   1100 <set_kw@plt>
jmp    16d7 <main+0x457>
mov    0x2c6d(%rip),%rax
mov    (%rax),%rax
mov    (%rax),%edi
call   1120 <set_sep@plt>
jmp    16d7 <main+0x457>
mov    $0x8,%edi
call   1090 <set_mode@plt>
jmp    16d7 <main+0x457>
mov    0x2c48(%rip),%rax
mov    (%rax),%rdi
lea    0xd3f(%rip),%rsi
lea    -0x3c(%rbp),%rdx
call   1110 <sscanf@plt>
cmp    $0x0,%eax
je     1425 <main+0x1a5>
movswl -0x3c(%rbp),%eax
cmp    $0x1,%eax
jge    13dd <main+0x15d>
movb   $0x1,-0x39(%rbp)
movswl -0x3c(%rbp),%eax
mov    %eax,-0x64(%rbp)
add    $0xffffffff,%eax
sub    $0x4,%eax
jb     1417 <main+0x197>
jmp    13f5 <main+0x175>
mov    -0x64(%rbp),%eax
sub    $0x6,%eax
je     1417 <main+0x197>
jmp    1406 <main+0x186>
mov    -0x64(%rbp),%eax
sub    $0x9,%eax
jne    141c <main+0x19c>
jmp    1417 <main+0x197>
jmp    1420 <main+0x1a0>
movb   $0x1,-0x39(%rbp)
jmp    1429 <main+0x1a9>
movb   $0x1,-0x39(%rbp)
cmpb   $0x0,-0x39(%rbp)
je     148b <main+0x20b>
mov    0x2b8e(%rip),%rax
mov    (%rax),%edi
lea    0xcba(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    0x2b77(%rip),%rax
mov    (%rax),%edi
lea    0xcce(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    0x2b60(%rip),%rax
mov    (%rax),%edi
lea    0xce3(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x44(%rbp)
jmp    18c7 <main+0x647>
movswl -0x3c(%rbp),%edi
call   1060 <set_pages@plt>
jmp    16d7 <main+0x457>
mov    $0x0,%al
call   1190 <get_mode@plt>
cmp    $0x0,%eax
je     14b9 <main+0x239>
mov    $0x0,%al
call   1190 <get_mode@plt>
cmp    $0x8,%eax
jne    14e4 <main+0x264>
mov    -0x58(%rbp),%rdi
mov    0x2b34(%rip),%rax
mov    (%rax),%rsi
mov    0x2b0a(%rip),%rax
mov    (%rax),%edx
call   1040 <strncpy@plt>
mov    $0x2,%edi
call   1090 <set_mode@plt>
jmp    1556 <main+0x2d6>
mov    0x2add(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x68(%rbp)
mov    $0x0,%al
call   1190 <get_mode@plt>
and    $0x1,%eax
cmp    $0x0,%eax
je     1510 <main+0x290>
mov    $0x53,%eax
mov    %eax,-0x6c(%rbp)
jmp    152f <main+0x2af>
mov    $0x0,%al
call   1190 <get_mode@plt>
mov    %eax,%edx
and    $0x4,%edx
mov    $0x3f,%eax
mov    $0x74,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x68(%rbp),%edi
mov    -0x6c(%rbp),%edx
lea    0xc48(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x44(%rbp)
jmp    18c7 <main+0x647>
jmp    16d7 <main+0x457>
mov    $0x0,%al
call   1190 <get_mode@plt>
cmp    $0x0,%eax
jne    1596 <main+0x316>
mov    -0x50(%rbp),%rdi
mov    0x2a82(%rip),%rax
mov    (%rax),%rsi
mov    0x2a58(%rip),%rax
mov    (%rax),%edx
call   1040 <strncpy@plt>
mov    $0x1,%edi
call   1090 <set_mode@plt>
jmp    1608 <main+0x388>
mov    0x2a2b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x70(%rbp)
mov    $0x0,%al
call   1190 <get_mode@plt>
and    $0x2,%eax
cmp    $0x0,%eax
je     15c2 <main+0x342>
mov    $0x49,%eax
mov    %eax,-0x74(%rbp)
jmp    15e1 <main+0x361>
mov    $0x0,%al
call   1190 <get_mode@plt>
mov    %eax,%edx
and    $0x4,%edx
mov    $0x72,%eax
mov    $0x74,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x74(%rbp)
mov    -0x70(%rbp),%edi
mov    -0x74(%rbp),%edx
lea    0xbba(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x44(%rbp)
jmp    18c7 <main+0x647>
jmp    16d7 <main+0x457>
mov    $0x0,%al
call   1190 <get_mode@plt>
cmp    $0x0,%eax
je     162d <main+0x3ad>
mov    $0x0,%al
call   1190 <get_mode@plt>
cmp    $0x8,%eax
jne    163c <main+0x3bc>
mov    $0x4,%edi
call   1090 <set_mode@plt>
jmp    16ae <main+0x42e>
mov    0x2985(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x78(%rbp)
mov    $0x0,%al
call   1190 <get_mode@plt>
and    $0x2,%eax
cmp    $0x0,%eax
je     1668 <main+0x3e8>
mov    $0x49,%eax
mov    %eax,-0x7c(%rbp)
jmp    1687 <main+0x407>
mov    $0x0,%al
call   1190 <get_mode@plt>
mov    %eax,%edx
and    $0x1,%edx
mov    $0x3f,%eax
mov    $0x53,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x78(%rbp),%edi
mov    -0x7c(%rbp),%edx
lea    0xb38(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x44(%rbp)
jmp    18c7 <main+0x647>
jmp    16d7 <main+0x457>
jmp    16b8 <main+0x438>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1130 <usage@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x44(%rbp)
jmp    18c7 <main+0x647>
jmp    12fc <main+0x7c>
mov    $0x0,%al
call   1190 <get_mode@plt>
and    $0x8,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     171c <main+0x49c>
mov    0x28cf(%rip),%rax
mov    (%rax),%edi
lea    0xaee(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x44(%rbp)
jmp    18c7 <main+0x647>
movsbl -0x3d(%rbp),%edi
call   1140 <setup_sqlite@plt>
mov    $0x0,%al
call   1190 <get_mode@plt>
and    $0x2,%eax
cmp    $0x0,%eax
je     1741 <main+0x4c1>
mov    -0x58(%rbp),%rdi
call   10d0 <load_index@plt>
mov    $0x0,%al
call   1190 <get_mode@plt>
and    $0x1,%eax
cmp    $0x0,%eax
je     175d <main+0x4dd>
mov    -0x50(%rbp),%rdi
call   10b0 <load_stop@plt>
mov    0x287c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    17f8 <main+0x578>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1160 <process_pptx@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    17a1 <main+0x521>
mov    0x2826(%rip),%rax
mov    (%rax),%edi
call   1180 <exit@plt>
mov    -0x1c(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    0x2817(%rip),%rax
mov    (%rax),%edi
mov    -0x1c(%rbp),%edx
mov    -0x1c(%rbp),%esi
lea    0xa60(%rip),%rcx
lea    0x98c(%rip),%rax
cmp    $0x1,%esi
cmove  %rax,%rcx
lea    0xa3f(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    0x27e5(%rip),%rax
mov    (%rax),%edi
call   10f0 <fflush@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1769 <main+0x4e9>
cmpl   $0x0,-0x18(%rbp)
jle    18a6 <main+0x626>
mov    0x27bf(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    (%rax),%edi
mov    -0x18(%rbp),%edx
lea    0xa06(%rip),%rsi
xor    %eax,%eax
mov    %al,-0x7d(%rbp)
call   10c0 <fprintf@plt>
mov    -0x88(%rbp),%rax
mov    (%rax),%edi
call   10f0 <fflush@plt>
mov    -0x7d(%rbp),%al
call   1190 <get_mode@plt>
sub    $0x1,%eax
ja     187b <main+0x5fb>
jmp    184a <main+0x5ca>
mov    0x2777(%rip),%rax
mov    (%rax),%edi
lea    0x9db(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    $0x0,%al
call   10a0 <stem_words@plt>
mov    $0x0,%al
call   1170 <remove_words@plt>
mov    $0x0,%al
call   1080 <generate_list@plt>
jmp    18a1 <main+0x621>
cmpb   $0x0,-0x3e(%rbp)
jne    1893 <main+0x613>
movsbl -0x3d(%rbp),%edi
call   1030 <generate_index@plt>
jmp    189c <main+0x61c>
movsbl -0x3d(%rbp),%edi
call   1050 <check_typos@plt>
jmp    18a1 <main+0x621>
jmp    18b2 <main+0x632>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1130 <usage@plt>
mov    $0x0,%al
call   10e0 <free_trees@plt>
mov    0x26f8(%rip),%rax
mov    (%rax),%edi
call   1180 <exit@plt>
mov    -0x28(%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    $0x28,%rsp
mov    %rsi,%r14
mov    %edi,%ebx
mov    0x2d3b(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0x48(%rbp)
mov    %rcx,%rsp
movw   $0x0,-0x2a(%rbp)
lea    0xdf2(%rip),%r13
lea    0xd2b(%rip),%r15
xor    %eax,%eax
movl   $0x0,-0x34(%rbp)
jmp    12ed <main+0x6d>
mov    $0x8,%edi
call   1090 <set_mode@plt>
mov    %r12d,%eax
mov    %eax,%r12d
mov    %ebx,%edi
mov    %r14,%rsi
mov    %r13,%rdx
call   1150 <getopt@plt>
lea    -0x49(%rax),%ecx
cmp    $0x2f,%ecx
ja     154b <main+0x2cb>
mov    $0x1,%al
movslq (%r15,%rcx,4),%rcx
add    %r15,%rcx
jmp    *%rcx
xor    %eax,%eax
call   1190 <get_mode@plt>
test   %eax,%eax
je     132f <main+0xaf>
xor    %eax,%eax
call   1190 <get_mode@plt>
cmp    $0x8,%eax
jne    14d2 <main+0x252>
mov    0x2cc2(%rip),%rax
mov    (%rax),%rsi
mov    0x2c98(%rip),%rax
mov    (%rax),%edx
mov    -0x40(%rbp),%rdi
call   1040 <strncpy@plt>
mov    $0x2,%edi
jmp    12e5 <main+0x65>
mov    0x2c9f(%rip),%rax
mov    (%rax),%rax
mov    (%rax),%edi
call   1120 <set_sep@plt>
mov    %r12d,%eax
jmp    12ed <main+0x6d>
xor    %eax,%eax
call   1070 <disable_autokw@plt>
mov    %r12d,%eax
jmp    12ed <main+0x6d>
mov    0x2c7a(%rip),%rax
mov    (%rax),%rax
mov    (%rax),%edi
call   1100 <set_kw@plt>
mov    %r12d,%eax
jmp    12ed <main+0x6d>
mov    0x2c61(%rip),%rax
mov    (%rax),%rdi
lea    0xd30(%rip),%rsi
lea    -0x2a(%rbp),%rdx
call   1110 <sscanf@plt>
test   %eax,%eax
je     1463 <main+0x1e3>
movzwl -0x2a(%rbp),%eax
movswl %ax,%edi
lea    -0x1(%rdi),%ecx
cmp    $0x4,%ecx
jae    1451 <main+0x1d1>
test   %ax,%ax
jle    1463 <main+0x1e3>
call   1060 <set_pages@plt>
mov    %r12d,%eax
jmp    12ed <main+0x6d>
xor    %eax,%eax
call   1190 <get_mode@plt>
test   %eax,%eax
jne    149f <main+0x21f>
mov    0x2c07(%rip),%rax
mov    (%rax),%rsi
mov    0x2bdd(%rip),%rax
mov    (%rax),%edx
mov    -0x48(%rbp),%rdi
call   1040 <strncpy@plt>
mov    $0x1,%edi
jmp    12e5 <main+0x65>
xor    %eax,%eax
call   11a0 <enable_autofunc@plt>
mov    %r12d,%eax
jmp    12ed <main+0x6d>
xor    %eax,%eax
call   1190 <get_mode@plt>
test   %eax,%eax
je     143a <main+0x1ba>
xor    %eax,%eax
call   1190 <get_mode@plt>
cmp    $0x8,%eax
jne    150a <main+0x28a>
mov    $0x4,%edi
jmp    12e5 <main+0x65>
mov    $0x1,%al
mov    %eax,-0x34(%rbp)
mov    %r12d,%eax
jmp    12ed <main+0x6d>
cmp    $0x9,%edi
je     13c5 <main+0x145>
cmp    $0x6,%edi
je     13c5 <main+0x145>
mov    0x2b5e(%rip),%rbx
mov    (%rbx),%edi
lea    0xc62(%rip),%rsi
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    (%rbx),%edi
lea    0xc7d(%rip),%rsi
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    (%rbx),%edi
lea    0xc99(%rip),%rsi
xor    %eax,%eax
call   10c0 <fprintf@plt>
jmp    1558 <main+0x2d8>
mov    0x2b22(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1190 <get_mode@plt>
mov    $0x49,%edx
test   $0x2,%al
jne    14c9 <main+0x249>
xor    %eax,%eax
call   1190 <get_mode@plt>
mov    %eax,%edx
and    $0x4,%edx
shr    %edx
add    $0x72,%edx
lea    0xcb0(%rip),%rsi
jmp    1540 <main+0x2c0>
mov    0x2aef(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1190 <get_mode@plt>
mov    $0x53,%edx
test   $0x1,%al
jne    1501 <main+0x281>
xor    %eax,%eax
call   1190 <get_mode@plt>
test   $0x4,%al
mov    $0x3f,%eax
mov    $0x74,%edx
cmove  %eax,%edx
lea    0xc54(%rip),%rsi
jmp    1540 <main+0x2c0>
mov    0x2ab7(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1190 <get_mode@plt>
mov    $0x49,%edx
test   $0x2,%al
jne    1539 <main+0x2b9>
xor    %eax,%eax
call   1190 <get_mode@plt>
test   $0x1,%al
mov    $0x3f,%eax
mov    $0x53,%edx
cmove  %eax,%edx
lea    0xc64(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   10c0 <fprintf@plt>
jmp    1558 <main+0x2d8>
cmp    $0xffffffff,%eax
je     156c <main+0x2ec>
mov    (%r14),%rdi
call   1130 <usage@plt>
mov    $0x1,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
call   1190 <get_mode@plt>
movsbl %r12b,%edi
mov    %edi,-0x30(%rbp)
call   1140 <setup_sqlite@plt>
xor    %eax,%eax
call   1190 <get_mode@plt>
test   $0x2,%al
je     1593 <main+0x313>
mov    -0x40(%rbp),%rdi
call   10d0 <load_index@plt>
xor    %eax,%eax
call   1190 <get_mode@plt>
test   $0x1,%al
je     15a7 <main+0x327>
mov    -0x48(%rbp),%rdi
call   10b0 <load_stop@plt>
mov    0x2a32(%rip),%rax
movslq (%rax),%rax
cmp    %ebx,%eax
jge    168a <main+0x40a>
lea    (%r14,%rax,8),%rcx
mov    %rcx,-0x40(%rbp)
sub    %eax,%ebx
xor    %r13d,%r13d
xor    %r15d,%r15d
nopl   0x0(%rax)
mov    -0x40(%rbp),%rax
mov    (%rax,%r13,8),%rdi
call   1160 <process_pptx@plt>
test   %eax,%eax
js     16a7 <main+0x427>
add    %eax,%r15d
mov    0x29d9(%rip),%r12
mov    (%r12),%edi
cmp    $0x1,%eax
lea    0xbd7(%rip),%rcx
lea    0xb27(%rip),%rdx
cmove  %rdx,%rcx
lea    0xbb9(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    (%r12),%edi
call   10f0 <fflush@plt>
add    $0x1,%r13
cmp    %r13d,%ebx
jne    15d0 <main+0x350>
test   %r15d,%r15d
jle    168a <main+0x40a>
mov    0x2992(%rip),%rbx
mov    (%rbx),%edi
lea    0xb97(%rip),%rsi
mov    %r15d,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    (%rbx),%edi
call   10f0 <fflush@plt>
xor    %eax,%eax
call   1190 <get_mode@plt>
cmp    $0x1,%eax
ja     16b5 <main+0x435>
mov    0x2965(%rip),%rax
mov    (%rax),%edi
lea    0xb7d(%rip),%rsi
xor    %eax,%eax
call   10c0 <fprintf@plt>
xor    %eax,%eax
call   10a0 <stem_words@plt>
xor    %eax,%eax
call   1170 <remove_words@plt>
xor    %eax,%eax
call   1080 <generate_list@plt>
jmp    1692 <main+0x412>
mov    (%r14),%rdi
call   1130 <usage@plt>
xor    %eax,%eax
call   10e0 <free_trees@plt>
mov    0x2918(%rip),%rax
mov    (%rax),%edi
call   1180 <exit@plt>
mov    0x2912(%rip),%rax
mov    (%rax),%edi
call   1180 <exit@plt>
cmpb   $0x0,-0x34(%rbp)
jne    16c5 <main+0x445>
mov    -0x30(%rbp),%edi
call   1030 <generate_index@plt>
jmp    1692 <main+0x412>
mov    -0x30(%rbp),%edi
call   1050 <check_typos@plt>
jmp    1692 <main+0x412>

LLVM IR (-O0):
@FILENAME_MAX = global i32 0
@.str = [17 x i8] c"fxrI:tS:s:p:k:dw\00"
@optarg = global i32* null
@.str.1 = [4 x i8] c"%hd\00"
@stderr = global i32 0
@.str.2 = [43 x i8] c"-p must be followed by a positive integer\0A\00"
@.str.3 = [44 x i8] c"(number of slides per page in the handout)\0A\00"
@.str.4 = [48 x i8] c"This number can only be one of 1,2,3,4,6 or 9.\0A\00"
@.str.5 = [36 x i8] c"Option -I is incompatible with -%c\0A\00"
@.str.6 = [36 x i8] c"Option -S is incompatible with -%c\0A\00"
@.str.7 = [36 x i8] c"Option -t is incompatible with -%c\0A\00"
@.str.8 = [36 x i8] c"Options -r and -s are incompatible\0A\00"
@optind = global i32 0
@EXIT_FAILURE = global i32 0
@.str.9 = [12 x i8] c"%d slide%s\0A\00"
@.str.10 = [1 x i8] zeroinitializer
@.str.11 = [2 x i8] c"s\00"
@.str.12 = [19 x i8] c"Total: %4d slides\0A\00"
@.str.13 = [32 x i8] c"Stemming and cleaning up words\0A\00"
@EXIT_SUCCESS = global i32 0
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 i8*
%11 = alloca i64
%12 = alloca i64
%13 = alloca i8
%14 = alloca i16
%15 = alloca i8
%16 = alloca i8
%17 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
%18 = load i32, i32* @FILENAME_MAX
%19 = zext i32 %18 to i64
%20 = call i8* @llvm.stacksave()
store i8* %20, i8** %10
%21 = alloca i8, i64 %19
store i64 %19, i64* %11
%22 = load i32, i32* @FILENAME_MAX
%23 = zext i32 %22 to i64
%24 = alloca i8, i64 %23
store i64 %23, i64* %12
store i8 0, i8* %13
store i16 0, i16* %14
store i8 0, i8* %15
store i8 0, i8* %16
br label %25
25: ; preds = %158, %2
%26 = load i32, i32* %4
%27 = load i8**, i8*** %5
%28 = call i32 @getopt(i32 %26, i8** %27, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i32 %28, i32* %9
%29 = icmp ne i32 %28, -1
br i1 %29, label %30, label %159
30: ; preds = %25
%31 = load i32, i32* %9
switch i32 %31, label %153 [
i32 120, label %32
i32 119, label %33
i32 100, label %34
i32 102, label %36
i32 107, label %38
i32 115, label %42
i32 114, label %46
i32 112, label %48
i32 73, label %77
i32 83, label %104
i32 116, label %128
i32 63, label %152
]
32: ; preds = %30
store i8 1, i8* %15
br label %158
33: ; preds = %30
store i8 1, i8* %16
br label %158
34: ; preds = %30
%35 = call i32 (...) @disable_autokw()
br label %158
36: ; preds = %30
%37 = call i32 (...) @enable_autofunc()
br label %158
38: ; preds = %30
%39 = load i32*, i32** @optarg
%40 = load i32, i32* %39
%41 = call i32 @set_kw(i32 %40)
br label %158
42: ; preds = %30
%43 = load i32*, i32** @optarg
%44 = load i32, i32* %43
%45 = call i32 @set_sep(i32 %44)
br label %158
46: ; preds = %30
%47 = call i32 @set_mode(i32 8)
br label %158
48: ; preds = %30
%49 = load i32*, i32** @optarg
%50 = call i32 @sscanf(i32* %49, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i16* %14)
%51 = icmp ne i32 %50, 0
br i1 %51, label %52, label %63
52: ; preds = %48
%53 = load i16, i16* %14
%54 = sext i16 %53 to i32
%55 = icmp slt i32 %54, 1
br i1 %55, label %56, label %57
56: ; preds = %52
store i8 1, i8* %13
br label %57
57: ; preds = %56, %52
%58 = load i16, i16* %14
%59 = sext i16 %58 to i32
switch i32 %59, label %61 [
i32 1, label %60
i32 2, label %60
i32 3, label %60
i32 4, label %60
i32 6, label %60
i32 9, label %60
]
60: ; preds = %57, %57, %57, %57, %57, %57
br label %62
61: ; preds = %57
store i8 1, i8* %13
br label %62
62: ; preds = %61, %60
br label %64
63: ; preds = %48
store i8 1, i8* %13
br label %64
64: ; preds = %63, %62
%65 = load i8, i8* %13
%66 = icmp ne i8 %65, 0
br i1 %66, label %67, label %74
67: ; preds = %64
%68 = load i32, i32* @stderr
%69 = call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
%70 = load i32, i32* @stderr
%71 = call i32 (i32, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
%72 = load i32, i32* @stderr
%73 = call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %3
store i32 1, i32* %17
br label %251
74: ; preds = %64
%75 = load i16, i16* %14
%76 = call i32 @set_pages(i16 signext %75)
br label %158
77: ; preds = %30
%78 = call i32 (...) @get_mode()
%79 = icmp eq i32 %78, 0
br i1 %79, label %83, label %80
80: ; preds = %77
%81 = call i32 (...) @get_mode()
%82 = icmp eq i32 %81, 8
br i1 %82, label %83, label %88
83: ; preds = %80, %77
%84 = load i32*, i32** @optarg
%85 = load i32, i32* @FILENAME_MAX
%86 = call i32 @strncpy(i8* %21, i32* %84, i32 %85)
%87 = call i32 @set_mode(i32 2)
br label %103
88: ; preds = %80
%89 = load i32, i32* @stderr
%90 = call i32 (...) @get_mode()
%91 = and i32 %90, 1
%92 = icmp ne i32 %91, 0
br i1 %92, label %93, label %94
93: ; preds = %88
br label %100
94: ; preds = %88
%95 = call i32 (...) @get_mode()
%96 = and i32 %95, 4
%97 = icmp ne i32 %96, 0
%98 = zext i1 %97 to i64
%99 = select i1 %97, i32 116, i32 63
br label %100
100: ; preds = %94, %93
%101 = phi i32 [ 83, %93 ], [ %99, %94 ]
%102 = call i32 (i32, i8*, ...) @fprintf(i32 %89, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), i32 %101)
store i32 1, i32* %3
store i32 1, i32* %17
br label %251
103: ; preds = %83
br label %158
104: ; preds = %30
%105 = call i32 (...) @get_mode()
%106 = icmp eq i32 %105, 0
br i1 %106, label %107, label %112
107: ; preds = %104
%108 = load i32*, i32** @optarg
%109 = load i32, i32* @FILENAME_MAX
%110 = call i32 @strncpy(i8* %24, i32* %108, i32 %109)
%111 = call i32 @set_mode(i32 1)
br label %127
112: ; preds = %104
%113 = load i32, i32* @stderr
%114 = call i32 (...) @get_mode()
%115 = and i32 %114, 2
%116 = icmp ne i32 %115, 0
br i1 %116, label %117, label %118
117: ; preds = %112
br label %124
118: ; preds = %112
%119 = call i32 (...) @get_mode()
%120 = and i32 %119, 4
%121 = icmp ne i32 %120, 0
%122 = zext i1 %121 to i64
%123 = select i1 %121, i32 116, i32 114
br label %124
124: ; preds = %118, %117
%125 = phi i32 [ 73, %117 ], [ %123, %118 ]
%126 = call i32 (i32, i8*, ...) @fprintf(i32 %113, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i32 %125)
store i32 1, i32* %3
store i32 1, i32* %17
br label %251
127: ; preds = %107
br label %158
128: ; preds = %30
%129 = call i32 (...) @get_mode()
%130 = icmp eq i32 %129, 0
br i1 %130, label %134, label %131
131: ; preds = %128
%132 = call i32 (...) @get_mode()
%133 = icmp eq i32 %132, 8
br i1 %133, label %134, label %136
134: ; preds = %131, %128
%135 = call i32 @set_mode(i32 4)
br label %151
136: ; preds = %131
%137 = load i32, i32* @stderr
%138 = call i32 (...) @get_mode()
%139 = and i32 %138, 2
%140 = icmp ne i32 %139, 0
br i1 %140, label %141, label %142
141: ; preds = %136
br label %148
142: ; preds = %136
%143 = call i32 (...) @get_mode()
%144 = and i32 %143, 1
%145 = icmp ne i32 %144, 0
%146 = zext i1 %145 to i64
%147 = select i1 %145, i32 83, i32 63
br label %148
148: ; preds = %142, %141
%149 = phi i32 [ 73, %141 ], [ %147, %142 ]
%150 = call i32 (i32, i8*, ...) @fprintf(i32 %137, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i32 %149)
store i32 1, i32* %3
store i32 1, i32* %17
br label %251
151: ; preds = %134
br label %158
152: ; preds = %30
br label %153
153: ; preds = %30, %152
%154 = load i8**, i8*** %5
%155 = getelementptr inbounds i8*, i8** %154, i64 0
%156 = load i8*, i8** %155
%157 = call i32 @usage(i8* %156)
store i32 1, i32* %3
store i32 1, i32* %17
br label %251
158: ; preds = %151, %127, %103, %74, %46, %42, %38, %36, %34, %33, %32
br label %25
159: ; preds = %25
%160 = call i32 (...) @get_mode()
%161 = and i32 %160, 8
%162 = and i32 %161, 1
%163 = icmp ne i32 %162, 0
br i1 %163, label %164, label %167
164: ; preds = %159
%165 = load i32, i32* @stderr
%166 = call i32 (i32, i8*, ...) @fprintf(i32 %165, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0))
store i32 1, i32* %3
store i32 1, i32* %17
br label %251
167: ; preds = %159
%168 = load i8, i8* %15
%169 = call i32 @setup_sqlite(i8 signext %168)
%170 = call i32 (...) @get_mode()
%171 = and i32 %170, 2
%172 = icmp ne i32 %171, 0
br i1 %172, label %173, label %175
173: ; preds = %167
%174 = call i32 @load_index(i8* %21)
br label %175
175: ; preds = %173, %167
%176 = call i32 (...) @get_mode()
%177 = and i32 %176, 1
%178 = icmp ne i32 %177, 0
br i1 %178, label %179, label %181
179: ; preds = %175
%180 = call i32 @load_stop(i8* %24)
br label %181
181: ; preds = %179, %175
%182 = load i32, i32* @optind
store i32 %182, i32* %6
br label %183
183: ; preds = %212, %181
%184 = load i32, i32* %6
%185 = load i32, i32* %4
%186 = icmp slt i32 %184, %185
br i1 %186, label %187, label %215
187: ; preds = %183
%188 = load i8**, i8*** %5
%189 = load i32, i32* %6
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds i8*, i8** %188, i64 %190
%192 = load i8*, i8** %191
%193 = call i32 @process_pptx(i8* %192)
store i32 %193, i32* %8
%194 = load i32, i32* %8
%195 = icmp slt i32 %194, 0
br i1 %195, label %196, label %199
196: ; preds = %187
%197 = load i32, i32* @EXIT_FAILURE
%198 = call i32 @exit(i32 %197)
unreachable
199: ; preds = %187
%200 = load i32, i32* %8
%201 = load i32, i32* %7
%202 = add nsw i32 %201, %200
store i32 %202, i32* %7
%203 = load i32, i32* @stderr
%204 = load i32, i32* %8
%205 = load i32, i32* %8
%206 = icmp eq i32 %205, 1
%207 = zext i1 %206 to i64
%208 = select i1 %206, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0)
%209 = call i32 (i32, i8*, ...) @fprintf(i32 %203, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i32 %204, i8* %208)
%210 = load i32, i32* @stderr
%211 = call i32 @fflush(i32 %210)
br label %212
212: ; preds = %199
%213 = load i32, i32* %6
%214 = add nsw i32 %213, 1
store i32 %214, i32* %6
br label %183
215: ; preds = %183
%216 = load i32, i32* %7
%217 = icmp sgt i32 %216, 0
br i1 %217, label %218, label %242
218: ; preds = %215
%219 = load i32, i32* @stderr
%220 = load i32, i32* %7
%221 = call i32 (i32, i8*, ...) @fprintf(i32 %219, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i32 %220)
%222 = load i32, i32* @stderr
%223 = call i32 @fflush(i32 %222)
%224 = call i32 (...) @get_mode()
switch i32 %224, label %231 [
i32 0, label %225
i32 1, label %225
]
225: ; preds = %218, %218
%226 = load i32, i32* @stderr
%227 = call i32 (i32, i8*, ...) @fprintf(i32 %226, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.13, i64 0, i64 0))
%228 = call i32 (...) @stem_words()
%229 = call i32 (...) @remove_words()
%230 = call i32 (...) @generate_list()
br label %241
231: ; preds = %218
%232 = load i8, i8* %16
%233 = icmp ne i8 %232, 0
br i1 %233, label %237, label %234
234: ; preds = %231
%235 = load i8, i8* %15
%236 = call i32 @generate_index(i8 signext %235)
br label %240
237: ; preds = %231
%238 = load i8, i8* %15
%239 = call i32 @check_typos(i8 signext %238)
br label %240
240: ; preds = %237, %234
br label %241
241: ; preds = %240, %225
br label %247
242: ; preds = %215
%243 = load i8**, i8*** %5
%244 = getelementptr inbounds i8*, i8** %243, i64 0
%245 = load i8*, i8** %244
%246 = call i32 @usage(i8* %245)
br label %247
247: ; preds = %242, %241
%248 = call i32 (...) @free_trees()
%249 = load i32, i32* @EXIT_SUCCESS
%250 = call i32 @exit(i32 %249)
unreachable
251: ; preds = %164, %153, %148, %124, %100, %67
%252 = load i8*, i8** %10
%253 = load i32, i32* %3
ret i32 %253
}

LLVM IR (-O2):
@FILENAME_MAX = global i32 0
@.str = [17 x i8] c"fxrI:tS:s:p:k:dw\00"
@optarg = global i32* null
@.str.1 = [4 x i8] c"%hd\00"
@stderr = global i32 0
@.str.2 = [43 x i8] c"-p must be followed by a positive integer\0A\00"
@.str.3 = [44 x i8] c"(number of slides per page in the handout)\0A\00"
@.str.4 = [48 x i8] c"This number can only be one of 1,2,3,4,6 or 9.\0A\00"
@.str.5 = [36 x i8] c"Option -I is incompatible with -%c\0A\00"
@.str.6 = [36 x i8] c"Option -S is incompatible with -%c\0A\00"
@.str.7 = [36 x i8] c"Option -t is incompatible with -%c\0A\00"
@optind = global i32 0
@EXIT_FAILURE = global i32 0
@.str.9 = [12 x i8] c"%d slide%s\0A\00"
@.str.10 = [1 x i8] zeroinitializer
@.str.11 = [2 x i8] c"s\00"
@.str.12 = [19 x i8] c"Total: %4d slides\0A\00"
@.str.13 = [32 x i8] c"Stemming and cleaning up words\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i16
%4 = load i32, i32* @FILENAME_MAX
%5 = zext i32 %4 to i64
%6 = alloca i8, i64 %5
%7 = alloca i8, i64 %5
%8 = bitcast i16* %3 to i8*
store i16 0, i16* %3
br label %9
9: ; preds = %13, %2
%10 = phi i8 [ 0, %2 ], [ %14, %13 ]
%11 = phi i8 [ 0, %2 ], [ %15, %13 ]
%12 = call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
switch i32 %12, label %115 [
i32 -1, label %118
i32 120, label %13
i32 119, label %16
i32 100, label %17
i32 102, label %19
i32 107, label %21
i32 115, label %25
i32 114, label %29
i32 112, label %31
i32 73, label %49
i32 83, label %73
i32 116, label %94
]
13: ; preds = %9, %100, %76, %55, %47, %29, %25, %21, %19, %17, %16
%14 = phi i8 [ %10, %100 ], [ %10, %76 ], [ %10, %55 ], [ %10, %47 ], [ %10, %29 ], [ %10, %25 ], [ %10, %21 ], [ %10, %19 ], [ %10, %17 ], [ %10, %16 ], [ 1, %9 ]
%15 = phi i8 [ %11, %100 ], [ %11, %76 ], [ %11, %55 ], [ %11, %47 ], [ %11, %29 ], [ %11, %25 ], [ %11, %21 ], [ %11, %19 ], [ %11, %17 ], [ 1, %16 ], [ %11, %9 ]
br label %9
16: ; preds = %9
br label %13
17: ; preds = %9
%18 = call i32 (...) @disable_autokw()
br label %13
19: ; preds = %9
%20 = call i32 (...) @enable_autofunc()
br label %13
21: ; preds = %9
%22 = load i32*, i32** @optarg
%23 = load i32, i32* %22
%24 = call i32 @set_kw(i32 %23)
br label %13
25: ; preds = %9
%26 = load i32*, i32** @optarg
%27 = load i32, i32* %26
%28 = call i32 @set_sep(i32 %27)
br label %13
29: ; preds = %9
%30 = call i32 @set_mode(i32 8)
br label %13
31: ; preds = %9
%32 = load i32*, i32** @optarg
%33 = call i32 @sscanf(i32* %32, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i16* %3)
%34 = icmp eq i32 %33, 0
br i1 %34, label %40, label %35
35: ; preds = %31
%36 = load i16, i16* %3
%37 = sext i16 %36 to i32
switch i32 %37, label %40 [
i32 1, label %38
i32 2, label %38
i32 3, label %38
i32 4, label %38
i32 6, label %38
i32 9, label %38
]
38: ; preds = %35, %35, %35, %35, %35, %35
%39 = icmp sgt i16 %36, 0
br i1 %39, label %47, label %40
40: ; preds = %35, %31, %38
%41 = load i32, i32* @stderr
%42 = call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
%43 = load i32, i32* @stderr
%44 = call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
%45 = load i32, i32* @stderr
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0))
br label %186
47: ; preds = %38
%48 = call i32 @set_pages(i16 signext %36)
br label %13
49: ; preds = %9
%50 = call i32 (...) @get_mode()
%51 = icmp eq i32 %50, 0
br i1 %51, label %55, label %52
52: ; preds = %49
%53 = call i32 (...) @get_mode()
%54 = icmp eq i32 %53, 8
br i1 %54, label %55, label %60
55: ; preds = %52, %49
%56 = load i32*, i32** @optarg
%57 = load i32, i32* @FILENAME_MAX
%58 = call i32 @strncpy(i8* %6, i32* %56, i32 %57)
%59 = call i32 @set_mode(i32 2)
br label %13
60: ; preds = %52
%61 = load i32, i32* @stderr
%62 = call i32 (...) @get_mode()
%63 = and i32 %62, 1
%64 = icmp eq i32 %63, 0
br i1 %64, label %65, label %70
65: ; preds = %60
%66 = call i32 (...) @get_mode()
%67 = and i32 %66, 4
%68 = icmp eq i32 %67, 0
%69 = select i1 %68, i32 63, i32 116
br label %70
70: ; preds = %60, %65
%71 = phi i32 [ %69, %65 ], [ 83, %60 ]
%72 = call i32 (i32, i8*, ...) @fprintf(i32 %61, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), i32 %71)
br label %186
73: ; preds = %9
%74 = call i32 (...) @get_mode()
%75 = icmp eq i32 %74, 0
br i1 %75, label %76, label %81
76: ; preds = %73
%77 = load i32*, i32** @optarg
%78 = load i32, i32* @FILENAME_MAX
%79 = call i32 @strncpy(i8* %7, i32* %77, i32 %78)
%80 = call i32 @set_mode(i32 1)
br label %13
81: ; preds = %73
%82 = load i32, i32* @stderr
%83 = call i32 (...) @get_mode()
%84 = and i32 %83, 2
%85 = icmp eq i32 %84, 0
br i1 %85, label %86, label %91
86: ; preds = %81
%87 = call i32 (...) @get_mode()
%88 = and i32 %87, 4
%89 = icmp eq i32 %88, 0
%90 = select i1 %89, i32 114, i32 116
br label %91
91: ; preds = %81, %86
%92 = phi i32 [ %90, %86 ], [ 73, %81 ]
%93 = call i32 (i32, i8*, ...) @fprintf(i32 %82, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i32 %92)
br label %186
94: ; preds = %9
%95 = call i32 (...) @get_mode()
%96 = icmp eq i32 %95, 0
br i1 %96, label %100, label %97
97: ; preds = %94
%98 = call i32 (...) @get_mode()
%99 = icmp eq i32 %98, 8
br i1 %99, label %100, label %102
100: ; preds = %97, %94
%101 = call i32 @set_mode(i32 4)
br label %13
102: ; preds = %97
%103 = load i32, i32* @stderr
%104 = call i32 (...) @get_mode()
%105 = and i32 %104, 2
%106 = icmp eq i32 %105, 0
br i1 %106, label %107, label %112
107: ; preds = %102
%108 = call i32 (...) @get_mode()
%109 = and i32 %108, 1
%110 = icmp eq i32 %109, 0
%111 = select i1 %110, i32 63, i32 83
br label %112
112: ; preds = %102, %107
%113 = phi i32 [ %111, %107 ], [ 73, %102 ]
%114 = call i32 (i32, i8*, ...) @fprintf(i32 %103, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i32 %113)
br label %186
115: ; preds = %9
%116 = load i8*, i8** %1
%117 = call i32 @usage(i8* %116)
br label %186
118: ; preds = %9
%119 = call i32 (...) @get_mode()
%120 = call i32 @setup_sqlite(i8 signext %10)
%121 = call i32 (...) @get_mode()
%122 = and i32 %121, 2
%123 = icmp eq i32 %122, 0
br i1 %123, label %126, label %124
124: ; preds = %118
%125 = call i32 @load_index(i8* %6)
br label %126
126: ; preds = %124, %118
%127 = call i32 (...) @get_mode()
%128 = and i32 %127, 1
%129 = icmp eq i32 %128, 0
br i1 %129, label %132, label %130
130: ; preds = %126
%131 = call i32 @load_stop(i8* %7)
br label %132
132: ; preds = %130, %126
%133 = load i32, i32* @optind
%134 = icmp slt i32 %133, %0
br i1 %134, label %135, label %179
135: ; preds = %132
%136 = sext i32 %133 to i64
br label %137
137: ; preds = %135, %147
%138 = phi i64 [ %136, %135 ], [ %155, %147 ]
%139 = phi i32 [ 0, %135 ], [ %148, %147 ]
%140 = getelementptr inbounds i8*, i8** %1, i64 %138
%141 = load i8*, i8** %140
%142 = call i32 @process_pptx(i8* %141)
%143 = icmp slt i32 %142, 0
br i1 %143, label %144, label %147
144: ; preds = %137
%145 = load i32, i32* @EXIT_FAILURE
%146 = call i32 @exit(i32 %145)
unreachable
147: ; preds = %137
%148 = add nsw i32 %142, %139
%149 = load i32, i32* @stderr
%150 = icmp eq i32 %142, 1
%151 = select i1 %150, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0)
%152 = call i32 (i32, i8*, ...) @fprintf(i32 %149, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i32 %142, i8* %151)
%153 = load i32, i32* @stderr
%154 = call i32 @fflush(i32 %153)
%155 = add nsw i64 %138, 1
%156 = trunc i64 %155 to i32
%157 = icmp eq i32 %156, %0
br i1 %157, label %158, label %137
158: ; preds = %147
%159 = icmp sgt i32 %148, 0
br i1 %159, label %160, label %179
160: ; preds = %158
%161 = load i32, i32* @stderr
%162 = call i32 (i32, i8*, ...) @fprintf(i32 %161, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i32 %148)
%163 = load i32, i32* @stderr
%164 = call i32 @fflush(i32 %163)
%165 = call i32 (...) @get_mode()
%166 = icmp ult i32 %165, 2
br i1 %166, label %167, label %173
167: ; preds = %160
%168 = load i32, i32* @stderr
%169 = call i32 (i32, i8*, ...) @fprintf(i32 %168, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.13, i64 0, i64 0))
%170 = call i32 (...) @stem_words()
%171 = call i32 (...) @remove_words()
%172 = call i32 (...) @generate_list()
br label %182
173: ; preds = %160
%174 = icmp eq i8 %11, 0
br i1 %174, label %175, label %177
175: ; preds = %173
%176 = call i32 @generate_index(i8 signext %10)
br label %182
177: ; preds = %173
%178 = call i32 @check_typos(i8 signext %10)
br label %182
179: ; preds = %132, %158
%180 = load i8*, i8** %1
%181 = call i32 @usage(i8* %180)
br label %182
182: ; preds = %167, %177, %175, %179
%183 = call i32 (...) @free_trees()
%184 = load i32, i32* @EXIT_SUCCESS
%185 = call i32 @exit(i32 %184)
unreachable
186: ; preds = %115, %112, %91, %70, %40
ret i32 1
}