#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);
void main() {
  int i, n, m, b, x[25];
  int f1(int, int, int j[25]);
  for (i = 0; i < 25; i++)
    x[i] = i;
  i = 0;
  m = 24;
  b = f1(i, m, x);
  printf("res %d\n", b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x19,-0x4(%rbp)
jge    1155 <main+0x35>
mov    -0x4(%rbp),%ecx
movslq -0x4(%rbp),%rax
mov    %ecx,-0x80(%rbp,%rax,4)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1132 <main+0x12>
movl   $0x0,-0x4(%rbp)
movl   $0x18,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
lea    -0x80(%rbp),%rdx
call   1040 <f1@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xeda(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xede(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee6(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeea(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movl   $0x18,0x60(%rsp)
mov    %rsp,%rdx
xor    %edi,%edi
mov    $0x18,%esi
call   1040 <f1@plt>
lea    0xed7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    $0x68,%rsp
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"res %d\0A\00"
define void @main() {
%1 = alloca [25 x i32]
%2 = bitcast [25 x i32]* %1 to i8*
%3 = getelementptr inbounds [25 x i32], [25 x i32]* %1, i64 0, i64 0
%4 = bitcast [25 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 [25 x i32], [25 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 [25 x i32], [25 x i32]* %1, i64 0, i64 8
%8 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> <i32 8, i32 9, i32 10, i32 11>, <4 x i32>* %8
%9 = getelementptr inbounds [25 x i32], [25 x i32]* %1, i64 0, i64 12
%10 = bitcast i32* %9 to <4 x i32>*
store <4 x i32> <i32 12, i32 13, i32 14, i32 15>, <4 x i32>* %10
%11 = getelementptr inbounds [25 x i32], [25 x i32]* %1, i64 0, i64 16
%12 = bitcast i32* %11 to <4 x i32>*
store <4 x i32> <i32 16, i32 17, i32 18, i32 19>, <4 x i32>* %12
%13 = getelementptr inbounds [25 x i32], [25 x i32]* %1, i64 0, i64 20
%14 = bitcast i32* %13 to <4 x i32>*
store <4 x i32> <i32 20, i32 21, i32 22, i32 23>, <4 x i32>* %14
%15 = getelementptr inbounds [25 x i32], [25 x i32]* %1, i64 0, i64 24
store i32 24, i32* %15
%16 = call i32 @f1(i32 0, i32 24, i32* %3)
%17 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %16)
ret void
}