#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 vector_rhop_operation_inner(
    const void *restrict ctx, const size_t _offset, double *const restrict _v0,
    double *const restrict _v1, double *const restrict _v2,
    double *const restrict _v3, double *const restrict _v4,
    double *const restrict _v5, const size_t _num_elems) {
  size_t _i;
  (void)ctx;
  for (_i = 0; _i < _num_elems; ++_i) {
    size_t index = _offset + _i;
    double *const yp = _v0 + _i;
    double *const phi0 = _v1 + _i;
    double *const phi15 = _v2 + _i;
    double *const p = _v3 + _i;
    double *const y = _v4 + _i;
    double *const phi14 = _v5 + _i;
    (void)index;
    {
      {
        const double hgk = *(const double *)ctx;
        const double rho = hgk * (*yp - *phi0) - *phi15;
        *y = *p + rho;
        *phi14 = (*y - *p) - rho;
      }
    }
  }
}


x86 assembly (clang, -O0):
<vector_rhop_operation_inner>:
push   %rbp
mov    %rsp,%rbp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    0x20(%rbp),%rax
jae    124d <vector_rhop_operation_inner+0x14d>
mov    -0x10(%rbp),%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x38(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x38(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x38(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x38(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    0x10(%rbp),%rax
mov    -0x38(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    0x18(%rbp),%rax
mov    -0x38(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x50(%rbp),%rax
subsd  (%rax),%xmm2
mov    -0x58(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x60(%rbp),%rax
movsd  (%rax),%xmm0
addsd  -0x80(%rbp),%xmm0
mov    -0x68(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x68(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x60(%rbp),%rax
subsd  (%rax),%xmm0
subsd  -0x80(%rbp),%xmm0
mov    -0x70(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    1130 <vector_rhop_operation_inner+0x30>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_rhop_operation_inner>:
push   %r15
push   %r14
push   %rbx
mov    0x30(%rsp),%r14
test   %r14,%r14
je     11ec <vector_rhop_operation_inner+0xec>
mov    0x28(%rsp),%r10
mov    0x20(%rsp),%r11
movsd  (%rdi),%xmm0
cmp    $0x1,%r14
jne    112c <vector_rhop_operation_inner+0x2c>
xor    %r15d,%r15d
jmp    118c <vector_rhop_operation_inner+0x8c>
mov    %r14,%r15
and    $0xfffffffffffffffe,%r15
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
xor    %eax,%eax
nopl   (%rax)
movupd (%rdx,%rax,8),%xmm2
movupd (%rcx,%rax,8),%xmm3
subpd  %xmm3,%xmm2
mulpd  %xmm1,%xmm2
movupd (%r8,%rax,8),%xmm3
subpd  %xmm3,%xmm2
movupd (%r9,%rax,8),%xmm3
movapd %xmm3,%xmm4
addpd  %xmm2,%xmm4
movupd %xmm4,(%r11,%rax,8)
subpd  %xmm3,%xmm4
subpd  %xmm2,%xmm4
movupd %xmm4,(%r10,%rax,8)
add    $0x2,%rax
cmp    %rax,%r15
jne    1140 <vector_rhop_operation_inner+0x40>
cmp    %r14,%r15
je     11ec <vector_rhop_operation_inner+0xec>
sub    %r15,%r14
lea    (%r10,%r15,8),%r10
lea    (%r11,%r15,8),%rax
lea    (%r9,%r15,8),%rbx
lea    (%r8,%r15,8),%rdi
lea    (%rcx,%r15,8),%rcx
lea    (%rdx,%r15,8),%rdx
xor    %esi,%esi
nopl   0x0(%rax)
movsd  (%rdx,%rsi,8),%xmm1
subsd  (%rcx,%rsi,8),%xmm1
mulsd  %xmm0,%xmm1
subsd  (%rdi,%rsi,8),%xmm1
movsd  (%rbx,%rsi,8),%xmm2
movapd %xmm2,%xmm3
addsd  %xmm1,%xmm3
movsd  %xmm3,(%rax,%rsi,8)
subsd  %xmm2,%xmm3
subsd  %xmm1,%xmm3
movsd  %xmm3,(%r10,%rsi,8)
add    $0x1,%rsi
cmp    %rsi,%r14
jne    11b0 <vector_rhop_operation_inner+0xb0>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @vector_rhop_operation_inner(i8* noalias %0, i64 %1, double* noalias %2, double* noalias %3, double* noalias %4, double* noalias %5, double* noalias %6, double* noalias %7, i64 %8) {
%10 = alloca i8*
%11 = alloca i64
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
%21 = alloca double*
%22 = alloca double*
%23 = alloca double*
%24 = alloca double*
%25 = alloca double*
%26 = alloca double*
%27 = alloca double
%28 = alloca double
store i8* %0, i8** %10
store i64 %1, i64* %11
store double* %2, double** %12
store double* %3, double** %13
store double* %4, double** %14
store double* %5, double** %15
store double* %6, double** %16
store double* %7, double** %17
store i64 %8, i64* %18
%29 = load i8*, i8** %10
store i64 0, i64* %19
br label %30
30: ; preds = %83, %9
%31 = load i64, i64* %19
%32 = load i64, i64* %18
%33 = icmp ult i64 %31, %32
br i1 %33, label %34, label %86
34: ; preds = %30
%35 = load i64, i64* %11
%36 = load i64, i64* %19
%37 = add i64 %35, %36
store i64 %37, i64* %20
%38 = load double*, double** %12
%39 = load i64, i64* %19
%40 = getelementptr inbounds double, double* %38, i64 %39
store double* %40, double** %21
%41 = load double*, double** %13
%42 = load i64, i64* %19
%43 = getelementptr inbounds double, double* %41, i64 %42
store double* %43, double** %22
%44 = load double*, double** %14
%45 = load i64, i64* %19
%46 = getelementptr inbounds double, double* %44, i64 %45
store double* %46, double** %23
%47 = load double*, double** %15
%48 = load i64, i64* %19
%49 = getelementptr inbounds double, double* %47, i64 %48
store double* %49, double** %24
%50 = load double*, double** %16
%51 = load i64, i64* %19
%52 = getelementptr inbounds double, double* %50, i64 %51
store double* %52, double** %25
%53 = load double*, double** %17
%54 = load i64, i64* %19
%55 = getelementptr inbounds double, double* %53, i64 %54
store double* %55, double** %26
%56 = load i64, i64* %20
%57 = load i8*, i8** %10
%58 = bitcast i8* %57 to double*
%59 = load double, double* %58
store double %59, double* %27
%60 = load double, double* %27
%61 = load double*, double** %21
%62 = load double, double* %61
%63 = load double*, double** %22
%64 = load double, double* %63
%65 = fsub double %62, %64
%66 = load double*, double** %23
%67 = load double, double* %66
%68 = fneg double %67
%69 = call double @llvm.fmuladd.f64(double %60, double %65, double %68)
store double %69, double* %28
%70 = load double*, double** %24
%71 = load double, double* %70
%72 = load double, double* %28
%73 = fadd double %71, %72
%74 = load double*, double** %25
store double %73, double* %74
%75 = load double*, double** %25
%76 = load double, double* %75
%77 = load double*, double** %24
%78 = load double, double* %77
%79 = fsub double %76, %78
%80 = load double, double* %28
%81 = fsub double %79, %80
%82 = load double*, double** %26
store double %81, double* %82
br label %83
83: ; preds = %34
%84 = load i64, i64* %19
%85 = add i64 %84, 1
store i64 %85, i64* %19
br label %30
86: ; preds = %30
ret void
}

LLVM IR (-O2):
define void @vector_rhop_operation_inner(i8* noalias nocapture %0, i64 %1, double* noalias nocapture %2, double* noalias nocapture %3, double* noalias nocapture %4, double* noalias nocapture %5, double* noalias nocapture writeonly %6, double* noalias nocapture writeonly %7, i64 %8) {
%10 = icmp eq i64 %8, 0
br i1 %10, label %69, label %11
11: ; preds = %9
%12 = bitcast i8* %0 to double*
%13 = load double, double* %12
%14 = icmp eq i64 %8, 1
br i1 %14, label %47, label %15
15: ; preds = %11
%16 = and i64 %8, -2
%17 = insertelement <2 x double> poison, double %13, i64 0
%18 = shufflevector <2 x double> %17, <2 x double> poison, <2 x i32> zeroinitializer
br label %19
19: ; preds = %19, %15
%20 = phi i64 [ 0, %15 ], [ %43, %19 ]
%21 = getelementptr inbounds double, double* %2, i64 %20
%22 = getelementptr inbounds double, double* %3, i64 %20
%23 = getelementptr inbounds double, double* %4, i64 %20
%24 = getelementptr inbounds double, double* %5, i64 %20
%25 = getelementptr inbounds double, double* %6, i64 %20
%26 = getelementptr inbounds double, double* %7, i64 %20
%27 = bitcast double* %21 to <2 x double>*
%28 = load <2 x double>, <2 x double>* %27
%29 = bitcast double* %22 to <2 x double>*
%30 = load <2 x double>, <2 x double>* %29
%31 = fsub <2 x double> %28, %30
%32 = bitcast double* %23 to <2 x double>*
%33 = load <2 x double>, <2 x double>* %32
%34 = fneg <2 x double> %33
%35 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %18, <2 x double> %31, <2 x double> %34)
%36 = bitcast double* %24 to <2 x double>*
%37 = load <2 x double>, <2 x double>* %36
%38 = fadd <2 x double> %37, %35
%39 = bitcast double* %25 to <2 x double>*
store <2 x double> %38, <2 x double>* %39
%40 = fsub <2 x double> %38, %37
%41 = fsub <2 x double> %40, %35
%42 = bitcast double* %26 to <2 x double>*
store <2 x double> %41, <2 x double>* %42
%43 = add nuw i64 %20, 2
%44 = icmp eq i64 %43, %16
br i1 %44, label %45, label %19
45: ; preds = %19
%46 = icmp eq i64 %16, %8
br i1 %46, label %69, label %47
47: ; preds = %11, %45
%48 = phi i64 [ 0, %11 ], [ %16, %45 ]
br label %49
49: ; preds = %47, %49
%50 = phi i64 [ %67, %49 ], [ %48, %47 ]
%51 = getelementptr inbounds double, double* %2, i64 %50
%52 = getelementptr inbounds double, double* %3, i64 %50
%53 = getelementptr inbounds double, double* %4, i64 %50
%54 = getelementptr inbounds double, double* %5, i64 %50
%55 = getelementptr inbounds double, double* %6, i64 %50
%56 = getelementptr inbounds double, double* %7, i64 %50
%57 = load double, double* %51
%58 = load double, double* %52
%59 = fsub double %57, %58
%60 = load double, double* %53
%61 = fneg double %60
%62 = tail call double @llvm.fmuladd.f64(double %13, double %59, double %61)
%63 = load double, double* %54
%64 = fadd double %63, %62
store double %64, double* %55
%65 = fsub double %64, %63
%66 = fsub double %65, %62
store double %66, double* %56
%67 = add nuw i64 %50, 1
%68 = icmp eq i64 %67, %8
br i1 %68, label %69, label %49
69: ; preds = %49, %45, %9
ret void
}