; LLVM IR from buresjan/optim_lbm :: nomad/src/Algos/DMultiMads (DMultiMadsBarrier)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::shared_ptr.35" = type { %"class.std::__shared_ptr.36" }
%"class.std::__shared_ptr.36" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.NOMAD_4_3::Double" = type <{ ptr, double, i8, [7 x i8] }>
%"class.NOMAD_4_3::DMultiMadsBarrier" = type { %"class.NOMAD_4_3::BarrierBase", %"class.std::shared_ptr", %"class.std::shared_ptr", %"class.NOMAD_4_3::ArrayOfDouble", %"class.std::vector", i64, %"class.std::vector.9", i64 }
%"class.NOMAD_4_3::BarrierBase" = type { ptr, %"class.std::vector", %"class.std::vector", %"class.std::shared_ptr", %"class.std::shared_ptr", %"class.NOMAD_4_3::Double", i64 }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.NOMAD_4_3::ArrayOfDouble" = type { ptr, i64, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::EvalPoint>, std::allocator<std::shared_ptr<NOMAD_4_3::EvalPoint>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::EvalPoint>, std::allocator<std::shared_ptr<NOMAD_4_3::EvalPoint>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::EvalPoint>, std::allocator<std::shared_ptr<NOMAD_4_3::EvalPoint>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::EvalPoint>, std::allocator<std::shared_ptr<NOMAD_4_3::EvalPoint>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = type { %"struct.std::_Vector_base<NOMAD_4_3::BBInputType, std::allocator<NOMAD_4_3::BBInputType>>::_Vector_impl" }
%"struct.std::_Vector_base<NOMAD_4_3::BBInputType, std::allocator<NOMAD_4_3::BBInputType>>::_Vector_impl" = type { %"struct.std::_Vector_base<NOMAD_4_3::BBInputType, std::allocator<NOMAD_4_3::BBInputType>>::_Vector_impl_data" }
%"struct.std::_Vector_base<NOMAD_4_3::BBInputType, std::allocator<NOMAD_4_3::BBInputType>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #2

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

declare void @_ZN9NOMAD_4_36DoubleC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK9NOMAD_4_39EvalPoint7getMeshEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.35") align 8, ptr noundef nonnull align 8 dereferenceable(160)) #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK9NOMAD_4_317DMultiMadsBarrier19getMeshMaxFrameSizeESt10shared_ptrINS_9EvalPointEE(ptr dead_on_unwind noalias writable sret(%"class.NOMAD_4_3::Double") align 8 %0, ptr noundef nonnull align 8 dereferenceable(240) %1, ptr noundef %2) #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.NOMAD_4_3::Double", align 8
  %8 = alloca double, align 8
  %9 = alloca %"class.NOMAD_4_3::Double", align 8
  %10 = alloca double, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::shared_ptr.35", align 8
  %14 = alloca i8, align 1
  %15 = alloca %"class.std::shared_ptr.35", align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca %"class.NOMAD_4_3::Double", align 8
  %19 = alloca %"class.NOMAD_4_3::Double", align 8
  %20 = alloca %"class.NOMAD_4_3::Double", align 8
  %21 = alloca double, align 8
  %22 = alloca i32, align 4
  %23 = alloca %"class.NOMAD_4_3::Double", align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %26 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store double -1.000000e+00, ptr %8, align 8, !tbaa !9
  call void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store double -1.000000e+00, ptr %10, align 8, !tbaa !9
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %9, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %27 unwind label %40

27:                                               ; preds = %3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  %28 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  invoke void @_ZNK9NOMAD_4_39EvalPoint7getMeshEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.35") align 8 %13, ptr noundef nonnull align 8 dereferenceable(160) %28)
          to label %29 unwind label %44

29:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  store i8 0, ptr %14, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %30 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  invoke void @_ZNK9NOMAD_4_39EvalPoint7getMeshEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.35") align 8 %15, ptr noundef nonnull align 8 dereferenceable(160) %30)
          to label %31 unwind label %48

31:                                               ; preds = %29
  %32 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  %33 = invoke noundef i64 @_ZNK9NOMAD_4_38MeshBase7getSizeEv(ptr noundef nonnull align 8 dereferenceable(257) %32)
          to label %34 unwind label %52

34:                                               ; preds = %31
  %35 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %36 = invoke noundef i64 @_ZNK9NOMAD_4_313ArrayOfDouble4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %35)
          to label %37 unwind label %52

37:                                               ; preds = %34
  %38 = icmp ult i64 %33, %36
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  br i1 %38, label %39, label %57

39:                                               ; preds = %37
  store i8 1, ptr %14, align 1, !tbaa !11
  br label %57

40:                                               ; preds = %3
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %11, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %188

44:                                               ; preds = %27
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %11, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %12, align 4
  br label %187

48:                                               ; preds = %29
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %11, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %12, align 4
  br label %56

52:                                               ; preds = %34, %31
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %11, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %12, align 4
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #6
  br label %56

56:                                               ; preds = %52, %48
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  br label %186

57:                                               ; preds = %39, %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store i64 0, ptr %16, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  store i64 0, ptr %17, align 8, !tbaa !13
  br label %58

58:                                               ; preds = %140, %57
  %59 = load i64, ptr %17, align 8, !tbaa !13
  %60 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %61 = invoke noundef i64 @_ZNK9NOMAD_4_313ArrayOfDouble4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
          to label %62 unwind label %65

62:                                               ; preds = %58
  %63 = icmp ult i64 %59, %61
  br i1 %63, label %69, label %64

64:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %144

65:                                               ; preds = %76, %72, %58
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %11, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %12, align 4
  br label %143

69:                                               ; preds = %62
  %70 = load i8, ptr %14, align 1, !tbaa !11, !range !15, !noundef !16
  %71 = trunc i8 %70 to i1
  br i1 %71, label %72, label %82

72:                                               ; preds = %69
  %73 = getelementptr inbounds %"class.NOMAD_4_3::DMultiMadsBarrier", ptr %26, i32 0, i32 3
  %74 = load i64, ptr %17, align 8, !tbaa !13
  %75 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %74)
          to label %76 unwind label %65

76:                                               ; preds = %72
  %77 = invoke noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17) %75)
          to label %78 unwind label %65

78:                                               ; preds = %76
  br i1 %77, label %79, label %82

79:                                               ; preds = %78
  %80 = load i64, ptr %16, align 8, !tbaa !13
  %81 = add i64 %80, 1
  store i64 %81, ptr %16, align 8, !tbaa !13
  br label %140

82:                                               ; preds = %78, %69
  %83 = getelementptr inbounds %"class.NOMAD_4_3::DMultiMadsBarrier", ptr %26, i32 0, i32 6
  %84 = load i64, ptr %17, align 8, !tbaa !13
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIN9NOMAD_4_311BBInputTypeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %84) #6
  %86 = load i32, ptr %85, align 4, !tbaa !17
  %87 = icmp eq i32 %86, 0
  br i1 %87, label %88, label %110

88:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  %89 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  %90 = load i64, ptr %17, align 8, !tbaa !13
  %91 = load i64, ptr %16, align 8, !tbaa !13
  %92 = sub i64 %90, %91
  %93 = load ptr, ptr %89, align 8, !tbaa !19
  %94 = getelementptr inbounds ptr, ptr %93, i64 13
  %95 = load ptr, ptr %94, align 8
  invoke void %95(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %18, ptr noundef nonnull align 8 dereferenceable(257) %89, i64 noundef %92)
          to label %96 unwind label %101

96:                                               ; preds = %88
  %97 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZSt3maxIN9NOMAD_4_36DoubleEERKT_S4_S4_(ptr noundef nonnull align 8 dereferenceable(17) %7, ptr noundef nonnull align 8 dereferenceable(17) %18)
          to label %98 unwind label %105

98:                                               ; preds = %96
  %99 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %7, ptr noundef nonnull align 8 dereferenceable(17) %97)
          to label %100 unwind label %105

100:                                              ; preds = %98
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %18) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  br label %139

101:                                              ; preds = %88
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %11, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %12, align 4
  br label %109

105:                                              ; preds = %98, %96
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %11, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %12, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %18) #6
  br label %109

109:                                              ; preds = %105, %101
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  br label %143

110:                                              ; preds = %82
  %111 = getelementptr inbounds %"class.NOMAD_4_3::DMultiMadsBarrier", ptr %26, i32 0, i32 6
  %112 = load i64, ptr %17, align 8, !tbaa !13
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIN9NOMAD_4_311BBInputTypeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %111, i64 noundef %112) #6
  %114 = load i32, ptr %113, align 4, !tbaa !17
  %115 = icmp eq i32 %114, 2
  br i1 %115, label %116, label %138

116:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #6
  %117 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  %118 = load i64, ptr %17, align 8, !tbaa !13
  %119 = load i64, ptr %16, align 8, !tbaa !13
  %120 = sub i64 %118, %119
  %121 = load ptr, ptr %117, align 8, !tbaa !19
  %122 = getelementptr inbounds ptr, ptr %121, i64 13
  %123 = load ptr, ptr %122, align 8
  invoke void %123(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %19, ptr noundef nonnull align 8 dereferenceable(257) %117, i64 noundef %120)
          to label %124 unwind label %129

124:                                              ; preds = %116
  %125 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZSt3maxIN9NOMAD_4_36DoubleEERKT_S4_S4_(ptr noundef nonnull align 8 dereferenceable(17) %9, ptr noundef nonnull align 8 dereferenceable(17) %19)
          to label %126 unwind label %133

126:                                              ; preds = %124
  %127 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %9, ptr noundef nonnull align 8 dereferenceable(17) %125)
          to label %128 unwind label %133

128:                                              ; preds = %126
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %19) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  br label %138

129:                                              ; preds = %116
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %11, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %12, align 4
  br label %137

133:                                              ; preds = %126, %124
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %11, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %12, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %19) #6
  br label %137

137:                                              ; preds = %133, %129
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  br label %143

138:                                              ; preds = %128, %110
  br label %139

139:                                              ; preds = %138, %100
  br label %140

140:                                              ; preds = %139, %79
  %141 = load i64, ptr %17, align 8, !tbaa !13
  %142 = add i64 %141, 1
  store i64 %142, ptr %17, align 8, !tbaa !13
  br label %58, !llvm.loop !21

143:                                              ; preds = %137, %109, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %185

144:                                              ; preds = %64
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  store double 0.000000e+00, ptr %21, align 8, !tbaa !9
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %20, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %145 unwind label %150

145:                                              ; preds = %144
  %146 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3gtERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %7, ptr noundef nonnull align 8 dereferenceable(17) %20)
          to label %147 unwind label %154

147:                                              ; preds = %145
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  br i1 %146, label %148, label %163

148:                                              ; preds = %147
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %0, ptr noundef nonnull align 8 dereferenceable(17) %7)
          to label %149 unwind label %159

149:                                              ; preds = %148
  store i32 1, ptr %22, align 4
  br label %184

150:                                              ; preds = %144
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %11, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %12, align 4
  br label %158

154:                                              ; preds = %145
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %11, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %12, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %20) #6
  br label %158

158:                                              ; preds = %154, %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  br label %185

159:                                              ; preds = %167, %148
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %11, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %12, align 4
  br label %185

163:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  store double 0.000000e+00, ptr %24, align 8, !tbaa !9
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %23, ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %164 unwind label %169

164:                                              ; preds = %163
  %165 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3gtERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %9, ptr noundef nonnull align 8 dereferenceable(17) %23)
          to label %166 unwind label %173

166:                                              ; preds = %164
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  br i1 %165, label %167, label %178

167:                                              ; preds = %166
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %0, ptr noundef nonnull align 8 dereferenceable(17) %9)
          to label %168 unwind label %159

168:                                              ; preds = %167
  store i32 1, ptr %22, align 4
  br label %184

169:                                              ; preds = %163
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %11, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %12, align 4
  br label %177

173:                                              ; preds = %164
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %11, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %12, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %23) #6
  br label %177

177:                                              ; preds = %173, %169
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  br label %185

178:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  store double 1.000000e+00, ptr %25, align 8, !tbaa !9
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %0, ptr noundef nonnull align 8 dereferenceable(8) %25)
          to label %179 unwind label %180

179:                                              ; preds = %178
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  store i32 1, ptr %22, align 4
  br label %184

180:                                              ; preds = %178
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %11, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %185

184:                                              ; preds = %179, %168, %149
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  ret void

185:                                              ; preds = %180, %177, %159, %158, %143
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %186

186:                                              ; preds = %185, %56
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #6
  br label %187

187:                                              ; preds = %186, %44
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %9) #6
  br label %188

188:                                              ; preds = %187, %40
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  br label %189

189:                                              ; preds = %188
  %190 = load ptr, ptr %11, align 8
  %191 = load i32, ptr %12, align 4
  %192 = insertvalue { ptr, i32 } poison, ptr %190, 0
  %193 = insertvalue { ptr, i32 } %192, i32 %191, 1
  resume { ptr, i32 } %193
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9NOMAD_4_3gtERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) #5

declare noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK9NOMAD_4_38MeshBase7getSizeEv(ptr noundef nonnull align 8 dereferenceable(257)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIN9NOMAD_4_311BBInputTypeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(17) ptr @_ZSt3maxIN9NOMAD_4_36DoubleEERKT_S4_S4_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!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 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !18, i64 0}
!18 = !{!"_ZTSN9NOMAD_4_311BBInputTypeE", !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !8, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::shared_ptr.35" = type { %"class.std::__shared_ptr.36" }
%"class.std::__shared_ptr.36" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.NOMAD_4_3::Double" = type <{ ptr, double, i8, [7 x i8] }>

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

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #2

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

declare void @_ZN9NOMAD_4_36DoubleC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK9NOMAD_4_39EvalPoint7getMeshEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.35") align 8, ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK9NOMAD_4_317DMultiMadsBarrier19getMeshMaxFrameSizeESt10shared_ptrINS_9EvalPointEE(ptr dead_on_unwind noalias writable sret(%"class.NOMAD_4_3::Double") align 8 %0, ptr noundef nonnull align 8 dereferenceable(240) %1, ptr noundef %2) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.NOMAD_4_3::Double", align 8
  %5 = alloca double, align 8
  %6 = alloca %"class.NOMAD_4_3::Double", align 8
  %7 = alloca double, align 8
  %8 = alloca %"class.std::shared_ptr.35", align 8
  %9 = alloca %"class.std::shared_ptr.35", align 8
  %10 = alloca %"class.NOMAD_4_3::Double", align 8
  %11 = alloca %"class.NOMAD_4_3::Double", align 8
  %12 = alloca %"class.NOMAD_4_3::Double", align 8
  %13 = alloca double, align 8
  %14 = alloca %"class.NOMAD_4_3::Double", align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store double -1.000000e+00, ptr %5, align 8, !tbaa !5
  call void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  store double -1.000000e+00, ptr %7, align 8, !tbaa !5
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %17 unwind label %29

17:                                               ; preds = %3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  %18 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  call void @_ZNK9NOMAD_4_39EvalPoint7getMeshEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.35") align 8 %8, ptr noundef nonnull align 8 dereferenceable(160) %18)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  %19 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  call void @_ZNK9NOMAD_4_39EvalPoint7getMeshEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.35") align 8 %9, ptr noundef nonnull align 8 dereferenceable(160) %19)
  %20 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  %21 = call noundef i64 @_ZNK9NOMAD_4_38MeshBase7getSizeEv(ptr noundef nonnull align 8 dereferenceable(257) %20)
  %22 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %23 = call noundef i64 @_ZNK9NOMAD_4_313ArrayOfDouble4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %22)
  %24 = icmp ult i64 %21, %23
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  %25 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %26 = call noundef i64 @_ZNK9NOMAD_4_313ArrayOfDouble4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25)
  %.not = icmp eq i64 %26, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %17
  %27 = getelementptr inbounds i8, ptr %1, i64 152
  %28 = getelementptr inbounds i8, ptr %1, i64 208
  br label %33

29:                                               ; preds = %3
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %111

._crit_edge:                                      ; preds = %80, %17
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  store double 0.000000e+00, ptr %13, align 8, !tbaa !5
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %12, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %85 unwind label %88

31:                                               ; preds = %34
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %110

33:                                               ; preds = %.lr.ph, %80
  %.035 = phi i64 [ 0, %.lr.ph ], [ %81, %80 ]
  %.01334 = phi i64 [ 0, %.lr.ph ], [ %.1, %80 ]
  br i1 %24, label %34, label %40

34:                                               ; preds = %33
  %35 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %.035)
          to label %36 unwind label %31

36:                                               ; preds = %34
  %37 = call noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17) %35)
  br i1 %37, label %38, label %40

38:                                               ; preds = %36
  %39 = add i64 %.01334, 1
  br label %80

40:                                               ; preds = %36, %33
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIN9NOMAD_4_311BBInputTypeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %.035) #6
  %42 = load i32, ptr %41, align 4, !tbaa !9
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %60

44:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  %45 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  %46 = sub i64 %.035, %.01334
  %47 = load ptr, ptr %45, align 8, !tbaa !11
  %48 = getelementptr inbounds i8, ptr %47, i64 104
  %49 = load ptr, ptr %48, align 8
  invoke void %49(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %10, ptr noundef nonnull align 8 dereferenceable(257) %45, i64 noundef %46)
          to label %50 unwind label %55

50:                                               ; preds = %44
  %51 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZSt3maxIN9NOMAD_4_36DoubleEERKT_S4_S4_(ptr noundef nonnull align 8 dereferenceable(17) %4, ptr noundef nonnull align 8 dereferenceable(17) %10)
          to label %52 unwind label %57

52:                                               ; preds = %50
  %53 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %4, ptr noundef nonnull align 8 dereferenceable(17) %51)
          to label %54 unwind label %57

54:                                               ; preds = %52
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  br label %80

55:                                               ; preds = %44
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %59

57:                                               ; preds = %52, %50
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %10) #6
  br label %59

59:                                               ; preds = %57, %55
  %.pn29 = phi { ptr, i32 } [ %58, %57 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  br label %110

60:                                               ; preds = %40
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIN9NOMAD_4_311BBInputTypeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %.035) #6
  %62 = load i32, ptr %61, align 4, !tbaa !9
  %63 = icmp eq i32 %62, 2
  br i1 %63, label %64, label %80

64:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #6
  %65 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  %66 = sub i64 %.035, %.01334
  %67 = load ptr, ptr %65, align 8, !tbaa !11
  %68 = getelementptr inbounds i8, ptr %67, i64 104
  %69 = load ptr, ptr %68, align 8
  invoke void %69(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %11, ptr noundef nonnull align 8 dereferenceable(257) %65, i64 noundef %66)
          to label %70 unwind label %75

70:                                               ; preds = %64
  %71 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZSt3maxIN9NOMAD_4_36DoubleEERKT_S4_S4_(ptr noundef nonnull align 8 dereferenceable(17) %6, ptr noundef nonnull align 8 dereferenceable(17) %11)
          to label %72 unwind label %77

72:                                               ; preds = %70
  %73 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %6, ptr noundef nonnull align 8 dereferenceable(17) %71)
          to label %74 unwind label %77

74:                                               ; preds = %72
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  br label %80

75:                                               ; preds = %64
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %79

77:                                               ; preds = %72, %70
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %11) #6
  br label %79

79:                                               ; preds = %77, %75
  %.pn27 = phi { ptr, i32 } [ %78, %77 ], [ %76, %75 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  br label %110

80:                                               ; preds = %54, %74, %60, %38
  %.1 = phi i64 [ %39, %38 ], [ %.01334, %54 ], [ %.01334, %74 ], [ %.01334, %60 ]
  %81 = add nuw i64 %.035, 1
  %82 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %83 = call noundef i64 @_ZNK9NOMAD_4_313ArrayOfDouble4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %82)
  %84 = icmp ult i64 %81, %83
  br i1 %84, label %33, label %._crit_edge, !llvm.loop !13

85:                                               ; preds = %._crit_edge
  %86 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3gtERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %4, ptr noundef nonnull align 8 dereferenceable(17) %12)
          to label %87 unwind label %90

87:                                               ; preds = %85
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  br i1 %86, label %.invoke, label %95

88:                                               ; preds = %._crit_edge
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %92

90:                                               ; preds = %85
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %12) #6
  br label %92

92:                                               ; preds = %90, %88
  %.pn = phi { ptr, i32 } [ %91, %90 ], [ %89, %88 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  br label %110

93:                                               ; preds = %.invoke
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %110

95:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  store double 0.000000e+00, ptr %15, align 8, !tbaa !5
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %14, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %96 unwind label %100

96:                                               ; preds = %95
  %97 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3gtERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %6, ptr noundef nonnull align 8 dereferenceable(17) %14)
          to label %98 unwind label %102

98:                                               ; preds = %96
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  br i1 %97, label %.invoke, label %105

.invoke:                                          ; preds = %87, %98
  %99 = phi ptr [ %6, %98 ], [ %4, %87 ]
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %0, ptr noundef nonnull align 8 dereferenceable(17) %99)
          to label %109 unwind label %93

100:                                              ; preds = %95
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %104

102:                                              ; preds = %96
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %14) #6
  br label %104

104:                                              ; preds = %102, %100
  %.pn25 = phi { ptr, i32 } [ %103, %102 ], [ %101, %100 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  br label %110

105:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  store double 1.000000e+00, ptr %16, align 8, !tbaa !5
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %0, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %106 unwind label %107

106:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  br label %109

107:                                              ; preds = %105
  %108 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  br label %110

109:                                              ; preds = %.invoke, %106
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  ret void

110:                                              ; preds = %31, %59, %79, %107, %104, %93, %92
  %.pn29.pn.pn = phi { ptr, i32 } [ %94, %93 ], [ %108, %107 ], [ %.pn25, %104 ], [ %.pn, %92 ], [ %.pn29, %59 ], [ %.pn27, %79 ], [ %32, %31 ]
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %6) #6
  br label %111

111:                                              ; preds = %110, %29
  %.pn29.pn.pn.pn = phi { ptr, i32 } [ %.pn29.pn.pn, %110 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn29.pn.pn.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9NOMAD_4_3gtERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK9NOMAD_4_38MeshBase7getSizeEv(ptr noundef nonnull align 8 dereferenceable(257)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIN9NOMAD_4_311BBInputTypeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(17) ptr @_ZSt3maxIN9NOMAD_4_36DoubleEERKT_S4_S4_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN9NOMAD_4_311BBInputTypeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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