#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 */

/* Variables and functions */
int /*<<< orphan*/ memcpy(double *, double *, unsigned int);
int /*<<< orphan*/ memset(double *, int /*<<< orphan*/, unsigned int);
void h_us(const double o[7], double u[19]) {
  double b_u[21];
  int ix;
  int iy;
  int k;
  memset(&b_u[0], 0, 21U * sizeof(double));
  ix = 0;
  iy = 0;
  for (k = 0; k < 7; k++) {
    b_u[iy] = o[ix];
    ix++;
    iy += 3;
  }
  memcpy(&u[0], &b_u[0], 19U * sizeof(double));
}


x86 assembly (clang, -O0):
<h_us>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xc0(%rbp),%rdi
xor    %esi,%esi
mov    $0xa8,%edx
call   1030 <memset@plt>
movl   $0x0,-0xc4(%rbp)
movl   $0x0,-0xc8(%rbp)
movl   $0x0,-0xcc(%rbp)
cmpl   $0x7,-0xcc(%rbp)
jge    11c3 <h_us+0xa3>
mov    -0x8(%rbp),%rax
movslq -0xc4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0xc8(%rbp),%rax
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
mov    -0xc8(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0xc8(%rbp)
mov    -0xcc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xcc(%rbp)
jmp    1164 <h_us+0x44>
mov    -0x10(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
mov    $0x98,%edx
call   1040 <memcpy@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h_us>:
push   %r15
push   %r14
push   %rbx
sub    $0xb0,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%r15
mov    %r15,%rdi
xor    %esi,%esi
mov    $0xa8,%edx
call   1030 <memset@plt>
movsd  (%rbx),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rbx),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x10(%rbx),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x18(%rbx),%xmm0
movsd  %xmm0,0x48(%rsp)
movsd  0x20(%rbx),%xmm0
movsd  %xmm0,0x60(%rsp)
movsd  0x28(%rbx),%xmm0
movsd  %xmm0,0x78(%rsp)
movsd  0x30(%rbx),%xmm0
movsd  %xmm0,0x90(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x98,%edx
call   1040 <memcpy@plt>
add    $0xb0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @h_us(double* nocapture %0, double* %1) {
%3 = alloca [21 x double]
%4 = bitcast [21 x double]* %3 to i8*
%5 = getelementptr inbounds [21 x double], [21 x double]* %3, i64 0, i64 0
%6 = call i32 @memset(double* %5, i32 0, i32 168)
%7 = load double, double* %0
store double %7, double* %5
%8 = getelementptr inbounds double, double* %0, i64 1
%9 = load double, double* %8
%10 = getelementptr inbounds [21 x double], [21 x double]* %3, i64 0, i64 3
store double %9, double* %10
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds [21 x double], [21 x double]* %3, i64 0, i64 6
store double %12, double* %13
%14 = getelementptr inbounds double, double* %0, i64 3
%15 = load double, double* %14
%16 = getelementptr inbounds [21 x double], [21 x double]* %3, i64 0, i64 9
store double %15, double* %16
%17 = getelementptr inbounds double, double* %0, i64 4
%18 = load double, double* %17
%19 = getelementptr inbounds [21 x double], [21 x double]* %3, i64 0, i64 12
store double %18, double* %19
%20 = getelementptr inbounds double, double* %0, i64 5
%21 = load double, double* %20
%22 = getelementptr inbounds [21 x double], [21 x double]* %3, i64 0, i64 15
store double %21, double* %22
%23 = getelementptr inbounds double, double* %0, i64 6
%24 = load double, double* %23
%25 = getelementptr inbounds [21 x double], [21 x double]* %3, i64 0, i64 18
store double %24, double* %25
%26 = call i32 @memcpy(double* %1, double* %5, i32 152)
ret void
}