#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 */
scalar_t__ malloc(int);
int main() {
  int ar[10];
  int *restrict restar = (int *)malloc(10 * sizeof(int));
  int *par = ar;
  for (int n = 0; n < 10; n++) {
    par[n] += 5;
    restar[n] += 5;
    ar[n] *= 2;
    par[n] += 3;
    restar[n] += 3;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x28,%edi
call   1030 <malloc@plt>
mov    %rax,-0x38(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0xa,-0x44(%rbp)
jge    11a7 <main+0x97>
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x5,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x5,%edx
mov    %edx,(%rax,%rcx,4)
movslq -0x44(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%ecx
shl    $0x1,%ecx
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x3,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x3,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    113c <main+0x2c>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x28,%edi
call   1030 <malloc@plt>
movdqa 0xedd(%rip),%xmm0
movdqu (%rax),%xmm1
movdqu 0x10(%rax),%xmm2
paddd  %xmm0,%xmm1
movdqu %xmm1,(%rax)
paddd  %xmm0,%xmm2
movdqu %xmm2,0x10(%rax)
addl   $0x8,0x20(%rax)
addl   $0x8,0x24(%rax)
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32 0, i32* %1
%6 = call i64 @malloc(i32 40)
%7 = inttoptr i64 %6 to i32*
store i32* %7, i32** %3
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
store i32* %8, i32** %4
store i32 0, i32* %5
br label %9
9: ; preds = %42, %0
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 10
br i1 %11, label %12, label %45
12: ; preds = %9
%13 = load i32*, i32** %4
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = add nsw i32 %17, 5
store i32 %18, i32* %16
%19 = load i32*, i32** %3
%20 = load i32, i32* %5
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %19, i64 %21
%23 = load i32, i32* %22
%24 = add nsw i32 %23, 5
store i32 %24, i32* %22
%25 = load i32, i32* %5
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %26
%28 = load i32, i32* %27
%29 = mul nsw i32 %28, 2
store i32 %29, i32* %27
%30 = load i32*, i32** %4
%31 = load i32, i32* %5
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i32, i32* %30, i64 %32
%34 = load i32, i32* %33
%35 = add nsw i32 %34, 3
store i32 %35, i32* %33
%36 = load i32*, i32** %3
%37 = load i32, i32* %5
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i32, i32* %36, i64 %38
%40 = load i32, i32* %39
%41 = add nsw i32 %40, 3
store i32 %41, i32* %39
br label %42
42: ; preds = %12
%43 = load i32, i32* %5
%44 = add nsw i32 %43, 1
store i32 %44, i32* %5
br label %9
45: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 40)
%2 = inttoptr i64 %1 to i32*
%3 = inttoptr i64 %1 to <4 x i32>*
%4 = load <4 x i32>, <4 x i32>* %3
%5 = add nsw <4 x i32> %4, <i32 8, i32 8, i32 8, i32 8>
%6 = inttoptr i64 %1 to <4 x i32>*
store <4 x i32> %5, <4 x i32>* %6
%7 = getelementptr inbounds i32, i32* %2, i64 4
%8 = bitcast i32* %7 to <4 x i32>*
%9 = load <4 x i32>, <4 x i32>* %8
%10 = add nsw <4 x i32> %9, <i32 8, i32 8, i32 8, i32 8>
%11 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> %10, <4 x i32>* %11
%12 = getelementptr inbounds i32, i32* %2, i64 8
%13 = load i32, i32* %12
%14 = add nsw i32 %13, 8
store i32 %14, i32* %12
%15 = getelementptr inbounds i32, i32* %2, i64 9
%16 = load i32, i32* %15
%17 = add nsw i32 %16, 8
store i32 %17, i32* %15
ret i32 0
}