#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*/ fun(int *, int *, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int i, a[10] = {1, 2, 3, 6, 9},
         b[5] = {
             3, 5, 6, 8, 9,
         };
  fun(a, b, 10);
  for (i = 0; i < 10; i++)
    printf("%d ", a[i]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1050 <memset@plt>
movl   $0x1,-0x40(%rbp)
movl   $0x2,-0x3c(%rbp)
movl   $0x3,-0x38(%rbp)
movl   $0x6,-0x34(%rbp)
movl   $0x9,-0x30(%rbp)
mov    0xe80(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe7d(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xe7b(%rip),%eax
mov    %eax,-0x50(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0xa,%edx
call   1030 <fun@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    11dd <main+0xad>
movslq -0x14(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%esi
lea    0xe4a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11b1 <main+0x81>
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x20(%rsp)
movaps 0xec3(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x9,0x10(%rsp)
mov    0xed1(%rip),%eax
mov    %eax,0x40(%rsp)
movaps 0xeb6(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
mov    %rsp,%rdi
lea    0x30(%rsp),%rsi
mov    $0xa,%edx
call   1030 <fun@plt>
mov    (%rsp),%esi
lea    0xea9(%rip),%rbx
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x14(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x18(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x1c(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x20(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x24(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.b = [5 x i32] [i32 3, i32 5, i32 6, i32 8, i32 9]
@.str = [4 x i8] c"%d \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [10 x i32]
%8 = alloca [5 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [10 x i32]* %7 to i8*
%10 = bitcast i8* %9 to [10 x i32]*
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %10, i32 0, i32 0
store i32 1, i32* %11
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %10, i32 0, i32 1
store i32 2, i32* %12
%13 = getelementptr inbounds [10 x i32], [10 x i32]* %10, i32 0, i32 2
store i32 3, i32* %13
%14 = getelementptr inbounds [10 x i32], [10 x i32]* %10, i32 0, i32 3
store i32 6, i32* %14
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %10, i32 0, i32 4
store i32 9, i32* %15
%16 = bitcast [5 x i32]* %8 to i8*
%17 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 0
%18 = getelementptr inbounds [5 x i32], [5 x i32]* %8, i64 0, i64 0
%19 = call i32 @fun(i32* %17, i32* %18, i32 10)
store i32 0, i32* %6
br label %20
20: ; preds = %29, %2
%21 = load i32, i32* %6
%22 = icmp slt i32 %21, 10
br i1 %22, label %23, label %32
23: ; preds = %20
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 %25
%27 = load i32, i32* %26
%28 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %27)
br label %29
29: ; preds = %23
%30 = load i32, i32* %6
%31 = add nsw i32 %30, 1
store i32 %31, i32* %6
br label %20
32: ; preds = %20
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
@__const.main.b = [5 x i32] [i32 3, i32 5, i32 6, i32 8, i32 9]
@.str = [4 x i8] c"%d \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i32]
%4 = alloca [5 x i32]
%5 = bitcast [10 x i32]* %3 to i8*
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 4
%7 = bitcast i32* %6 to i8*
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 1
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 2
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 3
%12 = bitcast [10 x i32]* %3 to <4 x i32>*
store <4 x i32> <i32 1, i32 2, i32 3, i32 6>, <4 x i32>* %12
%13 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 4
store i32 9, i32* %13
%14 = bitcast [5 x i32]* %4 to i8*
%15 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 0
%16 = call i32 @fun(i32* %8, i32* %15, i32 10)
%17 = load i32, i32* %8
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %9
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %19)
%21 = load i32, i32* %10
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %21)
%23 = load i32, i32* %11
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %23)
%25 = load i32, i32* %13
%26 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %25)
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 5
%28 = load i32, i32* %27
%29 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %28)
%30 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 6
%31 = load i32, i32* %30
%32 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %31)
%33 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 7
%34 = load i32, i32* %33
%35 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %34)
%36 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 8
%37 = load i32, i32* %36
%38 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %37)
%39 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 9
%40 = load i32, i32* %39
%41 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %40)
ret i32 0
}