; LLVM IR from buresjan/optim_lbm :: nomad/src/Algos/CoordinateSearch (CSMesh)

; 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.6" = type { %"class.std::__shared_ptr.7" }
%"class.std::__shared_ptr.7" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.3" = type { %"class.std::__shared_ptr.4" }
%"class.std::__shared_ptr.4" = type { ptr, %"class.std::__shared_count" }
%"class.NOMAD_4_3::Double" = type <{ ptr, double, i8, [7 x i8] }>
%"class.NOMAD_4_3::MeshBase" = type <{ ptr, i64, %"class.std::shared_ptr", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", i32, i32, i8, [7 x i8] }>
%"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.NOMAD_4_3::CSMesh" = type { %"class.NOMAD_4_3::MeshBase.base", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble" }
%"class.NOMAD_4_3::MeshBase.base" = type <{ ptr, i64, %"class.std::shared_ptr", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", i32, i32, i8 }>

; 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

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

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

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

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

28:                                               ; preds = %2
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_314AllStopReasonsELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #6
  store i8 1, ptr %10, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !11
  br label %29

29:                                               ; preds = %58, %28
  %30 = load i64, ptr %11, align 8, !tbaa !11
  %31 = getelementptr inbounds %"class.NOMAD_4_3::MeshBase", ptr %27, i32 0, i32 1
  %32 = load i64, ptr %31, align 8, !tbaa !13
  %33 = icmp ult i64 %30, %32
  br i1 %33, label %39, label %34

34:                                               ; preds = %29
  store i32 2, ptr %12, align 4
  br label %61

35:                                               ; preds = %2
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %8, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %9, align 4
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_314AllStopReasonsELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  br label %272

39:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store double 0.000000e+00, ptr %14, align 8, !tbaa !20
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %13, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %40 unwind label %48

40:                                               ; preds = %39
  %41 = getelementptr inbounds %"class.NOMAD_4_3::CSMesh", ptr %27, i32 0, i32 3
  %42 = load i64, ptr %11, align 8, !tbaa !11
  %43 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef %42)
          to label %44 unwind label %52

44:                                               ; preds = %40
  %45 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3eqERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %13, ptr noundef nonnull align 8 dereferenceable(17) %43)
          to label %46 unwind label %52

46:                                               ; preds = %44
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  br i1 %45, label %47, label %57

47:                                               ; preds = %46
  store i8 0, ptr %10, align 1, !tbaa !9
  store i32 2, ptr %12, align 4
  br label %61

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

52:                                               ; preds = %44, %40
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %8, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %9, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %13) #6
  br label %56

56:                                               ; preds = %52, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %271

57:                                               ; preds = %46
  br label %58

58:                                               ; preds = %57
  %59 = load i64, ptr %11, align 8, !tbaa !11
  %60 = add i64 %59, 1
  store i64 %60, ptr %11, align 8, !tbaa !11
  br label %29, !llvm.loop !22

61:                                               ; preds = %47, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %62

62:                                               ; preds = %61
  %63 = load i8, ptr %10, align 1, !tbaa !9, !range !24, !noundef !25
  %64 = trunc i8 %63 to i1
  br i1 %64, label %65, label %66

65:                                               ; preds = %62
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %138

66:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store i64 0, ptr %15, align 8, !tbaa !11
  br label %67

67:                                               ; preds = %133, %66
  %68 = load i64, ptr %15, align 8, !tbaa !11
  %69 = getelementptr inbounds %"class.NOMAD_4_3::MeshBase", ptr %27, i32 0, i32 1
  %70 = load i64, ptr %69, align 8, !tbaa !13
  %71 = icmp ult i64 %68, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %67
  store i32 5, ptr %12, align 4
  br label %136

73:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  %74 = load i64, ptr %15, align 8, !tbaa !11
  %75 = load ptr, ptr %27, align 8, !tbaa !26
  %76 = getelementptr inbounds ptr, ptr %75, i64 11
  %77 = load ptr, ptr %76, align 8
  store i1 false, ptr %18, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  store i1 false, ptr %20, align 1
  invoke void %77(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %16, ptr noundef nonnull align 8 dereferenceable(336) %27, i64 noundef %74)
          to label %78 unwind label %107

78:                                               ; preds = %73
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9NOMAD_4_36Double8todoubleEv(ptr noundef nonnull align 8 dereferenceable(17) %16)
          to label %80 unwind label %111

80:                                               ; preds = %78
  %81 = load double, ptr %79, align 8, !tbaa !20
  %82 = getelementptr inbounds %"class.NOMAD_4_3::MeshBase", ptr %27, i32 0, i32 4
  %83 = load i64, ptr %15, align 8, !tbaa !11
  %84 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %83)
          to label %85 unwind label %111

85:                                               ; preds = %80
  %86 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9NOMAD_4_36Double8todoubleEv(ptr noundef nonnull align 8 dereferenceable(17) %84)
          to label %87 unwind label %111

87:                                               ; preds = %85
  %88 = load double, ptr %86, align 8, !tbaa !20
  %89 = fcmp oge double %81, %88
  br i1 %89, label %90, label %98

90:                                               ; preds = %87
  %91 = getelementptr inbounds %"class.NOMAD_4_3::CSMesh", ptr %27, i32 0, i32 3
  %92 = load i64, ptr %15, align 8, !tbaa !11
  %93 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef %92)
          to label %94 unwind label %111

94:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #6
  store i1 true, ptr %18, align 1
  store double 0.000000e+00, ptr %19, align 8, !tbaa !20
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %17, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %95 unwind label %115

95:                                               ; preds = %94
  store i1 true, ptr %20, align 1
  %96 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3eqERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %93, ptr noundef nonnull align 8 dereferenceable(17) %17)
          to label %97 unwind label %119

97:                                               ; preds = %95
  br label %98

98:                                               ; preds = %97, %87
  %99 = phi i1 [ false, %87 ], [ %96, %97 ]
  %100 = load i1, ptr %20, align 1
  br i1 %100, label %101, label %102

101:                                              ; preds = %98
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %17) #6
  br label %102

102:                                              ; preds = %101, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  %103 = load i1, ptr %18, align 1
  br i1 %103, label %104, label %105

104:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #6
  br label %105

105:                                              ; preds = %104, %102
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  br i1 %99, label %106, label %132

106:                                              ; preds = %105
  store i8 0, ptr %5, align 1, !tbaa !9
  store i32 5, ptr %12, align 4
  br label %136

107:                                              ; preds = %73
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %8, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %9, align 4
  br label %131

111:                                              ; preds = %90, %85, %80, %78
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %8, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %9, align 4
  br label %130

115:                                              ; preds = %94
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %8, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %9, align 4
  br label %126

119:                                              ; preds = %95
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %8, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %9, align 4
  %123 = load i1, ptr %20, align 1
  br i1 %123, label %124, label %125

124:                                              ; preds = %119
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %17) #6
  br label %125

125:                                              ; preds = %124, %119
  br label %126

126:                                              ; preds = %125, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  %127 = load i1, ptr %18, align 1
  br i1 %127, label %128, label %129

128:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #6
  br label %129

129:                                              ; preds = %128, %126
  br label %130

130:                                              ; preds = %129, %111
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %16) #6
  br label %131

131:                                              ; preds = %130, %107
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %271

132:                                              ; preds = %105
  br label %133

133:                                              ; preds = %132
  %134 = load i64, ptr %15, align 8, !tbaa !11
  %135 = add i64 %134, 1
  store i64 %135, ptr %15, align 8, !tbaa !11
  br label %67, !llvm.loop !28

136:                                              ; preds = %106, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %137

137:                                              ; preds = %136
  br label %138

138:                                              ; preds = %137, %65
  %139 = load i8, ptr %5, align 1, !tbaa !9, !range !24, !noundef !25
  %140 = trunc i8 %139 to i1
  br i1 %140, label %141, label %148

141:                                              ; preds = %138
  %142 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_315AlgoStopReasonsINS0_10CSStopTypeEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZN9NOMAD_4_315AlgoStopReasonsINS_10CSStopTypeEE3setES1_(ptr noundef nonnull align 8 dereferenceable(40) %142, i32 noundef 2)
          to label %143 unwind label %144

143:                                              ; preds = %141
  br label %148

144:                                              ; preds = %226, %154, %141
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %8, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %9, align 4
  br label %271

148:                                              ; preds = %143, %138
  %149 = load i8, ptr %5, align 1, !tbaa !9, !range !24, !noundef !25
  %150 = trunc i8 %149 to i1
  br i1 %150, label %230, label %151

151:                                              ; preds = %148
  %152 = load i8, ptr %10, align 1, !tbaa !9, !range !24, !noundef !25
  %153 = trunc i8 %152 to i1
  br i1 %153, label %230, label %154

154:                                              ; preds = %151
  %155 = getelementptr inbounds %"class.NOMAD_4_3::MeshBase", ptr %27, i32 0, i32 6
  %156 = invoke noundef zeroext i1 @_ZNK9NOMAD_4_313ArrayOfDouble9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(24) %155)
          to label %157 unwind label %144

157:                                              ; preds = %154
  br i1 %156, label %158, label %230

158:                                              ; preds = %157
  store i8 1, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  store i64 0, ptr %21, align 8, !tbaa !11
  br label %159

159:                                              ; preds = %218, %158
  %160 = load i64, ptr %21, align 8, !tbaa !11
  %161 = getelementptr inbounds %"class.NOMAD_4_3::MeshBase", ptr %27, i32 0, i32 1
  %162 = load i64, ptr %161, align 8, !tbaa !13
  %163 = icmp ult i64 %160, %162
  br i1 %163, label %165, label %164

164:                                              ; preds = %159
  store i32 8, ptr %12, align 4
  br label %221

165:                                              ; preds = %159
  %166 = getelementptr inbounds %"class.NOMAD_4_3::MeshBase", ptr %27, i32 0, i32 6
  %167 = load i64, ptr %21, align 8, !tbaa !11
  store i1 false, ptr %23, align 1
  store i1 false, ptr %24, align 1
  %168 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %166, i64 noundef %167)
          to label %169 unwind label %198

169:                                              ; preds = %165
  %170 = invoke noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17) %168)
          to label %171 unwind label %198

171:                                              ; preds = %169
  br i1 %170, label %172, label %189

172:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #6
  store i1 true, ptr %23, align 1
  %173 = load i64, ptr %21, align 8, !tbaa !11
  %174 = load ptr, ptr %27, align 8, !tbaa !26
  %175 = getelementptr inbounds ptr, ptr %174, i64 13
  %176 = load ptr, ptr %175, align 8
  invoke void %176(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %22, ptr noundef nonnull align 8 dereferenceable(336) %27, i64 noundef %173)
          to label %177 unwind label %202

177:                                              ; preds = %172
  store i1 true, ptr %24, align 1
  %178 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9NOMAD_4_36Double8todoubleEv(ptr noundef nonnull align 8 dereferenceable(17) %22)
          to label %179 unwind label %206

179:                                              ; preds = %177
  %180 = load double, ptr %178, align 8, !tbaa !20
  %181 = getelementptr inbounds %"class.NOMAD_4_3::MeshBase", ptr %27, i32 0, i32 6
  %182 = load i64, ptr %21, align 8, !tbaa !11
  %183 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %181, i64 noundef %182)
          to label %184 unwind label %206

184:                                              ; preds = %179
  %185 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9NOMAD_4_36Double8todoubleEv(ptr noundef nonnull align 8 dereferenceable(17) %183)
          to label %186 unwind label %206

186:                                              ; preds = %184
  %187 = load double, ptr %185, align 8, !tbaa !20
  %188 = fcmp oge double %180, %187
  br label %189

189:                                              ; preds = %186, %171
  %190 = phi i1 [ false, %171 ], [ %188, %186 ]
  %191 = load i1, ptr %24, align 1
  br i1 %191, label %192, label %193

192:                                              ; preds = %189
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %22) #6
  br label %193

193:                                              ; preds = %192, %189
  %194 = load i1, ptr %23, align 1
  br i1 %194, label %195, label %196

195:                                              ; preds = %193
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  br label %196

196:                                              ; preds = %195, %193
  br i1 %190, label %197, label %217

197:                                              ; preds = %196
  store i8 0, ptr %5, align 1, !tbaa !9
  store i32 8, ptr %12, align 4
  br label %221

198:                                              ; preds = %169, %165
  %199 = landingpad { ptr, i32 }
          cleanup
  %200 = extractvalue { ptr, i32 } %199, 0
  store ptr %200, ptr %8, align 8
  %201 = extractvalue { ptr, i32 } %199, 1
  store i32 %201, ptr %9, align 4
  br label %222

202:                                              ; preds = %172
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %8, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %9, align 4
  br label %213

206:                                              ; preds = %184, %179, %177
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %8, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %9, align 4
  %210 = load i1, ptr %24, align 1
  br i1 %210, label %211, label %212

211:                                              ; preds = %206
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %22) #6
  br label %212

212:                                              ; preds = %211, %206
  br label %213

213:                                              ; preds = %212, %202
  %214 = load i1, ptr %23, align 1
  br i1 %214, label %215, label %216

215:                                              ; preds = %213
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  br label %216

216:                                              ; preds = %215, %213
  br label %222

217:                                              ; preds = %196
  br label %218

218:                                              ; preds = %217
  %219 = load i64, ptr %21, align 8, !tbaa !11
  %220 = add i64 %219, 1
  store i64 %220, ptr %21, align 8, !tbaa !11
  br label %159, !llvm.loop !29

221:                                              ; preds = %197, %164
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %223

222:                                              ; preds = %216, %198
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %271

223:                                              ; preds = %221
  %224 = load i8, ptr %5, align 1, !tbaa !9, !range !24, !noundef !25
  %225 = trunc i8 %224 to i1
  br i1 %225, label %226, label %229

226:                                              ; preds = %223
  %227 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_315AlgoStopReasonsINS0_10CSStopTypeEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZN9NOMAD_4_315AlgoStopReasonsINS_10CSStopTypeEE3setES1_(ptr noundef nonnull align 8 dereferenceable(40) %227, i32 noundef 3)
          to label %228 unwind label %144

228:                                              ; preds = %226
  br label %229

229:                                              ; preds = %228, %223
  br label %230

230:                                              ; preds = %229, %157, %151, %148
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  store i64 0, ptr %25, align 8, !tbaa !11
  br label %231

231:                                              ; preds = %266, %230
  %232 = load i64, ptr %25, align 8, !tbaa !11
  %233 = getelementptr inbounds %"class.NOMAD_4_3::MeshBase", ptr %27, i32 0, i32 1
  %234 = load i64, ptr %233, align 8, !tbaa !13
  %235 = icmp ult i64 %232, %234
  br i1 %235, label %237, label %236

236:                                              ; preds = %231
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %270

237:                                              ; preds = %231
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #6
  %238 = load i64, ptr %25, align 8, !tbaa !11
  %239 = load ptr, ptr %27, align 8, !tbaa !26
  %240 = getelementptr inbounds ptr, ptr %239, i64 13
  %241 = load ptr, ptr %240, align 8
  invoke void %241(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %26, ptr noundef nonnull align 8 dereferenceable(336) %27, i64 noundef %238)
          to label %242 unwind label %252

242:                                              ; preds = %237
  %243 = getelementptr inbounds %"class.NOMAD_4_3::CSMesh", ptr %27, i32 0, i32 3
  %244 = load i64, ptr %25, align 8, !tbaa !11
  %245 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %243, i64 noundef %244)
          to label %246 unwind label %256

246:                                              ; preds = %242
  %247 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3ltERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %26, ptr noundef nonnull align 8 dereferenceable(17) %245)
          to label %248 unwind label %256

248:                                              ; preds = %246
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %26) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #6
  br i1 %247, label %249, label %265

249:                                              ; preds = %248
  %250 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_315AlgoStopReasonsINS0_10CSStopTypeEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZN9NOMAD_4_315AlgoStopReasonsINS_10CSStopTypeEE3setES1_(ptr noundef nonnull align 8 dereferenceable(40) %250, i32 noundef 4)
          to label %251 unwind label %261

251:                                              ; preds = %249
  br label %265

252:                                              ; preds = %237
  %253 = landingpad { ptr, i32 }
          cleanup
  %254 = extractvalue { ptr, i32 } %253, 0
  store ptr %254, ptr %8, align 8
  %255 = extractvalue { ptr, i32 } %253, 1
  store i32 %255, ptr %9, align 4
  br label %260

256:                                              ; preds = %246, %242
  %257 = landingpad { ptr, i32 }
          cleanup
  %258 = extractvalue { ptr, i32 } %257, 0
  store ptr %258, ptr %8, align 8
  %259 = extractvalue { ptr, i32 } %257, 1
  store i32 %259, ptr %9, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %26) #6
  br label %260

260:                                              ; preds = %256, %252
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #6
  br label %269

261:                                              ; preds = %249
  %262 = landingpad { ptr, i32 }
          cleanup
  %263 = extractvalue { ptr, i32 } %262, 0
  store ptr %263, ptr %8, align 8
  %264 = extractvalue { ptr, i32 } %262, 1
  store i32 %264, ptr %9, align 4
  br label %269

265:                                              ; preds = %251, %248
  br label %266

266:                                              ; preds = %265
  %267 = load i64, ptr %25, align 8, !tbaa !11
  %268 = add i64 %267, 1
  store i64 %268, ptr %25, align 8, !tbaa !11
  br label %231, !llvm.loop !30

269:                                              ; preds = %261, %260
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %271

270:                                              ; preds = %236
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_315AlgoStopReasonsINS0_10CSStopTypeEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  ret void

271:                                              ; preds = %269, %222, %144, %131, %56
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_315AlgoStopReasonsINS0_10CSStopTypeEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  br label %272

272:                                              ; preds = %271, %35
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  br label %273

273:                                              ; preds = %272
  %274 = load ptr, ptr %8, align 8
  %275 = load i32, ptr %9, 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 void @_ZN9NOMAD_4_315AlgoStopReasonsINS_10CSStopTypeEE3getESt10shared_ptrINS_14AllStopReasonsEE(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.6") align 8, ptr noundef) #4 align 2

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9NOMAD_4_36Double8todoubleEv(ptr noundef nonnull align 8 dereferenceable(17)) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NOMAD_4_315AlgoStopReasonsINS_10CSStopTypeEE3setES1_(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #4 align 2

declare noundef zeroext i1 @_ZNK9NOMAD_4_313ArrayOfDouble9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "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 = { 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 #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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !12, i64 8}
!14 = !{!"_ZTSN9NOMAD_4_38MeshBaseE", !12, i64 8, !15, i64 16, !18, i64 32, !18, i64 56, !18, i64 80, !18, i64 104, !18, i64 128, !18, i64 152, !18, i64 176, !18, i64 200, !18, i64 224, !19, i64 248, !19, i64 252, !10, i64 256}
!15 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_312PbParametersEE", !16, i64 0}
!16 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_312PbParametersELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !17, i64 8}
!17 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!18 = !{!"_ZTSN9NOMAD_4_313ArrayOfDoubleE", !12, i64 8, !6, i64 16}
!19 = !{!"int", !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"double", !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!27, !27, i64 0}
!27 = !{!"vtable pointer", !8, i64 0}
!28 = distinct !{!28, !23}
!29 = distinct !{!29, !23}
!30 = distinct !{!30, !23}


; 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.6" = type { %"class.std::__shared_ptr.7" }
%"class.std::__shared_ptr.7" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.3" = type { %"class.std::__shared_ptr.4" }
%"class.std::__shared_ptr.4" = type { ptr, %"class.std::__shared_count" }
%"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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK9NOMAD_4_36CSMesh20checkMeshForStoppingESt10shared_ptrINS_14AllStopReasonsEE(ptr noundef nonnull align 8 dereferenceable(336) %0, ptr noundef nonnull %1) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::shared_ptr.6", align 8
  %4 = alloca %"class.std::shared_ptr.3", align 8
  %5 = alloca %"class.NOMAD_4_3::Double", align 8
  %6 = alloca double, align 8
  %7 = alloca %"class.NOMAD_4_3::Double", align 8
  %8 = alloca %"class.NOMAD_4_3::Double", align 8
  %9 = alloca double, align 8
  %10 = alloca %"class.NOMAD_4_3::Double", align 8
  %11 = alloca %"class.NOMAD_4_3::Double", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  call void @_ZNSt10shared_ptrIN9NOMAD_4_314AllStopReasonsEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %1) #6
  invoke void @_ZN9NOMAD_4_315AlgoStopReasonsINS_10CSStopTypeEE3getESt10shared_ptrINS_14AllStopReasonsEE(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.6") align 8 %3, ptr noundef nonnull %4)
          to label %12 unwind label %19

12:                                               ; preds = %2
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_314AllStopReasonsELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #6
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = load i64, ptr %13, align 8, !tbaa !5
  %.not88.not = icmp eq i64 %14, 0
  br i1 %.not88.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %12
  %15 = getelementptr inbounds i8, ptr %0, i64 312
  br label %21

16:                                               ; preds = %26
  %17 = add nuw i64 %.03889, 1
  %18 = load i64, ptr %13, align 8, !tbaa !5
  %.not = icmp ult i64 %17, %18
  br i1 %.not, label %21, label %.critedge72.thread, !llvm.loop !17

19:                                               ; preds = %2
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_314AllStopReasonsELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #6
  br label %126

21:                                               ; preds = %.lr.ph, %16
  %.03889 = phi i64 [ 0, %.lr.ph ], [ %17, %16 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  store double 0.000000e+00, ptr %6, align 8, !tbaa !19
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %22 unwind label %29

22:                                               ; preds = %21
  %23 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %.03889)
          to label %24 unwind label %31

24:                                               ; preds = %22
  %25 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3eqERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %5, ptr noundef nonnull align 8 dereferenceable(17) %23)
          to label %26 unwind label %31

26:                                               ; preds = %24
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br i1 %25, label %.preheader81, label %16

.preheader81:                                     ; preds = %26
  %27 = load i64, ptr %13, align 8, !tbaa !5
  %.not8090.not = icmp eq i64 %27, 0
  br i1 %.not8090.not, label %.critedge76.invoke, label %.lr.ph92

.lr.ph92:                                         ; preds = %.preheader81
  %28 = getelementptr inbounds i8, ptr %0, i64 56
  br label %34

29:                                               ; preds = %21
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %33

31:                                               ; preds = %24, %22
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %5) #6
  br label %33

33:                                               ; preds = %31, %29
  %.pn = phi { ptr, i32 } [ %32, %31 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br label %125

34:                                               ; preds = %.lr.ph92, %65
  %.03791 = phi i64 [ 0, %.lr.ph92 ], [ %66, %65 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  %35 = load ptr, ptr %0, align 8, !tbaa !21
  %36 = getelementptr inbounds i8, ptr %35, i64 88
  %37 = load ptr, ptr %36, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  invoke void %37(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %7, ptr noundef nonnull align 8 dereferenceable(336) %0, i64 noundef %.03791)
          to label %38 unwind label %54

38:                                               ; preds = %34
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9NOMAD_4_36Double8todoubleEv(ptr noundef nonnull align 8 dereferenceable(17) %7)
          to label %40 unwind label %56

40:                                               ; preds = %38
  %41 = load double, ptr %39, align 8, !tbaa !19
  %42 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %.03791)
          to label %43 unwind label %56

43:                                               ; preds = %40
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9NOMAD_4_36Double8todoubleEv(ptr noundef nonnull align 8 dereferenceable(17) %42)
          to label %45 unwind label %56

45:                                               ; preds = %43
  %46 = load double, ptr %44, align 8, !tbaa !19
  %47 = fcmp ult double %41, %46
  br i1 %47, label %.thread77, label %48

48:                                               ; preds = %45
  %49 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %.03791)
          to label %50 unwind label %56

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

51:                                               ; preds = %50
  %52 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3eqERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %49, ptr noundef nonnull align 8 dereferenceable(17) %8)
          to label %53 unwind label %60

.thread77:                                        ; preds = %45
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %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 nonnull %7) #6
  br label %65

53:                                               ; preds = %51
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br i1 %52, label %.critedge72, label %65

54:                                               ; preds = %34
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %64

56:                                               ; preds = %48, %43, %40, %38
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %63

58:                                               ; preds = %50
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %62

60:                                               ; preds = %51
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %8) #6
  br label %62

62:                                               ; preds = %60, %58
  %.pn55 = phi { ptr, i32 } [ %61, %60 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  br label %63

63:                                               ; preds = %62, %56
  %.pn55.pn = phi { ptr, i32 } [ %.pn55, %62 ], [ %57, %56 ]
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %7) #6
  br label %64

64:                                               ; preds = %63, %54
  %.pn55.pn.pn = phi { ptr, i32 } [ %.pn55.pn, %63 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %125

65:                                               ; preds = %.thread77, %53
  %66 = add nuw i64 %.03791, 1
  %67 = load i64, ptr %13, align 8, !tbaa !5
  %.not80 = icmp ult i64 %66, %67
  br i1 %.not80, label %34, label %.critedge76.invoke, !llvm.loop !23

68:                                               ; preds = %.critedge76.invoke, %.critedge72
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %125

.critedge72:                                      ; preds = %53
  %70 = getelementptr inbounds i8, ptr %0, i64 104
  %71 = invoke noundef zeroext i1 @_ZNK9NOMAD_4_313ArrayOfDouble9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(24) %70)
          to label %72 unwind label %68

72:                                               ; preds = %.critedge72
  br i1 %71, label %.preheader, label %.critedge72.threadthread-pre-split

.preheader:                                       ; preds = %72
  %73 = load i64, ptr %13, align 8, !tbaa !5
  %.not6293.not = icmp eq i64 %73, 0
  br i1 %.not6293.not, label %.critedge76.invoke, label %.lr.ph95

.lr.ph95:                                         ; preds = %.preheader, %.critedge74.thread
  %.03494 = phi i64 [ %97, %.critedge74.thread ], [ 0, %.preheader ]
  %74 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %.03494)
          to label %75 unwind label %90

75:                                               ; preds = %.lr.ph95
  %76 = call noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17) %74)
  br i1 %76, label %77, label %.critedge74.thread

77:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  %78 = load ptr, ptr %0, align 8, !tbaa !21
  %79 = getelementptr inbounds i8, ptr %78, i64 104
  %80 = load ptr, ptr %79, align 8
  invoke void %80(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %10, ptr noundef nonnull align 8 dereferenceable(336) %0, i64 noundef %.03494)
          to label %81 unwind label %92

81:                                               ; preds = %77
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9NOMAD_4_36Double8todoubleEv(ptr noundef nonnull align 8 dereferenceable(17) %10)
          to label %83 unwind label %94

83:                                               ; preds = %81
  %84 = load double, ptr %82, align 8, !tbaa !19
  %85 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %.03494)
          to label %86 unwind label %94

86:                                               ; preds = %83
  %87 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9NOMAD_4_36Double8todoubleEv(ptr noundef nonnull align 8 dereferenceable(17) %85)
          to label %.critedge74 unwind label %94

.critedge74:                                      ; preds = %86
  %88 = load double, ptr %87, align 8, !tbaa !19
  %89 = fcmp ult double %84, %88
  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 i1 %89, label %.critedge74.thread, label %.critedge72.threadthread-pre-split

90:                                               ; preds = %.lr.ph95
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %125

92:                                               ; preds = %77
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %96

94:                                               ; preds = %86, %83, %81
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %10) #6
  br label %96

96:                                               ; preds = %92, %94
  %.pn59 = phi { ptr, i32 } [ %95, %94 ], [ %93, %92 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  br label %125

.critedge74.thread:                               ; preds = %75, %.critedge74
  %97 = add nuw i64 %.03494, 1
  %98 = load i64, ptr %13, align 8, !tbaa !5
  %.not62 = icmp ult i64 %97, %98
  br i1 %.not62, label %.lr.ph95, label %.critedge76.invoke, !llvm.loop !24

.critedge76.invoke:                               ; preds = %65, %.critedge74.thread, %.preheader, %.preheader81
  %99 = phi i32 [ 2, %.preheader81 ], [ 3, %.preheader ], [ 3, %.critedge74.thread ], [ 2, %65 ]
  %100 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_315AlgoStopReasonsINS0_10CSStopTypeEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  invoke void @_ZN9NOMAD_4_315AlgoStopReasonsINS_10CSStopTypeEE3setES1_(ptr noundef nonnull align 8 dereferenceable(40) %100, i32 noundef %99)
          to label %.critedge72.threadthread-pre-split unwind label %68

.critedge72.threadthread-pre-split:               ; preds = %.critedge74, %.critedge76.invoke, %72
  %.pr = load i64, ptr %13, align 8, !tbaa !5
  br label %.critedge72.thread

.critedge72.thread:                               ; preds = %16, %.critedge72.threadthread-pre-split
  %101 = phi i64 [ %.pr, %.critedge72.threadthread-pre-split ], [ %18, %16 ]
  %.not98 = icmp eq i64 %101, 0
  br i1 %.not98, label %._crit_edge, label %.lr.ph97

.lr.ph97:                                         ; preds = %.critedge72.thread
  %102 = getelementptr inbounds i8, ptr %0, i64 312
  br label %103

._crit_edge:                                      ; preds = %121, %12, %.critedge72.thread
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_315AlgoStopReasonsINS0_10CSStopTypeEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  ret void

103:                                              ; preds = %.lr.ph97, %121
  %.096 = phi i64 [ 0, %.lr.ph97 ], [ %122, %121 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #6
  %104 = load ptr, ptr %0, align 8, !tbaa !21
  %105 = getelementptr inbounds i8, ptr %104, i64 104
  %106 = load ptr, ptr %105, align 8
  invoke void %106(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %11, ptr noundef nonnull align 8 dereferenceable(336) %0, i64 noundef %.096)
          to label %107 unwind label %114

107:                                              ; preds = %103
  %108 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %102, i64 noundef %.096)
          to label %109 unwind label %116

109:                                              ; preds = %107
  %110 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3ltERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %11, ptr noundef nonnull align 8 dereferenceable(17) %108)
          to label %111 unwind label %116

111:                                              ; preds = %109
  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 i1 %110, label %112, label %121

112:                                              ; preds = %111
  %113 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_315AlgoStopReasonsINS0_10CSStopTypeEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  invoke void @_ZN9NOMAD_4_315AlgoStopReasonsINS_10CSStopTypeEE3setES1_(ptr noundef nonnull align 8 dereferenceable(40) %113, i32 noundef 4)
          to label %121 unwind label %119

114:                                              ; preds = %103
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %118

116:                                              ; preds = %109, %107
  %117 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %11) #6
  br label %118

118:                                              ; preds = %116, %114
  %.pn63 = phi { ptr, i32 } [ %117, %116 ], [ %115, %114 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  br label %125

119:                                              ; preds = %112
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %125

121:                                              ; preds = %111, %112
  %122 = add nuw i64 %.096, 1
  %123 = load i64, ptr %13, align 8, !tbaa !5
  %124 = icmp ult i64 %122, %123
  br i1 %124, label %103, label %._crit_edge, !llvm.loop !25

125:                                              ; preds = %118, %119, %90, %96, %68, %64, %33
  %.pn65.pn = phi { ptr, i32 } [ %69, %68 ], [ %.pn55.pn.pn, %64 ], [ %.pn, %33 ], [ %.pn59, %96 ], [ %91, %90 ], [ %120, %119 ], [ %.pn63, %118 ]
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_315AlgoStopReasonsINS0_10CSStopTypeEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #6
  br label %126

126:                                              ; preds = %125, %19
  %.pn65.pn.pn = phi { ptr, i32 } [ %.pn65.pn, %125 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn65.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NOMAD_4_315AlgoStopReasonsINS_10CSStopTypeEE3getESt10shared_ptrINS_14AllStopReasonsEE(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.6") align 8, ptr noundef) local_unnamed_addr #4 align 2

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9NOMAD_4_36Double8todoubleEv(ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NOMAD_4_315AlgoStopReasonsINS_10CSStopTypeEE3setES1_(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #4 align 2

declare noundef zeroext i1 @_ZNK9NOMAD_4_313ArrayOfDouble9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "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 = { 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 #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, !7, i64 8}
!6 = !{!"_ZTSN9NOMAD_4_38MeshBaseE", !7, i64 8, !10, i64 16, !14, i64 32, !14, i64 56, !14, i64 80, !14, i64 104, !14, i64 128, !14, i64 152, !14, i64 176, !14, i64 200, !14, i64 224, !15, i64 248, !15, i64 252, !16, i64 256}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_312PbParametersEE", !11, i64 0}
!11 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_312PbParametersELN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0, !13, i64 8}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0}
!14 = !{!"_ZTSN9NOMAD_4_313ArrayOfDoubleE", !7, i64 8, !12, i64 16}
!15 = !{!"int", !8, i64 0}
!16 = !{!"bool", !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !20, i64 0}
!20 = !{!"double", !8, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !9, i64 0}
!23 = distinct !{!23, !18}
!24 = distinct !{!24, !18}
!25 = distinct !{!25, !18}


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