#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*/ delet(int *, unsigned int *, unsigned int);
int /*<<< orphan*/ insert(int *, unsigned int *, unsigned int, unsigned int);
int /*<<< orphan*/ isort(int *, unsigned int);
int /*<<< orphan*/ msort(int *, int *, unsigned int, int *, unsigned int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  unsigned i, j, n, m, ch;
  int a[50], b[50], s[50];
  puts("Enter number of elements in array 1:");
  scanf(" %u%*c", &n);
  puts("Enter contents of array 1:");
  for (i = 0; i < n; ++i)
    scanf(" %u%*c", a + i);
  putchar('\n');
  puts("Enter number of elements in array 2:");
  scanf(" %u%*c", &m);
  puts("Enter contents of array 2:");
  for (i = 0; i < m; ++i)
    scanf(" %u%*c", b + i);
  putchar('\n');
  do {
    puts("What would you like to do?");
    puts(" ( 0) Exit");
    puts(" ( 1) Display");
    puts(" ( 2) Insert an element");
    puts(" ( 3) Delete an element");
    puts(" ( 4) Sort");
    puts(" ( 5) Merge sort");
    scanf(" %u%*c", &ch);
    switch (ch) {
    case 0:
      puts("Bye!");
      break;
    case 1:
      printf("Array 1:");
      for (i = 0; i < n; ++i)
        printf(" %d", a[i]);
      putchar('\n');
      printf("Array 2:");
      for (i = 0; i < m; ++i)
        printf(" %d", b[i]);
      break;
    case 2:
      puts("Enter a position and key to insert:");
      scanf(" %u %u%*c", &i, &j);
      insert(a, &n, i, j);
      printf("Inserted:");
      for (i = 0; i < n; ++i)
        printf(" %d", a[i]);
      break;
    case 3:
      puts("Enter a position to delete:");
      scanf(" %u%*c", &i);
      delet(a, &n, i);
      printf("Deleted:");
      for (i = 0; i < n; ++i)
        printf(" %d", a[i]);
      break;
    case 4:
      isort(a, n);
      printf("Sorted Array 1:");
      for (i = 0; i < 5; ++i)
        printf(" %d", a[i]);
      putchar('\n');
      isort(b, m);
      printf("Sorted Array 2:");
      for (i = 0; i < m; ++i)
        printf(" %d", b[i]);
      break;
    case 5:
      msort(s, a, n, b, m);
      printf("Merged Array:");
      for (i = 0; i < m + n; ++i)
        printf(" %d", s[i]);
      break;
    default:
      puts("Incorrect Choice!");
      break;
    }
    putchar('\n');
    putchar('\n');
  } while (ch);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x290,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe7f(%rip),%rdi
call   1040 <puts@plt>
lea    0xfa3(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
lea    0xe86(%rip),%rdi
call   1040 <puts@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jae    11fc <main+0x7c>
lea    -0xe0(%rbp),%rsi
mov    -0x8(%rbp),%eax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xf61(%rip),%rdi
mov    $0x0,%al
call   1090 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11c3 <main+0x43>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe4b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf2f(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
lea    0xe52(%rip),%rdi
call   1040 <puts@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    1270 <main+0xf0>
lea    -0x1b0(%rbp),%rsi
mov    -0x8(%rbp),%eax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeed(%rip),%rdi
mov    $0x0,%al
call   1090 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1237 <main+0xb7>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe17(%rip),%rdi
call   1040 <puts@plt>
lea    0xe26(%rip),%rdi
call   1040 <puts@plt>
lea    0xe25(%rip),%rdi
call   1040 <puts@plt>
lea    0xe27(%rip),%rdi
call   1040 <puts@plt>
lea    0xe33(%rip),%rdi
call   1040 <puts@plt>
lea    0xe3f(%rip),%rdi
call   1040 <puts@plt>
lea    0xe3e(%rip),%rdi
call   1040 <puts@plt>
lea    0xe73(%rip),%rdi
xor    %eax,%eax
lea    -0x18(%rbp),%rsi
call   1090 <scanf@plt>
mov    -0x18(%rbp),%eax
mov    %rax,-0x288(%rbp)
sub    $0x5,%rax
ja     15e5 <main+0x465>
mov    -0x288(%rbp),%rax
lea    0xcfe(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe06(%rip),%rdi
call   1040 <puts@plt>
jmp    15f1 <main+0x471>
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jae    1363 <main+0x1e3>
mov    -0x8(%rbp),%eax
mov    -0xe0(%rbp,%rax,4),%esi
lea    0xdcf(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1331 <main+0x1b1>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    13b4 <main+0x234>
mov    -0x8(%rbp),%eax
mov    -0x1b0(%rbp,%rax,4),%esi
lea    0xd7e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1382 <main+0x202>
jmp    15f1 <main+0x471>
lea    0xd61(%rip),%rdi
call   1040 <puts@plt>
lea    0xd79(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1090 <scanf@plt>
lea    -0xe0(%rbp),%rdi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    -0x10(%rbp),%rsi
call   10a0 <insert@plt>
lea    0xd57(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jae    1438 <main+0x2b8>
mov    -0x8(%rbp),%eax
mov    -0xe0(%rbp,%rax,4),%esi
lea    0xcfa(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1406 <main+0x286>
jmp    15f1 <main+0x471>
lea    0xd15(%rip),%rdi
call   1040 <puts@plt>
lea    0xcf8(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
lea    -0xe0(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    -0x10(%rbp),%rsi
call   1070 <delet@plt>
lea    0xd00(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jae    14b5 <main+0x335>
mov    -0x8(%rbp),%eax
mov    -0xe0(%rbp,%rax,4),%esi
lea    0xc7d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1483 <main+0x303>
jmp    15f1 <main+0x471>
lea    -0xe0(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1080 <isort@plt>
lea    0xcae(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jae    150e <main+0x38e>
mov    -0x8(%rbp),%eax
mov    -0xe0(%rbp,%rax,4),%esi
lea    0xc24(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    14de <main+0x35e>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    -0x1b0(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1080 <isort@plt>
lea    0xc60(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    156e <main+0x3ee>
mov    -0x8(%rbp),%eax
mov    -0x1b0(%rbp,%rax,4),%esi
lea    0xbc4(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    153c <main+0x3bc>
jmp    15f1 <main+0x471>
lea    -0x280(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
mov    -0x10(%rbp),%edx
lea    -0x1b0(%rbp),%rcx
mov    -0x14(%rbp),%r8d
call   1050 <msort@plt>
lea    0xc03(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jae    15e0 <main+0x460>
mov    -0x8(%rbp),%eax
mov    -0x280(%rbp,%rax,4),%esi
lea    0xb52(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    15a9 <main+0x429>
jmp    15f1 <main+0x471>
lea    0xbc0(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmpl   $0x0,-0x18(%rbp)
jne    127a <main+0xfa>
xor    %eax,%eax
add    $0x290,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x288,%rsp
lea    0xe80(%rip),%rdi
call   1040 <puts@plt>
lea    0xfa4(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
lea    0xe86(%rip),%rdi
call   1040 <puts@plt>
movl   $0x0,0xc(%rsp)
cmpl   $0x0,0x10(%rsp)
je     1205 <main+0x85>
lea    0xf76(%rip),%rbx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %eax,%eax
lea    (%rsp,%rax,4),%rsi
add    $0x20,%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    0xc(%rsp),%eax
add    $0x1,%eax
mov    %eax,0xc(%rsp)
cmp    0x10(%rsp),%eax
jb     11e0 <main+0x60>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe42(%rip),%rdi
call   1040 <puts@plt>
lea    0xf26(%rip),%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
lea    0xe48(%rip),%rdi
call   1040 <puts@plt>
movl   $0x0,0xc(%rsp)
cmpl   $0x0,0x14(%rsp)
je     1288 <main+0x108>
lea    0xef8(%rip),%rbx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%eax
lea    (%rsp,%rax,4),%rsi
add    $0xf0,%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    0xc(%rsp),%eax
add    $0x1,%eax
mov    %eax,0xc(%rsp)
cmp    0x14(%rsp),%eax
jb     1260 <main+0xe0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xdff(%rip),%r14
lea    0xe13(%rip),%r12
lea    0xe17(%rip),%r15
lea    0xe1e(%rip),%rbx
lea    0xe2f(%rip),%rbp
lea    0xe61(%rip),%r13
jmp    12e9 <main+0x169>
lea    0xee7(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmpl   $0x0,0x18(%rsp)
je     164f <main+0x4cf>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbp,%rdi
call   1040 <puts@plt>
lea    0xde4(%rip),%rdi
call   1040 <puts@plt>
lea    0xde3(%rip),%rdi
call   1040 <puts@plt>
lea    0xe18(%rip),%rdi
lea    0x18(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    0x18(%rsp),%eax
cmp    $0x5,%rax
ja     12be <main+0x13e>
lea    0xcaf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
lea    0xdb9(%rip),%rdi
jmp    *%rax
lea    0xe1d(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0x0,0xc(%rsp)
cmpl   $0x0,0x10(%rsp)
je     13a1 <main+0x221>
xor    %eax,%eax
mov    %eax,%eax
mov    0x20(%rsp,%rax,4),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%eax
add    $0x1,%eax
mov    %eax,0xc(%rsp)
cmp    0x10(%rsp),%eax
jb     1380 <main+0x200>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xde3(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0x0,0xc(%rsp)
cmpl   $0x0,0x14(%rsp)
je     12ca <main+0x14a>
xor    %eax,%eax
xchg   %ax,%ax
mov    %eax,%eax
mov    0xf0(%rsp,%rax,4),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%eax
add    $0x1,%eax
mov    %eax,0xc(%rsp)
cmp    0x14(%rsp),%eax
jb     13d0 <main+0x250>
jmp    12ca <main+0x14a>
lea    0xd21(%rip),%rdi
call   1040 <puts@plt>
lea    0xd39(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x1c(%rsp),%rdx
xor    %eax,%eax
call   1090 <scanf@plt>
mov    0xc(%rsp),%edx
mov    0x1c(%rsp),%ecx
lea    0x20(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   10a0 <insert@plt>
lea    0xd14(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0x0,0xc(%rsp)
cmpl   $0x0,0x10(%rsp)
je     12ca <main+0x14a>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
mov    %eax,%eax
mov    0x20(%rsp,%rax,4),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%eax
add    $0x1,%eax
mov    %eax,0xc(%rsp)
cmp    0x10(%rsp),%eax
jb     1460 <main+0x2e0>
jmp    12ca <main+0x14a>
lea    0xccc(%rip),%rdi
call   1040 <puts@plt>
lea    0xcaf(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    0xc(%rsp),%edx
lea    0x20(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1070 <delet@plt>
lea    0xcb6(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0x0,0xc(%rsp)
cmpl   $0x0,0x10(%rsp)
je     12ca <main+0x14a>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
mov    %eax,%eax
mov    0x20(%rsp,%rax,4),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%eax
add    $0x1,%eax
mov    %eax,0xc(%rsp)
cmp    0x10(%rsp),%eax
jb     14e0 <main+0x360>
jmp    12ca <main+0x14a>
mov    0x10(%rsp),%esi
lea    0x20(%rsp),%rdi
call   1080 <isort@plt>
xor    %ebp,%ebp
lea    0xc61(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0x0,0xc(%rsp)
nopl   0x0(%rax)
mov    %ebp,%eax
mov    0x20(%rsp,%rax,4),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%ebp
add    $0x1,%ebp
mov    %ebp,0xc(%rsp)
cmp    $0x5,%ebp
jb     1530 <main+0x3b0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x14(%rsp),%esi
lea    0xf0(%rsp),%rdi
call   1080 <isort@plt>
lea    0xc1c(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0x0,0xc(%rsp)
cmpl   $0x0,0x14(%rsp)
lea    0xb3f(%rip),%rbx
lea    0xb50(%rip),%rbp
je     12ca <main+0x14a>
xor    %eax,%eax
nopl   0x0(%rax)
mov    %eax,%eax
mov    0xf0(%rsp,%rax,4),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%eax
add    $0x1,%eax
mov    %eax,0xc(%rsp)
cmp    0x14(%rsp),%eax
jb     15a0 <main+0x420>
jmp    12ca <main+0x14a>
mov    0x10(%rsp),%edx
mov    0x14(%rsp),%r8d
lea    0x1c0(%rsp),%rdi
lea    0x20(%rsp),%rsi
lea    0xf0(%rsp),%rcx
call   1050 <msort@plt>
lea    0xbab(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0x0,0xc(%rsp)
mov    0x10(%rsp),%eax
add    0x14(%rsp),%eax
je     12ca <main+0x14a>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%eax
mov    0x1c0(%rsp,%rax,4),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%eax
add    $0x1,%eax
mov    %eax,0xc(%rsp)
mov    0x10(%rsp),%ecx
add    0x14(%rsp),%ecx
cmp    %ecx,%eax
jb     1620 <main+0x4a0>
jmp    12ca <main+0x14a>
xor    %eax,%eax
add    $0x288,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Enter number of elements in array 1:\00"
@.str.1 = [7 x i8] c" %u%*c\00"
@.str.2 = [27 x i8] c"Enter contents of array 1:\00"
@.str.3 = [37 x i8] c"Enter number of elements in array 2:\00"
@.str.4 = [27 x i8] c"Enter contents of array 2:\00"
@.str.5 = [27 x i8] c"What would you like to do?\00"
@.str.6 = [11 x i8] c" ( 0) Exit\00"
@.str.7 = [14 x i8] c" ( 1) Display\00"
@.str.8 = [24 x i8] c" ( 2) Insert an element\00"
@.str.9 = [24 x i8] c" ( 3) Delete an element\00"
@.str.10 = [11 x i8] c" ( 4) Sort\00"
@.str.11 = [17 x i8] c" ( 5) Merge sort\00"
@.str.12 = [5 x i8] c"Bye!\00"
@.str.13 = [9 x i8] c"Array 1:\00"
@.str.14 = [4 x i8] c" %d\00"
@.str.15 = [9 x i8] c"Array 2:\00"
@.str.16 = [36 x i8] c"Enter a position and key to insert:\00"
@.str.17 = [10 x i8] c" %u %u%*c\00"
@.str.18 = [10 x i8] c"Inserted:\00"
@.str.19 = [28 x i8] c"Enter a position to delete:\00"
@.str.20 = [9 x i8] c"Deleted:\00"
@.str.21 = [16 x i8] c"Sorted Array 1:\00"
@.str.22 = [16 x i8] c"Sorted Array 2:\00"
@.str.23 = [14 x i8] c"Merged Array:\00"
@.str.24 = [18 x i8] c"Incorrect Choice!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [50 x i32]
%8 = alloca [50 x i32]
%9 = alloca [50 x i32]
store i32 0, i32* %1
%10 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%12 = call i32 @puts(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %2
br label %13
13: ; preds = %23, %0
%14 = load i32, i32* %2
%15 = load i32, i32* %4
%16 = icmp ult i32 %14, %15
br i1 %16, label %17, label %26
17: ; preds = %13
%18 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 0
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %21)
br label %23
23: ; preds = %17
%24 = load i32, i32* %2
%25 = add i32 %24, 1
store i32 %25, i32* %2
br label %13
26: ; preds = %13
%27 = call i32 @putchar(i8 signext 10)
%28 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
%29 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%30 = call i32 @puts(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %2
br label %31
31: ; preds = %41, %26
%32 = load i32, i32* %2
%33 = load i32, i32* %5
%34 = icmp ult i32 %32, %33
br i1 %34, label %35, label %44
35: ; preds = %31
%36 = getelementptr inbounds [50 x i32], [50 x i32]* %8, i64 0, i64 0
%37 = load i32, i32* %2
%38 = zext i32 %37 to i64
%39 = getelementptr inbounds i32, i32* %36, i64 %38
%40 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %39)
br label %41
41: ; preds = %35
%42 = load i32, i32* %2
%43 = add i32 %42, 1
store i32 %43, i32* %2
br label %31
44: ; preds = %31
%45 = call i32 @putchar(i8 signext 10)
br label %46
46: ; preds = %199, %44
%47 = call i32 @puts(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%48 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%49 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
%50 = call i32 @puts(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%51 = call i32 @puts(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%52 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%53 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
%54 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%55 = load i32, i32* %6
switch i32 %55, label %194 [
i32 0, label %56
i32 1, label %58
i32 2, label %90
i32 3, label %112
i32 4, label %133
i32 5, label %170
]
56: ; preds = %46
%57 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
br label %196
58: ; preds = %46
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0))
store i32 0, i32* %2
br label %60
60: ; preds = %70, %58
%61 = load i32, i32* %2
%62 = load i32, i32* %4
%63 = icmp ult i32 %61, %62
br i1 %63, label %64, label %73
64: ; preds = %60
%65 = load i32, i32* %2
%66 = zext i32 %65 to i64
%67 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 %66
%68 = load i32, i32* %67
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %68)
br label %70
70: ; preds = %64
%71 = load i32, i32* %2
%72 = add i32 %71, 1
store i32 %72, i32* %2
br label %60
73: ; preds = %60
%74 = call i32 @putchar(i8 signext 10)
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0))
store i32 0, i32* %2
br label %76
76: ; preds = %86, %73
%77 = load i32, i32* %2
%78 = load i32, i32* %5
%79 = icmp ult i32 %77, %78
br i1 %79, label %80, label %89
80: ; preds = %76
%81 = load i32, i32* %2
%82 = zext i32 %81 to i64
%83 = getelementptr inbounds [50 x i32], [50 x i32]* %8, i64 0, i64 %82
%84 = load i32, i32* %83
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %84)
br label %86
86: ; preds = %80
%87 = load i32, i32* %2
%88 = add i32 %87, 1
store i32 %88, i32* %2
br label %76
89: ; preds = %76
br label %196
90: ; preds = %46
%91 = call i32 @puts(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.16, i64 0, i64 0))
%92 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0), i32* %2, i32* %3)
%93 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 0
%94 = load i32, i32* %2
%95 = load i32, i32* %3
%96 = call i32 @insert(i32* %93, i32* %4, i32 %94, i32 %95)
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
store i32 0, i32* %2
br label %98
98: ; preds = %108, %90
%99 = load i32, i32* %2
%100 = load i32, i32* %4
%101 = icmp ult i32 %99, %100
br i1 %101, label %102, label %111
102: ; preds = %98
%103 = load i32, i32* %2
%104 = zext i32 %103 to i64
%105 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 %104
%106 = load i32, i32* %105
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %106)
br label %108
108: ; preds = %102
%109 = load i32, i32* %2
%110 = add i32 %109, 1
store i32 %110, i32* %2
br label %98
111: ; preds = %98
br label %196
112: ; preds = %46
%113 = call i32 @puts(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.19, i64 0, i64 0))
%114 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%115 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 0
%116 = load i32, i32* %2
%117 = call i32 @delet(i32* %115, i32* %4, i32 %116)
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
store i32 0, i32* %2
br label %119
119: ; preds = %129, %112
%120 = load i32, i32* %2
%121 = load i32, i32* %4
%122 = icmp ult i32 %120, %121
br i1 %122, label %123, label %132
123: ; preds = %119
%124 = load i32, i32* %2
%125 = zext i32 %124 to i64
%126 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 %125
%127 = load i32, i32* %126
%128 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %127)
br label %129
129: ; preds = %123
%130 = load i32, i32* %2
%131 = add i32 %130, 1
store i32 %131, i32* %2
br label %119
132: ; preds = %119
br label %196
133: ; preds = %46
%134 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 0
%135 = load i32, i32* %4
%136 = call i32 @isort(i32* %134, i32 %135)
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.21, i64 0, i64 0))
store i32 0, i32* %2
br label %138
138: ; preds = %147, %133
%139 = load i32, i32* %2
%140 = icmp ult i32 %139, 5
br i1 %140, label %141, label %150
141: ; preds = %138
%142 = load i32, i32* %2
%143 = zext i32 %142 to i64
%144 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 %143
%145 = load i32, i32* %144
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %145)
br label %147
147: ; preds = %141
%148 = load i32, i32* %2
%149 = add i32 %148, 1
store i32 %149, i32* %2
br label %138
150: ; preds = %138
%151 = call i32 @putchar(i8 signext 10)
%152 = getelementptr inbounds [50 x i32], [50 x i32]* %8, i64 0, i64 0
%153 = load i32, i32* %5
%154 = call i32 @isort(i32* %152, i32 %153)
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.22, i64 0, i64 0))
store i32 0, i32* %2
br label %156
156: ; preds = %166, %150
%157 = load i32, i32* %2
%158 = load i32, i32* %5
%159 = icmp ult i32 %157, %158
br i1 %159, label %160, label %169
160: ; preds = %156
%161 = load i32, i32* %2
%162 = zext i32 %161 to i64
%163 = getelementptr inbounds [50 x i32], [50 x i32]* %8, i64 0, i64 %162
%164 = load i32, i32* %163
%165 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %164)
br label %166
166: ; preds = %160
%167 = load i32, i32* %2
%168 = add i32 %167, 1
store i32 %168, i32* %2
br label %156
169: ; preds = %156
br label %196
170: ; preds = %46
%171 = getelementptr inbounds [50 x i32], [50 x i32]* %9, i64 0, i64 0
%172 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 0
%173 = load i32, i32* %4
%174 = getelementptr inbounds [50 x i32], [50 x i32]* %8, i64 0, i64 0
%175 = load i32, i32* %5
%176 = call i32 @msort(i32* %171, i32* %172, i32 %173, i32* %174, i32 %175)
%177 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.23, i64 0, i64 0))
store i32 0, i32* %2
br label %178
178: ; preds = %190, %170
%179 = load i32, i32* %2
%180 = load i32, i32* %5
%181 = load i32, i32* %4
%182 = add i32 %180, %181
%183 = icmp ult i32 %179, %182
br i1 %183, label %184, label %193
184: ; preds = %178
%185 = load i32, i32* %2
%186 = zext i32 %185 to i64
%187 = getelementptr inbounds [50 x i32], [50 x i32]* %9, i64 0, i64 %186
%188 = load i32, i32* %187
%189 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %188)
br label %190
190: ; preds = %184
%191 = load i32, i32* %2
%192 = add i32 %191, 1
store i32 %192, i32* %2
br label %178
193: ; preds = %178
br label %196
194: ; preds = %46
%195 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.24, i64 0, i64 0))
br label %196
196: ; preds = %194, %193, %169, %132, %111, %89, %56
%197 = call i32 @putchar(i8 signext 10)
%198 = call i32 @putchar(i8 signext 10)
br label %199
199: ; preds = %196
%200 = load i32, i32* %6
%201 = icmp ne i32 %200, 0
br i1 %201, label %46, label %202
202: ; preds = %199
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"Enter number of elements in array 1:\00"
@.str.1 = [7 x i8] c" %u%*c\00"
@.str.2 = [27 x i8] c"Enter contents of array 1:\00"
@.str.3 = [37 x i8] c"Enter number of elements in array 2:\00"
@.str.4 = [27 x i8] c"Enter contents of array 2:\00"
@.str.5 = [27 x i8] c"What would you like to do?\00"
@.str.6 = [11 x i8] c" ( 0) Exit\00"
@.str.7 = [14 x i8] c" ( 1) Display\00"
@.str.8 = [24 x i8] c" ( 2) Insert an element\00"
@.str.9 = [24 x i8] c" ( 3) Delete an element\00"
@.str.10 = [11 x i8] c" ( 4) Sort\00"
@.str.11 = [17 x i8] c" ( 5) Merge sort\00"
@.str.12 = [5 x i8] c"Bye!\00"
@.str.13 = [9 x i8] c"Array 1:\00"
@.str.14 = [4 x i8] c" %d\00"
@.str.15 = [9 x i8] c"Array 2:\00"
@.str.16 = [36 x i8] c"Enter a position and key to insert:\00"
@.str.17 = [10 x i8] c" %u %u%*c\00"
@.str.18 = [10 x i8] c"Inserted:\00"
@.str.19 = [28 x i8] c"Enter a position to delete:\00"
@.str.20 = [9 x i8] c"Deleted:\00"
@.str.21 = [16 x i8] c"Sorted Array 1:\00"
@.str.22 = [16 x i8] c"Sorted Array 2:\00"
@.str.23 = [14 x i8] c"Merged Array:\00"
@.str.24 = [18 x i8] c"Incorrect Choice!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [50 x i32]
%7 = alloca [50 x i32]
%8 = alloca [50 x i32]
%9 = bitcast i32* %1 to i8*
%10 = bitcast i32* %2 to i8*
%11 = bitcast i32* %3 to i8*
%12 = bitcast i32* %4 to i8*
%13 = bitcast i32* %5 to i8*
%14 = bitcast [50 x i32]* %6 to i8*
%15 = bitcast [50 x i32]* %7 to i8*
%16 = bitcast [50 x i32]* %8 to i8*
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
%20 = load i32, i32* %3
%21 = icmp eq i32 %20, 0
br i1 %21, label %31, label %22
22: ; preds = %0, %22
%23 = phi i32 [ %28, %22 ], [ 0, %0 ]
%24 = zext i32 %23 to i64
%25 = getelementptr inbounds [50 x i32], [50 x i32]* %6, i64 0, i64 %24
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %25)
%27 = load i32, i32* %1
%28 = add i32 %27, 1
store i32 %28, i32* %1
%29 = load i32, i32* %3
%30 = icmp ult i32 %28, %29
br i1 %30, label %22, label %31
31: ; preds = %22, %0
%32 = call i32 @putchar(i8 signext 10)
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
%34 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %1
%36 = load i32, i32* %4
%37 = icmp eq i32 %36, 0
br i1 %37, label %47, label %38
38: ; preds = %31, %38
%39 = phi i32 [ %44, %38 ], [ 0, %31 ]
%40 = zext i32 %39 to i64
%41 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 %40
%42 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %41)
%43 = load i32, i32* %1
%44 = add i32 %43, 1
store i32 %44, i32* %1
%45 = load i32, i32* %4
%46 = icmp ult i32 %44, %45
br i1 %46, label %38, label %47
47: ; preds = %38, %31
%48 = call i32 @putchar(i8 signext 10)
%49 = getelementptr inbounds [50 x i32], [50 x i32]* %8, i64 0, i64 0
%50 = getelementptr inbounds [50 x i32], [50 x i32]* %6, i64 0, i64 0
%51 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 0
br label %52
52: ; preds = %183, %47
%53 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%54 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%55 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
%56 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%57 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%58 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%59 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
%60 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%61 = load i32, i32* %5
switch i32 %61, label %179 [
i32 0, label %180
i32 1, label %62
i32 2, label %91
i32 3, label %110
i32 4, label %128
i32 5, label %158
]
62: ; preds = %52
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0))
store i32 0, i32* %1
%64 = load i32, i32* %3
%65 = icmp eq i32 %64, 0
br i1 %65, label %76, label %66
66: ; preds = %62, %66
%67 = phi i32 [ %73, %66 ], [ 0, %62 ]
%68 = zext i32 %67 to i64
%69 = getelementptr inbounds [50 x i32], [50 x i32]* %6, i64 0, i64 %68
%70 = load i32, i32* %69
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %70)
%72 = load i32, i32* %1
%73 = add i32 %72, 1
store i32 %73, i32* %1
%74 = load i32, i32* %3
%75 = icmp ult i32 %73, %74
br i1 %75, label %66, label %76
76: ; preds = %66, %62
%77 = call i32 @putchar(i8 signext 10)
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0))
store i32 0, i32* %1
%79 = load i32, i32* %4
%80 = icmp eq i32 %79, 0
br i1 %80, label %183, label %81
81: ; preds = %76, %81
%82 = phi i32 [ %88, %81 ], [ 0, %76 ]
%83 = zext i32 %82 to i64
%84 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 %83
%85 = load i32, i32* %84
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %85)
%87 = load i32, i32* %1
%88 = add i32 %87, 1
store i32 %88, i32* %1
%89 = load i32, i32* %4
%90 = icmp ult i32 %88, %89
br i1 %90, label %81, label %183
91: ; preds = %52
%92 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.16, i64 0, i64 0))
%93 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0), i32* %1, i32* %2)
%94 = load i32, i32* %1
%95 = load i32, i32* %2
%96 = call i32 @insert(i32* %50, i32* %3, i32 %94, i32 %95)
%97 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
store i32 0, i32* %1
%98 = load i32, i32* %3
%99 = icmp eq i32 %98, 0
br i1 %99, label %183, label %100
100: ; preds = %91, %100
%101 = phi i32 [ %107, %100 ], [ 0, %91 ]
%102 = zext i32 %101 to i64
%103 = getelementptr inbounds [50 x i32], [50 x i32]* %6, i64 0, i64 %102
%104 = load i32, i32* %103
%105 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %104)
%106 = load i32, i32* %1
%107 = add i32 %106, 1
store i32 %107, i32* %1
%108 = load i32, i32* %3
%109 = icmp ult i32 %107, %108
br i1 %109, label %100, label %183
110: ; preds = %52
%111 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.19, i64 0, i64 0))
%112 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%113 = load i32, i32* %1
%114 = call i32 @delet(i32* %50, i32* %3, i32 %113)
%115 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
store i32 0, i32* %1
%116 = load i32, i32* %3
%117 = icmp eq i32 %116, 0
br i1 %117, label %183, label %118
118: ; preds = %110, %118
%119 = phi i32 [ %125, %118 ], [ 0, %110 ]
%120 = zext i32 %119 to i64
%121 = getelementptr inbounds [50 x i32], [50 x i32]* %6, i64 0, i64 %120
%122 = load i32, i32* %121
%123 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %122)
%124 = load i32, i32* %1
%125 = add i32 %124, 1
store i32 %125, i32* %1
%126 = load i32, i32* %3
%127 = icmp ult i32 %125, %126
br i1 %127, label %118, label %183
128: ; preds = %52
%129 = load i32, i32* %3
%130 = call i32 @isort(i32* %50, i32 %129)
%131 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.21, i64 0, i64 0))
store i32 0, i32* %1
br label %132
132: ; preds = %128, %132
%133 = phi i32 [ 0, %128 ], [ %139, %132 ]
%134 = zext i32 %133 to i64
%135 = getelementptr inbounds [50 x i32], [50 x i32]* %6, i64 0, i64 %134
%136 = load i32, i32* %135
%137 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %136)
%138 = load i32, i32* %1
%139 = add i32 %138, 1
store i32 %139, i32* %1
%140 = icmp ult i32 %139, 5
br i1 %140, label %132, label %141
141: ; preds = %132
%142 = call i32 @putchar(i8 signext 10)
%143 = load i32, i32* %4
%144 = call i32 @isort(i32* %51, i32 %143)
%145 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.22, i64 0, i64 0))
store i32 0, i32* %1
%146 = load i32, i32* %4
%147 = icmp eq i32 %146, 0
br i1 %147, label %183, label %148
148: ; preds = %141, %148
%149 = phi i32 [ %155, %148 ], [ 0, %141 ]
%150 = zext i32 %149 to i64
%151 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 %150
%152 = load i32, i32* %151
%153 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %152)
%154 = load i32, i32* %1
%155 = add i32 %154, 1
store i32 %155, i32* %1
%156 = load i32, i32* %4
%157 = icmp ult i32 %155, %156
br i1 %157, label %148, label %183
158: ; preds = %52
%159 = load i32, i32* %3
%160 = load i32, i32* %4
%161 = call i32 @msort(i32* %49, i32* %50, i32 %159, i32* %51, i32 %160)
%162 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.23, i64 0, i64 0))
store i32 0, i32* %1
%163 = load i32, i32* %4
%164 = load i32, i32* %3
%165 = sub i32 0, %163
%166 = icmp eq i32 %164, %165
br i1 %166, label %183, label %167
167: ; preds = %158, %167
%168 = phi i32 [ %174, %167 ], [ 0, %158 ]
%169 = zext i32 %168 to i64
%170 = getelementptr inbounds [50 x i32], [50 x i32]* %8, i64 0, i64 %169
%171 = load i32, i32* %170
%172 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %171)
%173 = load i32, i32* %1
%174 = add i32 %173, 1
store i32 %174, i32* %1
%175 = load i32, i32* %4
%176 = load i32, i32* %3
%177 = add i32 %176, %175
%178 = icmp ult i32 %174, %177
br i1 %178, label %167, label %183
179: ; preds = %52
br label %180
180: ; preds = %52, %179
%181 = phi i8* [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.24, i64 0, i64 0), %179 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), %52 ]
%182 = call i32 @puts(i8* dereferenceable(1) %181)
br label %183
183: ; preds = %167, %148, %118, %100, %81, %180, %158, %141, %110, %91, %76
%184 = call i32 @putchar(i8 signext 10)
%185 = call i32 @putchar(i8 signext 10)
%186 = load i32, i32* %5
%187 = icmp eq i32 %186, 0
br i1 %187, label %188, label %52
188: ; preds = %183
ret i32 0
}