#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 scalar_t__ uint32_t;

/* Variables and functions */
void test_vsub_i32_u(uint32_t *dest, uint32_t *a, uint32_t *b) {
  int i;
  for (i = 0; i < 4; i++) {
    dest[i] = a[i] - b[i];
  }
}


x86 assembly (clang, -O0):
<test_vsub_i32_u>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    1153 <test_vsub_i32_u+0x53>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
sub    (%rax,%rcx,8),%rdx
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <test_vsub_i32_u+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_vsub_i32_u>:
mov    (%rsi),%rax
sub    (%rdx),%rax
mov    %rax,(%rdi)
mov    0x8(%rsi),%rax
sub    0x8(%rdx),%rax
mov    %rax,0x8(%rdi)
mov    0x10(%rsi),%rax
sub    0x10(%rdx),%rax
mov    %rax,0x10(%rdi)
mov    0x18(%rsi),%rax
sub    0x18(%rdx),%rax
mov    %rax,0x18(%rdi)
ret

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

LLVM IR (-O2):
define void @test_vsub_i32_u(i64* nocapture writeonly %0, i64* nocapture %1, i64* nocapture %2) {
%4 = load i64, i64* %1
%5 = load i64, i64* %2
%6 = sub nsw i64 %4, %5
store i64 %6, i64* %0
%7 = getelementptr inbounds i64, i64* %1, i64 1
%8 = load i64, i64* %7
%9 = getelementptr inbounds i64, i64* %2, i64 1
%10 = load i64, i64* %9
%11 = sub nsw i64 %8, %10
%12 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %11, i64* %12
%13 = getelementptr inbounds i64, i64* %1, i64 2
%14 = load i64, i64* %13
%15 = getelementptr inbounds i64, i64* %2, i64 2
%16 = load i64, i64* %15
%17 = sub nsw i64 %14, %16
%18 = getelementptr inbounds i64, i64* %0, i64 2
store i64 %17, i64* %18
%19 = getelementptr inbounds i64, i64* %1, i64 3
%20 = load i64, i64* %19
%21 = getelementptr inbounds i64, i64* %2, i64 3
%22 = load i64, i64* %21
%23 = sub nsw i64 %20, %22
%24 = getelementptr inbounds i64, i64* %0, i64 3
store i64 %23, i64* %24
ret void
}