#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 /*<<< orphan*/ input;

/* Variables and functions */
int /*<<< orphan*/ decryptStrings(char **, int);
int /*<<< orphan*/ encryptStrings(char **, int);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ getchar();
int isAPalindrome(char *);
int /*<<< orphan*/ printStrings(char **);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ removeLetter(char *, char);
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ sortStrings(char **);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int vowelCounter(char *);
void main() {
  int selection;
  char input[32];
  printf("Assignment 4: Pointer Operations\n\n");
  printf("Choose one of the following: \n1. Sorting Encrypted Strings\n2. "
         "Vowel Counter\n3. Palindrome\n4. Letter Remover\n\n");
  scanf("%d", &selection);
  getchar();
  if (selection == 1) {
    char strings[5][32];
    int key;
    for (int i = 0; i < 5; i++) {
      printf("\nEnter the next String: ");
      fgets(input, sizeof(input), stdin);
      input[strlen(input) - 1] = '\0';
      strcpy(strings[i], input);
    }
    printf("\nEnter a key value for encryption: ");
    scanf("%d", &key);
    encryptStrings(strings, key);
    printf("\nEncrypted Strings:\n");
    printStrings(strings);
    sortStrings(strings);
    decryptStrings(strings, key);
    printf("\nSorted Strings:\n");
    printStrings(strings);
  } else if (selection == 2) {
    printf("\nEnter a String: ");
    fgets(input, sizeof(input), stdin);
    input[strlen(input) - 1] = '\0';
    int numVowels = vowelCounter(input);
    printf("\nThere are %d vowels in \"%s\"", numVowels, input);
  } else if (selection == 3) {
    printf("\nEnter a String: ");
    fgets(input, sizeof(input), stdin);
    input[strlen(input) - 1] = '\0';
    int isPalindrome = isAPalindrome(input);
    if (isPalindrome)
      printf("\nThe string \"%s\" is a palindrome", input);
    else
      printf("\nThe string \"%s\" is not a palindrome", input);
  } else if (selection == 4) {
    printf("\nEnter a String: ");
    fgets(input, sizeof(input), stdin);
    input[strlen(input) - 1] = '\0';
    char letterToBeRemoved;
    printf("\nEnter a letter to be removed: ");
    scanf(" %c", &letterToBeRemoved);
    removeLetter(input, letterToBeRemoved);
    printf("\nResult: %s", input);
  } else {
    printf("Program terminating...");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
lea    0xe1e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe93(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   10c0 <scanf@plt>
mov    $0x0,%al
call   1090 <getchar@plt>
cmpl   $0x1,-0x4(%rbp)
jne    1327 <main+0x157>
movl   $0x0,-0xd8(%rbp)
cmpl   $0x5,-0xd8(%rbp)
jge    129b <main+0xcb>
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    0x2d9e(%rip),%rax
mov    (%rax),%edx
mov    $0x20,%esi
call   1080 <fgets@plt>
lea    -0x30(%rbp),%rdi
call   1040 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x30(%rbp,%rax,1)
movslq -0xd8(%rbp),%rax
lea    -0xd0(%rbp),%rdi
shl    $0x5,%rax
add    %rax,%rdi
lea    -0x30(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0xd8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd8(%rbp)
jmp    1224 <main+0x54>
lea    0xe0b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xde1(%rip),%rdi
lea    -0xd4(%rbp),%rsi
mov    $0x0,%al
call   10c0 <scanf@plt>
lea    -0xd0(%rbp),%rdi
mov    -0xd4(%rbp),%esi
call   10d0 <encryptStrings@plt>
lea    0xdfa(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0xd0(%rbp),%rdi
call   10b0 <printStrings@plt>
lea    -0xd0(%rbp),%rdi
call   1060 <sortStrings@plt>
lea    -0xd0(%rbp),%rdi
mov    -0xd4(%rbp),%esi
call   1070 <decryptStrings@plt>
lea    0xdd7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0xd0(%rbp),%rdi
call   10b0 <printStrings@plt>
jmp    14ca <main+0x2fa>
cmpl   $0x2,-0x4(%rbp)
jne    1395 <main+0x1c5>
lea    0xdc0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    0x2c9e(%rip),%rax
mov    (%rax),%edx
mov    $0x20,%esi
call   1080 <fgets@plt>
lea    -0x30(%rbp),%rdi
call   1040 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x30(%rbp,%rax,1)
lea    -0x30(%rbp),%rdi
call   10f0 <vowelCounter@plt>
mov    %eax,-0xdc(%rbp)
mov    -0xdc(%rbp),%esi
lea    -0x30(%rbp),%rdx
lea    0xd81(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14c5 <main+0x2f5>
cmpl   $0x3,-0x4(%rbp)
jne    1421 <main+0x251>
lea    0xd52(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    0x2c30(%rip),%rax
mov    (%rax),%edx
mov    $0x20,%esi
call   1080 <fgets@plt>
lea    -0x30(%rbp),%rdi
call   1040 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x30(%rbp,%rax,1)
lea    -0x30(%rbp),%rdi
call   10e0 <isAPalindrome@plt>
mov    %eax,-0xe0(%rbp)
cmpl   $0x0,-0xe0(%rbp)
je     140a <main+0x23a>
lea    -0x30(%rbp),%rsi
lea    0xd29(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    141c <main+0x24c>
lea    -0x30(%rbp),%rsi
lea    0xd33(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14c0 <main+0x2f0>
cmpl   $0x4,-0x4(%rbp)
jne    14ad <main+0x2dd>
lea    0xcc6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    0x2ba4(%rip),%rax
mov    (%rax),%edx
mov    $0x20,%esi
call   1080 <fgets@plt>
lea    -0x30(%rbp),%rdi
call   1040 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x30(%rbp,%rax,1)
lea    0xd03(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd15(%rip),%rdi
lea    -0xe1(%rbp),%rsi
mov    $0x0,%al
call   10c0 <scanf@plt>
lea    -0x30(%rbp),%rdi
movsbl -0xe1(%rbp),%esi
call   10a0 <removeLetter@plt>
lea    -0x30(%rbp),%rsi
lea    0xcf0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14bb <main+0x2eb>
lea    0xce9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14c0 <main+0x2f0>
jmp    14c5 <main+0x2f5>
jmp    14ca <main+0x2fa>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xd8,%rsp
lea    0xf17(%rip),%rdi
call   1040 <puts@plt>
lea    0xf2d(%rip),%rdi
call   1040 <puts@plt>
lea    0xe03(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   10d0 <scanf@plt>
xor    %eax,%eax
call   10a0 <getchar@plt>
mov    0xc(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x3,%eax
ja     13dd <main+0x1fd>
lea    0xdc9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xdcc(%rip),%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2d90(%rip),%r12
mov    (%r12),%edx
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1090 <fgets@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
lea    0x30(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    (%r12),%edx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1090 <fgets@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
lea    0x50(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    (%r12),%edx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1090 <fgets@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
lea    0x70(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    (%r12),%edx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1090 <fgets@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
lea    0x90(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    (%r12),%edx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1090 <fgets@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
lea    0xb0(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xcb6(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xc8c(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   10d0 <scanf@plt>
mov    0x8(%rsp),%esi
mov    %r14,%rdi
call   10e0 <encryptStrings@plt>
lea    0xdf8(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   10c0 <printStrings@plt>
mov    %r14,%rdi
call   1070 <sortStrings@plt>
mov    0x8(%rsp),%esi
mov    %r14,%rdi
call   1080 <decryptStrings@plt>
lea    0xde4(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   10c0 <printStrings@plt>
jmp    151a <main+0x33a>
lea    0xd11(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    151a <main+0x33a>
lea    0xc59(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2be3(%rip),%rax
mov    (%rax),%edx
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1090 <fgets@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rdi
call   1100 <vowelCounter@plt>
lea    0xc2b(%rip),%rdi
mov    %eax,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
jmp    151a <main+0x33a>
lea    0xc01(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2b8b(%rip),%rax
mov    (%rax),%edx
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1090 <fgets@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rdi
call   10f0 <isAPalindrome@plt>
test   %eax,%eax
je     1507 <main+0x327>
lea    0xbec(%rip),%rdi
jmp    150e <main+0x32e>
lea    0xbb4(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2b3e(%rip),%rax
mov    (%rax),%edx
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1090 <fgets@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
lea    0xbf1(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xc03(%rip),%rdi
lea    0x30(%rsp),%rsi
xor    %eax,%eax
call   10d0 <scanf@plt>
movsbl 0x30(%rsp),%esi
mov    %rbx,%rdi
call   10b0 <removeLetter@plt>
lea    0xbe7(%rip),%rdi
mov    %rbx,%rsi
jmp    1513 <main+0x333>
lea    0xb92(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Assignment 4: Pointer Operations\0A\0A\00"
@.str.1 = [110 x i8] c"Choose one of the following: \0A1. Sorting Encrypted Strings\0A2. Vowel Counter\0A3. Palindrome\0A4. Letter Remover\0A\0A\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [25 x i8] c"\0AEnter the next String: \00"
@stdin = global i32 0
@.str.4 = [36 x i8] c"\0AEnter a key value for encryption: \00"
@.str.5 = [21 x i8] c"\0AEncrypted Strings:\0A\00"
@.str.6 = [18 x i8] c"\0ASorted Strings:\0A\00"
@.str.7 = [18 x i8] c"\0AEnter a String: \00"
@.str.8 = [29 x i8] c"\0AThere are %d vowels in \22%s\22\00"
@.str.9 = [33 x i8] c"\0AThe string \22%s\22 is a palindrome\00"
@.str.10 = [37 x i8] c"\0AThe string \22%s\22 is not a palindrome\00"
@.str.11 = [32 x i8] c"\0AEnter a letter to be removed: \00"
@.str.12 = [4 x i8] c" %c\00"
@.str.13 = [12 x i8] c"\0AResult: %s\00"
@.str.14 = [23 x i8] c"Program terminating...\00"
define void @main() {
%1 = alloca i32
%2 = alloca [32 x i8]
%3 = alloca [5 x [32 x i8]]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%12 = call i32 (...) @getchar()
%13 = load i32, i32* %1
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %60
15: ; preds = %0
store i32 0, i32* %5
br label %16
16: ; preds = %35, %15
%17 = load i32, i32* %5
%18 = icmp slt i32 %17, 5
br i1 %18, label %19, label %38
19: ; preds = %16
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%21 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%22 = load i32, i32* @stdin
%23 = call i32 @fgets(i8* %21, i32 32, i32 %22)
%24 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%25 = call i32 @strlen(i8* %24)
%26 = sub nsw i32 %25, 1
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %27
store i8 0, i8* %28
%29 = load i32, i32* %5
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [5 x [32 x i8]], [5 x [32 x i8]]* %3, i64 0, i64 %30
%32 = getelementptr inbounds [32 x i8], [32 x i8]* %31, i64 0, i64 0
%33 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%34 = call i32 @strcpy(i8* %32, i8* %33)
br label %35
35: ; preds = %19
%36 = load i32, i32* %5
%37 = add nsw i32 %36, 1
store i32 %37, i32* %5
br label %16
38: ; preds = %16
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%40 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%41 = getelementptr inbounds [5 x [32 x i8]], [5 x [32 x i8]]* %3, i64 0, i64 0
%42 = bitcast [32 x i8]* %41 to i8**
%43 = load i32, i32* %4
%44 = call i32 @encryptStrings(i8** %42, i32 %43)
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%46 = getelementptr inbounds [5 x [32 x i8]], [5 x [32 x i8]]* %3, i64 0, i64 0
%47 = bitcast [32 x i8]* %46 to i8**
%48 = call i32 @printStrings(i8** %47)
%49 = getelementptr inbounds [5 x [32 x i8]], [5 x [32 x i8]]* %3, i64 0, i64 0
%50 = bitcast [32 x i8]* %49 to i8**
%51 = call i32 @sortStrings(i8** %50)
%52 = getelementptr inbounds [5 x [32 x i8]], [5 x [32 x i8]]* %3, i64 0, i64 0
%53 = bitcast [32 x i8]* %52 to i8**
%54 = load i32, i32* %4
%55 = call i32 @decryptStrings(i8** %53, i32 %54)
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%57 = getelementptr inbounds [5 x [32 x i8]], [5 x [32 x i8]]* %3, i64 0, i64 0
%58 = bitcast [32 x i8]* %57 to i8**
%59 = call i32 @printStrings(i8** %58)
br label %127
60: ; preds = %0
%61 = load i32, i32* %1
%62 = icmp eq i32 %61, 2
br i1 %62, label %63, label %78
63: ; preds = %60
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%65 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%66 = load i32, i32* @stdin
%67 = call i32 @fgets(i8* %65, i32 32, i32 %66)
%68 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%69 = call i32 @strlen(i8* %68)
%70 = sub nsw i32 %69, 1
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %71
store i8 0, i8* %72
%73 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%74 = call i32 @vowelCounter(i8* %73)
store i32 %74, i32* %6
%75 = load i32, i32* %6
%76 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0), i32 %75, i8* %76)
br label %126
78: ; preds = %60
%79 = load i32, i32* %1
%80 = icmp eq i32 %79, 3
br i1 %80, label %81, label %102
81: ; preds = %78
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%83 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%84 = load i32, i32* @stdin
%85 = call i32 @fgets(i8* %83, i32 32, i32 %84)
%86 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%87 = call i32 @strlen(i8* %86)
%88 = sub nsw i32 %87, 1
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %89
store i8 0, i8* %90
%91 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%92 = call i32 @isAPalindrome(i8* %91)
store i32 %92, i32* %7
%93 = load i32, i32* %7
%94 = icmp ne i32 %93, 0
br i1 %94, label %95, label %98
95: ; preds = %81
%96 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0), i8* %96)
br label %101
98: ; preds = %81
%99 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), i8* %99)
br label %101
101: ; preds = %98, %95
br label %125
102: ; preds = %78
%103 = load i32, i32* %1
%104 = icmp eq i32 %103, 4
br i1 %104, label %105, label %122
105: ; preds = %102
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%107 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%108 = load i32, i32* @stdin
%109 = call i32 @fgets(i8* %107, i32 32, i32 %108)
%110 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%111 = call i32 @strlen(i8* %110)
%112 = sub nsw i32 %111, 1
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %113
store i8 0, i8* %114
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0))
%116 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8* %8)
%117 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%118 = load i8, i8* %8
%119 = call i32 @removeLetter(i8* %117, i8 signext %118)
%120 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %120)
br label %124
122: ; preds = %102
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0))
br label %124
124: ; preds = %122, %105
br label %125
125: ; preds = %124, %101
br label %126
126: ; preds = %125, %63
br label %127
127: ; preds = %126, %38
ret void
}

LLVM IR (-O2):
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [25 x i8] c"\0AEnter the next String: \00"
@stdin = global i32 0
@.str.4 = [36 x i8] c"\0AEnter a key value for encryption: \00"
@.str.7 = [18 x i8] c"\0AEnter a String: \00"
@.str.8 = [29 x i8] c"\0AThere are %d vowels in \22%s\22\00"
@.str.9 = [33 x i8] c"\0AThe string \22%s\22 is a palindrome\00"
@.str.10 = [37 x i8] c"\0AThe string \22%s\22 is not a palindrome\00"
@.str.11 = [32 x i8] c"\0AEnter a letter to be removed: \00"
@.str.12 = [4 x i8] c" %c\00"
@.str.13 = [12 x i8] c"\0AResult: %s\00"
@.str.14 = [23 x i8] c"Program terminating...\00"
@str = [34 x i8] c"Assignment 4: Pointer Operations\0A\00"
@str.15 = [109 x i8] c"Choose one of the following: \0A1. Sorting Encrypted Strings\0A2. Vowel Counter\0A3. Palindrome\0A4. Letter Remover\0A\00"
@str.16 = [20 x i8] c"\0AEncrypted Strings:\00"
@str.17 = [17 x i8] c"\0ASorted Strings:\00"
define void @main() {
%1 = alloca i32
%2 = alloca [32 x i8]
%3 = alloca [5 x [32 x i8]]
%4 = alloca i32
%5 = alloca i8
%6 = bitcast i32* %1 to i8*
%7 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([109 x i8], [109 x i8]* @str.15, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%11 = call i32 (...) @getchar()
%12 = load i32, i32* %1
switch i32 %12, label %109 [
i32 1, label %13
i32 2, label %72
i32 3, label %82
i32 4, label %96
]
13: ; preds = %0
%14 = getelementptr inbounds [5 x [32 x i8]], [5 x [32 x i8]]* %3, i64 0, i64 0, i64 0
%15 = bitcast i32* %4 to i8*
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%17 = load i32, i32* @stdin
%18 = call i32 @fgets(i8* %7, i32 32, i32 %17)
%19 = call i32 @strlen(i8* %7)
%20 = add nsw i32 %19, -1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %21
store i8 0, i8* %22
%23 = call i32 @strcpy(i8* %14, i8* %7)
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%25 = load i32, i32* @stdin
%26 = call i32 @fgets(i8* %7, i32 32, i32 %25)
%27 = call i32 @strlen(i8* %7)
%28 = add nsw i32 %27, -1
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %29
store i8 0, i8* %30
%31 = getelementptr inbounds [5 x [32 x i8]], [5 x [32 x i8]]* %3, i64 0, i64 1, i64 0
%32 = call i32 @strcpy(i8* %31, i8* %7)
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%34 = load i32, i32* @stdin
%35 = call i32 @fgets(i8* %7, i32 32, i32 %34)
%36 = call i32 @strlen(i8* %7)
%37 = add nsw i32 %36, -1
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %38
store i8 0, i8* %39
%40 = getelementptr inbounds [5 x [32 x i8]], [5 x [32 x i8]]* %3, i64 0, i64 2, i64 0
%41 = call i32 @strcpy(i8* %40, i8* %7)
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%43 = load i32, i32* @stdin
%44 = call i32 @fgets(i8* %7, i32 32, i32 %43)
%45 = call i32 @strlen(i8* %7)
%46 = add nsw i32 %45, -1
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %47
store i8 0, i8* %48
%49 = getelementptr inbounds [5 x [32 x i8]], [5 x [32 x i8]]* %3, i64 0, i64 3, i64 0
%50 = call i32 @strcpy(i8* %49, i8* %7)
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%52 = load i32, i32* @stdin
%53 = call i32 @fgets(i8* %7, i32 32, i32 %52)
%54 = call i32 @strlen(i8* %7)
%55 = add nsw i32 %54, -1
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %56
store i8 0, i8* %57
%58 = getelementptr inbounds [5 x [32 x i8]], [5 x [32 x i8]]* %3, i64 0, i64 4, i64 0
%59 = call i32 @strcpy(i8* %58, i8* %7)
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%61 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%62 = bitcast [5 x [32 x i8]]* %3 to i8**
%63 = load i32, i32* %4
%64 = call i32 @encryptStrings(i8** %62, i32 %63)
%65 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.16, i64 0, i64 0))
%66 = call i32 @printStrings(i8** %62)
%67 = call i32 @sortStrings(i8** %62)
%68 = load i32, i32* %4
%69 = call i32 @decryptStrings(i8** %62, i32 %68)
%70 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.17, i64 0, i64 0))
%71 = call i32 @printStrings(i8** %62)
br label %111
72: ; preds = %0
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%74 = load i32, i32* @stdin
%75 = call i32 @fgets(i8* %7, i32 32, i32 %74)
%76 = call i32 @strlen(i8* %7)
%77 = add nsw i32 %76, -1
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %78
store i8 0, i8* %79
%80 = call i32 @vowelCounter(i8* %7)
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0), i32 %80, i8* %7)
br label %111
82: ; preds = %0
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%84 = load i32, i32* @stdin
%85 = call i32 @fgets(i8* %7, i32 32, i32 %84)
%86 = call i32 @strlen(i8* %7)
%87 = add nsw i32 %86, -1
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %88
store i8 0, i8* %89
%90 = call i32 @isAPalindrome(i8* %7)
%91 = icmp eq i32 %90, 0
br i1 %91, label %94, label %92
92: ; preds = %82
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0), i8* %7)
br label %111
94: ; preds = %82
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), i8* %7)
br label %111
96: ; preds = %0
%97 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%98 = load i32, i32* @stdin
%99 = call i32 @fgets(i8* %7, i32 32, i32 %98)
%100 = call i32 @strlen(i8* %7)
%101 = add nsw i32 %100, -1
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %102
store i8 0, i8* %103
%104 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0))
%105 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8* %5)
%106 = load i8, i8* %5
%107 = call i32 @removeLetter(i8* %7, i8 signext %106)
%108 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %7)
br label %111
109: ; preds = %0
%110 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0))
br label %111
111: ; preds = %92, %94, %72, %96, %109, %13
ret void
}