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

/* Variables and functions */
int /*<<< orphan*/ __operation(int /*<<< orphan*/, int /*<<< orphan*/,
                               int /*<<< orphan*/ *);
int vvadd_I4_I4_I4(const int32_t *restrict in1, const int32_t *restrict in2,
                   uint64_t nR, int32_t *restrict out) {
  int status = 0;
  for (uint64_t i = 0; i < nR; i++) {
    int32_t inv1 = in1[i];
    int32_t inv2 = in2[i];
    int32_t outv;
    __operation(inv1, inv2, &outv);
    out[i] = outv;
  }
  return status;
}


x86 assembly (clang, -O0):
<vvadd_I4_I4_I4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    118f <vvadd_I4_I4_I4+0x7f>
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x38(%rbp)
mov    -0x34(%rbp),%edi
mov    -0x38(%rbp),%esi
lea    -0x3c(%rbp),%rdx
call   1030 <__operation@plt>
mov    -0x3c(%rbp),%edx
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1137 <vvadd_I4_I4_I4+0x27>
mov    -0x24(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vvadd_I4_I4_I4>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %rdx,%rdx
je     1161 <vvadd_I4_I4_I4+0x51>
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r12
xor    %ebp,%ebp
lea    0x4(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r12,%rbp,4),%edi
mov    (%r15,%rbp,4),%esi
mov    %r13,%rdx
call   1030 <__operation@plt>
mov    0x4(%rsp),%eax
mov    %eax,(%r14,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1140 <vvadd_I4_I4_I4+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @vvadd_I4_I4_I4(i32* noalias nocapture %0, i32* noalias nocapture %1, i64 %2, i32* noalias nocapture writeonly %3) {
%5 = alloca i32
%6 = icmp eq i64 %2, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = bitcast i32* %5 to i8*
br label %10
9: ; preds = %10, %4
ret i32 0
10: ; preds = %7, %10
%11 = phi i64 [ 0, %7 ], [ %19, %10 ]
%12 = getelementptr inbounds i32, i32* %0, i64 %11
%13 = load i32, i32* %12
%14 = getelementptr inbounds i32, i32* %1, i64 %11
%15 = load i32, i32* %14
%16 = call i32 @__operation(i32 %13, i32 %15, i32* %5)
%17 = load i32, i32* %5
%18 = getelementptr inbounds i32, i32* %3, i64 %11
store i32 %17, i32* %18
%19 = add nuw i64 %11, 1
%20 = icmp eq i64 %19, %2
br i1 %20, label %9, label %10
}