; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/tests (test_i)

; 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: 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) #0

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6alglib13real_1d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(81), i64 noundef) #1

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN6alglib13real_1d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(81), i64 noundef) #1

declare noundef ptr @_ZN6alglib13real_2d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(97), i64 noundef) #1

; Function Attrs: nounwind
declare double @exp(double noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z18function_cx_1_hessRKN6alglib13real_1d_arrayES2_RdRS0_RNS_13real_2d_arrayEPv(ptr noundef nonnull align 8 dereferenceable(81) %0, ptr noundef nonnull align 8 dereferenceable(81) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(81) %3, ptr noundef nonnull align 8 dereferenceable(97) %4, ptr noundef %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  %13 = load ptr, ptr %7, align 8, !tbaa !5
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6alglib13real_1d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(81) %13, i64 noundef 0)
  %15 = load double, ptr %14, align 8, !tbaa !9
  %16 = fneg double %15
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6alglib13real_1d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(81) %17, i64 noundef 0)
  %19 = load double, ptr %18, align 8, !tbaa !9
  %20 = 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 %19, i32 noundef 2)
  %21 = fmul double %16, %20
  %22 = call double @exp(double noundef %21) #4
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  store double %22, ptr %23, align 8, !tbaa !9
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6alglib13real_1d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(81) %24, i64 noundef 0)
  %26 = load double, ptr %25, align 8, !tbaa !9
  %27 = 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 %26, i32 noundef 2)
  %28 = fneg double %27
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  %30 = load double, ptr %29, align 8, !tbaa !9
  %31 = fmul double %28, %30
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6alglib13real_1d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(81) %32, i64 noundef 0)
  store double %31, ptr %33, align 8, !tbaa !9
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6alglib13real_1d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(81) %34, i64 noundef 0)
  %36 = load double, ptr %35, align 8, !tbaa !9
  %37 = 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 %36, i32 noundef 4)
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = load double, ptr %38, align 8, !tbaa !9
  %40 = fmul double %37, %39
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  %42 = call noundef ptr @_ZN6alglib13real_2d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(97) %41, i64 noundef 0)
  %43 = getelementptr inbounds double, ptr %42, i64 0
  store double %40, ptr %43, align 8, !tbaa !9
  ret void
}

attributes #0 = { 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 #1 = { "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 "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 = { 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 #4 = { 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, !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: 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 #0

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6alglib13real_1d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(81), i64 noundef) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN6alglib13real_1d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(81), i64 noundef) local_unnamed_addr #1

declare noundef ptr @_ZN6alglib13real_2d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(97), i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @exp(double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z18function_cx_1_hessRKN6alglib13real_1d_arrayES2_RdRS0_RNS_13real_2d_arrayEPv(ptr noundef nonnull align 8 dereferenceable(81) %0, ptr noundef nonnull align 8 dereferenceable(81) %1, ptr nocapture noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(81) %3, ptr noundef nonnull align 8 dereferenceable(97) %4, ptr nocapture noundef readnone %5) local_unnamed_addr #3 {
  %7 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6alglib13real_1d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(81) %0, i64 noundef 0)
  %8 = load double, ptr %7, align 8, !tbaa !5
  %9 = fneg double %8
  %10 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6alglib13real_1d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(81) %1, i64 noundef 0)
  %11 = load double, ptr %10, align 8, !tbaa !5
  %12 = 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 %11, i32 noundef 2)
  %13 = fmul double %12, %9
  %14 = tail call double @exp(double noundef %13) #4
  store double %14, ptr %2, align 8, !tbaa !5
  %15 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6alglib13real_1d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(81) %1, i64 noundef 0)
  %16 = load double, ptr %15, align 8, !tbaa !5
  %17 = 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 %16, i32 noundef 2)
  %18 = fneg double %17
  %19 = load double, ptr %2, align 8, !tbaa !5
  %20 = fmul double %19, %18
  %21 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6alglib13real_1d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(81) %3, i64 noundef 0)
  store double %20, ptr %21, align 8, !tbaa !5
  %22 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6alglib13real_1d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(81) %1, i64 noundef 0)
  %23 = load double, ptr %22, align 8, !tbaa !5
  %24 = 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 %23, i32 noundef 4)
  %25 = load double, ptr %2, align 8, !tbaa !5
  %26 = fmul double %24, %25
  %27 = tail call noundef ptr @_ZN6alglib13real_2d_arrayixEl(ptr noundef nonnull align 8 dereferenceable(97) %4, i64 noundef 0)
  store double %26, ptr %27, align 8, !tbaa !5
  ret void
}

attributes #0 = { 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 #1 = { "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 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 #3 = { 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 #4 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


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