void b_us(const double o[7], double u[7]) {
  int ix;
  int iy;
  int k;
  for (ix = 0; ix < 7; ix++) {
    u[ix] = 0.0;
  }
  ix = 0;
  iy = 0;
  for (k = 0; k < 7; k++) {
    u[iy] = o[ix];
    ix++;
    iy++;
  }
}


x86 assembly (clang, -O0):
<b_us>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x7,-0x14(%rbp)
jge    113b <b_us+0x3b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <b_us+0x13>
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x7,-0x1c(%rbp)
jge    1194 <b_us+0x94>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1150 <b_us+0x50>
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_us>:
xorps  %xmm0,%xmm0
movups %xmm0,0x20(%rsi)
movups %xmm0,0x10(%rsi)
movups %xmm0,(%rsi)
movq   $0x0,0x30(%rsi)
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rsi)
movsd  0x8(%rdi),%xmm0
movsd  %xmm0,0x8(%rsi)
movsd  0x10(%rdi),%xmm0
movsd  %xmm0,0x10(%rsi)
movsd  0x18(%rdi),%xmm0
movsd  %xmm0,0x18(%rsi)
movsd  0x20(%rdi),%xmm0
movsd  %xmm0,0x20(%rsi)
movsd  0x28(%rdi),%xmm0
movsd  %xmm0,0x28(%rsi)
movsd  0x30(%rdi),%xmm0
movsd  %xmm0,0x30(%rsi)
ret

LLVM IR (-O0):
define void @b_us(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store double* %0, double** %3
store double* %1, double** %4
store i32 0, i32* %5
br label %8
8: ; preds = %16, %2
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 7
br i1 %10, label %11, label %19
11: ; preds = %8
%12 = load double*, double** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds double, double* %12, i64 %14
store double 0.000000e+00, double* %15
br label %16
16: ; preds = %11
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %8
19: ; preds = %8
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
br label %20
20: ; preds = %37, %19
%21 = load i32, i32* %7
%22 = icmp slt i32 %21, 7
br i1 %22, label %23, label %40
23: ; preds = %20
%24 = load double*, double** %3
%25 = load i32, i32* %5
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double, double* %24, i64 %26
%28 = load double, double* %27
%29 = load double*, double** %4
%30 = load i32, i32* %6
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds double, double* %29, i64 %31
store double %28, double* %32
%33 = load i32, i32* %5
%34 = add nsw i32 %33, 1
store i32 %34, i32* %5
%35 = load i32, i32* %6
%36 = add nsw i32 %35, 1
store i32 %36, i32* %6
br label %37
37: ; preds = %23
%38 = load i32, i32* %7
%39 = add nsw i32 %38, 1
store i32 %39, i32* %7
br label %20
40: ; preds = %20
ret void
}

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