#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ assert(int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *, char *, int);
int strlen(char *);
char *strstr(char *, char *);
int style_check(char *path) {
  char *strict = strstr(path, "/devices/");
  FILE *fp = fopen(path, "r");
  assert(fp);
  if (!fp)
    exit(EXIT_FAILURE);
  int read_errors = 0;
  int long_errors = 0;
  int crlf_errors = 0;
  int tabs_errors = 0;
  int trailing_errors = 0;
  int memc_errors = 0;
  int funbrace_errors = 0;
  int leading_tabs = 0;
  int leading_spcs = 0;
  int use_stdout = 0;
  int use_printf = 0;
  int need_cond = 0;
  char str[1024];
  while (fgets(str, 1024, fp)) {
    int len = strlen(str);
    if (len <= 0) {
      read_errors++;
      continue;
    }
    if (len >= 1024 - 1) {
      long_errors++;
    }
    if (str[len - 1] == '\r' || (len > 1 && str[len - 2] == '\r')) {
      crlf_errors++;
    }
    if (str[0] == '\t') {
      leading_tabs++;
    }
    if (len >= 4 && str[0] == ' ' && str[1] == ' ' && str[2] == ' ' &&
        str[3] == ' ') {
      leading_spcs++;
    }
    if (len > 1 && (str[len - 2] == ' ' || str[len - 2] == '\t')) {
      trailing_errors++;
    }
    if (strstr(str, "(r_device *decoder") && str[len - 2] == '{') {
      funbrace_errors++;
    }
    if (strstr(str, "stdout")) {
      use_stdout++;
    }
    char *p;
    if ((p = strstr(str, "printf"))) {
      if (p == str || p[-1] < '_' || p[-1] > 'z') {
        use_printf++;
      }
    }
    if (need_cond && !strstr(str, "if (!")) {
      memc_errors++;
    }
    need_cond = 0;
    if (strstr(str, "alloc(") && !strstr(str, "alloc()")) {
      need_cond++;
    }
    if (strstr(str, "strdup(") && !strstr(str, "strdup()")) {
      need_cond++;
    }
  }
  fclose(fp);
  if (leading_tabs && leading_spcs) {
    tabs_errors = leading_tabs > leading_spcs ? leading_spcs : leading_tabs;
  }
  if (read_errors)
    printf("File \"%s\" has %d READ errors.\n", path, read_errors);
  if (long_errors)
    printf("File \"%s\" has %d LONG line errors.\n", path, long_errors);
  if (crlf_errors)
    printf("File \"%s\" has %d CRLF errors.\n", path, crlf_errors);
  if (tabs_errors)
    printf("File \"%s\" has %d MIXED tab/spaces errors.\n", path, tabs_errors);
  if (trailing_errors)
    printf("File \"%s\" has %d TRAILING whitespace errors.\n", path,
           trailing_errors);
  if (memc_errors)
    printf("File \"%s\" has %d ALLOC check errors.\n", path, memc_errors);
  if (funbrace_errors)
    printf("File \"%s\" has %d BRACE function on newline error.\n", path,
           funbrace_errors);
  if (leading_tabs)
    printf("File \"%s\" has %d TAB indented lines.\n", path, leading_tabs);
  if (strict && use_stdout)
    printf("File \"%s\" has %d STDOUT lines.\n", path, use_stdout);
  if (strict && use_printf)
    printf("File \"%s\" has %d PRINTF lines.\n", path, use_printf);
  return read_errors + long_errors + crlf_errors + tabs_errors + leading_tabs +
         trailing_errors + funbrace_errors +
         (strict ? use_stdout + use_printf : 0) + memc_errors;
}


x86 assembly (clang, -O0):
<style_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x470,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe66(%rip),%rsi
call   10a0 <strstr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe6d(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1070 <assert@plt>
cmpq   $0x0,-0x18(%rbp)
jne    11d9 <style_check+0x59>
mov    0x2e0e(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
lea    -0x450(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x400,%esi
call   1060 <fgets@plt>
cmp    $0x0,%rax
je     1538 <style_check+0x3b8>
lea    -0x450(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x454(%rbp)
cmpl   $0x0,-0x454(%rbp)
jg     1279 <style_check+0xf9>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    122d <style_check+0xad>
cmpl   $0x3ff,-0x454(%rbp)
jl     1292 <style_check+0x112>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x454(%rbp),%eax
sub    $0x1,%eax
cltq
movsbl -0x450(%rbp,%rax,1),%eax
ff
cmp    $0xd,%eax
je     12d7 <style_check+0x157>
cmpl   $0x1,-0x454(%rbp)
jle    12e0 <style_check+0x160>
mov    -0x454(%rbp),%eax
sub    $0x2,%eax
cltq
movsbl -0x450(%rbp,%rax,1),%eax
ff
cmp    $0xd,%eax
jne    12e0 <style_check+0x160>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
movsbl -0x450(%rbp),%eax
cmp    $0x9,%eax
jne    12f9 <style_check+0x179>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
cmpl   $0x4,-0x454(%rbp)
jl     134f <style_check+0x1cf>
movsbl -0x450(%rbp),%eax
cmp    $0x20,%eax
jne    134f <style_check+0x1cf>
movsbl -0x44f(%rbp),%eax
cmp    $0x20,%eax
jne    134f <style_check+0x1cf>
movsbl -0x44e(%rbp),%eax
cmp    $0x20,%eax
jne    134f <style_check+0x1cf>
movsbl -0x44d(%rbp),%eax
cmp    $0x20,%eax
jne    134f <style_check+0x1cf>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x1,-0x454(%rbp)
jle    139d <style_check+0x21d>
mov    -0x454(%rbp),%eax
sub    $0x2,%eax
cltq
movsbl -0x450(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
je     1394 <style_check+0x214>
mov    -0x454(%rbp),%eax
sub    $0x2,%eax
cltq
movsbl -0x450(%rbp,%rax,1),%eax
ff
cmp    $0x9,%eax
jne    139d <style_check+0x21d>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
lea    -0x450(%rbp),%rdi
lea    0xc5f(%rip),%rsi
call   10a0 <strstr@plt>
cmp    $0x0,%rax
je     13df <style_check+0x25f>
mov    -0x454(%rbp),%eax
sub    $0x2,%eax
cltq
movsbl -0x450(%rbp,%rax,1),%eax
ff
cmp    $0x7b,%eax
jne    13df <style_check+0x25f>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
lea    -0x450(%rbp),%rdi
lea    0xc30(%rip),%rsi
call   10a0 <strstr@plt>
cmp    $0x0,%rax
je     1405 <style_check+0x285>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
lea    -0x450(%rbp),%rdi
lea    0xc11(%rip),%rsi
call   10a0 <strstr@plt>
mov    %rax,-0x460(%rbp)
cmp    $0x0,%rax
je     1476 <style_check+0x2f6>
mov    -0x460(%rbp),%rax
lea    -0x450(%rbp),%rcx
cmp    %rcx,%rax
je     1468 <style_check+0x2e8>
mov    -0x460(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0x5f,%eax
jl     1468 <style_check+0x2e8>
mov    -0x460(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0x7a,%eax
jle    1471 <style_check+0x2f1>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1476 <style_check+0x2f6>
cmpl   $0x0,-0x48(%rbp)
je     14a6 <style_check+0x326>
lea    -0x450(%rbp),%rdi
lea    0xb9d(%rip),%rsi
call   10a0 <strstr@plt>
cmp    $0x0,%rax
jne    14a6 <style_check+0x326>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
movl   $0x0,-0x48(%rbp)
lea    -0x450(%rbp),%rdi
lea    0xb76(%rip),%rsi
call   10a0 <strstr@plt>
cmp    $0x0,%rax
je     14f0 <style_check+0x370>
lea    -0x450(%rbp),%rdi
lea    0xb60(%rip),%rsi
call   10a0 <strstr@plt>
cmp    $0x0,%rax
jne    14f0 <style_check+0x370>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
lea    -0x450(%rbp),%rdi
lea    0xb42(%rip),%rsi
call   10a0 <strstr@plt>
cmp    $0x0,%rax
je     1533 <style_check+0x3b3>
lea    -0x450(%rbp),%rdi
lea    0xb2d(%rip),%rsi
call   10a0 <strstr@plt>
cmp    $0x0,%rax
jne    1533 <style_check+0x3b3>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    122d <style_check+0xad>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
cmpl   $0x0,-0x38(%rbp)
je     1581 <style_check+0x401>
cmpl   $0x0,-0x3c(%rbp)
je     1581 <style_check+0x401>
mov    -0x38(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jle    156f <style_check+0x3ef>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x464(%rbp)
jmp    1578 <style_check+0x3f8>
mov    -0x38(%rbp),%eax
mov    %eax,-0x464(%rbp)
mov    -0x464(%rbp),%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     159e <style_check+0x41e>
mov    -0x8(%rbp),%rsi
mov    -0x1c(%rbp),%edx
lea    0xab8(%rip),%rdi
call   1050 <printf@plt>
cmpl   $0x0,-0x20(%rbp)
je     15bb <style_check+0x43b>
mov    -0x8(%rbp),%rsi
mov    -0x20(%rbp),%edx
lea    0xaba(%rip),%rdi
call   1050 <printf@plt>
cmpl   $0x0,-0x24(%rbp)
je     15d8 <style_check+0x458>
mov    -0x8(%rbp),%rsi
mov    -0x24(%rbp),%edx
lea    0xac1(%rip),%rdi
call   1050 <printf@plt>
cmpl   $0x0,-0x28(%rbp)
je     15f5 <style_check+0x475>
mov    -0x8(%rbp),%rsi
mov    -0x28(%rbp),%edx
lea    0xac3(%rip),%rdi
call   1050 <printf@plt>
cmpl   $0x0,-0x2c(%rbp)
je     1612 <style_check+0x492>
mov    -0x8(%rbp),%rsi
mov    -0x2c(%rbp),%edx
lea    0xad1(%rip),%rdi
call   1050 <printf@plt>
cmpl   $0x0,-0x30(%rbp)
je     162f <style_check+0x4af>
mov    -0x8(%rbp),%rsi
mov    -0x30(%rbp),%edx
lea    0xae2(%rip),%rdi
call   1050 <printf@plt>
cmpl   $0x0,-0x34(%rbp)
je     164c <style_check+0x4cc>
mov    -0x8(%rbp),%rsi
mov    -0x34(%rbp),%edx
lea    0xaeb(%rip),%rdi
call   1050 <printf@plt>
cmpl   $0x0,-0x38(%rbp)
je     1669 <style_check+0x4e9>
mov    -0x8(%rbp),%rsi
mov    -0x38(%rbp),%edx
lea    0xb01(%rip),%rdi
call   1050 <printf@plt>
cmpq   $0x0,-0x10(%rbp)
je     1691 <style_check+0x511>
cmpl   $0x0,-0x40(%rbp)
je     1691 <style_check+0x511>
mov    -0x8(%rbp),%rsi
mov    -0x40(%rbp),%edx
lea    0xaff(%rip),%rdi
call   1050 <printf@plt>
cmpq   $0x0,-0x10(%rbp)
je     16b9 <style_check+0x539>
cmpl   $0x0,-0x44(%rbp)
je     16b9 <style_check+0x539>
mov    -0x8(%rbp),%rsi
mov    -0x44(%rbp),%edx
lea    0xaf7(%rip),%rdi
call   1050 <printf@plt>
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
add    -0x24(%rbp),%eax
add    -0x28(%rbp),%eax
add    -0x38(%rbp),%eax
add    -0x2c(%rbp),%eax
add    -0x34(%rbp),%eax
mov    %eax,-0x468(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     16f0 <style_check+0x570>
mov    -0x40(%rbp),%eax
add    -0x44(%rbp),%eax
mov    %eax,-0x46c(%rbp)
jmp    16fd <style_check+0x57d>
xor    %eax,%eax
mov    %eax,-0x46c(%rbp)
jmp    16fd <style_check+0x57d>
mov    -0x468(%rbp),%eax
mov    -0x46c(%rbp),%ecx
add    %ecx,%eax
add    -0x30(%rbp),%eax
add    $0x470,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<style_check>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x458,%rsp
mov    %rdi,%rbx
lea    0xe65(%rip),%rsi
call   10a0 <strstr@plt>
mov    %rax,0x40(%rsp)
lea    0xe6f(%rip),%rsi
mov    %rbx,0x20(%rsp)
mov    %rbx,%rdi
call   1080 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1070 <assert@plt>
test   %rbx,%rbx
je     163b <style_check+0x4bb>
lea    0x50(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x400,%esi
mov    %rbx,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     1453 <style_check+0x2d3>
xor    %r15d,%r15d
movl   $0x0,0x1c(%rsp)
movl   $0x0,0x30(%rsp)
movl   $0x0,0x28(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0x0,0x34(%rsp)
xor    %r12d,%r12d
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0x18(%rsp)
movl   $0x0,0x2c(%rsp)
mov    %rbx,0x48(%rsp)
jmp    1262 <style_check+0xe2>
add    $0x1,%r15d
lea    0x50(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x400,%esi
mov    %rbx,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     1499 <style_check+0x319>
mov    %rbp,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    1240 <style_check+0xc0>
mov    %eax,%r13d
cmp    $0x3ff,%eax
mov    0x1c(%rsp),%esi
sbb    $0xffffffff,%esi
lea    -0x1(%r13),%eax
cmpb   $0xd,0x50(%rsp,%rax,1)
mov    0x18(%rsp),%ecx
mov    0x2c(%rsp),%edx
mov    %r15d,0x3c(%rsp)
mov    %esi,0x1c(%rsp)
mov    %r12d,0x38(%rsp)
je     12b0 <style_check+0x130>
cmp    $0x2,%r13d
jb     12b7 <style_check+0x137>
lea    -0x2(%r13),%eax
cmpb   $0xd,0x50(%rsp,%rax,1)
jne    12b7 <style_check+0x137>
nop
add    $0x1,%edx
mov    %edx,0x2c(%rsp)
movzbl 0x50(%rsp),%eax
cmp    $0x9,%al
sete   %dl
cmp    $0x4,%r13d
setae  %r14b
cmp    $0x20,%al
sete   %r12b
cmpb   $0x20,0x51(%rsp)
sete   0x11(%rsp)
cmpb   $0x20,0x52(%rsp)
sete   %r15b
cmpb   $0x20,0x53(%rsp)
sete   %bl
cmp    $0x2,%r13d
mov    %dl,0x13(%rsp)
mov    %bl,0x12(%rsp)
jb     1310 <style_check+0x190>
lea    -0x2(%r13),%eax
movzbl 0x50(%rsp,%rax,1),%eax
cmp    $0x20,%al
je     1309 <style_check+0x189>
cmp    $0x9,%al
jne    1310 <style_check+0x190>
add    $0x1,%ecx
mov    %ecx,0x18(%rsp)
lea    0x50(%rsp),%rbp
mov    %rbp,%rdi
lea    0xceb(%rip),%rsi
call   10a0 <strstr@plt>
test   %rax,%rax
je     133a <style_check+0x1ba>
movslq %r13d,%rax
xor    %ecx,%ecx
cmpb   $0x7b,-0x2(%rax,%rbp,1)
sete   %cl
add    %ecx,0xc(%rsp)
mov    0x30(%rsp),%r13d
and    %r12b,%r14b
movzbl 0x11(%rsp),%eax
and    %r15b,%al
mov    %eax,%r15d
mov    %rbp,%rdi
lea    0xcc6(%rip),%rsi
call   10a0 <strstr@plt>
cmp    $0x1,%rax
sbbl   $0xffffffff,0x14(%rsp)
mov    %rbp,%rdi
lea    0xcb5(%rip),%rsi
call   10a0 <strstr@plt>
test   %rax,%rax
je     13a0 <style_check+0x220>
cmp    %rbp,%rax
mov    0x38(%rsp),%r12d
je     138d <style_check+0x20d>
movzbl -0x1(%rax),%eax
add    $0x85,%al
cmp    $0xe3,%al
ja     13a5 <style_check+0x225>
addl   $0x1,0x28(%rsp)
jmp    13a5 <style_check+0x225>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x38(%rsp),%r12d
and    %r15b,%r14b
test   %r13d,%r13d
je     13c5 <style_check+0x245>
mov    %rbp,%rdi
lea    0xc74(%rip),%rsi
call   10a0 <strstr@plt>
cmp    $0x1,%rax
adcl   $0x0,0x8(%rsp)
and    0x12(%rsp),%r14b
mov    %rbp,%rdi
lea    0xc5d(%rip),%rsi
call   10a0 <strstr@plt>
test   %rax,%rax
je     1400 <style_check+0x280>
mov    %rbp,%rdi
lea    0xc50(%rip),%rsi
call   10a0 <strstr@plt>
xor    %ebx,%ebx
test   %rax,%rax
sete   %bl
jmp    1402 <style_check+0x282>
nopw   0x0(%rax,%rax,1)
xor    %ebx,%ebx
xor    %eax,%eax
movzbl 0x13(%rsp),%ecx
mov    %cl,%al
add    %eax,%r12d
movzbl %r14b,%eax
add    %eax,0x34(%rsp)
mov    %rbp,%rdi
lea    0xc20(%rip),%rsi
call   10a0 <strstr@plt>
test   %rax,%rax
je     1440 <style_check+0x2c0>
mov    %rbp,%rdi
lea    0xc14(%rip),%rsi
call   10a0 <strstr@plt>
cmp    $0x1,%rax
adc    $0x0,%ebx
mov    %ebx,0x30(%rsp)
mov    0x3c(%rsp),%r15d
mov    0x48(%rsp),%rbx
jmp    1249 <style_check+0xc9>
movl   $0x0,0x2c(%rsp)
movl   $0x0,0x18(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0xc(%rsp)
xor    %r12d,%r12d
movl   $0x0,0x34(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0x0,0x28(%rsp)
movl   $0x0,0x1c(%rsp)
xor    %r15d,%r15d
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    0x34(%rsp),%eax
cmp    %eax,%r12d
mov    %r12d,%ebx
cmovg  %eax,%ebx
test   %eax,%eax
cmove  %eax,%ebx
test   %r12d,%r12d
cmove  %r12d,%ebx
test   %r15d,%r15d
je     14d3 <style_check+0x353>
lea    0xb8b(%rip),%rdi
mov    0x20(%rsp),%rsi
mov    %r15d,%edx
call   1050 <printf@plt>
mov    0x1c(%rsp),%edx
test   %edx,%edx
mov    0x2c(%rsp),%ebp
je     14f0 <style_check+0x370>
lea    0xb8a(%rip),%rdi
mov    0x20(%rsp),%rsi
call   1050 <printf@plt>
test   %ebp,%ebp
je     1507 <style_check+0x387>
lea    0xb99(%rip),%rdi
mov    0x20(%rsp),%rsi
mov    %ebp,%edx
call   1050 <printf@plt>
test   %ebx,%ebx
je     151e <style_check+0x39e>
lea    0xba1(%rip),%rdi
mov    0x20(%rsp),%rsi
mov    %ebx,%edx
call   1050 <printf@plt>
mov    0x18(%rsp),%edx
test   %edx,%edx
je     1537 <style_check+0x3b7>
lea    0xbb1(%rip),%rdi
mov    0x20(%rsp),%rsi
call   1050 <printf@plt>
mov    0x8(%rsp),%r8d
test   %r8d,%r8d
je     155a <style_check+0x3da>
lea    0xbc4(%rip),%rdi
mov    0x20(%rsp),%rsi
mov    %r8d,%edx
call   1050 <printf@plt>
mov    0x8(%rsp),%r8d
mov    0xc(%rsp),%edx
test   %edx,%edx
je     157c <style_check+0x3fc>
lea    0xbc9(%rip),%rdi
mov    0x20(%rsp),%rsi
call   1050 <printf@plt>
mov    0x8(%rsp),%r8d
mov    0xc(%rsp),%edx
test   %r12d,%r12d
je     159e <style_check+0x41e>
lea    0xbdd(%rip),%rdi
mov    0x20(%rsp),%rsi
mov    %r12d,%edx
call   1050 <printf@plt>
mov    0x8(%rsp),%r8d
mov    0xc(%rsp),%edx
mov    0x40(%rsp),%rcx
test   %rcx,%rcx
je     15d2 <style_check+0x452>
cmpl   $0x0,0x14(%rsp)
je     15d2 <style_check+0x452>
lea    0xbd5(%rip),%rdi
mov    0x20(%rsp),%rsi
mov    0x14(%rsp),%edx
call   1050 <printf@plt>
mov    0x8(%rsp),%r8d
mov    0xc(%rsp),%edx
mov    0x40(%rsp),%rcx
test   %rcx,%rcx
mov    0x28(%rsp),%eax
je     1604 <style_check+0x484>
test   %eax,%eax
je     1604 <style_check+0x484>
lea    0xbc5(%rip),%rdi
mov    0x20(%rsp),%rsi
mov    %eax,%edx
call   1050 <printf@plt>
mov    0x28(%rsp),%eax
mov    0x8(%rsp),%r8d
mov    0xc(%rsp),%edx
mov    0x40(%rsp),%rcx
add    0x14(%rsp),%eax
xor    %esi,%esi
test   %rcx,%rcx
cmovne %eax,%esi
mov    0x18(%rsp),%eax
add    %ebp,%eax
add    %r8d,%eax
add    %edx,%eax
add    %r12d,%eax
add    %ebx,%eax
add    0x1c(%rsp),%eax
add    %esi,%eax
add    %r15d,%eax
add    $0x458,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x299e(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"/devices/\00"
@.str.1 = [2 x i8] c"r\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [19 x i8] c"(r_device *decoder\00"
@.str.3 = [7 x i8] c"stdout\00"
@.str.4 = [7 x i8] c"printf\00"
@.str.5 = [6 x i8] c"if (!\00"
@.str.6 = [7 x i8] c"alloc(\00"
@.str.7 = [8 x i8] c"alloc()\00"
@.str.8 = [8 x i8] c"strdup(\00"
@.str.9 = [9 x i8] c"strdup()\00"
@.str.10 = [31 x i8] c"File \22%s\22 has %d READ errors.\0A\00"
@.str.11 = [36 x i8] c"File \22%s\22 has %d LONG line errors.\0A\00"
@.str.12 = [31 x i8] c"File \22%s\22 has %d CRLF errors.\0A\00"
@.str.13 = [43 x i8] c"File \22%s\22 has %d MIXED tab/spaces errors.\0A\00"
@.str.14 = [46 x i8] c"File \22%s\22 has %d TRAILING whitespace errors.\0A\00"
@.str.15 = [38 x i8] c"File \22%s\22 has %d ALLOC check errors.\0A\00"
@.str.16 = [51 x i8] c"File \22%s\22 has %d BRACE function on newline error.\0A\00"
@.str.17 = [38 x i8] c"File \22%s\22 has %d TAB indented lines.\0A\00"
@.str.18 = [32 x i8] c"File \22%s\22 has %d STDOUT lines.\0A\00"
@.str.19 = [32 x i8] c"File \22%s\22 has %d PRINTF lines.\0A\00"
define i32 @style_check(i8* %0) {
%2 = alloca [1024 x i8]
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @assert(i32* %4)
%6 = icmp eq i32* %4, null
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%12 = call i64 @fgets(i8* %11, i32 1024, i32* %4)
%13 = icmp eq i64 %12, 0
br i1 %13, label %149, label %14
14: ; preds = %10
%15 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 1
%16 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 2
%17 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 3
br label %18
18: ; preds = %14, %135
%19 = phi i32 [ 0, %14 ], [ %146, %135 ]
%20 = phi i32 [ 0, %14 ], [ %145, %135 ]
%21 = phi i32 [ 0, %14 ], [ %144, %135 ]
%22 = phi i32 [ 0, %14 ], [ %143, %135 ]
%23 = phi i32 [ 0, %14 ], [ %142, %135 ]
%24 = phi i32 [ 0, %14 ], [ %141, %135 ]
%25 = phi i32 [ 0, %14 ], [ %140, %135 ]
%26 = phi i32 [ 0, %14 ], [ %139, %135 ]
%27 = phi i32 [ 0, %14 ], [ %138, %135 ]
%28 = phi i32 [ 0, %14 ], [ %137, %135 ]
%29 = phi i32 [ 0, %14 ], [ %136, %135 ]
%30 = call i32 @strlen(i8* %11)
%31 = icmp slt i32 %30, 1
br i1 %31, label %32, label %34
32: ; preds = %18
%33 = add nsw i32 %19, 1
br label %135
34: ; preds = %18
%35 = icmp ugt i32 %30, 1022
%36 = zext i1 %35 to i32
%37 = add nsw i32 %20, %36
%38 = add nsw i32 %30, -1
%39 = zext i32 %38 to i64
%40 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %39
%41 = load i8, i8* %40
%42 = icmp eq i8 %41, 13
br i1 %42, label %51, label %43
43: ; preds = %34
%44 = icmp ugt i32 %30, 1
br i1 %44, label %45, label %53
45: ; preds = %43
%46 = add nsw i32 %30, -2
%47 = zext i32 %46 to i64
%48 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %47
%49 = load i8, i8* %48
%50 = icmp eq i8 %49, 13
br i1 %50, label %51, label %53
51: ; preds = %45, %34
%52 = add nsw i32 %29, 1
br label %53
53: ; preds = %51, %45, %43
%54 = phi i32 [ %52, %51 ], [ %29, %45 ], [ %29, %43 ]
%55 = load i8, i8* %11
%56 = icmp eq i8 %55, 9
%57 = zext i1 %56 to i32
%58 = add nsw i32 %25, %57
%59 = icmp ugt i32 %30, 3
%60 = icmp eq i8 %55, 32
%61 = select i1 %59, i1 %60, i1 false
%62 = load i8, i8* %15
%63 = icmp eq i8 %62, 32
%64 = select i1 %61, i1 %63, i1 false
%65 = load i8, i8* %16
%66 = icmp eq i8 %65, 32
%67 = select i1 %64, i1 %66, i1 false
%68 = load i8, i8* %17
%69 = icmp eq i8 %68, 32
%70 = select i1 %67, i1 %69, i1 false
%71 = zext i1 %70 to i32
%72 = add nsw i32 %24, %71
%73 = icmp ugt i32 %30, 1
br i1 %73, label %74, label %81
74: ; preds = %53
%75 = add nsw i32 %30, -2
%76 = zext i32 %75 to i64
%77 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %76
%78 = load i8, i8* %77
switch i8 %78, label %81 [
i8 32, label %79
i8 9, label %79
]
79: ; preds = %74, %74
%80 = add nsw i32 %28, 1
br label %81
81: ; preds = %74, %79, %53
%82 = phi i32 [ %80, %79 ], [ %28, %53 ], [ %28, %74 ]
%83 = call i8* @strstr(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%84 = icmp eq i8* %83, null
br i1 %84, label %93, label %85
85: ; preds = %81
%86 = add nsw i32 %30, -2
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %87
%89 = load i8, i8* %88
%90 = icmp eq i8 %89, 123
%91 = zext i1 %90 to i32
%92 = add nsw i32 %26, %91
br label %93
93: ; preds = %85, %81
%94 = phi i32 [ %26, %81 ], [ %92, %85 ]
%95 = call i8* @strstr(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%96 = icmp ne i8* %95, null
%97 = zext i1 %96 to i32
%98 = add nsw i32 %23, %97
%99 = call i8* @strstr(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%100 = icmp eq i8* %99, null
br i1 %100, label %110, label %101
101: ; preds = %93
%102 = icmp eq i8* %99, %11
br i1 %102, label %108, label %103
103: ; preds = %101
%104 = getelementptr inbounds i8, i8* %99, i64 -1
%105 = load i8, i8* %104
%106 = add i8 %105, -123
%107 = icmp ult i8 %106, -28
br i1 %107, label %108, label %110
108: ; preds = %103, %101
%109 = add nsw i32 %22, 1
br label %110
110: ; preds = %103, %108, %93
%111 = phi i32 [ %109, %108 ], [ %22, %93 ], [ %22, %103 ]
%112 = icmp eq i32 %21, 0
br i1 %112, label %118, label %113
113: ; preds = %110
%114 = call i8* @strstr(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%115 = icmp eq i8* %114, null
%116 = zext i1 %115 to i32
%117 = add nsw i32 %27, %116
br label %118
118: ; preds = %113, %110
%119 = phi i32 [ %27, %110 ], [ %117, %113 ]
%120 = call i8* @strstr(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%121 = icmp eq i8* %120, null
br i1 %121, label %126, label %122
122: ; preds = %118
%123 = call i8* @strstr(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%124 = icmp eq i8* %123, null
%125 = zext i1 %124 to i32
br label %126
126: ; preds = %122, %118
%127 = phi i32 [ 0, %118 ], [ %125, %122 ]
%128 = call i8* @strstr(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%129 = icmp eq i8* %128, null
br i1 %129, label %135, label %130
130: ; preds = %126
%131 = call i8* @strstr(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%132 = icmp eq i8* %131, null
%133 = zext i1 %132 to i32
%134 = add nuw nsw i32 %127, %133
br label %135
135: ; preds = %130, %126, %32
%136 = phi i32 [ %29, %32 ], [ %54, %130 ], [ %54, %126 ]
%137 = phi i32 [ %28, %32 ], [ %82, %130 ], [ %82, %126 ]
%138 = phi i32 [ %27, %32 ], [ %119, %130 ], [ %119, %126 ]
%139 = phi i32 [ %26, %32 ], [ %94, %130 ], [ %94, %126 ]
%140 = phi i32 [ %25, %32 ], [ %58, %130 ], [ %58, %126 ]
%141 = phi i32 [ %24, %32 ], [ %72, %130 ], [ %72, %126 ]
%142 = phi i32 [ %23, %32 ], [ %98, %130 ], [ %98, %126 ]
%143 = phi i32 [ %22, %32 ], [ %111, %130 ], [ %111, %126 ]
%144 = phi i32 [ %21, %32 ], [ %134, %130 ], [ %127, %126 ]
%145 = phi i32 [ %20, %32 ], [ %37, %130 ], [ %37, %126 ]
%146 = phi i32 [ %33, %32 ], [ %19, %130 ], [ %19, %126 ]
%147 = call i64 @fgets(i8* %11, i32 1024, i32* %4)
%148 = icmp eq i64 %147, 0
br i1 %148, label %149, label %18
149: ; preds = %135, %10
%150 = phi i32 [ 0, %10 ], [ %136, %135 ]
%151 = phi i32 [ 0, %10 ], [ %137, %135 ]
%152 = phi i32 [ 0, %10 ], [ %138, %135 ]
%153 = phi i32 [ 0, %10 ], [ %139, %135 ]
%154 = phi i32 [ 0, %10 ], [ %140, %135 ]
%155 = phi i32 [ 0, %10 ], [ %141, %135 ]
%156 = phi i32 [ 0, %10 ], [ %142, %135 ]
%157 = phi i32 [ 0, %10 ], [ %143, %135 ]
%158 = phi i32 [ 0, %10 ], [ %145, %135 ]
%159 = phi i32 [ 0, %10 ], [ %146, %135 ]
%160 = call i32 @fclose(i32* %4)
%161 = icmp ne i32 %154, 0
%162 = icmp ne i32 %155, 0
%163 = select i1 %161, i1 %162, i1 false
%164 = icmp sgt i32 %154, %155
%165 = select i1 %164, i32 %155, i32 %154
%166 = select i1 %163, i32 %165, i32 0
%167 = icmp eq i32 %159, 0
br i1 %167, label %170, label %168
168: ; preds = %149
%169 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), i8* %0, i32 %159)
br label %170
170: ; preds = %168, %149
%171 = icmp eq i32 %158, 0
br i1 %171, label %174, label %172
172: ; preds = %170
%173 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i8* %0, i32 %158)
br label %174
174: ; preds = %172, %170
%175 = icmp eq i32 %150, 0
br i1 %175, label %178, label %176
176: ; preds = %174
%177 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.12, i64 0, i64 0), i8* %0, i32 %150)
br label %178
178: ; preds = %176, %174
%179 = icmp eq i32 %166, 0
br i1 %179, label %182, label %180
180: ; preds = %178
%181 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.13, i64 0, i64 0), i8* %0, i32 %166)
br label %182
182: ; preds = %180, %178
%183 = icmp eq i32 %151, 0
br i1 %183, label %186, label %184
184: ; preds = %182
%185 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.14, i64 0, i64 0), i8* %0, i32 %151)
br label %186
186: ; preds = %184, %182
%187 = icmp eq i32 %152, 0
br i1 %187, label %190, label %188
188: ; preds = %186
%189 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.15, i64 0, i64 0), i8* %0, i32 %152)
br label %190
190: ; preds = %188, %186
%191 = icmp eq i32 %153, 0
br i1 %191, label %194, label %192
192: ; preds = %190
%193 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.16, i64 0, i64 0), i8* %0, i32 %153)
br label %194
194: ; preds = %192, %190
br i1 %161, label %195, label %197
195: ; preds = %194
%196 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.17, i64 0, i64 0), i8* %0, i32 %154)
br label %197
197: ; preds = %195, %194
%198 = icmp ne i8* %3, null
%199 = icmp ne i32 %156, 0
%200 = select i1 %198, i1 %199, i1 false
br i1 %200, label %201, label %203
201: ; preds = %197
%202 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.18, i64 0, i64 0), i8* %0, i32 %156)
br label %203
203: ; preds = %201, %197
%204 = icmp ne i32 %157, 0
%205 = select i1 %198, i1 %204, i1 false
br i1 %205, label %206, label %208
206: ; preds = %203
%207 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.19, i64 0, i64 0), i8* %0, i32 %157)
br label %208
208: ; preds = %206, %203
%209 = add nsw i32 %157, %156
%210 = select i1 %198, i32 %209, i32 0
%211 = add i32 %151, %150
%212 = add i32 %211, %152
%213 = add i32 %212, %153
%214 = add i32 %213, %154
%215 = add i32 %214, %166
%216 = add i32 %215, %158
%217 = add i32 %216, %210
%218 = add i32 %217, %159
ret i32 %218
}