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

/* Variables and functions */
int errno;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int get_stat(char const *);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcmp(char const *, char *);
char *strerror(int);
int strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
int main(int argc, const char *argv[]) {
  char buf[4096];
  FILE *procfd;
  int i, lastspace;
  int ret;
  procfd = fopen("/proc/crypto", "r");
  if (!procfd) {
    ret = errno;
    fprintf(stderr, "Cannot open /proc/crypto %s\n", strerror(errno));
    return ret;
  }
  if (argc > 1) {
    if (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")) {
      printf("Usage: %s [-h|--help] display this help\n", argv[0]);
      printf("Usage: %s display all crypto statistics\n", argv[0]);
      printf("Usage: %s drivername1 drivername2 ... = display crypto "
             "statistics about drivername1 ...\n",
             argv[0]);
      return 0;
    }
    for (i = 1; i < argc; i++) {
      ret = get_stat(argv[i]);
      if (ret) {
        fprintf(stderr, "Failed with %s\n", strerror(-ret));
        return ret;
      }
    }
    return 0;
  }
  while (fgets(buf, sizeof(buf), procfd)) {
    if (!strncmp(buf, "driver", 6)) {
      lastspace = 0;
      i = 0;
      while (i < strlen(buf)) {
        i++;
        if (buf[i] == ' ')
          lastspace = i;
      }
      buf[strlen(buf) - 1] = '\0';
      ret = get_stat(buf + lastspace + 1);
      if (ret) {
        fprintf(stderr, "Failed with %s\n", strerror(-ret));
        goto out;
      }
    }
  }
out:
  fclose(procfd);
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1040,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe40(%rip),%rdi
lea    0xf2d(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x1018(%rbp)
cmpq   $0x0,-0x1018(%rbp)
jne    1230 <main+0x90>
mov    0x2df0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1024(%rbp)
mov    0x2de9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1028(%rbp)
mov    0x2dd2(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    -0x1028(%rbp),%edi
mov    %rax,%rdx
lea    0xdf0(%rip),%rsi
call   1090 <fprintf@plt>
mov    -0x1024(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    14b9 <main+0x319>
cmpl   $0x1,-0x8(%rbp)
jle    135d <main+0x1bd>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xde1(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
je     1274 <main+0xd4>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdc7(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    12b9 <main+0x119>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xdb2(%rip),%rdi
call   1060 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xdc8(%rip),%rdi
call   1060 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xdde(%rip),%rdi
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    14b9 <main+0x319>
movl   $0x1,-0x101c(%rbp)
mov    -0x101c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1351 <main+0x1b1>
mov    -0x10(%rbp),%rax
movslq -0x101c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   10b0 <get_stat@plt>
mov    %eax,-0x1024(%rbp)
cmpl   $0x0,-0x1024(%rbp)
je     1338 <main+0x198>
mov    0x2ce0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x102c(%rbp)
xor    %edi,%edi
sub    -0x1024(%rbp),%edi
call   10c0 <strerror@plt>
mov    -0x102c(%rbp),%edi
mov    %rax,%rdx
lea    0xdba(%rip),%rsi
call   1090 <fprintf@plt>
mov    -0x1024(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    14b9 <main+0x319>
jmp    133d <main+0x19d>
mov    -0x101c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x101c(%rbp)
jmp    12c3 <main+0x123>
movl   $0x0,-0x4(%rbp)
jmp    14b9 <main+0x319>
jmp    1362 <main+0x1c2>
lea    -0x1010(%rbp),%rdi
mov    -0x1018(%rbp),%rdx
mov    $0x1000,%esi
call   1070 <fgets@plt>
cmp    $0x0,%rax
je     149f <main+0x2ff>
lea    -0x1010(%rbp),%rdi
lea    0xd5d(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    149a <main+0x2fa>
movl   $0x0,-0x1020(%rbp)
movl   $0x0,-0x101c(%rbp)
mov    -0x101c(%rbp),%eax
mov    %eax,-0x1030(%rbp)
lea    -0x1010(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x1030(%rbp),%eax
cmp    %ecx,%eax
jge    1419 <main+0x279>
mov    -0x101c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x101c(%rbp)
movslq -0x101c(%rbp),%rax
movsbl -0x1010(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    1414 <main+0x274>
mov    -0x101c(%rbp),%eax
mov    %eax,-0x1020(%rbp)
jmp    13b9 <main+0x219>
lea    -0x1010(%rbp),%rdi
call   1050 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x1010(%rbp,%rax,1)
lea    -0x1010(%rbp),%rdi
movslq -0x1020(%rbp),%rax
add    %rax,%rdi
add    $0x1,%rdi
call   10b0 <get_stat@plt>
mov    %eax,-0x1024(%rbp)
cmpl   $0x0,-0x1024(%rbp)
je     1495 <main+0x2f5>
mov    0x2b7a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1034(%rbp)
xor    %edi,%edi
sub    -0x1024(%rbp),%edi
call   10c0 <strerror@plt>
mov    -0x1034(%rbp),%edi
mov    %rax,%rdx
lea    0xc54(%rip),%rsi
call   1090 <fprintf@plt>
jmp    14a4 <main+0x304>
jmp    149a <main+0x2fa>
jmp    1362 <main+0x1c2>
jmp    14a4 <main+0x304>
mov    -0x1018(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x1024(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1040,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1008,%rsp
mov    %rsi,%rbp
mov    %edi,%r15d
lea    0xe42(%rip),%rdi
lea    0xf2f(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     126a <main+0xca>
cmp    $0x1,%r15d
jle    129b <main+0xfb>
mov    0x8(%rbp),%rbx
lea    0xe42(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcmp@plt>
test   %eax,%eax
je     1362 <main+0x1c2>
lea    0xe2e(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcmp@plt>
test   %eax,%eax
je     1362 <main+0x1c2>
mov    %rbx,%rdi
call   10b0 <get_stat@plt>
mov    %eax,%r14d
test   %eax,%eax
jne    124e <main+0xae>
mov    %r15d,%r15d
mov    $0x2,%ebx
cs nopw 0x0(%rax,%rax,1)
cmp    %rbx,%r15
je     13dc <main+0x23c>
mov    0x0(%rbp,%rbx,8),%rdi
call   10b0 <get_stat@plt>
add    $0x1,%rbx
test   %eax,%eax
je     1230 <main+0x90>
mov    %eax,%r14d
mov    0x2d8b(%rip),%rax
mov    (%rax),%ebx
mov    %r14d,%edi
neg    %edi
call   10c0 <strerror@plt>
lea    0xe77(%rip),%rsi
jmp    128c <main+0xec>
mov    0x2d67(%rip),%rax
mov    (%rax),%r14d
mov    0x2d65(%rip),%rax
mov    (%rax),%ebx
mov    %r14d,%edi
call   10c0 <strerror@plt>
lea    0xd81(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1090 <fprintf@plt>
jmp    13c7 <main+0x227>
mov    %rax,%r12
mov    %rsp,%r13
mov    %r13,%rdi
mov    $0x1000,%esi
mov    %rax,%rdx
call   1070 <fgets@plt>
xor    %r14d,%r14d
test   %rax,%rax
je     13bf <main+0x21f>
lea    0xe2b(%rip),%r15
jmp    1311 <main+0x171>
cs nopw 0x0(%rax,%rax,1)
mov    %r13,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%r13,1)
movslq %ebx,%rax
lea    (%rsp,%rax,1),%rdi
add    $0x1,%rdi
call   10b0 <get_stat@plt>
test   %eax,%eax
jne    1397 <main+0x1f7>
mov    %r13,%rdi
mov    $0x1000,%esi
mov    %r12,%rdx
call   1070 <fgets@plt>
test   %rax,%rax
je     13bf <main+0x21f>
mov    %r13,%rdi
mov    %r15,%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
jne    12f8 <main+0x158>
mov    %r13,%rdi
call   1050 <strlen@plt>
xor    %ebx,%ebx
test   %eax,%eax
jle    12d0 <main+0x130>
mov    $0x1,%ebp
nopl   0x0(%rax,%rax,1)
cmpb   $0x20,(%rsp,%rbp,1)
cmove  %ebp,%ebx
mov    %r13,%rdi
call   1050 <strlen@plt>
cltq
lea    0x1(%rbp),%rcx
cmp    %rax,%rbp
mov    %rcx,%rbp
jl     1340 <main+0x1a0>
jmp    12d0 <main+0x130>
mov    0x0(%rbp),%rsi
lea    0xcc7(%rip),%rdi
call   1060 <printf@plt>
mov    0x0(%rbp),%rsi
lea    0xce0(%rip),%rdi
call   1060 <printf@plt>
mov    0x0(%rbp),%rsi
lea    0xcf9(%rip),%rdi
call   1060 <printf@plt>
xor    %r14d,%r14d
jmp    13c7 <main+0x227>
mov    %eax,%ebx
mov    0x2c40(%rip),%rax
mov    (%rax),%ebp
mov    %ebx,%edi
neg    %edi
call   10c0 <strerror@plt>
lea    0xd2d(%rip),%rsi
mov    %ebp,%edi
mov    %rax,%rdx
call   1090 <fprintf@plt>
mov    %ebx,%r14d
mov    %r12,%rdi
call   1040 <fclose@plt>
mov    %r14d,%eax
add    $0x1008,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %r14d,%r14d
jmp    13c7 <main+0x227>

LLVM IR (-O0):
@.str = [13 x i8] c"/proc/crypto\00"
@.str.1 = [2 x i8] c"r\00"
@errno = global i32 0
@stderr = global i32 0
@.str.2 = [29 x i8] c"Cannot open /proc/crypto %s\0A\00"
@.str.3 = [3 x i8] c"-h\00"
@.str.4 = [7 x i8] c"--help\00"
@.str.5 = [41 x i8] c"Usage: %s [-h|--help] display this help\0A\00"
@.str.6 = [41 x i8] c"Usage: %s display all crypto statistics\0A\00"
@.str.7 = [89 x i8] c"Usage: %s drivername1 drivername2 ... = display crypto statistics about drivername1 ...\0A\00"
@.str.8 = [16 x i8] c"Failed with %s\0A\00"
@.str.9 = [7 x i8] c"driver\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4096 x i8]
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %11, i32** %7
%12 = load i32*, i32** %7
%13 = icmp ne i32* %12, null
br i1 %13, label %21, label %14
14: ; preds = %2
%15 = load i32, i32* @errno
store i32 %15, i32* %10
%16 = load i32, i32* @stderr
%17 = load i32, i32* @errno
%18 = call i8* @strerror(i32 %17)
%19 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8* %18)
%20 = load i32, i32* %10
store i32 %20, i32* %3
br label %130
21: ; preds = %2
%22 = load i32, i32* %4
%23 = icmp sgt i32 %22, 1
br i1 %23, label %24, label %75
24: ; preds = %21
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i32 @strcmp(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %36
30: ; preds = %24
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = call i32 @strcmp(i8* %33, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%35 = icmp ne i32 %34, 0
br i1 %35, label %49, label %36
36: ; preds = %30, %24
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 0
%39 = load i8*, i8** %38
%40 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i8* %39)
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 0
%43 = load i8*, i8** %42
%44 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0), i8* %43)
%45 = load i8**, i8*** %5
%46 = getelementptr inbounds i8*, i8** %45, i64 0
%47 = load i8*, i8** %46
%48 = call i32 @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.7, i64 0, i64 0), i8* %47)
store i32 0, i32* %3
br label %130
49: ; preds = %30
store i32 1, i32* %8
br label %50
50: ; preds = %71, %49
%51 = load i32, i32* %8
%52 = load i32, i32* %4
%53 = icmp slt i32 %51, %52
br i1 %53, label %54, label %74
54: ; preds = %50
%55 = load i8**, i8*** %5
%56 = load i32, i32* %8
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i8*, i8** %55, i64 %57
%59 = load i8*, i8** %58
%60 = call i32 @get_stat(i8* %59)
store i32 %60, i32* %10
%61 = load i32, i32* %10
%62 = icmp ne i32 %61, 0
br i1 %62, label %63, label %70
63: ; preds = %54
%64 = load i32, i32* @stderr
%65 = load i32, i32* %10
%66 = sub nsw i32 0, %65
%67 = call i8* @strerror(i32 %66)
%68 = call i32 @fprintf(i32 %64, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i8* %67)
%69 = load i32, i32* %10
store i32 %69, i32* %3
br label %130
70: ; preds = %54
br label %71
71: ; preds = %70
%72 = load i32, i32* %8
%73 = add nsw i32 %72, 1
store i32 %73, i32* %8
br label %50
74: ; preds = %50
store i32 0, i32* %3
br label %130
75: ; preds = %21
br label %76
76: ; preds = %124, %75
%77 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%78 = load i32*, i32** %7
%79 = call i64 @fgets(i8* %77, i32 4096, i32* %78)
%80 = icmp ne i64 %79, 0
br i1 %80, label %81, label %125
81: ; preds = %76
%82 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%83 = call i32 @strncmp(i8* %82, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i32 6)
%84 = icmp ne i32 %83, 0
br i1 %84, label %124, label %85
85: ; preds = %81
store i32 0, i32* %9
store i32 0, i32* %8
br label %86
86: ; preds = %102, %85
%87 = load i32, i32* %8
%88 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%89 = call i32 @strlen(i8* %88)
%90 = icmp slt i32 %87, %89
br i1 %90, label %91, label %103
91: ; preds = %86
%92 = load i32, i32* %8
%93 = add nsw i32 %92, 1
store i32 %93, i32* %8
%94 = load i32, i32* %8
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 %95
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
%99 = icmp eq i32 %98, 32
br i1 %99, label %100, label %102
100: ; preds = %91
%101 = load i32, i32* %8
store i32 %101, i32* %9
br label %102
102: ; preds = %100, %91
br label %86
103: ; preds = %86
%104 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%105 = call i32 @strlen(i8* %104)
%106 = sub nsw i32 %105, 1
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 %107
store i8 0, i8* %108
%109 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%110 = load i32, i32* %9
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds i8, i8* %109, i64 %111
%113 = getelementptr inbounds i8, i8* %112, i64 1
%114 = call i32 @get_stat(i8* %113)
store i32 %114, i32* %10
%115 = load i32, i32* %10
%116 = icmp ne i32 %115, 0
br i1 %116, label %117, label %123
117: ; preds = %103
%118 = load i32, i32* @stderr
%119 = load i32, i32* %10
%120 = sub nsw i32 0, %119
%121 = call i8* @strerror(i32 %120)
%122 = call i32 @fprintf(i32 %118, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i8* %121)
br label %126
123: ; preds = %103
br label %124
124: ; preds = %123, %81
br label %76
125: ; preds = %76
br label %126
126: ; preds = %125, %117
%127 = load i32*, i32** %7
%128 = call i32 @fclose(i32* %127)
%129 = load i32, i32* %10
store i32 %129, i32* %3
br label %130
130: ; preds = %126, %74, %63, %36, %14
%131 = load i32, i32* %3
ret i32 %131
}

LLVM IR (-O2):
@.str = [13 x i8] c"/proc/crypto\00"
@.str.1 = [2 x i8] c"r\00"
@errno = global i32 0
@stderr = global i32 0
@.str.2 = [29 x i8] c"Cannot open /proc/crypto %s\0A\00"
@.str.3 = [3 x i8] c"-h\00"
@.str.4 = [7 x i8] c"--help\00"
@.str.5 = [41 x i8] c"Usage: %s [-h|--help] display this help\0A\00"
@.str.6 = [41 x i8] c"Usage: %s display all crypto statistics\0A\00"
@.str.7 = [89 x i8] c"Usage: %s drivername1 drivername2 ... = display crypto statistics about drivername1 ...\0A\00"
@.str.8 = [16 x i8] c"Failed with %s\0A\00"
@.str.9 = [7 x i8] c"driver\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [4096 x i8]
%4 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%5 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i32, i32* @errno
%9 = load i32, i32* @stderr
%10 = tail call i8* @strerror(i32 %8)
%11 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8* %10)
br label %91
12: ; preds = %2
%13 = icmp sgt i32 %0, 1
br i1 %13, label %17, label %14
14: ; preds = %12
%15 = call i64 @fgets(i8* %4, i32 4096, i32* %5)
%16 = icmp eq i64 %15, 0
br i1 %16, label %88, label %51
17: ; preds = %12
%18 = getelementptr inbounds i8*, i8** %1, i64 1
%19 = load i8*, i8** %18
%20 = tail call i32 @strcmp(i8* dereferenceable(1) %19, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %29, label %22
22: ; preds = %17
%23 = tail call i32 @strcmp(i8* dereferenceable(1) %19, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%24 = icmp eq i32 %23, 0
br i1 %24, label %29, label %25
25: ; preds = %22
%26 = zext i32 %0 to i64
%27 = tail call i32 @get_stat(i8* %19)
%28 = icmp eq i32 %27, 0
br i1 %28, label %36, label %45
29: ; preds = %22, %17
%30 = load i8*, i8** %1
%31 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i8* %30)
%32 = load i8*, i8** %1
%33 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0), i8* %32)
%34 = load i8*, i8** %1
%35 = tail call i32 @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.7, i64 0, i64 0), i8* %34)
br label %91
36: ; preds = %25, %39
%37 = phi i64 [ %44, %39 ], [ 2, %25 ]
%38 = icmp eq i64 %37, %26
br i1 %38, label %91, label %39
39: ; preds = %36
%40 = getelementptr inbounds i8*, i8** %1, i64 %37
%41 = load i8*, i8** %40
%42 = tail call i32 @get_stat(i8* %41)
%43 = icmp eq i32 %42, 0
%44 = add nuw nsw i64 %37, 1
br i1 %43, label %36, label %45
45: ; preds = %39, %25
%46 = phi i32 [ %27, %25 ], [ %42, %39 ]
%47 = load i32, i32* @stderr
%48 = sub nsw i32 0, %46
%49 = tail call i8* @strerror(i32 %48)
%50 = tail call i32 @fprintf(i32 %47, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i8* %49)
br label %91
51: ; preds = %14, %85
%52 = call i32 @strncmp(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i32 6)
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %85
54: ; preds = %51
%55 = call i32 @strlen(i8* %4)
%56 = icmp sgt i32 %55, 0
br i1 %56, label %57, label %69
57: ; preds = %54, %57
%58 = phi i64 [ %60, %57 ], [ 0, %54 ]
%59 = phi i32 [ %65, %57 ], [ 0, %54 ]
%60 = add nuw nsw i64 %58, 1
%61 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 %60
%62 = load i8, i8* %61
%63 = icmp eq i8 %62, 32
%64 = trunc i64 %60 to i32
%65 = select i1 %63, i32 %64, i32 %59
%66 = call i32 @strlen(i8* %4)
%67 = sext i32 %66 to i64
%68 = icmp slt i64 %60, %67
br i1 %68, label %57, label %69
69: ; preds = %57, %54
%70 = phi i32 [ 0, %54 ], [ %65, %57 ]
%71 = call i32 @strlen(i8* %4)
%72 = add nsw i32 %71, -1
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 %73
store i8 0, i8* %74
%75 = sext i32 %70 to i64
%76 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 %75
%77 = getelementptr inbounds i8, i8* %76, i64 1
%78 = call i32 @get_stat(i8* %77)
%79 = icmp eq i32 %78, 0
br i1 %79, label %85, label %80
80: ; preds = %69
%81 = load i32, i32* @stderr
%82 = sub nsw i32 0, %78
%83 = call i8* @strerror(i32 %82)
%84 = call i32 @fprintf(i32 %81, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i8* %83)
br label %88
85: ; preds = %69, %51
%86 = call i64 @fgets(i8* %4, i32 4096, i32* %5)
%87 = icmp eq i64 %86, 0
br i1 %87, label %88, label %51
88: ; preds = %85, %14, %80
%89 = phi i32 [ %78, %80 ], [ 0, %14 ], [ 0, %85 ]
%90 = call i32 @fclose(i32* %5)
br label %91
91: ; preds = %36, %88, %45, %29, %7
%92 = phi i32 [ %46, %45 ], [ 0, %29 ], [ %89, %88 ], [ %8, %7 ], [ 0, %36 ]
ret i32 %92
}