#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 */
struct inotify_event {
  int wd;
  int mask;
  int cookie;
  int len;
  char *name;
};
typedef int ssize_t;
typedef int /*<<< orphan*/ event_buf;

/* Variables and functions */
scalar_t__ EINTR;
int EOF;
int IN_ALL_EVENTS;
int IN_MODIFY;
int /*<<< orphan*/ O_RDONLY;
int atoi(int /*<<< orphan*/);
int /*<<< orphan*/ close(int);
scalar_t__ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
int getopt(int, char **, char *);
int inotify_add_watch(int, char *, int);
int inotify_init();
char *malloc(int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ optarg;
int optind;
int optopt;
int /*<<< orphan*/ printf(char *, ...);
int read(int, char *, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *strerror(scalar_t__);
int strlen(char *);
int strtol(int /*<<< orphan*/, int /*<<< orphan*/ *, int /*<<< orphan*/);
int notify_main(int argc, char *argv[]) {
  int c;
  int nfd, ffd;
  int res;
  char event_buf[512];
  struct inotify_event *event;
  int event_mask = IN_ALL_EVENTS;
  int event_count = 1;
  int print_files = 0;
  int verbose = 2;
  int width = 80;
  char **file_names;
  int file_count;
  int id_offset = 0;
  int i;
  char *buf;
  do {
    c = getopt(argc, argv, "m:c:pv:w:");
    if (c == EOF)
      break;
    switch (c) {
    case 'm':
      event_mask = strtol(optarg, NULL, 0);
      break;
    case 'c':
      event_count = atoi(optarg);
      break;
    case 'p':
      print_files = 1;
      break;
    case 'v':
      verbose = atoi(optarg);
      break;
    case 'w':
      width = atoi(optarg);
      break;
    case '?':
      fprintf(stderr, "%s: invalid option -%c\n", argv[0], optopt);
      exit(1);
    }
  } while (1);
  if (argc <= optind) {
    fprintf(stderr,
            "Usage: %s [-m eventmask] [-c count] [-p] [-v verbosity] path "
            "[path ...]\n",
            argv[0]);
    return 1;
  }
  nfd = inotify_init();
  if (nfd < 0) {
    fprintf(stderr, "inotify_init failed, %s\n", strerror(errno));
    return 1;
  }
  file_names = argv + optind;
  file_count = argc - optind;
  for (i = 0; i < file_count; i++) {
    res = inotify_add_watch(nfd, file_names[i], event_mask);
    if (res < 0) {
      fprintf(stderr, "inotify_add_watch failed for %s, %s\n", file_names[i],
              strerror(errno));
      return 1;
    }
    if (i == 0)
      id_offset = -res;
    if (res + id_offset != i) {
      fprintf(stderr, "%s got unexpected id %d instead of %d\n", file_names[i],
              res, i);
      return 1;
    }
  }
  buf = malloc(width + 2);
  while (1) {
    int event_pos = 0;
    res = read(nfd, event_buf, sizeof(event_buf));
    if (res < (int)sizeof(*event)) {
      if (errno == EINTR)
        continue;
      fprintf(stderr, "could not get event, %s\n", strerror(errno));
      return 1;
    }
    while (res >= (int)sizeof(*event)) {
      int event_size;
      event = (struct inotify_event *)(event_buf + event_pos);
      if (verbose >= 2)
        printf("%s: %08x %08x \"%s\"\n", file_names[event->wd + id_offset],
               event->mask, event->cookie, event->len ? event->name : "");
      else if (verbose >= 2)
        printf("%s: %08x \"%s\"\n", file_names[event->wd + id_offset],
               event->mask, event->len ? event->name : "");
      else if (verbose >= 1)
        printf("%d: %08x \"%s\"\n", event->wd, event->mask,
               event->len ? event->name : "");
      if (print_files && (event->mask & IN_MODIFY)) {
        char filename[512];
        ssize_t read_len;
        char *display_name;
        int buflen;
        strcpy(filename, file_names[event->wd + id_offset]);
        if (event->len) {
          strcat(filename, "/");
          strcat(filename, event->name);
        }
        ffd = open(filename, O_RDONLY);
        display_name =
            (verbose >= 2 || event->len == 0) ? filename : event->name;
        buflen = width - strlen(display_name);
        read_len = read(ffd, buf, buflen);
        if (read_len > 0) {
          if (read_len < buflen && buf[read_len - 1] != '\n') {
            buf[read_len] = '\n';
            read_len++;
          }
          if (read_len == buflen) {
            buf[--read_len] = '\0';
            buf[--read_len] = '\n';
            buf[--read_len] = '.';
            buf[--read_len] = '.';
            buf[--read_len] = '.';
          } else {
            buf[read_len] = '\0';
          }
          printf("%s: %s", display_name, buf);
        }
        close(ffd);
      }
      if (event_count && --event_count == 0)
        return 0;
      event_size = sizeof(*event) + event->len;
      res -= event_size;
      event_pos += event_size;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<notify_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x500,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2d7f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x22c(%rbp)
movl   $0x1,-0x230(%rbp)
movl   $0x0,-0x234(%rbp)
movl   $0x2,-0x238(%rbp)
movl   $0x50,-0x23c(%rbp)
movl   $0x0,-0x250(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe83(%rip),%rdx
call   10e0 <getopt@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2d55(%rip),%rcx
cmp    (%rcx),%eax
jne    1280 <notify_main+0x80>
jmp    136d <notify_main+0x16d>
mov    -0x14(%rbp),%eax
add    $0xffffffc1,%eax
mov    %eax,%ecx
mov    %rcx,-0x490(%rbp)
sub    $0x38,%eax
ja     1359 <notify_main+0x159>
mov    -0x490(%rbp),%rax
lea    0xd5a(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2d42(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1090 <strtol@plt>
mov    %eax,-0x22c(%rbp)
jmp    1359 <notify_main+0x159>
mov    0x2d23(%rip),%rax
mov    (%rax),%edi
call   10f0 <atoi@plt>
mov    %eax,-0x230(%rbp)
jmp    1359 <notify_main+0x159>
movl   $0x1,-0x234(%rbp)
jmp    1359 <notify_main+0x159>
mov    0x2cfb(%rip),%rax
mov    (%rax),%edi
call   10f0 <atoi@plt>
mov    %eax,-0x238(%rbp)
jmp    1359 <notify_main+0x159>
mov    0x2ce2(%rip),%rax
mov    (%rax),%edi
call   10f0 <atoi@plt>
mov    %eax,-0x23c(%rbp)
jmp    1359 <notify_main+0x159>
mov    0x2c81(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    0x2c91(%rip),%rax
mov    (%rax),%ecx
lea    0xda6(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   1110 <exit@plt>
jmp    135e <notify_main+0x15e>
mov    $0x1,%al
test   $0x1,%al
jne    1253 <notify_main+0x53>
jmp    136d <notify_main+0x16d>
mov    -0x8(%rbp),%eax
mov    0x2c49(%rip),%rcx
cmp    (%rcx),%eax
jg     13a9 <notify_main+0x1a9>
mov    0x2c2a(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xd70(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1af7 <notify_main+0x8f7>
mov    $0x0,%al
call   10a0 <inotify_init@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    13fe <notify_main+0x1fe>
mov    0x2bec(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x494(%rbp)
mov    0x2bd5(%rip),%rax
mov    (%rax),%rdi
call   1120 <strerror@plt>
mov    -0x494(%rbp),%edi
mov    %rax,%rdx
lea    0xd64(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1af7 <notify_main+0x8f7>
mov    -0x10(%rbp),%rax
mov    0x2bb7(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x248(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2b9c(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x24c(%rbp)
movl   $0x0,-0x254(%rbp)
mov    -0x254(%rbp),%eax
cmp    -0x24c(%rbp),%eax
jge    155b <notify_main+0x35b>
mov    -0x18(%rbp),%edi
mov    -0x248(%rbp),%rax
movslq -0x254(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x22c(%rbp),%edx
call   10c0 <inotify_add_watch@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jge    14d6 <notify_main+0x2d6>
mov    0x2b34(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4a4(%rbp)
mov    -0x248(%rbp),%rax
movslq -0x254(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x4a0(%rbp)
mov    0x2b04(%rip),%rax
mov    (%rax),%rdi
call   1120 <strerror@plt>
mov    -0x4a4(%rbp),%edi
mov    -0x4a0(%rbp),%rdx
mov    %rax,%rcx
lea    0xca5(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1af7 <notify_main+0x8f7>
cmpl   $0x0,-0x254(%rbp)
jne    14ee <notify_main+0x2ee>
xor    %eax,%eax
sub    -0x20(%rbp),%eax
mov    %eax,-0x250(%rbp)
mov    -0x20(%rbp),%eax
add    -0x250(%rbp),%eax
cmp    -0x254(%rbp),%eax
je     1542 <notify_main+0x342>
mov    0x2aa6(%rip),%rax
mov    (%rax),%edi
mov    -0x248(%rbp),%rax
movslq -0x254(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x20(%rbp),%ecx
mov    -0x254(%rbp),%r8d
lea    0xc5e(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1af7 <notify_main+0x8f7>
jmp    1547 <notify_main+0x347>
mov    -0x254(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x254(%rbp)
jmp    1436 <notify_main+0x236>
mov    -0x23c(%rbp),%edi
add    $0x2,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x260(%rbp)
movl   $0x0,-0x264(%rbp)
mov    -0x18(%rbp),%edi
lea    -0x220(%rbp),%rsi
mov    $0x200,%edx
call   1070 <read@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x18,-0x20(%rbp)
jge    15fb <notify_main+0x3fb>
mov    0x2a06(%rip),%rax
mov    (%rax),%rax
mov    0x29f4(%rip),%rcx
cmp    (%rcx),%rax
jne    15ba <notify_main+0x3ba>
jmp    1570 <notify_main+0x370>
mov    0x29ef(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4a8(%rbp)
mov    0x29d8(%rip),%rax
mov    (%rax),%rdi
call   1120 <strerror@plt>
mov    -0x4a8(%rbp),%edi
mov    %rax,%rdx
lea    0xbcc(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1af7 <notify_main+0x8f7>
jmp    1600 <notify_main+0x400>
cmpl   $0x18,-0x20(%rbp)
jl     1af2 <notify_main+0x8f2>
lea    -0x220(%rbp),%rax
movslq -0x264(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x228(%rbp)
cmpl   $0x2,-0x238(%rbp)
jl     16db <notify_main+0x4db>
mov    -0x248(%rbp),%rax
mov    -0x228(%rbp),%rcx
mov    (%rcx),%ecx
add    -0x250(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x4b8(%rbp)
mov    -0x228(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x4b0(%rbp)
mov    -0x228(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x4ac(%rbp)
mov    -0x228(%rbp),%rax
cmpl   $0x0,0xc(%rax)
je     169b <notify_main+0x49b>
mov    -0x228(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x4c0(%rbp)
jmp    16ae <notify_main+0x4ae>
lea    0xb5c(%rip),%rax
mov    %rax,-0x4c0(%rbp)
jmp    16ae <notify_main+0x4ae>
mov    -0x4ac(%rbp),%ecx
mov    -0x4b0(%rbp),%edx
mov    -0x4b8(%rbp),%rsi
mov    -0x4c0(%rbp),%r8
lea    0xafe(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1810 <notify_main+0x610>
cmpl   $0x2,-0x238(%rbp)
jl     177e <notify_main+0x57e>
mov    -0x248(%rbp),%rax
mov    -0x228(%rbp),%rcx
mov    (%rcx),%ecx
add    -0x250(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x4d0(%rbp)
mov    -0x228(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x4c4(%rbp)
mov    -0x228(%rbp),%rax
cmpl   $0x0,0xc(%rax)
je     1744 <notify_main+0x544>
mov    -0x228(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x4d8(%rbp)
jmp    1757 <notify_main+0x557>
lea    0xab3(%rip),%rax
mov    %rax,-0x4d8(%rbp)
jmp    1757 <notify_main+0x557>
mov    -0x4c4(%rbp),%edx
mov    -0x4d0(%rbp),%rsi
mov    -0x4d8(%rbp),%rcx
lea    0xa6f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    180b <notify_main+0x60b>
cmpl   $0x1,-0x238(%rbp)
jl     1806 <notify_main+0x606>
mov    -0x228(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4e0(%rbp)
mov    -0x228(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x4dc(%rbp)
mov    -0x228(%rbp),%rax
cmpl   $0x0,0xc(%rax)
je     17d2 <notify_main+0x5d2>
mov    -0x228(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x4e8(%rbp)
jmp    17e5 <notify_main+0x5e5>
lea    0xa25(%rip),%rax
mov    %rax,-0x4e8(%rbp)
jmp    17e5 <notify_main+0x5e5>
mov    -0x4dc(%rbp),%edx
mov    -0x4e0(%rbp),%esi
mov    -0x4e8(%rbp),%rcx
lea    0x9f1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    180b <notify_main+0x60b>
jmp    1810 <notify_main+0x610>
cmpl   $0x0,-0x234(%rbp)
je     1a87 <notify_main+0x887>
mov    -0x228(%rbp),%rax
mov    0x4(%rax),%eax
mov    0x27ba(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1a87 <notify_main+0x887>
lea    -0x470(%rbp),%rdi
mov    -0x248(%rbp),%rax
mov    -0x228(%rbp),%rcx
mov    (%rcx),%ecx
add    -0x250(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
mov    -0x228(%rbp),%rax
cmpl   $0x0,0xc(%rax)
je     189d <notify_main+0x69d>
lea    -0x470(%rbp),%rdi
lea    0x97e(%rip),%rsi
call   1100 <strcat@plt>
lea    -0x470(%rbp),%rdi
mov    -0x228(%rbp),%rax
mov    0x10(%rax),%rsi
call   1100 <strcat@plt>
lea    -0x470(%rbp),%rdi
mov    0x272d(%rip),%rax
mov    (%rax),%esi
call   10d0 <open@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x2,-0x238(%rbp)
jge    18d3 <notify_main+0x6d3>
mov    -0x228(%rbp),%rax
cmpl   $0x0,0xc(%rax)
jne    18e6 <notify_main+0x6e6>
lea    -0x470(%rbp),%rax
mov    %rax,-0x4f0(%rbp)
jmp    18f8 <notify_main+0x6f8>
mov    -0x228(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x4f0(%rbp)
mov    -0x4f0(%rbp),%rax
mov    %rax,-0x480(%rbp)
mov    -0x23c(%rbp),%eax
mov    %eax,-0x4f4(%rbp)
mov    -0x480(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x4f4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x484(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x260(%rbp),%rsi
mov    -0x484(%rbp),%edx
call   1070 <read@plt>
mov    %eax,-0x474(%rbp)
cmpl   $0x0,-0x474(%rbp)
jle    1a7f <notify_main+0x87f>
mov    -0x474(%rbp),%eax
cmp    -0x484(%rbp),%eax
jge    19a9 <notify_main+0x7a9>
mov    -0x260(%rbp),%rax
mov    -0x474(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
je     19a9 <notify_main+0x7a9>
mov    -0x260(%rbp),%rax
movslq -0x474(%rbp),%rcx
movb   $0xa,(%rax,%rcx,1)
mov    -0x474(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x474(%rbp)
mov    -0x474(%rbp),%eax
cmp    -0x484(%rbp),%eax
jne    1a51 <notify_main+0x851>
mov    -0x260(%rbp),%rax
mov    -0x474(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x474(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x260(%rbp),%rax
mov    -0x474(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x474(%rbp)
movslq %ecx,%rcx
movb   $0xa,(%rax,%rcx,1)
mov    -0x260(%rbp),%rax
mov    -0x474(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x474(%rbp)
movslq %ecx,%rcx
movb   $0x2e,(%rax,%rcx,1)
mov    -0x260(%rbp),%rax
mov    -0x474(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x474(%rbp)
movslq %ecx,%rcx
movb   $0x2e,(%rax,%rcx,1)
mov    -0x260(%rbp),%rax
mov    -0x474(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x474(%rbp)
movslq %ecx,%rcx
movb   $0x2e,(%rax,%rcx,1)
jmp    1a63 <notify_main+0x863>
mov    -0x260(%rbp),%rax
movslq -0x474(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x480(%rbp),%rsi
mov    -0x260(%rbp),%rdx
lea    0x789(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x1c(%rbp),%edi
call   1060 <close@plt>
cmpl   $0x0,-0x230(%rbp)
je     1ab8 <notify_main+0x8b8>
mov    -0x230(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x230(%rbp)
cmp    $0x0,%eax
jne    1ab8 <notify_main+0x8b8>
movl   $0x0,-0x4(%rbp)
jmp    1af7 <notify_main+0x8f7>
mov    -0x228(%rbp),%rax
movslq 0xc(%rax),%rax
add    $0x18,%rax
mov    %eax,-0x268(%rbp)
mov    -0x268(%rbp),%ecx
mov    -0x20(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    -0x268(%rbp),%eax
add    -0x264(%rbp),%eax
mov    %eax,-0x264(%rbp)
jmp    1600 <notify_main+0x400>
jmp    1570 <notify_main+0x370>
mov    -0x4(%rbp),%eax
add    $0x500,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<notify_main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x448,%rsp
mov    %rsi,%r15
mov    %edi,%ebx
mov    0x2d7b(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x18(%rsp)
lea    0xeba(%rip),%rdx
call   10e0 <getopt@plt>
mov    0x2d92(%rip),%r13
cmp    0x0(%r13),%eax
jne    157c <notify_main+0x37c>
movl   $0x1,0xc(%rsp)
xor    %eax,%eax
mov    %rax,0x30(%rsp)
movl   $0x2,0x8(%rsp)
mov    $0x50,%eax
mov    %rax,0x28(%rsp)
mov    0x2d58(%rip),%r14
cmp    %ebx,(%r14)
jge    162f <notify_main+0x42f>
xor    %ebp,%ebp
xor    %eax,%eax
call   10a0 <inotify_init@plt>
mov    %eax,0x24(%rsp)
test   %eax,%eax
js     1644 <notify_main+0x444>
movslq (%r14),%rax
lea    (%r15,%rax,8),%r15
sub    %eax,%ebx
test   %ebx,%ebx
mov    0x8(%rsp),%r13d
mov    0x18(%rsp),%r12d
jle    12e7 <notify_main+0xe7>
mov    %ebx,%r14d
xor    %ebx,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r15,%rbx,8),%rsi
mov    0x24(%rsp),%edi
mov    %r12d,%edx
call   10c0 <inotify_add_watch@plt>
test   %eax,%eax
js     169d <notify_main+0x49d>
mov    %eax,%ecx
neg    %ecx
test   %rbx,%rbx
cmove  %ecx,%ebp
lea    (%rax,%rbp,1),%ecx
cmp    %rcx,%rbx
jne    16d1 <notify_main+0x4d1>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    12b0 <notify_main+0xb0>
mov    %r15,0x18(%rsp)
mov    0x28(%rsp),%rax
lea    0x2(%rax),%edi
call   10b0 <malloc@plt>
mov    %rax,0x10(%rsp)
movslq %ebp,%rbx
mov    0xc(%rsp),%r15d
mov    0x30(%rsp),%r12
mov    %r13d,%ebp
mov    %rbx,0x38(%rsp)
mov    %r13d,0x8(%rsp)
mov    0x24(%rsp),%ebx
lea    0x40(%rsp),%rbp
mov    0x2c80(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    %rbp,%rsi
mov    $0x200,%edx
call   1070 <read@plt>
cmp    $0x18,%eax
jge    1358 <notify_main+0x158>
mov    (%r14),%rdi
mov    0x2c52(%rip),%rax
cmp    (%rax),%rdi
je     1330 <notify_main+0x130>
jmp    1665 <notify_main+0x465>
mov    %eax,%r13d
xor    %eax,%eax
mov    0x38(%rsp),%rbx
mov    0x8(%rsp),%ebp
jmp    138a <notify_main+0x18a>
nopl   0x0(%rax,%rax,1)
xor    %r15d,%r15d
mov    0x4c(%rsp,%r14,1),%eax
lea    0x18(%rax),%ecx
sub    %ecx,%r13d
add    %r14d,%eax
add    $0x18,%eax
cmp    $0x17,%r13d
jle    1318 <notify_main+0x118>
movslq %eax,%r14
cmp    $0x2,%ebp
jl     13e0 <notify_main+0x1e0>
movslq 0x40(%rsp,%r14,1),%rax
add    %rbx,%rax
cmpl   $0x0,0x4c(%rsp,%r14,1)
lea    0xe48(%rip),%r8
je     13ae <notify_main+0x1ae>
mov    0x50(%rsp,%r14,1),%r8
mov    0x18(%rsp),%rcx
mov    (%rcx,%rax,8),%rsi
mov    0x44(%rsp,%r14,1),%edx
mov    0x48(%rsp,%r14,1),%ecx
lea    0xe05(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1411 <notify_main+0x211>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    $0x1,%ebp
jne    1411 <notify_main+0x211>
cmpl   $0x0,0x4c(%rsp,%r14,1)
lea    0xdfd(%rip),%rcx
je     13f9 <notify_main+0x1f9>
mov    0x50(%rsp,%r14,1),%rcx
mov    0x40(%rsp,%r14,1),%esi
mov    0x44(%rsp,%r14,1),%edx
lea    0xdd7(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r12d,%r12d
je     1562 <notify_main+0x362>
mov    0x2bc7(%rip),%rax
mov    (%rax),%eax
test   %eax,0x44(%rsp,%r14,1)
je     1562 <notify_main+0x362>
mov    %r15d,0xc(%rsp)
movslq 0x40(%rsp,%r14,1),%rax
add    %rbx,%rax
mov    0x18(%rsp),%rcx
mov    (%rcx,%rax,8),%rsi
lea    0x240(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
cmpl   $0x0,0x4c(%rsp,%r14,1)
je     149c <notify_main+0x29c>
mov    %rbx,%rdi
lea    0xd8a(%rip),%rsi
call   1100 <strcat@plt>
mov    %ebp,%r12d
mov    0x50(%rsp,%r14,1),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1100 <strcat@plt>
mov    0x2b53(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   10d0 <open@plt>
mov    %eax,%r15d
cmp    $0x2,%r12d
cmovge %rbx,%rbp
jmp    14b3 <notify_main+0x2b3>
mov    0x2b35(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   10d0 <open@plt>
mov    %eax,%r15d
mov    %rbx,%rbp
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    0x28(%rsp),%r12
sub    %eax,%r12d
mov    %r15d,%edi
mov    0x10(%rsp),%rsi
mov    %r12d,%edx
call   1070 <read@plt>
test   %eax,%eax
jle    1547 <notify_main+0x347>
cmp    %r12d,%eax
jge    1525 <notify_main+0x325>
lea    -0x1(%rax),%ecx
mov    0x10(%rsp),%rdx
cmpb   $0xa,(%rdx,%rcx,1)
je     14fd <notify_main+0x2fd>
mov    %eax,%ecx
mov    0x10(%rsp),%rdx
movb   $0xa,(%rdx,%rcx,1)
mov    0x10(%rsp),%rdx
add    $0x1,%eax
cmp    %r12d,%eax
jne    152f <notify_main+0x32f>
lea    -0x1(%r12),%eax
movb   $0x0,(%rdx,%rax,1)
movslq %r12d,%rax
movw   $0xa2e,-0x3(%rax,%rdx,1)
movb   $0x2e,-0x4(%rax,%rdx,1)
add    $0xfffffffb,%r12d
movslq %r12d,%rax
mov    $0x2e,%cl
jmp    1533 <notify_main+0x333>
mov    0x10(%rsp),%rdx
cmp    %r12d,%eax
je     1502 <notify_main+0x302>
mov    %eax,%eax
xor    %ecx,%ecx
mov    %cl,(%rdx,%rax,1)
lea    0xcb5(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15d,%edi
call   1060 <close@plt>
mov    0x8(%rsp),%ebp
mov    0xc(%rsp),%r15d
mov    0x30(%rsp),%r12
mov    0x38(%rsp),%rbx
test   %r15d,%r15d
je     1370 <notify_main+0x170>
add    $0xffffffff,%r15d
jne    1373 <notify_main+0x173>
xor    %eax,%eax
jmp    168b <notify_main+0x48b>
mov    $0x50,%ecx
mov    %rcx,0x28(%rsp)
movl   $0x2,0x8(%rsp)
xor    %ecx,%ecx
mov    %rcx,0x30(%rsp)
movl   $0x1,0xc(%rsp)
lea    0xb40(%rip),%r14
lea    0xa55(%rip),%r12
mov    0x2a46(%rip),%rbp
jmp    15e7 <notify_main+0x3e7>
mov    0x0(%rbp),%edi
xor    %esi,%esi
xor    %edx,%edx
call   1090 <strtol@plt>
mov    %eax,0x18(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebx,%edi
mov    %r15,%rsi
mov    %r14,%rdx
call   10e0 <getopt@plt>
cmp    0x0(%r13),%eax
je     1261 <notify_main+0x61>
add    $0xffffffc1,%eax
cmp    $0x38,%eax
ja     15d0 <notify_main+0x3d0>
movslq (%r12,%rax,4),%rax
add    %r12,%rax
jmp    *%rax
mov    0x0(%rbp),%edi
call   10f0 <atoi@plt>
mov    %eax,0xc(%rsp)
jmp    15d0 <notify_main+0x3d0>
mov    $0x1,%eax
mov    %rax,0x30(%rsp)
jmp    15d0 <notify_main+0x3d0>
mov    0x0(%rbp),%edi
call   10f0 <atoi@plt>
mov    %eax,0x8(%rsp)
jmp    15d0 <notify_main+0x3d0>
mov    0x0(%rbp),%edi
call   10f0 <atoi@plt>
mov    %rax,0x28(%rsp)
jmp    15d0 <notify_main+0x3d0>
mov    0x297a(%rip),%rax
mov    (%rax),%edi
mov    (%r15),%rdx
lea    0xac4(%rip),%rsi
jmp    167f <notify_main+0x47f>
mov    0x2965(%rip),%rax
mov    (%rax),%ebx
mov    0x2954(%rip),%rax
mov    (%rax),%rdi
call   1120 <strerror@plt>
lea    0xaec(%rip),%rsi
jmp    167a <notify_main+0x47a>
mov    0x2944(%rip),%rax
mov    (%rax),%ebx
call   1120 <strerror@plt>
lea    0xb3a(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x1,%eax
add    $0x448,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x290c(%rip),%rax
mov    (%rax),%ebp
mov    (%r15,%rbx,8),%rbx
mov    0x28f7(%rip),%rax
mov    (%rax),%rdi
call   1120 <strerror@plt>
lea    0xaa8(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    1686 <notify_main+0x486>
mov    0x28d8(%rip),%rcx
mov    (%rcx),%edi
mov    (%r15,%rbx,8),%rdx
lea    0xaa8(%rip),%rsi
mov    %eax,%ecx
mov    %ebx,%r8d
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    1686 <notify_main+0x486>
mov    0x28b6(%rip),%rax
mov    (%rax),%edi
mov    (%r15),%rdx
mov    0x28ca(%rip),%rax
mov    (%rax),%ecx
lea    0x9df(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   1110 <exit@plt>

LLVM IR (-O0):
%struct.inotify_event = type { i32, i32, i32, i32, i8* }
@IN_ALL_EVENTS = global i32 0
@.str = [10 x i8] c"m:c:pv:w:\00"
@EOF = global i32 0
@optarg = global i32 0
@stderr = global i32 0
@.str.1 = [24 x i8] c"%s: invalid option -%c\0A\00"
@optopt = global i32 0
@optind = global i32 0
@.str.2 = [73 x i8] c"Usage: %s [-m eventmask] [-c count] [-p] [-v verbosity] path [path ...]\0A\00"
@.str.3 = [25 x i8] c"inotify_init failed, %s\0A\00"
@errno = global i64 0
@.str.4 = [37 x i8] c"inotify_add_watch failed for %s, %s\0A\00"
@.str.5 = [39 x i8] c"%s got unexpected id %d instead of %d\0A\00"
@EINTR = global i64 0
@.str.6 = [25 x i8] c"could not get event, %s\0A\00"
@.str.7 = [20 x i8] c"%s: %08x %08x \22%s\22\0A\00"
@.str.8 = [1 x i8] zeroinitializer
@.str.9 = [15 x i8] c"%s: %08x \22%s\22\0A\00"
@.str.10 = [15 x i8] c"%d: %08x \22%s\22\0A\00"
@IN_MODIFY = global i32 0
@.str.11 = [2 x i8] c"/\00"
@O_RDONLY = global i32 0
@.str.12 = [7 x i8] c"%s: %s\00"
define i32 @notify_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 [512 x i8]
%11 = alloca %struct.inotify_event*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i8**
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i8*
%22 = alloca i32
%23 = alloca i32
%24 = alloca [512 x i8]
%25 = alloca i32
%26 = alloca i8*
%27 = alloca i32
store i32 %0, i32* %4
store i8** %1, i8*** %5
%28 = load i32, i32* @IN_ALL_EVENTS
store i32 %28, i32* %12
store i32 1, i32* %13
store i32 0, i32* %14
store i32 2, i32* %15
store i32 80, i32* %16
store i32 0, i32* %19
br label %29
29: ; preds = %61, %2
%30 = load i32, i32* %4
%31 = load i8**, i8*** %5
%32 = call i32 @getopt(i32 %30, i8** %31, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i32 %32, i32* %6
%33 = load i32, i32* %6
%34 = load i32, i32* @EOF
%35 = icmp eq i32 %33, %34
br i1 %35, label %36, label %37
36: ; preds = %29
br label %62
37: ; preds = %29
%38 = load i32, i32* %6
switch i32 %38, label %60 [
i32 109, label %39
i32 99, label %42
i32 112, label %45
i32 118, label %46
i32 119, label %49
i32 63, label %52
]
39: ; preds = %37
%40 = load i32, i32* @optarg
%41 = call i32 @strtol(i32 %40, i32* null, i32 0)
store i32 %41, i32* %12
br label %60
42: ; preds = %37
%43 = load i32, i32* @optarg
%44 = call i32 @atoi(i32 %43)
store i32 %44, i32* %13
br label %60
45: ; preds = %37
store i32 1, i32* %14
br label %60
46: ; preds = %37
%47 = load i32, i32* @optarg
%48 = call i32 @atoi(i32 %47)
store i32 %48, i32* %15
br label %60
49: ; preds = %37
%50 = load i32, i32* @optarg
%51 = call i32 @atoi(i32 %50)
store i32 %51, i32* %16
br label %60
52: ; preds = %37
%53 = load i32, i32* @stderr
%54 = load i8**, i8*** %5
%55 = getelementptr inbounds i8*, i8** %54, i64 0
%56 = load i8*, i8** %55
%57 = load i32, i32* @optopt
%58 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %56, i32 %57)
%59 = call i32 @exit(i32 1)
unreachable
60: ; preds = %37, %49, %46, %45, %42, %39
br label %61
61: ; preds = %60
br i1 true, label %29, label %62
62: ; preds = %61, %36
%63 = load i32, i32* %4
%64 = load i32, i32* @optind
%65 = icmp sle i32 %63, %64
br i1 %65, label %66, label %72
66: ; preds = %62
%67 = load i32, i32* @stderr
%68 = load i8**, i8*** %5
%69 = getelementptr inbounds i8*, i8** %68, i64 0
%70 = load i8*, i8** %69
%71 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.2, i64 0, i64 0), i8* %70)
store i32 1, i32* %3
br label %399
72: ; preds = %62
%73 = call i32 (...) @inotify_init()
store i32 %73, i32* %7
%74 = load i32, i32* %7
%75 = icmp slt i32 %74, 0
br i1 %75, label %76, label %81
76: ; preds = %72
%77 = load i32, i32* @stderr
%78 = load i64, i64* @errno
%79 = call i8* @strerror(i64 %78)
%80 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %77, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* %79)
store i32 1, i32* %3
br label %399
81: ; preds = %72
%82 = load i8**, i8*** %5
%83 = load i32, i32* @optind
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i8*, i8** %82, i64 %84
store i8** %85, i8*** %17
%86 = load i32, i32* %4
%87 = load i32, i32* @optind
%88 = sub nsw i32 %86, %87
store i32 %88, i32* %18
store i32 0, i32* %20
br label %89
89: ; preds = %137, %81
%90 = load i32, i32* %20
%91 = load i32, i32* %18
%92 = icmp slt i32 %90, %91
br i1 %92, label %93, label %140
93: ; preds = %89
%94 = load i32, i32* %7
%95 = load i8**, i8*** %17
%96 = load i32, i32* %20
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i8*, i8** %95, i64 %97
%99 = load i8*, i8** %98
%100 = load i32, i32* %12
%101 = call i32 @inotify_add_watch(i32 %94, i8* %99, i32 %100)
store i32 %101, i32* %9
%102 = load i32, i32* %9
%103 = icmp slt i32 %102, 0
br i1 %103, label %104, label %114
104: ; preds = %93
%105 = load i32, i32* @stderr
%106 = load i8**, i8*** %17
%107 = load i32, i32* %20
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds i8*, i8** %106, i64 %108
%110 = load i8*, i8** %109
%111 = load i64, i64* @errno
%112 = call i8* @strerror(i64 %111)
%113 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %105, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i8* %110, i8* %112)
store i32 1, i32* %3
br label %399
114: ; preds = %93
%115 = load i32, i32* %20
%116 = icmp eq i32 %115, 0
br i1 %116, label %117, label %120
117: ; preds = %114
%118 = load i32, i32* %9
%119 = sub nsw i32 0, %118
store i32 %119, i32* %19
br label %120
120: ; preds = %117, %114
%121 = load i32, i32* %9
%122 = load i32, i32* %19
%123 = add nsw i32 %121, %122
%124 = load i32, i32* %20
%125 = icmp ne i32 %123, %124
br i1 %125, label %126, label %136
126: ; preds = %120
%127 = load i32, i32* @stderr
%128 = load i8**, i8*** %17
%129 = load i32, i32* %20
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds i8*, i8** %128, i64 %130
%132 = load i8*, i8** %131
%133 = load i32, i32* %9
%134 = load i32, i32* %20
%135 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %127, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i8* %132, i32 %133, i32 %134)
store i32 1, i32* %3
br label %399
136: ; preds = %120
br label %137
137: ; preds = %136
%138 = load i32, i32* %20
%139 = add nsw i32 %138, 1
store i32 %139, i32* %20
br label %89
140: ; preds = %89
%141 = load i32, i32* %16
%142 = add nsw i32 %141, 2
%143 = call i8* @malloc(i32 %142)
store i8* %143, i8** %21
br label %144
144: ; preds = %140, %154, %398
store i32 0, i32* %22
%145 = load i32, i32* %7
%146 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%147 = call i32 @read(i32 %145, i8* %146, i32 512)
store i32 %147, i32* %9
%148 = load i32, i32* %9
%149 = icmp slt i32 %148, 24
br i1 %149, label %150, label %160
150: ; preds = %144
%151 = load i64, i64* @errno
%152 = load i64, i64* @EINTR
%153 = icmp eq i64 %151, %152
br i1 %153, label %154, label %155
154: ; preds = %150
br label %144
155: ; preds = %150
%156 = load i32, i32* @stderr
%157 = load i64, i64* @errno
%158 = call i8* @strerror(i64 %157)
%159 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %156, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i8* %158)
store i32 1, i32* %3
br label %399
160: ; preds = %144
br label %161
161: ; preds = %385, %160
%162 = load i32, i32* %9
%163 = icmp sge i32 %162, 24
br i1 %163, label %164, label %398
164: ; preds = %161
%165 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%166 = load i32, i32* %22
%167 = sext i32 %166 to i64
%168 = getelementptr inbounds i8, i8* %165, i64 %167
%169 = bitcast i8* %168 to %struct.inotify_event*
store %struct.inotify_event* %169, %struct.inotify_event** %11
%170 = load i32, i32* %15
%171 = icmp sge i32 %170, 2
br i1 %171, label %172, label %200
172: ; preds = %164
%173 = load i8**, i8*** %17
%174 = load %struct.inotify_event*, %struct.inotify_event** %11
%175 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %174, i32 0, i32 0
%176 = load i32, i32* %175
%177 = load i32, i32* %19
%178 = add nsw i32 %176, %177
%179 = sext i32 %178 to i64
%180 = getelementptr inbounds i8*, i8** %173, i64 %179
%181 = load i8*, i8** %180
%182 = load %struct.inotify_event*, %struct.inotify_event** %11
%183 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %182, i32 0, i32 1
%184 = load i32, i32* %183
%185 = load %struct.inotify_event*, %struct.inotify_event** %11
%186 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %185, i32 0, i32 2
%187 = load i32, i32* %186
%188 = load %struct.inotify_event*, %struct.inotify_event** %11
%189 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %188, i32 0, i32 3
%190 = load i32, i32* %189
%191 = icmp ne i32 %190, 0
br i1 %191, label %192, label %196
192: ; preds = %172
%193 = load %struct.inotify_event*, %struct.inotify_event** %11
%194 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %193, i32 0, i32 4
%195 = load i8*, i8** %194
br label %197
196: ; preds = %172
br label %197
197: ; preds = %196, %192
%198 = phi i8* [ %195, %192 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i64 0, i64 0), %196 ]
%199 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* %181, i32 %184, i32 %187, i8* %198)
br label %252
200: ; preds = %164
%201 = load i32, i32* %15
%202 = icmp sge i32 %201, 2
br i1 %202, label %203, label %228
203: ; preds = %200
%204 = load i8**, i8*** %17
%205 = load %struct.inotify_event*, %struct.inotify_event** %11
%206 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %205, i32 0, i32 0
%207 = load i32, i32* %206
%208 = load i32, i32* %19
%209 = add nsw i32 %207, %208
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds i8*, i8** %204, i64 %210
%212 = load i8*, i8** %211
%213 = load %struct.inotify_event*, %struct.inotify_event** %11
%214 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %213, i32 0, i32 1
%215 = load i32, i32* %214
%216 = load %struct.inotify_event*, %struct.inotify_event** %11
%217 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %216, i32 0, i32 3
%218 = load i32, i32* %217
%219 = icmp ne i32 %218, 0
br i1 %219, label %220, label %224
220: ; preds = %203
%221 = load %struct.inotify_event*, %struct.inotify_event** %11
%222 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %221, i32 0, i32 4
%223 = load i8*, i8** %222
br label %225
224: ; preds = %203
br label %225
225: ; preds = %224, %220
%226 = phi i8* [ %223, %220 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i64 0, i64 0), %224 ]
%227 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i8* %212, i32 %215, i8* %226)
br label %251
228: ; preds = %200
%229 = load i32, i32* %15
%230 = icmp sge i32 %229, 1
br i1 %230, label %231, label %250
231: ; preds = %228
%232 = load %struct.inotify_event*, %struct.inotify_event** %11
%233 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %232, i32 0, i32 0
%234 = load i32, i32* %233
%235 = load %struct.inotify_event*, %struct.inotify_event** %11
%236 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %235, i32 0, i32 1
%237 = load i32, i32* %236
%238 = load %struct.inotify_event*, %struct.inotify_event** %11
%239 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %238, i32 0, i32 3
%240 = load i32, i32* %239
%241 = icmp ne i32 %240, 0
br i1 %241, label %242, label %246
242: ; preds = %231
%243 = load %struct.inotify_event*, %struct.inotify_event** %11
%244 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %243, i32 0, i32 4
%245 = load i8*, i8** %244
br label %247
246: ; preds = %231
br label %247
247: ; preds = %246, %242
%248 = phi i8* [ %245, %242 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i64 0, i64 0), %246 ]
%249 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0), i32 %234, i32 %237, i8* %248)
br label %250
250: ; preds = %247, %228
br label %251
251: ; preds = %250, %225
br label %252
252: ; preds = %251, %197
%253 = load i32, i32* %14
%254 = icmp ne i32 %253, 0
br i1 %254, label %255, label %377
255: ; preds = %252
%256 = load %struct.inotify_event*, %struct.inotify_event** %11
%257 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %256, i32 0, i32 1
%258 = load i32, i32* %257
%259 = load i32, i32* @IN_MODIFY
%260 = and i32 %258, %259
%261 = icmp ne i32 %260, 0
br i1 %261, label %262, label %377
262: ; preds = %255
%263 = getelementptr inbounds [512 x i8], [512 x i8]* %24, i64 0, i64 0
%264 = load i8**, i8*** %17
%265 = load %struct.inotify_event*, %struct.inotify_event** %11
%266 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %265, i32 0, i32 0
%267 = load i32, i32* %266
%268 = load i32, i32* %19
%269 = add nsw i32 %267, %268
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds i8*, i8** %264, i64 %270
%272 = load i8*, i8** %271
%273 = call i32 @strcpy(i8* %263, i8* %272)
%274 = load %struct.inotify_event*, %struct.inotify_event** %11
%275 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %274, i32 0, i32 3
%276 = load i32, i32* %275
%277 = icmp ne i32 %276, 0
br i1 %277, label %278, label %286
278: ; preds = %262
%279 = getelementptr inbounds [512 x i8], [512 x i8]* %24, i64 0, i64 0
%280 = call i32 @strcat(i8* %279, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%281 = getelementptr inbounds [512 x i8], [512 x i8]* %24, i64 0, i64 0
%282 = load %struct.inotify_event*, %struct.inotify_event** %11
%283 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %282, i32 0, i32 4
%284 = load i8*, i8** %283
%285 = call i32 @strcat(i8* %281, i8* %284)
br label %286
286: ; preds = %278, %262
%287 = getelementptr inbounds [512 x i8], [512 x i8]* %24, i64 0, i64 0
%288 = load i32, i32* @O_RDONLY
%289 = call i32 @open(i8* %287, i32 %288)
store i32 %289, i32* %8
%290 = load i32, i32* %15
%291 = icmp sge i32 %290, 2
br i1 %291, label %297, label %292
292: ; preds = %286
%293 = load %struct.inotify_event*, %struct.inotify_event** %11
%294 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %293, i32 0, i32 3
%295 = load i32, i32* %294
%296 = icmp eq i32 %295, 0
br i1 %296, label %297, label %299
297: ; preds = %292, %286
%298 = getelementptr inbounds [512 x i8], [512 x i8]* %24, i64 0, i64 0
br label %303
299: ; preds = %292
%300 = load %struct.inotify_event*, %struct.inotify_event** %11
%301 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %300, i32 0, i32 4
%302 = load i8*, i8** %301
br label %303
303: ; preds = %299, %297
%304 = phi i8* [ %298, %297 ], [ %302, %299 ]
store i8* %304, i8** %26
%305 = load i32, i32* %16
%306 = load i8*, i8** %26
%307 = call i32 @strlen(i8* %306)
%308 = sub nsw i32 %305, %307
store i32 %308, i32* %27
%309 = load i32, i32* %8
%310 = load i8*, i8** %21
%311 = load i32, i32* %27
%312 = call i32 @read(i32 %309, i8* %310, i32 %311)
store i32 %312, i32* %25
%313 = load i32, i32* %25
%314 = icmp sgt i32 %313, 0
br i1 %314, label %315, label %374
315: ; preds = %303
%316 = load i32, i32* %25
%317 = load i32, i32* %27
%318 = icmp slt i32 %316, %317
br i1 %318, label %319, label %335
319: ; preds = %315
%320 = load i8*, i8** %21
%321 = load i32, i32* %25
%322 = sub nsw i32 %321, 1
%323 = sext i32 %322 to i64
%324 = getelementptr inbounds i8, i8* %320, i64 %323
%325 = load i8, i8* %324
%326 = sext i8 %325 to i32
%327 = icmp ne i32 %326, 10
br i1 %327, label %328, label %335
328: ; preds = %319
%329 = load i8*, i8** %21
%330 = load i32, i32* %25
%331 = sext i32 %330 to i64
%332 = getelementptr inbounds i8, i8* %329, i64 %331
store i8 10, i8* %332
%333 = load i32, i32* %25
%334 = add nsw i32 %333, 1
store i32 %334, i32* %25
br label %335
335: ; preds = %328, %319, %315
%336 = load i32, i32* %25
%337 = load i32, i32* %27
%338 = icmp eq i32 %336, %337
br i1 %338, label %339, label %365
339: ; preds = %335
%340 = load i8*, i8** %21
%341 = load i32, i32* %25
%342 = add nsw i32 %341, -1
store i32 %342, i32* %25
%343 = sext i32 %342 to i64
%344 = getelementptr inbounds i8, i8* %340, i64 %343
store i8 0, i8* %344
%345 = load i8*, i8** %21
%346 = load i32, i32* %25
%347 = add nsw i32 %346, -1
store i32 %347, i32* %25
%348 = sext i32 %347 to i64
%349 = getelementptr inbounds i8, i8* %345, i64 %348
store i8 10, i8* %349
%350 = load i8*, i8** %21
%351 = load i32, i32* %25
%352 = add nsw i32 %351, -1
store i32 %352, i32* %25
%353 = sext i32 %352 to i64
%354 = getelementptr inbounds i8, i8* %350, i64 %353
store i8 46, i8* %354
%355 = load i8*, i8** %21
%356 = load i32, i32* %25
%357 = add nsw i32 %356, -1
store i32 %357, i32* %25
%358 = sext i32 %357 to i64
%359 = getelementptr inbounds i8, i8* %355, i64 %358
store i8 46, i8* %359
%360 = load i8*, i8** %21
%361 = load i32, i32* %25
%362 = add nsw i32 %361, -1
store i32 %362, i32* %25
%363 = sext i32 %362 to i64
%364 = getelementptr inbounds i8, i8* %360, i64 %363
store i8 46, i8* %364
br label %370
365: ; preds = %335
%366 = load i8*, i8** %21
%367 = load i32, i32* %25
%368 = sext i32 %367 to i64
%369 = getelementptr inbounds i8, i8* %366, i64 %368
store i8 0, i8* %369
br label %370
370: ; preds = %365, %339
%371 = load i8*, i8** %26
%372 = load i8*, i8** %21
%373 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i8* %371, i8* %372)
br label %374
374: ; preds = %370, %303
%375 = load i32, i32* %8
%376 = call i32 @close(i32 %375)
br label %377
377: ; preds = %374, %255, %252
%378 = load i32, i32* %13
%379 = icmp ne i32 %378, 0
br i1 %379, label %380, label %385
380: ; preds = %377
%381 = load i32, i32* %13
%382 = add nsw i32 %381, -1
store i32 %382, i32* %13
%383 = icmp eq i32 %382, 0
br i1 %383, label %384, label %385
384: ; preds = %380
store i32 0, i32* %3
br label %399
385: ; preds = %380, %377
%386 = load %struct.inotify_event*, %struct.inotify_event** %11
%387 = getelementptr inbounds %struct.inotify_event, %struct.inotify_event* %386, i32 0, i32 3
%388 = load i32, i32* %387
%389 = sext i32 %388 to i64
%390 = add i64 24, %389
%391 = trunc i64 %390 to i32
store i32 %391, i32* %23
%392 = load i32, i32* %23
%393 = load i32, i32* %9
%394 = sub nsw i32 %393, %392
store i32 %394, i32* %9
%395 = load i32, i32* %23
%396 = load i32, i32* %22
%397 = add nsw i32 %396, %395
store i32 %397, i32* %22
br label %161
398: ; preds = %161
br label %144
399: ; preds = %384, %155, %126, %104, %76, %66
%400 = load i32, i32* %3
ret i32 %400
}

LLVM IR (-O2):
@IN_ALL_EVENTS = global i32 0
@.str = [10 x i8] c"m:c:pv:w:\00"
@EOF = global i32 0
@optarg = global i32 0
@stderr = global i32 0
@.str.1 = [24 x i8] c"%s: invalid option -%c\0A\00"
@optopt = global i32 0
@optind = global i32 0
@.str.2 = [73 x i8] c"Usage: %s [-m eventmask] [-c count] [-p] [-v verbosity] path [path ...]\0A\00"
@.str.3 = [25 x i8] c"inotify_init failed, %s\0A\00"
@errno = global i64 0
@.str.4 = [37 x i8] c"inotify_add_watch failed for %s, %s\0A\00"
@.str.5 = [39 x i8] c"%s got unexpected id %d instead of %d\0A\00"
@EINTR = global i64 0
@.str.6 = [25 x i8] c"could not get event, %s\0A\00"
@.str.7 = [20 x i8] c"%s: %08x %08x \22%s\22\0A\00"
@.str.8 = [1 x i8] zeroinitializer
@.str.10 = [15 x i8] c"%d: %08x \22%s\22\0A\00"
@IN_MODIFY = global i32 0
@.str.11 = [2 x i8] c"/\00"
@O_RDONLY = global i32 0
@.str.12 = [7 x i8] c"%s: %s\00"
define i32 @notify_main(i32 %0, i8** %1) {
%3 = alloca [512 x i8]
%4 = alloca [512 x i8]
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%6 = load i32, i32* @IN_ALL_EVENTS
%7 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EOF
%9 = icmp eq i32 %7, %8
br i1 %9, label %45, label %10
10: ; preds = %2, %36
%11 = phi i32 [ %42, %36 ], [ %7, %2 ]
%12 = phi i32 [ %41, %36 ], [ %6, %2 ]
%13 = phi i32 [ %40, %36 ], [ 1, %2 ]
%14 = phi i32 [ %39, %36 ], [ 0, %2 ]
%15 = phi i32 [ %38, %36 ], [ 2, %2 ]
%16 = phi i32 [ %37, %36 ], [ 80, %2 ]
switch i32 %11, label %36 [
i32 109, label %17
i32 99, label %20
i32 112, label %23
i32 118, label %24
i32 119, label %27
i32 63, label %30
]
17: ; preds = %10
%18 = load i32, i32* @optarg
%19 = tail call i32 @strtol(i32 %18, i32* null, i32 0)
br label %36
20: ; preds = %10
%21 = load i32, i32* @optarg
%22 = tail call i32 @atoi(i32 %21)
br label %36
23: ; preds = %10
br label %36
24: ; preds = %10
%25 = load i32, i32* @optarg
%26 = tail call i32 @atoi(i32 %25)
br label %36
27: ; preds = %10
%28 = load i32, i32* @optarg
%29 = tail call i32 @atoi(i32 %28)
br label %36
30: ; preds = %10
%31 = load i32, i32* @stderr
%32 = load i8*, i8** %1
%33 = load i32, i32* @optopt
%34 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %32, i32 %33)
%35 = tail call i32 @exit(i32 1)
unreachable
36: ; preds = %17, %20, %23, %24, %27, %10
%37 = phi i32 [ %16, %10 ], [ %29, %27 ], [ %16, %24 ], [ %16, %23 ], [ %16, %20 ], [ %16, %17 ]
%38 = phi i32 [ %15, %10 ], [ %15, %27 ], [ %26, %24 ], [ %15, %23 ], [ %15, %20 ], [ %15, %17 ]
%39 = phi i32 [ %14, %10 ], [ %14, %27 ], [ %14, %24 ], [ 1, %23 ], [ %14, %20 ], [ %14, %17 ]
%40 = phi i32 [ %13, %10 ], [ %13, %27 ], [ %13, %24 ], [ %13, %23 ], [ %22, %20 ], [ %13, %17 ]
%41 = phi i32 [ %12, %10 ], [ %12, %27 ], [ %12, %24 ], [ %12, %23 ], [ %12, %20 ], [ %19, %17 ]
%42 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%43 = load i32, i32* @EOF
%44 = icmp eq i32 %42, %43
br i1 %44, label %45, label %10
45: ; preds = %36, %2
%46 = phi i32 [ 80, %2 ], [ %37, %36 ]
%47 = phi i32 [ 2, %2 ], [ %38, %36 ]
%48 = phi i32 [ 0, %2 ], [ %39, %36 ]
%49 = phi i32 [ 1, %2 ], [ %40, %36 ]
%50 = phi i32 [ %6, %2 ], [ %41, %36 ]
%51 = load i32, i32* @optind
%52 = icmp slt i32 %51, %0
br i1 %52, label %57, label %53
53: ; preds = %45
%54 = load i32, i32* @stderr
%55 = load i8*, i8** %1
%56 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %54, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.2, i64 0, i64 0), i8* %55)
br label %266
57: ; preds = %45
%58 = tail call i32 (...) @inotify_init()
%59 = icmp slt i32 %58, 0
br i1 %59, label %60, label %65
60: ; preds = %57
%61 = load i32, i32* @stderr
%62 = load i64, i64* @errno
%63 = tail call i8* @strerror(i64 %62)
%64 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %61, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* %63)
br label %266
65: ; preds = %57
%66 = load i32, i32* @optind
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i8*, i8** %1, i64 %67
%69 = sub i32 %0, %66
%70 = icmp sgt i32 %69, 0
br i1 %70, label %71, label %105
71: ; preds = %65
%72 = zext i32 %69 to i64
br label %73
73: ; preds = %71, %102
%74 = phi i64 [ 0, %71 ], [ %103, %102 ]
%75 = phi i32 [ 0, %71 ], [ %91, %102 ]
%76 = getelementptr inbounds i8*, i8** %68, i64 %74
%77 = load i8*, i8** %76
%78 = tail call i32 @inotify_add_watch(i32 %58, i8* %77, i32 %50)
%79 = icmp slt i32 %78, 0
br i1 %79, label %80, label %88
80: ; preds = %73
%81 = and i64 %74, 4294967295
%82 = getelementptr inbounds i8*, i8** %68, i64 %81
%83 = load i32, i32* @stderr
%84 = load i8*, i8** %82
%85 = load i64, i64* @errno
%86 = tail call i8* @strerror(i64 %85)
%87 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %83, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i8* %84, i8* %86)
br label %266
88: ; preds = %73
%89 = icmp eq i64 %74, 0
%90 = sub nsw i32 0, %78
%91 = select i1 %89, i32 %90, i32 %75
%92 = add nsw i32 %91, %78
%93 = zext i32 %92 to i64
%94 = icmp eq i64 %74, %93
br i1 %94, label %102, label %95
95: ; preds = %88
%96 = trunc i64 %74 to i32
%97 = and i64 %74, 4294967295
%98 = getelementptr inbounds i8*, i8** %68, i64 %97
%99 = load i32, i32* @stderr
%100 = load i8*, i8** %98
%101 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %99, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i8* %100, i32 %78, i32 %96)
br label %266
102: ; preds = %88
%103 = add nuw nsw i64 %74, 1
%104 = icmp eq i64 %103, %72
br i1 %104, label %105, label %73
105: ; preds = %102, %65
%106 = phi i32 [ 0, %65 ], [ %91, %102 ]
%107 = add nsw i32 %46, 2
%108 = tail call i8* @malloc(i32 %107)
%109 = icmp sgt i32 %47, 1
%110 = icmp eq i32 %47, 1
%111 = icmp eq i32 %48, 0
%112 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
br label %113
113: ; preds = %257, %105
%114 = phi i32 [ %49, %105 ], [ %258, %257 ]
br label %115
115: ; preds = %113, %118
%116 = call i32 @read(i32 %58, i8* %5, i32 512)
%117 = icmp slt i32 %116, 24
br i1 %117, label %118, label %126
118: ; preds = %115
%119 = load i64, i64* @errno
%120 = load i64, i64* @EINTR
%121 = icmp eq i64 %119, %120
br i1 %121, label %115, label %122
122: ; preds = %118
%123 = load i32, i32* @stderr
%124 = call i8* @strerror(i64 %119)
%125 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %123, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i8* %124)
br label %266
126: ; preds = %115, %257
%127 = phi i32 [ %263, %257 ], [ %116, %115 ]
%128 = phi i32 [ %264, %257 ], [ 0, %115 ]
%129 = phi i32 [ %258, %257 ], [ %114, %115 ]
%130 = sext i32 %128 to i64
%131 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 %130
br i1 %109, label %132, label %156
132: ; preds = %126
%133 = bitcast i8* %131 to i32*
%134 = load i32, i32* %133
%135 = add nsw i32 %134, %106
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds i8*, i8** %68, i64 %136
%138 = load i8*, i8** %137
%139 = getelementptr inbounds i8, i8* %131, i64 4
%140 = bitcast i8* %139 to i32*
%141 = load i32, i32* %140
%142 = getelementptr inbounds i8, i8* %131, i64 8
%143 = bitcast i8* %142 to i32*
%144 = load i32, i32* %143
%145 = getelementptr inbounds i8, i8* %131, i64 12
%146 = bitcast i8* %145 to i32*
%147 = load i32, i32* %146
%148 = icmp eq i32 %147, 0
br i1 %148, label %153, label %149
149: ; preds = %132
%150 = getelementptr inbounds i8, i8* %131, i64 16
%151 = bitcast i8* %150 to i8**
%152 = load i8*, i8** %151
br label %153
153: ; preds = %132, %149
%154 = phi i8* [ %152, %149 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i64 0, i64 0), %132 ]
%155 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* %138, i32 %141, i32 %144, i8* %154)
br label %174
156: ; preds = %126
br i1 %110, label %157, label %174
157: ; preds = %156
%158 = bitcast i8* %131 to i32*
%159 = load i32, i32* %158
%160 = getelementptr inbounds i8, i8* %131, i64 4
%161 = bitcast i8* %160 to i32*
%162 = load i32, i32* %161
%163 = getelementptr inbounds i8, i8* %131, i64 12
%164 = bitcast i8* %163 to i32*
%165 = load i32, i32* %164
%166 = icmp eq i32 %165, 0
br i1 %166, label %171, label %167
167: ; preds = %157
%168 = getelementptr inbounds i8, i8* %131, i64 16
%169 = bitcast i8* %168 to i8**
%170 = load i8*, i8** %169
br label %171
171: ; preds = %157, %167
%172 = phi i8* [ %170, %167 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i64 0, i64 0), %157 ]
%173 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0), i32 %159, i32 %162, i8* %172)
br label %174
174: ; preds = %171, %156, %153
br i1 %111, label %252, label %175
175: ; preds = %174
%176 = getelementptr inbounds i8, i8* %131, i64 4
%177 = bitcast i8* %176 to i32*
%178 = load i32, i32* %177
%179 = load i32, i32* @IN_MODIFY
%180 = and i32 %179, %178
%181 = icmp eq i32 %180, 0
br i1 %181, label %252, label %182
182: ; preds = %175
%183 = bitcast i8* %131 to i32*
%184 = load i32, i32* %183
%185 = add nsw i32 %184, %106
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds i8*, i8** %68, i64 %186
%188 = load i8*, i8** %187
%189 = call i32 @strcpy(i8* %112, i8* %188)
%190 = getelementptr inbounds i8, i8* %131, i64 12
%191 = bitcast i8* %190 to i32*
%192 = load i32, i32* %191
%193 = icmp eq i32 %192, 0
br i1 %193, label %194, label %197
194: ; preds = %182
%195 = load i32, i32* @O_RDONLY
%196 = call i32 @open(i8* %112, i32 %195)
br label %206
197: ; preds = %182
%198 = call i32 @strcat(i8* %112, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%199 = getelementptr inbounds i8, i8* %131, i64 16
%200 = bitcast i8* %199 to i8**
%201 = load i8*, i8** %200
%202 = call i32 @strcat(i8* %112, i8* %201)
%203 = load i32, i32* @O_RDONLY
%204 = call i32 @open(i8* %112, i32 %203)
%205 = select i1 %109, i8* %112, i8* %201
br label %206
206: ; preds = %197, %194
%207 = phi i32 [ %196, %194 ], [ %204, %197 ]
%208 = phi i8* [ %112, %194 ], [ %205, %197 ]
%209 = call i32 @strlen(i8* %208)
%210 = sub nsw i32 %46, %209
%211 = call i32 @read(i32 %207, i8* %108, i32 %210)
%212 = icmp sgt i32 %211, 0
br i1 %212, label %213, label %250
213: ; preds = %206
%214 = icmp slt i32 %211, %210
br i1 %214, label %215, label %225
215: ; preds = %213
%216 = add nsw i32 %211, -1
%217 = zext i32 %216 to i64
%218 = getelementptr inbounds i8, i8* %108, i64 %217
%219 = load i8, i8* %218
%220 = icmp eq i8 %219, 10
br i1 %220, label %225, label %221
221: ; preds = %215
%222 = zext i32 %211 to i64
%223 = getelementptr inbounds i8, i8* %108, i64 %222
store i8 10, i8* %223
%224 = add nuw nsw i32 %211, 1
br label %225
225: ; preds = %221, %215, %213
%226 = phi i32 [ %224, %221 ], [ %211, %215 ], [ %211, %213 ]
%227 = icmp eq i32 %226, %210
br i1 %227, label %228, label %243
228: ; preds = %225
%229 = add nsw i32 %210, -1
%230 = zext i32 %229 to i64
%231 = getelementptr inbounds i8, i8* %108, i64 %230
store i8 0, i8* %231
%232 = add nsw i32 %210, -2
%233 = sext i32 %232 to i64
%234 = getelementptr inbounds i8, i8* %108, i64 %233
store i8 10, i8* %234
%235 = add nsw i32 %210, -3
%236 = sext i32 %235 to i64
%237 = getelementptr inbounds i8, i8* %108, i64 %236
store i8 46, i8* %237
%238 = add nsw i32 %210, -4
%239 = sext i32 %238 to i64
%240 = getelementptr inbounds i8, i8* %108, i64 %239
store i8 46, i8* %240
%241 = add nsw i32 %210, -5
%242 = sext i32 %241 to i64
br label %245
243: ; preds = %225
%244 = zext i32 %226 to i64
br label %245
245: ; preds = %243, %228
%246 = phi i64 [ %244, %243 ], [ %242, %228 ]
%247 = phi i8 [ 0, %243 ], [ 46, %228 ]
%248 = getelementptr inbounds i8, i8* %108, i64 %246
store i8 %247, i8* %248
%249 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i8* %208, i8* %108)
br label %250
250: ; preds = %245, %206
%251 = call i32 @close(i32 %207)
br label %252
252: ; preds = %250, %175, %174
%253 = icmp eq i32 %129, 0
br i1 %253, label %257, label %254
254: ; preds = %252
%255 = add nsw i32 %129, -1
%256 = icmp eq i32 %255, 0
br i1 %256, label %266, label %257
257: ; preds = %252, %254
%258 = phi i32 [ %255, %254 ], [ 0, %252 ]
%259 = getelementptr inbounds i8, i8* %131, i64 12
%260 = bitcast i8* %259 to i32*
%261 = load i32, i32* %260
%262 = add i32 %261, 24
%263 = sub nsw i32 %127, %262
%264 = add nsw i32 %262, %128
%265 = icmp sgt i32 %263, 23
br i1 %265, label %126, label %113
266: ; preds = %254, %122, %95, %80, %60, %53
%267 = phi i32 [ 1, %53 ], [ 1, %60 ], [ 1, %80 ], [ 1, %95 ], [ 1, %122 ], [ 0, %254 ]
ret i32 %267
}