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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ printf(char *, char *, int);
scalar_t__ scanf(char *, char *);
scalar_t__ strlen(char *);
scalar_t__ strncmp(char *, char *, int);
int /*<<< orphan*/ strrev(char *, char *, int);
int main() {
  char input[1024];
  int palindromes = 0;
  while (scanf("%s", input) != EOF) {
    int length = (int)strlen(input);
    int size = length + 1;
    char entries[length][1024];
    for (int i = 0; i < length; i++) {
      for (int k = 0; k < length; k++) {
        char substring1[size];
        char substring2[size];
        memset(substring1, '\0', size);
        memset(substring2, '\0', size);
        memcpy(substring1, &input[i], k + 1);
        int substringLength = (int)strlen(substring1);
        strrev(substring1, substring2, substringLength);
        if (strncmp(substring1, substring2, substringLength) == 0) {
          int found = 0;
          for (int m = 0; m < palindromes && !found; m++) {
            if (strncmp(substring1, entries[m], substringLength) == 0) {
              found = 1;
            }
          }
          if (!found) {
            memcpy(entries[palindromes], substring1, substringLength);
            palindromes++;
          }
        }
      }
    }
    printf("The string '%s' contains %i palindromes.\n", input, palindromes);
    memset(input, '\0', 1024);
    for (int m = 0; m < palindromes; m++) {
      memset(entries[m], '\0', 1024);
    }
    palindromes = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x480,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x414(%rbp)
lea    -0x410(%rbp),%rsi
lea    0xe66(%rip),%rdi
call   1080 <scanf@plt>
mov    0x2e42(%rip),%rcx
cmp    (%rcx),%rax
je     14e1 <main+0x371>
lea    -0x410(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x418(%rbp)
mov    -0x418(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x41c(%rbp)
mov    -0x418(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x428(%rbp)
mov    %rax,%rdx
shl    $0xa,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x468(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x430(%rbp)
movl   $0x0,-0x434(%rbp)
mov    -0x434(%rbp),%eax
cmp    -0x418(%rbp),%eax
jge    144b <main+0x2db>
movl   $0x0,-0x438(%rbp)
mov    -0x438(%rbp),%eax
cmp    -0x418(%rbp),%eax
jge    1432 <main+0x2c2>
mov    -0x41c(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x440(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x478(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x448(%rbp)
mov    -0x41c(%rbp),%eax
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x470(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x450(%rbp)
mov    -0x41c(%rbp),%edx
xor    %esi,%esi
call   1060 <memset@plt>
mov    -0x470(%rbp),%rdi
mov    -0x41c(%rbp),%edx
xor    %esi,%esi
call   1060 <memset@plt>
mov    -0x478(%rbp),%rdi
movslq -0x434(%rbp),%rax
lea    -0x410(%rbp),%rsi
add    %rax,%rsi
mov    -0x438(%rbp),%edx
add    $0x1,%edx
call   1070 <memcpy@plt>
mov    -0x478(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x478(%rbp),%rdi
mov    -0x470(%rbp),%rsi
mov    %eax,-0x454(%rbp)
mov    -0x454(%rbp),%edx
call   1090 <strrev@plt>
mov    -0x478(%rbp),%rdi
mov    -0x470(%rbp),%rsi
mov    -0x454(%rbp),%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1414 <main+0x2a4>
movl   $0x0,-0x458(%rbp)
movl   $0x0,-0x45c(%rbp)
mov    -0x45c(%rbp),%ecx
xor    %eax,%eax
cmp    -0x414(%rbp),%ecx
mov    %al,-0x479(%rbp)
jge    1365 <main+0x1f5>
cmpl   $0x0,-0x458(%rbp)
setne  %al
xor    $0xff,%al
mov    %al,-0x479(%rbp)
mov    -0x479(%rbp),%al
test   $0x1,%al
jne    1378 <main+0x208>
jmp    13cc <main+0x25c>
mov    -0x478(%rbp),%rdi
mov    -0x468(%rbp),%rsi
movslq -0x45c(%rbp),%rax
shl    $0xa,%rax
add    %rax,%rsi
mov    -0x454(%rbp),%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    13b3 <main+0x243>
movl   $0x1,-0x458(%rbp)
jmp    13b8 <main+0x248>
mov    -0x45c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x45c(%rbp)
jmp    1339 <main+0x1c9>
cmpl   $0x0,-0x458(%rbp)
jne    140f <main+0x29f>
mov    -0x478(%rbp),%rsi
mov    -0x468(%rbp),%rdi
movslq -0x414(%rbp),%rax
shl    $0xa,%rax
add    %rax,%rdi
mov    -0x454(%rbp),%edx
call   1070 <memcpy@plt>
mov    -0x414(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x414(%rbp)
jmp    1414 <main+0x2a4>
mov    -0x440(%rbp),%rax
mov    %rax,%rsp
mov    -0x438(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x438(%rbp)
jmp    1224 <main+0xb4>
jmp    1437 <main+0x2c7>
mov    -0x434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x434(%rbp)
jmp    1208 <main+0x98>
lea    -0x410(%rbp),%rsi
mov    -0x414(%rbp),%edx
lea    0xba4(%rip),%rdi
call   1050 <printf@plt>
lea    -0x410(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1060 <memset@plt>
movl   $0x0,-0x460(%rbp)
mov    -0x460(%rbp),%eax
cmp    -0x414(%rbp),%eax
jge    14c8 <main+0x358>
mov    -0x468(%rbp),%rdi
movslq -0x460(%rbp),%rax
shl    $0xa,%rax
add    %rax,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1060 <memset@plt>
mov    -0x460(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x460(%rbp)
jmp    1481 <main+0x311>
movl   $0x0,-0x414(%rbp)
mov    -0x428(%rbp),%rax
mov    %rax,%rsp
jmp    118c <main+0x1c>
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x458,%rsp
lea    0xe75(%rip),%rdi
lea    -0x480(%rbp),%rsi
call   1080 <scanf@plt>
mov    0x2e4a(%rip),%rcx
cmp    (%rcx),%rax
jne    11b4 <main+0x44>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    -0x480(%rbp),%rbx
jmp    11e6 <main+0x76>
nopl   (%rax)
mov    -0x58(%rbp),%rsp
lea    0xe35(%rip),%rdi
lea    -0x480(%rbp),%rbx
mov    %rbx,%rsi
call   1080 <scanf@plt>
mov    0x2e07(%rip),%rcx
cmp    (%rcx),%rax
je     11a3 <main+0x33>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rax,%r13
mov    %rsp,-0x58(%rbp)
mov    %r13d,%eax
mov    %rsp,%rcx
shl    $0xa,%rax
sub    %rax,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
movl   $0x0,-0x2c(%rbp)
test   %r13d,%r13d
jle    1380 <main+0x210>
lea    0x1(%r13),%eax
mov    %eax,-0x4c(%rbp)
mov    %eax,%eax
mov    %rax,-0x70(%rbp)
mov    %r13d,%eax
mov    %rax,-0x60(%rbp)
xor    %eax,%eax
movl   $0x0,-0x2c(%rbp)
mov    %r13,-0x68(%rbp)
jmp    124e <main+0xde>
nopl   0x0(%rax)
add    $0x1,%rax
cmp    -0x60(%rbp),%rax
je     1380 <main+0x210>
lea    (%rax,%rbp,1),%rcx
add    $0xfffffffffffffb80,%rcx
mov    %rcx,-0x78(%rbp)
xor    %r15d,%r15d
mov    %rax,-0x40(%rbp)
jmp    129a <main+0x12a>
movslq %eax,%r14
mov    -0x38(%rbp),%rax
shl    $0xa,%r14
add    %rax,%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r12d,%edx
call   1070 <memcpy@plt>
addl   $0x1,-0x2c(%rbp)
mov    -0x40(%rbp),%rax
mov    -0x30(%rbp),%r15d
mov    -0x48(%rbp),%rcx
mov    %rcx,%rsp
cmp    %r13d,%r15d
je     1240 <main+0xd0>
mov    %rsp,-0x48(%rbp)
mov    %rsp,%rbx
mov    -0x70(%rbp),%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rsp,%r14
sub    %rax,%r14
mov    %r14,%rsp
mov    %rbx,%rdi
xor    %esi,%esi
mov    -0x4c(%rbp),%r12d
mov    %r12d,%edx
call   1060 <memset@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    %r12d,%edx
call   1060 <memset@plt>
add    $0x1,%r15d
mov    %rbx,%rdi
mov    -0x78(%rbp),%rsi
mov    %r15d,-0x30(%rbp)
mov    %r15d,%edx
call   1070 <memcpy@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rax,%r12
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r12d,%edx
call   1090 <strrev@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r12d,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    1286 <main+0x116>
mov    -0x2c(%rbp),%eax
test   %eax,%eax
jle    1266 <main+0xf6>
mov    %eax,%r14d
mov    $0x1,%r13d
mov    -0x38(%rbp),%r15
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r12d,%edx
call   1030 <strncmp@plt>
cmp    %r14,%r13
jae    1363 <main+0x1f3>
add    $0x400,%r15
add    $0x1,%r13
test   %rax,%rax
jne    1340 <main+0x1d0>
test   %rax,%rax
mov    -0x38(%rbp),%rax
mov    -0x68(%rbp),%r13
jne    126d <main+0xfd>
jmp    1286 <main+0x116>
nopl   0x0(%rax)
lea    0xc7c(%rip),%rdi
lea    -0x480(%rbp),%rbx
mov    %rbx,%rsi
mov    -0x2c(%rbp),%r14d
mov    %r14d,%edx
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1060 <memset@plt>
test   %r14d,%r14d
mov    -0x38(%rbp),%rbx
jle    11c0 <main+0x50>
mov    %r14d,%r14d
nopl   0x0(%rax)
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1060 <memset@plt>
add    $0x400,%rbx
add    $0xffffffffffffffff,%r14
jne    13c0 <main+0x250>
jmp    11c0 <main+0x50>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@EOF = global i64 0
@.str.1 = [42 x i8] c"The string '%s' contains %i palindromes.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1024 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i64
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %17
17: ; preds = %131, %0
%18 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%19 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %18)
%20 = load i64, i64* @EOF
%21 = icmp ne i64 %19, %20
br i1 %21, label %22, label %133
22: ; preds = %17
%23 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%24 = call i64 @strlen(i8* %23)
%25 = trunc i64 %24 to i32
store i32 %25, i32* %4
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 1
store i32 %27, i32* %5
%28 = load i32, i32* %4
%29 = zext i32 %28 to i64
%30 = call i8* @llvm.stacksave()
store i8* %30, i8** %6
%31 = alloca [1024 x i8], i64 %29
store i64 %29, i64* %7
store i32 0, i32* %8
br label %32
32: ; preds = %109, %22
%33 = load i32, i32* %8
%34 = load i32, i32* %4
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %112
36: ; preds = %32
store i32 0, i32* %9
br label %37
37: ; preds = %105, %36
%38 = load i32, i32* %9
%39 = load i32, i32* %4
%40 = icmp slt i32 %38, %39
br i1 %40, label %41, label %108
41: ; preds = %37
%42 = load i32, i32* %5
%43 = zext i32 %42 to i64
%44 = call i8* @llvm.stacksave()
store i8* %44, i8** %10
%45 = alloca i8, i64 %43
store i64 %43, i64* %11
%46 = load i32, i32* %5
%47 = zext i32 %46 to i64
%48 = alloca i8, i64 %47
store i64 %47, i64* %12
%49 = load i32, i32* %5
%50 = call i32 @memset(i8* %45, i8 signext 0, i32 %49)
%51 = load i32, i32* %5
%52 = call i32 @memset(i8* %48, i8 signext 0, i32 %51)
%53 = load i32, i32* %8
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %54
%56 = load i32, i32* %9
%57 = add nsw i32 %56, 1
%58 = call i32 @memcpy(i8* %45, i8* %55, i32 %57)
%59 = call i64 @strlen(i8* %45)
%60 = trunc i64 %59 to i32
store i32 %60, i32* %13
%61 = load i32, i32* %13
%62 = call i32 @strrev(i8* %45, i8* %48, i32 %61)
%63 = load i32, i32* %13
%64 = call i64 @strncmp(i8* %45, i8* %48, i32 %63)
%65 = icmp eq i64 %64, 0
br i1 %65, label %66, label %103
66: ; preds = %41
store i32 0, i32* %14
store i32 0, i32* %15
br label %67
67: ; preds = %87, %66
%68 = load i32, i32* %15
%69 = load i32, i32* %3
%70 = icmp slt i32 %68, %69
br i1 %70, label %71, label %75
71: ; preds = %67
%72 = load i32, i32* %14
%73 = icmp ne i32 %72, 0
%74 = xor i1 %73, true
br label %75
75: ; preds = %71, %67
%76 = phi i1 [ false, %67 ], [ %74, %71 ]
br i1 %76, label %77, label %90
77: ; preds = %75
%78 = load i32, i32* %15
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [1024 x i8], [1024 x i8]* %31, i64 %79
%81 = getelementptr inbounds [1024 x i8], [1024 x i8]* %80, i64 0, i64 0
%82 = load i32, i32* %13
%83 = call i64 @strncmp(i8* %45, i8* %81, i32 %82)
%84 = icmp eq i64 %83, 0
br i1 %84, label %85, label %86
85: ; preds = %77
store i32 1, i32* %14
br label %86
86: ; preds = %85, %77
br label %87
87: ; preds = %86
%88 = load i32, i32* %15
%89 = add nsw i32 %88, 1
store i32 %89, i32* %15
br label %67
90: ; preds = %75
%91 = load i32, i32* %14
%92 = icmp ne i32 %91, 0
br i1 %92, label %102, label %93
93: ; preds = %90
%94 = load i32, i32* %3
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [1024 x i8], [1024 x i8]* %31, i64 %95
%97 = getelementptr inbounds [1024 x i8], [1024 x i8]* %96, i64 0, i64 0
%98 = load i32, i32* %13
%99 = call i32 @memcpy(i8* %97, i8* %45, i32 %98)
%100 = load i32, i32* %3
%101 = add nsw i32 %100, 1
store i32 %101, i32* %3
br label %102
102: ; preds = %93, %90
br label %103
103: ; preds = %102, %41
%104 = load i8*, i8** %10
br label %105
105: ; preds = %103
%106 = load i32, i32* %9
%107 = add nsw i32 %106, 1
store i32 %107, i32* %9
br label %37
108: ; preds = %37
br label %109
109: ; preds = %108
%110 = load i32, i32* %8
%111 = add nsw i32 %110, 1
store i32 %111, i32* %8
br label %32
112: ; preds = %32
%113 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%114 = load i32, i32* %3
%115 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i8* %113, i32 %114)
%116 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%117 = call i32 @memset(i8* %116, i8 signext 0, i32 1024)
store i32 0, i32* %16
br label %118
118: ; preds = %128, %112
%119 = load i32, i32* %16
%120 = load i32, i32* %3
%121 = icmp slt i32 %119, %120
br i1 %121, label %122, label %131
122: ; preds = %118
%123 = load i32, i32* %16
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [1024 x i8], [1024 x i8]* %31, i64 %124
%126 = getelementptr inbounds [1024 x i8], [1024 x i8]* %125, i64 0, i64 0
%127 = call i32 @memset(i8* %126, i8 signext 0, i32 1024)
br label %128
128: ; preds = %122
%129 = load i32, i32* %16
%130 = add nsw i32 %129, 1
store i32 %130, i32* %16
br label %118
131: ; preds = %118
store i32 0, i32* %3
%132 = load i8*, i8** %6
br label %17
133: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@EOF = global i64 0
@.str.1 = [42 x i8] c"The string '%s' contains %i palindromes.\0A\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
br i1 %5, label %79, label %6
6: ; preds = %0, %69
%7 = call i64 @strlen(i8* %2)
%8 = trunc i64 %7 to i32
%9 = add nsw i32 %8, 1
%10 = and i64 %7, 4294967295
%11 = call i8* @llvm.stacksave()
%12 = alloca [1024 x i8], i64 %10
%13 = icmp sgt i32 %8, 0
br i1 %13, label %14, label %21
14: ; preds = %6
%15 = zext i32 %9 to i64
%16 = and i64 %7, 4294967295
br label %17
17: ; preds = %28, %14
%18 = phi i64 [ 0, %14 ], [ %29, %28 ]
%19 = phi i32 [ 0, %14 ], [ %67, %28 ]
%20 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 %18
br label %31
21: ; preds = %28, %6
%22 = phi i32 [ 0, %6 ], [ %67, %28 ]
%23 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i8* %2, i32 %22)
%24 = call i32 @memset(i8* %2, i8 signext 0, i32 1024)
%25 = icmp sgt i32 %22, 0
br i1 %25, label %26, label %69
26: ; preds = %21
%27 = zext i32 %22 to i64
br label %73
28: ; preds = %66
%29 = add nuw nsw i64 %18, 1
%30 = icmp eq i64 %29, %16
br i1 %30, label %21, label %17
31: ; preds = %17, %66
%32 = phi i32 [ %19, %17 ], [ %67, %66 ]
%33 = phi i32 [ 0, %17 ], [ %39, %66 ]
%34 = call i8* @llvm.stacksave()
%35 = alloca i8, i64 %15
%36 = alloca i8, i64 %15
%37 = call i32 @memset(i8* %35, i8 signext 0, i32 %9)
%38 = call i32 @memset(i8* %36, i8 signext 0, i32 %9)
%39 = add nuw nsw i32 %33, 1
%40 = call i32 @memcpy(i8* %35, i8* %20, i32 %39)
%41 = call i64 @strlen(i8* %35)
%42 = trunc i64 %41 to i32
%43 = call i32 @strrev(i8* %35, i8* %36, i32 %42)
%44 = call i64 @strncmp(i8* %35, i8* %36, i32 %42)
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %66
46: ; preds = %31
%47 = icmp sgt i32 %32, 0
br i1 %47, label %50, label %48
48: ; preds = %46
%49 = sext i32 %32 to i64
br label %61
50: ; preds = %46
%51 = zext i32 %32 to i64
br label %53
52: ; preds = %53
br i1 %57, label %61, label %66
53: ; preds = %50, %53
%54 = phi i64 [ 0, %50 ], [ %58, %53 ]
%55 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 %54, i64 0
%56 = call i64 @strncmp(i8* %35, i8* %55, i32 %42)
%57 = icmp ne i64 %56, 0
%58 = add nuw nsw i64 %54, 1
%59 = icmp ult i64 %58, %51
%60 = select i1 %59, i1 %57, i1 false
br i1 %60, label %53, label %52
61: ; preds = %48, %52
%62 = phi i64 [ %49, %48 ], [ %51, %52 ]
%63 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 %62, i64 0
%64 = call i32 @memcpy(i8* %63, i8* %35, i32 %42)
%65 = add nsw i32 %32, 1
br label %66
66: ; preds = %52, %61, %31
%67 = phi i32 [ %32, %31 ], [ %32, %52 ], [ %65, %61 ]
%68 = icmp eq i32 %39, %8
br i1 %68, label %28, label %31
69: ; preds = %73, %21
%70 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%71 = load i64, i64* @EOF
%72 = icmp eq i64 %70, %71
br i1 %72, label %79, label %6
73: ; preds = %26, %73
%74 = phi i64 [ 0, %26 ], [ %77, %73 ]
%75 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 %74, i64 0
%76 = call i32 @memset(i8* %75, i8 signext 0, i32 1024)
%77 = add nuw nsw i64 %74, 1
%78 = icmp eq i64 %77, %27
br i1 %78, label %69, label %73
79: ; preds = %69, %0
ret i32 0
}