#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 */
void sg_vector_copy_operation_inner(const void *restrict ctx,
                                    const size_t _offset,
                                    double *const restrict _v0,
                                    double *const restrict _v1,
                                    const size_t _num_elems) {
  size_t _i;
  (void)ctx;
  for (_i = 0; _i < _num_elems; ++_i) {
    size_t index = _offset + _i;
    double *const src = _v0 + _i;
    double *const dest = _v1 + _i;
    (void)index;
    {
      { *dest = *src; }
    }
  }
}


x86 assembly (clang, -O0):
<sg_vector_copy_operation_inner>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    1181 <sg_vector_copy_operation_inner+0x81>
mov    -0x10(%rbp),%rax
add    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1120 <sg_vector_copy_operation_inner+0x20>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sg_vector_copy_operation_inner>:
test   %r8,%r8
je     112c <sg_vector_copy_operation_inner+0x1c>
push   %rax
shl    $0x3,%r8
mov    %rcx,%rdi
mov    %rdx,%rsi
mov    %r8,%rdx
call   1030 <memcpy@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @sg_vector_copy_operation_inner(i8* noalias nocapture readnone %0, i64 %1, double* noalias nocapture %2, double* noalias nocapture writeonly %3, i64 %4) {
%6 = icmp eq i64 %4, 0
br i1 %6, label %11, label %7
7: ; preds = %5
%8 = bitcast double* %2 to i8*
%9 = bitcast double* %3 to i8*
%10 = shl nuw i64 %4, 3
br label %11
11: ; preds = %7, %5
ret void
}