; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (optimization)

; 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::minbcstate" = type { %"class.alglib::_minbcstate_owner", ptr, ptr, ptr, ptr, %"class.alglib::real_1d_array", %"class.alglib::real_1d_array" }
%"class.alglib::_minbcstate_owner" = type { ptr, ptr }
%"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.17 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [71 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

declare ptr @__cxa_begin_catch(ptr)

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

declare void @__cxa_end_catch()

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6alglib17_minbcstate_owner5c_ptrEv(ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

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

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

20:                                               ; preds = %5
  %21 = call ptr @__cxa_allocate_exception(i64 32) #6
  %22 = getelementptr inbounds %"struct.alglib_impl::ae_state", ptr %12, i32 0, i32 8
  %23 = load volatile ptr, ptr %22, align 8, !tbaa !9
  invoke void @_ZN6alglib8ap_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef %23)
          to label %24 unwind label %25

24:                                               ; preds = %20
  call void @__cxa_throw(ptr %21, ptr @_ZTIN6alglib8ap_errorE, ptr @_ZN6alglib8ap_errorD2Ev) #8
  unreachable

25:                                               ; preds = %20
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %13, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %14, align 4
  call void @__cxa_free_exception(ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr %11) #6
  br label %90

29:                                               ; preds = %5
  call void @_ZN11alglib_impl23ae_state_set_break_jumpEPNS_8ae_stateEPA1_13__jmp_buf_tag(ptr noundef %12, ptr noundef %11)
  %30 = getelementptr inbounds %"struct.alglib::xparams", ptr %6, i32 0, i32 0
  %31 = load i64, ptr %30, align 8, !tbaa !16
  %32 = icmp ne i64 %31, 0
  br i1 %32, label %33, label %36

33:                                               ; preds = %29
  %34 = getelementptr inbounds %"struct.alglib::xparams", ptr %6, i32 0, i32 0
  %35 = load i64, ptr %34, align 8, !tbaa !16
  call void @_ZN11alglib_impl18ae_state_set_flagsEPNS_8ae_stateEy(ptr noundef %12, i64 noundef %35)
  br label %36

36:                                               ; preds = %33, %29
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = icmp ne ptr %37, null
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %38, ptr noundef @.str.61, ptr noundef %12)
  br label %39

39:                                               ; preds = %88, %84, %57, %36
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = call noundef ptr @_ZN6alglib17_minbcstate_owner5c_ptrEv(ptr noundef nonnull align 8 dereferenceable(16) %40)
  %42 = call noundef zeroext i1 @_ZN11alglib_impl14minbciterationEPNS_10minbcstateEPNS_8ae_stateE(ptr noundef %41, ptr noundef %12)
  br i1 %42, label %43, label %89

43:                                               ; preds = %39
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = getelementptr inbounds %"class.alglib::minbcstate", ptr %44, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !18
  %47 = load i8, ptr %46, align 1, !tbaa !25, !range !26, !noundef !27
  %48 = trunc i8 %47 to i1
  br i1 %48, label %49, label %65

49:                                               ; preds = %43
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = getelementptr inbounds %"class.alglib::minbcstate", ptr %51, i32 0, i32 6
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = getelementptr inbounds %"class.alglib::minbcstate", ptr %53, i32 0, i32 4
  %55 = load ptr, ptr %54, align 8, !tbaa !28
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void %50(ptr noundef nonnull align 8 dereferenceable(81) %52, ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef %56)
          to label %57 unwind label %58

57:                                               ; preds = %49
  br label %39, !llvm.loop !29

58:                                               ; preds = %74, %49
  %59 = landingpad { ptr, i32 }
          catch ptr null
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %13, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %14, align 4
  br label %62

62:                                               ; preds = %58
  %63 = load ptr, ptr %13, align 8
  %64 = call ptr @__cxa_begin_catch(ptr %63) #6
  store i32 5, ptr %15, align 4
  call void @__cxa_end_catch()
  br label %88

65:                                               ; preds = %43
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = getelementptr inbounds %"class.alglib::minbcstate", ptr %66, i32 0, i32 3
  %68 = load ptr, ptr %67, align 8, !tbaa !31
  %69 = load i8, ptr %68, align 1, !tbaa !25, !range !26, !noundef !27
  %70 = trunc i8 %69 to i1
  br i1 %70, label %71, label %85

71:                                               ; preds = %65
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = icmp ne ptr %72, null
  br i1 %73, label %74, label %84

74:                                               ; preds = %71
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = getelementptr inbounds %"class.alglib::minbcstate", ptr %76, i32 0, i32 6
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = getelementptr inbounds %"class.alglib::minbcstate", ptr %78, i32 0, i32 4
  %80 = load ptr, ptr %79, align 8, !tbaa !28
  %81 = load double, ptr %80, align 8, !tbaa !32
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void %75(ptr noundef nonnull align 8 dereferenceable(81) %77, double noundef %81, ptr noundef %82)
          to label %83 unwind label %58

83:                                               ; preds = %74
  br label %84

84:                                               ; preds = %83, %71
  br label %39, !llvm.loop !29

85:                                               ; preds = %65
  br label %87

86:                                               ; No predecessors!
  br label %87

87:                                               ; preds = %86, %85
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef @.str.62, ptr noundef %12)
  br label %88

88:                                               ; preds = %87, %62
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef @.str.17, ptr noundef %12)
  br label %39, !llvm.loop !29

89:                                               ; preds = %39
  call void @_ZN11alglib_impl14ae_state_clearEPNS_8ae_stateE(ptr noundef %12)
  call void @llvm.lifetime.end.p0(i64 128, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr %11) #6
  ret void

90:                                               ; preds = %25
  %91 = load ptr, ptr %13, align 8
  %92 = load i32, ptr %14, align 4
  %93 = insertvalue { ptr, i32 } poison, ptr %91, 0
  %94 = insertvalue { ptr, i32 } %93, i32 %92, 1
  resume { ptr, i32 } %94
}

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 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind returns_twice }
attributes #8 = { noreturn }

!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 16}
!19 = !{!"_ZTSN6alglib10minbcstateE", !20, i64 0, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !21, i64 48, !21, i64 136}
!20 = !{!"_ZTSN6alglib17_minbcstate_ownerE", !6, i64 8}
!21 = !{!"_ZTSN6alglib13real_1d_arrayE", !22, i64 0}
!22 = !{!"_ZTSN6alglib17ae_vector_wrapperE", !6, i64 8, !23, i64 16, !24, i64 80}
!23 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !24, i64 16, !13, i64 24, !7, i64 56}
!24 = !{!"bool", !7, i64 0}
!25 = !{!24, !24, i64 0}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!19, !6, i64 40}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!19, !6, i64 32}
!32 = !{!12, !12, 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"

%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.17 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [71 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

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

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

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6alglib17_minbcstate_owner5c_ptrEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

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

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

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

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

14:                                               ; preds = %9
  %15 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %6) #6
  resume { ptr, i32 } %15

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

17:                                               ; preds = %16
  call void @_ZN11alglib_impl18ae_state_set_flagsEPNS_8ae_stateEy(ptr noundef nonnull %7, i64 noundef %4)
  br label %18

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

.lr.ph:                                           ; preds = %18
  %22 = getelementptr inbounds i8, ptr %0, i64 16
  %23 = getelementptr inbounds i8, ptr %0, i64 32
  %.not18 = icmp eq ptr %2, null
  %24 = getelementptr inbounds i8, ptr %0, i64 136
  %25 = getelementptr inbounds i8, ptr %0, i64 40
  br i1 %.not18, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %.backedge.us
  %26 = load ptr, ptr %22, 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 %34, label %29

29:                                               ; preds = %.lr.ph.split.us
  %30 = load ptr, ptr %23, align 8, !tbaa !25
  %31 = load i8, ptr %30, align 1, !tbaa !22, !range !23, !noundef !24
  %32 = trunc nuw i8 %31 to i1
  br i1 %32, label %.backedge.us, label %33

33:                                               ; preds = %29
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef nonnull @.str.62, ptr noundef nonnull %7)
  br label %40

34:                                               ; preds = %.lr.ph.split.us
  %35 = load ptr, ptr %25, align 8, !tbaa !26
  invoke void %1(ptr noundef nonnull align 8 dereferenceable(81) %24, ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef %3)
          to label %.backedge.us unwind label %36

36:                                               ; preds = %34
  %37 = landingpad { ptr, i32 }
          catch ptr null
  %38 = extractvalue { ptr, i32 } %37, 0
  %39 = call ptr @__cxa_begin_catch(ptr %38) #6
  call void @__cxa_end_catch()
  br label %40

40:                                               ; preds = %36, %33
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef nonnull @.str.17, ptr noundef nonnull %7)
  br label %.backedge.us

.backedge.us:                                     ; preds = %29, %40, %34
  %41 = call noundef ptr @_ZN6alglib17_minbcstate_owner5c_ptrEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %42 = call noundef zeroext i1 @_ZN11alglib_impl14minbciterationEPNS_10minbcstateEPNS_8ae_stateE(ptr noundef %41, ptr noundef nonnull %7)
  br i1 %42, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !27

.lr.ph.split:                                     ; preds = %.lr.ph, %.backedge
  %43 = load ptr, ptr %22, align 8, !tbaa !15
  %44 = load i8, ptr %43, align 1, !tbaa !22, !range !23, !noundef !24
  %45 = trunc nuw i8 %44 to i1
  br i1 %45, label %46, label %52

46:                                               ; preds = %.lr.ph.split
  %47 = load ptr, ptr %25, align 8, !tbaa !26
  invoke void %1(ptr noundef nonnull align 8 dereferenceable(81) %24, ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef %3)
          to label %.backedge unwind label %48

48:                                               ; preds = %56, %46
  %49 = landingpad { ptr, i32 }
          catch ptr null
  %50 = extractvalue { ptr, i32 } %49, 0
  %51 = call ptr @__cxa_begin_catch(ptr %50) #6
  call void @__cxa_end_catch()
  br label %62

52:                                               ; preds = %.lr.ph.split
  %53 = load ptr, ptr %23, align 8, !tbaa !25
  %54 = load i8, ptr %53, align 1, !tbaa !22, !range !23, !noundef !24
  %55 = trunc nuw i8 %54 to i1
  br i1 %55, label %56, label %61

56:                                               ; preds = %52
  %57 = load ptr, ptr %25, align 8, !tbaa !26
  %58 = load double, ptr %57, align 8, !tbaa !29
  invoke void %2(ptr noundef nonnull align 8 dereferenceable(81) %24, double noundef %58, ptr noundef %3)
          to label %.backedge unwind label %48

.backedge:                                        ; preds = %56, %62, %46
  %59 = call noundef ptr @_ZN6alglib17_minbcstate_owner5c_ptrEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %60 = call noundef zeroext i1 @_ZN11alglib_impl14minbciterationEPNS_10minbcstateEPNS_8ae_stateE(ptr noundef %59, ptr noundef nonnull %7)
  br i1 %60, label %.lr.ph.split, label %._crit_edge, !llvm.loop !27

61:                                               ; preds = %52
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef nonnull @.str.62, ptr noundef nonnull %7)
  br label %62

62:                                               ; preds = %61, %48
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef nonnull @.str.17, ptr noundef nonnull %7)
  br label %.backedge

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

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 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind returns_twice }
attributes #8 = { noreturn }

!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 16}
!16 = !{!"_ZTSN6alglib10minbcstateE", !17, i64 0, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !18, i64 48, !18, i64 136}
!17 = !{!"_ZTSN6alglib17_minbcstate_ownerE", !11, i64 8}
!18 = !{!"_ZTSN6alglib13real_1d_arrayE", !19, i64 0}
!19 = !{!"_ZTSN6alglib17ae_vector_wrapperE", !11, i64 8, !20, i64 16, !21, i64 80}
!20 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !21, i64 16, !12, i64 24, !8, i64 56}
!21 = !{!"bool", !8, i64 0}
!22 = !{!21, !21, i64 0}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!16, !11, i64 32}
!26 = !{!16, !11, i64 40}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!10, !10, i64 0}


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