#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 */
double const fabs(double);
void vector_update_wt_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 yy = _v0 + _i;
    double *const wt = _v1 + _i;
    (void)index;
    {
      {
        const double releps = ((const double *)ctx)[0];
        const double abseps = ((const double *)ctx)[1];
        *wt = releps * fabs(*yy) + abseps;
      }
    }
  }
}


x86 assembly (clang, -O0):
<vector_update_wt_operation_inner>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
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    11d4 <vector_update_wt_operation_inner+0xc4>
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    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <fabs@plt>
movaps %xmm0,%xmm2
movsd  -0x60(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1134 <vector_update_wt_operation_inner+0x24>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_update_wt_operation_inner>:
test   %r8,%r8
je     123f <vector_update_wt_operation_inner+0x13f>
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
cmp    $0x4,%r8
jae    111f <vector_update_wt_operation_inner+0x1f>
xor    %eax,%eax
jmp    1209 <vector_update_wt_operation_inner+0x109>
mov    %r8,%rax
and    $0xfffffffffffffffc,%rax
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
movapd %xmm1,%xmm3
unpcklpd %xmm1,%xmm3
lea    -0x4(%rax),%rsi
mov    %rsi,%r9
shr    $0x2,%r9
add    $0x1,%r9
test   %rsi,%rsi
je     1240 <vector_update_wt_operation_inner+0x140>
mov    %r9,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %esi,%esi
movapd 0xea1(%rip),%xmm4
nop
movupd (%rdx,%rsi,8),%xmm5
movupd 0x10(%rdx,%rsi,8),%xmm6
andpd  %xmm4,%xmm5
andpd  %xmm4,%xmm6
mulpd  %xmm2,%xmm5
addpd  %xmm3,%xmm5
mulpd  %xmm2,%xmm6
addpd  %xmm3,%xmm6
movupd %xmm5,(%rcx,%rsi,8)
movupd %xmm6,0x10(%rcx,%rsi,8)
movupd 0x20(%rdx,%rsi,8),%xmm5
movupd 0x30(%rdx,%rsi,8),%xmm6
andpd  %xmm4,%xmm5
andpd  %xmm4,%xmm6
mulpd  %xmm2,%xmm5
addpd  %xmm3,%xmm5
mulpd  %xmm2,%xmm6
addpd  %xmm3,%xmm6
movupd %xmm5,0x20(%rcx,%rsi,8)
movupd %xmm6,0x30(%rcx,%rsi,8)
add    $0x8,%rsi
add    $0xfffffffffffffffe,%rdi
jne    1160 <vector_update_wt_operation_inner+0x60>
test   $0x1,%r9b
je     1204 <vector_update_wt_operation_inner+0x104>
movupd (%rdx,%rsi,8),%xmm4
movupd 0x10(%rdx,%rsi,8),%xmm5
movapd 0xe1f(%rip),%xmm6
andpd  %xmm6,%xmm4
andpd  %xmm6,%xmm5
mulpd  %xmm2,%xmm4
addpd  %xmm3,%xmm4
mulpd  %xmm2,%xmm5
addpd  %xmm3,%xmm5
movupd %xmm4,(%rcx,%rsi,8)
movupd %xmm5,0x10(%rcx,%rsi,8)
cmp    %r8,%rax
je     123f <vector_update_wt_operation_inner+0x13f>
movapd 0xdef(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rdx,%rax,8),%xmm3
andpd  %xmm2,%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm1,%xmm3
movsd  %xmm3,(%rcx,%rax,8)
add    $0x1,%rax
cmp    %rax,%r8
jne    1220 <vector_update_wt_operation_inner+0x120>
ret
xor    %esi,%esi
test   $0x1,%r9b
jne    11ce <vector_update_wt_operation_inner+0xce>
jmp    1204 <vector_update_wt_operation_inner+0x104>

LLVM IR (-O0):
define void @vector_update_wt_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*
%15 = alloca double
%16 = 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
%17 = load i8*, i8** %6
store i64 0, i64* %11
br label %18
18: ; preds = %48, %5
%19 = load i64, i64* %11
%20 = load i64, i64* %10
%21 = icmp ult i64 %19, %20
br i1 %21, label %22, label %51
22: ; preds = %18
%23 = load i64, i64* %7
%24 = load i64, i64* %11
%25 = add i64 %23, %24
store i64 %25, i64* %12
%26 = load double*, double** %8
%27 = load i64, i64* %11
%28 = getelementptr inbounds double, double* %26, i64 %27
store double* %28, double** %13
%29 = load double*, double** %9
%30 = load i64, i64* %11
%31 = getelementptr inbounds double, double* %29, i64 %30
store double* %31, double** %14
%32 = load i64, i64* %12
%33 = load i8*, i8** %6
%34 = bitcast i8* %33 to double*
%35 = getelementptr inbounds double, double* %34, i64 0
%36 = load double, double* %35
store double %36, double* %15
%37 = load i8*, i8** %6
%38 = bitcast i8* %37 to double*
%39 = getelementptr inbounds double, double* %38, i64 1
%40 = load double, double* %39
store double %40, double* %16
%41 = load double, double* %15
%42 = load double*, double** %13
%43 = load double, double* %42
%44 = call double @fabs(double %43)
%45 = load double, double* %16
%46 = call double @llvm.fmuladd.f64(double %41, double %44, double %45)
%47 = load double*, double** %14
store double %46, double* %47
br label %48
48: ; preds = %22
%49 = load i64, i64* %11
%50 = add i64 %49, 1
store i64 %50, i64* %11
br label %18
51: ; preds = %18
ret void
}

LLVM IR (-O2):
define void @vector_update_wt_operation_inner(i8* noalias nocapture %0, i64 %1, double* noalias nocapture %2, double* noalias nocapture writeonly %3, i64 %4) {
%6 = icmp eq i64 %4, 0
br i1 %6, label %97, label %7
7: ; preds = %5
%8 = bitcast i8* %0 to double*
%9 = load double, double* %8
%10 = getelementptr inbounds i8, i8* %0, i64 8
%11 = bitcast i8* %10 to double*
%12 = load double, double* %11
%13 = icmp ult i64 %4, 4
br i1 %13, label %86, label %14
14: ; preds = %7
%15 = and i64 %4, -4
%16 = insertelement <2 x double> poison, double %9, i64 0
%17 = shufflevector <2 x double> %16, <2 x double> poison, <2 x i32> zeroinitializer
%18 = insertelement <2 x double> poison, double %12, i64 0
%19 = shufflevector <2 x double> %18, <2 x double> poison, <2 x i32> zeroinitializer
%20 = insertelement <2 x double> poison, double %9, i64 0
%21 = shufflevector <2 x double> %20, <2 x double> poison, <2 x i32> zeroinitializer
%22 = insertelement <2 x double> poison, double %12, i64 0
%23 = shufflevector <2 x double> %22, <2 x double> poison, <2 x i32> zeroinitializer
%24 = add i64 %15, -4
%25 = lshr exact i64 %24, 2
%26 = add nuw nsw i64 %25, 1
%27 = and i64 %26, 1
%28 = icmp eq i64 %24, 0
br i1 %28, label %66, label %29
29: ; preds = %14
%30 = and i64 %26, 9223372036854775806
br label %31
31: ; preds = %31, %29
%32 = phi i64 [ 0, %29 ], [ %63, %31 ]
%33 = phi i64 [ 0, %29 ], [ %64, %31 ]
%34 = getelementptr inbounds double, double* %2, i64 %32
%35 = getelementptr inbounds double, double* %3, i64 %32
%36 = bitcast double* %34 to <2 x double>*
%37 = load <2 x double>, <2 x double>* %36
%38 = getelementptr inbounds double, double* %34, i64 2
%39 = bitcast double* %38 to <2 x double>*
%40 = load <2 x double>, <2 x double>* %39
%41 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %37)
%42 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %40)
%43 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %17, <2 x double> %41, <2 x double> %19)
%44 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %21, <2 x double> %42, <2 x double> %23)
%45 = bitcast double* %35 to <2 x double>*
store <2 x double> %43, <2 x double>* %45
%46 = getelementptr inbounds double, double* %35, i64 2
%47 = bitcast double* %46 to <2 x double>*
store <2 x double> %44, <2 x double>* %47
%48 = or i64 %32, 4
%49 = getelementptr inbounds double, double* %2, i64 %48
%50 = getelementptr inbounds double, double* %3, i64 %48
%51 = bitcast double* %49 to <2 x double>*
%52 = load <2 x double>, <2 x double>* %51
%53 = getelementptr inbounds double, double* %49, i64 2
%54 = bitcast double* %53 to <2 x double>*
%55 = load <2 x double>, <2 x double>* %54
%56 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %52)
%57 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %55)
%58 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %17, <2 x double> %56, <2 x double> %19)
%59 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %21, <2 x double> %57, <2 x double> %23)
%60 = bitcast double* %50 to <2 x double>*
store <2 x double> %58, <2 x double>* %60
%61 = getelementptr inbounds double, double* %50, i64 2
%62 = bitcast double* %61 to <2 x double>*
store <2 x double> %59, <2 x double>* %62
%63 = add nuw i64 %32, 8
%64 = add i64 %33, 2
%65 = icmp eq i64 %64, %30
br i1 %65, label %66, label %31
66: ; preds = %31, %14
%67 = phi i64 [ 0, %14 ], [ %63, %31 ]
%68 = icmp eq i64 %27, 0
br i1 %68, label %84, label %69
69: ; preds = %66
%70 = getelementptr inbounds double, double* %2, i64 %67
%71 = getelementptr inbounds double, double* %3, i64 %67
%72 = bitcast double* %70 to <2 x double>*
%73 = load <2 x double>, <2 x double>* %72
%74 = getelementptr inbounds double, double* %70, i64 2
%75 = bitcast double* %74 to <2 x double>*
%76 = load <2 x double>, <2 x double>* %75
%77 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %73)
%78 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %76)
%79 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %17, <2 x double> %77, <2 x double> %19)
%80 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %21, <2 x double> %78, <2 x double> %23)
%81 = bitcast double* %71 to <2 x double>*
store <2 x double> %79, <2 x double>* %81
%82 = getelementptr inbounds double, double* %71, i64 2
%83 = bitcast double* %82 to <2 x double>*
store <2 x double> %80, <2 x double>* %83
br label %84
84: ; preds = %66, %69
%85 = icmp eq i64 %15, %4
br i1 %85, label %97, label %86
86: ; preds = %7, %84
%87 = phi i64 [ 0, %7 ], [ %15, %84 ]
br label %88
88: ; preds = %86, %88
%89 = phi i64 [ %95, %88 ], [ %87, %86 ]
%90 = getelementptr inbounds double, double* %2, i64 %89
%91 = getelementptr inbounds double, double* %3, i64 %89
%92 = load double, double* %90
%93 = tail call double @llvm.fabs.f64(double %92)
%94 = tail call double @llvm.fmuladd.f64(double %9, double %93, double %12)
store double %94, double* %91
%95 = add nuw i64 %89, 1
%96 = icmp eq i64 %95, %4
br i1 %96, label %97, label %88
97: ; preds = %88, %84, %5
ret void
}