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

; 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.VBox = type { %class.RVector, %class.RVector }
%class.TBox = type { %class.VBox, double, %"class.std::__cxx11::list" }
%"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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #1 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 uwtable
declare dso_local void @_ZN4TBox8AddTrialERK5Trial(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; 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

; 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: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt7__cxx114listI5TrialSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4TBox5splitERS_S0_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %1, ptr noundef nonnull align 8 dereferenceable(64) %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"struct.std::_List_const_iterator", align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %class.RVector, align 8
  %18 = alloca %class.RVector, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca %class.RVector, align 8
  %22 = alloca %"struct.std::_List_const_iterator", align 8
  %23 = alloca %"struct.std::_List_iterator", align 8
  %24 = alloca %"struct.std::_List_const_iterator", align 8
  %25 = alloca %"struct.std::_List_iterator", align 8
  %26 = alloca %"struct.std::_List_const_iterator", align 8
  %27 = alloca %"struct.std::_List_iterator", align 8
  %28 = alloca %"struct.std::_List_const_iterator", align 8
  %29 = alloca %"struct.std::_List_iterator", align 8
  %30 = alloca %"struct.std::_List_const_iterator", align 8
  %31 = alloca %"struct.std::_List_iterator", align 8
  %32 = alloca %"struct.std::_List_const_iterator", align 8
  %33 = alloca %"struct.std::_List_iterator", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %34 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @_ZNSt20_List_const_iteratorI5TrialEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %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 @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store double 0x7FEFFFFFFFFFFFFF, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store double 0x7FEFFFFFFFFFFFFF, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %35 = call noundef i32 @_ZN4VBox6GetDimEv(ptr noundef nonnull align 8 dereferenceable(32) %34)
  store i32 %35, ptr %16, align 4, !tbaa !11
  %36 = getelementptr inbounds %class.VBox, ptr %34, i32 0, i32 0
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %class.VBox, ptr %37, i32 0, i32 0
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 8 dereferenceable(16) %36)
  %40 = getelementptr inbounds %class.VBox, ptr %34, i32 0, i32 1
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %class.VBox, ptr %41, i32 0, i32 1
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %42, ptr noundef nonnull align 8 dereferenceable(16) %40)
  %44 = getelementptr inbounds %class.VBox, ptr %34, i32 0, i32 0
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %class.VBox, ptr %45, i32 0, i32 0
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(16) %44)
  %48 = getelementptr inbounds %class.VBox, ptr %34, i32 0, i32 1
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %class.VBox, ptr %49, i32 0, i32 1
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 8 dereferenceable(16) %48)
  %52 = call noundef double @_ZN4TBox11LongestSideEPi(ptr noundef nonnull align 8 dereferenceable(64) %34, ptr noundef %13)
  store double %52, ptr %8, align 8, !tbaa !9
  %53 = getelementptr inbounds %class.TBox, ptr %34, i32 0, i32 2
  %54 = call noundef i64 @_ZNKSt7__cxx114listI5TrialSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #6
  %55 = trunc i64 %54 to i32
  store i32 %55, ptr %15, align 4, !tbaa !11
  %56 = load i32, ptr %15, align 4, !tbaa !11
  switch i32 %56, label %84 [
    i32 0, label %57
    i32 1, label %57
  ]

57:                                               ; preds = %3, %3
  %58 = getelementptr inbounds %class.VBox, ptr %34, i32 0, i32 1
  %59 = load i32, ptr %13, align 4, !tbaa !11
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %58, i32 noundef %59)
  %61 = load double, ptr %60, align 8, !tbaa !9
  %62 = getelementptr inbounds %class.VBox, ptr %34, i32 0, i32 0
  %63 = load i32, ptr %13, align 4, !tbaa !11
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %62, i32 noundef %63)
  %65 = load double, ptr %64, align 8, !tbaa !9
  %66 = fsub double %61, %65
  store double %66, ptr %8, align 8, !tbaa !9
  %67 = getelementptr inbounds %class.VBox, ptr %34, i32 0, i32 0
  %68 = load i32, ptr %13, align 4, !tbaa !11
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %67, i32 noundef %68)
  %70 = load double, ptr %69, align 8, !tbaa !9
  %71 = load double, ptr %8, align 8, !tbaa !9
  %72 = fdiv double %71, 2.000000e+00
  %73 = fadd double %70, %72
  store double %73, ptr %9, align 8, !tbaa !9
  %74 = load double, ptr %9, align 8, !tbaa !9
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %class.VBox, ptr %75, i32 0, i32 1
  %77 = load i32, ptr %13, align 4, !tbaa !11
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %76, i32 noundef %77)
  store double %74, ptr %78, align 8, !tbaa !9
  %79 = load double, ptr %9, align 8, !tbaa !9
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %class.VBox, ptr %80, i32 0, i32 0
  %82 = load i32, ptr %13, align 4, !tbaa !11
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %81, i32 noundef %82)
  store double %79, ptr %83, align 8, !tbaa !9
  br label %217

84:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  %85 = load i32, ptr %16, align 4, !tbaa !11
  call void @_ZN7RVectorC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %17, i32 noundef %85)
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  %86 = load i32, ptr %16, align 4, !tbaa !11
  invoke void @_ZN7RVectorC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef %86)
          to label %87 unwind label %108

87:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #6
  %88 = load i32, ptr %16, align 4, !tbaa !11
  invoke void @_ZN7RVectorC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %88)
          to label %89 unwind label %112

89:                                               ; preds = %87
  %90 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSEd(ptr noundef nonnull align 8 dereferenceable(16) %17, double noundef 0.000000e+00)
          to label %91 unwind label %116

91:                                               ; preds = %89
  %92 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSEd(ptr noundef nonnull align 8 dereferenceable(16) %21, double noundef 0.000000e+00)
          to label %93 unwind label %116

93:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %94 = getelementptr inbounds %class.TBox, ptr %34, i32 0, i32 2
  %95 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #6
  %96 = getelementptr inbounds %"struct.std::_List_iterator", ptr %23, i32 0, i32 0
  store ptr %95, ptr %96, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %22, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %97

97:                                               ; preds = %106, %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %98 = getelementptr inbounds %class.TBox, ptr %34, i32 0, i32 2
  %99 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %98) #6
  %100 = getelementptr inbounds %"struct.std::_List_iterator", ptr %25, i32 0, i32 0
  store ptr %99, ptr %100, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #6
  %101 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br i1 %101, label %102, label %120

102:                                              ; preds = %97
  %103 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %104 = getelementptr inbounds %class.Trial, ptr %103, i32 0, i32 0
  invoke void @_Z4axpydRK7RVectorS1_(double noundef 1.000000e+00, ptr noundef nonnull align 8 dereferenceable(16) %104, ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %105 unwind label %116

105:                                              ; preds = %102
  br label %106

106:                                              ; preds = %105
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorI5TrialEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br label %97, !llvm.loop !14

108:                                              ; preds = %84
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %19, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %20, align 4
  br label %216

112:                                              ; preds = %87
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %19, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %20, align 4
  br label %215

116:                                              ; preds = %208, %205, %199, %196, %186, %179, %171, %167, %153, %149, %145, %142, %138, %120, %102, %91, %89
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %19, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %20, align 4
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #6
  br label %215

120:                                              ; preds = %97
  %121 = load i32, ptr %15, align 4, !tbaa !11
  %122 = sitofp i32 %121 to double
  %123 = fdiv double 1.000000e+00, %122
  invoke void @_Z4scaldRK7RVector(double noundef %123, ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %124 unwind label %116

124:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %125 = getelementptr inbounds %class.TBox, ptr %34, i32 0, i32 2
  %126 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %125) #6
  %127 = getelementptr inbounds %"struct.std::_List_iterator", ptr %27, i32 0, i32 0
  store ptr %126, ptr %127, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %26, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %128

128:                                              ; preds = %165, %124
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %129 = getelementptr inbounds %class.TBox, ptr %34, i32 0, i32 2
  %130 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %129) #6
  %131 = getelementptr inbounds %"struct.std::_List_iterator", ptr %29, i32 0, i32 0
  store ptr %130, ptr %131, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29) #6
  %132 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br i1 %132, label %133, label %167

133:                                              ; preds = %128
  store i32 0, ptr %14, align 4, !tbaa !11
  br label %134

134:                                              ; preds = %161, %133
  %135 = load i32, ptr %14, align 4, !tbaa !11
  %136 = load i32, ptr %16, align 4, !tbaa !11
  %137 = icmp slt i32 %135, %136
  br i1 %137, label %138, label %164

138:                                              ; preds = %134
  %139 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %140 = getelementptr inbounds %class.Trial, ptr %139, i32 0, i32 0
  %141 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %140)
          to label %142 unwind label %116

142:                                              ; preds = %138
  %143 = load i32, ptr %14, align 4, !tbaa !11
  %144 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %143)
          to label %145 unwind label %116

145:                                              ; preds = %142
  %146 = load double, ptr %144, align 8, !tbaa !9
  %147 = load i32, ptr %14, align 4, !tbaa !11
  %148 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %17, i32 noundef %147)
          to label %149 unwind label %116

149:                                              ; preds = %145
  %150 = load double, ptr %148, align 8, !tbaa !9
  %151 = load i32, ptr %14, align 4, !tbaa !11
  %152 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef %151)
          to label %153 unwind label %116

153:                                              ; preds = %149
  %154 = load double, ptr %152, align 8, !tbaa !9
  %155 = fsub double %150, %154
  %156 = call double @pow(double noundef %155, double noundef 2.000000e+00) #6
  %157 = fadd double %146, %156
  %158 = load i32, ptr %14, align 4, !tbaa !11
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %158)
          to label %160 unwind label %116

160:                                              ; preds = %153
  store double %157, ptr %159, align 8, !tbaa !9
  br label %161

161:                                              ; preds = %160
  %162 = load i32, ptr %14, align 4, !tbaa !11
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %14, align 4, !tbaa !11
  br label %134, !llvm.loop !16

164:                                              ; preds = %134
  br label %165

165:                                              ; preds = %164
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorI5TrialEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br label %128, !llvm.loop !17

167:                                              ; preds = %128
  %168 = load i32, ptr %15, align 4, !tbaa !11
  %169 = sitofp i32 %168 to double
  %170 = fdiv double 1.000000e+00, %169
  invoke void @_Z4scaldRK7RVector(double noundef %170, ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %171 unwind label %116

171:                                              ; preds = %167
  %172 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef 0)
          to label %173 unwind label %116

173:                                              ; preds = %171
  %174 = load double, ptr %172, align 8, !tbaa !9
  store double %174, ptr %10, align 8, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !11
  store i32 1, ptr %14, align 4, !tbaa !11
  br label %175

175:                                              ; preds = %193, %173
  %176 = load i32, ptr %14, align 4, !tbaa !11
  %177 = load i32, ptr %16, align 4, !tbaa !11
  %178 = icmp slt i32 %176, %177
  br i1 %178, label %179, label %196

179:                                              ; preds = %175
  %180 = load i32, ptr %14, align 4, !tbaa !11
  %181 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %180)
          to label %182 unwind label %116

182:                                              ; preds = %179
  %183 = load double, ptr %181, align 8, !tbaa !9
  %184 = load double, ptr %10, align 8, !tbaa !9
  %185 = fcmp ogt double %183, %184
  br i1 %185, label %186, label %192

186:                                              ; preds = %182
  %187 = load i32, ptr %14, align 4, !tbaa !11
  %188 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %187)
          to label %189 unwind label %116

189:                                              ; preds = %186
  %190 = load double, ptr %188, align 8, !tbaa !9
  store double %190, ptr %10, align 8, !tbaa !9
  %191 = load i32, ptr %14, align 4, !tbaa !11
  store i32 %191, ptr %13, align 4, !tbaa !11
  br label %192

192:                                              ; preds = %189, %182
  br label %193

193:                                              ; preds = %192
  %194 = load i32, ptr %14, align 4, !tbaa !11
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %14, align 4, !tbaa !11
  br label %175, !llvm.loop !18

196:                                              ; preds = %175
  %197 = load i32, ptr %13, align 4, !tbaa !11
  %198 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %17, i32 noundef %197)
          to label %199 unwind label %116

199:                                              ; preds = %196
  %200 = load double, ptr %198, align 8, !tbaa !9
  %201 = load ptr, ptr %5, align 8, !tbaa !5
  %202 = getelementptr inbounds %class.VBox, ptr %201, i32 0, i32 1
  %203 = load i32, ptr %13, align 4, !tbaa !11
  %204 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %202, i32 noundef %203)
          to label %205 unwind label %116

205:                                              ; preds = %199
  store double %200, ptr %204, align 8, !tbaa !9
  %206 = load i32, ptr %13, align 4, !tbaa !11
  %207 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %17, i32 noundef %206)
          to label %208 unwind label %116

208:                                              ; preds = %205
  %209 = load double, ptr %207, align 8, !tbaa !9
  %210 = load ptr, ptr %6, align 8, !tbaa !5
  %211 = getelementptr inbounds %class.VBox, ptr %210, i32 0, i32 0
  %212 = load i32, ptr %13, align 4, !tbaa !11
  %213 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %211, i32 noundef %212)
          to label %214 unwind label %116

214:                                              ; preds = %208
  store double %209, ptr %213, align 8, !tbaa !9
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #6
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  br label %217

215:                                              ; preds = %116, %112
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #6
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #6
  br label %216

216:                                              ; preds = %215, %108
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, 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
  br label %273

217:                                              ; preds = %214, %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %218 = getelementptr inbounds %class.TBox, ptr %34, i32 0, i32 2
  %219 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %218) #6
  %220 = getelementptr inbounds %"struct.std::_List_iterator", ptr %31, i32 0, i32 0
  store ptr %219, ptr %220, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %31) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %30, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %221

221:                                              ; preds = %264, %217
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %222 = getelementptr inbounds %class.TBox, ptr %34, i32 0, i32 2
  %223 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %222) #6
  %224 = getelementptr inbounds %"struct.std::_List_iterator", ptr %33, i32 0, i32 0
  store ptr %223, ptr %224, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33) #6
  %225 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  br i1 %225, label %226, label %266

226:                                              ; preds = %221
  %227 = load ptr, ptr %5, align 8, !tbaa !5
  %228 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %229 = getelementptr inbounds %class.Trial, ptr %228, i32 0, i32 0
  %230 = call noundef zeroext i1 @_ZN4TBox9InsideBoxERK7RVector(ptr noundef nonnull align 8 dereferenceable(64) %227, ptr noundef nonnull align 8 dereferenceable(16) %229)
  br i1 %230, label %231, label %247

231:                                              ; preds = %226
  %232 = load double, ptr %11, align 8, !tbaa !9
  %233 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %234 = getelementptr inbounds %class.Trial, ptr %233, i32 0, i32 1
  %235 = load double, ptr %234, align 8, !tbaa !19
  %236 = fcmp olt double %232, %235
  br i1 %236, label %237, label %239

237:                                              ; preds = %231
  %238 = load double, ptr %11, align 8, !tbaa !9
  br label %243

239:                                              ; preds = %231
  %240 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %241 = getelementptr inbounds %class.Trial, ptr %240, i32 0, i32 1
  %242 = load double, ptr %241, align 8, !tbaa !19
  br label %243

243:                                              ; preds = %239, %237
  %244 = phi double [ %238, %237 ], [ %242, %239 ]
  store double %244, ptr %11, align 8, !tbaa !9
  %245 = load ptr, ptr %5, align 8, !tbaa !5
  %246 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @_ZN4TBox8AddTrialERK5Trial(ptr noundef nonnull align 8 dereferenceable(64) %245, ptr noundef nonnull align 8 dereferenceable(24) %246)
  br label %263

247:                                              ; preds = %226
  %248 = load ptr, ptr %6, align 8, !tbaa !5
  %249 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @_ZN4TBox8AddTrialERK5Trial(ptr noundef nonnull align 8 dereferenceable(64) %248, ptr noundef nonnull align 8 dereferenceable(24) %249)
  %250 = load double, ptr %12, align 8, !tbaa !9
  %251 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %252 = getelementptr inbounds %class.Trial, ptr %251, i32 0, i32 1
  %253 = load double, ptr %252, align 8, !tbaa !19
  %254 = fcmp olt double %250, %253
  br i1 %254, label %255, label %257

255:                                              ; preds = %247
  %256 = load double, ptr %12, align 8, !tbaa !9
  br label %261

257:                                              ; preds = %247
  %258 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %259 = getelementptr inbounds %class.Trial, ptr %258, i32 0, i32 1
  %260 = load double, ptr %259, align 8, !tbaa !19
  br label %261

261:                                              ; preds = %257, %255
  %262 = phi double [ %256, %255 ], [ %260, %257 ]
  store double %262, ptr %12, align 8, !tbaa !9
  br label %263

263:                                              ; preds = %261, %243
  br label %264

264:                                              ; preds = %263
  %265 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorI5TrialEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br label %221, !llvm.loop !22

266:                                              ; preds = %221
  %267 = load double, ptr %11, align 8, !tbaa !9
  %268 = load ptr, ptr %5, align 8, !tbaa !5
  %269 = getelementptr inbounds %class.TBox, ptr %268, i32 0, i32 1
  store double %267, ptr %269, align 8, !tbaa !23
  %270 = load double, ptr %12, align 8, !tbaa !9
  %271 = load ptr, ptr %6, align 8, !tbaa !5
  %272 = getelementptr inbounds %class.TBox, ptr %271, i32 0, i32 1
  store double %270, ptr %272, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, 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
  ret void

273:                                              ; preds = %216
  %274 = load ptr, ptr %19, align 8
  %275 = load i32, ptr %20, align 4
  %276 = insertvalue { ptr, i32 } poison, ptr %274, 0
  %277 = insertvalue { ptr, i32 } %276, i32 %275, 1
  resume { ptr, i32 } %277
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN4TBox11LongestSideEPi(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef) #2 align 2

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

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

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4TBox9InsideBoxERK7RVector(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(16)) #2 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 "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 }

!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 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = !{!20, !10, i64 16}
!20 = !{!"_ZTS5Trial", !21, i64 0, !10, i64 16}
!21 = !{!"_ZTS7RVector", !12, i64 0, !6, i64 8}
!22 = distinct !{!22, !15}
!23 = !{!24, !10, i64 32}
!24 = !{!"_ZTS4TBox", !25, i64 0, !10, i64 32, !26, i64 40}
!25 = !{!"_ZTS4VBox", !21, i64 0, !21, i64 16}
!26 = !{!"_ZTSNSt7__cxx114listI5TrialSaIS1_EEE", !27, i64 0}
!27 = !{!"_ZTSNSt7__cxx1110_List_baseI5TrialSaIS1_EEE", !28, i64 0}
!28 = !{!"_ZTSNSt7__cxx1110_List_baseI5TrialSaIS1_EE10_List_implE", !29, i64 0}
!29 = !{!"_ZTSNSt8__detail17_List_node_headerE", !30, i64 0, !31, i64 16}
!30 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!31 = !{!"long", !7, 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.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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #1 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 uwtable
declare dso_local void @_ZN4TBox8AddTrialERK5Trial(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; 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

; 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 nounwind uwtable
declare dso_local noundef i64 @_ZNKSt7__cxx114listI5TrialSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4TBox5splitERS_S0_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %1, ptr noundef nonnull align 8 dereferenceable(64) %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.std::_List_const_iterator", align 8
  %5 = alloca i32, align 4
  %6 = alloca %class.RVector, align 8
  %7 = alloca %class.RVector, align 8
  %8 = alloca %class.RVector, 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 = alloca %"struct.std::_List_const_iterator", align 8
  %14 = alloca %"struct.std::_List_iterator", align 8
  %15 = alloca %"struct.std::_List_const_iterator", align 8
  %16 = alloca %"struct.std::_List_iterator", align 8
  %17 = alloca %"struct.std::_List_const_iterator", align 8
  %18 = alloca %"struct.std::_List_iterator", align 8
  %19 = alloca %"struct.std::_List_const_iterator", align 8
  %20 = alloca %"struct.std::_List_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  call void @_ZNSt20_List_const_iteratorI5TrialEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %21 = call noundef i32 @_ZN4VBox6GetDimEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %0)
  %23 = getelementptr inbounds i8, ptr %0, i64 16
  %24 = getelementptr inbounds i8, ptr %1, i64 16
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(16) %23)
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %0)
  %27 = getelementptr inbounds i8, ptr %2, i64 16
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(16) %23)
  %29 = call noundef double @_ZN4TBox11LongestSideEPi(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull %5)
  %30 = getelementptr inbounds i8, ptr %0, i64 40
  %31 = call noundef i64 @_ZNKSt7__cxx114listI5TrialSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  %32 = trunc i64 %31 to i32
  %switch = icmp ult i32 %32, 2
  br i1 %switch, label %33, label %50

33:                                               ; preds = %3
  %34 = load i32, ptr %5, align 4, !tbaa !5
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %23, i32 noundef %34)
  %36 = load double, ptr %35, align 8, !tbaa !9
  %37 = load i32, ptr %5, align 4, !tbaa !5
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %0, i32 noundef %37)
  %39 = load double, ptr %38, align 8, !tbaa !9
  %40 = fsub double %36, %39
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %0, i32 noundef %41)
  %43 = load double, ptr %42, align 8, !tbaa !9
  %44 = fmul double %40, 5.000000e-01
  %45 = fadd double %44, %43
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %24, i32 noundef %46)
  store double %45, ptr %47, align 8, !tbaa !9
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %2, i32 noundef %48)
  store double %45, ptr %49, align 8, !tbaa !9
  br label %121

50:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #4
  call void @_ZN7RVectorC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef %21)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  invoke void @_ZN7RVectorC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %7, i32 noundef %21)
          to label %51 unwind label %66

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #4
  invoke void @_ZN7RVectorC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef %21)
          to label %52 unwind label %68

52:                                               ; preds = %51
  %53 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSEd(ptr noundef nonnull align 8 dereferenceable(16) %6, double noundef 0.000000e+00)
          to label %54 unwind label %.loopexit.split-lp.loopexit.split-lp

54:                                               ; preds = %52
  %55 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSEd(ptr noundef nonnull align 8 dereferenceable(16) %8, double noundef 0.000000e+00)
          to label %56 unwind label %.loopexit.split-lp.loopexit.split-lp

56:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  %57 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  store ptr %57, 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) #4
  %58 = load i64, ptr %9, align 8, !tbaa !11
  store i64 %58, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  %59 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  store ptr %59, 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) #4
  %60 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  br i1 %60, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %56, %62
  %61 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  invoke void @_Z4axpydRK7RVectorS1_(double noundef 1.000000e+00, ptr noundef nonnull align 8 dereferenceable(16) %61, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %62 unwind label %.loopexit.split-lp.loopexit

62:                                               ; preds = %.lr.ph
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorI5TrialEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  %64 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  store ptr %64, 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) #4
  %65 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  br i1 %65, label %.lr.ph, label %._crit_edge, !llvm.loop !13

66:                                               ; preds = %50
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %120

68:                                               ; preds = %51
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %119

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

.loopexit.split-lp.loopexit.split-lp:             ; preds = %._crit_edge62, %._crit_edge, %54, %52
  %lpad.loopexit.split-lp57 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit.split.us
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit.us, %.loopexit.split.us ], [ %lpad.loopexit56, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp57, %.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  br label %119

._crit_edge:                                      ; preds = %62, %56
  %70 = sitofp i32 %32 to double
  %71 = fdiv double 1.000000e+00, %70
  invoke void @_Z4scaldRK7RVector(double noundef %71, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %72 unwind label %.loopexit.split-lp.loopexit.split-lp

72:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #4
  %73 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  store ptr %73, ptr %14, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  %74 = load i64, ptr %13, align 8, !tbaa !11
  store i64 %74, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #4
  %75 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  store ptr %75, ptr %16, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  %76 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  br i1 %76, label %.preheader.lr.ph, label %._crit_edge62

.preheader.lr.ph:                                 ; preds = %72
  %77 = icmp sgt i32 %21, 0
  br i1 %77, label %.preheader.us, label %.preheader

.preheader.us:                                    ; preds = %.preheader.lr.ph, %.preheader.us.backedge
  %.04859.us = phi i32 [ %.04859.us.be, %.preheader.us.backedge ], [ 0, %.preheader.lr.ph ]
  %78 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %79 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7RVectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %78)
          to label %80 unwind label %.loopexit.split.us

80:                                               ; preds = %.preheader.us
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef %.04859.us)
  %82 = load double, ptr %81, align 8, !tbaa !9
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef %.04859.us)
  %84 = load double, ptr %83, align 8, !tbaa !9
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %7, i32 noundef %.04859.us)
  %86 = load double, ptr %85, align 8, !tbaa !9
  %87 = fsub double %84, %86
  %square.us = fmul double %87, %87
  %88 = fadd double %82, %square.us
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef %.04859.us)
  store double %88, ptr %89, align 8, !tbaa !9
  %90 = add nuw nsw i32 %.04859.us, 1
  %exitcond.not = icmp eq i32 %90, %21
  br i1 %exitcond.not, label %._crit_edge61.us, label %.preheader.us.backedge

.preheader.us.backedge:                           ; preds = %80, %._crit_edge61.us
  %.04859.us.be = phi i32 [ %90, %80 ], [ 0, %._crit_edge61.us ]
  br label %.preheader.us, !llvm.loop !15

._crit_edge61.us:                                 ; preds = %80
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorI5TrialEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #4
  %92 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  store ptr %92, ptr %16, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  %93 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  br i1 %93, label %.preheader.us.backedge, label %._crit_edge62

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

.preheader:                                       ; preds = %.preheader.lr.ph, %.preheader
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorI5TrialEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #4
  %95 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  store ptr %95, ptr %16, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  %96 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  br i1 %96, label %.preheader, label %._crit_edge62, !llvm.loop !15

._crit_edge62:                                    ; preds = %.preheader, %._crit_edge61.us, %72
  invoke void @_Z4scaldRK7RVector(double noundef %71, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %97 unwind label %.loopexit.split-lp.loopexit.split-lp

97:                                               ; preds = %._crit_edge62
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef 0)
  %99 = load double, ptr %98, align 8, !tbaa !9
  store i32 0, ptr %5, align 4, !tbaa !5
  %100 = icmp sgt i32 %21, 1
  br i1 %100, label %.lr.ph66, label %._crit_edge67

.lr.ph66:                                         ; preds = %97, %107
  %.04664 = phi double [ %.147, %107 ], [ %99, %97 ]
  %.14963 = phi i32 [ %108, %107 ], [ 1, %97 ]
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef %.14963)
  %102 = load double, ptr %101, align 8, !tbaa !9
  %103 = fcmp ogt double %102, %.04664
  br i1 %103, label %104, label %107

104:                                              ; preds = %.lr.ph66
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef %.14963)
  %106 = load double, ptr %105, align 8, !tbaa !9
  store i32 %.14963, ptr %5, align 4, !tbaa !5
  br label %107

107:                                              ; preds = %.lr.ph66, %104
  %.147 = phi double [ %106, %104 ], [ %.04664, %.lr.ph66 ]
  %108 = add nuw nsw i32 %.14963, 1
  %exitcond75.not = icmp eq i32 %108, %21
  br i1 %exitcond75.not, label %._crit_edge67.loopexit, label %.lr.ph66, !llvm.loop !16

._crit_edge67.loopexit:                           ; preds = %107
  %.pre = load i32, ptr %5, align 4, !tbaa !5
  br label %._crit_edge67

._crit_edge67:                                    ; preds = %._crit_edge67.loopexit, %97
  %109 = phi i32 [ %.pre, %._crit_edge67.loopexit ], [ 0, %97 ]
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef %109)
  %111 = load double, ptr %110, align 8, !tbaa !9
  %112 = load i32, ptr %5, align 4, !tbaa !5
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %24, i32 noundef %112)
  store double %111, ptr %113, align 8, !tbaa !9
  %114 = load i32, ptr %5, align 4, !tbaa !5
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef %114)
  %116 = load double, ptr %115, align 8, !tbaa !9
  %117 = load i32, ptr %5, align 4, !tbaa !5
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7RVectorclEi(ptr noundef nonnull align 8 dereferenceable(16) %2, i32 noundef %117)
  store double %116, ptr %118, align 8, !tbaa !9
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  call void @_ZN7RVectorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  call void @llvm.lifetime.end.p0(i64 16, 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
  br label %121

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

120:                                              ; preds = %119, %66
  %.pn.pn = phi { ptr, i32 } [ %.pn, %119 ], [ %67, %66 ]
  call void @llvm.lifetime.end.p0(i64 16, 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 @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn.pn

121:                                              ; preds = %._crit_edge67, %33
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #4
  %122 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  store ptr %122, ptr %18, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #4
  %123 = load i64, ptr %17, align 8, !tbaa !11
  store i64 %123, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #4
  %124 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  store ptr %124, ptr %20, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #4
  %125 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #4
  br i1 %125, label %.lr.ph71, label %._crit_edge72

.lr.ph71:                                         ; preds = %121, %149
  %.05069 = phi double [ %.151, %149 ], [ 0x7FEFFFFFFFFFFFFF, %121 ]
  %.05268 = phi double [ %.153, %149 ], [ 0x7FEFFFFFFFFFFFFF, %121 ]
  %126 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %127 = call noundef zeroext i1 @_ZN4TBox9InsideBoxERK7RVector(ptr noundef nonnull align 8 dereferenceable(64) %1, ptr noundef nonnull align 8 dereferenceable(16) %126)
  %128 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %127, label %129, label %140

129:                                              ; preds = %.lr.ph71
  %130 = getelementptr inbounds i8, ptr %128, i64 16
  %131 = load double, ptr %130, align 8, !tbaa !17
  %132 = fcmp olt double %.05268, %131
  br i1 %132, label %137, label %133

133:                                              ; preds = %129
  %134 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %135 = getelementptr inbounds i8, ptr %134, i64 16
  %136 = load double, ptr %135, align 8, !tbaa !17
  br label %137

137:                                              ; preds = %129, %133
  %138 = phi double [ %136, %133 ], [ %.05268, %129 ]
  %139 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @_ZN4TBox8AddTrialERK5Trial(ptr noundef nonnull align 8 dereferenceable(64) %1, ptr noundef nonnull align 8 dereferenceable(24) %139)
  br label %149

140:                                              ; preds = %.lr.ph71
  call void @_ZN4TBox8AddTrialERK5Trial(ptr noundef nonnull align 8 dereferenceable(64) %2, ptr noundef nonnull align 8 dereferenceable(24) %128)
  %141 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %142 = getelementptr inbounds i8, ptr %141, i64 16
  %143 = load double, ptr %142, align 8, !tbaa !17
  %144 = fcmp olt double %.05069, %143
  br i1 %144, label %149, label %145

145:                                              ; preds = %140
  %146 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt20_List_const_iteratorI5TrialEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %147 = getelementptr inbounds i8, ptr %146, i64 16
  %148 = load double, ptr %147, align 8, !tbaa !17
  br label %149

149:                                              ; preds = %145, %140, %137
  %.153 = phi double [ %138, %137 ], [ %.05268, %140 ], [ %.05268, %145 ]
  %.151 = phi double [ %.05069, %137 ], [ %.05069, %140 ], [ %148, %145 ]
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorI5TrialEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #4
  %151 = call ptr @_ZNSt7__cxx114listI5TrialSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  store ptr %151, ptr %20, align 8
  call void @_ZNSt20_List_const_iteratorI5TrialEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #4
  %152 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorI5TrialES3_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #4
  br i1 %152, label %.lr.ph71, label %._crit_edge72, !llvm.loop !20

._crit_edge72:                                    ; preds = %149, %121
  %.052.lcssa = phi double [ 0x7FEFFFFFFFFFFFFF, %121 ], [ %.153, %149 ]
  %.050.lcssa = phi double [ 0x7FEFFFFFFFFFFFFF, %121 ], [ %.151, %149 ]
  %153 = getelementptr inbounds i8, ptr %1, i64 32
  store double %.052.lcssa, ptr %153, align 8, !tbaa !21
  %154 = getelementptr inbounds i8, ptr %2, i64 32
  store double %.050.lcssa, ptr %154, align 8, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN4TBox11LongestSideEPi(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4TBox9InsideBoxERK7RVector(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 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 = !{!"int", !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 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = !{!18, !10, i64 16}
!18 = !{!"_ZTS5Trial", !19, i64 0, !10, i64 16}
!19 = !{!"_ZTS7RVector", !6, i64 0, !12, i64 8}
!20 = distinct !{!20, !14}
!21 = !{!22, !10, i64 32}
!22 = !{!"_ZTS4TBox", !23, i64 0, !10, i64 32, !24, i64 40}
!23 = !{!"_ZTS4VBox", !19, i64 0, !19, i64 16}
!24 = !{!"_ZTSNSt7__cxx114listI5TrialSaIS1_EEE", !25, i64 0}
!25 = !{!"_ZTSNSt7__cxx1110_List_baseI5TrialSaIS1_EEE", !26, i64 0}
!26 = !{!"_ZTSNSt7__cxx1110_List_baseI5TrialSaIS1_EE10_List_implE", !27, i64 0}
!27 = !{!"_ZTSNSt8__detail17_List_node_headerE", !28, i64 0, !29, i64 16}
!28 = !{!"_ZTSNSt8__detail15_List_node_baseE", !12, i64 0, !12, i64 8}
!29 = !{!"long", !7, i64 0}


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