#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*/ Shift(int *, int);
int main() {
  int array[10], i;
  for (i = 0; i < 10; i++)
    array[i] = i + 1;
  for (i = 1; i <= 5; i++)
    Shift(array, 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0xa,-0x34(%rbp)
jge    114c <main+0x3c>
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq -0x34(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1126 <main+0x16>
movl   $0x1,-0x34(%rbp)
cmpl   $0x5,-0x34(%rbp)
jg     1179 <main+0x69>
lea    -0x30(%rbp),%rdi
mov    $0x2,%esi
call   1030 <Shift@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1153 <main+0x43>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
movaps 0xee4(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0xa00000009,%rax
mov    %rax,0x20(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <Shift@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <Shift@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <Shift@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <Shift@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <Shift@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %13, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %11
store i32 %9, i32* %12
br label %13
13: ; preds = %7
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
store i32 1, i32* %3
br label %17
17: ; preds = %23, %16
%18 = load i32, i32* %3
%19 = icmp sle i32 %18, 5
br i1 %19, label %20, label %26
20: ; preds = %17
%21 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%22 = call i32 @Shift(i32* %21, i32 2)
br label %23
23: ; preds = %20
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %17
26: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = bitcast [10 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, <4 x i32>* %4
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 4
%6 = bitcast i32* %5 to <4 x i32>*
store <4 x i32> <i32 5, i32 6, i32 7, i32 8>, <4 x i32>* %6
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 8
store i32 9, i32* %7
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 9
store i32 10, i32* %8
%9 = call i32 @Shift(i32* %3, i32 2)
%10 = call i32 @Shift(i32* %3, i32 2)
%11 = call i32 @Shift(i32* %3, i32 2)
%12 = call i32 @Shift(i32* %3, i32 2)
%13 = call i32 @Shift(i32* %3, i32 2)
ret i32 0
}