#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*/ printMessage(char *, int, int /*<<< orphan*/,
                                int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, ...);
int strlen(char *);
char toupper(char);
void wordConvert(void) {
  char word[128];
  int isEncrypt = 0, encryptValue = 0, wordLength = 0, i = 0, tempKey = 0,
      newValue = 0;
  printMessage("Word to Encrypt or Decrypt? ", 0, 0, 0);
  scanf(" %s", &word);
  printMessage("Encrypt (0) or Decrypt (1)?", 0, 0, 0);
  scanf(" %d", &isEncrypt);
  printMessage("Encrypt Key?", 0, 0, 0);
  scanf(" %d", &encryptValue);
  if (isEncrypt == 1) {
    encryptValue = -encryptValue;
  }
  wordLength = strlen(word);
  for (i = 0; i < wordLength; i++) {
    word[i] = toupper(word[i]);
  }
  for (i = 0; i < wordLength; i++) {
    tempKey = encryptValue;
    newValue = (int)word[i] + tempKey;
    if (newValue < 65) {
      tempKey = (newValue - 65) + 1;
      word[i] = 'Z';
    }
    if (newValue > 90) {
      tempKey = (newValue - 90) - 1;
      word[i] = 'A';
    }
    word[i] = (char)((int)word[i] + tempKey);
  }
  printMessage(word, 1, 0, 0);
}


x86 assembly (clang, -O0):
<wordConvert>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x84(%rbp)
movl   $0x0,-0x88(%rbp)
movl   $0x0,-0x8c(%rbp)
movl   $0x0,-0x90(%rbp)
movl   $0x0,-0x94(%rbp)
movl   $0x0,-0x98(%rbp)
lea    0xe72(%rip),%rdi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1050 <printMessage@plt>
lea    0xe7d(%rip),%rdi
lea    -0x80(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    0xe6f(%rip),%rdi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1050 <printMessage@plt>
lea    0xe79(%rip),%rdi
lea    -0x84(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    0xe68(%rip),%rdi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1050 <printMessage@plt>
lea    0xe52(%rip),%rdi
lea    -0x88(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
cmpl   $0x1,-0x84(%rbp)
jne    1214 <wordConvert+0xd4>
xor    %eax,%eax
sub    -0x88(%rbp),%eax
mov    %eax,-0x88(%rbp)
lea    -0x80(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x8c(%rbp)
movl   $0x0,-0x90(%rbp)
mov    -0x90(%rbp),%eax
cmp    -0x8c(%rbp),%eax
jge    1271 <wordConvert+0x131>
movslq -0x90(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%edi
call   1030 <toupper@plt>
mov    %al,%cl
movslq -0x90(%rbp),%rax
mov    %cl,-0x80(%rbp,%rax,1)
mov    -0x90(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
jmp    122d <wordConvert+0xed>
movl   $0x0,-0x90(%rbp)
mov    -0x90(%rbp),%eax
cmp    -0x8c(%rbp),%eax
jge    133a <wordConvert+0x1fa>
mov    -0x88(%rbp),%eax
mov    %eax,-0x94(%rbp)
movslq -0x90(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%eax
add    -0x94(%rbp),%eax
mov    %eax,-0x98(%rbp)
cmpl   $0x41,-0x98(%rbp)
jge    12dc <wordConvert+0x19c>
mov    -0x98(%rbp),%eax
sub    $0x41,%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
movslq -0x90(%rbp),%rax
movb   $0x5a,-0x80(%rbp,%rax,1)
cmpl   $0x5a,-0x98(%rbp)
jle    1307 <wordConvert+0x1c7>
mov    -0x98(%rbp),%eax
sub    $0x5a,%eax
sub    $0x1,%eax
mov    %eax,-0x94(%rbp)
movslq -0x90(%rbp),%rax
movb   $0x41,-0x80(%rbp,%rax,1)
movslq -0x90(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%eax
add    -0x94(%rbp),%eax
mov    %al,%cl
movslq -0x90(%rbp),%rax
mov    %cl,-0x80(%rbp,%rax,1)
mov    -0x90(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
jmp    127b <wordConvert+0x13b>
lea    -0x80(%rbp),%rdi
mov    $0x1,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1050 <printMessage@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wordConvert>:
push   %rbp
push   %r14
push   %rbx
sub    $0xc0,%rsp
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xf5e(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1050 <printMessage@plt>
lea    0xf69(%rip),%rdi
lea    0x40(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xf5a(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1050 <printMessage@plt>
lea    0xf64(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xf52(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1050 <printMessage@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x1,0xc(%rsp)
jne    11d4 <wordConvert+0x94>
negl   0x8(%rsp)
lea    0x40(%rsp),%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    16ba <wordConvert+0x57a>
mov    %eax,%r14d
mov    %eax,%ebx
xor    %ebp,%ebp
nopl   (%rax)
movsbl 0x40(%rsp,%rbp,1),%edi
call   1030 <toupper@plt>
mov    %al,0x40(%rsp,%rbp,1)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    11f0 <wordConvert+0xb0>
test   %r14d,%r14d
jle    16ba <wordConvert+0x57a>
mov    0x8(%rsp),%r8d
cmp    $0x8,%r14d
jae    1222 <wordConvert+0xe2>
xor    %ecx,%ecx
jmp    1664 <wordConvert+0x524>
movd   %r8d,%xmm0
cmp    $0x10,%r14d
jae    1234 <wordConvert+0xf4>
xor    %ecx,%ecx
jmp    14d2 <wordConvert+0x392>
mov    %ebx,%ecx
and    $0xfffffff0,%ecx
movdqa %xmm0,0x10(%rsp)
pshufd $0x0,%xmm0,%xmm0
movdqa %xmm0,0x20(%rsp)
xor    %edx,%edx
nopl   0x0(%rax)
movdqa 0x40(%rsp,%rdx,1),%xmm1
movdqa %xmm1,0x30(%rsp)
punpcklbw %xmm1,%xmm0
punpcklwd %xmm0,%xmm10
psrad  $0x18,%xmm10
punpckhwd %xmm0,%xmm11
psrad  $0x18,%xmm11
punpckhbw %xmm1,%xmm0
punpcklwd %xmm0,%xmm9
psrad  $0x18,%xmm9
punpckhwd %xmm0,%xmm8
psrad  $0x18,%xmm8
movdqa 0x20(%rsp),%xmm4
paddd  %xmm4,%xmm8
paddd  %xmm4,%xmm9
paddd  %xmm4,%xmm11
paddd  %xmm4,%xmm10
movdqa 0xd4d(%rip),%xmm13
movdqa %xmm13,%xmm0
pcmpgtd %xmm10,%xmm0
movdqa %xmm13,%xmm7
pcmpgtd %xmm11,%xmm7
movdqa %xmm13,%xmm15
pcmpgtd %xmm9,%xmm15
pcmpgtd %xmm8,%xmm13
movdqa %xmm10,%xmm2
movdqa 0xd2d(%rip),%xmm1
paddd  %xmm1,%xmm2
movdqa %xmm11,%xmm5
paddd  %xmm1,%xmm5
movdqa %xmm9,%xmm6
paddd  %xmm1,%xmm6
movdqa %xmm8,%xmm3
paddd  %xmm1,%xmm3
pand   %xmm13,%xmm3
pandn  %xmm4,%xmm13
por    %xmm3,%xmm13
pand   %xmm15,%xmm6
pandn  %xmm4,%xmm15
por    %xmm6,%xmm15
pand   %xmm7,%xmm5
pandn  %xmm4,%xmm7
por    %xmm5,%xmm7
pand   %xmm0,%xmm2
pandn  %xmm4,%xmm0
por    %xmm2,%xmm0
movdqa %xmm8,%xmm12
movdqa 0xcdb(%rip),%xmm1
pcmpgtd %xmm1,%xmm12
movdqa %xmm9,%xmm6
pcmpgtd %xmm1,%xmm6
movdqa %xmm6,%xmm3
packssdw %xmm12,%xmm3
movdqa %xmm11,%xmm5
pcmpgtd %xmm1,%xmm5
movdqa %xmm10,%xmm2
pcmpgtd %xmm1,%xmm2
movdqa %xmm2,%xmm14
packssdw %xmm5,%xmm14
packsswb %xmm3,%xmm14
movdqa %xmm10,%xmm3
movdqa 0xca6(%rip),%xmm1
paddd  %xmm1,%xmm3
pand   %xmm2,%xmm3
pandn  %xmm0,%xmm2
por    %xmm3,%xmm2
movdqa %xmm11,%xmm0
paddd  %xmm1,%xmm0
pand   %xmm5,%xmm0
pandn  %xmm7,%xmm5
por    %xmm0,%xmm5
movdqa %xmm9,%xmm0
paddd  %xmm1,%xmm0
pand   %xmm6,%xmm0
pandn  %xmm15,%xmm6
por    %xmm0,%xmm6
movdqa %xmm8,%xmm0
paddd  %xmm1,%xmm0
pand   %xmm12,%xmm0
pandn  %xmm13,%xmm12
por    %xmm0,%xmm12
movdqa 0xc5b(%rip),%xmm1
paddd  %xmm1,%xmm9
paddd  %xmm1,%xmm8
movdqa 0xc59(%rip),%xmm4
pxor   %xmm4,%xmm8
movdqa 0xc5b(%rip),%xmm13
movdqa %xmm13,%xmm0
pcmpgtd %xmm8,%xmm0
pxor   %xmm4,%xmm9
movdqa %xmm13,%xmm3
pcmpgtd %xmm9,%xmm3
paddd  %xmm1,%xmm10
paddd  %xmm1,%xmm11
packssdw %xmm0,%xmm3
pxor   %xmm4,%xmm11
movdqa %xmm13,%xmm7
pcmpgtd %xmm11,%xmm7
pxor   %xmm4,%xmm10
movdqa %xmm13,%xmm0
pcmpgtd %xmm10,%xmm0
packssdw %xmm7,%xmm0
packsswb %xmm3,%xmm0
movdqa %xmm14,%xmm3
pandn  0xc11(%rip),%xmm3
pand   0xc18(%rip),%xmm14
por    %xmm3,%xmm14
pand   %xmm0,%xmm14
pandn  0x30(%rsp),%xmm0
por    %xmm14,%xmm0
movdqa 0xc0b(%rip),%xmm1
pand   %xmm1,%xmm12
pand   %xmm1,%xmm6
packuswb %xmm12,%xmm6
pand   %xmm1,%xmm5
pand   %xmm1,%xmm2
packuswb %xmm5,%xmm2
packuswb %xmm6,%xmm2
paddb  %xmm0,%xmm2
movdqa %xmm2,0x40(%rsp,%rdx,1)
add    $0x10,%rdx
cmp    %rdx,%rcx
jne    1250 <wordConvert+0x110>
cmp    %rbx,%rcx
movdqa 0x10(%rsp),%xmm0
je     16ba <wordConvert+0x57a>
test   $0x8,%bl
je     1664 <wordConvert+0x524>
mov    %rcx,%rdx
mov    %ebx,%ecx
and    $0xfffffff8,%ecx
pshufd $0x0,%xmm0,%xmm0
movdqa 0xb38(%rip),%xmm12
movdqa 0xb3f(%rip),%xmm13
movdqa 0xb46(%rip),%xmm14
movdqa 0xb4d(%rip),%xmm15
movdqa 0xb54(%rip),%xmm9
movdqa 0xb7c(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movq   0x40(%rsp,%rdx,1),%xmm1
punpcklbw %xmm1,%xmm3
punpcklwd %xmm3,%xmm10
psrad  $0x18,%xmm10
punpckhwd %xmm3,%xmm8
psrad  $0x18,%xmm8
paddd  %xmm0,%xmm8
paddd  %xmm0,%xmm10
movdqa 0xaad(%rip),%xmm11
movdqa %xmm11,%xmm5
pcmpgtd %xmm10,%xmm5
pcmpgtd %xmm8,%xmm11
movdqa %xmm10,%xmm3
movdqa 0xaa1(%rip),%xmm4
paddd  %xmm4,%xmm3
movdqa %xmm8,%xmm6
paddd  %xmm4,%xmm6
pand   %xmm11,%xmm6
pandn  %xmm0,%xmm11
por    %xmm6,%xmm11
pand   %xmm5,%xmm3
pandn  %xmm0,%xmm5
por    %xmm3,%xmm5
movdqa %xmm10,%xmm3
pcmpgtd %xmm12,%xmm3
movdqa %xmm3,%xmm6
movdqa %xmm10,%xmm4
paddd  %xmm13,%xmm4
pand   %xmm3,%xmm4
pandn  %xmm5,%xmm3
movdqa %xmm8,%xmm5
pcmpgtd %xmm12,%xmm5
packssdw %xmm5,%xmm6
por    %xmm4,%xmm3
movdqa %xmm8,%xmm4
paddd  %xmm13,%xmm4
pand   %xmm5,%xmm4
pandn  %xmm11,%xmm5
por    %xmm4,%xmm5
paddd  %xmm14,%xmm10
paddd  %xmm14,%xmm8
pxor   %xmm15,%xmm8
movdqa %xmm9,%xmm4
pcmpgtd %xmm8,%xmm4
pxor   %xmm15,%xmm10
movdqa %xmm9,%xmm7
pcmpgtd %xmm10,%xmm7
packsswb %xmm6,%xmm6
packssdw %xmm4,%xmm7
movdqa %xmm6,%xmm4
pandn  0xa84(%rip),%xmm4
pand   0xa8c(%rip),%xmm6
por    %xmm4,%xmm6
packsswb %xmm7,%xmm7
pand   %xmm7,%xmm6
pandn  %xmm1,%xmm7
por    %xmm6,%xmm7
pand   %xmm2,%xmm5
pand   %xmm2,%xmm3
packuswb %xmm5,%xmm3
packuswb %xmm3,%xmm3
paddb  %xmm7,%xmm3
movq   %xmm3,0x40(%rsp,%rdx,1)
add    $0x8,%rdx
cmp    %rdx,%rcx
jne    1520 <wordConvert+0x3e0>
cmp    %rbx,%rcx
je     16ba <wordConvert+0x57a>
mov    $0x41,%edx
nopl   0x0(%rax)
movsbl 0x40(%rsp,%rcx,1),%esi
lea    (%r8,%rsi,1),%edi
lea    -0x40(%rdi),%ebp
cmp    $0x41,%edi
movzbl %bpl,%ebp
cmovge %r8d,%ebp
cmp    $0x5b,%edi
mov    $0x5a,%eax
cmovge %edx,%eax
lea    -0x5b(%rdi),%edi
movzbl %dil,%edi
cmovl  %ebp,%edi
lea    (%r8,%rsi,1),%ebp
add    $0xffffffa5,%ebp
cmp    $0xffffffe6,%ebp
cmovae %esi,%eax
add    %al,%dil
mov    %dil,0x40(%rsp,%rcx,1)
add    $0x1,%rcx
cmp    %rcx,%rbx
jne    1670 <wordConvert+0x530>
lea    0x40(%rsp),%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1050 <printMessage@plt>
add    $0xc0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Word to Encrypt or Decrypt? \00"
@.str.1 = [4 x i8] c" %s\00"
@.str.2 = [28 x i8] c"Encrypt (0) or Decrypt (1)?\00"
@.str.3 = [4 x i8] c" %d\00"
@.str.4 = [13 x i8] c"Encrypt Key?\00"
define void @wordConvert() {
%1 = alloca [128 x i8]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
%8 = call i32 @printMessage(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i32 0)
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), [128 x i8]* %1)
%10 = call i32 @printMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 0, i32 0)
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%12 = call i32 @printMessage(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 0, i32 0)
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%14 = load i32, i32* %2
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %19
16: ; preds = %0
%17 = load i32, i32* %3
%18 = sub nsw i32 0, %17
store i32 %18, i32* %3
br label %19
19: ; preds = %16, %0
%20 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%21 = call i32 @strlen(i8* %20)
store i32 %21, i32* %4
store i32 0, i32* %5
br label %22
22: ; preds = %35, %19
%23 = load i32, i32* %5
%24 = load i32, i32* %4
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %38
26: ; preds = %22
%27 = load i32, i32* %5
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 %28
%30 = load i8, i8* %29
%31 = call signext i8 @toupper(i8 signext %30)
%32 = load i32, i32* %5
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 %33
store i8 %31, i8* %34
br label %35
35: ; preds = %26
%36 = load i32, i32* %5
%37 = add nsw i32 %36, 1
store i32 %37, i32* %5
br label %22
38: ; preds = %22
store i32 0, i32* %5
br label %39
39: ; preds = %83, %38
%40 = load i32, i32* %5
%41 = load i32, i32* %4
%42 = icmp slt i32 %40, %41
br i1 %42, label %43, label %86
43: ; preds = %39
%44 = load i32, i32* %3
store i32 %44, i32* %6
%45 = load i32, i32* %5
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 %46
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = load i32, i32* %6
%51 = add nsw i32 %49, %50
store i32 %51, i32* %7
%52 = load i32, i32* %7
%53 = icmp slt i32 %52, 65
br i1 %53, label %54, label %61
54: ; preds = %43
%55 = load i32, i32* %7
%56 = sub nsw i32 %55, 65
%57 = add nsw i32 %56, 1
store i32 %57, i32* %6
%58 = load i32, i32* %5
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 %59
store i8 90, i8* %60
br label %61
61: ; preds = %54, %43
%62 = load i32, i32* %7
%63 = icmp sgt i32 %62, 90
br i1 %63, label %64, label %71
64: ; preds = %61
%65 = load i32, i32* %7
%66 = sub nsw i32 %65, 90
%67 = sub nsw i32 %66, 1
store i32 %67, i32* %6
%68 = load i32, i32* %5
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 %69
store i8 65, i8* %70
br label %71
71: ; preds = %64, %61
%72 = load i32, i32* %5
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 %73
%75 = load i8, i8* %74
%76 = sext i8 %75 to i32
%77 = load i32, i32* %6
%78 = add nsw i32 %76, %77
%79 = trunc i32 %78 to i8
%80 = load i32, i32* %5
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 %81
store i8 %79, i8* %82
br label %83
83: ; preds = %71
%84 = load i32, i32* %5
%85 = add nsw i32 %84, 1
store i32 %85, i32* %5
br label %39
86: ; preds = %39
%87 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%88 = call i32 @printMessage(i8* %87, i32 1, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"Word to Encrypt or Decrypt? \00"
@.str.1 = [4 x i8] c" %s\00"
@.str.2 = [28 x i8] c"Encrypt (0) or Decrypt (1)?\00"
@.str.3 = [4 x i8] c" %d\00"
@.str.4 = [13 x i8] c"Encrypt Key?\00"
define void @wordConvert() {
%1 = alloca [128 x i8]
%2 = alloca i32
%3 = alloca i32
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%5 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%6 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%7 = tail call i32 @printMessage(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i32 0)
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), [128 x i8]* %1)
%9 = call i32 @printMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 0, i32 0)
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%11 = call i32 @printMessage(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 0, i32 0)
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %18
15: ; preds = %0
%16 = load i32, i32* %3
%17 = sub nsw i32 0, %16
store i32 %17, i32* %3
br label %18
18: ; preds = %15, %0
%19 = call i32 @strlen(i8* %4)
%20 = icmp sgt i32 %19, 0
br i1 %20, label %21, label %119
21: ; preds = %18
%22 = zext i32 %19 to i64
br label %92
23: ; preds = %92
br i1 %20, label %24, label %119
24: ; preds = %23
%25 = load i32, i32* %3
%26 = zext i32 %19 to i64
%27 = icmp ult i32 %19, 8
br i1 %27, label %90, label %28
28: ; preds = %24
%29 = icmp ult i32 %19, 16
br i1 %29, label %61, label %30
30: ; preds = %28
%31 = and i64 %22, 4294967280
%32 = insertelement <16 x i32> poison, i32 %25, i64 0
%33 = shufflevector <16 x i32> %32, <16 x i32> poison, <16 x i32> zeroinitializer
br label %34
34: ; preds = %34, %30
%35 = phi i64 [ 0, %30 ], [ %54, %34 ]
%36 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 %35
%37 = bitcast i8* %36 to <16 x i8>*
%38 = load <16 x i8>, <16 x i8>* %37
%39 = sext <16 x i8> %38 to <16 x i32>
%40 = add nsw <16 x i32> %33, %39
%41 = icmp slt <16 x i32> %40, <i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65>
%42 = add <16 x i32> %40, <i32 192, i32 192, i32 192, i32 192, i32 192, i32 192, i32 192, i32 192, i32 192, i32 192, i32 192, i32 192, i32 192, i32 192, i32 192, i32 192>
%43 = select <16 x i1> %41, <16 x i32> %42, <16 x i32> %33
%44 = icmp sgt <16 x i32> %40, <i32 90, i32 90, i32 90, i32 90, i32 90, i32 90, i32 90, i32 90, i32 90, i32 90, i32 90, i32 90, i32 90, i32 90, i32 90, i32 90>
%45 = add <16 x i32> %40, <i32 165, i32 165, i32 165, i32 165, i32 165, i32 165, i32 165, i32 165, i32 165, i32 165, i32 165, i32 165, i32 165, i32 165, i32 165, i32 165>
%46 = select <16 x i1> %44, <16 x i32> %45, <16 x i32> %43
%47 = add <16 x i32> %40, <i32 -91, i32 -91, i32 -91, i32 -91, i32 -91, i32 -91, i32 -91, i32 -91, i32 -91, i32 -91, i32 -91, i32 -91, i32 -91, i32 -91, i32 -91, i32 -91>
%48 = icmp ult <16 x i32> %47, <i32 -26, i32 -26, i32 -26, i32 -26, i32 -26, i32 -26, i32 -26, i32 -26, i32 -26, i32 -26, i32 -26, i32 -26, i32 -26, i32 -26, i32 -26, i32 -26>
%49 = select <16 x i1> %44, <16 x i8> <i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65>, <16 x i8> <i8 90, i8 90, i8 90, i8 90, i8 90, i8 90, i8 90, i8 90, i8 90, i8 90, i8 90, i8 90, i8 90, i8 90, i8 90, i8 90>
%50 = select <16 x i1> %48, <16 x i8> %49, <16 x i8> %38
%51 = trunc <16 x i32> %46 to <16 x i8>
%52 = add <16 x i8> %50, %51
%53 = bitcast i8* %36 to <16 x i8>*
store <16 x i8> %52, <16 x i8>* %53
%54 = add nuw i64 %35, 16
%55 = icmp eq i64 %54, %31
br i1 %55, label %56, label %34
56: ; preds = %34
%57 = icmp eq i64 %31, %22
br i1 %57, label %119, label %58
58: ; preds = %56
%59 = and i64 %22, 8
%60 = icmp eq i64 %59, 0
br i1 %60, label %90, label %61
61: ; preds = %28, %58
%62 = phi i64 [ %31, %58 ], [ 0, %28 ]
%63 = and i64 %22, 4294967288
%64 = insertelement <8 x i32> poison, i32 %25, i64 0
%65 = shufflevector <8 x i32> %64, <8 x i32> poison, <8 x i32> zeroinitializer
br label %66
66: ; preds = %66, %61
%67 = phi i64 [ %62, %61 ], [ %86, %66 ]
%68 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 %67
%69 = bitcast i8* %68 to <8 x i8>*
%70 = load <8 x i8>, <8 x i8>* %69
%71 = sext <8 x i8> %70 to <8 x i32>
%72 = add nsw <8 x i32> %65, %71
%73 = icmp slt <8 x i32> %72, <i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65>
%74 = add <8 x i32> %72, <i32 192, i32 192, i32 192, i32 192, i32 192, i32 192, i32 192, i32 192>
%75 = select <8 x i1> %73, <8 x i32> %74, <8 x i32> %65
%76 = icmp sgt <8 x i32> %72, <i32 90, i32 90, i32 90, i32 90, i32 90, i32 90, i32 90, i32 90>
%77 = add <8 x i32> %72, <i32 165, i32 165, i32 165, i32 165, i32 165, i32 165, i32 165, i32 165>
%78 = select <8 x i1> %76, <8 x i32> %77, <8 x i32> %75
%79 = add <8 x i32> %72, <i32 -91, i32 -91, i32 -91, i32 -91, i32 -91, i32 -91, i32 -91, i32 -91>
%80 = icmp ult <8 x i32> %79, <i32 -26, i32 -26, i32 -26, i32 -26, i32 -26, i32 -26, i32 -26, i32 -26>
%81 = select <8 x i1> %76, <8 x i8> <i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65>, <8 x i8> <i8 90, i8 90, i8 90, i8 90, i8 90, i8 90, i8 90, i8 90>
%82 = select <8 x i1> %80, <8 x i8> %81, <8 x i8> %70
%83 = trunc <8 x i32> %78 to <8 x i8>
%84 = add <8 x i8> %82, %83
%85 = bitcast i8* %68 to <8 x i8>*
store <8 x i8> %84, <8 x i8>* %85
%86 = add nuw i64 %67, 8
%87 = icmp eq i64 %86, %63
br i1 %87, label %88, label %66
88: ; preds = %66
%89 = icmp eq i64 %63, %22
br i1 %89, label %119, label %90
90: ; preds = %24, %58, %88
%91 = phi i64 [ 0, %24 ], [ %31, %58 ], [ %63, %88 ]
br label %99
92: ; preds = %21, %92
%93 = phi i64 [ 0, %21 ], [ %97, %92 ]
%94 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 %93
%95 = load i8, i8* %94
%96 = call signext i8 @toupper(i8 signext %95)
store i8 %96, i8* %94
%97 = add nuw nsw i64 %93, 1
%98 = icmp eq i64 %97, %22
br i1 %98, label %23, label %92
99: ; preds = %90, %99
%100 = phi i64 [ %117, %99 ], [ %91, %90 ]
%101 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 %100
%102 = load i8, i8* %101
%103 = sext i8 %102 to i32
%104 = add nsw i32 %25, %103
%105 = icmp slt i32 %104, 65
%106 = add i32 %104, 192
%107 = select i1 %105, i32 %106, i32 %25
%108 = icmp sgt i32 %104, 90
%109 = add i32 %104, 165
%110 = select i1 %108, i32 %109, i32 %107
%111 = add i32 %104, -91
%112 = icmp ult i32 %111, -26
%113 = select i1 %108, i8 65, i8 90
%114 = select i1 %112, i8 %113, i8 %102
%115 = trunc i32 %110 to i8
%116 = add i8 %114, %115
store i8 %116, i8* %101
%117 = add nuw nsw i64 %100, 1
%118 = icmp eq i64 %117, %26
br i1 %118, label %119, label %99
119: ; preds = %99, %56, %88, %18, %23
%120 = call i32 @printMessage(i8* %4, i32 1, i32 0, i32 0)
ret void
}