#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 */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ MULT31(int /*<<< orphan*/, int /*<<< orphan*/ const);
void vect_mult_fw(int32_t *data, const int32_t *window, int n) {
  while (n > 0) {
    *data = MULT31(*data, *window);
    data++;
    window++;
    n--;
  }
}


x86 assembly (clang, -O0):
<vect_mult_fw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    116c <vect_mult_fw+0x5c>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
call   1030 <MULT31@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <vect_mult_fw+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vect_mult_fw>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edx,%edx
jle    114d <vect_mult_fw+0x3d>
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%r15
add    $0x1,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,1),%edi
mov    (%r14,%rbx,1),%esi
call   1030 <MULT31@plt>
mov    %eax,(%r15,%rbx,1)
add    $0xffffffff,%ebp
add    $0x4,%rbx
cmp    $0x1,%ebp
ja     1130 <vect_mult_fw+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @vect_mult_fw(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
br label %7
7: ; preds = %10, %3
%8 = load i32, i32* %6
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %23
10: ; preds = %7
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
%15 = call i32 @MULT31(i32 %12, i32 %14)
%16 = load i32*, i32** %4
store i32 %15, i32* %16
%17 = load i32*, i32** %4
%18 = getelementptr inbounds i32, i32* %17, i32 1
store i32* %18, i32** %4
%19 = load i32*, i32** %5
%20 = getelementptr inbounds i32, i32* %19, i32 1
store i32* %20, i32** %5
%21 = load i32, i32* %6
%22 = add nsw i32 %21, -1
store i32 %22, i32* %6
br label %7
23: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @vect_mult_fw(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %16
5: ; preds = %3, %5
%6 = phi i32 [ %14, %5 ], [ %2, %3 ]
%7 = phi i32* [ %13, %5 ], [ %1, %3 ]
%8 = phi i32* [ %12, %5 ], [ %0, %3 ]
%9 = load i32, i32* %8
%10 = load i32, i32* %7
%11 = tail call i32 @MULT31(i32 %9, i32 %10)
store i32 %11, i32* %8
%12 = getelementptr inbounds i32, i32* %8, i64 1
%13 = getelementptr inbounds i32, i32* %7, i64 1
%14 = add nsw i32 %6, -1
%15 = icmp ugt i32 %6, 1
br i1 %15, label %5, label %16
16: ; preds = %5, %3
ret void
}