#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(int);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
char *getCorrect(int /*<<< orphan*/ *);
scalar_t__ memcmp(char *, char *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ remove(char *);
char *result(char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int strspn(char *, char *);
int main(int argc, char **argv) {
  FILE *fp = NULL;
  char *data = NULL;
  char *correct = NULL;
  char command_line[4000];
  char line[4000];
  if (argc != 2) {
    printf("quiz file needs to be specified\n");
    exit(1);
  }
  fp = fopen(argv[1], "r");
  if (!fp) {
    printf("Can not find quiz file %s\n", argv[1]);
    exit(1);
  }
  int failed = 0;
  int c = 0;
  while ((fgets(line, 4000, fp))) {
    if (*line == '#') {
    } else if (*line == '!') {
      printf(line + 1);
    } else if ((memcmp(line, "---", 3) == 0)) {
      correct = getCorrect(fp);
      if ((strcmp(data, correct) == 0)) {
        printf(" passed         %s\n", command_line);
      } else {
        failed++;
        printf(" failed         %s\n", command_line);
        printf("------ Returned -----\n");
        printf(data);
        printf("------ Expected ------\n");
        printf(correct);
        printf("-----------------------\n");
      }
    } else if (strspn(line, " \n\r") != strlen(line)) {
      line[strlen(line) - 1] = 0;
      printf("test %-5i  ...  ", ++c);
      strcpy(command_line, line);
      data = result(command_line);
    }
  }
  if (failed)
    printf("\nFailed %i tests out of %i\n\n", failed, c);
  else
    printf("\nPassed all %i tests \n\n", c);
  remove("tempdata.dat");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1213 <main+0x53>
lea    0xdfe(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdff(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1256 <main+0x96>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xdde(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
movl   $0x0,-0x1f74(%rbp)
movl   $0x0,-0x1f78(%rbp)
lea    -0x1f70(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0xfa0,%esi
call   1090 <fgets@plt>
cmp    $0x0,%rax
je     1430 <main+0x270>
movsbl -0x1f70(%rbp),%eax
cmp    $0x23,%eax
jne    129e <main+0xde>
jmp    142b <main+0x26b>
movsbl -0x1f70(%rbp),%eax
cmp    $0x21,%eax
jne    12c5 <main+0x105>
lea    -0x1f70(%rbp),%rdi
add    $0x1,%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1426 <main+0x266>
lea    -0x1f70(%rbp),%rdi
lea    0xd6b(%rip),%rsi
mov    $0x3,%edx
call   1080 <memcmp@plt>
cmp    $0x0,%rax
jne    138e <main+0x1ce>
mov    -0x18(%rbp),%rdi
call   10e0 <getCorrect@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
jne    1325 <main+0x165>
lea    -0xfd0(%rbp),%rsi
lea    0xd29(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1389 <main+0x1c9>
mov    -0x1f74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1f74(%rbp)
lea    -0xfd0(%rbp),%rsi
lea    0xd14(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xd1a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xd18(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x28(%rbp),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xd17(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1421 <main+0x261>
lea    -0x1f70(%rbp),%rdi
lea    0xd16(%rip),%rsi
call   1070 <strspn@plt>
mov    %eax,-0x1f7c(%rbp)
lea    -0x1f70(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x1f7c(%rbp),%eax
cmp    %ecx,%eax
je     141c <main+0x25c>
lea    -0x1f70(%rbp),%rdi
call   1050 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x1f70(%rbp,%rax,1)
mov    -0x1f78(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x1f78(%rbp)
lea    0xcc4(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0xfd0(%rbp),%rdi
lea    -0x1f70(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0xfd0(%rbp),%rdi
call   10b0 <result@plt>
mov    %rax,-0x20(%rbp)
jmp    1421 <main+0x261>
jmp    1426 <main+0x266>
jmp    142b <main+0x26b>
jmp    126a <main+0xaa>
cmpl   $0x0,-0x1f74(%rbp)
je     145c <main+0x29c>
mov    -0x1f74(%rbp),%esi
mov    -0x1f78(%rbp),%edx
lea    0xc77(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1470 <main+0x2b0>
mov    -0x1f78(%rbp),%esi
lea    0xc7b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xc85(%rip),%rdi
call   1030 <remove@plt>
xor    %eax,%eax
add    $0x1f80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1f58,%rsp
cmp    $0x2,%edi
jne    13d4 <main+0x204>
mov    %rsi,%rbp
mov    0x8(%rsi),%rdi
lea    0xe08(%rip),%rsi
call   10d0 <fopen@plt>
test   %rax,%rax
je     13ea <main+0x21a>
mov    %rax,%rbx
lea    0x10(%rsp),%r14
mov    %r14,%rdi
mov    $0xfa0,%esi
mov    %rax,%rdx
call   10a0 <fgets@plt>
test   %rax,%rax
je     13a0 <main+0x1d0>
lea    0x11(%rsp),%r15
xor    %r13d,%r13d
movl   $0x0,0xc(%rsp)
xor    %r12d,%r12d
jmp    1263 <main+0x93>
nopl   0x0(%rax)
mov    %r15,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
mov    $0xfa0,%esi
mov    %rbx,%rdx
call   10a0 <fgets@plt>
test   %rax,%rax
je     1385 <main+0x1b5>
movzbl 0x10(%rsp),%eax
cmp    $0x23,%al
je     124a <main+0x7a>
cmp    $0x21,%al
je     1240 <main+0x70>
mov    %r14,%rdi
lea    0xe34(%rip),%rsi
mov    $0x3,%edx
call   1090 <memcmp@plt>
test   %rax,%rax
je     12ee <main+0x11e>
mov    %r14,%rdi
lea    0xdb2(%rip),%rsi
call   1080 <strspn@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1060 <strlen@plt>
cmp    %eax,%ebp
je     124a <main+0x7a>
mov    %r14,%rdi
call   1060 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%r14,1)
add    $0x1,%r13d
lea    0xd88(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xfb0(%rsp),%rbp
mov    %rbp,%rdi
mov    %r14,%rsi
call   1040 <strcpy@plt>
mov    %rbp,%rdi
call   10c0 <result@plt>
mov    %rax,%r12
jmp    124a <main+0x7a>
mov    %r15,%rbp
mov    %rbx,%rdi
call   10f0 <getCorrect@plt>
mov    %rax,%r15
mov    %r12,%rdi
mov    %rax,%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
je     1367 <main+0x197>
addl   $0x1,0xc(%rsp)
lea    0xd19(%rip),%rdi
lea    0xfb0(%rsp),%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xd6e(%rip),%rdi
call   1050 <puts@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xd6e(%rip),%rdi
call   1050 <puts@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xd6f(%rip),%rdi
call   1050 <puts@plt>
mov    %rbp,%r15
jmp    124a <main+0x7a>
lea    0xcaf(%rip),%rdi
lea    0xfb0(%rsp),%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbp,%r15
jmp    124a <main+0x7a>
mov    0xc(%rsp),%esi
test   %esi,%esi
je     13a3 <main+0x1d3>
lea    0xcc6(%rip),%rdi
mov    %r13d,%edx
xor    %eax,%eax
call   1070 <printf@plt>
jmp    13b4 <main+0x1e4>
xor    %r13d,%r13d
lea    0xccd(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xcd4(%rip),%rdi
call   1030 <remove@plt>
xor    %eax,%eax
add    $0x1f58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd06(%rip),%rdi
call   1050 <puts@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    0x8(%rbp),%rsi
lea    0xc0d(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"quiz file needs to be specified\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [27 x i8] c"Can not find quiz file %s\0A\00"
@.str.3 = [4 x i8] c"---\00"
@.str.4 = [20 x i8] c" passed %s\0A\00"
@.str.5 = [20 x i8] c" failed %s\0A\00"
@.str.6 = [23 x i8] c"------ Returned -----\0A\00"
@.str.7 = [24 x i8] c"------ Expected ------\0A\00"
@.str.8 = [25 x i8] c"-----------------------\0A\00"
@.str.9 = [4 x i8] c" \0A\0D\00"
@.str.10 = [17 x i8] c"test %-5i ... \00"
@.str.11 = [29 x i8] c"\0AFailed %i tests out of %i\0A\0A\00"
@.str.12 = [24 x i8] c"\0APassed all %i tests \0A\0A\00"
@.str.13 = [13 x i8] c"tempdata.dat\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [4000 x i8]
%10 = alloca [4000 x i8]
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32* null, i32** %6
store i8* null, i8** %7
store i8* null, i8** %8
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 2
br i1 %14, label %15, label %18
15: ; preds = %2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%17 = call i32 @exit(i32 1)
unreachable
18: ; preds = %2
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call i32* @fopen(i8* %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %22, i32** %6
%23 = load i32*, i32** %6
%24 = icmp ne i32* %23, null
br i1 %24, label %31, label %25
25: ; preds = %18
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 1
%28 = load i8*, i8** %27
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %28)
%30 = call i32 @exit(i32 1)
unreachable
31: ; preds = %18
store i32 0, i32* %11
store i32 0, i32* %12
br label %32
32: ; preds = %102, %31
%33 = getelementptr inbounds [4000 x i8], [4000 x i8]* %10, i64 0, i64 0
%34 = load i32*, i32** %6
%35 = call i64 @fgets(i8* %33, i32 4000, i32* %34)
%36 = icmp ne i64 %35, 0
br i1 %36, label %37, label %103
37: ; preds = %32
%38 = getelementptr inbounds [4000 x i8], [4000 x i8]* %10, i64 0, i64 0
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = icmp eq i32 %40, 35
br i1 %41, label %42, label %43
42: ; preds = %37
br label %102
43: ; preds = %37
%44 = getelementptr inbounds [4000 x i8], [4000 x i8]* %10, i64 0, i64 0
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = icmp eq i32 %46, 33
br i1 %47, label %48, label %52
48: ; preds = %43
%49 = getelementptr inbounds [4000 x i8], [4000 x i8]* %10, i64 0, i64 0
%50 = getelementptr inbounds i8, i8* %49, i64 1
%51 = call i32 (i8*, ...) @printf(i8* %50)
br label %101
52: ; preds = %43
%53 = getelementptr inbounds [4000 x i8], [4000 x i8]* %10, i64 0, i64 0
%54 = call i64 @memcmp(i8* %53, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %79
56: ; preds = %52
%57 = load i32*, i32** %6
%58 = call i8* @getCorrect(i32* %57)
store i8* %58, i8** %8
%59 = load i8*, i8** %7
%60 = load i8*, i8** %8
%61 = call i64 @strcmp(i8* %59, i8* %60)
%62 = icmp eq i64 %61, 0
br i1 %62, label %63, label %66
63: ; preds = %56
%64 = getelementptr inbounds [4000 x i8], [4000 x i8]* %9, i64 0, i64 0
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8* %64)
br label %78
66: ; preds = %56
%67 = load i32, i32* %11
%68 = add nsw i32 %67, 1
store i32 %68, i32* %11
%69 = getelementptr inbounds [4000 x i8], [4000 x i8]* %9, i64 0, i64 0
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8* %69)
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%72 = load i8*, i8** %7
%73 = call i32 (i8*, ...) @printf(i8* %72)
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0))
%75 = load i8*, i8** %8
%76 = call i32 (i8*, ...) @printf(i8* %75)
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
br label %78
78: ; preds = %66, %63
br label %100
79: ; preds = %52
%80 = getelementptr inbounds [4000 x i8], [4000 x i8]* %10, i64 0, i64 0
%81 = call i32 @strspn(i8* %80, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%82 = getelementptr inbounds [4000 x i8], [4000 x i8]* %10, i64 0, i64 0
%83 = call i32 @strlen(i8* %82)
%84 = icmp ne i32 %81, %83
br i1 %84, label %85, label %99
85: ; preds = %79
%86 = getelementptr inbounds [4000 x i8], [4000 x i8]* %10, i64 0, i64 0
%87 = call i32 @strlen(i8* %86)
%88 = sub nsw i32 %87, 1
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [4000 x i8], [4000 x i8]* %10, i64 0, i64 %89
store i8 0, i8* %90
%91 = load i32, i32* %12
%92 = add nsw i32 %91, 1
store i32 %92, i32* %12
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), i32 %92)
%94 = getelementptr inbounds [4000 x i8], [4000 x i8]* %9, i64 0, i64 0
%95 = getelementptr inbounds [4000 x i8], [4000 x i8]* %10, i64 0, i64 0
%96 = call i32 @strcpy(i8* %94, i8* %95)
%97 = getelementptr inbounds [4000 x i8], [4000 x i8]* %9, i64 0, i64 0
%98 = call i8* @result(i8* %97)
store i8* %98, i8** %7
br label %99
99: ; preds = %85, %79
br label %100
100: ; preds = %99, %78
br label %101
101: ; preds = %100, %48
br label %102
102: ; preds = %101, %42
br label %32
103: ; preds = %32
%104 = load i32, i32* %11
%105 = icmp ne i32 %104, 0
br i1 %105, label %106, label %110
106: ; preds = %103
%107 = load i32, i32* %11
%108 = load i32, i32* %12
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0), i32 %107, i32 %108)
br label %113
110: ; preds = %103
%111 = load i32, i32* %12
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i32 %111)
br label %113
113: ; preds = %110, %106
%114 = call i32 @remove(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [27 x i8] c"Can not find quiz file %s\0A\00"
@.str.3 = [4 x i8] c"---\00"
@.str.4 = [20 x i8] c" passed %s\0A\00"
@.str.5 = [20 x i8] c" failed %s\0A\00"
@.str.9 = [4 x i8] c" \0A\0D\00"
@.str.10 = [17 x i8] c"test %-5i ... \00"
@.str.11 = [29 x i8] c"\0AFailed %i tests out of %i\0A\0A\00"
@.str.12 = [24 x i8] c"\0APassed all %i tests \0A\0A\00"
@.str.13 = [13 x i8] c"tempdata.dat\00"
@str = [22 x i8] c"------ Returned -----\00"
@str.14 = [23 x i8] c"------ Expected ------\00"
@str.15 = [24 x i8] c"-----------------------\00"
@str.16 = [32 x i8] c"quiz file needs to be specified\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [4000 x i8]
%4 = alloca [4000 x i8]
%5 = getelementptr inbounds [4000 x i8], [4000 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [4000 x i8], [4000 x i8]* %4, i64 0, i64 0
%7 = icmp eq i32 %0, 2
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.16, i64 0, i64 0))
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = tail call i32* @fopen(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp eq i32* %14, null
br i1 %15, label %21, label %16
16: ; preds = %11
%17 = call i64 @fgets(i8* %6, i32 4000, i32* %14)
%18 = icmp eq i64 %17, 0
br i1 %18, label %72, label %19
19: ; preds = %16
%20 = getelementptr inbounds [4000 x i8], [4000 x i8]* %4, i64 0, i64 1
br label %25
21: ; preds = %11
%22 = load i8*, i8** %12
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %22)
%24 = tail call i32 @exit(i32 1)
unreachable
25: ; preds = %19, %62
%26 = phi i32 [ 0, %19 ], [ %65, %62 ]
%27 = phi i32 [ 0, %19 ], [ %64, %62 ]
%28 = phi i8* [ null, %19 ], [ %63, %62 ]
%29 = load i8, i8* %6
switch i8 %29, label %32 [
i8 35, label %62
i8 33, label %30
]
30: ; preds = %25
%31 = call i32 (i8*, ...) @printf(i8* %20)
br label %62
32: ; preds = %25
%33 = call i64 @memcmp(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %49
35: ; preds = %32
%36 = call i8* @getCorrect(i32* %14)
%37 = call i64 @strcmp(i8* %28, i8* %36)
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %35
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8* %5)
br label %62
41: ; preds = %35
%42 = add nsw i32 %27, 1
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8* %5)
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %28)
%46 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.14, i64 0, i64 0))
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %36)
%48 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.15, i64 0, i64 0))
br label %62
49: ; preds = %32
%50 = call i32 @strspn(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%51 = call i32 @strlen(i8* %6)
%52 = icmp eq i32 %50, %51
br i1 %52, label %62, label %53
53: ; preds = %49
%54 = call i32 @strlen(i8* %6)
%55 = add nsw i32 %54, -1
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [4000 x i8], [4000 x i8]* %4, i64 0, i64 %56
store i8 0, i8* %57
%58 = add nsw i32 %26, 1
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), i32 %58)
%60 = call i32 @strcpy(i8* %5, i8* %6)
%61 = call i8* @result(i8* %5)
br label %62
62: ; preds = %25, %30, %49, %53, %39, %41
%63 = phi i8* [ %28, %25 ], [ %28, %30 ], [ %28, %39 ], [ %28, %41 ], [ %61, %53 ], [ %28, %49 ]
%64 = phi i32 [ %27, %25 ], [ %27, %30 ], [ %27, %39 ], [ %42, %41 ], [ %27, %53 ], [ %27, %49 ]
%65 = phi i32 [ %26, %25 ], [ %26, %30 ], [ %26, %39 ], [ %26, %41 ], [ %58, %53 ], [ %26, %49 ]
%66 = call i64 @fgets(i8* %6, i32 4000, i32* %14)
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %25
68: ; preds = %62
%69 = icmp eq i32 %64, 0
br i1 %69, label %72, label %70
70: ; preds = %68
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0), i32 %64, i32 %65)
br label %75
72: ; preds = %16, %68
%73 = phi i32 [ %65, %68 ], [ 0, %16 ]
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i32 %73)
br label %75
75: ; preds = %72, %70
%76 = call i32 @remove(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0))
ret i32 0
}