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

/* Variables and functions */
void __attribute__((no, noclone))
vec_slp_double_uint32_t(double *restrict a, uint32_t *restrict b, int n) {
  for (int i = 0; i < n; ++i) {
    a[i * 2] += 1;
    a[i * 2 + 1] += 2;
    b[i * 4] += 3;
    b[i * 4 + 1] += 4;
    b[i * 4 + 2] += 5;
    b[i * 4 + 3] += 6;
  }
}


x86 assembly (clang, -O0):
<vec_slp_double_uint32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11d2 <vec_slp_double_uint32_t+0xd2>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xed1(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xea7(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
add    $0x3,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
add    $0x4,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
add    $0x5,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
add    $0x6,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1116 <vec_slp_double_uint32_t+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec_slp_double_uint32_t>:
test   %edx,%edx
jle    11b7 <vec_slp_double_uint32_t+0xb7>
mov    %edx,%r8d
cmp    $0x1,%edx
jne    1114 <vec_slp_double_uint32_t+0x14>
xor    %eax,%eax
jmp    1189 <vec_slp_double_uint32_t+0x89>
mov    %r8d,%edx
and    $0xfffffffe,%edx
mov    $0x10,%ecx
xor    %eax,%eax
movapd 0xed7(%rip),%xmm0
movdqa 0xedf(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movupd -0x10(%rdi,%rcx,1),%xmm2
addpd  %xmm0,%xmm2
movupd %xmm2,-0x10(%rdi,%rcx,1)
movdqu -0x10(%rsi,%rcx,1),%xmm2
paddd  %xmm1,%xmm2
movdqu %xmm2,-0x10(%rsi,%rcx,1)
movupd (%rdi,%rcx,1),%xmm2
addpd  %xmm0,%xmm2
movupd %xmm2,(%rdi,%rcx,1)
movdqu (%rsi,%rcx,1),%xmm2
paddd  %xmm1,%xmm2
movdqu %xmm2,(%rsi,%rcx,1)
add    $0x2,%rax
add    $0x20,%rcx
cmp    %rax,%rdx
jne    1140 <vec_slp_double_uint32_t+0x40>
test   $0x1,%r8b
je     11b7 <vec_slp_double_uint32_t+0xb7>
shl    $0x4,%rax
movupd (%rdi,%rax,1),%xmm0
addpd  0xe60(%rip),%xmm0
movupd %xmm0,(%rdi,%rax,1)
movdqu (%rsi,%rax,1),%xmm0
paddd  0xe5e(%rip),%xmm0
movdqu %xmm0,(%rsi,%rax,1)
ret

LLVM IR (-O0):
define void @vec_slp_double_uint32_t(double* noalias %0, i32* noalias %1, i32 %2) {
%4 = alloca double*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
store double* %0, double** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %59, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %62
12: ; preds = %8
%13 = load double*, double** %4
%14 = load i32, i32* %7
%15 = mul nsw i32 %14, 2
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds double, double* %13, i64 %16
%18 = load double, double* %17
%19 = fadd double %18, 1.000000e+00
store double %19, double* %17
%20 = load double*, double** %4
%21 = load i32, i32* %7
%22 = mul nsw i32 %21, 2
%23 = add nsw i32 %22, 1
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds double, double* %20, i64 %24
%26 = load double, double* %25
%27 = fadd double %26, 2.000000e+00
store double %27, double* %25
%28 = load i32*, i32** %5
%29 = load i32, i32* %7
%30 = mul nsw i32 %29, 4
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i32, i32* %28, i64 %31
%33 = load i32, i32* %32
%34 = add nsw i32 %33, 3
store i32 %34, i32* %32
%35 = load i32*, i32** %5
%36 = load i32, i32* %7
%37 = mul nsw i32 %36, 4
%38 = add nsw i32 %37, 1
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i32, i32* %35, i64 %39
%41 = load i32, i32* %40
%42 = add nsw i32 %41, 4
store i32 %42, i32* %40
%43 = load i32*, i32** %5
%44 = load i32, i32* %7
%45 = mul nsw i32 %44, 4
%46 = add nsw i32 %45, 2
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i32, i32* %43, i64 %47
%49 = load i32, i32* %48
%50 = add nsw i32 %49, 5
store i32 %50, i32* %48
%51 = load i32*, i32** %5
%52 = load i32, i32* %7
%53 = mul nsw i32 %52, 4
%54 = add nsw i32 %53, 3
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i32, i32* %51, i64 %55
%57 = load i32, i32* %56
%58 = add nsw i32 %57, 6
store i32 %58, i32* %56
br label %59
59: ; preds = %12
%60 = load i32, i32* %7
%61 = add nsw i32 %60, 1
store i32 %61, i32* %7
br label %8
62: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @vec_slp_double_uint32_t(double* noalias nocapture %0, i32* noalias nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %27
5: ; preds = %3
%6 = zext i32 %2 to i64
%7 = and i64 %6, 1
%8 = icmp eq i32 %2, 1
br i1 %8, label %11, label %9
9: ; preds = %5
%10 = and i64 %6, 4294967294
br label %28
11: ; preds = %28, %5
%12 = phi i64 [ 0, %5 ], [ %56, %28 ]
%13 = icmp eq i64 %7, 0
br i1 %13, label %27, label %14
14: ; preds = %11
%15 = shl nuw nsw i64 %12, 1
%16 = getelementptr inbounds double, double* %0, i64 %15
%17 = bitcast double* %16 to <2 x double>*
%18 = load <2 x double>, <2 x double>* %17
%19 = fadd <2 x double> %18, <double 1.000000e+00, double 2.000000e+00>
%20 = bitcast double* %16 to <2 x double>*
store <2 x double> %19, <2 x double>* %20
%21 = shl nsw i64 %12, 2
%22 = getelementptr inbounds i32, i32* %1, i64 %21
%23 = bitcast i32* %22 to <4 x i32>*
%24 = load <4 x i32>, <4 x i32>* %23
%25 = add nsw <4 x i32> %24, <i32 3, i32 4, i32 5, i32 6>
%26 = bitcast i32* %22 to <4 x i32>*
store <4 x i32> %25, <4 x i32>* %26
br label %27
27: ; preds = %14, %11, %3
ret void
28: ; preds = %28, %9
%29 = phi i64 [ 0, %9 ], [ %56, %28 ]
%30 = phi i64 [ 0, %9 ], [ %57, %28 ]
%31 = shl nuw nsw i64 %29, 1
%32 = getelementptr inbounds double, double* %0, i64 %31
%33 = bitcast double* %32 to <2 x double>*
%34 = load <2 x double>, <2 x double>* %33
%35 = fadd <2 x double> %34, <double 1.000000e+00, double 2.000000e+00>
%36 = bitcast double* %32 to <2 x double>*
store <2 x double> %35, <2 x double>* %36
%37 = shl nsw i64 %29, 2
%38 = getelementptr inbounds i32, i32* %1, i64 %37
%39 = bitcast i32* %38 to <4 x i32>*
%40 = load <4 x i32>, <4 x i32>* %39
%41 = add nsw <4 x i32> %40, <i32 3, i32 4, i32 5, i32 6>
%42 = bitcast i32* %38 to <4 x i32>*
store <4 x i32> %41, <4 x i32>* %42
%43 = or i64 %29, 1
%44 = shl nuw nsw i64 %43, 1
%45 = getelementptr inbounds double, double* %0, i64 %44
%46 = bitcast double* %45 to <2 x double>*
%47 = load <2 x double>, <2 x double>* %46
%48 = fadd <2 x double> %47, <double 1.000000e+00, double 2.000000e+00>
%49 = bitcast double* %45 to <2 x double>*
store <2 x double> %48, <2 x double>* %49
%50 = shl nsw i64 %43, 2
%51 = getelementptr inbounds i32, i32* %1, i64 %50
%52 = bitcast i32* %51 to <4 x i32>*
%53 = load <4 x i32>, <4 x i32>* %52
%54 = add nsw <4 x i32> %53, <i32 3, i32 4, i32 5, i32 6>
%55 = bitcast i32* %51 to <4 x i32>*
store <4 x i32> %54, <4 x i32>* %55
%56 = add nuw nsw i64 %29, 2
%57 = add i64 %30, 2
%58 = icmp eq i64 %57, %10
br i1 %58, label %11, label %28
}