; LLVM IR from cfd-rg-solver/FVM-RG-Solver :: src/coeffsolver.ll (ZN21CoeffSolver1Comp1Temp6lambdaE10macroParam)

; 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"

%struct.macroParam = type { %struct.Mixture, %"class.std::vector.0", %"class.std::vector.0", double, double, double, double, double, double, double, double, %"class.std::__cxx11::basic_string" }
%struct.Mixture = type <{ %"class.std::vector", i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<MixtureComponent, std::allocator<MixtureComponent>>::_Vector_impl" }
%"struct.std::_Vector_base<MixtureComponent, std::allocator<MixtureComponent>>::_Vector_impl" = type { %"struct.std::_Vector_base<MixtureComponent, std::allocator<MixtureComponent>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MixtureComponent, std::allocator<MixtureComponent>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%struct.MixtureComponent = type { double, double, double, double, double, i32, i32, %"class.std::__cxx11::basic_string" }

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorI16MixtureComponentSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef, i32 noundef) #3

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN21CoeffSolver1Comp1Temp6lambdaE10macroParam(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1) unnamed_addr #4 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %8 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %9 = getelementptr inbounds %struct.macroParam, ptr %1, i32 0, i32 8
  %10 = load double, ptr %9, align 8, !tbaa !9
  %11 = fmul double 0x3B30B0E674035E1A, %10
  %12 = getelementptr inbounds %struct.macroParam, ptr %1, i32 0, i32 0
  %13 = getelementptr inbounds %struct.Mixture, ptr %12, i32 0, i32 0
  %14 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorI16MixtureComponentSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef 0) #5
  %15 = getelementptr inbounds %struct.MixtureComponent, ptr %14, i32 0, i32 2
  %16 = load double, ptr %15, align 8, !tbaa !25
  %17 = fmul double 0x400921FB54442D18, %16
  %18 = fdiv double %11, %17
  %19 = call double @sqrt(double noundef %18) #5
  store double %19, ptr %5, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %20 = getelementptr inbounds %struct.macroParam, ptr %1, i32 0, i32 0
  %21 = getelementptr inbounds %struct.Mixture, ptr %20, i32 0, i32 0
  %22 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorI16MixtureComponentSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef 0) #5
  %23 = getelementptr inbounds %struct.MixtureComponent, ptr %22, i32 0, i32 3
  %24 = load double, ptr %23, align 8, !tbaa !28
  %25 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %24, i32 noundef 2)
  %26 = fmul double 0x401921FB54442D18, %25
  store double %26, ptr %6, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %27 = load double, ptr %5, align 8, !tbaa !27
  %28 = load double, ptr %6, align 8, !tbaa !27
  %29 = fmul double %27, %28
  store double %29, ptr %7, align 8, !tbaa !27
  %30 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef 0x3B30B0E674035E1A, i32 noundef 2)
  %31 = fmul double 7.500000e+01, %30
  %32 = getelementptr inbounds %struct.macroParam, ptr %1, i32 0, i32 8
  %33 = load double, ptr %32, align 8, !tbaa !9
  %34 = fmul double %31, %33
  %35 = getelementptr inbounds %struct.macroParam, ptr %1, i32 0, i32 0
  %36 = getelementptr inbounds %struct.Mixture, ptr %35, i32 0, i32 0
  %37 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorI16MixtureComponentSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef 0) #5
  %38 = getelementptr inbounds %struct.MixtureComponent, ptr %37, i32 0, i32 2
  %39 = load double, ptr %38, align 8, !tbaa !25
  %40 = fmul double 3.200000e+01, %39
  %41 = load double, ptr %7, align 8, !tbaa !27
  %42 = fmul double %40, %41
  %43 = fdiv double %34, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret double %43
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "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 = { mustprogress 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 #3 = { inlinehint mustprogress 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 #4 = { mustprogress 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 #5 = { 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++ TBAA"}
!9 = !{!10, !21, i64 120}
!10 = !{!"_ZTS10macroParam", !11, i64 0, !17, i64 32, !17, i64 56, !21, i64 80, !21, i64 88, !21, i64 96, !21, i64 104, !21, i64 112, !21, i64 120, !21, i64 128, !21, i64 136, !22, i64 144}
!11 = !{!"_ZTS7Mixture", !12, i64 0, !16, i64 24}
!12 = !{!"_ZTSSt6vectorI16MixtureComponentSaIS0_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseI16MixtureComponentSaIS0_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseI16MixtureComponentSaIS0_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseI16MixtureComponentSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTSSt6vectorIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"double", !7, i64 0}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !23, i64 0, !24, i64 8, !7, i64 16}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = !{!26, !21, i64 16}
!26 = !{!"_ZTS16MixtureComponent", !21, i64 0, !21, i64 8, !21, i64 16, !21, i64 24, !21, i64 32, !16, i64 40, !16, i64 44, !22, i64 48}
!27 = !{!21, !21, i64 0}
!28 = !{!26, !21, i64 24}


; 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 nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorI16MixtureComponentSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZN21CoeffSolver1Comp1Temp6lambdaE10macroParam(ptr nocapture noundef nonnull readnone align 8 dereferenceable(8) %0, ptr noundef nonnull %1) unnamed_addr #1 align 2 {
  %3 = getelementptr inbounds i8, ptr %1, i64 120
  %4 = load double, ptr %3, align 8, !tbaa !5
  %5 = fmul double %4, 0x3B30B0E674035E1A
  %6 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorI16MixtureComponentSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #3
  %7 = getelementptr inbounds i8, ptr %6, i64 16
  %8 = load double, ptr %7, align 8, !tbaa !24
  %9 = fmul double %8, 0x400921FB54442D18
  %10 = fdiv double %5, %9
  %11 = tail call double @sqrt(double noundef %10) #3
  %12 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorI16MixtureComponentSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #3
  %13 = getelementptr inbounds i8, ptr %12, i64 24
  %14 = load double, ptr %13, align 8, !tbaa !26
  %15 = tail call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %14, i32 noundef 2)
  %16 = fmul double %15, 0x401921FB54442D18
  %17 = fmul double %11, %16
  %18 = tail call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef 0x3B30B0E674035E1A, i32 noundef 2)
  %19 = load double, ptr %3, align 8, !tbaa !5
  %20 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorI16MixtureComponentSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #3
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  %22 = load double, ptr %21, align 8, !tbaa !24
  %23 = insertelement <2 x double> poison, double %18, i64 0
  %24 = insertelement <2 x double> %23, double %22, i64 1
  %25 = fmul <2 x double> %24, <double 7.500000e+01, double 3.200000e+01>
  %26 = insertelement <2 x double> poison, double %19, i64 0
  %27 = insertelement <2 x double> %26, double %17, i64 1
  %28 = fmul <2 x double> %25, %27
  %29 = extractelement <2 x double> %28, i64 0
  %30 = extractelement <2 x double> %28, i64 1
  %31 = fdiv double %29, %30
  ret double %31
}

attributes #0 = { mustprogress nofree nounwind willreturn memory(write) "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 #1 = { mustprogress 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 = { inlinehint mustprogress 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 #3 = { 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, !20, i64 120}
!6 = !{!"_ZTS10macroParam", !7, i64 0, !16, i64 32, !16, i64 56, !20, i64 80, !20, i64 88, !20, i64 96, !20, i64 104, !20, i64 112, !20, i64 120, !20, i64 128, !20, i64 136, !21, i64 144}
!7 = !{!"_ZTS7Mixture", !8, i64 0, !15, i64 24}
!8 = !{!"_ZTSSt6vectorI16MixtureComponentSaIS0_EE", !9, i64 0}
!9 = !{!"_ZTSSt12_Vector_baseI16MixtureComponentSaIS0_EE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseI16MixtureComponentSaIS0_EE12_Vector_implE", !11, i64 0}
!11 = !{!"_ZTSNSt12_Vector_baseI16MixtureComponentSaIS0_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!12 = !{!"any pointer", !13, i64 0}
!13 = !{!"omnipotent char", !14, i64 0}
!14 = !{!"Simple C++ TBAA"}
!15 = !{!"int", !13, i64 0}
!16 = !{!"_ZTSSt6vectorIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!20 = !{!"double", !13, i64 0}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !22, i64 0, !23, i64 8, !13, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !12, i64 0}
!23 = !{!"long", !13, i64 0}
!24 = !{!25, !20, i64 16}
!25 = !{!"_ZTS16MixtureComponent", !20, i64 0, !20, i64 8, !20, i64 16, !20, i64 24, !20, i64 32, !15, i64 40, !15, i64 44, !21, i64 48}
!26 = !{!25, !20, i64 24}


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