#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*/ createUser();
int /*<<< orphan*/ deleteUser();
int /*<<< orphan*/ displayPatient(char *);
int /*<<< orphan*/ editPatient(char *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/);
char getchar();
int /*<<< orphan*/ initializeString(char *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sanitizeInput(char *, int);
int /*<<< orphan*/ sanitizeInt(char *, int);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ unlock(char *);
void displayMainMenu(int level, int remind, const char *username, char *uuid) {
  remind = 0;
  int choice = 0;
  char temp[2];
  char usernameBuffer[20];
  char uuidBuffer[33];
  do {
    while (getchar() != '\n')
      ;
    choice = 0;
    printf("WELCOME TO THE UWF SSD SECURE MEDICAL RECORDS \n");
    printf("Your Permission Level is: %i\n", level);
    if (level == 1) {
      printf("[1] View personal records\n");
      printf("[2] Edit personal info\n");
      printf("[9] Exit Menu \n");
      if (remind == 0) {
        printf("You have no reminders\n");
      } else {
      }
      if (fgets(temp, 2, stdin) == NULL) {
      };
      sanitizeInt(temp, 2);
      choice = temp[0] - 48;
      switch (choice) {
      case 1:
        displayPatient(uuid);
        break;
      case 2:
        break;
      case 9:
        printf("Exiting menu \n");
        break;
      default:
        printf("Invalid input\n");
        break;
      }
    } else if (level == 2) {
      printf("[1] View Patient records\n");
      printf("[2] Update Patient records \n");
      printf("[3] Record vitals\n");
      printf("[9] Exit menu \n");
      if (fgets(temp, 2, stdin) == NULL) {
      };
      choice = temp[0] - 48;
      switch (choice) {
      case 1:
        break;
      case 2:
        while (getchar() != '\n')
          ;
        printf("\nENTER UUID: ");
        initializeString(uuidBuffer, 33);
        if (fgets(uuidBuffer, 33, stdin)) {
        };
        sanitizeInput(uuidBuffer, 33);
        editPatient(uuidBuffer);
        break;
      case 3:
        break;
      case 9:
        printf("Exiting menu \n");
        break;
      default:
        printf("Invalid input");
        break;
      }
    } else if (level == 3) {
      printf("[1] View Patient records\n");
      printf("[2] Update Patient records \n");
      printf("[3] Medical Reconciliation \n");
      printf("[4] Transfer of care \n");
      printf("[9] Exit menu \n");
      if (fgets(temp, 2, stdin) == NULL) {
      };
      choice = temp[0] - 48;
      switch (choice) {
      case 1:
        break;
      case 2:
        while (getchar() != '\n')
          ;
        printf("\nENTER UUID: ");
        initializeString(uuidBuffer, 33);
        if (fgets(uuidBuffer, 33, stdin)) {
        };
        sanitizeInput(uuidBuffer, 33);
        editPatient(uuidBuffer);
        break;
      case 3:
        break;
      case 4:
        break;
      case 9:
        printf("Exiting \n");
        break;
      default:
        printf("Invalid input\n");
        break;
      }
    } else if (level == 4) {
      printf("[1] Set up new User account \n");
      printf("[2] Deactivate User account \n");
      printf("[3] Unlock User account\n");
      printf("[9] Exit menu \n");
      if (fgets(temp, 2, stdin) == NULL) {
      };
      choice = temp[0] - 48;
      switch (choice) {
      case 1:
        createUser();
        break;
      case 2:
        deleteUser();
        break;
      case 3:
        while (getchar() != '\n')
          ;
        initializeString(usernameBuffer, 20);
        if (fgets(usernameBuffer, 20, stdin)) {
        };
        sanitizeInput(usernameBuffer, 20);
        unlock(usernameBuffer);
        break;
      case 9:
        printf("Exiting menu \n");
        break;
      default:
        printf("Invalid input \n");
        break;
      }
    }
  } while (choice != 9);
}


x86 assembly (clang, -O0):
<displayMainMenu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x1c(%rbp)
jmp    11dc <displayMainMenu+0x2c>
mov    $0x0,%al
call   10a0 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     11f4 <displayMainMenu+0x44>
jmp    11dc <displayMainMenu+0x2c>
movl   $0x0,-0x1c(%rbp)
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x1,-0x4(%rbp)
jne    131d <displayMainMenu+0x16d>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    126b <displayMainMenu+0xbb>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1270 <displayMainMenu+0xc0>
jmp    1270 <displayMainMenu+0xc0>
lea    -0x1e(%rbp),%rdi
mov    0x2d6d(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
jne    1296 <displayMainMenu+0xe6>
jmp    1296 <displayMainMenu+0xe6>
lea    -0x1e(%rbp),%rdi
mov    $0x2,%esi
call   1030 <sanitizeInt@plt>
movsbl -0x1e(%rbp),%eax
add    $0xffffffd0,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x74(%rbp)
sub    $0x1,%eax
je     12e4 <displayMainMenu+0x134>
jmp    12c2 <displayMainMenu+0x112>
mov    -0x74(%rbp),%eax
sub    $0x2,%eax
je     12f2 <displayMainMenu+0x142>
jmp    12d3 <displayMainMenu+0x123>
mov    -0x74(%rbp),%eax
sub    $0x9,%eax
je     12f7 <displayMainMenu+0x147>
jmp    130a <displayMainMenu+0x15a>
mov    -0x18(%rbp),%rdi
call   1090 <displayPatient@plt>
jmp    1318 <displayMainMenu+0x168>
jmp    1318 <displayMainMenu+0x168>
lea    0xe16(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1318 <displayMainMenu+0x168>
lea    0xe12(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    171d <displayMainMenu+0x56d>
cmpl   $0x2,-0x4(%rbp)
jne    1463 <displayMainMenu+0x2b3>
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe10(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe1f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe24(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x1e(%rbp),%rdi
mov    0x2c7e(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
jne    1385 <displayMainMenu+0x1d5>
jmp    1385 <displayMainMenu+0x1d5>
movsbl -0x1e(%rbp),%eax
add    $0xffffffd0,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x80(%rbp)
sub    $0x8,%eax
ja     1450 <displayMainMenu+0x2a0>
mov    -0x80(%rbp),%rax
lea    0xc99(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    145e <displayMainMenu+0x2ae>
jmp    13c2 <displayMainMenu+0x212>
mov    $0x0,%al
call   10a0 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     13da <displayMainMenu+0x22a>
jmp    13c2 <displayMainMenu+0x212>
lea    0xdab(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x70(%rbp),%rdi
mov    $0x21,%esi
call   1040 <initializeString@plt>
lea    -0x70(%rbp),%rdi
mov    0x2be7(%rip),%rax
mov    (%rax),%edx
mov    $0x21,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
je     141c <displayMainMenu+0x26c>
jmp    141c <displayMainMenu+0x26c>
lea    -0x70(%rbp),%rdi
mov    $0x21,%esi
call   10b0 <sanitizeInput@plt>
lea    -0x70(%rbp),%rdi
call   1070 <editPatient@plt>
jmp    145e <displayMainMenu+0x2ae>
jmp    145e <displayMainMenu+0x2ae>
lea    0xcd0(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    145e <displayMainMenu+0x2ae>
lea    0xd43(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1718 <displayMainMenu+0x568>
cmpl   $0x3,-0x4(%rbp)
jne    15c2 <displayMainMenu+0x412>
lea    0xcbe(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xcca(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xd18(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xd27(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xcd0(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x1e(%rbp),%rdi
mov    0x2b2a(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
jne    14d9 <displayMainMenu+0x329>
jmp    14d9 <displayMainMenu+0x329>
movsbl -0x1e(%rbp),%eax
add    $0xffffffd0,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x88(%rbp)
sub    $0x8,%eax
ja     15af <displayMainMenu+0x3ff>
mov    -0x88(%rbp),%rax
lea    0xb1b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    15bd <displayMainMenu+0x40d>
jmp    151c <displayMainMenu+0x36c>
mov    $0x0,%al
call   10a0 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1534 <displayMainMenu+0x384>
jmp    151c <displayMainMenu+0x36c>
lea    0xc51(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x70(%rbp),%rdi
mov    $0x21,%esi
call   1040 <initializeString@plt>
lea    -0x70(%rbp),%rdi
mov    0x2a8d(%rip),%rax
mov    (%rax),%edx
mov    $0x21,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
je     1576 <displayMainMenu+0x3c6>
jmp    1576 <displayMainMenu+0x3c6>
lea    -0x70(%rbp),%rdi
mov    $0x21,%esi
call   10b0 <sanitizeInput@plt>
lea    -0x70(%rbp),%rdi
call   1070 <editPatient@plt>
jmp    15bd <displayMainMenu+0x40d>
jmp    15bd <displayMainMenu+0x40d>
jmp    15bd <displayMainMenu+0x40d>
lea    0xc39(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    15bd <displayMainMenu+0x40d>
lea    0xb6d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1713 <displayMainMenu+0x563>
cmpl   $0x4,-0x4(%rbp)
jne    170e <displayMainMenu+0x55e>
lea    0xc13(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xc23(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xc33(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xb7f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x1e(%rbp),%rdi
mov    0x29d9(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
jne    162a <displayMainMenu+0x47a>
jmp    162a <displayMainMenu+0x47a>
movsbl -0x1e(%rbp),%eax
add    $0xffffffd0,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x90(%rbp)
sub    $0x8,%eax
ja     16fb <displayMainMenu+0x54b>
mov    -0x90(%rbp),%rax
lea    0x9a6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   10c0 <createUser@plt>
jmp    1709 <displayMainMenu+0x559>
mov    $0x0,%al
call   10d0 <deleteUser@plt>
jmp    1709 <displayMainMenu+0x559>
jmp    1680 <displayMainMenu+0x4d0>
mov    $0x0,%al
call   10a0 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1698 <displayMainMenu+0x4e8>
jmp    1680 <displayMainMenu+0x4d0>
lea    -0x40(%rbp),%rdi
mov    $0x14,%esi
call   1040 <initializeString@plt>
lea    -0x40(%rbp),%rdi
mov    0x2937(%rip),%rax
mov    (%rax),%edx
mov    $0x14,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
je     16cc <displayMainMenu+0x51c>
jmp    16cc <displayMainMenu+0x51c>
lea    -0x40(%rbp),%rdi
mov    $0x14,%esi
call   10b0 <sanitizeInput@plt>
lea    -0x40(%rbp),%rdi
call   1050 <unlock@plt>
jmp    1709 <displayMainMenu+0x559>
lea    0xa25(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1709 <displayMainMenu+0x559>
lea    0xb39(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    170e <displayMainMenu+0x55e>
jmp    1713 <displayMainMenu+0x563>
jmp    1718 <displayMainMenu+0x568>
jmp    171d <displayMainMenu+0x56d>
jmp    1722 <displayMainMenu+0x572>
cmpl   $0x9,-0x1c(%rbp)
jne    11d7 <displayMainMenu+0x27>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayMainMenu>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rcx,0x8(%rsp)
mov    %edi,%r14d
lea    -0x1(%r14),%r13d
lea    0xe1f(%rip),%rbx
lea    0x6(%rsp),%rbp
jmp    120a <displayMainMenu+0x4a>
mov    0x8(%rsp),%rdi
call   10a0 <displayPatient@plt>
mov    $0x1,%r12d
nopl   0x0(%rax,%rax,1)
cmp    $0x9,%r12d
je     1566 <displayMainMenu+0x3a6>
xor    %eax,%eax
call   10b0 <getchar@plt>
cmp    $0xa,%al
jne    120a <displayMainMenu+0x4a>
lea    0xe8c(%rip),%rdi
call   1060 <puts@plt>
xor    %r12d,%r12d
lea    0xe51(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
cmp    $0x3,%r13d
ja     1200 <displayMainMenu+0x40>
movslq (%rbx,%r13,4),%rax
add    %rbx,%rax
jmp    *%rax
lea    0xf7e(%rip),%rdi
call   1060 <puts@plt>
lea    0xf8c(%rip),%rdi
call   1060 <puts@plt>
lea    0xf97(%rip),%rdi
call   1060 <puts@plt>
lea    0xf9a(%rip),%rdi
call   1060 <puts@plt>
mov    0x2d6d(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%r12d
mov    %rbp,%rdi
mov    $0x2,%esi
call   1090 <fgets@plt>
mov    %rbp,%rdi
mov    $0x2,%esi
call   1030 <sanitizeInt@plt>
movsbl 0x6(%rsp),%r15d
cmp    $0x31,%r15d
je     11e8 <displayMainMenu+0x28>
cmp    $0x32,%r15d
je     1200 <displayMainMenu+0x40>
cmp    $0x39,%r15d
je     155a <displayMainMenu+0x39a>
add    $0xffffffd0,%r15d
lea    0xf61(%rip),%rdi
call   1060 <puts@plt>
mov    %r15d,%r12d
jmp    1200 <displayMainMenu+0x40>
lea    0xe93(%rip),%rdi
call   1060 <puts@plt>
lea    0xea0(%rip),%rdi
call   1060 <puts@plt>
lea    0xeb0(%rip),%rdi
call   1060 <puts@plt>
lea    0xeb6(%rip),%rdi
call   1060 <puts@plt>
mov    0x2cd8(%rip),%rax
mov    (%rax),%edx
mov    %rbp,%rdi
mov    $0x2,%esi
call   1090 <fgets@plt>
movsbl 0x6(%rsp),%eax
lea    -0x30(%rax),%r12d
add    $0xffffffcf,%eax
cmp    $0x8,%eax
ja     14be <displayMainMenu+0x2fe>
lea    0xd1d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
lea    0xed6(%rip),%rdi
jmp    *%rax
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10b0 <getchar@plt>
cmp    $0xa,%al
jne    1350 <displayMainMenu+0x190>
jmp    13eb <displayMainMenu+0x22b>
lea    0xe0c(%rip),%rdi
call   1060 <puts@plt>
lea    0xe19(%rip),%rdi
call   1060 <puts@plt>
lea    0xdb9(%rip),%rdi
call   1060 <puts@plt>
lea    0xdc9(%rip),%rdi
call   1060 <puts@plt>
lea    0xe23(%rip),%rdi
call   1060 <puts@plt>
mov    0x2c45(%rip),%rax
mov    (%rax),%edx
mov    %rbp,%rdi
mov    $0x2,%esi
call   1090 <fgets@plt>
movsbl 0x6(%rsp),%eax
lea    -0x30(%rax),%r12d
add    $0xffffffcf,%eax
cmp    $0x8,%eax
ja     1549 <displayMainMenu+0x389>
lea    0xc66(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
lea    0xd8e(%rip),%rdi
jmp    *%rax
xchg   %ax,%ax
xor    %eax,%eax
call   10b0 <getchar@plt>
cmp    $0xa,%al
jne    13e0 <displayMainMenu+0x220>
lea    0xca8(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x21,%esi
call   1040 <initializeString@plt>
mov    0x2bd6(%rip),%rax
mov    (%rax),%edx
mov    %rbp,%rdi
mov    $0x21,%esi
call   1090 <fgets@plt>
mov    %rbp,%rdi
mov    $0x21,%esi
call   10c0 <sanitizeInput@plt>
mov    %rbp,%rdi
call   1080 <editPatient@plt>
lea    0x6(%rsp),%rbp
jmp    1200 <displayMainMenu+0x40>
lea    0xc90(%rip),%rdi
call   1060 <puts@plt>
lea    0xca1(%rip),%rdi
call   1060 <puts@plt>
lea    0xcb2(%rip),%rdi
call   1060 <puts@plt>
lea    0xd4f(%rip),%rdi
call   1060 <puts@plt>
mov    0x2b71(%rip),%rax
mov    (%rax),%edx
mov    %rbp,%rdi
mov    $0x2,%esi
call   1090 <fgets@plt>
movsbl 0x6(%rsp),%eax
lea    -0x30(%rax),%r12d
add    $0xffffffcf,%eax
cmp    $0x8,%eax
ja     1540 <displayMainMenu+0x380>
lea    0xb6e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
lea    0xd6f(%rip),%rdi
jmp    *%rax
xor    %eax,%eax
call   10d0 <createUser@plt>
jmp    11f2 <displayMainMenu+0x32>
lea    0xd68(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    1200 <displayMainMenu+0x40>
xor    %eax,%eax
call   10e0 <deleteUser@plt>
mov    $0x2,%r12d
jmp    1200 <displayMainMenu+0x40>
mov    %rbx,%r15
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   10b0 <getchar@plt>
cmp    $0xa,%al
jne    14f0 <displayMainMenu+0x330>
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x14,%esi
call   1040 <initializeString@plt>
mov    0x2ad4(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0x14,%esi
call   1090 <fgets@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   10c0 <sanitizeInput@plt>
mov    %rbx,%rdi
call   1050 <unlock@plt>
mov    %r15,%rbx
jmp    1200 <displayMainMenu+0x40>
lea    0xbe2(%rip),%rdi
jmp    1550 <displayMainMenu+0x390>
lea    0xcdd(%rip),%rdi
call   1060 <puts@plt>
jmp    1200 <displayMainMenu+0x40>
lea    0xcbe(%rip),%rdi
call   1060 <puts@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [48 x i8] c"WELCOME TO THE UWF SSD SECURE MEDICAL RECORDS \0A\00"
@.str.1 = [30 x i8] c"Your Permission Level is: %i\0A\00"
@.str.2 = [27 x i8] c"[1] View personal records\0A\00"
@.str.3 = [24 x i8] c"[2] Edit personal info\0A\00"
@.str.4 = [16 x i8] c"[9] Exit Menu \0A\00"
@.str.5 = [23 x i8] c"You have no reminders\0A\00"
@stdin = global i32 0
@.str.6 = [15 x i8] c"Exiting menu \0A\00"
@.str.7 = [15 x i8] c"Invalid input\0A\00"
@.str.8 = [26 x i8] c"[1] View Patient records\0A\00"
@.str.9 = [29 x i8] c"[2] Update Patient records \0A\00"
@.str.10 = [19 x i8] c"[3] Record vitals\0A\00"
@.str.11 = [16 x i8] c"[9] Exit menu \0A\00"
@.str.12 = [14 x i8] c"\0AENTER UUID: \00"
@.str.13 = [14 x i8] c"Invalid input\00"
@.str.14 = [29 x i8] c"[3] Medical Reconciliation \0A\00"
@.str.15 = [23 x i8] c"[4] Transfer of care \0A\00"
@.str.16 = [10 x i8] c"Exiting \0A\00"
@.str.17 = [30 x i8] c"[1] Set up new User account \0A\00"
@.str.18 = [30 x i8] c"[2] Deactivate User account \0A\00"
@.str.19 = [25 x i8] c"[3] Unlock User account\0A\00"
@.str.20 = [16 x i8] c"Invalid input \0A\00"
define void @displayMainMenu(i32 %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca [2 x i8]
%11 = alloca [20 x i8]
%12 = alloca [33 x i8]
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
store i32 0, i32* %6
store i32 0, i32* %9
br label %13
13: ; preds = %202, %4
br label %14
14: ; preds = %18, %13
%15 = call signext i8 (...) @getchar()
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 10
br i1 %17, label %18, label %19
18: ; preds = %14
br label %14
19: ; preds = %14
store i32 0, i32* %9
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%21 = load i32, i32* %5
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %21)
%23 = load i32, i32* %5
%24 = icmp eq i32 %23, 1
br i1 %24, label %25, label %57
25: ; preds = %19
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%29 = load i32, i32* %6
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %25
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
br label %34
33: ; preds = %25
br label %34
34: ; preds = %33, %31
%35 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%36 = load i32, i32* @stdin
%37 = call i32* @fgets(i8* %35, i32 2, i32 %36)
%38 = icmp eq i32* %37, null
br i1 %38, label %39, label %40
39: ; preds = %34
br label %40
40: ; preds = %39, %34
%41 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%42 = call i32 @sanitizeInt(i8* %41, i32 2)
%43 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = sub nsw i32 %45, 48
store i32 %46, i32* %9
%47 = load i32, i32* %9
switch i32 %47, label %54 [
i32 1, label %48
i32 2, label %51
i32 9, label %52
]
48: ; preds = %40
%49 = load i8*, i8** %8
%50 = call i32 @displayPatient(i8* %49)
br label %56
51: ; preds = %40
br label %56
52: ; preds = %40
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
br label %56
54: ; preds = %40
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
br label %56
56: ; preds = %54, %52, %51, %48
br label %201
57: ; preds = %19
%58 = load i32, i32* %5
%59 = icmp eq i32 %58, 2
br i1 %59, label %60, label %103
60: ; preds = %57
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0))
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0))
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
%65 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%66 = load i32, i32* @stdin
%67 = call i32* @fgets(i8* %65, i32 2, i32 %66)
%68 = icmp eq i32* %67, null
br i1 %68, label %69, label %70
69: ; preds = %60
br label %70
70: ; preds = %69, %60
%71 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = sub nsw i32 %73, 48
store i32 %74, i32* %9
%75 = load i32, i32* %9
switch i32 %75, label %100 [
i32 1, label %76
i32 2, label %77
i32 3, label %97
i32 9, label %98
]
76: ; preds = %70
br label %102
77: ; preds = %70
br label %78
78: ; preds = %82, %77
%79 = call signext i8 (...) @getchar()
%80 = sext i8 %79 to i32
%81 = icmp ne i32 %80, 10
br i1 %81, label %82, label %83
82: ; preds = %78
br label %78
83: ; preds = %78
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0))
%85 = getelementptr inbounds [33 x i8], [33 x i8]* %12, i64 0, i64 0
%86 = call i32 @initializeString(i8* %85, i32 33)
%87 = getelementptr inbounds [33 x i8], [33 x i8]* %12, i64 0, i64 0
%88 = load i32, i32* @stdin
%89 = call i32* @fgets(i8* %87, i32 33, i32 %88)
%90 = icmp ne i32* %89, null
br i1 %90, label %91, label %92
91: ; preds = %83
br label %92
92: ; preds = %91, %83
%93 = getelementptr inbounds [33 x i8], [33 x i8]* %12, i64 0, i64 0
%94 = call i32 @sanitizeInput(i8* %93, i32 33)
%95 = getelementptr inbounds [33 x i8], [33 x i8]* %12, i64 0, i64 0
%96 = call i32 @editPatient(i8* %95)
br label %102
97: ; preds = %70
br label %102
98: ; preds = %70
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
br label %102
100: ; preds = %70
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0))
br label %102
102: ; preds = %100, %98, %97, %92, %76
br label %200
103: ; preds = %57
%104 = load i32, i32* %5
%105 = icmp eq i32 %104, 3
br i1 %105, label %106, label %151
106: ; preds = %103
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0))
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0))
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i64 0, i64 0))
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0))
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
%112 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%113 = load i32, i32* @stdin
%114 = call i32* @fgets(i8* %112, i32 2, i32 %113)
%115 = icmp eq i32* %114, null
br i1 %115, label %116, label %117
116: ; preds = %106
br label %117
117: ; preds = %116, %106
%118 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%119 = load i8, i8* %118
%120 = sext i8 %119 to i32
%121 = sub nsw i32 %120, 48
store i32 %121, i32* %9
%122 = load i32, i32* %9
switch i32 %122, label %148 [
i32 1, label %123
i32 2, label %124
i32 3, label %144
i32 4, label %145
i32 9, label %146
]
123: ; preds = %117
br label %150
124: ; preds = %117
br label %125
125: ; preds = %129, %124
%126 = call signext i8 (...) @getchar()
%127 = sext i8 %126 to i32
%128 = icmp ne i32 %127, 10
br i1 %128, label %129, label %130
129: ; preds = %125
br label %125
130: ; preds = %125
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0))
%132 = getelementptr inbounds [33 x i8], [33 x i8]* %12, i64 0, i64 0
%133 = call i32 @initializeString(i8* %132, i32 33)
%134 = getelementptr inbounds [33 x i8], [33 x i8]* %12, i64 0, i64 0
%135 = load i32, i32* @stdin
%136 = call i32* @fgets(i8* %134, i32 33, i32 %135)
%137 = icmp ne i32* %136, null
br i1 %137, label %138, label %139
138: ; preds = %130
br label %139
139: ; preds = %138, %130
%140 = getelementptr inbounds [33 x i8], [33 x i8]* %12, i64 0, i64 0
%141 = call i32 @sanitizeInput(i8* %140, i32 33)
%142 = getelementptr inbounds [33 x i8], [33 x i8]* %12, i64 0, i64 0
%143 = call i32 @editPatient(i8* %142)
br label %150
144: ; preds = %117
br label %150
145: ; preds = %117
br label %150
146: ; preds = %117
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.16, i64 0, i64 0))
br label %150
148: ; preds = %117
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
br label %150
150: ; preds = %148, %146, %145, %144, %139, %123
br label %199
151: ; preds = %103
%152 = load i32, i32* %5
%153 = icmp eq i32 %152, 4
br i1 %153, label %154, label %198
154: ; preds = %151
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.17, i64 0, i64 0))
%156 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.18, i64 0, i64 0))
%157 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.19, i64 0, i64 0))
%158 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
%159 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%160 = load i32, i32* @stdin
%161 = call i32* @fgets(i8* %159, i32 2, i32 %160)
%162 = icmp eq i32* %161, null
br i1 %162, label %163, label %164
163: ; preds = %154
br label %164
164: ; preds = %163, %154
%165 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%166 = load i8, i8* %165
%167 = sext i8 %166 to i32
%168 = sub nsw i32 %167, 48
store i32 %168, i32* %9
%169 = load i32, i32* %9
switch i32 %169, label %195 [
i32 1, label %170
i32 2, label %172
i32 3, label %174
i32 9, label %193
]
170: ; preds = %164
%171 = call i32 (...) @createUser()
br label %197
172: ; preds = %164
%173 = call i32 (...) @deleteUser()
br label %197
174: ; preds = %164
br label %175
175: ; preds = %179, %174
%176 = call signext i8 (...) @getchar()
%177 = sext i8 %176 to i32
%178 = icmp ne i32 %177, 10
br i1 %178, label %179, label %180
179: ; preds = %175
br label %175
180: ; preds = %175
%181 = getelementptr inbounds [20 x i8], [20 x i8]* %11, i64 0, i64 0
%182 = call i32 @initializeString(i8* %181, i32 20)
%183 = getelementptr inbounds [20 x i8], [20 x i8]* %11, i64 0, i64 0
%184 = load i32, i32* @stdin
%185 = call i32* @fgets(i8* %183, i32 20, i32 %184)
%186 = icmp ne i32* %185, null
br i1 %186, label %187, label %188
187: ; preds = %180
br label %188
188: ; preds = %187, %180
%189 = getelementptr inbounds [20 x i8], [20 x i8]* %11, i64 0, i64 0
%190 = call i32 @sanitizeInput(i8* %189, i32 20)
%191 = getelementptr inbounds [20 x i8], [20 x i8]* %11, i64 0, i64 0
%192 = call i32 @unlock(i8* %191)
br label %197
193: ; preds = %164
%194 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
br label %197
195: ; preds = %164
%196 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.20, i64 0, i64 0))
br label %197
197: ; preds = %195, %193, %188, %172, %170
br label %198
198: ; preds = %197, %151
br label %199
199: ; preds = %198, %150
br label %200
200: ; preds = %199, %102
br label %201
201: ; preds = %200, %56
br label %202
202: ; preds = %201
%203 = load i32, i32* %9
%204 = icmp ne i32 %203, 9
br i1 %204, label %13, label %205
205: ; preds = %202
ret void
}

LLVM IR (-O2):
@.str.1 = [30 x i8] c"Your Permission Level is: %i\0A\00"
@stdin = global i32 0
@.str.12 = [14 x i8] c"\0AENTER UUID: \00"
@str = [47 x i8] c"WELCOME TO THE UWF SSD SECURE MEDICAL RECORDS \00"
@str.21 = [29 x i8] c"[1] Set up new User account \00"
@str.22 = [29 x i8] c"[2] Deactivate User account \00"
@str.23 = [24 x i8] c"[3] Unlock User account\00"
@str.26 = [15 x i8] c"Invalid input \00"
@str.29 = [28 x i8] c"[3] Medical Reconciliation \00"
@str.30 = [22 x i8] c"[4] Transfer of care \00"
@str.32 = [9 x i8] c"Exiting \00"
@str.34 = [25 x i8] c"[1] View Patient records\00"
@str.35 = [28 x i8] c"[2] Update Patient records \00"
@str.36 = [18 x i8] c"[3] Record vitals\00"
@str.37 = [15 x i8] c"[9] Exit menu \00"
@str.39 = [26 x i8] c"[1] View personal records\00"
@str.40 = [23 x i8] c"[2] Edit personal info\00"
@str.41 = [15 x i8] c"[9] Exit Menu \00"
@str.42 = [22 x i8] c"You have no reminders\00"
@str.43 = [14 x i8] c"Exiting menu \00"
@str.44 = [14 x i8] c"Invalid input\00"
define void @displayMainMenu(i32 %0, i32 %1, i8* nocapture readnone %2, i8* %3) {
%5 = alloca [2 x i8]
%6 = alloca [20 x i8]
%7 = alloca [33 x i8]
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%9 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%10 = getelementptr inbounds [33 x i8], [33 x i8]* %7, i64 0, i64 0
br label %11
11: ; preds = %14, %4
%12 = call signext i8 (...) @getchar()
%13 = icmp eq i8 %12, 10
br i1 %13, label %15, label %14
14: ; preds = %11, %103
br label %11
15: ; preds = %11
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %0)
switch i32 %0, label %103 [
i32 1, label %18
i32 2, label %33
i32 3, label %55
i32 4, label %78
]
18: ; preds = %15
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.39, i64 0, i64 0))
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.40, i64 0, i64 0))
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.41, i64 0, i64 0))
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.42, i64 0, i64 0))
%23 = load i32, i32* @stdin
%24 = call i32* @fgets(i8* %8, i32 2, i32 %23)
%25 = call i32 @sanitizeInt(i8* %8, i32 2)
%26 = load i8, i8* %8
%27 = sext i8 %26 to i32
switch i32 %27, label %30 [
i32 49, label %28
i32 50, label %103
i32 57, label %106
]
28: ; preds = %18
%29 = call i32 @displayPatient(i8* %3)
br label %103
30: ; preds = %18
%31 = add nsw i32 %27, -48
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.44, i64 0, i64 0))
br label %103
33: ; preds = %15
%34 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.34, i64 0, i64 0))
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.35, i64 0, i64 0))
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.36, i64 0, i64 0))
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.37, i64 0, i64 0))
%38 = load i32, i32* @stdin
%39 = call i32* @fgets(i8* %8, i32 2, i32 %38)
%40 = load i8, i8* %8
%41 = sext i8 %40 to i32
%42 = add nsw i32 %41, -48
switch i32 %41, label %53 [
i32 49, label %103
i32 50, label %43
i32 51, label %103
i32 57, label %106
]
43: ; preds = %33, %43
%44 = call signext i8 (...) @getchar()
%45 = icmp eq i8 %44, 10
br i1 %45, label %46, label %43
46: ; preds = %43
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0))
%48 = call i32 @initializeString(i8* %10, i32 33)
%49 = load i32, i32* @stdin
%50 = call i32* @fgets(i8* %10, i32 33, i32 %49)
%51 = call i32 @sanitizeInput(i8* %10, i32 33)
%52 = call i32 @editPatient(i8* %10)
br label %103
53: ; preds = %33
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.44, i64 0, i64 0))
br label %103
55: ; preds = %15
%56 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.34, i64 0, i64 0))
%57 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.35, i64 0, i64 0))
%58 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.29, i64 0, i64 0))
%59 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.30, i64 0, i64 0))
%60 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.37, i64 0, i64 0))
%61 = load i32, i32* @stdin
%62 = call i32* @fgets(i8* %8, i32 2, i32 %61)
%63 = load i8, i8* %8
%64 = sext i8 %63 to i32
%65 = add nsw i32 %64, -48
switch i32 %64, label %76 [
i32 49, label %103
i32 50, label %66
i32 51, label %103
i32 52, label %103
i32 57, label %106
]
66: ; preds = %55, %66
%67 = call signext i8 (...) @getchar()
%68 = icmp eq i8 %67, 10
br i1 %68, label %69, label %66
69: ; preds = %66
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0))
%71 = call i32 @initializeString(i8* %10, i32 33)
%72 = load i32, i32* @stdin
%73 = call i32* @fgets(i8* %10, i32 33, i32 %72)
%74 = call i32 @sanitizeInput(i8* %10, i32 33)
%75 = call i32 @editPatient(i8* %10)
br label %103
76: ; preds = %55
%77 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.44, i64 0, i64 0))
br label %103
78: ; preds = %15
%79 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.21, i64 0, i64 0))
%80 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.22, i64 0, i64 0))
%81 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.23, i64 0, i64 0))
%82 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.37, i64 0, i64 0))
%83 = load i32, i32* @stdin
%84 = call i32* @fgets(i8* %8, i32 2, i32 %83)
%85 = load i8, i8* %8
%86 = sext i8 %85 to i32
%87 = add nsw i32 %86, -48
switch i32 %86, label %101 [
i32 49, label %88
i32 50, label %90
i32 51, label %92
i32 57, label %106
]
88: ; preds = %78
%89 = call i32 (...) @createUser()
br label %103
90: ; preds = %78
%91 = call i32 (...) @deleteUser()
br label %103
92: ; preds = %78, %92
%93 = call signext i8 (...) @getchar()
%94 = icmp eq i8 %93, 10
br i1 %94, label %95, label %92
95: ; preds = %92
%96 = call i32 @initializeString(i8* %9, i32 20)
%97 = load i32, i32* @stdin
%98 = call i32* @fgets(i8* %9, i32 20, i32 %97)
%99 = call i32 @sanitizeInput(i8* %9, i32 20)
%100 = call i32 @unlock(i8* %9)
br label %103
101: ; preds = %78
%102 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.26, i64 0, i64 0))
br label %103
103: ; preds = %15, %30, %18, %28, %76, %55, %55, %69, %55, %88, %90, %95, %101, %33, %46, %33, %53
%104 = phi i32 [ %31, %30 ], [ 2, %18 ], [ 1, %28 ], [ %42, %53 ], [ %42, %46 ], [ %42, %33 ], [ %42, %33 ], [ %65, %76 ], [ %65, %69 ], [ %65, %55 ], [ %65, %55 ], [ %65, %55 ], [ %87, %101 ], [ %87, %95 ], [ 2, %90 ], [ 1, %88 ], [ 0, %15 ]
%105 = icmp eq i32 %104, 9
br i1 %105, label %109, label %14
106: ; preds = %78, %55, %33, %18
%107 = phi i8* [ getelementptr inbounds ([14 x i8], [14 x i8]* @str.43, i64 0, i64 0), %18 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @str.43, i64 0, i64 0), %33 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @str.32, i64 0, i64 0), %55 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @str.43, i64 0, i64 0), %78 ]
%108 = call i32 @puts(i8* dereferenceable(1) %107)
br label %109
109: ; preds = %103, %106
ret void
}