#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 */
scalar_t__ silk_inner_product_FLP(float const *, float const *, int const);
void silk_corrVector_FLP(const float *x, const float *t, const int L,
                         const int Order, float *Xt) {
  int lag;
  const float *ptr1;
  ptr1 = &x[Order - 1];
  for (lag = 0; lag < Order; lag++) {
    Xt[lag] = (float)silk_inner_product_FLP(ptr1, t, L);
    ptr1--;
  }
}


x86 assembly (clang, -O0):
<silk_corrVector_FLP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1191 <silk_corrVector_FLP+0x81>
mov    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <silk_inner_product_FLP@plt>
cvtsi2ss %rax,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x30(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x30(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1149 <silk_corrVector_FLP+0x39>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<silk_corrVector_FLP>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %ecx,%ecx
jle    1169 <silk_corrVector_FLP+0x59>
mov    %r8,%r14
mov    %edx,%r15d
mov    %rsi,%r12
lea    -0x1(%rcx),%eax
lea    (%rdi,%rax,4),%rbp
mov    %ecx,%r13d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbp,%rdi
mov    %r12,%rsi
mov    %r15d,%edx
call   1030 <silk_inner_product_FLP@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  %xmm0,(%r14,%rbx,4)
add    $0xfffffffffffffffc,%rbp
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1140 <silk_corrVector_FLP+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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