#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*/ foo(int *, int *, int *, int /*<<< orphan*/, int);
int main() {
  int a[32], i;
  for (i = 0; i < 32; i++)
    a[i] = i;
  foo(a + 1, a + 9, a + 10, 0, 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x94(%rbp)
cmpl   $0x20,-0x94(%rbp)
jge    1161 <main+0x51>
mov    -0x94(%rbp),%ecx
movslq -0x94(%rbp),%rax
mov    %ecx,-0x90(%rbp,%rax,4)
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    112c <main+0x1c>
lea    -0x90(%rbp),%rdi
add    $0x4,%rdi
lea    -0x90(%rbp),%rsi
add    $0x24,%rsi
lea    -0x90(%rbp),%rdx
add    $0x28,%rdx
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <foo@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x88,%rsp
lea    0x4(%rsp),%rdi
movaps 0xedd(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x24(%rsp),%rsi
lea    0x28(%rsp),%rdx
movaps 0xedc(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xee0(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee4(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xee8(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xeec(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xef0(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x88,%rsp
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [32 x i32]
%2 = bitcast [32 x i32]* %1 to i8*
%3 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 1
%4 = bitcast [32 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, <4 x i32>* %4
%5 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 4
%6 = bitcast i32* %5 to <4 x i32>*
store <4 x i32> <i32 4, i32 5, i32 6, i32 7>, <4 x i32>* %6
%7 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 8
%8 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 9
%9 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 10
%10 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> <i32 8, i32 9, i32 10, i32 11>, <4 x i32>* %10
%11 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 12
%12 = bitcast i32* %11 to <4 x i32>*
store <4 x i32> <i32 12, i32 13, i32 14, i32 15>, <4 x i32>* %12
%13 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 16
%14 = bitcast i32* %13 to <4 x i32>*
store <4 x i32> <i32 16, i32 17, i32 18, i32 19>, <4 x i32>* %14
%15 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 20
%16 = bitcast i32* %15 to <4 x i32>*
store <4 x i32> <i32 20, i32 21, i32 22, i32 23>, <4 x i32>* %16
%17 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 24
%18 = bitcast i32* %17 to <4 x i32>*
store <4 x i32> <i32 24, i32 25, i32 26, i32 27>, <4 x i32>* %18
%19 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 28
%20 = bitcast i32* %19 to <4 x i32>*
store <4 x i32> <i32 28, i32 29, i32 30, i32 31>, <4 x i32>* %20
%21 = call i32 @foo(i32* %3, i32* %8, i32* %9, i32 0, i32 1)
ret i32 0
}