#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 uint8_t;

/* Variables and functions */
int /*<<< orphan*/ __fpurge(int /*<<< orphan*/);
int /*<<< orphan*/ clear_screen();
int /*<<< orphan*/ free(char *);
size_t getline(char **, size_t *, int /*<<< orphan*/);
int /*<<< orphan*/ print_configuration(int, int *);
int /*<<< orphan*/ printf(char *, ...);
int scanf(char *, int *);
int sscanf(char *, char *, int *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strcmp(char *, char *);
bool edit_configuration(int *rdc, uint8_t *capacity) {
  bool result = false;
  int status = 0;
  char *line = NULL;
  size_t len, size;
  int n, num, val;
  do {
    clear_screen();
    if (status == -1)
      printf("Invalid input, data not changed\n");
    else if (status == 1)
      printf("OK\n");
    print_configuration(*rdc, capacity);
    status = -1;
    printf("Enter OCV number (0-15) or \"rdc\" to change, <none> to finish: ");
    __fpurge(stdin);
    if ((len = getline(&line, &size, stdin)) != -1) {
      if (!strcmp(line, "rdc\n")) {
        printf("Enter new Rdc (75000-1000000) [%d]: ", *rdc);
        n = scanf("%d", &val);
        if (n == 1 && val > 75000 && val < 1000000) {
          *rdc = val;
          status = 1;
        }
      } else {
        n = sscanf(line, "%d", &num);
        if (n == 1 && num >= 0 && num <= 15) {
          printf("Enter new capacity (0-100) [%d]: ", capacity[num]);
          n = scanf("%d", &val);
          if (n == 1 && val >= 0 && val <= 100) {
            capacity[num] = val;
            status = 1;
          }
        }
      }
      free(line);
      line = NULL;
      size = 0;
    }
  } while (len > 1);
  printf("Save changes? (Y/N) [N]: ");
  __fpurge(stdin);
  if ((len = getline(&line, &size, stdin)) != -1) {
    if (!strcmp(line, "Y\n"))
      result = true;
    free(line);
  }
  return result;
}


x86 assembly (clang, -O0):
<edit_configuration>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    $0x0,%al
call   10a0 <clear_screen@plt>
cmpl   $0xffffffff,-0x18(%rbp)
jne    11da <edit_configuration+0x4a>
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    11f7 <edit_configuration+0x67>
cmpl   $0x1,-0x18(%rbp)
jne    11f2 <edit_configuration+0x62>
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    11f7 <edit_configuration+0x67>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
call   1080 <print_configuration@plt>
movl   $0xffffffff,-0x18(%rbp)
lea    0xe11(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2dc6(%rip),%rax
mov    (%rax),%edi
call   1040 <__fpurge@plt>
mov    0x2db8(%rip),%rax
mov    (%rax),%edx
lea    -0x20(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   10b0 <getline@plt>
mov    %rax,-0x28(%rbp)
cmp    $0xffffffffffffffff,%rax
je     137d <edit_configuration+0x1ed>
mov    -0x20(%rbp),%rdi
lea    0xe0c(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    12c6 <edit_configuration+0x136>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe0d(%rip),%rdi
lea    -0x3c(%rbp),%rsi
call   1090 <scanf@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x1,-0x34(%rbp)
jne    12c1 <edit_configuration+0x131>
cmpl   $0x124f8,-0x3c(%rbp)
jle    12c1 <edit_configuration+0x131>
cmpl   $0xf4240,-0x3c(%rbp)
jge    12c1 <edit_configuration+0x131>
mov    -0x3c(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x18(%rbp)
jmp    1364 <edit_configuration+0x1d4>
mov    -0x20(%rbp),%rdi
lea    0xdbd(%rip),%rsi
lea    -0x38(%rbp),%rdx
call   1070 <sscanf@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x1,-0x34(%rbp)
jne    135f <edit_configuration+0x1cf>
cmpl   $0x0,-0x38(%rbp)
jl     135f <edit_configuration+0x1cf>
cmpl   $0xf,-0x38(%rbp)
jg     135f <edit_configuration+0x1cf>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd84(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd73(%rip),%rdi
lea    -0x3c(%rbp),%rsi
call   1090 <scanf@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x1,-0x34(%rbp)
jne    135a <edit_configuration+0x1ca>
cmpl   $0x0,-0x3c(%rbp)
jl     135a <edit_configuration+0x1ca>
cmpl   $0x64,-0x3c(%rbp)
jg     135a <edit_configuration+0x1ca>
mov    -0x3c(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
movl   $0x1,-0x18(%rbp)
jmp    135f <edit_configuration+0x1cf>
jmp    1364 <edit_configuration+0x1d4>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x30(%rbp)
jmp    1382 <edit_configuration+0x1f2>
cmpq   $0x1,-0x28(%rbp)
ja     11b6 <edit_configuration+0x26>
lea    0xd1f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2c46(%rip),%rax
mov    (%rax),%edi
call   1040 <__fpurge@plt>
mov    0x2c38(%rip),%rax
mov    (%rax),%edx
lea    -0x20(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   10b0 <getline@plt>
mov    %rax,-0x28(%rbp)
cmp    $0xffffffffffffffff,%rax
je     13f6 <edit_configuration+0x266>
mov    -0x20(%rbp),%rdi
lea    0xcf5(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    13ed <edit_configuration+0x25d>
movl   $0x1,-0x14(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<edit_configuration>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r14
mov    %rdi,%r13
movq   $0x0,0x10(%rsp)
mov    0x2e24(%rip),%r12
xor    %ebx,%ebx
jmp    11fb <edit_configuration+0x5b>
nopl   0x0(%rax,%rax,1)
mov    $0x1,%ebx
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
movq   $0x0,0x10(%rsp)
movq   $0x0,0x20(%rsp)
cmp    $0x1,%rbp
jbe    1384 <edit_configuration+0x1e4>
xor    %eax,%eax
call   10b0 <clear_screen@plt>
lea    0xea5(%rip),%rdi
cmp    $0xffffffff,%ebx
je     121a <edit_configuration+0x7a>
cmp    $0x1,%ebx
jne    121f <edit_configuration+0x7f>
lea    0xe91(%rip),%rdi
call   1040 <puts@plt>
mov    0x0(%r13),%edi
mov    %r14,%rsi
call   1090 <print_configuration@plt>
lea    0xdce(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    (%r12),%edi
call   1050 <__fpurge@plt>
mov    (%r12),%edx
lea    0x10(%rsp),%rdi
lea    0x20(%rsp),%rsi
call   10c0 <getline@plt>
mov    %rax,%rbp
cmp    $0xffffffffffffffff,%rax
je     1310 <edit_configuration+0x170>
mov    0x10(%rsp),%r15
mov    %r15,%rdi
lea    0xdce(%rip),%rsi
call   1070 <strcmp@plt>
test   %eax,%eax
je     1330 <edit_configuration+0x190>
mov    %r15,%rdi
lea    0xde1(%rip),%rsi
lea    0x1c(%rsp),%rdx
call   1080 <sscanf@plt>
mov    $0xffffffff,%ebx
cmp    $0x1,%eax
jne    11d5 <edit_configuration+0x35>
mov    0x1c(%rsp),%eax
test   %eax,%eax
js     11d5 <edit_configuration+0x35>
cmp    $0xf,%eax
jg     11d5 <edit_configuration+0x35>
mov    (%r14,%rax,4),%esi
lea    0xdac(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xd9b(%rip),%rdi
lea    0xc(%rsp),%rsi
call   10a0 <scanf@plt>
cmp    $0x1,%eax
jne    11d5 <edit_configuration+0x35>
mov    0xc(%rsp),%eax
test   %eax,%eax
js     11d5 <edit_configuration+0x35>
cmp    $0x64,%eax
jg     11d5 <edit_configuration+0x35>
movslq 0x1c(%rsp),%rcx
mov    %eax,(%r14,%rcx,4)
jmp    11d0 <edit_configuration+0x30>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0xffffffff,%ebx
cmp    $0x1,%rbp
ja     11fb <edit_configuration+0x5b>
jmp    1384 <edit_configuration+0x1e4>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x0(%r13),%esi
lea    0xd09(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xd20(%rip),%rdi
lea    0xc(%rsp),%rsi
call   10a0 <scanf@plt>
mov    $0xffffffff,%ebx
cmp    $0x1,%eax
jne    11d5 <edit_configuration+0x35>
mov    0xc(%rsp),%eax
cmp    $0x124f9,%eax
jl     11d5 <edit_configuration+0x35>
cmp    $0xf423f,%eax
jg     11d5 <edit_configuration+0x35>
mov    %eax,0x0(%r13)
jmp    11d0 <edit_configuration+0x30>
lea    0xd03(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <printf@plt>
mov    (%r12),%edi
call   1050 <__fpurge@plt>
mov    (%r12),%edx
lea    0x10(%rsp),%rdi
lea    0x20(%rsp),%rsi
call   10c0 <getline@plt>
cmp    $0xffffffffffffffff,%rax
je     13d9 <edit_configuration+0x239>
mov    0x10(%rsp),%rbp
lea    0xce6(%rip),%rsi
mov    %rbp,%rdi
call   1070 <strcmp@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %ebx,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Invalid input, data not changed\0A\00"
@.str.1 = [4 x i8] c"OK\0A\00"
@.str.2 = [63 x i8] c"Enter OCV number (0-15) or \22rdc\22 to change, <none> to finish: \00"
@stdin = global i32 0
@.str.3 = [5 x i8] c"rdc\0A\00"
@.str.4 = [37 x i8] c"Enter new Rdc (75000-1000000) [%d]: \00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [34 x i8] c"Enter new capacity (0-100) [%d]: \00"
@.str.7 = [26 x i8] c"Save changes? (Y/N) [N]: \00"
@.str.8 = [3 x i8] c"Y\0A\00"
define i32 @edit_configuration(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 0, i32* %5
store i32 0, i32* %6
store i8* null, i8** %7
br label %13
13: ; preds = %96, %2
%14 = call i32 (...) @clear_screen()
%15 = load i32, i32* %6
%16 = icmp eq i32 %15, -1
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %25
19: ; preds = %13
%20 = load i32, i32* %6
%21 = icmp eq i32 %20, 1
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %22, %19
br label %25
25: ; preds = %24, %17
%26 = load i32*, i32** %3
%27 = load i32, i32* %26
%28 = load i32*, i32** %4
%29 = call i32 @print_configuration(i32 %27, i32* %28)
store i32 -1, i32* %6
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0))
%31 = load i32, i32* @stdin
%32 = call i32 @__fpurge(i32 %31)
%33 = load i32, i32* @stdin
%34 = call i64 @getline(i8** %7, i64* %9, i32 %33)
store i64 %34, i64* %8
%35 = icmp ne i64 %34, -1
br i1 %35, label %36, label %95
36: ; preds = %25
%37 = load i8*, i8** %7
%38 = call i32 @strcmp(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%39 = icmp ne i32 %38, 0
br i1 %39, label %57, label %40
40: ; preds = %36
%41 = load i32*, i32** %3
%42 = load i32, i32* %41
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i32 %42)
%44 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %12)
store i32 %44, i32* %10
%45 = load i32, i32* %10
%46 = icmp eq i32 %45, 1
br i1 %46, label %47, label %56
47: ; preds = %40
%48 = load i32, i32* %12
%49 = icmp sgt i32 %48, 75000
br i1 %49, label %50, label %56
50: ; preds = %47
%51 = load i32, i32* %12
%52 = icmp slt i32 %51, 1000000
br i1 %52, label %53, label %56
53: ; preds = %50
%54 = load i32, i32* %12
%55 = load i32*, i32** %3
store i32 %54, i32* %55
store i32 1, i32* %6
br label %56
56: ; preds = %53, %50, %47, %40
br label %92
57: ; preds = %36
%58 = load i8*, i8** %7
%59 = call i32 @sscanf(i8* %58, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %11)
store i32 %59, i32* %10
%60 = load i32, i32* %10
%61 = icmp eq i32 %60, 1
br i1 %61, label %62, label %91
62: ; preds = %57
%63 = load i32, i32* %11
%64 = icmp sge i32 %63, 0
br i1 %64, label %65, label %91
65: ; preds = %62
%66 = load i32, i32* %11
%67 = icmp sle i32 %66, 15
br i1 %67, label %68, label %91
68: ; preds = %65
%69 = load i32*, i32** %4
%70 = load i32, i32* %11
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds i32, i32* %69, i64 %71
%73 = load i32, i32* %72
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32 %73)
%75 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %12)
store i32 %75, i32* %10
%76 = load i32, i32* %10
%77 = icmp eq i32 %76, 1
br i1 %77, label %78, label %90
78: ; preds = %68
%79 = load i32, i32* %12
%80 = icmp sge i32 %79, 0
br i1 %80, label %81, label %90
81: ; preds = %78
%82 = load i32, i32* %12
%83 = icmp sle i32 %82, 100
br i1 %83, label %84, label %90
84: ; preds = %81
%85 = load i32, i32* %12
%86 = load i32*, i32** %4
%87 = load i32, i32* %11
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i32, i32* %86, i64 %88
store i32 %85, i32* %89
store i32 1, i32* %6
br label %90
90: ; preds = %84, %81, %78, %68
br label %91
91: ; preds = %90, %65, %62, %57
br label %92
92: ; preds = %91, %56
%93 = load i8*, i8** %7
%94 = call i32 @free(i8* %93)
store i8* null, i8** %7
store i64 0, i64* %9
br label %95
95: ; preds = %92, %25
br label %96
96: ; preds = %95
%97 = load i64, i64* %8
%98 = icmp ugt i64 %97, 1
br i1 %98, label %13, label %99
99: ; preds = %96
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%101 = load i32, i32* @stdin
%102 = call i32 @__fpurge(i32 %101)
%103 = load i32, i32* @stdin
%104 = call i64 @getline(i8** %7, i64* %9, i32 %103)
store i64 %104, i64* %8
%105 = icmp ne i64 %104, -1
br i1 %105, label %106, label %114
106: ; preds = %99
%107 = load i8*, i8** %7
%108 = call i32 @strcmp(i8* %107, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%109 = icmp ne i32 %108, 0
br i1 %109, label %111, label %110
110: ; preds = %106
store i32 1, i32* %5
br label %111
111: ; preds = %110, %106
%112 = load i8*, i8** %7
%113 = call i32 @free(i8* %112)
br label %114
114: ; preds = %111, %99
%115 = load i32, i32* %5
ret i32 %115
}

LLVM IR (-O2):
@.str.2 = [63 x i8] c"Enter OCV number (0-15) or \22rdc\22 to change, <none> to finish: \00"
@stdin = global i32 0
@.str.3 = [5 x i8] c"rdc\0A\00"
@.str.4 = [37 x i8] c"Enter new Rdc (75000-1000000) [%d]: \00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [34 x i8] c"Enter new capacity (0-100) [%d]: \00"
@.str.7 = [26 x i8] c"Save changes? (Y/N) [N]: \00"
@.str.8 = [3 x i8] c"Y\0A\00"
@str = [3 x i8] c"OK\00"
@str.9 = [32 x i8] c"Invalid input, data not changed\00"
define i32 @edit_configuration(i32* nocapture %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
%7 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%8 = bitcast i64* %4 to i8*
%9 = bitcast i32* %5 to i8*
%10 = bitcast i32* %6 to i8*
br label %11
11: ; preds = %70, %2
%12 = phi i32 [ 0, %2 ], [ %71, %70 ]
%13 = call i32 (...) @clear_screen()
switch i32 %12, label %18 [
i32 -1, label %15
i32 1, label %14
]
14: ; preds = %11
br label %15
15: ; preds = %11, %14
%16 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0), %14 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @str.9, i64 0, i64 0), %11 ]
%17 = call i32 @puts(i8* dereferenceable(1) %16)
br label %18
18: ; preds = %15, %11
%19 = load i32, i32* %0
%20 = call i32 @print_configuration(i32 %19, i32* %1)
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0))
%22 = load i32, i32* @stdin
%23 = call i32 @__fpurge(i32 %22)
%24 = load i32, i32* @stdin
%25 = call i64 @getline(i8** %3, i64* %4, i32 %24)
%26 = icmp eq i64 %25, -1
br i1 %26, label %70, label %27
27: ; preds = %18
%28 = load i8*, i8** %3
%29 = call i32 @strcmp(i8* dereferenceable(1) %28, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %42
31: ; preds = %27
%32 = load i32, i32* %0
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i32 %32)
%34 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %6)
%35 = icmp eq i32 %34, 1
%36 = load i32, i32* %6
%37 = icmp sgt i32 %36, 75000
%38 = select i1 %35, i1 %37, i1 false
%39 = icmp slt i32 %36, 1000000
%40 = select i1 %38, i1 %39, i1 false
br i1 %40, label %41, label %66
41: ; preds = %31
store i32 %36, i32* %0
br label %66
42: ; preds = %27
%43 = call i32 @sscanf(i8* %28, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %5)
%44 = icmp eq i32 %43, 1
%45 = load i32, i32* %5
%46 = icmp sgt i32 %45, -1
%47 = select i1 %44, i1 %46, i1 false
%48 = icmp slt i32 %45, 16
%49 = select i1 %47, i1 %48, i1 false
br i1 %49, label %50, label %66
50: ; preds = %42
%51 = zext i32 %45 to i64
%52 = getelementptr inbounds i32, i32* %1, i64 %51
%53 = load i32, i32* %52
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32 %53)
%55 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %6)
%56 = icmp eq i32 %55, 1
%57 = load i32, i32* %6
%58 = icmp sgt i32 %57, -1
%59 = select i1 %56, i1 %58, i1 false
%60 = icmp slt i32 %57, 101
%61 = select i1 %59, i1 %60, i1 false
br i1 %61, label %62, label %66
62: ; preds = %50
%63 = load i32, i32* %5
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i32, i32* %1, i64 %64
store i32 %57, i32* %65
br label %66
66: ; preds = %42, %62, %50, %31, %41
%67 = phi i32 [ 1, %62 ], [ -1, %50 ], [ -1, %42 ], [ 1, %41 ], [ -1, %31 ]
%68 = load i8*, i8** %3
%69 = call i32 @free(i8* %68)
store i8* null, i8** %3
store i64 0, i64* %4
br label %70
70: ; preds = %18, %66
%71 = phi i32 [ %67, %66 ], [ -1, %18 ]
%72 = icmp ugt i64 %25, 1
br i1 %72, label %11, label %73
73: ; preds = %70
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%75 = load i32, i32* @stdin
%76 = call i32 @__fpurge(i32 %75)
%77 = load i32, i32* @stdin
%78 = call i64 @getline(i8** %3, i64* %4, i32 %77)
%79 = icmp eq i64 %78, -1
br i1 %79, label %86, label %80
80: ; preds = %73
%81 = load i8*, i8** %3
%82 = call i32 @strcmp(i8* dereferenceable(1) %81, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%83 = icmp eq i32 %82, 0
%84 = zext i1 %83 to i32
%85 = call i32 @free(i8* %81)
br label %86
86: ; preds = %80, %73
%87 = phi i32 [ %84, %80 ], [ 0, %73 ]
ret i32 %87
}