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

; 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.std::_List_const_iterator" = type { ptr }
%class.RVector = type { i32, 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 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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

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

28:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %29 = getelementptr inbounds %class.TBox, ptr %22, i32 0, i32 2
  %30 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #6
  %31 = getelementptr inbounds %"struct.std::_List_iterator", ptr %17, i32 0, i32 0
  store ptr %30, ptr %31, 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) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %16, i64 8, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %32

32:                                               ; preds = %87, %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %33 = getelementptr inbounds %class.TBox, ptr %22, i32 0, i32 2
  %34 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #6
  %35 = getelementptr inbounds %"struct.std::_List_iterator", ptr %19, i32 0, i32 0
  store ptr %34, ptr %35, 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) #6
  %36 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br i1 %36, label %37, label %89

37:                                               ; preds = %32
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %9, i64 8, i1 false), !tbaa.struct !23
  br label %38

38:                                               ; preds = %76, %37
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorI5TrialEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %40 = getelementptr inbounds %class.TBox, ptr %22, i32 0, i32 2
  %41 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #6
  %42 = getelementptr inbounds %"struct.std::_List_iterator", ptr %21, i32 0, i32 0
  store ptr %41, ptr %42, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  %43 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br i1 %43, label %44, label %86

44:                                               ; preds = %38
  %45 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %46 = getelementptr inbounds %class.Trial, ptr %45, i32 0, i32 0
  %47 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %46)
          to label %48 unwind label %82

48:                                               ; preds = %44
  %49 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %50 = getelementptr inbounds %class.Trial, ptr %49, i32 0, i32 1
  %51 = load double, ptr %50, align 8, !tbaa !24
  store double %51, ptr %6, align 8, !tbaa !9
  %52 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  %53 = getelementptr inbounds %class.Trial, ptr %52, i32 0, i32 0
  %54 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %53)
          to label %55 unwind label %82

55:                                               ; preds = %48
  %56 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  %57 = getelementptr inbounds %class.Trial, ptr %56, i32 0, i32 1
  %58 = load double, ptr %57, align 8, !tbaa !24
  store double %58, ptr %7, align 8, !tbaa !9
  invoke void @_Z4axpydRK7RVectorS1_(double noundef -1.000000e+00, ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %59 unwind label %82

59:                                               ; preds = %55
  %60 = load double, ptr %6, align 8, !tbaa !9
  %61 = load double, ptr %7, align 8, !tbaa !9
  %62 = fadd double %60, %61
  %63 = load double, ptr %4, align 8, !tbaa !9
  %64 = invoke noundef double @_Z5norm2RK7RVector(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %65 unwind label %82

65:                                               ; preds = %59
  %66 = fneg double %63
  %67 = call double @llvm.fmuladd.f64(double %66, double %64, double %62)
  %68 = fmul double 5.000000e-01, %67
  store double %68, ptr %8, align 8, !tbaa !9
  %69 = load double, ptr %5, align 8, !tbaa !9
  %70 = load double, ptr %8, align 8, !tbaa !9
  %71 = fcmp olt double %69, %70
  br i1 %71, label %72, label %74

72:                                               ; preds = %65
  %73 = load double, ptr %5, align 8, !tbaa !9
  br label %76

74:                                               ; preds = %65
  %75 = load double, ptr %8, align 8, !tbaa !9
  br label %76

76:                                               ; preds = %74, %72
  %77 = phi double [ %73, %72 ], [ %75, %74 ]
  store double %77, ptr %5, align 8, !tbaa !9
  br label %38, !llvm.loop !26

78:                                               ; preds = %2
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %14, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %15, align 4
  br label %91

82:                                               ; preds = %59, %55, %48, %44
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %14, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %15, align 4
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #6
  br label %91

86:                                               ; preds = %38
  br label %87

87:                                               ; preds = %86
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorI5TrialEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br label %32, !llvm.loop !28

89:                                               ; preds = %32
  %90 = load double, ptr %5, align 8, !tbaa !9
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret double %90

91:                                               ; preds = %82, %78
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %92

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

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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, !10, i64 32}
!12 = !{!"_ZTS4TBox", !13, i64 0, !10, i64 32, !16, i64 40}
!13 = !{!"_ZTS4VBox", !14, i64 0, !14, i64 16}
!14 = !{!"_ZTS7RVector", !15, i64 0, !6, i64 8}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSNSt7__cxx114listI5TrialSaIS1_EEE", !17, i64 0}
!17 = !{!"_ZTSNSt7__cxx1110_List_baseI5TrialSaIS1_EEE", !18, i64 0}
!18 = !{!"_ZTSNSt7__cxx1110_List_baseI5TrialSaIS1_EE10_List_implE", !19, i64 0}
!19 = !{!"_ZTSNSt8__detail17_List_node_headerE", !20, i64 0, !21, i64 16}
!20 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!21 = !{!"long", !7, i64 0}
!22 = !{!15, !15, i64 0}
!23 = !{i64 0, i64 8, !5}
!24 = !{!25, !10, i64 16}
!25 = !{!"_ZTS5Trial", !14, i64 0, !10, i64 16}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}


; 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.std::_List_const_iterator" = type { ptr }
%class.RVector = type { i32, 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 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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN4TBox10LowerBoundEd(ptr noundef nonnull align 8 dereferenceable(64) %0, double noundef %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.std::_List_const_iterator", align 8
  %4 = alloca %"struct.std::_List_const_iterator", align 8
  %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_iterator", align 8
  %9 = alloca %"struct.std::_List_const_iterator", align 8
  %10 = alloca %"struct.std::_List_iterator", align 8
  %11 = alloca %"struct.std::_List_const_iterator", align 8
  %12 = alloca %"struct.std::_List_iterator", align 8
  %13 = getelementptr inbounds i8, ptr %0, i64 32
  %14 = load double, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @_ZNSt20_List_const_iteratorI5TrialEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  call void @_ZNSt20_List_const_iteratorI5TrialEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %15 = call noundef i32 @_ZN4VBox6GetDimEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  call void @_ZN7RVectorC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef %15)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  invoke void @_ZN7RVectorC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef %15)
          to label %16 unwind label %51

16:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %17 = getelementptr inbounds i8, ptr %0, i64 40
  %18 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  store ptr %18, ptr %8, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %19 = load i64, ptr %7, align 8, !tbaa !20
  store i64 %19, ptr %3, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %20 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  store ptr %20, ptr %10, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %21 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br i1 %21, label %.lr.ph20, label %._crit_edge21

.lr.ph20:                                         ; preds = %16
  %22 = fneg double %1
  br label %23

23:                                               ; preds = %.lr.ph20, %._crit_edge
  %.01318 = phi double [ %14, %.lr.ph20 ], [ %.1.lcssa, %._crit_edge ]
  %24 = load i64, ptr %3, align 8, !tbaa !20
  store i64 %24, ptr %4, align 8, !tbaa !20
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorI5TrialEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  %26 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  store ptr %26, ptr %12, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  %27 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  br i1 %27, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %23, %42
  %.117 = phi double [ %47, %42 ], [ %.01318, %23 ]
  %28 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  %29 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %28)
          to label %30 unwind label %53

30:                                               ; preds = %.lr.ph
  %31 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  %33 = load double, ptr %32, align 8, !tbaa !21
  %34 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %35 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %34)
          to label %36 unwind label %53

36:                                               ; preds = %30
  %37 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  %39 = load double, ptr %38, align 8, !tbaa !21
  invoke void @_Z4axpydRK7RVectorS1_(double noundef -1.000000e+00, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %40 unwind label %53

40:                                               ; preds = %36
  %41 = invoke noundef double @_Z5norm2RK7RVector(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %42 unwind label %53

42:                                               ; preds = %40
  %43 = fadd double %33, %39
  %44 = call double @llvm.fmuladd.f64(double %22, double %41, double %43)
  %45 = fmul double %44, 5.000000e-01
  %46 = fcmp olt double %.117, %45
  %47 = select i1 %46, double %.117, double %45
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorI5TrialEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  %49 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  store ptr %49, ptr %12, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  %50 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  br i1 %50, label %.lr.ph, label %._crit_edge, !llvm.loop !23

51:                                               ; preds = %2
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %58

53:                                               ; preds = %40, %36, %30, %.lr.ph
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  br label %58

._crit_edge:                                      ; preds = %42, %23
  %.1.lcssa = phi double [ %.01318, %23 ], [ %47, %42 ]
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorI5TrialEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %56 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  store ptr %56, ptr %10, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %57 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br i1 %57, label %23, label %._crit_edge21, !llvm.loop !25

._crit_edge21:                                    ; preds = %._crit_edge, %16
  %.013.lcssa = phi double [ %14, %16 ], [ %.1.lcssa, %._crit_edge ]
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  ret double %.013.lcssa

58:                                               ; preds = %53, %51
  %.pn = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn
}

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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !13, i64 32}
!6 = !{!"_ZTS4TBox", !7, i64 0, !13, i64 32, !14, i64 40}
!7 = !{!"_ZTS4VBox", !8, i64 0, !8, i64 16}
!8 = !{!"_ZTS7RVector", !9, i64 0, !12, i64 8}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"any pointer", !10, i64 0}
!13 = !{!"double", !10, i64 0}
!14 = !{!"_ZTSNSt7__cxx114listI5TrialSaIS1_EEE", !15, i64 0}
!15 = !{!"_ZTSNSt7__cxx1110_List_baseI5TrialSaIS1_EEE", !16, i64 0}
!16 = !{!"_ZTSNSt7__cxx1110_List_baseI5TrialSaIS1_EE10_List_implE", !17, i64 0}
!17 = !{!"_ZTSNSt8__detail17_List_node_headerE", !18, i64 0, !19, i64 16}
!18 = !{!"_ZTSNSt8__detail15_List_node_baseE", !12, i64 0, !12, i64 8}
!19 = !{!"long", !10, i64 0}
!20 = !{!12, !12, i64 0}
!21 = !{!22, !13, i64 16}
!22 = !{!"_ZTS5Trial", !8, i64 0, !13, i64 16}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}


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