; LLVM IR from ImperialCollegeLondon/pnflow :: src/pnm/pnflow/psPrc (netStatistics)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<const Elem *, std::allocator<const Elem *>>::_Vector_impl" }
%"struct.std::_Vector_base<const Elem *, std::allocator<const Elem *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const Elem *, std::allocator<const Elem *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const Elem *, std::allocator<const Elem *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::allocator" = type { i8 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZTI4Elem = external constant ptr
@_ZTI4Pore = external constant ptr
@.str.24 = external hidden unnamed_addr constant [19 x i8], align 1

; 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) #0

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIPK4ElemSaIS2_EEC2IN9__gnu_cxx17__normal_iteratorIPKS2_S4_EEvEET_SB_RKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr, ptr, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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) #1

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #0

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

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

; Function Attrs: nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) #5

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z26printCoordinaNumStatisticsRKSt6vectorIPK4ElemSaIS2_EEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2) #3 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca i32, align 4
  %29 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #6
  %32 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %31, ptr %32, align 8
  %33 = load i32, ptr %5, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef %34) #6
  %36 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %35, ptr %36, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #6
  %39 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %38, ptr %39, align 8
  %40 = load i32, ptr %6, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %11, i64 noundef %41) #6
  %43 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %42, ptr %43, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  call void @_ZNSaIPK4ElemEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  %44 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8
  %46 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8
  invoke void @_ZNSt6vectorIPK4ElemSaIS2_EEC2IN9__gnu_cxx17__normal_iteratorIPKS2_S4_EEvEET_SB_RKS3_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr %45, ptr %47, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %48 unwind label %54

48:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorIPK4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store double 0.000000e+00, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store double 0.000000e+00, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  store double 0.000000e+00, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  store double 0.000000e+00, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  store double 0.000000e+00, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  store i64 0, ptr %20, align 8, !tbaa !13
  br label %49

49:                                               ; preds = %189, %48
  %50 = load i64, ptr %20, align 8, !tbaa !13
  %51 = call noundef i64 @_ZNKSt6vectorIPK4ElemSaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %52 = icmp ult i64 %50, %51
  br i1 %52, label %58, label %53

53:                                               ; preds = %49
  store i32 2, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %197

54:                                               ; preds = %3
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %13, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %14, align 4
  call void @_ZNSt15__new_allocatorIPK4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %240

58:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %59 = load i64, ptr %20, align 8, !tbaa !13
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %59) #6
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  %62 = icmp eq ptr %61, null
  br i1 %62, label %65, label %63

63:                                               ; preds = %58
  %64 = call ptr @__dynamic_cast(ptr %61, ptr @_ZTI4Elem, ptr @_ZTI4Pore, i64 0) #6
  br label %66

65:                                               ; preds = %58
  br label %66

66:                                               ; preds = %65, %63
  %67 = phi ptr [ %64, %63 ], [ null, %65 ]
  store ptr %67, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  store double 0.000000e+00, ptr %23, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  store double 0.000000e+00, ptr %24, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  store double 0.000000e+00, ptr %25, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  store double 0.000000e+00, ptr %26, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  store double 0.000000e+00, ptr %27, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  store i32 0, ptr %28, align 4, !tbaa !9
  br label %68

68:                                               ; preds = %132, %66
  %69 = load i32, ptr %28, align 4, !tbaa !9
  %70 = load ptr, ptr %22, align 8, !tbaa !5
  %71 = invoke noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %70)
          to label %72 unwind label %75

72:                                               ; preds = %68
  %73 = icmp slt i32 %69, %71
  br i1 %73, label %79, label %74

74:                                               ; preds = %72
  store i32 5, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %140

75:                                               ; preds = %68
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %13, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %14, align 4
  br label %139

79:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %80 = load ptr, ptr %22, align 8, !tbaa !5
  %81 = load i32, ptr %28, align 4, !tbaa !9
  %82 = invoke noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %80, i32 noundef %81)
          to label %83 unwind label %135

83:                                               ; preds = %79
  %84 = invoke noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %82)
          to label %85 unwind label %135

85:                                               ; preds = %83
  store ptr %84, ptr %29, align 8, !tbaa !5
  %86 = load double, ptr %23, align 8, !tbaa !11
  %87 = fadd double %86, 1.000000e+00
  store double %87, ptr %23, align 8, !tbaa !11
  %88 = load ptr, ptr %29, align 8, !tbaa !5
  %89 = invoke noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %88)
          to label %90 unwind label %135

90:                                               ; preds = %85
  %91 = load double, ptr %25, align 8, !tbaa !11
  %92 = fadd double %91, %89
  store double %92, ptr %25, align 8, !tbaa !11
  %93 = load ptr, ptr %29, align 8, !tbaa !5
  %94 = invoke noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %93)
          to label %95 unwind label %135

95:                                               ; preds = %90
  %96 = load ptr, ptr %29, align 8, !tbaa !5
  %97 = invoke noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %96)
          to label %98 unwind label %135

98:                                               ; preds = %95
  %99 = load double, ptr %24, align 8, !tbaa !11
  %100 = call double @llvm.fmuladd.f64(double %94, double %97, double %99)
  store double %100, ptr %24, align 8, !tbaa !11
  %101 = load ptr, ptr %29, align 8, !tbaa !5
  %102 = load ptr, ptr %29, align 8, !tbaa !5
  %103 = invoke noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %102)
          to label %104 unwind label %135

104:                                              ; preds = %98
  %105 = load ptr, ptr %101, align 8, !tbaa !15
  %106 = getelementptr inbounds ptr, ptr %105, i64 23
  %107 = load ptr, ptr %106, align 8
  %108 = invoke noundef double %107(ptr noundef nonnull align 8 dereferenceable(152) %101, double noundef %103, double noundef 1.000000e+00)
          to label %109 unwind label %135

109:                                              ; preds = %104
  %110 = load double, ptr %27, align 8, !tbaa !11
  %111 = fadd double %110, %108
  store double %111, ptr %27, align 8, !tbaa !11
  %112 = load ptr, ptr %29, align 8, !tbaa !5
  %113 = load ptr, ptr %29, align 8, !tbaa !5
  %114 = invoke noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %113)
          to label %115 unwind label %135

115:                                              ; preds = %109
  %116 = load ptr, ptr %112, align 8, !tbaa !15
  %117 = getelementptr inbounds ptr, ptr %116, i64 23
  %118 = load ptr, ptr %117, align 8
  %119 = invoke noundef double %118(ptr noundef nonnull align 8 dereferenceable(152) %112, double noundef %114, double noundef 1.000000e+00)
          to label %120 unwind label %135

120:                                              ; preds = %115
  %121 = load ptr, ptr %29, align 8, !tbaa !5
  %122 = load ptr, ptr %29, align 8, !tbaa !5
  %123 = invoke noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %122)
          to label %124 unwind label %135

124:                                              ; preds = %120
  %125 = load ptr, ptr %121, align 8, !tbaa !15
  %126 = getelementptr inbounds ptr, ptr %125, i64 23
  %127 = load ptr, ptr %126, align 8
  %128 = invoke noundef double %127(ptr noundef nonnull align 8 dereferenceable(152) %121, double noundef %123, double noundef 1.000000e+00)
          to label %129 unwind label %135

129:                                              ; preds = %124
  %130 = load double, ptr %26, align 8, !tbaa !11
  %131 = call double @llvm.fmuladd.f64(double %119, double %128, double %130)
  store double %131, ptr %26, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %132

132:                                              ; preds = %129
  %133 = load i32, ptr %28, align 4, !tbaa !9
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %28, align 4, !tbaa !9
  br label %68, !llvm.loop !17

135:                                              ; preds = %124, %120, %115, %109, %104, %98, %95, %90, %85, %83, %79
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %13, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %139

139:                                              ; preds = %135, %75
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %196

140:                                              ; preds = %74
  %141 = load double, ptr %23, align 8, !tbaa !11
  %142 = fdiv double %141, 1.000000e+00
  store double %142, ptr %23, align 8, !tbaa !11
  %143 = load double, ptr %25, align 8, !tbaa !11
  %144 = load double, ptr %25, align 8, !tbaa !11
  %145 = fmul double %143, %144
  %146 = load double, ptr %24, align 8, !tbaa !11
  %147 = fadd double %146, 1.000000e-63
  %148 = fdiv double %145, %147
  store double %148, ptr %24, align 8, !tbaa !11
  %149 = load double, ptr %27, align 8, !tbaa !11
  %150 = load double, ptr %27, align 8, !tbaa !11
  %151 = fmul double %149, %150
  %152 = load double, ptr %26, align 8, !tbaa !11
  %153 = fadd double %152, 1.000000e-63
  %154 = fdiv double %151, %153
  store double %154, ptr %26, align 8, !tbaa !11
  %155 = load i64, ptr %20, align 8, !tbaa !13
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %155) #6
  %157 = load ptr, ptr %156, align 8, !tbaa !5
  %158 = invoke noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %157)
          to label %159 unwind label %192

159:                                              ; preds = %140
  %160 = load double, ptr %19, align 8, !tbaa !11
  %161 = fadd double %160, %158
  store double %161, ptr %19, align 8, !tbaa !11
  %162 = load i64, ptr %20, align 8, !tbaa !13
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %162) #6
  %164 = load ptr, ptr %163, align 8, !tbaa !5
  %165 = invoke noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %164)
          to label %166 unwind label %192

166:                                              ; preds = %159
  %167 = load double, ptr %24, align 8, !tbaa !11
  %168 = load double, ptr %17, align 8, !tbaa !11
  %169 = call double @llvm.fmuladd.f64(double %165, double %167, double %168)
  store double %169, ptr %17, align 8, !tbaa !11
  %170 = load i64, ptr %20, align 8, !tbaa !13
  %171 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %170) #6
  %172 = load ptr, ptr %171, align 8, !tbaa !5
  %173 = invoke noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %172)
          to label %174 unwind label %192

174:                                              ; preds = %166
  %175 = load double, ptr %26, align 8, !tbaa !11
  %176 = load double, ptr %18, align 8, !tbaa !11
  %177 = call double @llvm.fmuladd.f64(double %173, double %175, double %176)
  store double %177, ptr %18, align 8, !tbaa !11
  %178 = load i64, ptr %20, align 8, !tbaa !13
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %178) #6
  %180 = load ptr, ptr %179, align 8, !tbaa !5
  %181 = invoke noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %180)
          to label %182 unwind label %192

182:                                              ; preds = %174
  %183 = load double, ptr %23, align 8, !tbaa !11
  %184 = load double, ptr %16, align 8, !tbaa !11
  %185 = call double @llvm.fmuladd.f64(double %181, double %183, double %184)
  store double %185, ptr %16, align 8, !tbaa !11
  %186 = load double, ptr %23, align 8, !tbaa !11
  %187 = load double, ptr %15, align 8, !tbaa !11
  %188 = fadd double %187, %186
  store double %188, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %189

189:                                              ; preds = %182
  %190 = load i64, ptr %20, align 8, !tbaa !13
  %191 = add i64 %190, 1
  store i64 %191, ptr %20, align 8, !tbaa !13
  br label %49, !llvm.loop !19

192:                                              ; preds = %174, %166, %159, %140
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %13, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %14, align 4
  br label %196

196:                                              ; preds = %192, %139
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %239

197:                                              ; preds = %53
  %198 = load double, ptr %15, align 8, !tbaa !11
  %199 = load i32, ptr %6, align 4, !tbaa !9
  %200 = load i32, ptr %5, align 4, !tbaa !9
  %201 = sub nsw i32 %199, %200
  %202 = sitofp i32 %201 to double
  %203 = fdiv double %198, %202
  store double %203, ptr %15, align 8, !tbaa !11
  %204 = load double, ptr %16, align 8, !tbaa !11
  %205 = load double, ptr %19, align 8, !tbaa !11
  %206 = fdiv double %204, %205
  store double %206, ptr %16, align 8, !tbaa !11
  %207 = load double, ptr %17, align 8, !tbaa !11
  %208 = load double, ptr %19, align 8, !tbaa !11
  %209 = fdiv double %207, %208
  store double %209, ptr %17, align 8, !tbaa !11
  %210 = load double, ptr %18, align 8, !tbaa !11
  %211 = load double, ptr %19, align 8, !tbaa !11
  %212 = fdiv double %210, %211
  store double %212, ptr %18, align 8, !tbaa !11
  %213 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.24)
          to label %214 unwind label %235

214:                                              ; preds = %197
  %215 = load double, ptr %15, align 8, !tbaa !11
  %216 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %213, double noundef %215)
          to label %217 unwind label %235

217:                                              ; preds = %214
  %218 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %216, ptr noundef @.str.4)
          to label %219 unwind label %235

219:                                              ; preds = %217
  %220 = load double, ptr %16, align 8, !tbaa !11
  %221 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %218, double noundef %220)
          to label %222 unwind label %235

222:                                              ; preds = %219
  %223 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %221, ptr noundef @.str.4)
          to label %224 unwind label %235

224:                                              ; preds = %222
  %225 = load double, ptr %17, align 8, !tbaa !11
  %226 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %223, double noundef %225)
          to label %227 unwind label %235

227:                                              ; preds = %224
  %228 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %226, ptr noundef @.str.4)
          to label %229 unwind label %235

229:                                              ; preds = %227
  %230 = load double, ptr %18, align 8, !tbaa !11
  %231 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %228, double noundef %230)
          to label %232 unwind label %235

232:                                              ; preds = %229
  %233 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %231, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %234 unwind label %235

234:                                              ; preds = %232
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @_ZNSt6vectorIPK4ElemSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  ret void

235:                                              ; preds = %232, %229, %227, %224, %222, %219, %217, %214, %197
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %13, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %14, align 4
  br label %239

239:                                              ; preds = %235, %196
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @_ZNSt6vectorIPK4ElemSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  br label %240

240:                                              ; preds = %239, %54
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  br label %241

241:                                              ; preds = %240
  %242 = load ptr, ptr %13, align 8
  %243 = load i32, ptr %14, align 4
  %244 = insertvalue { ptr, i32 } poison, ptr %242, 0
  %245 = insertvalue { ptr, i32 } %244, i32 %243, 1
  resume { ptr, i32 } %245
}

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind willreturn memory(read) }
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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<const Elem *, std::allocator<const Elem *>>::_Vector_impl" }
%"struct.std::_Vector_base<const Elem *, std::allocator<const Elem *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const Elem *, std::allocator<const Elem *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const Elem *, std::allocator<const Elem *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::allocator" = type { i8 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZTI4Elem = external constant ptr
@_ZTI4Pore = external constant ptr
@.str.24 = external hidden unnamed_addr constant [19 x i8], align 1

; 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 #0

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIPK4ElemSaIS2_EEC2IN9__gnu_cxx17__normal_iteratorIPKS2_S4_EEvEET_SB_RKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr, ptr, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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) #1

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #0

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z26printCoordinaNumStatisticsRKSt6vectorIPK4ElemSaIS2_EEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %8 = tail call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %8, ptr %5, align 8
  %9 = sext i32 %1 to i64
  %10 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %11 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %11, ptr %6, align 8
  %12 = sext i32 %2 to i64
  %13 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %12) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #7
  call void @_ZNSaIPK4ElemEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  invoke void @_ZNSt6vectorIPK4ElemSaIS2_EEC2IN9__gnu_cxx17__normal_iteratorIPKS2_S4_EEvEET_SB_RKS3_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr %10, ptr %13, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %14 unwind label %23

14:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorIPK4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %15 = call noundef i64 @_ZNKSt6vectorIPK4ElemSaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %.not = icmp eq i64 %15, 0
  br i1 %.not, label %._crit_edge106, label %.lr.ph105

._crit_edge106:                                   ; preds = %._crit_edge, %14
  %.074.lcssa = phi double [ 0.000000e+00, %14 ], [ %58, %._crit_edge ]
  %.071.lcssa = phi double [ 0.000000e+00, %14 ], [ %49, %._crit_edge ]
  %.070.lcssa = phi double [ 0.000000e+00, %14 ], [ %42, %._crit_edge ]
  %16 = phi <2 x double> [ zeroinitializer, %14 ], [ %56, %._crit_edge ]
  %17 = extractelement <2 x double> %16, i64 0
  %18 = fdiv double %17, %.070.lcssa
  %19 = extractelement <2 x double> %16, i64 1
  %20 = fdiv double %19, %.070.lcssa
  %21 = fdiv double %.071.lcssa, %.070.lcssa
  %22 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.24)
          to label %96 unwind label %116

23:                                               ; preds = %3
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIPK4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %119

.lr.ph105:                                        ; preds = %14, %._crit_edge
  %.069103 = phi i64 [ %59, %._crit_edge ], [ 0, %14 ]
  %.070102 = phi double [ %42, %._crit_edge ], [ 0.000000e+00, %14 ]
  %.071101 = phi double [ %49, %._crit_edge ], [ 0.000000e+00, %14 ]
  %.07498 = phi double [ %58, %._crit_edge ], [ 0.000000e+00, %14 ]
  %25 = phi <2 x double> [ %56, %._crit_edge ], [ zeroinitializer, %14 ]
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.069103) #7
  %27 = load ptr, ptr %26, align 8, !tbaa !5, !nonnull !9, !noundef !9
  %28 = call ptr @__dynamic_cast(ptr nonnull %27, ptr nonnull @_ZTI4Elem, ptr nonnull @_ZTI4Pore, i64 0) #7
  %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 = %89, %.lr.ph105
  %.065.lcssa = phi double [ 0.000000e+00, %.lr.ph105 ], [ %70, %89 ]
  %.063.lcssa = phi double [ 0.000000e+00, %.lr.ph105 ], [ %90, %89 ]
  %.062.lcssa = phi double [ 0.000000e+00, %.lr.ph105 ], [ %77, %89 ]
  %31 = phi <2 x double> [ zeroinitializer, %.lr.ph105 ], [ %67, %89 ]
  %32 = fmul <2 x double> %31, %31
  %33 = extractelement <2 x double> %32, i64 1
  %34 = fadd double %.065.lcssa, 1.000000e-63
  %35 = fdiv double %33, %34
  %36 = fmul double %.062.lcssa, %.062.lcssa
  %37 = fadd double %.063.lcssa, 1.000000e-63
  %38 = fdiv double %36, %37
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.069103) #7
  %40 = load ptr, ptr %39, align 8, !tbaa !5
  %41 = call noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %40)
  %42 = fadd double %.070102, %41
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.069103) #7
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = call noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %44)
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.069103) #7
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = call noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %47)
  %49 = call double @llvm.fmuladd.f64(double %48, double %38, double %.071101)
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.069103) #7
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  %52 = call noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %51)
  %53 = insertelement <2 x double> poison, double %52, i64 0
  %54 = insertelement <2 x double> %53, double %45, i64 1
  %55 = insertelement <2 x double> %31, double %35, i64 1
  %56 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %54, <2 x double> %55, <2 x double> %25)
  %57 = extractelement <2 x double> %31, i64 0
  %58 = fadd double %.07498, %57
  %59 = add nuw i64 %.069103, 1
  %60 = call noundef i64 @_ZNKSt6vectorIPK4ElemSaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %61 = icmp ult i64 %59, %60
  br i1 %61, label %.lr.ph105, label %._crit_edge106, !llvm.loop !10

.lr.ph:                                           ; preds = %.lr.ph105, %89
  %.06193 = phi i32 [ %91, %89 ], [ 0, %.lr.ph105 ]
  %.06292 = phi double [ %77, %89 ], [ 0.000000e+00, %.lr.ph105 ]
  %.06391 = phi double [ %90, %89 ], [ 0.000000e+00, %.lr.ph105 ]
  %.06589 = phi double [ %70, %89 ], [ 0.000000e+00, %.lr.ph105 ]
  %62 = phi <2 x double> [ %67, %89 ], [ zeroinitializer, %.lr.ph105 ]
  %63 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %28, i32 noundef %.06193)
  %64 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %63)
  %65 = call noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %64)
  %66 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %65, i64 1
  %67 = fadd <2 x double> %62, %66
  %68 = call noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %64)
  %69 = call noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %64)
  %70 = call double @llvm.fmuladd.f64(double %68, double %69, double %.06589)
  %71 = call noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %64)
  %72 = load ptr, ptr %64, align 8, !tbaa !12
  %73 = getelementptr inbounds i8, ptr %72, i64 184
  %74 = load ptr, ptr %73, align 8
  %75 = invoke noundef double %74(ptr noundef nonnull align 8 dereferenceable(152) %64, double noundef %71, double noundef 1.000000e+00)
          to label %76 unwind label %94

76:                                               ; preds = %.lr.ph
  %77 = fadd double %.06292, %75
  %78 = call noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %64)
  %79 = load ptr, ptr %64, align 8, !tbaa !12
  %80 = getelementptr inbounds i8, ptr %79, i64 184
  %81 = load ptr, ptr %80, align 8
  %82 = invoke noundef double %81(ptr noundef nonnull align 8 dereferenceable(152) %64, double noundef %78, double noundef 1.000000e+00)
          to label %83 unwind label %94

83:                                               ; preds = %76
  %84 = call noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %64)
  %85 = load ptr, ptr %64, align 8, !tbaa !12
  %86 = getelementptr inbounds i8, ptr %85, i64 184
  %87 = load ptr, ptr %86, align 8
  %88 = invoke noundef double %87(ptr noundef nonnull align 8 dereferenceable(152) %64, double noundef %84, double noundef 1.000000e+00)
          to label %89 unwind label %94

89:                                               ; preds = %83
  %90 = call double @llvm.fmuladd.f64(double %82, double %88, double %.06391)
  %91 = add nuw nsw i32 %.06193, 1
  %92 = call noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %28)
  %93 = icmp slt i32 %91, %92
  br i1 %93, label %.lr.ph, label %._crit_edge, !llvm.loop !14

94:                                               ; preds = %83, %76, %.lr.ph
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %118

96:                                               ; preds = %._crit_edge106
  %97 = sub nsw i32 %2, %1
  %98 = sitofp i32 %97 to double
  %99 = fdiv double %.074.lcssa, %98
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %22, double noundef %99)
          to label %101 unwind label %116

101:                                              ; preds = %96
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef nonnull @.str.4)
          to label %103 unwind label %116

103:                                              ; preds = %101
  %104 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %102, double noundef %18)
          to label %105 unwind label %116

105:                                              ; preds = %103
  %106 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef nonnull @.str.4)
          to label %107 unwind label %116

107:                                              ; preds = %105
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %106, double noundef %20)
          to label %109 unwind label %116

109:                                              ; preds = %107
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %108, ptr noundef nonnull @.str.4)
          to label %111 unwind label %116

111:                                              ; preds = %109
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %110, double noundef %21)
          to label %113 unwind label %116

113:                                              ; preds = %111
  %114 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %115 unwind label %116

115:                                              ; preds = %113
  call void @_ZNSt6vectorIPK4ElemSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  ret void

116:                                              ; preds = %113, %111, %109, %107, %105, %103, %101, %96, %._crit_edge106
  %117 = landingpad { ptr, i32 }
          cleanup
  br label %118

118:                                              ; preds = %116, %94
  %.pn = phi { ptr, i32 } [ %95, %94 ], [ %117, %116 ]
  call void @_ZNSt6vectorIPK4ElemSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  br label %119

119:                                              ; preds = %118, %23
  %.pn.pn = phi { ptr, i32 } [ %.pn, %118 ], [ %24, %23 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #6

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { mustprogress nofree nounwind willreturn memory(read) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !13, i64 0}
!13 = !{!"vtable pointer", !8, i64 0}
!14 = distinct !{!14, !11}


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