; LLVM IR from facebook/hermes :: API/hermes_sandbox/external (hermes_sandbox_impl_compiled_0)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
define dso_local double @w2c_hermes_R(ptr noundef %0, double noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store double %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #2
  %11 = load double, ptr %4, align 8, !tbaa !9
  store double %11, ptr %5, align 8, !tbaa !9
  %12 = load double, ptr %4, align 8, !tbaa !9
  store double %12, ptr %6, align 8, !tbaa !9
  %13 = load double, ptr %4, align 8, !tbaa !9
  store double %13, ptr %7, align 8, !tbaa !9
  %14 = load double, ptr %4, align 8, !tbaa !9
  store double %14, ptr %8, align 8, !tbaa !9
  %15 = load double, ptr %4, align 8, !tbaa !9
  store double %15, ptr %9, align 8, !tbaa !9
  store double 0x3F023DE10DFDF709, ptr %10, align 8, !tbaa !9
  %16 = load double, ptr %10, align 8, !tbaa !9
  %17 = load double, ptr %9, align 8, !tbaa !9
  %18 = fmul double %17, %16
  store double %18, ptr %9, align 8, !tbaa !9
  store double 0x3F49EFE07501B288, ptr %10, align 8, !tbaa !9
  %19 = load double, ptr %10, align 8, !tbaa !9
  %20 = load double, ptr %9, align 8, !tbaa !9
  %21 = fadd double %20, %19
  store double %21, ptr %9, align 8, !tbaa !9
  %22 = load double, ptr %9, align 8, !tbaa !9
  %23 = load double, ptr %8, align 8, !tbaa !9
  %24 = fmul double %23, %22
  store double %24, ptr %8, align 8, !tbaa !9
  store double 0xBFA48228B5688F3B, ptr %9, align 8, !tbaa !9
  %25 = load double, ptr %9, align 8, !tbaa !9
  %26 = load double, ptr %8, align 8, !tbaa !9
  %27 = fadd double %26, %25
  store double %27, ptr %8, align 8, !tbaa !9
  %28 = load double, ptr %8, align 8, !tbaa !9
  %29 = load double, ptr %7, align 8, !tbaa !9
  %30 = fmul double %29, %28
  store double %30, ptr %7, align 8, !tbaa !9
  store double 0x3FC9C1550E884455, ptr %8, align 8, !tbaa !9
  %31 = load double, ptr %8, align 8, !tbaa !9
  %32 = load double, ptr %7, align 8, !tbaa !9
  %33 = fadd double %32, %31
  store double %33, ptr %7, align 8, !tbaa !9
  %34 = load double, ptr %7, align 8, !tbaa !9
  %35 = load double, ptr %6, align 8, !tbaa !9
  %36 = fmul double %35, %34
  store double %36, ptr %6, align 8, !tbaa !9
  store double 0xBFD4D61203EB6F7D, ptr %7, align 8, !tbaa !9
  %37 = load double, ptr %7, align 8, !tbaa !9
  %38 = load double, ptr %6, align 8, !tbaa !9
  %39 = fadd double %38, %37
  store double %39, ptr %6, align 8, !tbaa !9
  %40 = load double, ptr %6, align 8, !tbaa !9
  %41 = load double, ptr %5, align 8, !tbaa !9
  %42 = fmul double %41, %40
  store double %42, ptr %5, align 8, !tbaa !9
  store double 0x3FC5555555555555, ptr %6, align 8, !tbaa !9
  %43 = load double, ptr %6, align 8, !tbaa !9
  %44 = load double, ptr %5, align 8, !tbaa !9
  %45 = fadd double %44, %43
  store double %45, ptr %5, align 8, !tbaa !9
  %46 = load double, ptr %4, align 8, !tbaa !9
  store double %46, ptr %6, align 8, !tbaa !9
  %47 = load double, ptr %6, align 8, !tbaa !9
  %48 = load double, ptr %5, align 8, !tbaa !9
  %49 = fmul double %48, %47
  store double %49, ptr %5, align 8, !tbaa !9
  %50 = load double, ptr %4, align 8, !tbaa !9
  store double %50, ptr %6, align 8, !tbaa !9
  %51 = load double, ptr %4, align 8, !tbaa !9
  store double %51, ptr %7, align 8, !tbaa !9
  %52 = load double, ptr %4, align 8, !tbaa !9
  store double %52, ptr %8, align 8, !tbaa !9
  %53 = load double, ptr %4, align 8, !tbaa !9
  store double %53, ptr %9, align 8, !tbaa !9
  store double 0x3FB3B8C5B12E9282, ptr %10, align 8, !tbaa !9
  %54 = load double, ptr %10, align 8, !tbaa !9
  %55 = load double, ptr %9, align 8, !tbaa !9
  %56 = fmul double %55, %54
  store double %56, ptr %9, align 8, !tbaa !9
  store double 0xBFE6066C1B8D0159, ptr %10, align 8, !tbaa !9
  %57 = load double, ptr %10, align 8, !tbaa !9
  %58 = load double, ptr %9, align 8, !tbaa !9
  %59 = fadd double %58, %57
  store double %59, ptr %9, align 8, !tbaa !9
  %60 = load double, ptr %9, align 8, !tbaa !9
  %61 = load double, ptr %8, align 8, !tbaa !9
  %62 = fmul double %61, %60
  store double %62, ptr %8, align 8, !tbaa !9
  store double 0x40002AE59C598AC8, ptr %9, align 8, !tbaa !9
  %63 = load double, ptr %9, align 8, !tbaa !9
  %64 = load double, ptr %8, align 8, !tbaa !9
  %65 = fadd double %64, %63
  store double %65, ptr %8, align 8, !tbaa !9
  %66 = load double, ptr %8, align 8, !tbaa !9
  %67 = load double, ptr %7, align 8, !tbaa !9
  %68 = fmul double %67, %66
  store double %68, ptr %7, align 8, !tbaa !9
  store double 0xC0033A271C8A2D4B, ptr %8, align 8, !tbaa !9
  %69 = load double, ptr %8, align 8, !tbaa !9
  %70 = load double, ptr %7, align 8, !tbaa !9
  %71 = fadd double %70, %69
  store double %71, ptr %7, align 8, !tbaa !9
  %72 = load double, ptr %7, align 8, !tbaa !9
  %73 = load double, ptr %6, align 8, !tbaa !9
  %74 = fmul double %73, %72
  store double %74, ptr %6, align 8, !tbaa !9
  store double 1.000000e+00, ptr %7, align 8, !tbaa !9
  %75 = load double, ptr %7, align 8, !tbaa !9
  %76 = load double, ptr %6, align 8, !tbaa !9
  %77 = fadd double %76, %75
  store double %77, ptr %6, align 8, !tbaa !9
  %78 = load double, ptr %6, align 8, !tbaa !9
  %79 = load double, ptr %5, align 8, !tbaa !9
  %80 = fdiv double %79, %78
  store double %80, ptr %5, align 8, !tbaa !9
  %81 = load double, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #2
  ret double %81
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
define dso_local double @w2c_hermes_R(ptr nocapture noundef readnone %0, double noundef %1) local_unnamed_addr #0 {
  %3 = fmul double %1, 0x3F023DE10DFDF709
  %4 = fadd double %3, 0x3F49EFE07501B288
  %5 = insertelement <2 x double> poison, double %1, i64 0
  %6 = shufflevector <2 x double> %5, <2 x double> poison, <2 x i32> zeroinitializer
  %7 = insertelement <2 x double> <double poison, double 0x3FB3B8C5B12E9282>, double %4, i64 0
  %8 = fmul <2 x double> %6, %7
  %9 = fadd <2 x double> %8, <double 0xBFA48228B5688F3B, double 0xBFE6066C1B8D0159>
  %10 = fmul <2 x double> %9, %6
  %11 = fadd <2 x double> %10, <double 0x3FC9C1550E884455, double 0x40002AE59C598AC8>
  %12 = fmul <2 x double> %11, %6
  %13 = fadd <2 x double> %12, <double 0xBFD4D61203EB6F7D, double 0xC0033A271C8A2D4B>
  %14 = fmul <2 x double> %13, %6
  %15 = fadd <2 x double> %14, <double 0x3FC5555555555555, double 1.000000e+00>
  %16 = extractelement <2 x double> %15, i64 0
  %17 = fmul double %16, %1
  %18 = extractelement <2 x double> %15, i64 1
  %19 = fdiv double %17, %18
  ret double %19
}

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass