#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*/ f(int, int *);
int main() {
  int i, n = 100;
  int a[n];
  for (i = 0; i < n; ++i)
    a[i] = 10;
  f(n, a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117d <main+0x6d>
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
movl   $0xa,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1154 <main+0x44>
mov    -0x28(%rbp),%rsi
mov    -0xc(%rbp),%edi
call   1030 <f@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x198,%rsp
movaps 0xee2(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x140(%rsp)
movaps %xmm0,0x150(%rsp)
movaps %xmm0,0x160(%rsp)
movaps %xmm0,0x170(%rsp)
movaps %xmm0,0x180(%rsp)
mov    %rsp,%rsi
mov    $0x64,%edi
call   1030 <f@plt>
xor    %eax,%eax
add    $0x198,%rsp
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100 x i32]
%2 = bitcast [100 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %2
%3 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 4
%4 = bitcast i32* %3 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %4
%5 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 8
%6 = bitcast i32* %5 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %6
%7 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 12
%8 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %8
%9 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 16
%10 = bitcast i32* %9 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %10
%11 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 20
%12 = bitcast i32* %11 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %12
%13 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 24
%14 = bitcast i32* %13 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %14
%15 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 28
%16 = bitcast i32* %15 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %16
%17 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 32
%18 = bitcast i32* %17 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %18
%19 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 36
%20 = bitcast i32* %19 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %20
%21 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 40
%22 = bitcast i32* %21 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %22
%23 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 44
%24 = bitcast i32* %23 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %24
%25 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 48
%26 = bitcast i32* %25 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %26
%27 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 52
%28 = bitcast i32* %27 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %28
%29 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 56
%30 = bitcast i32* %29 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %30
%31 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 60
%32 = bitcast i32* %31 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %32
%33 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 64
%34 = bitcast i32* %33 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %34
%35 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 68
%36 = bitcast i32* %35 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %36
%37 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 72
%38 = bitcast i32* %37 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %38
%39 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 76
%40 = bitcast i32* %39 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %40
%41 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 80
%42 = bitcast i32* %41 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %42
%43 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 84
%44 = bitcast i32* %43 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %44
%45 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 88
%46 = bitcast i32* %45 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %46
%47 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 92
%48 = bitcast i32* %47 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %48
%49 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 96
%50 = bitcast i32* %49 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %50
%51 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%52 = call i32 @f(i32 100, i32* %51)
ret i32 0
}