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

/* Variables and functions */
void __attribute__((no, noclone))
pack_int_double_plus_7(uint32_t *d, double *s, int size) {
  for (int i = 0; i < size; i++)
    d[i] = s[i] + 7;
}


x86 assembly (clang, -O0):
<pack_int_double_plus_7>:
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    1152 <pack_int_double_plus_7+0x52>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  0xece(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1116 <pack_int_double_plus_7+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pack_int_double_plus_7>:
test   %edx,%edx
jle    127d <pack_int_double_plus_7+0x17d>
mov    %edx,%r9d
cmp    $0x4,%edx
jb     112a <pack_int_double_plus_7+0x2a>
lea    (%rsi,%r9,8),%rax
cmp    %rdi,%rax
jbe    11cc <pack_int_double_plus_7+0xcc>
lea    (%rdi,%r9,8),%rax
cmp    %rsi,%rax
jbe    11cc <pack_int_double_plus_7+0xcc>
xor    %ecx,%ecx
mov    %rcx,%rax
not    %rax
add    %r9,%rax
mov    %r9,%rdx
and    $0x3,%rdx
je     1168 <pack_int_double_plus_7+0x68>
movsd  0xeca(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
movsd  (%rsi,%rcx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rdx
jne    1150 <pack_int_double_plus_7+0x50>
cmp    $0x3,%rax
jb     127d <pack_int_double_plus_7+0x17d>
movsd  0xe96(%rip),%xmm0
nopw   0x0(%rax,%rax,1)
movsd  (%rsi,%rcx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi,%rcx,8)
movsd  0x8(%rsi,%rcx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rdi,%rcx,8)
movsd  0x10(%rsi,%rcx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rdi,%rcx,8)
movsd  0x18(%rsi,%rcx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rdi,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%r9
jne    1180 <pack_int_double_plus_7+0x80>
jmp    127d <pack_int_double_plus_7+0x17d>
mov    %r9d,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rax
mov    %rax,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rax,%rax
je     127e <pack_int_double_plus_7+0x17e>
mov    %r8,%rax
and    $0xfffffffffffffffe,%rax
xor    %edx,%edx
movapd 0xe05(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movupd (%rsi,%rdx,8),%xmm1
movupd 0x10(%rsi,%rdx,8),%xmm2
addpd  %xmm0,%xmm1
addpd  %xmm0,%xmm2
movupd %xmm1,(%rdi,%rdx,8)
movupd %xmm2,0x10(%rdi,%rdx,8)
movupd 0x20(%rsi,%rdx,8),%xmm1
movupd 0x30(%rsi,%rdx,8),%xmm2
addpd  %xmm0,%xmm1
addpd  %xmm0,%xmm2
movupd %xmm1,0x20(%rdi,%rdx,8)
movupd %xmm2,0x30(%rdi,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rax
jne    1200 <pack_int_double_plus_7+0x100>
test   $0x1,%r8b
je     1274 <pack_int_double_plus_7+0x174>
movupd (%rsi,%rdx,8),%xmm0
movupd 0x10(%rsi,%rdx,8),%xmm1
movapd 0xd9f(%rip),%xmm2
addpd  %xmm2,%xmm0
addpd  %xmm2,%xmm1
movupd %xmm0,(%rdi,%rdx,8)
movupd %xmm1,0x10(%rdi,%rdx,8)
cmp    %r9,%rcx
jne    112c <pack_int_double_plus_7+0x2c>
ret
xor    %edx,%edx
test   $0x1,%r8b
jne    124e <pack_int_double_plus_7+0x14e>
jmp    1274 <pack_int_double_plus_7+0x174>

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

LLVM IR (-O2):
define void @pack_int_double_plus_7(double* nocapture writeonly %0, double* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %91
5: ; preds = %3
%6 = zext i32 %2 to i64
%7 = icmp ult i32 %2, 4
br i1 %7, label %72, label %8
8: ; preds = %5
%9 = getelementptr double, double* %0, i64 %6
%10 = getelementptr double, double* %1, i64 %6
%11 = icmp ugt double* %10, %0
%12 = icmp ugt double* %9, %1
%13 = and i1 %11, %12
br i1 %13, label %72, label %14
14: ; preds = %8
%15 = and i64 %6, 4294967292
%16 = add nsw i64 %15, -4
%17 = lshr exact i64 %16, 2
%18 = add nuw nsw i64 %17, 1
%19 = and i64 %18, 1
%20 = icmp eq i64 %16, 0
br i1 %20, label %54, label %21
21: ; preds = %14
%22 = and i64 %18, 9223372036854775806
br label %23
23: ; preds = %23, %21
%24 = phi i64 [ 0, %21 ], [ %51, %23 ]
%25 = phi i64 [ 0, %21 ], [ %52, %23 ]
%26 = getelementptr inbounds double, double* %1, i64 %24
%27 = bitcast double* %26 to <2 x double>*
%28 = load <2 x double>, <2 x double>* %27
%29 = getelementptr inbounds double, double* %26, i64 2
%30 = bitcast double* %29 to <2 x double>*
%31 = load <2 x double>, <2 x double>* %30
%32 = fadd <2 x double> %28, <double 7.000000e+00, double 7.000000e+00>
%33 = fadd <2 x double> %31, <double 7.000000e+00, double 7.000000e+00>
%34 = getelementptr inbounds double, double* %0, i64 %24
%35 = bitcast double* %34 to <2 x double>*
store <2 x double> %32, <2 x double>* %35
%36 = getelementptr inbounds double, double* %34, i64 2
%37 = bitcast double* %36 to <2 x double>*
store <2 x double> %33, <2 x double>* %37
%38 = or i64 %24, 4
%39 = getelementptr inbounds double, double* %1, i64 %38
%40 = bitcast double* %39 to <2 x double>*
%41 = load <2 x double>, <2 x double>* %40
%42 = getelementptr inbounds double, double* %39, i64 2
%43 = bitcast double* %42 to <2 x double>*
%44 = load <2 x double>, <2 x double>* %43
%45 = fadd <2 x double> %41, <double 7.000000e+00, double 7.000000e+00>
%46 = fadd <2 x double> %44, <double 7.000000e+00, double 7.000000e+00>
%47 = getelementptr inbounds double, double* %0, i64 %38
%48 = bitcast double* %47 to <2 x double>*
store <2 x double> %45, <2 x double>* %48
%49 = getelementptr inbounds double, double* %47, i64 2
%50 = bitcast double* %49 to <2 x double>*
store <2 x double> %46, <2 x double>* %50
%51 = add nuw i64 %24, 8
%52 = add i64 %25, 2
%53 = icmp eq i64 %52, %22
br i1 %53, label %54, label %23
54: ; preds = %23, %14
%55 = phi i64 [ 0, %14 ], [ %51, %23 ]
%56 = icmp eq i64 %19, 0
br i1 %56, label %70, label %57
57: ; preds = %54
%58 = getelementptr inbounds double, double* %1, i64 %55
%59 = bitcast double* %58 to <2 x double>*
%60 = load <2 x double>, <2 x double>* %59
%61 = getelementptr inbounds double, double* %58, i64 2
%62 = bitcast double* %61 to <2 x double>*
%63 = load <2 x double>, <2 x double>* %62
%64 = fadd <2 x double> %60, <double 7.000000e+00, double 7.000000e+00>
%65 = fadd <2 x double> %63, <double 7.000000e+00, double 7.000000e+00>
%66 = getelementptr inbounds double, double* %0, i64 %55
%67 = bitcast double* %66 to <2 x double>*
store <2 x double> %64, <2 x double>* %67
%68 = getelementptr inbounds double, double* %66, i64 2
%69 = bitcast double* %68 to <2 x double>*
store <2 x double> %65, <2 x double>* %69
br label %70
70: ; preds = %54, %57
%71 = icmp eq i64 %15, %6
br i1 %71, label %91, label %72
72: ; preds = %8, %5, %70
%73 = phi i64 [ 0, %8 ], [ 0, %5 ], [ %15, %70 ]
%74 = xor i64 %73, -1
%75 = add nsw i64 %74, %6
%76 = and i64 %6, 3
%77 = icmp eq i64 %76, 0
br i1 %77, label %88, label %78
78: ; preds = %72, %78
%79 = phi i64 [ %85, %78 ], [ %73, %72 ]
%80 = phi i64 [ %86, %78 ], [ 0, %72 ]
%81 = getelementptr inbounds double, double* %1, i64 %79
%82 = load double, double* %81
%83 = fadd double %82, 7.000000e+00
%84 = getelementptr inbounds double, double* %0, i64 %79
store double %83, double* %84
%85 = add nuw nsw i64 %79, 1
%86 = add i64 %80, 1
%87 = icmp eq i64 %86, %76
br i1 %87, label %88, label %78
88: ; preds = %78, %72
%89 = phi i64 [ %73, %72 ], [ %85, %78 ]
%90 = icmp ult i64 %75, 3
br i1 %90, label %91, label %92
91: ; preds = %88, %92, %70, %3
ret void
92: ; preds = %88, %92
%93 = phi i64 [ %113, %92 ], [ %89, %88 ]
%94 = getelementptr inbounds double, double* %1, i64 %93
%95 = load double, double* %94
%96 = fadd double %95, 7.000000e+00
%97 = getelementptr inbounds double, double* %0, i64 %93
store double %96, double* %97
%98 = add nuw nsw i64 %93, 1
%99 = getelementptr inbounds double, double* %1, i64 %98
%100 = load double, double* %99
%101 = fadd double %100, 7.000000e+00
%102 = getelementptr inbounds double, double* %0, i64 %98
store double %101, double* %102
%103 = add nuw nsw i64 %93, 2
%104 = getelementptr inbounds double, double* %1, i64 %103
%105 = load double, double* %104
%106 = fadd double %105, 7.000000e+00
%107 = getelementptr inbounds double, double* %0, i64 %103
store double %106, double* %107
%108 = add nuw nsw i64 %93, 3
%109 = getelementptr inbounds double, double* %1, i64 %108
%110 = load double, double* %109
%111 = fadd double %110, 7.000000e+00
%112 = getelementptr inbounds double, double* %0, i64 %108
store double %111, double* %112
%113 = add nuw nsw i64 %93, 4
%114 = icmp eq i64 %113, %6
br i1 %114, label %91, label %92
}