; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src (integration)

; 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.alglib::xparams" = type { i64 }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%"struct.alglib_impl::ae_state" = type { i64, double, double, double, ptr, %"struct.alglib_impl::ae_dyn_block", ptr, i32, ptr, i64, ptr, ptr, ptr }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"class.alglib::autogkstate" = type { %"class.alglib::_autogkstate_owner.base", ptr, ptr, ptr, ptr, ptr }
%"class.alglib::_autogkstate_owner.base" = type <{ ptr, ptr, i8 }>

@_ZTIN6alglib8ap_errorE = external dso_local constant { ptr, ptr }, align 8
@.str.8 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [48 x i8], align 1

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

declare void @_ZN11alglib_impl13ae_state_initEPNS_8ae_stateE(ptr noundef) #1

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) #2

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZN6alglib8ap_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6alglib8ap_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @_ZN11alglib_impl23ae_state_set_break_jumpEPNS_8ae_stateEPA1_13__jmp_buf_tag(ptr noundef, ptr noundef) #1

declare void @_ZN11alglib_impl18ae_state_set_flagsEPNS_8ae_stateEy(ptr noundef, i64 noundef) #1

declare void @_ZN11alglib_impl14ae_state_clearEPNS_8ae_stateE(ptr noundef) #1

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

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) #1

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #4

declare ptr @__cxa_begin_catch(ptr)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6alglib18_autogkstate_owner5c_ptrEv(ptr noundef nonnull align 8 dereferenceable(17)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl15autogkiterationEPNS_11autogkstateEPNS_8ae_stateE(ptr noundef, ptr noundef) #6

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6alglib15autogkintegrateERNS_11autogkstateEPFvdddRdPvES3_NS_7xparamsE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %1, ptr noundef %2, i64 %3) #6 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.alglib::xparams", align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca [1 x %struct.__jmp_buf_tag], align 16
  %10 = alloca %"struct.alglib_impl::ae_state", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = getelementptr inbounds %"struct.alglib::xparams", ptr %5, i32 0, i32 0
  store i64 %3, ptr %13, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 200, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 128, ptr %10) #7
  call void @_ZN11alglib_impl13ae_state_initEPNS_8ae_stateE(ptr noundef %10)
  %14 = getelementptr inbounds [1 x %struct.__jmp_buf_tag], ptr %9, i64 0, i64 0
  %15 = call i32 @_setjmp(ptr noundef %14) #8
  %16 = icmp ne i32 %15, 0
  br i1 %16, label %17, label %26

17:                                               ; preds = %4
  %18 = call ptr @__cxa_allocate_exception(i64 32) #7
  %19 = getelementptr inbounds %"struct.alglib_impl::ae_state", ptr %10, i32 0, i32 8
  %20 = load volatile ptr, ptr %19, align 8, !tbaa !9
  invoke void @_ZN6alglib8ap_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef %20)
          to label %21 unwind label %22

21:                                               ; preds = %17
  call void @__cxa_throw(ptr %18, ptr @_ZTIN6alglib8ap_errorE, ptr @_ZN6alglib8ap_errorD2Ev) #9
  unreachable

22:                                               ; preds = %17
  %23 = landingpad { ptr, i32 }
          cleanup
  %24 = extractvalue { ptr, i32 } %23, 0
  store ptr %24, ptr %11, align 8
  %25 = extractvalue { ptr, i32 } %23, 1
  store i32 %25, ptr %12, align 4
  call void @__cxa_free_exception(ptr %18) #7
  br label %82

26:                                               ; preds = %4
  call void @_ZN11alglib_impl23ae_state_set_break_jumpEPNS_8ae_stateEPA1_13__jmp_buf_tag(ptr noundef %10, ptr noundef %9)
  %27 = getelementptr inbounds %"struct.alglib::xparams", ptr %5, i32 0, i32 0
  %28 = load i64, ptr %27, align 8, !tbaa !16
  %29 = icmp ne i64 %28, 0
  br i1 %29, label %30, label %33

30:                                               ; preds = %26
  %31 = getelementptr inbounds %"struct.alglib::xparams", ptr %5, i32 0, i32 0
  %32 = load i64, ptr %31, align 8, !tbaa !16
  call void @_ZN11alglib_impl18ae_state_set_flagsEPNS_8ae_stateEy(ptr noundef %10, i64 noundef %32)
  br label %33

33:                                               ; preds = %30, %26
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %35, ptr noundef @.str.8, ptr noundef %10)
  br label %36

36:                                               ; preds = %80, %64, %33
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = call noundef ptr @_ZN6alglib18_autogkstate_owner5c_ptrEv(ptr noundef nonnull align 8 dereferenceable(17) %37)
  %39 = call noundef zeroext i1 @_ZN11alglib_impl15autogkiterationEPNS_11autogkstateEPNS_8ae_stateE(ptr noundef %38, ptr noundef %10)
  br i1 %39, label %40, label %81

40:                                               ; preds = %36
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %"class.alglib::autogkstate", ptr %41, i32 0, i32 1
  %43 = load ptr, ptr %42, align 8, !tbaa !18
  %44 = load i8, ptr %43, align 1, !tbaa !22, !range !23, !noundef !24
  %45 = trunc i8 %44 to i1
  br i1 %45, label %46, label %73

46:                                               ; preds = %40
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %"class.alglib::autogkstate", ptr %48, i32 0, i32 2
  %50 = load ptr, ptr %49, align 8, !tbaa !25
  %51 = load double, ptr %50, align 8, !tbaa !26
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %"class.alglib::autogkstate", ptr %52, i32 0, i32 3
  %54 = load ptr, ptr %53, align 8, !tbaa !27
  %55 = load double, ptr %54, align 8, !tbaa !26
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds %"class.alglib::autogkstate", ptr %56, i32 0, i32 4
  %58 = load ptr, ptr %57, align 8, !tbaa !28
  %59 = load double, ptr %58, align 8, !tbaa !26
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = getelementptr inbounds %"class.alglib::autogkstate", ptr %60, i32 0, i32 5
  %62 = load ptr, ptr %61, align 8, !tbaa !29
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void %47(double noundef %51, double noundef %55, double noundef %59, ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef %63)
          to label %64 unwind label %65

64:                                               ; preds = %46
  br label %36, !llvm.loop !30

65:                                               ; preds = %46
  %66 = landingpad { ptr, i32 }
          catch ptr null
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %11, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %12, align 4
  br label %69

69:                                               ; preds = %65
  %70 = load ptr, ptr %11, align 8
  %71 = call ptr @__cxa_begin_catch(ptr %70) #7
  invoke void @_ZN11alglib_impl27ae_clean_up_before_breakingEPNS_8ae_stateE(ptr noundef %10)
          to label %72 unwind label %74

72:                                               ; preds = %69
  invoke void @__cxa_rethrow() #9
          to label %91 unwind label %74

73:                                               ; preds = %40
  br label %80

74:                                               ; preds = %72, %69
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %11, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %12, align 4
  invoke void @__cxa_end_catch()
          to label %78 unwind label %88

78:                                               ; preds = %74
  br label %82

79:                                               ; No predecessors!
  br label %80

80:                                               ; preds = %79, %73
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef @.str.9, ptr noundef %10)
  br label %36, !llvm.loop !30

81:                                               ; preds = %36
  call void @_ZN11alglib_impl14ae_state_clearEPNS_8ae_stateE(ptr noundef %10)
  call void @llvm.lifetime.end.p0(i64 128, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 200, ptr %9) #7
  ret void

82:                                               ; preds = %78, %22
  call void @llvm.lifetime.end.p0(i64 128, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 200, ptr %9) #7
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr %11, align 8
  %85 = load i32, ptr %12, align 4
  %86 = insertvalue { ptr, i32 } poison, ptr %84, 0
  %87 = insertvalue { ptr, i32 } %86, i32 %85, 1
  resume { ptr, i32 } %87

88:                                               ; preds = %74
  %89 = landingpad { ptr, i32 }
          catch ptr null
  %90 = extractvalue { ptr, i32 } %89, 0
  call void @__clang_call_terminate(ptr %90) #10
  unreachable

91:                                               ; preds = %72
  unreachable
}

declare void @_ZN11alglib_impl27ae_clean_up_before_breakingEPNS_8ae_stateE(ptr noundef) #1

declare void @__cxa_rethrow()

declare void @__cxa_end_catch()

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 returns_twice "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 = { noinline noreturn nounwind uwtable "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 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind returns_twice }
attributes #9 = { noreturn }
attributes #10 = { noreturn 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, !6, i64 88}
!10 = !{!"_ZTSN11alglib_impl8ae_stateE", !11, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !6, i64 32, !13, i64 40, !6, i64 72, !14, i64 80, !6, i64 88, !15, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!11 = !{!"long", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!14 = !{!"_ZTSN11alglib_impl13ae_error_typeE", !7, i64 0}
!15 = !{!"long long", !7, i64 0}
!16 = !{!17, !15, i64 0}
!17 = !{!"_ZTSN6alglib7xparamsE", !15, i64 0}
!18 = !{!19, !6, i64 24}
!19 = !{!"_ZTSN6alglib11autogkstateE", !20, i64 0, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!20 = !{!"_ZTSN6alglib18_autogkstate_ownerE", !6, i64 8, !21, i64 16}
!21 = !{!"bool", !7, i64 0}
!22 = !{!21, !21, i64 0}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!19, !6, i64 32}
!26 = !{!12, !12, i64 0}
!27 = !{!19, !6, i64 40}
!28 = !{!19, !6, i64 48}
!29 = !{!19, !6, i64 56}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


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

%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%"struct.alglib_impl::ae_state" = type { i64, double, double, double, ptr, %"struct.alglib_impl::ae_dyn_block", ptr, i32, ptr, i64, ptr, ptr, ptr }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }

@_ZTIN6alglib8ap_errorE = external dso_local constant { ptr, ptr }, align 8
@.str.8 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [48 x i8], align 1

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

declare void @_ZN11alglib_impl13ae_state_initEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) local_unnamed_addr #2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZN6alglib8ap_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6alglib8ap_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare void @_ZN11alglib_impl23ae_state_set_break_jumpEPNS_8ae_stateEPA1_13__jmp_buf_tag(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl18ae_state_set_flagsEPNS_8ae_stateEy(ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl14ae_state_clearEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #1

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

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #4

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6alglib18_autogkstate_owner5c_ptrEv(ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl15autogkiterationEPNS_11autogkstateEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6alglib15autogkintegrateERNS_11autogkstateEPFvdddRdPvES3_NS_7xparamsE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef readonly %1, ptr noundef %2, i64 %3) local_unnamed_addr #6 personality ptr @__gxx_personality_v0 {
  %5 = alloca [1 x %struct.__jmp_buf_tag], align 16
  %6 = alloca %"struct.alglib_impl::ae_state", align 8
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %6) #7
  call void @_ZN11alglib_impl13ae_state_initEPNS_8ae_stateE(ptr noundef nonnull %6)
  %7 = call i32 @_setjmp(ptr noundef nonnull %5) #8
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %15, label %8

8:                                                ; preds = %4
  %9 = call ptr @__cxa_allocate_exception(i64 32) #7
  %10 = getelementptr inbounds i8, ptr %6, i64 88
  %11 = load volatile ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN6alglib8ap_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %11)
          to label %12 unwind label %13

12:                                               ; preds = %8
  call void @__cxa_throw(ptr nonnull %9, ptr nonnull @_ZTIN6alglib8ap_errorE, ptr nonnull @_ZN6alglib8ap_errorD2Ev) #9
  unreachable

13:                                               ; preds = %8
  %14 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %9) #7
  br label %48

15:                                               ; preds = %4
  call void @_ZN11alglib_impl23ae_state_set_break_jumpEPNS_8ae_stateEPA1_13__jmp_buf_tag(ptr noundef nonnull %6, ptr noundef nonnull %5)
  %.not14 = icmp eq i64 %3, 0
  br i1 %.not14, label %17, label %16

16:                                               ; preds = %15
  call void @_ZN11alglib_impl18ae_state_set_flagsEPNS_8ae_stateEy(ptr noundef nonnull %6, i64 noundef %3)
  br label %17

17:                                               ; preds = %16, %15
  %18 = icmp ne ptr %1, null
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.8, ptr noundef nonnull %6)
  %19 = call noundef ptr @_ZN6alglib18_autogkstate_owner5c_ptrEv(ptr noundef nonnull align 8 dereferenceable(17) %0)
  %20 = call noundef zeroext i1 @_ZN11alglib_impl15autogkiterationEPNS_11autogkstateEPNS_8ae_stateE(ptr noundef %19, ptr noundef nonnull %6)
  br i1 %20, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %17
  %21 = getelementptr inbounds i8, ptr %0, i64 24
  %22 = getelementptr inbounds i8, ptr %0, i64 32
  %23 = getelementptr inbounds i8, ptr %0, i64 40
  %24 = getelementptr inbounds i8, ptr %0, i64 48
  %25 = getelementptr inbounds i8, ptr %0, i64 56
  br label %26

26:                                               ; preds = %.lr.ph, %.backedge
  %27 = load ptr, ptr %21, align 8, !tbaa !15
  %28 = load i8, ptr %27, align 1, !tbaa !19, !range !20, !noundef !21
  %29 = trunc nuw i8 %28 to i1
  br i1 %29, label %30, label %45

30:                                               ; preds = %26
  %31 = load ptr, ptr %22, align 8, !tbaa !22
  %32 = load double, ptr %31, align 8, !tbaa !23
  %33 = load ptr, ptr %23, align 8, !tbaa !24
  %34 = load double, ptr %33, align 8, !tbaa !23
  %35 = load ptr, ptr %24, align 8, !tbaa !25
  %36 = load double, ptr %35, align 8, !tbaa !23
  %37 = load ptr, ptr %25, align 8, !tbaa !26
  invoke void %1(double noundef %32, double noundef %34, double noundef %36, ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef %2)
          to label %.backedge unwind label %38

38:                                               ; preds = %30
  %39 = landingpad { ptr, i32 }
          catch ptr null
  %40 = extractvalue { ptr, i32 } %39, 0
  %41 = call ptr @__cxa_begin_catch(ptr %40) #7
  invoke void @_ZN11alglib_impl27ae_clean_up_before_breakingEPNS_8ae_stateE(ptr noundef nonnull %6)
          to label %42 unwind label %43

42:                                               ; preds = %38
  invoke void @__cxa_rethrow() #9
          to label %52 unwind label %43

43:                                               ; preds = %42, %38
  %44 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %48 unwind label %49

45:                                               ; preds = %26
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef nonnull @.str.9, ptr noundef nonnull %6)
  br label %.backedge

.backedge:                                        ; preds = %45, %30
  %46 = call noundef ptr @_ZN6alglib18_autogkstate_owner5c_ptrEv(ptr noundef nonnull align 8 dereferenceable(17) %0)
  %47 = call noundef zeroext i1 @_ZN11alglib_impl15autogkiterationEPNS_11autogkstateEPNS_8ae_stateE(ptr noundef %46, ptr noundef nonnull %6)
  br i1 %47, label %26, label %._crit_edge, !llvm.loop !27

._crit_edge:                                      ; preds = %.backedge, %17
  call void @_ZN11alglib_impl14ae_state_clearEPNS_8ae_stateE(ptr noundef nonnull %6)
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %5) #7
  ret void

48:                                               ; preds = %43, %13
  %.pn = phi { ptr, i32 } [ %14, %13 ], [ %44, %43 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %5) #7
  resume { ptr, i32 } %.pn

49:                                               ; preds = %43
  %50 = landingpad { ptr, i32 }
          catch ptr null
  %51 = extractvalue { ptr, i32 } %50, 0
  call void @__clang_call_terminate(ptr %51) #10
  unreachable

52:                                               ; preds = %42
  unreachable
}

declare void @_ZN11alglib_impl27ae_clean_up_before_breakingEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #1

declare void @__cxa_rethrow() local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 returns_twice "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 = { noinline noreturn nounwind uwtable "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 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind returns_twice }
attributes #9 = { noreturn }
attributes #10 = { noreturn 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, !11, i64 88}
!6 = !{!"_ZTSN11alglib_impl8ae_stateE", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !11, i64 32, !12, i64 40, !11, i64 72, !13, i64 80, !11, i64 88, !14, i64 96, !11, i64 104, !11, i64 112, !11, i64 120}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!13 = !{!"_ZTSN11alglib_impl13ae_error_typeE", !8, i64 0}
!14 = !{!"long long", !8, i64 0}
!15 = !{!16, !11, i64 24}
!16 = !{!"_ZTSN6alglib11autogkstateE", !17, i64 0, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56}
!17 = !{!"_ZTSN6alglib18_autogkstate_ownerE", !11, i64 8, !18, i64 16}
!18 = !{!"bool", !8, i64 0}
!19 = !{!18, !18, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!16, !11, i64 32}
!23 = !{!10, !10, i64 0}
!24 = !{!16, !11, i64 40}
!25 = !{!16, !11, i64 48}
!26 = !{!16, !11, i64 56}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass