; LLVM IR from aspuru-guzik-group/qtorch :: nlopt-2.4.2/stogo/tools.ll (ZN4TBox10CloseToMinER7RVectorPdd)

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

%class.RVector = type { i32, ptr }
%"struct.std::_List_const_iterator" = type { ptr }
%"struct.std::_List_iterator" = type { ptr }
%class.TBox = type { %class.VBox, double, %"class.std::__cxx11::list" }
%class.VBox = type { %class.RVector, %class.RVector }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<Trial, std::allocator<Trial>>::_List_impl" }
%"struct.std::__cxx11::_List_base<Trial, std::allocator<Trial>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%class.Trial = type { %class.RVector, double }

declare void @_ZN7RVectorC1Ei(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) unnamed_addr #0

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4VBox6GetDimEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4TBox10CloseToMinER7RVectorPdd(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef %2, double noundef %3) #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca %class.RVector, align 8
  %12 = alloca %class.RVector, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::_List_const_iterator", align 8
  %16 = alloca %"struct.std::_List_const_iterator", align 8
  %17 = alloca %"struct.std::_List_iterator", align 8
  %18 = alloca %"struct.std::_List_const_iterator", align 8
  %19 = alloca %"struct.std::_List_iterator", align 8
  %20 = alloca i32, align 4
  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
  store double %3, ptr %9, align 8, !tbaa !9
  %21 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %22 = call noundef i32 @_ZN4VBox6GetDimEv(ptr noundef nonnull align 8 dereferenceable(32) %21)
  store i32 %22, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  %23 = load i32, ptr %10, align 4, !tbaa !11
  call void @_ZN7RVectorC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %11, i32 noundef %23)
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #5
  %24 = load i32, ptr %10, align 4, !tbaa !11
  invoke void @_ZN7RVectorC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %24)
          to label %25 unwind label %55

25:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @_ZNSt20_List_const_iteratorI5TrialEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %26 = getelementptr inbounds %class.TBox, ptr %21, i32 0, i32 2
  %27 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  %28 = getelementptr inbounds %"struct.std::_List_iterator", ptr %17, i32 0, i32 0
  store ptr %27, ptr %28, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %16, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %29

29:                                               ; preds = %64, %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %30 = getelementptr inbounds %class.TBox, ptr %21, i32 0, i32 2
  %31 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  %32 = getelementptr inbounds %"struct.std::_List_iterator", ptr %19, i32 0, i32 0
  store ptr %31, ptr %32, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #5
  %33 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br i1 %33, label %34, label %66

34:                                               ; preds = %29
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %35)
          to label %37 unwind label %59

37:                                               ; preds = %34
  %38 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  %39 = getelementptr inbounds %class.Trial, ptr %38, i32 0, i32 0
  %40 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %39)
          to label %41 unwind label %59

41:                                               ; preds = %37
  invoke void @_Z4axpydRK7RVectorS1_(double noundef -1.000000e+00, ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %42 unwind label %59

42:                                               ; preds = %41
  %43 = invoke noundef double @_Z5norm2RK7RVector(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %44 unwind label %59

44:                                               ; preds = %42
  %45 = load double, ptr %9, align 8, !tbaa !9
  %46 = fcmp ole double %43, %45
  br i1 %46, label %47, label %63

47:                                               ; preds = %44
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %48, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %50 unwind label %59

50:                                               ; preds = %47
  %51 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  %52 = getelementptr inbounds %class.Trial, ptr %51, i32 0, i32 1
  %53 = load double, ptr %52, align 8, !tbaa !14
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  store double %53, ptr %54, align 8, !tbaa !9
  store i1 true, ptr %5, align 1
  store i32 1, ptr %20, align 4
  br label %67

55:                                               ; preds = %4
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %13, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %14, align 4
  br label %69

59:                                               ; preds = %47, %42, %41, %37, %34
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %13, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #5
  br label %69

63:                                               ; preds = %44
  br label %64

64:                                               ; preds = %63
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorI5TrialEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  br label %29, !llvm.loop !17

66:                                               ; preds = %29
  store i1 false, ptr %5, align 1
  store i32 1, ptr %20, align 4
  br label %67

67:                                               ; preds = %66, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  %68 = load i1, ptr %5, align 1
  ret i1 %68

69:                                               ; preds = %59, %55
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %70

70:                                               ; preds = %69
  %71 = load ptr, ptr %13, align 8
  %72 = load i32, ptr %14, align 4
  %73 = insertvalue { ptr, i32 } poison, ptr %71, 0
  %74 = insertvalue { ptr, i32 } %73, i32 %72, 1
  resume { ptr, i32 } %74
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt20_List_const_iteratorI5TrialEC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

declare void @_Z4axpydRK7RVectorS1_(double noundef, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0

declare noundef double @_Z5norm2RK7RVector(ptr noundef nonnull align 8 dereferenceable(16)) #0

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

attributes #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 = { 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 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i64 0, i64 8, !5}
!14 = !{!15, !10, i64 16}
!15 = !{!"_ZTS5Trial", !16, i64 0, !10, i64 16}
!16 = !{!"_ZTS7RVector", !12, i64 0, !6, i64 8}
!17 = distinct !{!17, !18}
!18 = !{!"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"

%class.RVector = type { i32, ptr }
%"struct.std::_List_const_iterator" = type { ptr }
%"struct.std::_List_iterator" = type { ptr }

declare void @_ZN7RVectorC1Ei(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) unnamed_addr #0

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4VBox6GetDimEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4TBox10CloseToMinER7RVectorPdd(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr nocapture noundef writeonly %2, double noundef %3) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %class.RVector, align 8
  %6 = alloca %class.RVector, align 8
  %7 = alloca %"struct.std::_List_const_iterator", align 8
  %8 = alloca %"struct.std::_List_const_iterator", align 8
  %9 = alloca %"struct.std::_List_iterator", align 8
  %10 = alloca %"struct.std::_List_const_iterator", align 8
  %11 = alloca %"struct.std::_List_iterator", align 8
  %12 = tail call noundef i32 @_ZN4VBox6GetDimEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @_ZN7RVectorC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef %12)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #4
  invoke void @_ZN7RVectorC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef %12)
          to label %13 unwind label %34

13:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @_ZNSt20_List_const_iteratorI5TrialEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %14 = getelementptr inbounds i8, ptr %0, i64 40
  %15 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  store ptr %15, ptr %9, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %16 = load i64, ptr %8, align 8, !tbaa !5
  store i64 %16, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  %17 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  store ptr %17, ptr %11, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  %18 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br i1 %18, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %13, %37
  %19 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %20 unwind label %.loopexit12

20:                                               ; preds = %.lr.ph
  %21 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %22 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %23 unwind label %.loopexit12

23:                                               ; preds = %20
  invoke void @_Z4axpydRK7RVectorS1_(double noundef -1.000000e+00, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %24 unwind label %.loopexit12

24:                                               ; preds = %23
  %25 = invoke noundef double @_Z5norm2RK7RVector(ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %26 unwind label %.loopexit12

26:                                               ; preds = %24
  %27 = fcmp ugt double %25, %3
  br i1 %27, label %37, label %28

28:                                               ; preds = %26
  %29 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %30 unwind label %.loopexit.split-lp

30:                                               ; preds = %28
  %31 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  %33 = load double, ptr %32, align 8, !tbaa !9
  store double %33, ptr %2, align 8, !tbaa !14
  br label %.loopexit

34:                                               ; preds = %4
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %42

.loopexit12:                                      ; preds = %.lr.ph, %20, %23, %24
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %36

.loopexit.split-lp:                               ; preds = %28
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %36

36:                                               ; preds = %.loopexit.split-lp, %.loopexit12
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit12 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  br label %42

37:                                               ; preds = %26
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorI5TrialEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  %39 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  store ptr %39, ptr %11, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  %40 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br i1 %40, label %.lr.ph, label %.loopexit, !llvm.loop !15

.loopexit:                                        ; preds = %37, %13, %30
  %41 = phi i1 [ true, %30 ], [ false, %13 ], [ false, %37 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  ret i1 %41

42:                                               ; preds = %36, %34
  %.pn = phi { ptr, i32 } [ %lpad.phi, %36 ], [ %35, %34 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt20_List_const_iteratorI5TrialEC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

declare void @_Z4axpydRK7RVectorS1_(double noundef, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

declare noundef double @_Z5norm2RK7RVector(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

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

attributes #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 = { 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 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !13, i64 16}
!10 = !{!"_ZTS5Trial", !11, i64 0, !13, i64 16}
!11 = !{!"_ZTS7RVector", !12, i64 0, !6, i64 8}
!12 = !{!"int", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass