#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*/ printf(char *, ...);
int random();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
int main() {
  srand(time(0));
  int array[10];
  int i;
  for (i = 0; i < 10; i++)
    array[i] = random() % 1000;
  for (i = 0; i < 10; i++)
    printf("array[%d]=%d\n", i, array[i]);
  int max, temp, index, step;
  for (step = 10; step > 0; step--) {
    max = array[0];
    index = 0;
    for (i = 1; i < step; i++) {
      if (array[i] > max) {
        max = array[i];
        index = i;
      }
    }
    temp = array[step - 1];
    array[step - 1] = array[index];
    array[index] = temp;
  }
  printf("xuanzepaixu\n");
  for (i = 0; i < 10; i++)
    printf("array[%d]=%d\n", i, array[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0xa,-0x34(%rbp)
jge    1193 <main+0x53>
mov    $0x0,%al
call   1060 <random@plt>
mov    $0x3e8,%ecx
cltd
idiv   %ecx
movslq -0x34(%rbp),%rax
mov    %edx,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1164 <main+0x24>
movl   $0x0,-0x34(%rbp)
cmpl   $0xa,-0x34(%rbp)
jge    11cb <main+0x8b>
mov    -0x34(%rbp),%esi
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edx
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    119a <main+0x5a>
movl   $0xa,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jle    126d <main+0x12d>
mov    -0x30(%rbp),%eax
mov    %eax,-0x38(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1231 <main+0xf1>
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
cmp    -0x38(%rbp),%eax
jle    121e <main+0xde>
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
mov    %eax,-0x38(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x40(%rbp)
jmp    1223 <main+0xe3>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11f0 <main+0xb0>
mov    -0x44(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x30(%rbp,%rax,4),%eax
mov    %eax,-0x3c(%rbp)
movslq -0x40(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%ecx
mov    -0x44(%rbp),%eax
sub    $0x1,%eax
cltq
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x3c(%rbp),%ecx
movslq -0x40(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x44(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x44(%rbp)
jmp    11d2 <main+0x92>
lea    0xd9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0xa,-0x34(%rbp)
jge    12b3 <main+0x173>
mov    -0x34(%rbp),%esi
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edx
lea    0xd62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1282 <main+0x142>
xor    %eax,%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    $0x58,%rsp
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
xor    %eax,%eax
call   1070 <random@plt>
movslq %eax,%rbx
imul   $0x10624dd3,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0x6,%eax
add    %ecx,%eax
imul   $0x3e8,%eax,%eax
sub    %eax,%ebx
mov    %ebx,(%rsp)
xor    %eax,%eax
call   1070 <random@plt>
movslq %eax,%rdx
imul   $0x10624dd3,%rdx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0x6,%eax
add    %ecx,%eax
imul   $0x3e8,%eax,%eax
sub    %eax,%edx
mov    %rdx,0x50(%rsp)
mov    %edx,0x4(%rsp)
xor    %eax,%eax
call   1070 <random@plt>
movslq %eax,%rdx
imul   $0x10624dd3,%rdx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0x6,%eax
add    %ecx,%eax
imul   $0x3e8,%eax,%eax
sub    %eax,%edx
mov    %rdx,0x48(%rsp)
mov    %edx,0x8(%rsp)
xor    %eax,%eax
call   1070 <random@plt>
movslq %eax,%rdx
imul   $0x10624dd3,%rdx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0x6,%eax
add    %ecx,%eax
imul   $0x3e8,%eax,%eax
sub    %eax,%edx
mov    %rdx,0x40(%rsp)
mov    %edx,0xc(%rsp)
xor    %eax,%eax
call   1070 <random@plt>
movslq %eax,%rdx
imul   $0x10624dd3,%rdx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0x6,%eax
add    %ecx,%eax
imul   $0x3e8,%eax,%eax
sub    %eax,%edx
mov    %rdx,0x38(%rsp)
mov    %edx,0x10(%rsp)
xor    %eax,%eax
call   1070 <random@plt>
movslq %eax,%rdx
imul   $0x10624dd3,%rdx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0x6,%eax
add    %ecx,%eax
imul   $0x3e8,%eax,%eax
sub    %eax,%edx
mov    %rdx,0x30(%rsp)
mov    %edx,0x14(%rsp)
xor    %eax,%eax
call   1070 <random@plt>
movslq %eax,%r14
imul   $0x10624dd3,%r14,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0x6,%eax
add    %ecx,%eax
imul   $0x3e8,%eax,%eax
sub    %eax,%r14d
mov    %r14d,0x18(%rsp)
xor    %eax,%eax
call   1070 <random@plt>
movslq %eax,%r15
imul   $0x10624dd3,%r15,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0x6,%eax
add    %ecx,%eax
imul   $0x3e8,%eax,%eax
sub    %eax,%r15d
mov    %r15d,0x1c(%rsp)
xor    %eax,%eax
call   1070 <random@plt>
movslq %eax,%r12
imul   $0x10624dd3,%r12,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0x6,%eax
add    %ecx,%eax
imul   $0x3e8,%eax,%eax
sub    %eax,%r12d
mov    %r12d,0x20(%rsp)
xor    %eax,%eax
call   1070 <random@plt>
movslq %eax,%r13
imul   $0x10624dd3,%r13,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0x6,%eax
add    %ecx,%eax
imul   $0x3e8,%eax,%eax
sub    %eax,%r13d
mov    %r13d,0x24(%rsp)
lea    0xcab(%rip),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x1,%esi
mov    0x50(%rsp),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x2,%esi
mov    0x48(%rsp),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x3,%esi
mov    0x40(%rsp),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x4,%esi
mov    0x38(%rsp),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x5,%esi
mov    0x30(%rsp),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x6,%esi
mov    %r14d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x7,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x8,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x9,%esi
mov    %r13d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%esi
mov    $0x1,%dl
mov    $0xfffffffffffffff7,%rax
nopl   (%rax)
mov    %rsi,%rcx
mov    $0x1,%esi
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
mov    (%rsp,%rsi,4),%ebp
cmp    %ebx,%ebp
cmovg  %ebp,%ebx
cmovg  %esi,%edi
lea    (%rax,%rsi,1),%rbp
add    $0x1,%rbp
add    $0x1,%rsi
cmp    $0x1,%rbp
jne    1430 <main+0x2e0>
movslq %edi,%rsi
mov    (%rsp,%rsi,4),%edi
mov    -0x4(%rsp,%rcx,4),%ebp
mov    %edi,-0x4(%rsp,%rcx,4)
mov    %ebp,(%rsp,%rsi,4)
test   $0x1,%dl
je     1486 <main+0x336>
lea    -0x1(%rcx),%rsi
mov    (%rsp),%ebx
cmp    $0x2,%rsi
setae  %dl
add    $0x1,%rax
cmp    $0x1,%rsi
ja     1420 <main+0x2d0>
mov    -0x8(%rsp,%rcx,4),%eax
mov    %ebx,-0x8(%rsp,%rcx,4)
mov    %eax,(%rsp)
lea    0xb81(%rip),%rdi
call   1030 <puts@plt>
mov    (%rsp),%edx
lea    0xb64(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%edx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%edx
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%edx
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rsp),%edx
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rsp),%edx
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1c(%rsp),%edx
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%edx
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x24(%rsp),%edx
mov    %rbx,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"array[%d]=%d\0A\00"
@.str.1 = [13 x i8] c"xuanzepaixu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32 @time(i32 0)
%9 = call i32 @srand(i32 %8)
store i32 0, i32* %3
br label %10
10: ; preds = %19, %0
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 10
br i1 %12, label %13, label %22
13: ; preds = %10
%14 = call i32 (...) @random()
%15 = srem i32 %14, 1000
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %17
store i32 %15, i32* %18
br label %19
19: ; preds = %13
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %10
22: ; preds = %10
store i32 0, i32* %3
br label %23
23: ; preds = %33, %22
%24 = load i32, i32* %3
%25 = icmp slt i32 %24, 10
br i1 %25, label %26, label %36
26: ; preds = %23
%27 = load i32, i32* %3
%28 = load i32, i32* %3
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %29
%31 = load i32, i32* %30
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %27, i32 %31)
br label %33
33: ; preds = %26
%34 = load i32, i32* %3
%35 = add nsw i32 %34, 1
store i32 %35, i32* %3
br label %23
36: ; preds = %23
store i32 10, i32* %7
br label %37
37: ; preds = %82, %36
%38 = load i32, i32* %7
%39 = icmp sgt i32 %38, 0
br i1 %39, label %40, label %85
40: ; preds = %37
%41 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%42 = load i32, i32* %41
store i32 %42, i32* %4
store i32 0, i32* %6
store i32 1, i32* %3
br label %43
43: ; preds = %61, %40
%44 = load i32, i32* %3
%45 = load i32, i32* %7
%46 = icmp slt i32 %44, %45
br i1 %46, label %47, label %64
47: ; preds = %43
%48 = load i32, i32* %3
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %49
%51 = load i32, i32* %50
%52 = load i32, i32* %4
%53 = icmp sgt i32 %51, %52
br i1 %53, label %54, label %60
54: ; preds = %47
%55 = load i32, i32* %3
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %56
%58 = load i32, i32* %57
store i32 %58, i32* %4
%59 = load i32, i32* %3
store i32 %59, i32* %6
br label %60
60: ; preds = %54, %47
br label %61
61: ; preds = %60
%62 = load i32, i32* %3
%63 = add nsw i32 %62, 1
store i32 %63, i32* %3
br label %43
64: ; preds = %43
%65 = load i32, i32* %7
%66 = sub nsw i32 %65, 1
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %67
%69 = load i32, i32* %68
store i32 %69, i32* %5
%70 = load i32, i32* %6
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %71
%73 = load i32, i32* %72
%74 = load i32, i32* %7
%75 = sub nsw i32 %74, 1
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %76
store i32 %73, i32* %77
%78 = load i32, i32* %5
%79 = load i32, i32* %6
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %80
store i32 %78, i32* %81
br label %82
82: ; preds = %64
%83 = load i32, i32* %7
%84 = add nsw i32 %83, -1
store i32 %84, i32* %7
br label %37
85: ; preds = %37
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %87
87: ; preds = %97, %85
%88 = load i32, i32* %3
%89 = icmp slt i32 %88, 10
br i1 %89, label %90, label %100
90: ; preds = %87
%91 = load i32, i32* %3
%92 = load i32, i32* %3
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %93
%95 = load i32, i32* %94
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %91, i32 %95)
br label %97
97: ; preds = %90
%98 = load i32, i32* %3
%99 = add nsw i32 %98, 1
store i32 %99, i32* %3
br label %87
100: ; preds = %87
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"array[%d]=%d\0A\00"
@str = [12 x i8] c"xuanzepaixu\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = tail call i32 @time(i32 0)
%3 = tail call i32 @srand(i32 %2)
%4 = bitcast [10 x i32]* %1 to i8*
%5 = tail call i32 (...) @random()
%6 = srem i32 %5, 1000
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32 %6, i32* %7
%8 = tail call i32 (...) @random()
%9 = srem i32 %8, 1000
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 1
store i32 %9, i32* %10
%11 = tail call i32 (...) @random()
%12 = srem i32 %11, 1000
%13 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
store i32 %12, i32* %13
%14 = tail call i32 (...) @random()
%15 = srem i32 %14, 1000
%16 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 3
store i32 %15, i32* %16
%17 = tail call i32 (...) @random()
%18 = srem i32 %17, 1000
%19 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 4
store i32 %18, i32* %19
%20 = tail call i32 (...) @random()
%21 = srem i32 %20, 1000
%22 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 5
store i32 %21, i32* %22
%23 = tail call i32 (...) @random()
%24 = srem i32 %23, 1000
%25 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 6
store i32 %24, i32* %25
%26 = tail call i32 (...) @random()
%27 = srem i32 %26, 1000
%28 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 7
store i32 %27, i32* %28
%29 = tail call i32 (...) @random()
%30 = srem i32 %29, 1000
%31 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 8
store i32 %30, i32* %31
%32 = tail call i32 (...) @random()
%33 = srem i32 %32, 1000
%34 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 9
store i32 %33, i32* %34
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 0, i32 %6)
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 1, i32 %9)
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 2, i32 %12)
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 3, i32 %15)
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 4, i32 %18)
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 5, i32 %21)
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 6, i32 %24)
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 7, i32 %27)
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 8, i32 %30)
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9, i32 %33)
br label %45
45: ; preds = %0, %75
%46 = phi i1 [ true, %0 ], [ %77, %75 ]
%47 = phi i64 [ 10, %0 ], [ %70, %75 ]
%48 = phi i32 [ %6, %0 ], [ %76, %75 ]
br label %54
49: ; preds = %75
%50 = add nsw i64 %47, -2
%51 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %50
%52 = load i32, i32* %51
%53 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32 %76, i32* %51
store i32 %52, i32* %53
br label %78
54: ; preds = %45, %54
%55 = phi i64 [ %64, %54 ], [ 1, %45 ]
%56 = phi i32 [ %63, %54 ], [ 0, %45 ]
%57 = phi i32 [ %61, %54 ], [ %48, %45 ]
%58 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %55
%59 = load i32, i32* %58
%60 = icmp sgt i32 %59, %57
%61 = select i1 %60, i32 %59, i32 %57
%62 = trunc i64 %55 to i32
%63 = select i1 %60, i32 %62, i32 %56
%64 = add nuw nsw i64 %55, 1
%65 = icmp eq i64 %64, %47
br i1 %65, label %66, label %54
66: ; preds = %54
%67 = sext i32 %63 to i64
%68 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %67
%69 = load i32, i32* %68
%70 = add nsw i64 %47, -1
%71 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %70
%72 = load i32, i32* %71
%73 = sext i32 %63 to i64
%74 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %73
store i32 %69, i32* %71
store i32 %72, i32* %74
br i1 %46, label %75, label %78
75: ; preds = %66
%76 = load i32, i32* %7
%77 = icmp ugt i64 %70, 1
br i1 %77, label %45, label %49
78: ; preds = %66, %49
%79 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%80 = load i32, i32* %7
%81 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 0, i32 %80)
%82 = load i32, i32* %10
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 1, i32 %82)
%84 = load i32, i32* %13
%85 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 2, i32 %84)
%86 = load i32, i32* %16
%87 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 3, i32 %86)
%88 = load i32, i32* %19
%89 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 4, i32 %88)
%90 = load i32, i32* %22
%91 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 5, i32 %90)
%92 = load i32, i32* %25
%93 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 6, i32 %92)
%94 = load i32, i32* %28
%95 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 7, i32 %94)
%96 = load i32, i32* %31
%97 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 8, i32 %96)
%98 = load i32, i32* %34
%99 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9, i32 %98)
ret i32 0
}