#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 get_index(int, int, int);
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
void radix_sort(int array[], int len, int dec, int order) {
  int i, j;
  int index;
  int tmp[len];
  int num[10];
  memset(num, 0, 10 * sizeof(int));
  memset(tmp, 0, len * sizeof(int));
  if (dec < order)
    return;
  for (i = 0; i < len; i++) {
    index = get_index(array[i], dec, order);
    num[index]++;
  }
  for (i = 1; i < 10; i++)
    num[i] += num[i - 1];
  for (i = len - 1; i >= 0; i--) {
    index = get_index(array[i], dec, order);
    j = --num[index];
    tmp[j] = array[i];
  }
  for (i = 0; i < len; i++)
    array[i] = tmp[i];
  printf("the %d time\n", order);
  for (i = 0; i < 30; i++)
    printf("%d  ", array[i]);
  printf("\n");
  radix_sort(array, len, dec, order + 1);
  return;
}


x86 assembly (clang, -O0):
<radix_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x70(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1060 <memset@plt>
mov    -0x70(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1060 <memset@plt>
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11b9 <radix_sort+0x79>
movl   $0x1,-0x64(%rbp)
jmp    1347 <radix_sort+0x207>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1202 <radix_sort+0xc2>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <get_index@plt>
mov    %eax,-0x20(%rbp)
movslq -0x20(%rbp),%rax
mov    -0x60(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x60(%rbp,%rax,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11c0 <radix_sort+0x80>
movl   $0x1,-0x18(%rbp)
cmpl   $0xa,-0x18(%rbp)
jge    1239 <radix_sort+0xf9>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x60(%rbp,%rax,4),%ecx
movslq -0x18(%rbp),%rax
add    -0x60(%rbp,%rax,4),%ecx
mov    %ecx,-0x60(%rbp,%rax,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1209 <radix_sort+0xc9>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     129d <radix_sort+0x15d>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <get_index@plt>
mov    %eax,%ecx
mov    -0x70(%rbp),%rax
mov    %ecx,-0x20(%rbp)
movslq -0x20(%rbp),%rdx
mov    -0x60(%rbp,%rdx,4),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x60(%rbp,%rdx,4)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rcx
movslq -0x18(%rbp),%rdx
mov    (%rcx,%rdx,4),%edx
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    1242 <radix_sort+0x102>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12d4 <radix_sort+0x194>
mov    -0x70(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12a4 <radix_sort+0x164>
mov    -0x14(%rbp),%esi
lea    0xd22(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x1e,-0x18(%rbp)
jge    131d <radix_sort+0x1dd>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd05(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12ec <radix_sort+0x1ac>
lea    0xce7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
call   1050 <radix_sort@plt>
movl   $0x1,-0x64(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radix_sort>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %ecx,-0x64(%rbp)
mov    %edx,%r13d
mov    %esi,%ebx
mov    %rdi,%r12
mov    %esi,%r15d
mov    %rsp,%r14
lea    0xf(,%r15,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r14
mov    %r14,%rsp
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1070 <memset@plt>
lea    0x0(,%rbx,4),%edx
mov    %r14,-0x80(%rbp)
mov    %r14,%rdi
mov    -0x64(%rbp),%r14d
xor    %esi,%esi
call   1070 <memset@plt>
cmp    %r14d,%r13d
jl     14aa <radix_sort+0x34a>
mov    %rbx,-0x78(%rbp)
test   %ebx,%ebx
jle    11ef <radix_sort+0x8f>
xor    %ebx,%ebx
mov    (%r12,%rbx,4),%edi
mov    %r13d,%esi
mov    %r14d,%edx
call   1040 <get_index@plt>
cltq
addl   $0x1,-0x60(%rbp,%rax,4)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    11d0 <radix_sort+0x70>
mov    %r15,-0x70(%rbp)
mov    %r13d,-0x2c(%rbp)
mov    -0x5c(%rbp),%r8d
add    -0x60(%rbp),%r8d
mov    -0x58(%rbp),%r9d
add    %r8d,%r9d
mov    -0x54(%rbp),%edx
add    %r9d,%edx
mov    -0x50(%rbp),%esi
add    %edx,%esi
mov    -0x4c(%rbp),%edi
add    %esi,%edi
mov    -0x48(%rbp),%ebx
add    %edi,%ebx
mov    -0x44(%rbp),%eax
add    %ebx,%eax
mov    -0x40(%rbp),%ecx
add    %eax,%ecx
add    %ecx,-0x3c(%rbp)
mov    %r8d,-0x5c(%rbp)
mov    %r9d,-0x58(%rbp)
mov    %edx,-0x54(%rbp)
mov    %esi,-0x50(%rbp)
mov    %edi,-0x4c(%rbp)
mov    %ebx,-0x48(%rbp)
mov    %eax,-0x44(%rbp)
mov    %ecx,-0x40(%rbp)
mov    -0x78(%rbp),%rbx
test   %ebx,%ebx
jle    12b3 <radix_sort+0x153>
mov    %r14d,%r13d
mov    -0x70(%rbp),%rax
lea    0x1(%rax),%r14
mov    -0x2c(%rbp),%r15d
nopl   0x0(%rax)
lea    -0x2(%r14),%ebx
mov    (%r12,%rbx,4),%edi
mov    %r15d,%esi
mov    %r13d,%edx
call   1040 <get_index@plt>
mov    -0x80(%rbp),%rsi
cltq
movslq -0x60(%rbp,%rax,4),%rcx
lea    -0x1(%rcx),%rdx
mov    %edx,-0x60(%rbp,%rax,4)
mov    (%r12,%rbx,4),%eax
mov    %eax,-0x4(%rsi,%rcx,4)
add    $0xffffffffffffffff,%r14
cmp    $0x1,%r14
jg     1260 <radix_sort+0x100>
mov    -0x78(%rbp),%rbx
test   %ebx,%ebx
mov    %r13d,%r14d
jle    12b3 <radix_sort+0x153>
mov    -0x70(%rbp),%rdx
shl    $0x2,%rdx
mov    %r12,%rdi
call   1080 <memcpy@plt>
lea    0xd46(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r12),%esi
lea    0xd3e(%rip),%r13
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x1c(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x20(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x24(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x28(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2c(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x30(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x34(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x38(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x3c(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x40(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x44(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x48(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4c(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x50(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x54(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x58(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x5c(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x60(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x64(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x68(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x6c(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x70(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x74(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r14d
mov    %r12,%rdi
mov    %ebx,%esi
mov    -0x2c(%rbp),%edx
mov    %r14d,%ecx
call   1060 <radix_sort@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"the %d time\0A\00"
@.str.1 = [5 x i8] c"%d \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @radix_sort(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i64
%14 = alloca [10 x i32]
%15 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%16 = load i32, i32* %6
%17 = zext i32 %16 to i64
%18 = call i8* @llvm.stacksave()
store i8* %18, i8** %12
%19 = alloca i32, i64 %17
store i64 %17, i64* %13
%20 = getelementptr inbounds [10 x i32], [10 x i32]* %14, i64 0, i64 0
%21 = call i32 @memset(i32* %20, i32 0, i32 40)
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = mul i64 %23, 4
%25 = trunc i64 %24 to i32
%26 = call i32 @memset(i32* %19, i32 0, i32 %25)
%27 = load i32, i32* %7
%28 = load i32, i32* %8
%29 = icmp slt i32 %27, %28
br i1 %29, label %30, label %31
30: ; preds = %4
store i32 1, i32* %15
br label %142
31: ; preds = %4
store i32 0, i32* %9
br label %32
32: ; preds = %50, %31
%33 = load i32, i32* %9
%34 = load i32, i32* %6
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %53
36: ; preds = %32
%37 = load i32*, i32** %5
%38 = load i32, i32* %9
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i32, i32* %37, i64 %39
%41 = load i32, i32* %40
%42 = load i32, i32* %7
%43 = load i32, i32* %8
%44 = call i32 @get_index(i32 %41, i32 %42, i32 %43)
store i32 %44, i32* %11
%45 = load i32, i32* %11
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [10 x i32], [10 x i32]* %14, i64 0, i64 %46
%48 = load i32, i32* %47
%49 = add nsw i32 %48, 1
store i32 %49, i32* %47
br label %50
50: ; preds = %36
%51 = load i32, i32* %9
%52 = add nsw i32 %51, 1
store i32 %52, i32* %9
br label %32
53: ; preds = %32
store i32 1, i32* %9
br label %54
54: ; preds = %68, %53
%55 = load i32, i32* %9
%56 = icmp slt i32 %55, 10
br i1 %56, label %57, label %71
57: ; preds = %54
%58 = load i32, i32* %9
%59 = sub nsw i32 %58, 1
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [10 x i32], [10 x i32]* %14, i64 0, i64 %60
%62 = load i32, i32* %61
%63 = load i32, i32* %9
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [10 x i32], [10 x i32]* %14, i64 0, i64 %64
%66 = load i32, i32* %65
%67 = add nsw i32 %66, %62
store i32 %67, i32* %65
br label %68
68: ; preds = %57
%69 = load i32, i32* %9
%70 = add nsw i32 %69, 1
store i32 %70, i32* %9
br label %54
71: ; preds = %54
%72 = load i32, i32* %6
%73 = sub nsw i32 %72, 1
store i32 %73, i32* %9
br label %74
74: ; preds = %99, %71
%75 = load i32, i32* %9
%76 = icmp sge i32 %75, 0
br i1 %76, label %77, label %102
77: ; preds = %74
%78 = load i32*, i32** %5
%79 = load i32, i32* %9
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i32, i32* %78, i64 %80
%82 = load i32, i32* %81
%83 = load i32, i32* %7
%84 = load i32, i32* %8
%85 = call i32 @get_index(i32 %82, i32 %83, i32 %84)
store i32 %85, i32* %11
%86 = load i32, i32* %11
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [10 x i32], [10 x i32]* %14, i64 0, i64 %87
%89 = load i32, i32* %88
%90 = add nsw i32 %89, -1
store i32 %90, i32* %88
store i32 %90, i32* %10
%91 = load i32*, i32** %5
%92 = load i32, i32* %9
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds i32, i32* %91, i64 %93
%95 = load i32, i32* %94
%96 = load i32, i32* %10
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i32, i32* %19, i64 %97
store i32 %95, i32* %98
br label %99
99: ; preds = %77
%100 = load i32, i32* %9
%101 = add nsw i32 %100, -1
store i32 %101, i32* %9
br label %74
102: ; preds = %74
store i32 0, i32* %9
br label %103
103: ; preds = %116, %102
%104 = load i32, i32* %9
%105 = load i32, i32* %6
%106 = icmp slt i32 %104, %105
br i1 %106, label %107, label %119
107: ; preds = %103
%108 = load i32, i32* %9
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds i32, i32* %19, i64 %109
%111 = load i32, i32* %110
%112 = load i32*, i32** %5
%113 = load i32, i32* %9
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds i32, i32* %112, i64 %114
store i32 %111, i32* %115
br label %116
116: ; preds = %107
%117 = load i32, i32* %9
%118 = add nsw i32 %117, 1
store i32 %118, i32* %9
br label %103
119: ; preds = %103
%120 = load i32, i32* %8
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %120)
store i32 0, i32* %9
br label %122
122: ; preds = %132, %119
%123 = load i32, i32* %9
%124 = icmp slt i32 %123, 30
br i1 %124, label %125, label %135
125: ; preds = %122
%126 = load i32*, i32** %5
%127 = load i32, i32* %9
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i32, i32* %126, i64 %128
%130 = load i32, i32* %129
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %130)
br label %132
132: ; preds = %125
%133 = load i32, i32* %9
%134 = add nsw i32 %133, 1
store i32 %134, i32* %9
br label %122
135: ; preds = %122
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%137 = load i32*, i32** %5
%138 = load i32, i32* %6
%139 = load i32, i32* %7
%140 = load i32, i32* %8
%141 = add nsw i32 %140, 1
store i32 1, i32* %15
br label %142
142: ; preds = %135, %30
%143 = load i8*, i8** %12
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"the %d time\0A\00"
@.str.1 = [5 x i8] c"%d \00"
define void @radix_sort(i32* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = bitcast i32* %0 to i8*
%6 = alloca [10 x i32]
%7 = zext i32 %1 to i64
%8 = alloca i32, i64 %7
%9 = bitcast i32* %8 to i8*
%10 = bitcast [10 x i32]* %6 to i8*
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%12 = call i32 @memset(i32* %11, i32 0, i32 40)
%13 = shl i32 %1, 2
%14 = call i32 @memset(i32* %8, i32 0, i32 %13)
%15 = icmp slt i32 %2, %3
br i1 %15, label %169, label %16
16: ; preds = %4
%17 = icmp sgt i32 %1, 0
br i1 %17, label %47, label %18
18: ; preds = %47, %16
%19 = load i32, i32* %11
%20 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 1
%21 = load i32, i32* %20
%22 = add nsw i32 %21, %19
store i32 %22, i32* %20
%23 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 2
%24 = load i32, i32* %23
%25 = add nsw i32 %24, %22
store i32 %25, i32* %23
%26 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 3
%27 = load i32, i32* %26
%28 = add nsw i32 %27, %25
store i32 %28, i32* %26
%29 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 4
%30 = load i32, i32* %29
%31 = add nsw i32 %30, %28
store i32 %31, i32* %29
%32 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 5
%33 = load i32, i32* %32
%34 = add nsw i32 %33, %31
store i32 %34, i32* %32
%35 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 6
%36 = load i32, i32* %35
%37 = add nsw i32 %36, %34
store i32 %37, i32* %35
%38 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 7
%39 = load i32, i32* %38
%40 = add nsw i32 %39, %37
store i32 %40, i32* %38
%41 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 8
%42 = load i32, i32* %41
%43 = add nsw i32 %42, %40
store i32 %43, i32* %41
%44 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 9
%45 = load i32, i32* %44
%46 = add nsw i32 %45, %43
store i32 %46, i32* %44
br i1 %17, label %61, label %76
47: ; preds = %16, %47
%48 = phi i64 [ %56, %47 ], [ 0, %16 ]
%49 = getelementptr inbounds i32, i32* %0, i64 %48
%50 = load i32, i32* %49
%51 = call i32 @get_index(i32 %50, i32 %2, i32 %3)
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 %52
%54 = load i32, i32* %53
%55 = add nsw i32 %54, 1
store i32 %55, i32* %53
%56 = add nuw nsw i64 %48, 1
%57 = icmp eq i64 %56, %7
br i1 %57, label %18, label %47
58: ; preds = %61
br i1 %17, label %59, label %76
59: ; preds = %58
%60 = shl nuw nsw i64 %7, 2
br label %76
61: ; preds = %18, %61
%62 = phi i64 [ %63, %61 ], [ %7, %18 ]
%63 = add nsw i64 %62, -1
%64 = and i64 %63, 4294967295
%65 = getelementptr inbounds i32, i32* %0, i64 %64
%66 = load i32, i32* %65
%67 = call i32 @get_index(i32 %66, i32 %2, i32 %3)
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 %68
%70 = load i32, i32* %69
%71 = add nsw i32 %70, -1
store i32 %71, i32* %69
%72 = load i32, i32* %65
%73 = sext i32 %71 to i64
%74 = getelementptr inbounds i32, i32* %8, i64 %73
store i32 %72, i32* %74
%75 = icmp sgt i64 %62, 1
br i1 %75, label %61, label %58
76: ; preds = %18, %59, %58
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
%78 = load i32, i32* %0
%79 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %78)
%80 = getelementptr inbounds i32, i32* %0, i64 1
%81 = load i32, i32* %80
%82 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %81)
%83 = getelementptr inbounds i32, i32* %0, i64 2
%84 = load i32, i32* %83
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %84)
%86 = getelementptr inbounds i32, i32* %0, i64 3
%87 = load i32, i32* %86
%88 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %87)
%89 = getelementptr inbounds i32, i32* %0, i64 4
%90 = load i32, i32* %89
%91 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %90)
%92 = getelementptr inbounds i32, i32* %0, i64 5
%93 = load i32, i32* %92
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %93)
%95 = getelementptr inbounds i32, i32* %0, i64 6
%96 = load i32, i32* %95
%97 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %96)
%98 = getelementptr inbounds i32, i32* %0, i64 7
%99 = load i32, i32* %98
%100 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %99)
%101 = getelementptr inbounds i32, i32* %0, i64 8
%102 = load i32, i32* %101
%103 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %102)
%104 = getelementptr inbounds i32, i32* %0, i64 9
%105 = load i32, i32* %104
%106 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %105)
%107 = getelementptr inbounds i32, i32* %0, i64 10
%108 = load i32, i32* %107
%109 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %108)
%110 = getelementptr inbounds i32, i32* %0, i64 11
%111 = load i32, i32* %110
%112 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %111)
%113 = getelementptr inbounds i32, i32* %0, i64 12
%114 = load i32, i32* %113
%115 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %114)
%116 = getelementptr inbounds i32, i32* %0, i64 13
%117 = load i32, i32* %116
%118 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %117)
%119 = getelementptr inbounds i32, i32* %0, i64 14
%120 = load i32, i32* %119
%121 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %120)
%122 = getelementptr inbounds i32, i32* %0, i64 15
%123 = load i32, i32* %122
%124 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %123)
%125 = getelementptr inbounds i32, i32* %0, i64 16
%126 = load i32, i32* %125
%127 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %126)
%128 = getelementptr inbounds i32, i32* %0, i64 17
%129 = load i32, i32* %128
%130 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %129)
%131 = getelementptr inbounds i32, i32* %0, i64 18
%132 = load i32, i32* %131
%133 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %132)
%134 = getelementptr inbounds i32, i32* %0, i64 19
%135 = load i32, i32* %134
%136 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %135)
%137 = getelementptr inbounds i32, i32* %0, i64 20
%138 = load i32, i32* %137
%139 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %138)
%140 = getelementptr inbounds i32, i32* %0, i64 21
%141 = load i32, i32* %140
%142 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %141)
%143 = getelementptr inbounds i32, i32* %0, i64 22
%144 = load i32, i32* %143
%145 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %144)
%146 = getelementptr inbounds i32, i32* %0, i64 23
%147 = load i32, i32* %146
%148 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %147)
%149 = getelementptr inbounds i32, i32* %0, i64 24
%150 = load i32, i32* %149
%151 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %150)
%152 = getelementptr inbounds i32, i32* %0, i64 25
%153 = load i32, i32* %152
%154 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %153)
%155 = getelementptr inbounds i32, i32* %0, i64 26
%156 = load i32, i32* %155
%157 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %156)
%158 = getelementptr inbounds i32, i32* %0, i64 27
%159 = load i32, i32* %158
%160 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %159)
%161 = getelementptr inbounds i32, i32* %0, i64 28
%162 = load i32, i32* %161
%163 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %162)
%164 = getelementptr inbounds i32, i32* %0, i64 29
%165 = load i32, i32* %164
%166 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %165)
%167 = call i32 @putchar(i32 10)
%168 = add nsw i32 %3, 1
br label %169
169: ; preds = %4, %76
ret void
}