#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 */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  char nome[100];
  int scelta;
  int c;
  int i;
  int k;
  int x;
  do {
    printf("\t \t \t CALCOLO OCCORRENZE \n");
    printf("Parti del programma da svolgere.\n");
    printf("1-Inserisci il tuo nome \n");
    printf("2-Calcola lunghezza del nome\n");
    printf("3-Calcolo occorrenze\n");
    printf("0-EXIT \n");
    printf("Scegli la parte di programma da eseguire\t");
    scanf("%d", &scelta);
    switch (scelta) {
    case 1:
      printf("\nInserisci il tuo nome (Massimo 100 caratteri): ");
      scanf("%s", nome);
      printf("\n Nome Inserito: %s \n", nome);
      break;
    case 2:
      c = 0;
      while (nome[c] != '\0') {
        c++;
      }
      printf("Il tuo nome e' lungo %d caratteri \n", c);
      break;
    case 3:
      c = 0;
      while (nome[c] != '\0') {
        c++;
      }
      for (i = 0; i < c; i++) {
        k = 1;
        if (nome[i] != 0) {
          for (x = i + 1; x < c; x++) {
            if (nome[i] == nome[x]) {
              k++;
              nome[x] = 0;
            }
          }
        }
        if (nome[i] != 0) {
          printf("Il carattere %c viene ripetuto %d volte\n", nome[i], k);
        }
      }
      break;
    }
  } while (scelta != 0);
  getchar();
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x89(%rbp)
call   1030 <printf@plt>
mov    -0x89(%rbp),%al
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x89(%rbp),%al
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x89(%rbp),%al
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x89(%rbp),%al
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x89(%rbp),%al
lea    0xee0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x89(%rbp),%al
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x89(%rbp),%al
lea    0xeef(%rip),%rdi
lea    -0x74(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x74(%rbp),%eax
mov    %eax,-0x88(%rbp)
sub    $0x1,%eax
je     1217 <main+0xe7>
jmp    11ef <main+0xbf>
mov    -0x88(%rbp),%eax
sub    $0x2,%eax
je     124e <main+0x11e>
jmp    1203 <main+0xd3>
mov    -0x88(%rbp),%eax
sub    $0x3,%eax
je     128b <main+0x15b>
jmp    138d <main+0x25d>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x70(%rbp),%rsi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    -0x70(%rbp),%rsi
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    138d <main+0x25d>
movl   $0x0,-0x78(%rbp)
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     1275 <main+0x145>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1255 <main+0x125>
mov    -0x78(%rbp),%esi
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    138d <main+0x25d>
movl   $0x0,-0x78(%rbp)
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     12b2 <main+0x182>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1292 <main+0x162>
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    1388 <main+0x258>
movl   $0x1,-0x80(%rbp)
movslq -0x7c(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     1349 <main+0x219>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
mov    -0x84(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    1344 <main+0x214>
movslq -0x7c(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
movslq -0x84(%rbp),%rcx
movsbl -0x70(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jne    132b <main+0x1fb>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
movslq -0x84(%rbp),%rax
movb   $0x0,-0x70(%rbp,%rax,1)
jmp    1330 <main+0x200>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    12ea <main+0x1ba>
jmp    1349 <main+0x219>
movslq -0x7c(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     1375 <main+0x245>
movslq -0x7c(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%esi
mov    -0x80(%rbp),%edx
lea    0xdc1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    137a <main+0x24a>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    12b9 <main+0x189>
jmp    138d <main+0x25d>
jmp    1392 <main+0x262>
cmpl   $0x0,-0x74(%rbp)
jne    1142 <main+0x12>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
lea    0xc(%rsp),%r12
lea    0xf41(%rip),%r13
jmp    11a1 <main+0x61>
nopl   0x0(%rax)
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee9(%rip),%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xed6(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
je     12ff <main+0x1bf>
lea    0xf1c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf66(%rip),%rdi
call   1030 <puts@plt>
lea    0xe10(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe2c(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x1,%eax
je     1160 <main+0x20>
cmp    $0x2,%eax
je     12d0 <main+0x190>
cmp    $0x3,%eax
jne    1199 <main+0x59>
mov    $0xffffffffffffffff,%rcx
xor    %edx,%edx
mov    %edx,%eax
cmpb   $0x0,0x11(%rsp,%rcx,1)
lea    0x1(%rcx),%rcx
lea    0x1(%rax),%edx
jne    1230 <main+0xf0>
test   %ecx,%ecx
je     1195 <main+0x55>
mov    %ecx,%ebx
mov    %eax,%ebp
add    $0xffffffffffffffff,%rbp
lea    0x11(%rsp),%r14
xor    %r15d,%r15d
jmp    1282 <main+0x142>
nopw   0x0(%rax,%rax,1)
test   %cl,%cl
je     1271 <main+0x131>
movsbl %cl,%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r14
add    $0xffffffffffffffff,%rbp
cmp    %rbx,%r15
je     1195 <main+0x55>
mov    %r15,%rax
mov    0x10(%rsp,%r15,1),%cl
add    $0x1,%r15
test   %cl,%cl
je     1271 <main+0x131>
mov    $0x1,%edx
cmp    %rbx,%r15
jae    1264 <main+0x124>
mov    $0x1,%edx
xor    %esi,%esi
jmp    12be <main+0x17e>
cs nopw 0x0(%rax,%rax,1)
nop
movzbl 0x10(%rsp,%rax,1),%ecx
add    $0x1,%rsi
cmp    %rsi,%rbp
je     1260 <main+0x120>
cmp    (%r14,%rsi,1),%cl
jne    12b0 <main+0x170>
add    $0x1,%edx
movb   $0x0,(%r14,%rsi,1)
jmp    12b0 <main+0x170>
xchg   %ax,%ax
mov    $0xffffffff,%esi
lea    0x10(%rsp),%rax
nopw   0x0(%rax,%rax,1)
add    $0x1,%esi
cmpb   $0x0,(%rax)
lea    0x1(%rax),%rax
jne    12e0 <main+0x1a0>
lea    0xd84(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1195 <main+0x55>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"\09 \09 \09 CALCOLO OCCORRENZE \0A\00"
@.str.1 = [34 x i8] c"Parti del programma da svolgere.\0A\00"
@.str.2 = [26 x i8] c"1-Inserisci il tuo nome \0A\00"
@.str.3 = [30 x i8] c"2-Calcola lunghezza del nome\0A\00"
@.str.4 = [22 x i8] c"3-Calcolo occorrenze\0A\00"
@.str.5 = [9 x i8] c"0-EXIT \0A\00"
@.str.6 = [42 x i8] c"Scegli la parte di programma da eseguire\09\00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [49 x i8] c"\0AInserisci il tuo nome (Massimo 100 caratteri): \00"
@.str.9 = [3 x i8] c"%s\00"
@.str.10 = [22 x i8] c"\0A Nome Inserito: %s \0A\00"
@.str.11 = [36 x i8] c"Il tuo nome e' lungo %d caratteri \0A\00"
@.str.12 = [41 x i8] c"Il carattere %c viene ripetuto %d volte\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
br label %8
8: ; preds = %112, %0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0))
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %3)
%17 = load i32, i32* %3
switch i32 %17, label %111 [
i32 1, label %18
i32 2, label %24
i32 3, label %38
]
18: ; preds = %8
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.8, i64 0, i64 0))
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %20)
%22 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i8* %22)
br label %111
24: ; preds = %8
store i32 0, i32* %4
br label %25
25: ; preds = %32, %24
%26 = load i32, i32* %4
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %27
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %25
%33 = load i32, i32* %4
%34 = add nsw i32 %33, 1
store i32 %34, i32* %4
br label %25
35: ; preds = %25
%36 = load i32, i32* %4
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i32 %36)
br label %111
38: ; preds = %8
store i32 0, i32* %4
br label %39
39: ; preds = %46, %38
%40 = load i32, i32* %4
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %41
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
%45 = icmp ne i32 %44, 0
br i1 %45, label %46, label %49
46: ; preds = %39
%47 = load i32, i32* %4
%48 = add nsw i32 %47, 1
store i32 %48, i32* %4
br label %39
49: ; preds = %39
store i32 0, i32* %5
br label %50
50: ; preds = %107, %49
%51 = load i32, i32* %5
%52 = load i32, i32* %4
%53 = icmp slt i32 %51, %52
br i1 %53, label %54, label %110
54: ; preds = %50
store i32 1, i32* %6
%55 = load i32, i32* %5
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %56
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
%60 = icmp ne i32 %59, 0
br i1 %60, label %61, label %91
61: ; preds = %54
%62 = load i32, i32* %5
%63 = add nsw i32 %62, 1
store i32 %63, i32* %7
br label %64
64: ; preds = %87, %61
%65 = load i32, i32* %7
%66 = load i32, i32* %4
%67 = icmp slt i32 %65, %66
br i1 %67, label %68, label %90
68: ; preds = %64
%69 = load i32, i32* %5
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %70
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = load i32, i32* %7
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %75
%77 = load i8, i8* %76
%78 = sext i8 %77 to i32
%79 = icmp eq i32 %73, %78
br i1 %79, label %80, label %86
80: ; preds = %68
%81 = load i32, i32* %6
%82 = add nsw i32 %81, 1
store i32 %82, i32* %6
%83 = load i32, i32* %7
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %84
store i8 0, i8* %85
br label %86
86: ; preds = %80, %68
br label %87
87: ; preds = %86
%88 = load i32, i32* %7
%89 = add nsw i32 %88, 1
store i32 %89, i32* %7
br label %64
90: ; preds = %64
br label %91
91: ; preds = %90, %54
%92 = load i32, i32* %5
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %93
%95 = load i8, i8* %94
%96 = sext i8 %95 to i32
%97 = icmp ne i32 %96, 0
br i1 %97, label %98, label %106
98: ; preds = %91
%99 = load i32, i32* %5
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %100
%102 = load i8, i8* %101
%103 = sext i8 %102 to i32
%104 = load i32, i32* %6
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.12, i64 0, i64 0), i32 %103, i32 %104)
br label %106
106: ; preds = %98, %91
br label %107
107: ; preds = %106
%108 = load i32, i32* %5
%109 = add nsw i32 %108, 1
store i32 %109, i32* %5
br label %50
110: ; preds = %50
br label %111
111: ; preds = %8, %110, %35, %18
br label %112
112: ; preds = %111
%113 = load i32, i32* %3
%114 = icmp ne i32 %113, 0
br i1 %114, label %8, label %115
115: ; preds = %112
%116 = call i32 (...) @getchar()
%117 = call i32 (...) @getchar()
%118 = load i32, i32* %1
ret i32 %118
}

LLVM IR (-O2):
@.str.6 = [42 x i8] c"Scegli la parte di programma da eseguire\09\00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [49 x i8] c"\0AInserisci il tuo nome (Massimo 100 caratteri): \00"
@.str.9 = [3 x i8] c"%s\00"
@.str.10 = [22 x i8] c"\0A Nome Inserito: %s \0A\00"
@.str.11 = [36 x i8] c"Il tuo nome e' lungo %d caratteri \0A\00"
@.str.12 = [41 x i8] c"Il carattere %c viene ripetuto %d volte\0A\00"
@str = [26 x i8] c"\09 \09 \09 CALCOLO OCCORRENZE \00"
@str.13 = [33 x i8] c"Parti del programma da svolgere.\00"
@str.14 = [25 x i8] c"1-Inserisci il tuo nome \00"
@str.15 = [29 x i8] c"2-Calcola lunghezza del nome\00"
@str.16 = [21 x i8] c"3-Calcolo occorrenze\00"
@str.17 = [8 x i8] c"0-EXIT \00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = bitcast i32* %2 to i8*
br label %5
5: ; preds = %74, %0
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.13, i64 0, i64 0))
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.14, i64 0, i64 0))
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.15, i64 0, i64 0))
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.16, i64 0, i64 0))
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.17, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0))
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %2)
%14 = load i32, i32* %2
switch i32 %14, label %74 [
i32 1, label %15
i32 2, label %19
i32 3, label %28
]
15: ; preds = %5
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.8, i64 0, i64 0))
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %3)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i8* %3)
br label %72
19: ; preds = %5, %19
%20 = phi i64 [ %24, %19 ], [ 0, %5 ]
%21 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %20
%22 = load i8, i8* %21
%23 = icmp eq i8 %22, 0
%24 = add nuw i64 %20, 1
br i1 %23, label %25, label %19
25: ; preds = %19
%26 = trunc i64 %20 to i32
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i32 %26)
br label %72
28: ; preds = %5, %28
%29 = phi i64 [ %33, %28 ], [ 0, %5 ]
%30 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %29
%31 = load i8, i8* %30
%32 = icmp eq i8 %31, 0
%33 = add nuw i64 %29, 1
br i1 %32, label %34, label %28
34: ; preds = %28
%35 = trunc i64 %29 to i32
%36 = icmp eq i32 %35, 0
br i1 %36, label %72, label %37
37: ; preds = %34
%38 = and i64 %29, 4294967295
br label %39
39: ; preds = %37, %69
%40 = phi i64 [ 0, %37 ], [ %45, %69 ]
%41 = phi i64 [ 1, %37 ], [ %70, %69 ]
%42 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %40
%43 = load i8, i8* %42
%44 = icmp eq i8 %43, 0
%45 = add nuw nsw i64 %40, 1
br i1 %44, label %69, label %46
46: ; preds = %39
%47 = icmp ult i64 %45, %38
br i1 %47, label %48, label %64
48: ; preds = %46, %57
%49 = phi i8 [ %61, %57 ], [ %43, %46 ]
%50 = phi i64 [ %59, %57 ], [ %41, %46 ]
%51 = phi i32 [ %58, %57 ], [ 1, %46 ]
%52 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %50
%53 = load i8, i8* %52
%54 = icmp eq i8 %49, %53
br i1 %54, label %55, label %57
55: ; preds = %48
%56 = add nsw i32 %51, 1
store i8 0, i8* %52
br label %57
57: ; preds = %48, %55
%58 = phi i32 [ %56, %55 ], [ %51, %48 ]
%59 = add nuw nsw i64 %50, 1
%60 = icmp eq i64 %59, %38
%61 = load i8, i8* %42
br i1 %60, label %62, label %48
62: ; preds = %57
%63 = icmp eq i8 %61, 0
br i1 %63, label %69, label %64
64: ; preds = %46, %62
%65 = phi i32 [ %58, %62 ], [ 1, %46 ]
%66 = phi i8 [ %61, %62 ], [ %43, %46 ]
%67 = sext i8 %66 to i32
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.12, i64 0, i64 0), i32 %67, i32 %65)
br label %69
69: ; preds = %39, %62, %64
%70 = add nuw nsw i64 %41, 1
%71 = icmp eq i64 %45, %38
br i1 %71, label %72, label %39
72: ; preds = %69, %34, %25, %15
%73 = load i32, i32* %2
br label %74
74: ; preds = %72, %5
%75 = phi i32 [ %73, %72 ], [ %14, %5 ]
%76 = icmp eq i32 %75, 0
br i1 %76, label %77, label %5
77: ; preds = %74
%78 = call i32 (...) @getchar()
%79 = call i32 (...) @getchar()
ret i32 0
}