#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*/ changechoices();
int /*<<< orphan*/ deletechoices();
int deleteindex(int *, int, int);
int /*<<< orphan*/ mainchoices();
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ printfun(int *, int);
int /*<<< orphan*/ scanf(char *, int *, ...);
int search(int *, int, int);
int /*<<< orphan*/ updateByIndex(int *, int, int);
int main() {
  int n;
  printf("Enter the total no. of elements in the array.\n");
  scanf("%d", &n);
  int *a = (int *)malloc(sizeof(int) * n);
  printf("Enter the elements of the array.\n");
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  mainchoices();
  int ch;
  scanf("%d", &ch);
  while (ch != -1) {
    if (ch == 1) {
      changechoices();
      int chch;
      scanf("%d", &chch);
      if (chch == 1) {
        printf("\nEnter the index no. Remember that indexing starts from 0 in "
               "the array.\n\n");
        int ind, value;
        scanf("%d", &ind);
        if (ind < n && ind >= 0) {
          printf("\nEnter the new value.\n");
          scanf("%d", &value);
          updateByIndex(a, ind, value);
          printf("Updated the value of index no %d to %d\n", ind, value);
        } else {
          printf("This index does not exist. Please choose an index between 0 "
                 "to %d both inclusive.\n",
                 n - 1);
          mainchoices();
        }
      } else if (chch == 2) {
        printf("\nEnter the old value followed by the new value.\n\n");
        int oldv, newv;
        scanf("%d%d", &oldv, &newv);
        int in = search(a, oldv, n);
        if (in < n) {
          a[n] = newv;
          printf("Updated value at the ind no. %d to %d.\n", in, newv);
        } else {
          printf("This value is not present in the array.\n");
          mainchoices();
        }
      } else {
        printf("\nYour choice doesn't match any of the available options\n");
        mainchoices();
      }
    } else if (ch == 2) {
      deletechoices();
      int chdel;
      scanf("%d", &chdel);
      if (chdel == 1) {
        int ind;
        printf("\nEnter the index to be deleted.Remember that indexing starts "
               "from 0.\n");
        scanf("%d", &ind);
        if (ind < n) {
          n = deleteindex(a, ind, n);
          printf("\n\nDeleted index no %d. New size of the array is %d\n", ind,
                 n);
        } else {
          printf("\n%d index is out of the array size.\n", ind);
          mainchoices();
        }
      } else if (chdel == 2) {
        printf("Enter the element value to be deleted.\n");
        int del;
        scanf("%d", &del);
        int ind = search(a, del, n);
        if (ind < n) {
          n = deleteindex(a, ind, n);
          printf("\nDeleted element %d. New size of the array is %d\n", del, n);
        } else {
          printf("\n%d is not present in the array, hence can't be deleted.\n",
                 del);
        }
      }
    } else if (ch == 3) {
      printf("Enter the value of the elem] to be searched in the array.\n");
      int val;
      scanf("%d", &val);
      int fo = search(a, val, n);
      if (fo < n) {
        printf("%d is present at the index %d.\n", val, fo);
      } else {
        printf("%d is not present in the array\n", val);
      }
    } else if (ch == 4) {
      printfun(a, n);
    } else if (ch == 5) {
      printf("size of the array is %d\n", n);
    } else {
      printf("None of the choices you eneterd matches the given choices.\n");
      mainchoices();
    }
    mainchoices();
    scanf("%d", &ch);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf9d(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   10a0 <scanf@plt>
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x10(%rbp)
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    122e <main+0x8e>
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xf48(%rip),%rdi
mov    $0x0,%al
call   10a0 <scanf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11f7 <main+0x57>
mov    $0x0,%al
call   10c0 <mainchoices@plt>
lea    0xf25(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   10a0 <scanf@plt>
cmpl   $0xffffffff,-0x18(%rbp)
je     15f5 <main+0x455>
cmpl   $0x1,-0x18(%rbp)
jne    13c8 <main+0x228>
mov    $0x0,%al
call   1070 <changechoices@plt>
lea    0xef8(%rip),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x0,%al
call   10a0 <scanf@plt>
cmpl   $0x1,-0x1c(%rbp)
jne    131c <main+0x17c>
lea    0xdcc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xece(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   10a0 <scanf@plt>
mov    -0x20(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12fc <main+0x15c>
cmpl   $0x0,-0x20(%rbp)
jl     12fc <main+0x15c>
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe98(%rip),%rdi
lea    -0x24(%rbp),%rsi
mov    $0x0,%al
call   10a0 <scanf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
call   1040 <updateByIndex@plt>
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
lea    0xdc2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1317 <main+0x177>
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
lea    0xdd1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   10c0 <mainchoices@plt>
jmp    13c3 <main+0x223>
cmpl   $0x2,-0x1c(%rbp)
jne    13a9 <main+0x209>
lea    0xe00(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe24(%rip),%rdi
lea    -0x28(%rbp),%rsi
lea    -0x2c(%rbp),%rdx
mov    $0x0,%al
call   10a0 <scanf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1060 <search@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    138f <main+0x1ef>
mov    -0x2c(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x30(%rbp),%esi
mov    -0x2c(%rbp),%edx
lea    0xde1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13a4 <main+0x204>
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   10c0 <mainchoices@plt>
jmp    13be <main+0x21e>
lea    0xe05(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   10c0 <mainchoices@plt>
jmp    13c3 <main+0x223>
jmp    15d7 <main+0x437>
cmpl   $0x2,-0x18(%rbp)
jne    14fc <main+0x35c>
mov    $0x0,%al
call   1080 <deletechoices@plt>
lea    0xd81(%rip),%rdi
lea    -0x34(%rbp),%rsi
mov    $0x0,%al
call   10a0 <scanf@plt>
cmpl   $0x1,-0x34(%rbp)
jne    1469 <main+0x2c9>
lea    0xdf2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd57(%rip),%rdi
lea    -0x38(%rbp),%rsi
mov    $0x0,%al
call   10a0 <scanf@plt>
mov    -0x38(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    144c <main+0x2ac>
mov    -0x10(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <deleteindex@plt>
mov    %eax,-0x8(%rbp)
mov    -0x38(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xdf4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1464 <main+0x2c4>
mov    -0x38(%rbp),%esi
lea    0xe12(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   10c0 <mainchoices@plt>
jmp    14f7 <main+0x357>
cmpl   $0x2,-0x34(%rbp)
jne    14f2 <main+0x352>
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcd9(%rip),%rdi
lea    -0x3c(%rbp),%rsi
mov    $0x0,%al
call   10a0 <scanf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x3c(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1060 <search@plt>
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    14dc <main+0x33c>
mov    -0x10(%rbp),%rdi
mov    -0x40(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <deleteindex@plt>
mov    %eax,-0x8(%rbp)
mov    -0x3c(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xde5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14ed <main+0x34d>
mov    -0x3c(%rbp),%esi
lea    0xe01(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14f2 <main+0x352>
jmp    14f7 <main+0x357>
jmp    15d2 <main+0x432>
cmpl   $0x3,-0x18(%rbp)
jne    1573 <main+0x3d3>
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xc46(%rip),%rdi
lea    -0x44(%rbp),%rsi
mov    $0x0,%al
call   10a0 <scanf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1060 <search@plt>
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    155d <main+0x3bd>
mov    -0x44(%rbp),%esi
mov    -0x48(%rbp),%edx
lea    0xe0b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    156e <main+0x3ce>
mov    -0x44(%rbp),%esi
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    15cd <main+0x42d>
cmpl   $0x4,-0x18(%rbp)
jne    158e <main+0x3ee>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   10b0 <printfun@plt>
jmp    15c8 <main+0x428>
cmpl   $0x5,-0x18(%rbp)
jne    15ae <main+0x40e>
mov    -0x8(%rbp),%esi
lea    0xcad(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    15c3 <main+0x423>
lea    0xde7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   10c0 <mainchoices@plt>
jmp    15c8 <main+0x428>
jmp    15cd <main+0x42d>
jmp    15d2 <main+0x432>
jmp    15d7 <main+0x437>
mov    $0x0,%al
call   10c0 <mainchoices@plt>
lea    0xb7c(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   10a0 <scanf@plt>
jmp    1247 <main+0xa7>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0x1004(%rip),%rdi
call   1040 <puts@plt>
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   10b0 <scanf@plt>
mov    0x4(%rsp),%edi
shl    $0x2,%edi
call   10a0 <malloc@plt>
mov    %rax,%r14
lea    0x1004(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0x4(%rsp)
jle    122f <main+0x7f>
lea    0xe93(%rip),%r15
mov    %r14,%rbp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10b0 <scanf@plt>
add    $0x1,%rbx
movslq 0x4(%rsp),%rax
add    $0x4,%rbp
cmp    %rax,%rbx
jl     1210 <main+0x60>
xor    %eax,%eax
call   10d0 <mainchoices@plt>
lea    0xe5c(%rip),%rbx
lea    0x14(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   10b0 <scanf@plt>
lea    0xdaa(%rip),%r12
lea    0x10(%rsp),%r13
lea    0x8(%rsp),%rbp
jmp    1284 <main+0xd4>
mov    0x4(%rsp),%esi
mov    %r14,%rdi
call   10c0 <printfun@plt>
xchg   %ax,%ax
xor    %eax,%eax
call   10d0 <mainchoices@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   10b0 <scanf@plt>
mov    0x14(%rsp),%eax
add    $0x1,%eax
cmp    $0x6,%eax
ja     1337 <main+0x187>
movslq (%r12,%rax,4),%rax
add    %r12,%rax
jmp    *%rax
xor    %eax,%eax
call   1080 <changechoices@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   10b0 <scanf@plt>
mov    0x10(%rsp),%eax
cmp    $0x2,%eax
je     140d <main+0x25d>
cmp    $0x1,%eax
jne    1463 <main+0x2b3>
lea    0x10bc(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10b0 <scanf@plt>
mov    0x8(%rsp),%eax
mov    0x4(%rsp),%esi
test   %eax,%eax
js     14c7 <main+0x317>
cmp    %esi,%eax
jge    14c7 <main+0x317>
lea    0x10d4(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   10b0 <scanf@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
mov    %r14,%rdi
call   1050 <updateByIndex@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
lea    0xcea(%rip),%rdi
jmp    14bb <main+0x30b>
lea    0xeda(%rip),%rdi
jmp    14f0 <main+0x340>
xor    %eax,%eax
call   1090 <deletechoices@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   10b0 <scanf@plt>
mov    0x10(%rsp),%eax
cmp    $0x2,%eax
je     146f <main+0x2bf>
cmp    $0x1,%eax
jne    1270 <main+0xc0>
lea    0xf40(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10b0 <scanf@plt>
mov    0x8(%rsp),%esi
mov    0x4(%rsp),%edx
cmp    %edx,%esi
jge    14d3 <main+0x323>
mov    %r14,%rdi
call   1030 <deleteindex@plt>
mov    %eax,0x4(%rsp)
mov    0x8(%rsp),%esi
lea    0xd17(%rip),%rdi
jmp    14b9 <main+0x309>
lea    0xe9a(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   10b0 <scanf@plt>
mov    0x10(%rsp),%esi
mov    0x4(%rsp),%edx
mov    %r14,%rdi
call   1070 <search@plt>
mov    0x10(%rsp),%esi
cmp    0x4(%rsp),%eax
jge    1401 <main+0x251>
lea    0xd9d(%rip),%rdi
jmp    14b9 <main+0x309>
mov    0x4(%rsp),%esi
lea    0xce3(%rip),%rdi
jmp    1510 <main+0x360>
lea    0xda1(%rip),%rdi
jmp    1510 <main+0x360>
lea    0xf1d(%rip),%rdi
call   1040 <puts@plt>
lea    0xc77(%rip),%rdi
mov    %rbp,%rsi
lea    0xc(%rsp),%rdx
xor    %eax,%eax
call   10b0 <scanf@plt>
mov    0x8(%rsp),%esi
mov    0x4(%rsp),%edx
mov    %r14,%rdi
call   1070 <search@plt>
movslq 0x4(%rsp),%rcx
cmp    %ecx,%eax
jge    14e3 <main+0x333>
mov    0xc(%rsp),%edx
mov    %edx,(%r14,%rcx,4)
mov    0xc(%rsp),%edx
lea    0xc3d(%rip),%rdi
mov    %eax,%esi
jmp    14bb <main+0x30b>
lea    0xe8f(%rip),%rdi
jmp    14f0 <main+0x340>
lea    0xe17(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10b0 <scanf@plt>
mov    0x8(%rsp),%esi
mov    0x4(%rsp),%edx
mov    %r14,%rdi
call   1070 <search@plt>
mov    0x4(%rsp),%edx
cmp    %edx,%eax
jge    1501 <main+0x351>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <deleteindex@plt>
mov    %eax,0x4(%rsp)
mov    0x8(%rsp),%esi
lea    0xc64(%rip),%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1270 <main+0xc0>
add    $0xffffffff,%esi
lea    0xb73(%rip),%rdi
jmp    14da <main+0x32a>
lea    0xc1e(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    14f5 <main+0x345>
lea    0xe78(%rip),%rdi
nopw   0x0(%rax,%rax,1)
call   1040 <puts@plt>
xor    %eax,%eax
call   10d0 <mainchoices@plt>
jmp    1270 <main+0xc0>
mov    0x8(%rsp),%esi
lea    0xc43(%rip),%rdi
nopl   0x0(%rax)
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1270 <main+0xc0>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [47 x i8] c"Enter the total no. of elements in the array.\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [34 x i8] c"Enter the elements of the array.\0A\00"
@.str.3 = [74 x i8] c"\0AEnter the index no. Remember that indexing starts from 0 in the array.\0A\0A\00"
@.str.4 = [23 x i8] c"\0AEnter the new value.\0A\00"
@.str.5 = [40 x i8] c"Updated the value of index no %d to %d\0A\00"
@.str.6 = [83 x i8] c"This index does not exist. Please choose an index between 0 to %d both inclusive.\0A\00"
@.str.7 = [50 x i8] c"\0AEnter the old value followed by the new value.\0A\0A\00"
@.str.8 = [5 x i8] c"%d%d\00"
@.str.9 = [40 x i8] c"Updated value at the ind no. %d to %d.\0A\00"
@.str.10 = [41 x i8] c"This value is not present in the array.\0A\00"
@.str.11 = [57 x i8] c"\0AYour choice doesn't match any of the available options\0A\00"
@.str.12 = [70 x i8] c"\0AEnter the index to be deleted.Remember that indexing starts from 0.\0A\00"
@.str.13 = [52 x i8] c"\0A\0ADeleted index no %d. New size of the array is %d\0A\00"
@.str.14 = [37 x i8] c"\0A%d index is out of the array size.\0A\00"
@.str.15 = [40 x i8] c"Enter the element value to be deleted.\0A\00"
@.str.16 = [50 x i8] c"\0ADeleted element %d. New size of the array is %d\0A\00"
@.str.17 = [58 x i8] c"\0A%d is not present in the array, hence can't be deleted.\0A\00"
@.str.18 = [59 x i8] c"Enter the value of the elem] to be searched in the array.\0A\00"
@.str.19 = [32 x i8] c"%d is present at the index %d.\0A\00"
@.str.20 = [32 x i8] c"%d is not present in the array\0A\00"
@.str.21 = [25 x i8] c"size of the array is %d\0A\00"
@.str.22 = [60 x i8] c"None of the choices you eneterd matches the given choices.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store i32 0, i32* %1
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%19 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%20 = load i32, i32* %2
%21 = sext i32 %20 to i64
%22 = mul i64 4, %21
%23 = trunc i64 %22 to i32
%24 = call i64 @malloc(i32 %23)
%25 = inttoptr i64 %24 to i32*
store i32* %25, i32** %3
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %4
br label %27
27: ; preds = %37, %0
%28 = load i32, i32* %4
%29 = load i32, i32* %2
%30 = icmp slt i32 %28, %29
br i1 %30, label %31, label %40
31: ; preds = %27
%32 = load i32*, i32** %3
%33 = load i32, i32* %4
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i32, i32* %32, i64 %34
%36 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %35)
br label %37
37: ; preds = %31
%38 = load i32, i32* %4
%39 = add nsw i32 %38, 1
store i32 %39, i32* %4
br label %27
40: ; preds = %27
%41 = call i32 (...) @mainchoices()
%42 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
br label %43
43: ; preds = %205, %40
%44 = load i32, i32* %5
%45 = icmp ne i32 %44, -1
br i1 %45, label %46, label %208
46: ; preds = %43
%47 = load i32, i32* %5
%48 = icmp eq i32 %47, 1
br i1 %48, label %49, label %110
49: ; preds = %46
%50 = call i32 (...) @changechoices()
%51 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%52 = load i32, i32* %6
%53 = icmp eq i32 %52, 1
br i1 %53, label %54, label %79
54: ; preds = %49
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.3, i64 0, i64 0))
%56 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%57 = load i32, i32* %7
%58 = load i32, i32* %2
%59 = icmp slt i32 %57, %58
br i1 %59, label %60, label %73
60: ; preds = %54
%61 = load i32, i32* %7
%62 = icmp sge i32 %61, 0
br i1 %62, label %63, label %73
63: ; preds = %60
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
%65 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%66 = load i32*, i32** %3
%67 = load i32, i32* %7
%68 = load i32, i32* %8
%69 = call i32 @updateByIndex(i32* %66, i32 %67, i32 %68)
%70 = load i32, i32* %7
%71 = load i32, i32* %8
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0), i32 %70, i32 %71)
br label %78
73: ; preds = %60, %54
%74 = load i32, i32* %2
%75 = sub nsw i32 %74, 1
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.6, i64 0, i64 0), i32 %75)
%77 = call i32 (...) @mainchoices()
br label %78
78: ; preds = %73, %63
br label %109
79: ; preds = %49
%80 = load i32, i32* %6
%81 = icmp eq i32 %80, 2
br i1 %81, label %82, label %105
82: ; preds = %79
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.7, i64 0, i64 0))
%84 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32* %9, i32* %10)
%85 = load i32*, i32** %3
%86 = load i32, i32* %9
%87 = load i32, i32* %2
%88 = call i32 @search(i32* %85, i32 %86, i32 %87)
store i32 %88, i32* %11
%89 = load i32, i32* %11
%90 = load i32, i32* %2
%91 = icmp slt i32 %89, %90
br i1 %91, label %92, label %101
92: ; preds = %82
%93 = load i32, i32* %10
%94 = load i32*, i32** %3
%95 = load i32, i32* %2
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds i32, i32* %94, i64 %96
store i32 %93, i32* %97
%98 = load i32, i32* %11
%99 = load i32, i32* %10
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0), i32 %98, i32 %99)
br label %104
101: ; preds = %82
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.10, i64 0, i64 0))
%103 = call i32 (...) @mainchoices()
br label %104
104: ; preds = %101, %92
br label %108
105: ; preds = %79
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.11, i64 0, i64 0))
%107 = call i32 (...) @mainchoices()
br label %108
108: ; preds = %105, %104
br label %109
109: ; preds = %108, %78
br label %205
110: ; preds = %46
%111 = load i32, i32* %5
%112 = icmp eq i32 %111, 2
br i1 %112, label %113, label %164
113: ; preds = %110
%114 = call i32 (...) @deletechoices()
%115 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %12)
%116 = load i32, i32* %12
%117 = icmp eq i32 %116, 1
br i1 %117, label %118, label %137
118: ; preds = %113
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i64 0, i64 0))
%120 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %13)
%121 = load i32, i32* %13
%122 = load i32, i32* %2
%123 = icmp slt i32 %121, %122
br i1 %123, label %124, label %132
124: ; preds = %118
%125 = load i32*, i32** %3
%126 = load i32, i32* %13
%127 = load i32, i32* %2
%128 = call i32 @deleteindex(i32* %125, i32 %126, i32 %127)
store i32 %128, i32* %2
%129 = load i32, i32* %13
%130 = load i32, i32* %2
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.13, i64 0, i64 0), i32 %129, i32 %130)
br label %136
132: ; preds = %118
%133 = load i32, i32* %13
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.14, i64 0, i64 0), i32 %133)
%135 = call i32 (...) @mainchoices()
br label %136
136: ; preds = %132, %124
br label %163
137: ; preds = %113
%138 = load i32, i32* %12
%139 = icmp eq i32 %138, 2
br i1 %139, label %140, label %162
140: ; preds = %137
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0))
%142 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %14)
%143 = load i32*, i32** %3
%144 = load i32, i32* %14
%145 = load i32, i32* %2
%146 = call i32 @search(i32* %143, i32 %144, i32 %145)
store i32 %146, i32* %15
%147 = load i32, i32* %15
%148 = load i32, i32* %2
%149 = icmp slt i32 %147, %148
br i1 %149, label %150, label %158
150: ; preds = %140
%151 = load i32*, i32** %3
%152 = load i32, i32* %15
%153 = load i32, i32* %2
%154 = call i32 @deleteindex(i32* %151, i32 %152, i32 %153)
store i32 %154, i32* %2
%155 = load i32, i32* %14
%156 = load i32, i32* %2
%157 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.16, i64 0, i64 0), i32 %155, i32 %156)
br label %161
158: ; preds = %140
%159 = load i32, i32* %14
%160 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.17, i64 0, i64 0), i32 %159)
br label %161
161: ; preds = %158, %150
br label %162
162: ; preds = %161, %137
br label %163
163: ; preds = %162, %136
br label %204
164: ; preds = %110
%165 = load i32, i32* %5
%166 = icmp eq i32 %165, 3
br i1 %166, label %167, label %185
167: ; preds = %164
%168 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.18, i64 0, i64 0))
%169 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %16)
%170 = load i32*, i32** %3
%171 = load i32, i32* %16
%172 = load i32, i32* %2
%173 = call i32 @search(i32* %170, i32 %171, i32 %172)
store i32 %173, i32* %17
%174 = load i32, i32* %17
%175 = load i32, i32* %2
%176 = icmp slt i32 %174, %175
br i1 %176, label %177, label %181
177: ; preds = %167
%178 = load i32, i32* %16
%179 = load i32, i32* %17
%180 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.19, i64 0, i64 0), i32 %178, i32 %179)
br label %184
181: ; preds = %167
%182 = load i32, i32* %16
%183 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.20, i64 0, i64 0), i32 %182)
br label %184
184: ; preds = %181, %177
br label %203
185: ; preds = %164
%186 = load i32, i32* %5
%187 = icmp eq i32 %186, 4
br i1 %187, label %188, label %192
188: ; preds = %185
%189 = load i32*, i32** %3
%190 = load i32, i32* %2
%191 = call i32 @printfun(i32* %189, i32 %190)
br label %202
192: ; preds = %185
%193 = load i32, i32* %5
%194 = icmp eq i32 %193, 5
br i1 %194, label %195, label %198
195: ; preds = %192
%196 = load i32, i32* %2
%197 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.21, i64 0, i64 0), i32 %196)
br label %201
198: ; preds = %192
%199 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.22, i64 0, i64 0))
%200 = call i32 (...) @mainchoices()
br label %201
201: ; preds = %198, %195
br label %202
202: ; preds = %201, %188
br label %203
203: ; preds = %202, %184
br label %204
204: ; preds = %203, %163
br label %205
205: ; preds = %204, %109
%206 = call i32 (...) @mainchoices()
%207 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
br label %43
208: ; preds = %43
%209 = load i32, i32* %1
ret i32 %209
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.5 = [40 x i8] c"Updated the value of index no %d to %d\0A\00"
@.str.6 = [83 x i8] c"This index does not exist. Please choose an index between 0 to %d both inclusive.\0A\00"
@.str.8 = [5 x i8] c"%d%d\00"
@.str.9 = [40 x i8] c"Updated value at the ind no. %d to %d.\0A\00"
@.str.13 = [52 x i8] c"\0A\0ADeleted index no %d. New size of the array is %d\0A\00"
@.str.14 = [37 x i8] c"\0A%d index is out of the array size.\0A\00"
@.str.16 = [50 x i8] c"\0ADeleted element %d. New size of the array is %d\0A\00"
@.str.17 = [58 x i8] c"\0A%d is not present in the array, hence can't be deleted.\0A\00"
@.str.19 = [32 x i8] c"%d is present at the index %d.\0A\00"
@.str.20 = [32 x i8] c"%d is not present in the array\0A\00"
@.str.21 = [25 x i8] c"size of the array is %d\0A\00"
@str = [46 x i8] c"Enter the total no. of elements in the array.\00"
@str.23 = [33 x i8] c"Enter the elements of the array.\00"
@str.24 = [59 x i8] c"None of the choices you eneterd matches the given choices.\00"
@str.25 = [58 x i8] c"Enter the value of the elem] to be searched in the array.\00"
@str.26 = [39 x i8] c"Enter the element value to be deleted.\00"
@str.27 = [69 x i8] c"\0AEnter the index to be deleted.Remember that indexing starts from 0.\00"
@str.28 = [56 x i8] c"\0AYour choice doesn't match any of the available options\00"
@str.29 = [49 x i8] c"\0AEnter the old value followed by the new value.\0A\00"
@str.30 = [40 x i8] c"This value is not present in the array.\00"
@str.31 = [73 x i8] c"\0AEnter the index no. Remember that indexing starts from 0 in the array.\0A\00"
@str.32 = [22 x i8] c"\0AEnter the new value.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = bitcast i32* %1 to i8*
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%14 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%15 = load i32, i32* %1
%16 = shl i32 %15, 2
%17 = call i64 @malloc(i32 %16)
%18 = inttoptr i64 %17 to i32*
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.23, i64 0, i64 0))
%20 = load i32, i32* %1
%21 = icmp sgt i32 %20, 0
br i1 %21, label %35, label %22
22: ; preds = %35, %0
%23 = call i32 (...) @mainchoices()
%24 = bitcast i32* %2 to i8*
%25 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%26 = bitcast i32* %11 to i8*
%27 = bitcast i32* %8 to i8*
%28 = bitcast i32* %10 to i8*
%29 = bitcast i32* %9 to i8*
%30 = bitcast i32* %3 to i8*
%31 = bitcast i32* %6 to i8*
%32 = bitcast i32* %7 to i8*
%33 = bitcast i32* %4 to i8*
%34 = bitcast i32* %5 to i8*
br label %43
35: ; preds = %0, %35
%36 = phi i64 [ %39, %35 ], [ 0, %0 ]
%37 = getelementptr inbounds i32, i32* %18, i64 %36
%38 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %37)
%39 = add nuw nsw i64 %36, 1
%40 = load i32, i32* %1
%41 = sext i32 %40 to i64
%42 = icmp slt i64 %39, %41
br i1 %42, label %35, label %22
43: ; preds = %151, %22
%44 = load i32, i32* %2
switch i32 %44, label %148 [
i32 -1, label %154
i32 1, label %45
i32 2, label %93
i32 3, label %128
i32 4, label %142
i32 5, label %145
]
45: ; preds = %43
%46 = call i32 (...) @changechoices()
%47 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%48 = load i32, i32* %3
switch i32 %48, label %89 [
i32 1, label %49
i32 2, label %71
]
49: ; preds = %45
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.31, i64 0, i64 0))
%51 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%52 = load i32, i32* %4
%53 = load i32, i32* %1
%54 = icmp slt i32 %52, %53
%55 = icmp sgt i32 %52, -1
%56 = and i1 %55, %54
br i1 %56, label %57, label %66
57: ; preds = %49
%58 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.32, i64 0, i64 0))
%59 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%60 = load i32, i32* %4
%61 = load i32, i32* %5
%62 = call i32 @updateByIndex(i32* %18, i32 %60, i32 %61)
%63 = load i32, i32* %4
%64 = load i32, i32* %5
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0), i32 %63, i32 %64)
br label %70
66: ; preds = %49
%67 = add nsw i32 %53, -1
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @.str.6, i64 0, i64 0), i32 %67)
%69 = call i32 (...) @mainchoices()
br label %70
70: ; preds = %66, %57
br label %92
71: ; preds = %45
%72 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.29, i64 0, i64 0))
%73 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32* %6, i32* %7)
%74 = load i32, i32* %6
%75 = load i32, i32* %1
%76 = call i32 @search(i32* %18, i32 %74, i32 %75)
%77 = load i32, i32* %1
%78 = icmp slt i32 %76, %77
br i1 %78, label %79, label %85
79: ; preds = %71
%80 = load i32, i32* %7
%81 = sext i32 %77 to i64
%82 = getelementptr inbounds i32, i32* %18, i64 %81
store i32 %80, i32* %82
%83 = load i32, i32* %7
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0), i32 %76, i32 %83)
br label %88
85: ; preds = %71
%86 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.30, i64 0, i64 0))
%87 = call i32 (...) @mainchoices()
br label %88
88: ; preds = %85, %79
br label %92
89: ; preds = %45
%90 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.28, i64 0, i64 0))
%91 = call i32 (...) @mainchoices()
br label %92
92: ; preds = %88, %89, %70
br label %151
93: ; preds = %43
%94 = call i32 (...) @deletechoices()
%95 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%96 = load i32, i32* %8
switch i32 %96, label %127 [
i32 1, label %97
i32 2, label %111
]
97: ; preds = %93
%98 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str.27, i64 0, i64 0))
%99 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %9)
%100 = load i32, i32* %9
%101 = load i32, i32* %1
%102 = icmp slt i32 %100, %101
br i1 %102, label %103, label %107
103: ; preds = %97
%104 = call i32 @deleteindex(i32* %18, i32 %100, i32 %101)
store i32 %104, i32* %1
%105 = load i32, i32* %9
%106 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.13, i64 0, i64 0), i32 %105, i32 %104)
br label %110
107: ; preds = %97
%108 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.14, i64 0, i64 0), i32 %100)
%109 = call i32 (...) @mainchoices()
br label %110
110: ; preds = %107, %103
br label %127
111: ; preds = %93
%112 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.26, i64 0, i64 0))
%113 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %10)
%114 = load i32, i32* %10
%115 = load i32, i32* %1
%116 = call i32 @search(i32* %18, i32 %114, i32 %115)
%117 = load i32, i32* %1
%118 = icmp slt i32 %116, %117
br i1 %118, label %119, label %123
119: ; preds = %111
%120 = call i32 @deleteindex(i32* %18, i32 %116, i32 %117)
store i32 %120, i32* %1
%121 = load i32, i32* %10
%122 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.16, i64 0, i64 0), i32 %121, i32 %120)
br label %126
123: ; preds = %111
%124 = load i32, i32* %10
%125 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.17, i64 0, i64 0), i32 %124)
br label %126
126: ; preds = %123, %119
br label %127
127: ; preds = %93, %126, %110
br label %151
128: ; preds = %43
%129 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.25, i64 0, i64 0))
%130 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %11)
%131 = load i32, i32* %11
%132 = load i32, i32* %1
%133 = call i32 @search(i32* %18, i32 %131, i32 %132)
%134 = load i32, i32* %1
%135 = icmp slt i32 %133, %134
%136 = load i32, i32* %11
br i1 %135, label %137, label %139
137: ; preds = %128
%138 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.19, i64 0, i64 0), i32 %136, i32 %133)
br label %141
139: ; preds = %128
%140 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.20, i64 0, i64 0), i32 %136)
br label %141
141: ; preds = %139, %137
br label %151
142: ; preds = %43
%143 = load i32, i32* %1
%144 = call i32 @printfun(i32* %18, i32 %143)
br label %151
145: ; preds = %43
%146 = load i32, i32* %1
%147 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.21, i64 0, i64 0), i32 %146)
br label %151
148: ; preds = %43
%149 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.24, i64 0, i64 0))
%150 = call i32 (...) @mainchoices()
br label %151
151: ; preds = %127, %142, %148, %145, %141, %92
%152 = call i32 (...) @mainchoices()
%153 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
br label %43
154: ; preds = %43
ret i32 0
}