#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
char toupper(char);
int main() {
  char texto[30];
  printf("Pressione A B C para 2");
  printf("\nPressione D E F para 3");
  printf("\nPressione G H I para 4");
  printf("\nPressione J K L para 5");
  printf("\nPressione M N O para 6");
  printf("\nPressione P Q R S para 7");
  printf("\nPressione T U V para 8");
  printf("\nPressione W X Y Z para 9");
  printf("\n\nInforme as letras: ");
  scanf("%s", texto);
  for (int i = 0; texto[i] != '\0'; i++) {
    char letra = toupper(texto[i]);
    if (letra == 'A' || texto[i] == 'B' || letra == 'C')
      printf("2");
    else if (letra == 'D' || letra == 'E' || letra == 'F')
      printf("3");
    else if (letra == 'G' || letra == 'H' || letra == 'I')
      printf("4");
    else if (letra == 'J' || letra == 'K' || letra == 'L')
      printf("5");
    else if (letra == 'M' || letra == 'N' || letra == 'O')
      printf("6");
    else if (letra == 'P' || letra == 'Q' || letra == 'R' || letra == 'S')
      printf("7");
    else if (letra == 'T' || letra == 'U' || letra == 'V')
      printf("8");
    else if (letra == 'W' || letra == 'X' || letra == 'Y' || letra == 'Z')
      printf("9");
    else
      printf("%c", texto[i]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf01(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf0d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x30(%rbp),%rsi
lea    0xf11(%rip),%rdi
call   1050 <scanf@plt>
movl   $0x0,-0x34(%rbp)
movslq -0x34(%rbp),%rax
movsbl -0x30(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     1433 <main+0x303>
movslq -0x34(%rbp),%rax
movsbl -0x30(%rbp,%rax,1),%edi
call   1030 <toupper@plt>
mov    %al,-0x35(%rbp)
movsbl -0x35(%rbp),%eax
cmp    $0x41,%eax
je     1223 <main+0xf3>
movslq -0x34(%rbp),%rax
movsbl -0x30(%rbp,%rax,1),%eax
cmp    $0x42,%eax
je     1223 <main+0xf3>
movsbl -0x35(%rbp),%eax
cmp    $0x43,%eax
jne    1236 <main+0x106>
lea    0xdeb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1420 <main+0x2f0>
movsbl -0x35(%rbp),%eax
cmp    $0x44,%eax
je     125d <main+0x12d>
movsbl -0x35(%rbp),%eax
cmp    $0x45,%eax
je     125d <main+0x12d>
movsbl -0x35(%rbp),%eax
cmp    $0x46,%eax
jne    1270 <main+0x140>
lea    0xdc9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    141b <main+0x2eb>
movsbl -0x35(%rbp),%eax
cmp    $0x47,%eax
je     1297 <main+0x167>
movsbl -0x35(%rbp),%eax
cmp    $0x48,%eax
je     1297 <main+0x167>
movsbl -0x35(%rbp),%eax
cmp    $0x49,%eax
jne    12aa <main+0x17a>
lea    0xda7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1416 <main+0x2e6>
movsbl -0x35(%rbp),%eax
cmp    $0x4a,%eax
je     12d1 <main+0x1a1>
movsbl -0x35(%rbp),%eax
cmp    $0x4b,%eax
je     12d1 <main+0x1a1>
movsbl -0x35(%rbp),%eax
cmp    $0x4c,%eax
jne    12e4 <main+0x1b4>
lea    0xd85(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1411 <main+0x2e1>
movsbl -0x35(%rbp),%eax
cmp    $0x4d,%eax
je     130b <main+0x1db>
movsbl -0x35(%rbp),%eax
cmp    $0x4e,%eax
je     130b <main+0x1db>
movsbl -0x35(%rbp),%eax
cmp    $0x4f,%eax
jne    131e <main+0x1ee>
lea    0xd63(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    140c <main+0x2dc>
movsbl -0x35(%rbp),%eax
cmp    $0x50,%eax
je     1352 <main+0x222>
movsbl -0x35(%rbp),%eax
cmp    $0x51,%eax
je     1352 <main+0x222>
movsbl -0x35(%rbp),%eax
cmp    $0x52,%eax
je     1352 <main+0x222>
movsbl -0x35(%rbp),%eax
cmp    $0x53,%eax
jne    1365 <main+0x235>
lea    0xd36(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1407 <main+0x2d7>
movsbl -0x35(%rbp),%eax
cmp    $0x54,%eax
je     138c <main+0x25c>
movsbl -0x35(%rbp),%eax
cmp    $0x55,%eax
je     138c <main+0x25c>
movsbl -0x35(%rbp),%eax
cmp    $0x56,%eax
jne    139f <main+0x26f>
lea    0xd14(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1402 <main+0x2d2>
movsbl -0x35(%rbp),%eax
cmp    $0x57,%eax
je     13d3 <main+0x2a3>
movsbl -0x35(%rbp),%eax
cmp    $0x58,%eax
je     13d3 <main+0x2a3>
movsbl -0x35(%rbp),%eax
cmp    $0x59,%eax
je     13d3 <main+0x2a3>
movsbl -0x35(%rbp),%eax
cmp    $0x5a,%eax
jne    13e6 <main+0x2b6>
lea    0xce7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13fd <main+0x2cd>
movslq -0x34(%rbp),%rax
movsbl -0x30(%rbp,%rax,1),%esi
lea    0xce6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1402 <main+0x2d2>
jmp    1407 <main+0x2d7>
jmp    140c <main+0x2dc>
jmp    1411 <main+0x2e1>
jmp    1416 <main+0x2e6>
jmp    141b <main+0x2eb>
jmp    1420 <main+0x2f0>
jmp    1425 <main+0x2f5>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11d4 <main+0xa4>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xeb4(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xebd(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec7(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xed1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xedb(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xef1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xefb(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf07(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf0f(%rip),%rdi
mov    %rsp,%rsi
call   1060 <scanf@plt>
mov    (%rsp),%al
test   %al,%al
je     128d <main+0x14d>
lea    0x1(%rsp),%rbx
jmp    1204 <main+0xc4>
movsbl %dl,%edi
nopw   0x0(%rax,%rax,1)
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     128d <main+0x14d>
movsbl %al,%edi
call   1040 <toupper@plt>
mov    $0x32,%edi
cmp    $0x41,%al
je     11f0 <main+0xb0>
movzbl -0x1(%rbx),%ecx
cmp    $0x42,%cl
je     11f0 <main+0xb0>
cmp    $0x43,%al
je     11f0 <main+0xb0>
lea    -0x44(%rax),%edx
mov    $0x33,%edi
cmp    $0x3,%dl
jb     11f0 <main+0xb0>
lea    -0x47(%rax),%edx
mov    $0x34,%edi
cmp    $0x3,%dl
jb     11f0 <main+0xb0>
lea    -0x4a(%rax),%edx
mov    $0x35,%edi
cmp    $0x3,%dl
jb     11f0 <main+0xb0>
lea    -0x4d(%rax),%edx
mov    $0x36,%edi
cmp    $0x3,%dl
jb     11f0 <main+0xb0>
mov    %eax,%edx
and    $0xfc,%dl
mov    $0x37,%edi
cmp    $0x50,%dl
je     11f0 <main+0xb0>
lea    -0x54(%rax),%edx
mov    $0x38,%edi
cmp    $0x3,%dl
jb     11f0 <main+0xb0>
add    $0xa9,%al
mov    $0x39,%edx
cmp    $0x4,%al
jb     11e4 <main+0xa4>
movzbl %cl,%edx
jmp    11e4 <main+0xa4>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Pressione A B C para 2\00"
@.str.1 = [24 x i8] c"\0APressione D E F para 3\00"
@.str.2 = [24 x i8] c"\0APressione G H I para 4\00"
@.str.3 = [24 x i8] c"\0APressione J K L para 5\00"
@.str.4 = [24 x i8] c"\0APressione M N O para 6\00"
@.str.5 = [26 x i8] c"\0APressione P Q R S para 7\00"
@.str.6 = [24 x i8] c"\0APressione T U V para 8\00"
@.str.7 = [26 x i8] c"\0APressione W X Y Z para 9\00"
@.str.8 = [22 x i8] c"\0A\0AInforme as letras: \00"
@.str.9 = [3 x i8] c"%s\00"
@.str.10 = [2 x i8] c"2\00"
@.str.11 = [2 x i8] c"3\00"
@.str.12 = [2 x i8] c"4\00"
@.str.13 = [2 x i8] c"5\00"
@.str.14 = [2 x i8] c"6\00"
@.str.15 = [2 x i8] c"7\00"
@.str.16 = [2 x i8] c"8\00"
@.str.17 = [2 x i8] c"9\00"
@.str.18 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [30 x i8]
%3 = alloca i32
%4 = alloca i8
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0))
%14 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %14)
store i32 0, i32* %3
br label %16
16: ; preds = %166, %0
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %169
23: ; preds = %16
%24 = load i32, i32* %3
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = call signext i8 @toupper(i8 signext %27)
store i8 %28, i8* %4
%29 = load i8, i8* %4
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 65
br i1 %31, label %43, label %32
32: ; preds = %23
%33 = load i32, i32* %3
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %34
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = icmp eq i32 %37, 66
br i1 %38, label %43, label %39
39: ; preds = %32
%40 = load i8, i8* %4
%41 = sext i8 %40 to i32
%42 = icmp eq i32 %41, 67
br i1 %42, label %43, label %45
43: ; preds = %39, %32, %23
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
br label %165
45: ; preds = %39
%46 = load i8, i8* %4
%47 = sext i8 %46 to i32
%48 = icmp eq i32 %47, 68
br i1 %48, label %57, label %49
49: ; preds = %45
%50 = load i8, i8* %4
%51 = sext i8 %50 to i32
%52 = icmp eq i32 %51, 69
br i1 %52, label %57, label %53
53: ; preds = %49
%54 = load i8, i8* %4
%55 = sext i8 %54 to i32
%56 = icmp eq i32 %55, 70
br i1 %56, label %57, label %59
57: ; preds = %53, %49, %45
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
br label %164
59: ; preds = %53
%60 = load i8, i8* %4
%61 = sext i8 %60 to i32
%62 = icmp eq i32 %61, 71
br i1 %62, label %71, label %63
63: ; preds = %59
%64 = load i8, i8* %4
%65 = sext i8 %64 to i32
%66 = icmp eq i32 %65, 72
br i1 %66, label %71, label %67
67: ; preds = %63
%68 = load i8, i8* %4
%69 = sext i8 %68 to i32
%70 = icmp eq i32 %69, 73
br i1 %70, label %71, label %73
71: ; preds = %67, %63, %59
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
br label %163
73: ; preds = %67
%74 = load i8, i8* %4
%75 = sext i8 %74 to i32
%76 = icmp eq i32 %75, 74
br i1 %76, label %85, label %77
77: ; preds = %73
%78 = load i8, i8* %4
%79 = sext i8 %78 to i32
%80 = icmp eq i32 %79, 75
br i1 %80, label %85, label %81
81: ; preds = %77
%82 = load i8, i8* %4
%83 = sext i8 %82 to i32
%84 = icmp eq i32 %83, 76
br i1 %84, label %85, label %87
85: ; preds = %81, %77, %73
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
br label %162
87: ; preds = %81
%88 = load i8, i8* %4
%89 = sext i8 %88 to i32
%90 = icmp eq i32 %89, 77
br i1 %90, label %99, label %91
91: ; preds = %87
%92 = load i8, i8* %4
%93 = sext i8 %92 to i32
%94 = icmp eq i32 %93, 78
br i1 %94, label %99, label %95
95: ; preds = %91
%96 = load i8, i8* %4
%97 = sext i8 %96 to i32
%98 = icmp eq i32 %97, 79
br i1 %98, label %99, label %101
99: ; preds = %95, %91, %87
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
br label %161
101: ; preds = %95
%102 = load i8, i8* %4
%103 = sext i8 %102 to i32
%104 = icmp eq i32 %103, 80
br i1 %104, label %117, label %105
105: ; preds = %101
%106 = load i8, i8* %4
%107 = sext i8 %106 to i32
%108 = icmp eq i32 %107, 81
br i1 %108, label %117, label %109
109: ; preds = %105
%110 = load i8, i8* %4
%111 = sext i8 %110 to i32
%112 = icmp eq i32 %111, 82
br i1 %112, label %117, label %113
113: ; preds = %109
%114 = load i8, i8* %4
%115 = sext i8 %114 to i32
%116 = icmp eq i32 %115, 83
br i1 %116, label %117, label %119
117: ; preds = %113, %109, %105, %101
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
br label %160
119: ; preds = %113
%120 = load i8, i8* %4
%121 = sext i8 %120 to i32
%122 = icmp eq i32 %121, 84
br i1 %122, label %131, label %123
123: ; preds = %119
%124 = load i8, i8* %4
%125 = sext i8 %124 to i32
%126 = icmp eq i32 %125, 85
br i1 %126, label %131, label %127
127: ; preds = %123
%128 = load i8, i8* %4
%129 = sext i8 %128 to i32
%130 = icmp eq i32 %129, 86
br i1 %130, label %131, label %133
131: ; preds = %127, %123, %119
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
br label %159
133: ; preds = %127
%134 = load i8, i8* %4
%135 = sext i8 %134 to i32
%136 = icmp eq i32 %135, 87
br i1 %136, label %149, label %137
137: ; preds = %133
%138 = load i8, i8* %4
%139 = sext i8 %138 to i32
%140 = icmp eq i32 %139, 88
br i1 %140, label %149, label %141
141: ; preds = %137
%142 = load i8, i8* %4
%143 = sext i8 %142 to i32
%144 = icmp eq i32 %143, 89
br i1 %144, label %149, label %145
145: ; preds = %141
%146 = load i8, i8* %4
%147 = sext i8 %146 to i32
%148 = icmp eq i32 %147, 90
br i1 %148, label %149, label %151
149: ; preds = %145, %141, %137, %133
%150 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
br label %158
151: ; preds = %145
%152 = load i32, i32* %3
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %153
%155 = load i8, i8* %154
%156 = sext i8 %155 to i32
%157 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i32 %156)
br label %158
158: ; preds = %151, %149
br label %159
159: ; preds = %158, %131
br label %160
160: ; preds = %159, %117
br label %161
161: ; preds = %160, %99
br label %162
162: ; preds = %161, %85
br label %163
163: ; preds = %162, %71
br label %164
164: ; preds = %163, %57
br label %165
165: ; preds = %164, %43
br label %166
166: ; preds = %165
%167 = load i32, i32* %3
%168 = add nsw i32 %167, 1
store i32 %168, i32* %3
br label %16
169: ; preds = %16
%170 = load i32, i32* %1
ret i32 %170
}

LLVM IR (-O2):
@.str = [23 x i8] c"Pressione A B C para 2\00"
@.str.1 = [24 x i8] c"\0APressione D E F para 3\00"
@.str.2 = [24 x i8] c"\0APressione G H I para 4\00"
@.str.3 = [24 x i8] c"\0APressione J K L para 5\00"
@.str.4 = [24 x i8] c"\0APressione M N O para 6\00"
@.str.5 = [26 x i8] c"\0APressione P Q R S para 7\00"
@.str.6 = [24 x i8] c"\0APressione T U V para 8\00"
@.str.7 = [26 x i8] c"\0APressione W X Y Z para 9\00"
@.str.8 = [22 x i8] c"\0A\0AInforme as letras: \00"
@.str.9 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [30 x i8]
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %2)
%13 = load i8, i8* %2
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %50, %0
ret i32 0
16: ; preds = %0, %50
%17 = phi i64 [ %53, %50 ], [ 0, %0 ]
%18 = phi i8 [ %55, %50 ], [ %13, %0 ]
%19 = phi i8* [ %54, %50 ], [ %2, %0 ]
%20 = call signext i8 @toupper(i8 signext %18)
%21 = icmp eq i8 %20, 65
br i1 %21, label %50, label %22
22: ; preds = %16
%23 = load i8, i8* %19
%24 = icmp eq i8 %23, 66
%25 = icmp eq i8 %20, 67
%26 = select i1 %24, i1 true, i1 %25
br i1 %26, label %50, label %27
27: ; preds = %22
%28 = add i8 %20, -68
%29 = icmp ult i8 %28, 3
br i1 %29, label %50, label %30
30: ; preds = %27
%31 = add i8 %20, -71
%32 = icmp ult i8 %31, 3
br i1 %32, label %50, label %33
33: ; preds = %30
%34 = add i8 %20, -74
%35 = icmp ult i8 %34, 3
br i1 %35, label %50, label %36
36: ; preds = %33
%37 = add i8 %20, -77
%38 = icmp ult i8 %37, 3
br i1 %38, label %50, label %39
39: ; preds = %36
%40 = and i8 %20, -4
%41 = icmp eq i8 %40, 80
br i1 %41, label %50, label %42
42: ; preds = %39
%43 = add i8 %20, -84
%44 = icmp ult i8 %43, 3
br i1 %44, label %50, label %45
45: ; preds = %42
%46 = add i8 %20, -87
%47 = icmp ult i8 %46, 4
%48 = select i1 %47, i8 57, i8 %23
%49 = sext i8 %48 to i32
br label %50
50: ; preds = %45, %42, %39, %36, %33, %30, %27, %16, %22
%51 = phi i32 [ 50, %22 ], [ 50, %16 ], [ 51, %27 ], [ 52, %30 ], [ 53, %33 ], [ 54, %36 ], [ 55, %39 ], [ 56, %42 ], [ %49, %45 ]
%52 = call i32 @putchar(i32 %51)
%53 = add nuw i64 %17, 1
%54 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 %53
%55 = load i8, i8* %54
%56 = icmp eq i8 %55, 0
br i1 %56, label %15, label %16
}