; LLVM IR from ImperialCollegeLondon/pnflow :: src/pnm/pnflow/polygon/polygonImb.ll (ZN6Circle20centreEntryPrsWatInjEv)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.ElemModel = type { ptr, double, double, ptr, ptr, double, ptr, i8, i8, i8, i8, i32, double, double, double, double, double, double, double, %"struct.std::pair", %"struct.std::pair" }
%"struct.std::pair" = type { double, double }
%class.VoidElem = type { %class.ElemModel, double, double, double, double }

@_ZN9ElemModel2PIE = external constant double, align 8
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408)) #0 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

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

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

; Function Attrs: nounwind
declare double @cos(double noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN6Circle20centreEntryPrsWatInjEv(ptr noundef nonnull align 8 dereferenceable(184) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  %14 = alloca i32, align 4
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %17 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  %18 = getelementptr inbounds %class.ElemModel, ptr %17, i32 0, i32 3
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = call noundef i32 @_ZNK4Elem23num_WatCentreFeederNeisEv(ptr noundef nonnull align 8 dereferenceable(408) %19)
  store i32 %20, ptr %3, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %21 = getelementptr inbounds %class.ElemModel, ptr %17, i32 0, i32 16
  %22 = load double, ptr %21, align 8, !tbaa !16
  store double %22, ptr %4, align 8, !tbaa !17
  %23 = getelementptr inbounds %class.ElemModel, ptr %17, i32 0, i32 3
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = call noundef zeroext i1 @_ZNK4Elem8iAmAPoreEv(ptr noundef nonnull align 8 dereferenceable(408) %24)
  br i1 %25, label %26, label %170

26:                                               ; preds = %1
  %27 = getelementptr inbounds %class.VoidElem, ptr %17, i32 0, i32 3
  %28 = load double, ptr %27, align 8, !tbaa !18
  %29 = load double, ptr @_ZN9ElemModel2PIE, align 8, !tbaa !17
  %30 = fdiv double %29, 2.000000e+00
  %31 = fcmp olt double %28, %30
  br i1 %31, label %32, label %170

32:                                               ; preds = %26
  %33 = load i32, ptr %3, align 4, !tbaa !15
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %35, label %170

35:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  store double 0.000000e+00, ptr %5, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 0, ptr %6, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #8
  %36 = getelementptr inbounds %class.ElemModel, ptr %17, i32 0, i32 4
  %37 = load ptr, ptr %36, align 8, !tbaa !20
  %38 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK10CommonData11poreFillAlgB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(1972) %37)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %38)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !15
  br label %39

39:                                               ; preds = %127, %35
  %40 = load i32, ptr %8, align 4, !tbaa !15
  %41 = getelementptr inbounds %class.ElemModel, ptr %17, i32 0, i32 3
  %42 = load ptr, ptr %41, align 8, !tbaa !9
  %43 = invoke noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %42)
          to label %44 unwind label %47

44:                                               ; preds = %39
  %45 = icmp slt i32 %40, %43
  br i1 %45, label %51, label %46

46:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %131

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

51:                                               ; preds = %44
  %52 = getelementptr inbounds %class.ElemModel, ptr %17, i32 0, i32 3
  %53 = load ptr, ptr %52, align 8, !tbaa !9
  %54 = load i32, ptr %8, align 4, !tbaa !15
  %55 = invoke noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %53, i32 noundef %54)
          to label %56 unwind label %47

56:                                               ; preds = %51
  %57 = invoke noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %55)
          to label %58 unwind label %47

58:                                               ; preds = %56
  %59 = getelementptr inbounds %class.ElemModel, ptr %17, i32 0, i32 4
  %60 = load ptr, ptr %59, align 8, !tbaa !20
  %61 = invoke noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984) %60)
          to label %62 unwind label %47

62:                                               ; preds = %58
  %63 = invoke noundef zeroext i1 @_ZNK9ElemModel17affectsAdjEntryPcERK5Fluid(ptr noundef nonnull align 8 dereferenceable(152) %57, ptr noundef nonnull align 8 dereferenceable(80) %61)
          to label %64 unwind label %47

64:                                               ; preds = %62
  br i1 %63, label %65, label %126

65:                                               ; preds = %64
  %66 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %7, i64 noundef 0)
          to label %67 unwind label %47

67:                                               ; preds = %65
  %68 = load i8, ptr %66, align 1, !tbaa !21
  %69 = sext i8 %68 to i32
  %70 = icmp eq i32 %69, 111
  br i1 %70, label %77, label %71

71:                                               ; preds = %67
  %72 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %7, i64 noundef 0)
          to label %73 unwind label %47

73:                                               ; preds = %71
  %74 = load i8, ptr %72, align 1, !tbaa !21
  %75 = sext i8 %74 to i32
  %76 = icmp eq i32 %75, 79
  br i1 %76, label %77, label %105

77:                                               ; preds = %73, %67
  %78 = getelementptr inbounds %class.ElemModel, ptr %17, i32 0, i32 4
  %79 = load ptr, ptr %78, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 5, ptr %11, align 4, !tbaa !15
  %80 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %81 unwind label %101

81:                                               ; preds = %77
  %82 = load i32, ptr %80, align 4, !tbaa !15
  %83 = invoke noundef double @_ZNK10CommonData15poreFillWeightsEi(ptr noundef nonnull align 8 dereferenceable(1972) %79, i32 noundef %82)
          to label %84 unwind label %101

84:                                               ; preds = %81
  %85 = getelementptr inbounds %class.ElemModel, ptr %17, i32 0, i32 3
  %86 = load ptr, ptr %85, align 8, !tbaa !9
  %87 = load i32, ptr %8, align 4, !tbaa !15
  %88 = invoke noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %86, i32 noundef %87)
          to label %89 unwind label %101

89:                                               ; preds = %84
  %90 = invoke noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %88)
          to label %91 unwind label %101

91:                                               ; preds = %89
  %92 = invoke noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %90)
          to label %93 unwind label %101

93:                                               ; preds = %91
  %94 = fmul double %83, %92
  %95 = call i32 @rand() #8
  %96 = sitofp i32 %95 to double
  %97 = fmul double %94, %96
  %98 = fdiv double %97, 0x41DFFFFFFFC00000
  %99 = load double, ptr %5, align 8, !tbaa !17
  %100 = fadd double %99, %98
  store double %100, ptr %5, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %123

101:                                              ; preds = %91, %89, %84, %81, %77
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %9, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %130

105:                                              ; preds = %73
  %106 = getelementptr inbounds %class.ElemModel, ptr %17, i32 0, i32 4
  %107 = load ptr, ptr %106, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 5, ptr %12, align 4, !tbaa !15
  %108 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %109 unwind label %119

109:                                              ; preds = %105
  %110 = load i32, ptr %108, align 4, !tbaa !15
  %111 = invoke noundef double @_ZNK10CommonData15poreFillWeightsEi(ptr noundef nonnull align 8 dereferenceable(1972) %107, i32 noundef %110)
          to label %112 unwind label %119

112:                                              ; preds = %109
  %113 = call i32 @rand() #8
  %114 = sitofp i32 %113 to double
  %115 = fmul double %111, %114
  %116 = fdiv double %115, 0x41DFFFFFFFC00000
  %117 = load double, ptr %5, align 8, !tbaa !17
  %118 = fadd double %117, %116
  store double %118, ptr %5, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %123

119:                                              ; preds = %109, %105
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %9, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %130

123:                                              ; preds = %112, %93
  %124 = load i32, ptr %6, align 4, !tbaa !15
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %6, align 4, !tbaa !15
  br label %126

126:                                              ; preds = %123, %64
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %8, align 4, !tbaa !15
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %8, align 4, !tbaa !15
  br label %39, !llvm.loop !22

130:                                              ; preds = %119, %101, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %169

131:                                              ; preds = %46
  %132 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef @.str.7)
          to label %133 unwind label %149

133:                                              ; preds = %131
  br i1 %132, label %134, label %153

134:                                              ; preds = %133
  %135 = getelementptr inbounds %class.ElemModel, ptr %17, i32 0, i32 4
  %136 = load ptr, ptr %135, align 8, !tbaa !20
  %137 = invoke noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %136)
          to label %138 unwind label %149

138:                                              ; preds = %134
  %139 = getelementptr inbounds %class.VoidElem, ptr %17, i32 0, i32 3
  %140 = load double, ptr %139, align 8, !tbaa !18
  %141 = call double @cos(double noundef %140) #8
  %142 = fmul double 2.000000e+00, %141
  %143 = getelementptr inbounds %class.ElemModel, ptr %17, i32 0, i32 5
  %144 = load double, ptr %143, align 8, !tbaa !24
  %145 = fdiv double %142, %144
  %146 = load double, ptr %5, align 8, !tbaa !17
  %147 = fsub double %145, %146
  %148 = fmul double %137, %147
  store double %148, ptr %4, align 8, !tbaa !17
  br label %168

149:                                              ; preds = %153, %134, %131
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %9, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %10, align 4
  br label %169

153:                                              ; preds = %133
  %154 = getelementptr inbounds %class.ElemModel, ptr %17, i32 0, i32 4
  %155 = load ptr, ptr %154, align 8, !tbaa !20
  %156 = invoke noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %155)
          to label %157 unwind label %149

157:                                              ; preds = %153
  %158 = fmul double 2.000000e+00, %156
  %159 = getelementptr inbounds %class.VoidElem, ptr %17, i32 0, i32 3
  %160 = load double, ptr %159, align 8, !tbaa !18
  %161 = call double @cos(double noundef %160) #8
  %162 = fmul double %158, %161
  %163 = getelementptr inbounds %class.ElemModel, ptr %17, i32 0, i32 5
  %164 = load double, ptr %163, align 8, !tbaa !24
  %165 = load double, ptr %5, align 8, !tbaa !17
  %166 = fadd double %164, %165
  %167 = fdiv double %162, %166
  store double %167, ptr %4, align 8, !tbaa !17
  br label %168

168:                                              ; preds = %157, %138
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %170

169:                                              ; preds = %149, %130
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %217

170:                                              ; preds = %168, %32, %26, %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  store double -1.000000e+26, ptr %13, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !15
  br label %171

171:                                              ; preds = %198, %170
  %172 = load i32, ptr %14, align 4, !tbaa !15
  %173 = getelementptr inbounds %class.ElemModel, ptr %17, i32 0, i32 3
  %174 = load ptr, ptr %173, align 8, !tbaa !9
  %175 = call noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %174)
  %176 = icmp slt i32 %172, %175
  br i1 %176, label %178, label %177

177:                                              ; preds = %171
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %201

178:                                              ; preds = %171
  %179 = getelementptr inbounds %class.ElemModel, ptr %17, i32 0, i32 3
  %180 = load ptr, ptr %179, align 8, !tbaa !9
  %181 = load i32, ptr %14, align 4, !tbaa !15
  %182 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %180, i32 noundef %181)
  %183 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %182)
  %184 = load ptr, ptr %183, align 8, !tbaa !25
  %185 = getelementptr inbounds ptr, ptr %184, i64 22
  %186 = load ptr, ptr %185, align 8
  %187 = call noundef zeroext i1 %186(ptr noundef nonnull align 8 dereferenceable(152) %183)
  br i1 %187, label %188, label %197

188:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %189 = getelementptr inbounds %class.ElemModel, ptr %17, i32 0, i32 3
  %190 = load ptr, ptr %189, align 8, !tbaa !9
  %191 = load i32, ptr %14, align 4, !tbaa !15
  %192 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %190, i32 noundef %191)
  %193 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %192)
  %194 = call noundef double @_ZNK9ElemModel16Pc_pistonTypeAdvEv(ptr noundef nonnull align 8 dereferenceable(152) %193)
  store double %194, ptr %15, align 8, !tbaa !17
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %15)
  %196 = load double, ptr %195, align 8, !tbaa !17
  store double %196, ptr %13, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %197

197:                                              ; preds = %188, %178
  br label %198

198:                                              ; preds = %197
  %199 = load i32, ptr %14, align 4, !tbaa !15
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %14, align 4, !tbaa !15
  br label %171, !llvm.loop !27

201:                                              ; preds = %177
  %202 = load double, ptr %13, align 8, !tbaa !17
  %203 = fcmp olt double %202, -1.000000e+25
  br i1 %203, label %204, label %209

204:                                              ; preds = %201
  %205 = call noundef zeroext i1 @_ZNK9ElemModel15conductAnyWaterEv(ptr noundef nonnull align 8 dereferenceable(152) %17)
  br i1 %205, label %209, label %206

206:                                              ; preds = %204
  %207 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.8)
  %208 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout)
  br label %209

209:                                              ; preds = %206, %204, %201
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %210 = load double, ptr %13, align 8, !tbaa !17
  %211 = load double, ptr %4, align 8, !tbaa !17
  %212 = fmul double 1.000000e-03, %211
  %213 = call double @llvm.fmuladd.f64(double %210, double 0x3FEFF7CED916872B, double %212)
  store double %213, ptr %16, align 8, !tbaa !17
  %214 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %215 = load double, ptr %214, align 8, !tbaa !17
  store double %215, ptr %4, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  %216 = load double, ptr %4, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  ret double %216

217:                                              ; preds = %169
  %218 = load ptr, ptr %9, align 8
  %219 = load i32, ptr %10, align 4
  %220 = insertvalue { ptr, i32 } poison, ptr %218, 0
  %221 = insertvalue { ptr, i32 } %220, i32 %219, 1
  resume { ptr, i32 } %221
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4Elem23num_WatCentreFeederNeisEv(ptr noundef nonnull align 8 dereferenceable(408)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4Elem8iAmAPoreEv(ptr noundef nonnull align 8 dereferenceable(408)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK10CommonData11poreFillAlgB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(1972)) #0 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408), i32 noundef) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9ElemModel17affectsAdjEntryPcERK5Fluid(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef nonnull align 8 dereferenceable(80)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK10CommonData15poreFillWeightsEi(ptr noundef nonnull align 8 dereferenceable(1972), i32 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152)) #0 align 2

; Function Attrs: nounwind
declare i32 @rand() #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK9ElemModel16Pc_pistonTypeAdvEv(ptr noundef nonnull align 8 dereferenceable(152)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK9ElemModel15conductAnyWaterEv(ptr noundef nonnull align 8 dereferenceable(152)) #2 align 2

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { inlinehint 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 #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 = { "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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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, !6, i64 24}
!10 = !{!"_ZTS9ElemModel", !11, i64 8, !11, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !6, i64 48, !12, i64 56, !12, i64 57, !12, i64 58, !12, i64 59, !13, i64 60, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !14, i64 120, !14, i64 136}
!11 = !{!"double", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSSt4pairIddE", !11, i64 0, !11, i64 8}
!15 = !{!13, !13, i64 0}
!16 = !{!10, !11, i64 96}
!17 = !{!11, !11, i64 0}
!18 = !{!19, !11, i64 168}
!19 = !{!"_ZTS8VoidElem", !10, i64 0, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176}
!20 = !{!10, !6, i64 32}
!21 = !{!7, !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!10, !11, i64 40}
!25 = !{!26, !26, i64 0}
!26 = !{!"vtable pointer", !8, i64 0}
!27 = distinct !{!27, !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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@_ZN9ElemModel2PIE = external local_unnamed_addr constant double, align 8
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408)) local_unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN6Circle20centreEntryPrsWatInjEv(ptr noundef nonnull align 8 dereferenceable(184) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca double, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = tail call noundef i32 @_ZNK4Elem23num_WatCentreFeederNeisEv(ptr noundef nonnull align 8 dereferenceable(408) %11)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  %13 = getelementptr inbounds i8, ptr %0, i64 96
  %14 = load double, ptr %13, align 8, !tbaa !14
  store double %14, ptr %2, align 8, !tbaa !15
  %15 = load ptr, ptr %10, align 8, !tbaa !5
  %16 = tail call noundef zeroext i1 @_ZNK4Elem8iAmAPoreEv(ptr noundef nonnull align 8 dereferenceable(408) %15)
  br i1 %16, label %17, label %101

17:                                               ; preds = %1
  %18 = getelementptr inbounds i8, ptr %0, i64 168
  %19 = load double, ptr %18, align 8, !tbaa !16
  %20 = load double, ptr @_ZN9ElemModel2PIE, align 8, !tbaa !15
  %21 = fmul double %20, 5.000000e-01
  %22 = fcmp olt double %19, %21
  %23 = icmp sgt i32 %12, 0
  %or.cond = and i1 %23, %22
  br i1 %or.cond, label %24, label %101

24:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  store i32 0, ptr %3, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #9
  %25 = getelementptr inbounds i8, ptr %0, i64 32
  %26 = load ptr, ptr %25, align 8, !tbaa !19
  %27 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK10CommonData11poreFillAlgB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(1972) %26)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %27)
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  %29 = call noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %28)
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %71, %24
  %.016.lcssa = phi double [ 0.000000e+00, %24 ], [ %.2, %71 ]
  %31 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.7)
  %32 = load ptr, ptr %25, align 8, !tbaa !19
  br i1 %31, label %76, label %89

.lr.ph:                                           ; preds = %24, %71
  %.01620 = phi double [ %.2, %71 ], [ 0.000000e+00, %24 ]
  %.01718 = phi i32 [ %72, %71 ], [ 0, %24 ]
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %33, i32 noundef %.01718)
  %35 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %34)
  %36 = load ptr, ptr %25, align 8, !tbaa !19
  %37 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984) %36)
  %38 = call noundef zeroext i1 @_ZNK9ElemModel17affectsAdjEntryPcERK5Fluid(ptr noundef nonnull align 8 dereferenceable(152) %35, ptr noundef nonnull align 8 dereferenceable(80) %37)
  br i1 %38, label %39, label %71

39:                                               ; preds = %.lr.ph
  %40 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef 0)
  %41 = load i8, ptr %40, align 1, !tbaa !20
  %42 = icmp eq i8 %41, 111
  br i1 %42, label %47, label %43

43:                                               ; preds = %39
  %44 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef 0)
  %45 = load i8, ptr %44, align 1, !tbaa !20
  %46 = icmp eq i8 %45, 79
  br i1 %46, label %47, label %60

47:                                               ; preds = %43, %39
  %48 = load ptr, ptr %25, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  store i32 5, ptr %5, align 4, !tbaa !18
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %50 = load i32, ptr %49, align 4, !tbaa !18
  %51 = call noundef double @_ZNK10CommonData15poreFillWeightsEi(ptr noundef nonnull align 8 dereferenceable(1972) %48, i32 noundef %50)
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %52, i32 noundef %.01718)
  %54 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %53)
  %55 = call noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %54)
  %56 = fmul double %51, %55
  %57 = call i32 @rand() #9
  %58 = sitofp i32 %57 to double
  %59 = fmul double %56, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  br label %68

60:                                               ; preds = %43
  %61 = load ptr, ptr %25, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  store i32 5, ptr %6, align 4, !tbaa !18
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %63 = load i32, ptr %62, align 4, !tbaa !18
  %64 = call noundef double @_ZNK10CommonData15poreFillWeightsEi(ptr noundef nonnull align 8 dereferenceable(1972) %61, i32 noundef %63)
  %65 = call i32 @rand() #9
  %66 = sitofp i32 %65 to double
  %67 = fmul double %64, %66
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  br label %68

68:                                               ; preds = %60, %47
  %.pn.in = phi double [ %59, %47 ], [ %67, %60 ]
  %.pn = fdiv double %.pn.in, 0x41DFFFFFFFC00000
  %.1 = fadd double %.01620, %.pn
  %69 = load i32, ptr %3, align 4, !tbaa !18
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %3, align 4, !tbaa !18
  br label %71

71:                                               ; preds = %.lr.ph, %68
  %.2 = phi double [ %.1, %68 ], [ %.01620, %.lr.ph ]
  %72 = add nuw nsw i32 %.01718, 1
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = call noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %73)
  %75 = icmp slt i32 %72, %74
  br i1 %75, label %.lr.ph, label %._crit_edge, !llvm.loop !21

76:                                               ; preds = %._crit_edge
  %77 = invoke noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %32)
          to label %78 unwind label %87

78:                                               ; preds = %76
  %79 = load double, ptr %18, align 8, !tbaa !16
  %80 = call double @cos(double noundef %79) #9
  %81 = fmul double %80, 2.000000e+00
  %82 = getelementptr inbounds i8, ptr %0, i64 40
  %83 = load double, ptr %82, align 8, !tbaa !23
  %84 = fdiv double %81, %83
  %85 = fsub double %84, %.016.lcssa
  %86 = fmul double %77, %85
  br label %100

87:                                               ; preds = %89, %76
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  resume { ptr, i32 } %88

89:                                               ; preds = %._crit_edge
  %90 = invoke noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %32)
          to label %91 unwind label %87

91:                                               ; preds = %89
  %92 = fmul double %90, 2.000000e+00
  %93 = load double, ptr %18, align 8, !tbaa !16
  %94 = call double @cos(double noundef %93) #9
  %95 = fmul double %92, %94
  %96 = getelementptr inbounds i8, ptr %0, i64 40
  %97 = load double, ptr %96, align 8, !tbaa !23
  %98 = fadd double %.016.lcssa, %97
  %99 = fdiv double %95, %98
  br label %100

100:                                              ; preds = %91, %78
  %storemerge = phi double [ %99, %91 ], [ %86, %78 ]
  store double %storemerge, ptr %2, align 8, !tbaa !15
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  br label %101

101:                                              ; preds = %100, %17, %1
  %102 = phi double [ %storemerge, %100 ], [ %14, %17 ], [ %14, %1 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  store double -1.000000e+26, ptr %7, align 8, !tbaa !15
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = call noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %103)
  %105 = icmp sgt i32 %104, 0
  br i1 %105, label %.lr.ph23, label %._crit_edge24.thread

._crit_edge24:                                    ; preds = %121
  %.pre = load double, ptr %7, align 8, !tbaa !15
  %106 = fcmp olt double %.pre, -1.000000e+25
  br i1 %106, label %._crit_edge24.thread, label %130

.lr.ph23:                                         ; preds = %101, %121
  %.021 = phi i32 [ %122, %121 ], [ 0, %101 ]
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %107, i32 noundef %.021)
  %109 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %108)
  %110 = load ptr, ptr %109, align 8, !tbaa !24
  %111 = getelementptr inbounds i8, ptr %110, i64 176
  %112 = load ptr, ptr %111, align 8
  %113 = call noundef zeroext i1 %112(ptr noundef nonnull align 8 dereferenceable(152) %109)
  br i1 %113, label %114, label %121

114:                                              ; preds = %.lr.ph23
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %115 = load ptr, ptr %10, align 8, !tbaa !5
  %116 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %115, i32 noundef %.021)
  %117 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %116)
  %118 = call noundef double @_ZNK9ElemModel16Pc_pistonTypeAdvEv(ptr noundef nonnull align 8 dereferenceable(152) %117)
  store double %118, ptr %8, align 8, !tbaa !15
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %120 = load double, ptr %119, align 8, !tbaa !15
  store double %120, ptr %7, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br label %121

121:                                              ; preds = %.lr.ph23, %114
  %122 = add nuw nsw i32 %.021, 1
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = call noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %123)
  %125 = icmp slt i32 %122, %124
  br i1 %125, label %.lr.ph23, label %._crit_edge24, !llvm.loop !26

._crit_edge24.thread:                             ; preds = %101, %._crit_edge24
  %126 = call noundef zeroext i1 @_ZNK9ElemModel15conductAnyWaterEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
  br i1 %126, label %130, label %127

127:                                              ; preds = %._crit_edge24.thread
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.8)
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout)
  br label %130

130:                                              ; preds = %127, %._crit_edge24.thread, %._crit_edge24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  %131 = load double, ptr %7, align 8, !tbaa !15
  %132 = fmul double %102, 1.000000e-03
  %133 = call double @llvm.fmuladd.f64(double %131, double 0x3FEFF7CED916872B, double %132)
  store double %133, ptr %9, align 8, !tbaa !15
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %135 = load double, ptr %134, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  ret double %135
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4Elem23num_WatCentreFeederNeisEv(ptr noundef nonnull align 8 dereferenceable(408)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4Elem8iAmAPoreEv(ptr noundef nonnull align 8 dereferenceable(408)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK10CommonData11poreFillAlgB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(1972)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408), i32 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9ElemModel17affectsAdjEntryPcERK5Fluid(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK10CommonData15poreFillWeightsEi(ptr noundef nonnull align 8 dereferenceable(1972), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152)) local_unnamed_addr #0 align 2

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK9ElemModel16Pc_pistonTypeAdvEv(ptr noundef nonnull align 8 dereferenceable(152)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK9ElemModel15conductAnyWaterEv(ptr noundef nonnull align 8 dereferenceable(152)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "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 = { inlinehint 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 #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { "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 #8 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { 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, !10, i64 24}
!6 = !{!"_ZTS9ElemModel", !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !11, i64 56, !11, i64 57, !11, i64 58, !11, i64 59, !12, i64 60, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !13, i64 120, !13, i64 136}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!"_ZTSSt4pairIddE", !7, i64 0, !7, i64 8}
!14 = !{!6, !7, i64 96}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !7, i64 168}
!17 = !{!"_ZTS8VoidElem", !6, i64 0, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176}
!18 = !{!12, !12, i64 0}
!19 = !{!6, !10, i64 32}
!20 = !{!8, !8, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!6, !7, i64 40}
!24 = !{!25, !25, i64 0}
!25 = !{!"vtable pointer", !9, i64 0}
!26 = distinct !{!26, !22}


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