#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*/ __array_print(int *, int);
int /*<<< orphan*/ arr_lrotate(int *, int, int);
int main(void) {
  int arr[7] = {1, 2, 3, 4, 5, 6, 7};
  __array_print(arr, 7);
  arr_lrotate(arr, 7, 3);
  __array_print(arr, 7);
  int arr2[7] = {1, 2, 3, 4, 5, 6, 7};
  __array_print(arr2, 7);
  arr_lrotate(arr2, 7, 7);
  __array_print(arr2, 7);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec2(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x7,%esi
call   1040 <__array_print@plt>
lea    -0x20(%rbp),%rdi
mov    $0x7,%esi
mov    $0x3,%edx
call   1030 <arr_lrotate@plt>
lea    -0x20(%rbp),%rdi
mov    $0x7,%esi
call   1040 <__array_print@plt>
mov    0xe91(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe8e(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe8b(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe89(%rip),%eax
mov    %eax,-0x28(%rbp)
lea    -0x40(%rbp),%rdi
mov    $0x7,%esi
call   1040 <__array_print@plt>
lea    -0x40(%rbp),%rdi
mov    $0x7,%edx
mov    %edx,%esi
call   1030 <arr_lrotate@plt>
lea    -0x40(%rbp),%rdi
mov    $0x7,%esi
call   1040 <__array_print@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
movups 0xee0(%rip),%xmm0
movups %xmm0,0x2c(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x7,%esi
call   1040 <__array_print@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
mov    $0x3,%edx
call   1030 <arr_lrotate@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1040 <__array_print@plt>
movups 0xe97(%rip),%xmm0
movups %xmm0,0xc(%rsp)
movaps 0xe7f(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x7,%esi
call   1040 <__array_print@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
mov    $0x7,%edx
call   1030 <arr_lrotate@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1040 <__array_print@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arr = [7 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7]
@__const.main.arr2 = [7 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7]
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i32]
%3 = alloca [7 x i32]
store i32 0, i32* %1
%4 = bitcast [7 x i32]* %2 to i8*
%5 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 0
%6 = call i32 @__array_print(i32* %5, i32 7)
%7 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 0
%8 = call i32 @arr_lrotate(i32* %7, i32 7, i32 3)
%9 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 0
%10 = call i32 @__array_print(i32* %9, i32 7)
%11 = bitcast [7 x i32]* %3 to i8*
%12 = getelementptr inbounds [7 x i32], [7 x i32]* %3, i64 0, i64 0
%13 = call i32 @__array_print(i32* %12, i32 7)
%14 = getelementptr inbounds [7 x i32], [7 x i32]* %3, i64 0, i64 0
%15 = call i32 @arr_lrotate(i32* %14, i32 7, i32 7)
%16 = getelementptr inbounds [7 x i32], [7 x i32]* %3, i64 0, i64 0
%17 = call i32 @__array_print(i32* %16, i32 7)
ret i32 0
}

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