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

; 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::odesolverstate" = type { %"class.alglib::_odesolverstate_owner.base", ptr, %"class.alglib::real_1d_array", %"class.alglib::real_1d_array", ptr }
%"class.alglib::_odesolverstate_owner.base" = type <{ ptr, ptr, i8 }>
%"class.alglib::real_1d_array" = type { %"class.alglib::ae_vector_wrapper.base", [7 x i8] }
%"class.alglib::ae_vector_wrapper.base" = type <{ ptr, ptr, %"struct.alglib_impl::ae_vector", i8 }>
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@_ZTIN6alglib8ap_errorE = external dso_local constant { ptr, ptr }, align 8
@.str.8 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [45 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_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 @_ZN6alglib21_odesolverstate_owner5c_ptrEv(ptr noundef nonnull align 8 dereferenceable(17)) #5 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6alglib14odesolversolveERNS_14odesolverstateEPFvRKNS_13real_1d_arrayEdRS2_PvES6_NS_7xparamsE(ptr noundef nonnull align 8 dereferenceable(216) %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 %75

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 = %73, %57, %33
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = call noundef ptr @_ZN6alglib21_odesolverstate_owner5c_ptrEv(ptr noundef nonnull align 8 dereferenceable(17) %37)
  %39 = call noundef zeroext i1 @_ZN11alglib_impl18odesolveriterationEPNS_14odesolverstateEPNS_8ae_stateE(ptr noundef %38, ptr noundef %10)
  br i1 %39, label %40, label %74

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

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::odesolverstate", ptr %48, i32 0, i32 2
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %"class.alglib::odesolverstate", ptr %50, i32 0, i32 4
  %52 = load ptr, ptr %51, align 8, !tbaa !28
  %53 = load double, ptr %52, align 8, !tbaa !29
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = getelementptr inbounds %"class.alglib::odesolverstate", ptr %54, i32 0, i32 3
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void %47(ptr noundef nonnull align 8 dereferenceable(81) %49, double noundef %53, ptr noundef nonnull align 8 dereferenceable(81) %55, ptr noundef %56)
          to label %57 unwind label %58

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

58:                                               ; preds = %46
  %59 = landingpad { ptr, i32 }
          catch ptr null
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %11, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %12, align 4
  br label %62

62:                                               ; preds = %58
  %63 = load ptr, ptr %11, align 8
  %64 = call ptr @__cxa_begin_catch(ptr %63) #7
  invoke void @_ZN11alglib_impl27ae_clean_up_before_breakingEPNS_8ae_stateE(ptr noundef %10)
          to label %65 unwind label %67

65:                                               ; preds = %62
  invoke void @__cxa_rethrow() #9
          to label %84 unwind label %67

66:                                               ; preds = %40
  br label %73

67:                                               ; preds = %65, %62
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %11, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %12, align 4
  invoke void @__cxa_end_catch()
          to label %71 unwind label %81

71:                                               ; preds = %67
  br label %75

72:                                               ; No predecessors!
  br label %73

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

74:                                               ; 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

75:                                               ; preds = %71, %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 %76

76:                                               ; preds = %75
  %77 = load ptr, ptr %11, align 8
  %78 = load i32, ptr %12, align 4
  %79 = insertvalue { ptr, i32 } poison, ptr %77, 0
  %80 = insertvalue { ptr, i32 } %79, i32 %78, 1
  resume { ptr, i32 } %80

81:                                               ; preds = %67
  %82 = landingpad { ptr, i32 }
          catch ptr null
  %83 = extractvalue { ptr, i32 } %82, 0
  call void @__clang_call_terminate(ptr %83) #10
  unreachable

84:                                               ; preds = %65
  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 = !{!"_ZTSN6alglib14odesolverstateE", !20, i64 0, !6, i64 24, !22, i64 32, !22, i64 120, !6, i64 208}
!20 = !{!"_ZTSN6alglib21_odesolverstate_ownerE", !6, i64 8, !21, i64 16}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSN6alglib13real_1d_arrayE", !23, i64 0}
!23 = !{!"_ZTSN6alglib17ae_vector_wrapperE", !6, i64 8, !24, i64 16, !21, i64 80}
!24 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !21, i64 16, !13, i64 24, !7, i64 56}
!25 = !{!21, !21, i64 0}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!19, !6, i64 208}
!29 = !{!12, !12, i64 0}
!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 [51 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [45 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_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 @_ZN6alglib21_odesolverstate_owner5c_ptrEv(ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6alglib14odesolversolveERNS_14odesolverstateEPFvRKNS_13real_1d_arrayEdRS2_PvES6_NS_7xparamsE(ptr noundef nonnull align 8 dereferenceable(216) %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 %42

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)
  %.not13 = icmp eq i64 %3, 0
  br i1 %.not13, 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 @_ZN6alglib21_odesolverstate_owner5c_ptrEv(ptr noundef nonnull align 8 dereferenceable(17) %0)
  %20 = call noundef zeroext i1 @_ZN11alglib_impl18odesolveriterationEPNS_14odesolverstateEPNS_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 208
  %24 = getelementptr inbounds i8, ptr %0, i64 120
  br label %25

25:                                               ; preds = %.lr.ph, %.backedge
  %26 = load ptr, ptr %21, align 8, !tbaa !15
  %27 = load i8, ptr %26, align 1, !tbaa !22, !range !23, !noundef !24
  %28 = trunc nuw i8 %27 to i1
  br i1 %28, label %29, label %39

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

32:                                               ; preds = %29
  %33 = landingpad { ptr, i32 }
          catch ptr null
  %34 = extractvalue { ptr, i32 } %33, 0
  %35 = call ptr @__cxa_begin_catch(ptr %34) #7
  invoke void @_ZN11alglib_impl27ae_clean_up_before_breakingEPNS_8ae_stateE(ptr noundef nonnull %6)
          to label %36 unwind label %37

36:                                               ; preds = %32
  invoke void @__cxa_rethrow() #9
          to label %46 unwind label %37

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

39:                                               ; preds = %25
  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 = %39, %29
  %40 = call noundef ptr @_ZN6alglib21_odesolverstate_owner5c_ptrEv(ptr noundef nonnull align 8 dereferenceable(17) %0)
  %41 = call noundef zeroext i1 @_ZN11alglib_impl18odesolveriterationEPNS_14odesolverstateEPNS_8ae_stateE(ptr noundef %40, ptr noundef nonnull %6)
  br i1 %41, label %25, 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

42:                                               ; preds = %37, %13
  %.pn = phi { ptr, i32 } [ %14, %13 ], [ %38, %37 ]
  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

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

46:                                               ; preds = %36
  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 = !{!"_ZTSN6alglib14odesolverstateE", !17, i64 0, !11, i64 24, !19, i64 32, !19, i64 120, !11, i64 208}
!17 = !{!"_ZTSN6alglib21_odesolverstate_ownerE", !11, i64 8, !18, i64 16}
!18 = !{!"bool", !8, i64 0}
!19 = !{!"_ZTSN6alglib13real_1d_arrayE", !20, i64 0}
!20 = !{!"_ZTSN6alglib17ae_vector_wrapperE", !11, i64 8, !21, i64 16, !18, i64 80}
!21 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !18, i64 16, !12, i64 24, !8, i64 56}
!22 = !{!18, !18, i64 0}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!16, !11, i64 208}
!26 = !{!10, !10, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


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