#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);
int /*<<< orphan*/ scanf(char *, int /*<<< orphan*/);
void main() {
  int a[9];
  int *p = a;
  int i, temp;
  for (i = 0; i < 9; i++) {
    printf("Enter the %d integer:", i);
    scanf("%d", p++);
  }
  p = a;
  for (i = 3; i < 9; i++) {
    temp = *(p + i);
    *(p + i) = a[(i + 3) % 9];
    a[(i + 3) % 9] = temp;
  }
  for (i = 0; i < 9; i++)
    printf("%4d ", *p++);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x9,-0x3c(%rbp)
jge    117b <main+0x5b>
mov    -0x3c(%rbp),%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x38(%rbp)
mov    %eax,%esi
lea    0xeae(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1137 <main+0x17>
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
movl   $0x3,-0x3c(%rbp)
cmpl   $0x9,-0x3c(%rbp)
jge    11e8 <main+0xc8>
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x40(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x3,%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
mov    -0x30(%rbp,%rax,4),%edx
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x40(%rbp),%ecx
mov    -0x3c(%rbp),%eax
add    $0x3,%eax
mov    $0x9,%esi
cltd
idiv   %esi
movslq %edx,%rax
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    118a <main+0x6a>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x9,-0x3c(%rbp)
jge    1224 <main+0x104>
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x38(%rbp)
mov    (%rax),%esi
lea    0xe08(%rip),%rdi
call   1030 <printf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11ef <main+0xcf>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xece(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0x4(%rsp),%r15
mov    %rsp,%rsi
lea    0xecb(%rip),%rbx
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0x8(%rsp),%r12
mov    %rbx,%rdi
mov    %r15d,%esi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0xc(%rsp),%r15
mov    %rbx,%rdi
mov    %r12d,%esi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
lea    0x10(%rsp),%r12
mov    %rbx,%rdi
mov    %r15d,%esi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0x14(%rsp),%r15
mov    %rbx,%rdi
mov    %r12d,%esi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
lea    0x18(%rsp),%r12
mov    %rbx,%rdi
mov    %r15d,%esi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
lea    0x1c(%rsp),%r15
mov    %rbx,%rdi
mov    %r12d,%esi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
lea    0x20(%rsp),%r12
mov    %rbx,%rdi
mov    %r15d,%esi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
call   1040 <scanf@plt>
movdqu 0xc(%rsp),%xmm0
movsd  0x1c(%rsp),%xmm1
movsd  (%rsp),%xmm2
movlhps %xmm2,%xmm1
movaps %xmm1,0x10(%rsp)
mov    0x8(%rsp),%eax
mov    %eax,0x20(%rsp)
movdqa %xmm0,(%rsp)
movd   %xmm0,%esi
lea    0xdb2(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x10(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x14(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x18(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x1c(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x20(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Enter the %d integer:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"%4d \00"
define void @main() {
%1 = alloca [9 x i32]
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 0
store i32* %5, i32** %2
store i32 0, i32* %3
br label %6
6: ; preds = %16, %0
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 9
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i32 1
store i32* %13, i32** %2
%14 = ptrtoint i32* %12 to i32
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %9
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %6
19: ; preds = %6
%20 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 0
store i32* %20, i32** %2
store i32 3, i32* %3
br label %21
21: ; preds = %46, %19
%22 = load i32, i32* %3
%23 = icmp slt i32 %22, 9
br i1 %23, label %24, label %49
24: ; preds = %21
%25 = load i32*, i32** %2
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i32, i32* %25, i64 %27
%29 = load i32, i32* %28
store i32 %29, i32* %4
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 3
%32 = srem i32 %31, 9
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = load i32*, i32** %2
%37 = load i32, i32* %3
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i32, i32* %36, i64 %38
store i32 %35, i32* %39
%40 = load i32, i32* %4
%41 = load i32, i32* %3
%42 = add nsw i32 %41, 3
%43 = srem i32 %42, 9
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 %44
store i32 %40, i32* %45
br label %46
46: ; preds = %24
%47 = load i32, i32* %3
%48 = add nsw i32 %47, 1
store i32 %48, i32* %3
br label %21
49: ; preds = %21
store i32 0, i32* %3
br label %50
50: ; preds = %58, %49
%51 = load i32, i32* %3
%52 = icmp slt i32 %51, 9
br i1 %52, label %53, label %61
53: ; preds = %50
%54 = load i32*, i32** %2
%55 = getelementptr inbounds i32, i32* %54, i32 1
store i32* %55, i32** %2
%56 = load i32, i32* %54
%57 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %56)
br label %58
58: ; preds = %53
%59 = load i32, i32* %3
%60 = add nsw i32 %59, 1
store i32 %60, i32* %3
br label %50
61: ; preds = %50
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Enter the %d integer:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"%4d \00"
define void @main() {
%1 = alloca [9 x i32]
%2 = bitcast [9 x i32]* %1 to i8*
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 0)
%4 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 1
%5 = ptrtoint [9 x i32]* %1 to i64
%6 = trunc i64 %5 to i32
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1)
%9 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 2
%10 = ptrtoint i32* %4 to i64
%11 = trunc i64 %10 to i32
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 2)
%14 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 3
%15 = ptrtoint i32* %9 to i64
%16 = trunc i64 %15 to i32
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 3)
%19 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 4
%20 = ptrtoint i32* %14 to i64
%21 = trunc i64 %20 to i32
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %21)
%23 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 4)
%24 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 5
%25 = ptrtoint i32* %19 to i64
%26 = trunc i64 %25 to i32
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %26)
%28 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 5)
%29 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 6
%30 = ptrtoint i32* %24 to i64
%31 = trunc i64 %30 to i32
%32 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %31)
%33 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 6)
%34 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 7
%35 = ptrtoint i32* %29 to i64
%36 = trunc i64 %35 to i32
%37 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %36)
%38 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 7)
%39 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 8
%40 = ptrtoint i32* %34 to i64
%41 = trunc i64 %40 to i32
%42 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %41)
%43 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 8)
%44 = ptrtoint i32* %39 to i64
%45 = trunc i64 %44 to i32
%46 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %45)
%47 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 3
%48 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 4
%49 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 7
%50 = bitcast i32* %47 to <4 x i32>*
%51 = load <4 x i32>, <4 x i32>* %50
%52 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 8
%53 = bitcast i32* %49 to <2 x i32>*
%54 = load <2 x i32>, <2 x i32>* %53
%55 = bitcast [9 x i32]* %1 to <2 x i32>*
%56 = load <2 x i32>, <2 x i32>* %55
%57 = shufflevector <2 x i32> %54, <2 x i32> %56, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
%58 = bitcast i32* %48 to <4 x i32>*
store <4 x i32> %57, <4 x i32>* %58
%59 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 2
%60 = load i32, i32* %59
store i32 %60, i32* %52
%61 = bitcast [9 x i32]* %1 to <4 x i32>*
store <4 x i32> %51, <4 x i32>* %61
%62 = extractelement <4 x i32> %51, i64 0
%63 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %62)
%64 = load i32, i32* %4
%65 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %64)
%66 = load i32, i32* %9
%67 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %66)
%68 = load i32, i32* %14
%69 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %68)
%70 = load i32, i32* %19
%71 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %70)
%72 = load i32, i32* %24
%73 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %72)
%74 = load i32, i32* %29
%75 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %74)
%76 = load i32, i32* %34
%77 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %76)
%78 = load i32, i32* %39
%79 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %78)
ret void
}