#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 */
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int rand();
int /*<<< orphan*/ sort(int *, int);
int main() {
  int n = 20;
  int *a = (int *)malloc(n * sizeof(int));
  int i;
  for (i = 0; i < n; i++) {
    *a = rand() % (n + 1);
    a++;
  }
  a -= n;
  printf("The contents of the original array are:\n");
  for (i = 1; i < n + 1; i++) {
    printf("a[%d]:%d\n", i, *a++);
  }
  a -= n;
  sort(a, n);
  printf("\nThe contents of the sorted array are:\n");
  for (i = 1; i < n + 1; i++) {
    printf("a[%d]:%d\n", i, *a++);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11ac <main+0x6c>
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%rax
mov    %edx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1170 <main+0x30>
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    121c <main+0xdc>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%edx
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11db <main+0x9b>
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <sort@plt>
lea    0xdea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1298 <main+0x158>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%edx
lea    0xda6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1257 <main+0x117>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x50,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x4(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x8(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0xc(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x10(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x14(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x18(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x1c(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x20(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x24(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x28(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x2c(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x30(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x34(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x38(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x3c(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x40(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x44(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x48(%rbx)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x4c(%rbx)
lea    0xb47(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%edx
lea    0xb2f(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rbx),%edx
mov    %r14,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%edx
mov    %r14,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rbx),%edx
mov    %r14,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rbx),%edx
mov    %r14,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rbx),%edx
mov    %r14,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rbx),%edx
mov    %r14,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1c(%rbx),%edx
mov    %r14,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rbx),%edx
mov    %r14,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x24(%rbx),%edx
mov    %r14,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x28(%rbx),%edx
mov    %r14,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2c(%rbx),%edx
mov    %r14,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x30(%rbx),%edx
mov    %r14,%rdi
mov    $0xd,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x34(%rbx),%edx
mov    %r14,%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x38(%rbx),%edx
mov    %r14,%rdi
mov    $0xf,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x3c(%rbx),%edx
mov    %r14,%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x40(%rbx),%edx
mov    %r14,%rdi
mov    $0x11,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x44(%rbx),%edx
mov    %r14,%rdi
mov    $0x12,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x48(%rbx),%edx
mov    %r14,%rdi
mov    $0x13,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4c(%rbx),%edx
mov    %r14,%rdi
mov    $0x14,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1050 <sort@plt>
lea    0x9e8(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%edx
mov    %r14,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rbx),%edx
mov    %r14,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%edx
mov    %r14,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rbx),%edx
mov    %r14,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rbx),%edx
mov    %r14,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rbx),%edx
mov    %r14,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rbx),%edx
mov    %r14,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1c(%rbx),%edx
mov    %r14,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rbx),%edx
mov    %r14,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x24(%rbx),%edx
mov    %r14,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x28(%rbx),%edx
mov    %r14,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2c(%rbx),%edx
mov    %r14,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x30(%rbx),%edx
mov    %r14,%rdi
mov    $0xd,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x34(%rbx),%edx
mov    %r14,%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x38(%rbx),%edx
mov    %r14,%rdi
mov    $0xf,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x3c(%rbx),%edx
mov    %r14,%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x40(%rbx),%edx
mov    %r14,%rdi
mov    $0x11,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x44(%rbx),%edx
mov    %r14,%rdi
mov    $0x12,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x48(%rbx),%edx
mov    %r14,%rdi
mov    $0x13,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4c(%rbx),%edx
mov    %r14,%rdi
mov    $0x14,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [41 x i8] c"The contents of the original array are:\0A\00"
@.str.1 = [10 x i8] c"a[%d]:%d\0A\00"
@.str.2 = [40 x i8] c"\0AThe contents of the sorted array are:\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32 0, i32* %1
store i32 20, i32* %2
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = mul i64 %6, 4
%8 = trunc i64 %7 to i32
%9 = call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to i32*
store i32* %10, i32** %3
store i32 0, i32* %4
br label %11
11: ; preds = %23, %0
%12 = load i32, i32* %4
%13 = load i32, i32* %2
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %26
15: ; preds = %11
%16 = call i32 (...) @rand()
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 1
%19 = srem i32 %16, %18
%20 = load i32*, i32** %3
store i32 %19, i32* %20
%21 = load i32*, i32** %3
%22 = getelementptr inbounds i32, i32* %21, i32 1
store i32* %22, i32** %3
br label %23
23: ; preds = %15
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
br label %11
26: ; preds = %11
%27 = load i32, i32* %2
%28 = load i32*, i32** %3
%29 = sext i32 %27 to i64
%30 = sub i64 0, %29
%31 = getelementptr inbounds i32, i32* %28, i64 %30
store i32* %31, i32** %3
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %4
br label %33
33: ; preds = %44, %26
%34 = load i32, i32* %4
%35 = load i32, i32* %2
%36 = add nsw i32 %35, 1
%37 = icmp slt i32 %34, %36
br i1 %37, label %38, label %47
38: ; preds = %33
%39 = load i32, i32* %4
%40 = load i32*, i32** %3
%41 = getelementptr inbounds i32, i32* %40, i32 1
store i32* %41, i32** %3
%42 = load i32, i32* %40
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %39, i32 %42)
br label %44
44: ; preds = %38
%45 = load i32, i32* %4
%46 = add nsw i32 %45, 1
store i32 %46, i32* %4
br label %33
47: ; preds = %33
%48 = load i32, i32* %2
%49 = load i32*, i32** %3
%50 = sext i32 %48 to i64
%51 = sub i64 0, %50
%52 = getelementptr inbounds i32, i32* %49, i64 %51
store i32* %52, i32** %3
%53 = load i32*, i32** %3
%54 = load i32, i32* %2
%55 = call i32 @sort(i32* %53, i32 %54)
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %4
br label %57
57: ; preds = %68, %47
%58 = load i32, i32* %4
%59 = load i32, i32* %2
%60 = add nsw i32 %59, 1
%61 = icmp slt i32 %58, %60
br i1 %61, label %62, label %71
62: ; preds = %57
%63 = load i32, i32* %4
%64 = load i32*, i32** %3
%65 = getelementptr inbounds i32, i32* %64, i32 1
store i32* %65, i32** %3
%66 = load i32, i32* %64
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %63, i32 %66)
br label %68
68: ; preds = %62
%69 = load i32, i32* %4
%70 = add nsw i32 %69, 1
store i32 %70, i32* %4
br label %57
71: ; preds = %57
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"a[%d]:%d\0A\00"
@str = [40 x i8] c"The contents of the original array are:\00"
@str.3 = [39 x i8] c"\0AThe contents of the sorted array are:\00"
define i32 @main() {
%1 = tail call i64 @malloc(i32 80)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 21
store i32 %4, i32* %2
%5 = getelementptr inbounds i32, i32* %2, i64 1
%6 = tail call i32 (...) @rand()
%7 = srem i32 %6, 21
store i32 %7, i32* %5
%8 = getelementptr inbounds i32, i32* %2, i64 2
%9 = tail call i32 (...) @rand()
%10 = srem i32 %9, 21
store i32 %10, i32* %8
%11 = getelementptr inbounds i32, i32* %2, i64 3
%12 = tail call i32 (...) @rand()
%13 = srem i32 %12, 21
store i32 %13, i32* %11
%14 = getelementptr inbounds i32, i32* %2, i64 4
%15 = tail call i32 (...) @rand()
%16 = srem i32 %15, 21
store i32 %16, i32* %14
%17 = getelementptr inbounds i32, i32* %2, i64 5
%18 = tail call i32 (...) @rand()
%19 = srem i32 %18, 21
store i32 %19, i32* %17
%20 = getelementptr inbounds i32, i32* %2, i64 6
%21 = tail call i32 (...) @rand()
%22 = srem i32 %21, 21
store i32 %22, i32* %20
%23 = getelementptr inbounds i32, i32* %2, i64 7
%24 = tail call i32 (...) @rand()
%25 = srem i32 %24, 21
store i32 %25, i32* %23
%26 = getelementptr inbounds i32, i32* %2, i64 8
%27 = tail call i32 (...) @rand()
%28 = srem i32 %27, 21
store i32 %28, i32* %26
%29 = getelementptr inbounds i32, i32* %2, i64 9
%30 = tail call i32 (...) @rand()
%31 = srem i32 %30, 21
store i32 %31, i32* %29
%32 = getelementptr inbounds i32, i32* %2, i64 10
%33 = tail call i32 (...) @rand()
%34 = srem i32 %33, 21
store i32 %34, i32* %32
%35 = getelementptr inbounds i32, i32* %2, i64 11
%36 = tail call i32 (...) @rand()
%37 = srem i32 %36, 21
store i32 %37, i32* %35
%38 = getelementptr inbounds i32, i32* %2, i64 12
%39 = tail call i32 (...) @rand()
%40 = srem i32 %39, 21
store i32 %40, i32* %38
%41 = getelementptr inbounds i32, i32* %2, i64 13
%42 = tail call i32 (...) @rand()
%43 = srem i32 %42, 21
store i32 %43, i32* %41
%44 = getelementptr inbounds i32, i32* %2, i64 14
%45 = tail call i32 (...) @rand()
%46 = srem i32 %45, 21
store i32 %46, i32* %44
%47 = getelementptr inbounds i32, i32* %2, i64 15
%48 = tail call i32 (...) @rand()
%49 = srem i32 %48, 21
store i32 %49, i32* %47
%50 = getelementptr inbounds i32, i32* %2, i64 16
%51 = tail call i32 (...) @rand()
%52 = srem i32 %51, 21
store i32 %52, i32* %50
%53 = getelementptr inbounds i32, i32* %2, i64 17
%54 = tail call i32 (...) @rand()
%55 = srem i32 %54, 21
store i32 %55, i32* %53
%56 = getelementptr inbounds i32, i32* %2, i64 18
%57 = tail call i32 (...) @rand()
%58 = srem i32 %57, 21
store i32 %58, i32* %56
%59 = getelementptr inbounds i32, i32* %2, i64 19
%60 = tail call i32 (...) @rand()
%61 = srem i32 %60, 21
store i32 %61, i32* %59
%62 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%63 = getelementptr inbounds i32, i32* %2, i64 1
%64 = load i32, i32* %2
%65 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 %64)
%66 = getelementptr inbounds i32, i32* %2, i64 2
%67 = load i32, i32* %63
%68 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 %67)
%69 = getelementptr inbounds i32, i32* %2, i64 3
%70 = load i32, i32* %66
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 %70)
%72 = getelementptr inbounds i32, i32* %2, i64 4
%73 = load i32, i32* %69
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 4, i32 %73)
%75 = getelementptr inbounds i32, i32* %2, i64 5
%76 = load i32, i32* %72
%77 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 5, i32 %76)
%78 = getelementptr inbounds i32, i32* %2, i64 6
%79 = load i32, i32* %75
%80 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 6, i32 %79)
%81 = getelementptr inbounds i32, i32* %2, i64 7
%82 = load i32, i32* %78
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 7, i32 %82)
%84 = getelementptr inbounds i32, i32* %2, i64 8
%85 = load i32, i32* %81
%86 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 8, i32 %85)
%87 = getelementptr inbounds i32, i32* %2, i64 9
%88 = load i32, i32* %84
%89 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 9, i32 %88)
%90 = getelementptr inbounds i32, i32* %2, i64 10
%91 = load i32, i32* %87
%92 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 %91)
%93 = getelementptr inbounds i32, i32* %2, i64 11
%94 = load i32, i32* %90
%95 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 11, i32 %94)
%96 = getelementptr inbounds i32, i32* %2, i64 12
%97 = load i32, i32* %93
%98 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 12, i32 %97)
%99 = getelementptr inbounds i32, i32* %2, i64 13
%100 = load i32, i32* %96
%101 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 13, i32 %100)
%102 = getelementptr inbounds i32, i32* %2, i64 14
%103 = load i32, i32* %99
%104 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 14, i32 %103)
%105 = getelementptr inbounds i32, i32* %2, i64 15
%106 = load i32, i32* %102
%107 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 15, i32 %106)
%108 = getelementptr inbounds i32, i32* %2, i64 16
%109 = load i32, i32* %105
%110 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 16, i32 %109)
%111 = getelementptr inbounds i32, i32* %2, i64 17
%112 = load i32, i32* %108
%113 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 17, i32 %112)
%114 = getelementptr inbounds i32, i32* %2, i64 18
%115 = load i32, i32* %111
%116 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 18, i32 %115)
%117 = getelementptr inbounds i32, i32* %2, i64 19
%118 = load i32, i32* %114
%119 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 19, i32 %118)
%120 = load i32, i32* %117
%121 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 20, i32 %120)
%122 = tail call i32 @sort(i32* %2, i32 20)
%123 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.3, i64 0, i64 0))
%124 = getelementptr inbounds i32, i32* %2, i64 1
%125 = load i32, i32* %2
%126 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 %125)
%127 = getelementptr inbounds i32, i32* %2, i64 2
%128 = load i32, i32* %124
%129 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 %128)
%130 = getelementptr inbounds i32, i32* %2, i64 3
%131 = load i32, i32* %127
%132 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 %131)
%133 = getelementptr inbounds i32, i32* %2, i64 4
%134 = load i32, i32* %130
%135 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 4, i32 %134)
%136 = getelementptr inbounds i32, i32* %2, i64 5
%137 = load i32, i32* %133
%138 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 5, i32 %137)
%139 = getelementptr inbounds i32, i32* %2, i64 6
%140 = load i32, i32* %136
%141 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 6, i32 %140)
%142 = getelementptr inbounds i32, i32* %2, i64 7
%143 = load i32, i32* %139
%144 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 7, i32 %143)
%145 = getelementptr inbounds i32, i32* %2, i64 8
%146 = load i32, i32* %142
%147 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 8, i32 %146)
%148 = getelementptr inbounds i32, i32* %2, i64 9
%149 = load i32, i32* %145
%150 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 9, i32 %149)
%151 = getelementptr inbounds i32, i32* %2, i64 10
%152 = load i32, i32* %148
%153 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 %152)
%154 = getelementptr inbounds i32, i32* %2, i64 11
%155 = load i32, i32* %151
%156 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 11, i32 %155)
%157 = getelementptr inbounds i32, i32* %2, i64 12
%158 = load i32, i32* %154
%159 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 12, i32 %158)
%160 = getelementptr inbounds i32, i32* %2, i64 13
%161 = load i32, i32* %157
%162 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 13, i32 %161)
%163 = getelementptr inbounds i32, i32* %2, i64 14
%164 = load i32, i32* %160
%165 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 14, i32 %164)
%166 = getelementptr inbounds i32, i32* %2, i64 15
%167 = load i32, i32* %163
%168 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 15, i32 %167)
%169 = getelementptr inbounds i32, i32* %2, i64 16
%170 = load i32, i32* %166
%171 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 16, i32 %170)
%172 = getelementptr inbounds i32, i32* %2, i64 17
%173 = load i32, i32* %169
%174 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 17, i32 %173)
%175 = getelementptr inbounds i32, i32* %2, i64 18
%176 = load i32, i32* %172
%177 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 18, i32 %176)
%178 = getelementptr inbounds i32, i32* %2, i64 19
%179 = load i32, i32* %175
%180 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 19, i32 %179)
%181 = load i32, i32* %178
%182 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 20, i32 %181)
ret i32 0
}