#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 f_us(const double o[15], double u[57]) {
  double b_u[60];
  int ix;
  int iy;
  int k;
  memset(&b_u[0], 0, 60U * sizeof(double));
  ix = 0;
  iy = 0;
  for (k = 0; k < 15; k++) {
    b_u[iy] = o[ix];
    ix++;
    iy += 4;
  }
  memcpy(&u[0], &b_u[0], 57U * sizeof(double));
}


x86 assembly (clang, -O0):
<f_us>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1f0(%rbp),%rdi
xor    %esi,%esi
mov    $0x1e0,%edx
call   1030 <memset@plt>
movl   $0x0,-0x1f4(%rbp)
movl   $0x0,-0x1f8(%rbp)
movl   $0x0,-0x1fc(%rbp)
cmpl   $0xf,-0x1fc(%rbp)
jge    11c3 <f_us+0xa3>
mov    -0x8(%rbp),%rax
movslq -0x1f4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x1f8(%rbp),%rax
movsd  %xmm0,-0x1f0(%rbp,%rax,8)
ff ff
mov    -0x1f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1f4(%rbp)
mov    -0x1f8(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x1f8(%rbp)
mov    -0x1fc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1fc(%rbp)
jmp    1164 <f_us+0x44>
mov    -0x10(%rbp),%rdi
lea    -0x1f0(%rbp),%rsi
mov    $0x1c8,%edx
call   1040 <memcpy@plt>
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_us>:
push   %r15
push   %r14
push   %rbx
sub    $0x1e0,%rsp
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x1e0,%edx
call   1030 <memset@plt>
movsd  (%rbx),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rbx),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x10(%rbx),%xmm0
movsd  %xmm0,0x40(%rsp)
movsd  0x18(%rbx),%xmm0
movsd  %xmm0,0x60(%rsp)
movsd  0x20(%rbx),%xmm0
movsd  %xmm0,0x80(%rsp)
movsd  0x28(%rbx),%xmm0
movsd  %xmm0,0xa0(%rsp)
movsd  0x30(%rbx),%xmm0
movsd  %xmm0,0xc0(%rsp)
movsd  0x38(%rbx),%xmm0
movsd  %xmm0,0xe0(%rsp)
movsd  0x40(%rbx),%xmm0
movsd  %xmm0,0x100(%rsp)
movsd  0x48(%rbx),%xmm0
movsd  %xmm0,0x120(%rsp)
movsd  0x50(%rbx),%xmm0
movsd  %xmm0,0x140(%rsp)
movsd  0x58(%rbx),%xmm0
movsd  %xmm0,0x160(%rsp)
movsd  0x60(%rbx),%xmm0
movsd  %xmm0,0x180(%rsp)
movsd  0x68(%rbx),%xmm0
movsd  %xmm0,0x1a0(%rsp)
movsd  0x70(%rbx),%xmm0
movsd  %xmm0,0x1c0(%rsp)
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x1c8,%edx
call   1040 <memcpy@plt>
add    $0x1e0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @f_us(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca [60 x double]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store double* %0, double** %3
store double* %1, double** %4
%9 = getelementptr inbounds [60 x double], [60 x double]* %5, i64 0, i64 0
%10 = call i32 @memset(double* %9, i32 0, i32 480)
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, 15
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 [60 x double], [60 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, 4
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 [60 x double], [60 x double]* %5, i64 0, i64 0
%34 = call i32 @memcpy(double* %32, double* %33, i32 456)
ret void
}

LLVM IR (-O2):
define void @f_us(double* nocapture %0, double* %1) {
%3 = alloca [60 x double]
%4 = bitcast [60 x double]* %3 to i8*
%5 = getelementptr inbounds [60 x double], [60 x double]* %3, i64 0, i64 0
%6 = call i32 @memset(double* %5, i32 0, i32 480)
%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 [60 x double], [60 x double]* %3, i64 0, i64 4
store double %9, double* %10
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds [60 x double], [60 x double]* %3, i64 0, i64 8
store double %12, double* %13
%14 = getelementptr inbounds double, double* %0, i64 3
%15 = load double, double* %14
%16 = getelementptr inbounds [60 x double], [60 x double]* %3, i64 0, i64 12
store double %15, double* %16
%17 = getelementptr inbounds double, double* %0, i64 4
%18 = load double, double* %17
%19 = getelementptr inbounds [60 x double], [60 x double]* %3, i64 0, i64 16
store double %18, double* %19
%20 = getelementptr inbounds double, double* %0, i64 5
%21 = load double, double* %20
%22 = getelementptr inbounds [60 x double], [60 x double]* %3, i64 0, i64 20
store double %21, double* %22
%23 = getelementptr inbounds double, double* %0, i64 6
%24 = load double, double* %23
%25 = getelementptr inbounds [60 x double], [60 x double]* %3, i64 0, i64 24
store double %24, double* %25
%26 = getelementptr inbounds double, double* %0, i64 7
%27 = load double, double* %26
%28 = getelementptr inbounds [60 x double], [60 x double]* %3, i64 0, i64 28
store double %27, double* %28
%29 = getelementptr inbounds double, double* %0, i64 8
%30 = load double, double* %29
%31 = getelementptr inbounds [60 x double], [60 x double]* %3, i64 0, i64 32
store double %30, double* %31
%32 = getelementptr inbounds double, double* %0, i64 9
%33 = load double, double* %32
%34 = getelementptr inbounds [60 x double], [60 x double]* %3, i64 0, i64 36
store double %33, double* %34
%35 = getelementptr inbounds double, double* %0, i64 10
%36 = load double, double* %35
%37 = getelementptr inbounds [60 x double], [60 x double]* %3, i64 0, i64 40
store double %36, double* %37
%38 = getelementptr inbounds double, double* %0, i64 11
%39 = load double, double* %38
%40 = getelementptr inbounds [60 x double], [60 x double]* %3, i64 0, i64 44
store double %39, double* %40
%41 = getelementptr inbounds double, double* %0, i64 12
%42 = load double, double* %41
%43 = getelementptr inbounds [60 x double], [60 x double]* %3, i64 0, i64 48
store double %42, double* %43
%44 = getelementptr inbounds double, double* %0, i64 13
%45 = load double, double* %44
%46 = getelementptr inbounds [60 x double], [60 x double]* %3, i64 0, i64 52
store double %45, double* %46
%47 = getelementptr inbounds double, double* %0, i64 14
%48 = load double, double* %47
%49 = getelementptr inbounds [60 x double], [60 x double]* %3, i64 0, i64 56
store double %48, double* %49
%50 = call i32 @memcpy(double* %1, double* %5, i32 456)
ret void
}