#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*/ mac_cmplx(float const *, float const *, float *);
void mac_cmplx_vec_n(const float *x, const float *h, float *y, int len) {
  for (int i = 0; i < len; i++)
    mac_cmplx(&x[2 * i], &h[2 * i], y);
}


x86 assembly (clang, -O0):
<mac_cmplx_vec_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1177 <mac_cmplx_vec_n+0x67>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x18(%rbp),%rdx
call   1030 <mac_cmplx@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    112e <mac_cmplx_vec_n+0x1e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mac_cmplx_vec_n>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %ecx,%ecx
jle    114c <mac_cmplx_vec_n+0x3c>
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %ecx,%r12d
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <mac_cmplx@plt>
add    $0x8,%r15
add    $0x8,%rbx
add    $0xffffffffffffffff,%r12
jne    1130 <mac_cmplx_vec_n+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @mac_cmplx_vec_n(float* %0, float* %1, float* %2, i32 %3) {
%5 = alloca float*
%6 = alloca float*
%7 = alloca float*
%8 = alloca i32
%9 = alloca i32
store float* %0, float** %5
store float* %1, float** %6
store float* %2, float** %7
store i32 %3, i32* %8
store i32 0, i32* %9
br label %10
10: ; preds = %27, %4
%11 = load i32, i32* %9
%12 = load i32, i32* %8
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %30
14: ; preds = %10
%15 = load float*, float** %5
%16 = load i32, i32* %9
%17 = mul nsw i32 2, %16
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds float, float* %15, i64 %18
%20 = load float*, float** %6
%21 = load i32, i32* %9
%22 = mul nsw i32 2, %21
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds float, float* %20, i64 %23
%25 = load float*, float** %7
%26 = call i32 @mac_cmplx(float* %19, float* %24, float* %25)
br label %27
27: ; preds = %14
%28 = load i32, i32* %9
%29 = add nsw i32 %28, 1
store i32 %29, i32* %9
br label %10
30: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @mac_cmplx_vec_n(float* %0, float* %1, float* %2, i32 %3) {
%5 = icmp sgt i32 %3, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = zext i32 %3 to i64
br label %9
8: ; preds = %9, %4
ret void
9: ; preds = %6, %9
%10 = phi i64 [ 0, %6 ], [ %15, %9 ]
%11 = shl nuw nsw i64 %10, 1
%12 = getelementptr inbounds float, float* %0, i64 %11
%13 = getelementptr inbounds float, float* %1, i64 %11
%14 = tail call i32 @mac_cmplx(float* %12, float* %13, float* %2)
%15 = add nuw nsw i64 %10, 1
%16 = icmp eq i64 %15, %7
br i1 %16, label %8, label %9
}