#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*/ free(int *);
int *malloc(int);
int /*<<< orphan*/ permutation_int(int, int *, int, int *, int *);
int /*<<< orphan*/ printf(char *, ...);
int rand();
int /*<<< orphan*/ sort_int(int, int *, int *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  int i, N = 10;
  int *x = malloc(N * sizeof(int));
  int *y = malloc(N * sizeof(int));
  int *z = malloc(N * sizeof(int));
  int *idx = malloc(N * sizeof(int));
  srand(time(NULL));
  for (i = 0; i < N; i++) {
    x[i] = rand() % 100;
    y[i] = i;
    z[i] = i * i;
  }
  printf("Random |  i  |  i*i\n");
  for (i = 0; i < N; i++) {
    printf("%5.1d %5.1d %5.1d\n", x[i], y[i], z[i]);
  }
  sort_int(N, x, idx);
  permutation_int(N, idx, 2, y, z);
  printf("We sort the random column, then arrange i and i*i with the same "
         "permutation.\n");
  for (i = 0; i < N; i++) {
    printf("%5.1d %5.1d %5.1d\n", x[i], y[i], z[i]);
  }
  free(x);
  free(y);
  free(z);
  free(idx);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x18(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x20(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x28(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x30(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    124d <main+0xcd>
mov    $0x0,%al
call   10a0 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%edx
mov    -0x20(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%edx
imul   -0x8(%rbp),%edx
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11f9 <main+0x79>
lea    0xdac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12ab <main+0x12b>
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x20(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
lea    0xd7f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1262 <main+0xe2>
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1070 <sort_int@plt>
mov    -0xc(%rbp),%edi
mov    -0x30(%rbp),%rsi
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x2,%edx
call   1060 <permutation_int@plt>
lea    0xd4d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1332 <main+0x1b2>
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x20(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
lea    0xcf8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12e9 <main+0x169>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    $0x28,%edi
call   10a0 <malloc@plt>
mov    %rax,%r14
mov    $0x28,%edi
call   10a0 <malloc@plt>
mov    %rax,%r15
mov    $0x28,%edi
call   10a0 <malloc@plt>
mov    %rax,%rbx
mov    $0x28,%edi
call   10a0 <malloc@plt>
mov    %rax,%r12
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x5,%ecx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,(%r14)
movl   $0x0,(%r15)
movl   $0x0,(%rbx)
xor    %eax,%eax
call   10b0 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x5,%ecx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,0x4(%r14)
movl   $0x1,0x4(%r15)
movl   $0x1,0x4(%rbx)
xor    %eax,%eax
call   10b0 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x5,%ecx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,0x8(%r14)
movl   $0x2,0x8(%r15)
movl   $0x4,0x8(%rbx)
xor    %eax,%eax
call   10b0 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x5,%ecx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,0xc(%r14)
movl   $0x3,0xc(%r15)
movl   $0x9,0xc(%rbx)
xor    %eax,%eax
call   10b0 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x5,%ecx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,0x10(%r14)
movl   $0x4,0x10(%r15)
movl   $0x10,0x10(%rbx)
xor    %eax,%eax
call   10b0 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x5,%ecx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,0x14(%r14)
movl   $0x5,0x14(%r15)
movl   $0x19,0x14(%rbx)
xor    %eax,%eax
call   10b0 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x5,%ecx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,0x18(%r14)
movl   $0x6,0x18(%r15)
movl   $0x24,0x18(%rbx)
xor    %eax,%eax
call   10b0 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x5,%ecx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,0x1c(%r14)
movl   $0x7,0x1c(%r15)
movl   $0x31,0x1c(%rbx)
xor    %eax,%eax
call   10b0 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x5,%ecx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,0x20(%r14)
movl   $0x8,0x20(%r15)
movl   $0x40,0x20(%rbx)
xor    %eax,%eax
call   10b0 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x5,%ecx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,0x24(%r14)
movl   $0x9,0x24(%r15)
movl   $0x51,0x24(%rbx)
lea    0xc04(%rip),%rdi
call   1040 <puts@plt>
mov    (%r14),%esi
mov    (%r15),%edx
mov    (%rbx),%ecx
lea    0xbdd(%rip),%r13
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%r14),%esi
mov    0x4(%r15),%edx
mov    0x4(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%r14),%esi
mov    0x8(%r15),%edx
mov    0x8(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%r14),%esi
mov    0xc(%r15),%edx
mov    0xc(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%r14),%esi
mov    0x10(%r15),%edx
mov    0x10(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%r14),%esi
mov    0x14(%r15),%edx
mov    0x14(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%r14),%esi
mov    0x18(%r15),%edx
mov    0x18(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x1c(%r14),%esi
mov    0x1c(%r15),%edx
mov    0x1c(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x20(%r14),%esi
mov    0x20(%r15),%edx
mov    0x20(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x24(%r14),%esi
mov    0x24(%r15),%edx
mov    0x24(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
mov    %r14,%rsi
mov    %r12,%rdx
call   1080 <sort_int@plt>
mov    $0xa,%edi
mov    %r12,%rsi
mov    $0x2,%edx
mov    %r15,%rcx
mov    %rbx,%r8
call   1070 <permutation_int@plt>
lea    0xb0e(%rip),%rdi
call   1040 <puts@plt>
mov    (%r14),%esi
mov    (%r15),%edx
mov    (%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%r14),%esi
mov    0x4(%r15),%edx
mov    0x4(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%r14),%esi
mov    0x8(%r15),%edx
mov    0x8(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%r14),%esi
mov    0xc(%r15),%edx
mov    0xc(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%r14),%esi
mov    0x10(%r15),%edx
mov    0x10(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%r14),%esi
mov    0x14(%r15),%edx
mov    0x14(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%r14),%esi
mov    0x18(%r15),%edx
mov    0x18(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x1c(%r14),%esi
mov    0x1c(%r15),%edx
mov    0x1c(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x20(%r14),%esi
mov    0x20(%r15),%edx
mov    0x20(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x24(%r14),%esi
mov    0x24(%r15),%edx
mov    0x24(%rbx),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Random | i | i*i\0A\00"
@.str.1 = [19 x i8] c"%5.1d %5.1d %5.1d\0A\00"
@.str.2 = [78 x i8] c"We sort the random column, then arrange i and i*i with the same permutation.\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*
store i32 0, i32* %1
store i32 10, i32* %3
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = mul i64 %9, 4
%11 = trunc i64 %10 to i32
%12 = call i32* @malloc(i32 %11)
store i32* %12, i32** %4
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = mul i64 %14, 4
%16 = trunc i64 %15 to i32
%17 = call i32* @malloc(i32 %16)
store i32* %17, i32** %5
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = mul i64 %19, 4
%21 = trunc i64 %20 to i32
%22 = call i32* @malloc(i32 %21)
store i32* %22, i32** %6
%23 = load i32, i32* %3
%24 = sext i32 %23 to i64
%25 = mul i64 %24, 4
%26 = trunc i64 %25 to i32
%27 = call i32* @malloc(i32 %26)
store i32* %27, i32** %7
%28 = call i32 @time(i32* null)
%29 = call i32 @srand(i32 %28)
store i32 0, i32* %2
br label %30
30: ; preds = %53, %0
%31 = load i32, i32* %2
%32 = load i32, i32* %3
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %56
34: ; preds = %30
%35 = call i32 (...) @rand()
%36 = srem i32 %35, 100
%37 = load i32*, i32** %4
%38 = load i32, i32* %2
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i32, i32* %37, i64 %39
store i32 %36, i32* %40
%41 = load i32, i32* %2
%42 = load i32*, i32** %5
%43 = load i32, i32* %2
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i32, i32* %42, i64 %44
store i32 %41, i32* %45
%46 = load i32, i32* %2
%47 = load i32, i32* %2
%48 = mul nsw i32 %46, %47
%49 = load i32*, i32** %6
%50 = load i32, i32* %2
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i32, i32* %49, i64 %51
store i32 %48, i32* %52
br label %53
53: ; preds = %34
%54 = load i32, i32* %2
%55 = add nsw i32 %54, 1
store i32 %55, i32* %2
br label %30
56: ; preds = %30
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %58
58: ; preds = %79, %56
%59 = load i32, i32* %2
%60 = load i32, i32* %3
%61 = icmp slt i32 %59, %60
br i1 %61, label %62, label %82
62: ; preds = %58
%63 = load i32*, i32** %4
%64 = load i32, i32* %2
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i32, i32* %63, i64 %65
%67 = load i32, i32* %66
%68 = load i32*, i32** %5
%69 = load i32, i32* %2
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i32, i32* %68, i64 %70
%72 = load i32, i32* %71
%73 = load i32*, i32** %6
%74 = load i32, i32* %2
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i32, i32* %73, i64 %75
%77 = load i32, i32* %76
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %67, i32 %72, i32 %77)
br label %79
79: ; preds = %62
%80 = load i32, i32* %2
%81 = add nsw i32 %80, 1
store i32 %81, i32* %2
br label %58
82: ; preds = %58
%83 = load i32, i32* %3
%84 = load i32*, i32** %4
%85 = load i32*, i32** %7
%86 = call i32 @sort_int(i32 %83, i32* %84, i32* %85)
%87 = load i32, i32* %3
%88 = load i32*, i32** %7
%89 = load i32*, i32** %5
%90 = load i32*, i32** %6
%91 = call i32 @permutation_int(i32 %87, i32* %88, i32 2, i32* %89, i32* %90)
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %2
br label %93
93: ; preds = %114, %82
%94 = load i32, i32* %2
%95 = load i32, i32* %3
%96 = icmp slt i32 %94, %95
br i1 %96, label %97, label %117
97: ; preds = %93
%98 = load i32*, i32** %4
%99 = load i32, i32* %2
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i32, i32* %98, i64 %100
%102 = load i32, i32* %101
%103 = load i32*, i32** %5
%104 = load i32, i32* %2
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds i32, i32* %103, i64 %105
%107 = load i32, i32* %106
%108 = load i32*, i32** %6
%109 = load i32, i32* %2
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds i32, i32* %108, i64 %110
%112 = load i32, i32* %111
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %102, i32 %107, i32 %112)
br label %114
114: ; preds = %97
%115 = load i32, i32* %2
%116 = add nsw i32 %115, 1
store i32 %116, i32* %2
br label %93
117: ; preds = %93
%118 = load i32*, i32** %4
%119 = call i32 @free(i32* %118)
%120 = load i32*, i32** %5
%121 = call i32 @free(i32* %120)
%122 = load i32*, i32** %6
%123 = call i32 @free(i32* %122)
%124 = load i32*, i32** %7
%125 = call i32 @free(i32* %124)
%126 = load i32, i32* %1
ret i32 %126
}

LLVM IR (-O2):
@.str.1 = [19 x i8] c"%5.1d %5.1d %5.1d\0A\00"
@str = [20 x i8] c"Random | i | i*i\00"
@str.3 = [77 x i8] c"We sort the random column, then arrange i and i*i with the same permutation.\00"
define i32 @main() {
%1 = tail call i32* @malloc(i32 40)
%2 = tail call i32* @malloc(i32 40)
%3 = tail call i32* @malloc(i32 40)
%4 = tail call i32* @malloc(i32 40)
%5 = tail call i32 @time(i32* null)
%6 = tail call i32 @srand(i32 %5)
%7 = tail call i32 (...) @rand()
%8 = srem i32 %7, 100
store i32 %8, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%9 = tail call i32 (...) @rand()
%10 = srem i32 %9, 100
%11 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %10, i32* %11
%12 = getelementptr inbounds i32, i32* %2, i64 1
store i32 1, i32* %12
%13 = getelementptr inbounds i32, i32* %3, i64 1
store i32 1, i32* %13
%14 = tail call i32 (...) @rand()
%15 = srem i32 %14, 100
%16 = getelementptr inbounds i32, i32* %1, i64 2
store i32 %15, i32* %16
%17 = getelementptr inbounds i32, i32* %2, i64 2
store i32 2, i32* %17
%18 = getelementptr inbounds i32, i32* %3, i64 2
store i32 4, i32* %18
%19 = tail call i32 (...) @rand()
%20 = srem i32 %19, 100
%21 = getelementptr inbounds i32, i32* %1, i64 3
store i32 %20, i32* %21
%22 = getelementptr inbounds i32, i32* %2, i64 3
store i32 3, i32* %22
%23 = getelementptr inbounds i32, i32* %3, i64 3
store i32 9, i32* %23
%24 = tail call i32 (...) @rand()
%25 = srem i32 %24, 100
%26 = getelementptr inbounds i32, i32* %1, i64 4
store i32 %25, i32* %26
%27 = getelementptr inbounds i32, i32* %2, i64 4
store i32 4, i32* %27
%28 = getelementptr inbounds i32, i32* %3, i64 4
store i32 16, i32* %28
%29 = tail call i32 (...) @rand()
%30 = srem i32 %29, 100
%31 = getelementptr inbounds i32, i32* %1, i64 5
store i32 %30, i32* %31
%32 = getelementptr inbounds i32, i32* %2, i64 5
store i32 5, i32* %32
%33 = getelementptr inbounds i32, i32* %3, i64 5
store i32 25, i32* %33
%34 = tail call i32 (...) @rand()
%35 = srem i32 %34, 100
%36 = getelementptr inbounds i32, i32* %1, i64 6
store i32 %35, i32* %36
%37 = getelementptr inbounds i32, i32* %2, i64 6
store i32 6, i32* %37
%38 = getelementptr inbounds i32, i32* %3, i64 6
store i32 36, i32* %38
%39 = tail call i32 (...) @rand()
%40 = srem i32 %39, 100
%41 = getelementptr inbounds i32, i32* %1, i64 7
store i32 %40, i32* %41
%42 = getelementptr inbounds i32, i32* %2, i64 7
store i32 7, i32* %42
%43 = getelementptr inbounds i32, i32* %3, i64 7
store i32 49, i32* %43
%44 = tail call i32 (...) @rand()
%45 = srem i32 %44, 100
%46 = getelementptr inbounds i32, i32* %1, i64 8
store i32 %45, i32* %46
%47 = getelementptr inbounds i32, i32* %2, i64 8
store i32 8, i32* %47
%48 = getelementptr inbounds i32, i32* %3, i64 8
store i32 64, i32* %48
%49 = tail call i32 (...) @rand()
%50 = srem i32 %49, 100
%51 = getelementptr inbounds i32, i32* %1, i64 9
store i32 %50, i32* %51
%52 = getelementptr inbounds i32, i32* %2, i64 9
store i32 9, i32* %52
%53 = getelementptr inbounds i32, i32* %3, i64 9
store i32 81, i32* %53
%54 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%55 = load i32, i32* %1
%56 = load i32, i32* %2
%57 = load i32, i32* %3
%58 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %55, i32 %56, i32 %57)
%59 = load i32, i32* %11
%60 = load i32, i32* %12
%61 = load i32, i32* %13
%62 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %59, i32 %60, i32 %61)
%63 = load i32, i32* %16
%64 = load i32, i32* %17
%65 = load i32, i32* %18
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %63, i32 %64, i32 %65)
%67 = load i32, i32* %21
%68 = load i32, i32* %22
%69 = load i32, i32* %23
%70 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %67, i32 %68, i32 %69)
%71 = load i32, i32* %26
%72 = load i32, i32* %27
%73 = load i32, i32* %28
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %71, i32 %72, i32 %73)
%75 = load i32, i32* %31
%76 = load i32, i32* %32
%77 = load i32, i32* %33
%78 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %75, i32 %76, i32 %77)
%79 = load i32, i32* %36
%80 = load i32, i32* %37
%81 = load i32, i32* %38
%82 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %79, i32 %80, i32 %81)
%83 = load i32, i32* %41
%84 = load i32, i32* %42
%85 = load i32, i32* %43
%86 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %83, i32 %84, i32 %85)
%87 = load i32, i32* %46
%88 = load i32, i32* %47
%89 = load i32, i32* %48
%90 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %87, i32 %88, i32 %89)
%91 = load i32, i32* %51
%92 = load i32, i32* %52
%93 = load i32, i32* %53
%94 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %91, i32 %92, i32 %93)
%95 = tail call i32 @sort_int(i32 10, i32* %1, i32* %4)
%96 = tail call i32 @permutation_int(i32 10, i32* %4, i32 2, i32* %2, i32* %3)
%97 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str.3, i64 0, i64 0))
%98 = load i32, i32* %1
%99 = load i32, i32* %2
%100 = load i32, i32* %3
%101 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %98, i32 %99, i32 %100)
%102 = load i32, i32* %11
%103 = load i32, i32* %12
%104 = load i32, i32* %13
%105 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %102, i32 %103, i32 %104)
%106 = load i32, i32* %16
%107 = load i32, i32* %17
%108 = load i32, i32* %18
%109 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %106, i32 %107, i32 %108)
%110 = load i32, i32* %21
%111 = load i32, i32* %22
%112 = load i32, i32* %23
%113 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %110, i32 %111, i32 %112)
%114 = load i32, i32* %26
%115 = load i32, i32* %27
%116 = load i32, i32* %28
%117 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %114, i32 %115, i32 %116)
%118 = load i32, i32* %31
%119 = load i32, i32* %32
%120 = load i32, i32* %33
%121 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %118, i32 %119, i32 %120)
%122 = load i32, i32* %36
%123 = load i32, i32* %37
%124 = load i32, i32* %38
%125 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %122, i32 %123, i32 %124)
%126 = load i32, i32* %41
%127 = load i32, i32* %42
%128 = load i32, i32* %43
%129 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %126, i32 %127, i32 %128)
%130 = load i32, i32* %46
%131 = load i32, i32* %47
%132 = load i32, i32* %48
%133 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %130, i32 %131, i32 %132)
%134 = load i32, i32* %51
%135 = load i32, i32* %52
%136 = load i32, i32* %53
%137 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %134, i32 %135, i32 %136)
%138 = tail call i32 @free(i32* %1)
%139 = tail call i32 @free(i32* %2)
%140 = tail call i32 @free(i32* %3)
%141 = tail call i32 @free(i32* %4)
ret i32 0
}