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


x86 assembly (clang, -O0):
<g_us>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x180(%rbp),%rdi
xor    %esi,%esi
mov    $0x168,%edx
call   1030 <memset@plt>
movl   $0x0,-0x184(%rbp)
movl   $0x0,-0x188(%rbp)
movl   $0x0,-0x18c(%rbp)
cmpl   $0xf,-0x18c(%rbp)
jge    11c3 <g_us+0xa3>
mov    -0x8(%rbp),%rax
movslq -0x184(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x188(%rbp),%rax
movsd  %xmm0,-0x180(%rbp,%rax,8)
ff ff
mov    -0x184(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x184(%rbp)
mov    -0x188(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x188(%rbp)
mov    -0x18c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18c(%rbp)
jmp    1164 <g_us+0x44>
mov    -0x10(%rbp),%rdi
lea    -0x180(%rbp),%rsi
mov    $0x158,%edx
call   1040 <memcpy@plt>
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_us>:
push   %r15
push   %r14
push   %rbx
sub    $0x170,%rsp
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x168,%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)
movsd  0x38(%rbx),%xmm0
movsd  %xmm0,0xa8(%rsp)
movsd  0x40(%rbx),%xmm0
movsd  %xmm0,0xc0(%rsp)
movsd  0x48(%rbx),%xmm0
movsd  %xmm0,0xd8(%rsp)
movsd  0x50(%rbx),%xmm0
movsd  %xmm0,0xf0(%rsp)
movsd  0x58(%rbx),%xmm0
movsd  %xmm0,0x108(%rsp)
movsd  0x60(%rbx),%xmm0
movsd  %xmm0,0x120(%rsp)
movsd  0x68(%rbx),%xmm0
movsd  %xmm0,0x138(%rsp)
movsd  0x70(%rbx),%xmm0
movsd  %xmm0,0x150(%rsp)
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x158,%edx
call   1040 <memcpy@plt>
add    $0x170,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

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