#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*/ assert(int);
int /*<<< orphan*/ psum1a(float *, float *, int);
int /*<<< orphan*/ psum_4_1a(float *, float *, int);
int main(int argc, char *argv[]) {
  float a[5] = {1, 2, 3, 4, 5};
  float p[5];
  psum1a(a, p, 5);
  assert(p[4] == 15);
  float q[5];
  psum_4_1a(a, q, 5);
  assert(q[4] == 15);
  for (int i = 0; i < 1000; i++) {
    float s[1000];
    float d[1000];
    psum1a(s, d, 1000);
    psum_4_1a(s, d, 1000);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1fc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xebd(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xebb(%rip),%eax
mov    %eax,-0x20(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    $0x5,%edx
call   1050 <psum1a@plt>
movss  -0x40(%rbp),%xmm0
movss  0xe79(%rip),%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    -0x30(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    $0x5,%edx
call   1030 <psum_4_1a@plt>
movss  -0x60(%rbp),%xmm0
movss  0xe45(%rip),%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movl   $0x0,-0x74(%rbp)
cmpl   $0x3e8,-0x74(%rbp)
jge    1222 <main+0xf2>
lea    -0x1020(%rbp),%rdi
lea    -0x1fc0(%rbp),%rsi
mov    $0x3e8,%edx
call   1050 <psum1a@plt>
lea    -0x1020(%rbp),%rdi
lea    -0x1fc0(%rbp),%rsi
mov    $0x3e8,%edx
call   1030 <psum_4_1a@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    11d7 <main+0xa7>
xor    %eax,%eax
add    $0x1fc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x1fa0,%rsp
mov    0xedf(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xec4(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
lea    0x40(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x5,%edx
call   1050 <psum1a@plt>
movss  0x50(%rsp),%xmm0
cmpeqss 0xe8c(%rip),%xmm0
movd   %xmm0,%edi
and    $0x1,%edi
call   1040 <assert@plt>
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x5,%edx
call   1030 <psum_4_1a@plt>
movss  0xe66(%rip),%xmm0
cmpeqss 0x30(%rsp),%xmm0
movd   %xmm0,%edi
and    $0x1,%edi
call   1040 <assert@plt>
mov    $0x3e8,%ebp
lea    0x1000(%rsp),%r14
lea    0x60(%rsp),%rbx
nop
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x3e8,%edx
call   1050 <psum1a@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x3e8,%edx
call   1030 <psum_4_1a@plt>
add    $0xffffffff,%ebp
jne    11c0 <main+0x90>
xor    %eax,%eax
add    $0x1fa0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.a = [5 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [5 x float]
%7 = alloca [5 x float]
%8 = alloca [5 x float]
%9 = alloca i32
%10 = alloca [1000 x float]
%11 = alloca [1000 x float]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = bitcast [5 x float]* %6 to i8*
%13 = getelementptr inbounds [5 x float], [5 x float]* %6, i64 0, i64 0
%14 = getelementptr inbounds [5 x float], [5 x float]* %7, i64 0, i64 0
%15 = call i32 @psum1a(float* %13, float* %14, i32 5)
%16 = getelementptr inbounds [5 x float], [5 x float]* %7, i64 0, i64 4
%17 = load float, float* %16
%18 = fcmp oeq float %17, 1.500000e+01
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
%21 = getelementptr inbounds [5 x float], [5 x float]* %6, i64 0, i64 0
%22 = getelementptr inbounds [5 x float], [5 x float]* %8, i64 0, i64 0
%23 = call i32 @psum_4_1a(float* %21, float* %22, i32 5)
%24 = getelementptr inbounds [5 x float], [5 x float]* %8, i64 0, i64 4
%25 = load float, float* %24
%26 = fcmp oeq float %25, 1.500000e+01
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
store i32 0, i32* %9
br label %29
29: ; preds = %39, %2
%30 = load i32, i32* %9
%31 = icmp slt i32 %30, 1000
br i1 %31, label %32, label %42
32: ; preds = %29
%33 = getelementptr inbounds [1000 x float], [1000 x float]* %10, i64 0, i64 0
%34 = getelementptr inbounds [1000 x float], [1000 x float]* %11, i64 0, i64 0
%35 = call i32 @psum1a(float* %33, float* %34, i32 1000)
%36 = getelementptr inbounds [1000 x float], [1000 x float]* %10, i64 0, i64 0
%37 = getelementptr inbounds [1000 x float], [1000 x float]* %11, i64 0, i64 0
%38 = call i32 @psum_4_1a(float* %36, float* %37, i32 1000)
br label %39
39: ; preds = %32
%40 = load i32, i32* %9
%41 = add nsw i32 %40, 1
store i32 %41, i32* %9
br label %29
42: ; preds = %29
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [5 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x float]
%4 = alloca [5 x float]
%5 = alloca [5 x float]
%6 = alloca [1000 x float]
%7 = alloca [1000 x float]
%8 = bitcast [5 x float]* %3 to i8*
%9 = bitcast [5 x float]* %4 to i8*
%10 = getelementptr inbounds [5 x float], [5 x float]* %3, i64 0, i64 0
%11 = getelementptr inbounds [5 x float], [5 x float]* %4, i64 0, i64 0
%12 = call i32 @psum1a(float* %10, float* %11, i32 5)
%13 = getelementptr inbounds [5 x float], [5 x float]* %4, i64 0, i64 4
%14 = load float, float* %13
%15 = fcmp oeq float %14, 1.500000e+01
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = bitcast [5 x float]* %5 to i8*
%19 = getelementptr inbounds [5 x float], [5 x float]* %5, i64 0, i64 0
%20 = call i32 @psum_4_1a(float* %10, float* %19, i32 5)
%21 = getelementptr inbounds [5 x float], [5 x float]* %5, i64 0, i64 4
%22 = load float, float* %21
%23 = fcmp oeq float %22, 1.500000e+01
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
%26 = bitcast [1000 x float]* %6 to i8*
%27 = bitcast [1000 x float]* %7 to i8*
%28 = getelementptr inbounds [1000 x float], [1000 x float]* %6, i64 0, i64 0
%29 = getelementptr inbounds [1000 x float], [1000 x float]* %7, i64 0, i64 0
br label %31
30: ; preds = %31
ret i32 0
31: ; preds = %2, %31
%32 = phi i32 [ 0, %2 ], [ %35, %31 ]
%33 = call i32 @psum1a(float* %28, float* %29, i32 1000)
%34 = call i32 @psum_4_1a(float* %28, float* %29, i32 1000)
%35 = add nuw nsw i32 %32, 1
%36 = icmp eq i32 %35, 1000
br i1 %36, label %30, label %31
}