; 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.22 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [16 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: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152)) #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 @_Z26printAspectRatioStatisticsRKSt6vectorIPK4ElemSaIS2_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 double, align 8
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca double, 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
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #6
  %34 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %33, ptr %34, align 8
  %35 = load i32, ptr %5, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef %36) #6
  %38 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %37, ptr %38, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #6
  %41 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %40, ptr %41, align 8
  %42 = load i32, ptr %6, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %11, i64 noundef %43) #6
  %45 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %44, ptr %45, 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
  %46 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8
  %48 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  %49 = load ptr, ptr %48, align 8
  invoke void @_ZNSt6vectorIPK4ElemSaIS2_EEC2IN9__gnu_cxx17__normal_iteratorIPKS2_S4_EEvEET_SB_RKS3_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr %47, ptr %49, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %50 unwind label %56

50:                                               ; 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 %51

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

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

56:                                               ; preds = %3
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %13, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, 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 %249

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

65:                                               ; preds = %60
  %66 = call ptr @__dynamic_cast(ptr %63, ptr @_ZTI4Elem, ptr @_ZTI4Pore, i64 0) #6
  br label %68

67:                                               ; preds = %60
  br label %68

68:                                               ; preds = %67, %65
  %69 = phi ptr [ %66, %65 ], [ null, %67 ]
  store ptr %69, 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 1.000000e-31, 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 1.000000e-31, ptr %27, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %70 = load ptr, ptr %22, align 8, !tbaa !5
  %71 = invoke noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %70)
          to label %72 unwind label %82

72:                                               ; preds = %68
  %73 = invoke noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %71)
          to label %74 unwind label %82

74:                                               ; preds = %72
  store double %73, ptr %28, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  store i32 0, ptr %29, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %139, %74
  %76 = load i32, ptr %29, align 4, !tbaa !9
  %77 = load ptr, ptr %22, align 8, !tbaa !5
  %78 = invoke noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %77)
          to label %79 unwind label %86

79:                                               ; preds = %75
  %80 = icmp slt i32 %76, %78
  br i1 %80, label %90, label %81

81:                                               ; preds = %79
  store i32 5, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %152

82:                                               ; preds = %185, %177, %170, %155, %152, %72, %68
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %13, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %14, align 4
  br label %203

86:                                               ; preds = %75
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %13, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %14, align 4
  br label %151

90:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %91 = load ptr, ptr %22, align 8, !tbaa !5
  %92 = load i32, ptr %29, align 4, !tbaa !9
  %93 = invoke noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %91, i32 noundef %92)
          to label %94 unwind label %142

94:                                               ; preds = %90
  %95 = invoke noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %93)
          to label %96 unwind label %142

96:                                               ; preds = %94
  store ptr %95, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %97 = load ptr, ptr %30, align 8, !tbaa !5
  %98 = invoke noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %97)
          to label %99 unwind label %146

99:                                               ; preds = %96
  %100 = load double, ptr %28, align 8, !tbaa !11
  %101 = fdiv double %98, %100
  store double %101, ptr %31, align 8, !tbaa !11
  %102 = load double, ptr %31, align 8, !tbaa !11
  %103 = load double, ptr %23, align 8, !tbaa !11
  %104 = fadd double %103, %102
  store double %104, ptr %23, align 8, !tbaa !11
  %105 = load ptr, ptr %30, align 8, !tbaa !5
  %106 = invoke noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %105)
          to label %107 unwind label %146

107:                                              ; preds = %99
  %108 = load double, ptr %25, align 8, !tbaa !11
  %109 = fadd double %108, %106
  store double %109, ptr %25, align 8, !tbaa !11
  %110 = load ptr, ptr %30, align 8, !tbaa !5
  %111 = invoke noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %110)
          to label %112 unwind label %146

112:                                              ; preds = %107
  %113 = load double, ptr %31, align 8, !tbaa !11
  %114 = load double, ptr %24, align 8, !tbaa !11
  %115 = call double @llvm.fmuladd.f64(double %111, double %113, double %114)
  store double %115, ptr %24, align 8, !tbaa !11
  %116 = load ptr, ptr %30, align 8, !tbaa !5
  %117 = load ptr, ptr %30, align 8, !tbaa !5
  %118 = invoke noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %117)
          to label %119 unwind label %146

119:                                              ; preds = %112
  %120 = load ptr, ptr %116, align 8, !tbaa !15
  %121 = getelementptr inbounds ptr, ptr %120, i64 23
  %122 = load ptr, ptr %121, align 8
  %123 = invoke noundef double %122(ptr noundef nonnull align 8 dereferenceable(152) %116, double noundef %118, double noundef 1.000000e+00)
          to label %124 unwind label %146

124:                                              ; preds = %119
  %125 = load double, ptr %27, align 8, !tbaa !11
  %126 = fadd double %125, %123
  store double %126, ptr %27, align 8, !tbaa !11
  %127 = load ptr, ptr %30, align 8, !tbaa !5
  %128 = load ptr, ptr %30, align 8, !tbaa !5
  %129 = invoke noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %128)
          to label %130 unwind label %146

130:                                              ; preds = %124
  %131 = load ptr, ptr %127, align 8, !tbaa !15
  %132 = getelementptr inbounds ptr, ptr %131, i64 23
  %133 = load ptr, ptr %132, align 8
  %134 = invoke noundef double %133(ptr noundef nonnull align 8 dereferenceable(152) %127, double noundef %129, double noundef 1.000000e+00)
          to label %135 unwind label %146

135:                                              ; preds = %130
  %136 = load double, ptr %31, align 8, !tbaa !11
  %137 = load double, ptr %26, align 8, !tbaa !11
  %138 = call double @llvm.fmuladd.f64(double %134, double %136, double %137)
  store double %138, ptr %26, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %139

139:                                              ; preds = %135
  %140 = load i32, ptr %29, align 4, !tbaa !9
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %29, align 4, !tbaa !9
  br label %75, !llvm.loop !17

142:                                              ; preds = %94, %90
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %13, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %14, align 4
  br label %150

146:                                              ; preds = %130, %124, %119, %112, %107, %99, %96
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %13, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %150

150:                                              ; preds = %146, %142
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %151

151:                                              ; preds = %150, %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %203

152:                                              ; preds = %81
  %153 = load ptr, ptr %22, align 8, !tbaa !5
  %154 = invoke noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %153)
          to label %155 unwind label %82

155:                                              ; preds = %152
  %156 = sitofp i32 %154 to double
  %157 = fadd double %156, 0x3C9CD2B297D889BC
  %158 = load double, ptr %23, align 8, !tbaa !11
  %159 = fdiv double %158, %157
  store double %159, ptr %23, align 8, !tbaa !11
  %160 = load double, ptr %25, align 8, !tbaa !11
  %161 = load double, ptr %24, align 8, !tbaa !11
  %162 = fdiv double %161, %160
  store double %162, ptr %24, align 8, !tbaa !11
  %163 = load double, ptr %27, align 8, !tbaa !11
  %164 = load double, ptr %26, align 8, !tbaa !11
  %165 = fdiv double %164, %163
  store double %165, ptr %26, align 8, !tbaa !11
  %166 = load i64, ptr %20, align 8, !tbaa !13
  %167 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %166) #6
  %168 = load ptr, ptr %167, align 8, !tbaa !5
  %169 = invoke noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %168)
          to label %170 unwind label %82

170:                                              ; preds = %155
  %171 = load double, ptr %19, align 8, !tbaa !11
  %172 = fadd double %171, %169
  store double %172, ptr %19, align 8, !tbaa !11
  %173 = load i64, ptr %20, align 8, !tbaa !13
  %174 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %173) #6
  %175 = load ptr, ptr %174, align 8, !tbaa !5
  %176 = invoke noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %175)
          to label %177 unwind label %82

177:                                              ; preds = %170
  %178 = load double, ptr %24, align 8, !tbaa !11
  %179 = load double, ptr %17, align 8, !tbaa !11
  %180 = call double @llvm.fmuladd.f64(double %176, double %178, double %179)
  store double %180, ptr %17, align 8, !tbaa !11
  %181 = load i64, ptr %20, align 8, !tbaa !13
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %181) #6
  %183 = load ptr, ptr %182, align 8, !tbaa !5
  %184 = invoke noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %183)
          to label %185 unwind label %82

185:                                              ; preds = %177
  %186 = load double, ptr %26, align 8, !tbaa !11
  %187 = load double, ptr %18, align 8, !tbaa !11
  %188 = call double @llvm.fmuladd.f64(double %184, double %186, double %187)
  store double %188, ptr %18, align 8, !tbaa !11
  %189 = load i64, ptr %20, align 8, !tbaa !13
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %189) #6
  %191 = load ptr, ptr %190, align 8, !tbaa !5
  %192 = invoke noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %191)
          to label %193 unwind label %82

193:                                              ; preds = %185
  %194 = load double, ptr %23, align 8, !tbaa !11
  %195 = load double, ptr %16, align 8, !tbaa !11
  %196 = call double @llvm.fmuladd.f64(double %192, double %194, double %195)
  store double %196, ptr %16, align 8, !tbaa !11
  %197 = load double, ptr %23, align 8, !tbaa !11
  %198 = load double, ptr %15, align 8, !tbaa !11
  %199 = fadd double %198, %197
  store double %199, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  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 %200

200:                                              ; preds = %193
  %201 = load i64, ptr %20, align 8, !tbaa !13
  %202 = add i64 %201, 1
  store i64 %202, ptr %20, align 8, !tbaa !13
  br label %51, !llvm.loop !19

203:                                              ; preds = %151, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  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 %248

204:                                              ; preds = %55
  %205 = load double, ptr %15, align 8, !tbaa !11
  %206 = load i32, ptr %6, align 4, !tbaa !9
  %207 = load i32, ptr %5, align 4, !tbaa !9
  %208 = sub nsw i32 %206, %207
  %209 = sitofp i32 %208 to double
  %210 = fdiv double %205, %209
  store double %210, ptr %15, align 8, !tbaa !11
  %211 = load double, ptr %16, align 8, !tbaa !11
  %212 = load double, ptr %19, align 8, !tbaa !11
  %213 = fdiv double %211, %212
  store double %213, ptr %16, align 8, !tbaa !11
  %214 = load double, ptr %17, align 8, !tbaa !11
  %215 = load double, ptr %19, align 8, !tbaa !11
  %216 = fdiv double %214, %215
  store double %216, ptr %17, align 8, !tbaa !11
  %217 = load double, ptr %18, align 8, !tbaa !11
  %218 = load double, ptr %19, align 8, !tbaa !11
  %219 = fdiv double %217, %218
  store double %219, ptr %18, align 8, !tbaa !11
  %220 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.22)
          to label %221 unwind label %244

221:                                              ; preds = %204
  %222 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.23)
          to label %223 unwind label %244

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

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

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

231:                                              ; preds = %228
  %232 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %230, ptr noundef @.str.4)
          to label %233 unwind label %244

233:                                              ; preds = %231
  %234 = load double, ptr %17, align 8, !tbaa !11
  %235 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %232, double noundef %234)
          to label %236 unwind label %244

236:                                              ; preds = %233
  %237 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %235, ptr noundef @.str.4)
          to label %238 unwind label %244

238:                                              ; preds = %236
  %239 = load double, ptr %18, align 8, !tbaa !11
  %240 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %237, double noundef %239)
          to label %241 unwind label %244

241:                                              ; preds = %238
  %242 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %240, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %243 unwind label %244

243:                                              ; preds = %241
  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

244:                                              ; preds = %241, %238, %236, %233, %231, %228, %226, %223, %221, %204
  %245 = landingpad { ptr, i32 }
          cleanup
  %246 = extractvalue { ptr, i32 } %245, 0
  store ptr %246, ptr %13, align 8
  %247 = extractvalue { ptr, i32 } %245, 1
  store i32 %247, ptr %14, align 4
  br label %248

248:                                              ; preds = %244, %203
  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 %249

249:                                              ; preds = %248, %56
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  br label %250

250:                                              ; preds = %249
  %251 = load ptr, ptr %13, align 8
  %252 = load i32, ptr %14, align 4
  %253 = insertvalue { ptr, i32 } poison, ptr %251, 0
  %254 = insertvalue { ptr, i32 } %253, i32 %252, 1
  resume { ptr, i32 } %254
}

; 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.22 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [16 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 nounwind uwtable
declare dso_local noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152)) 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 @_Z26printAspectRatioStatisticsRKSt6vectorIPK4ElemSaIS2_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 %26

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_edge108, label %.lr.ph107

._crit_edge108:                                   ; preds = %._crit_edge, %14
  %.074.lcssa = phi double [ 0.000000e+00, %14 ], [ %50, %._crit_edge ]
  %.072.lcssa = phi double [ 0.000000e+00, %14 ], [ %63, %._crit_edge ]
  %.066.lcssa = phi double [ 0.000000e+00, %14 ], [ %64, %._crit_edge ]
  %16 = phi <2 x double> [ zeroinitializer, %14 ], [ %59, %._crit_edge ]
  %17 = sub nsw i32 %2, %1
  %18 = sitofp i32 %17 to double
  %19 = fdiv double %.066.lcssa, %18
  %20 = fdiv double %.072.lcssa, %.074.lcssa
  %21 = extractelement <2 x double> %16, i64 0
  %22 = fdiv double %21, %.074.lcssa
  %23 = extractelement <2 x double> %16, i64 1
  %24 = fdiv double %23, %.074.lcssa
  %25 = 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.22)
          to label %98 unwind label %117

26:                                               ; preds = %3
  %27 = 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 %120

.lr.ph107:                                        ; preds = %14, %._crit_edge
  %.066105 = phi double [ %64, %._crit_edge ], [ 0.000000e+00, %14 ]
  %.072104 = phi double [ %63, %._crit_edge ], [ 0.000000e+00, %14 ]
  %.073103 = phi i64 [ %65, %._crit_edge ], [ 0, %14 ]
  %.074102 = phi double [ %50, %._crit_edge ], [ 0.000000e+00, %14 ]
  %28 = phi <2 x double> [ %59, %._crit_edge ], [ zeroinitializer, %14 ]
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.073103) #7
  %30 = load ptr, ptr %29, align 8, !tbaa !5, !nonnull !9, !noundef !9
  %31 = call ptr @__dynamic_cast(ptr nonnull %30, ptr nonnull @_ZTI4Elem, ptr nonnull @_ZTI4Pore, i64 0) #7
  %32 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %31)
  %33 = call noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %32)
  %34 = call noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %31)
  %35 = icmp sgt i32 %34, 0
  br i1 %35, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %90
  %36 = extractelement <2 x double> %76, i64 1
  %37 = insertelement <2 x double> %76, double %91, i64 1
  %38 = insertelement <2 x double> poison, double %78, i64 0
  %39 = insertelement <2 x double> %38, double %92, i64 1
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph107
  %.071.lcssa = phi double [ 0.000000e+00, %.lr.ph107 ], [ %36, %._crit_edge.loopexit ]
  %40 = phi <2 x double> [ zeroinitializer, %.lr.ph107 ], [ %39, %._crit_edge.loopexit ]
  %41 = phi <2 x double> [ <double 1.000000e-31, double 1.000000e-31>, %.lr.ph107 ], [ %37, %._crit_edge.loopexit ]
  %42 = call noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %31)
  %43 = sitofp i32 %42 to double
  %44 = fadd double %43, 0x3C9CD2B297D889BC
  %45 = fdiv double %.071.lcssa, %44
  %46 = fdiv <2 x double> %40, %41
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.073103) #7
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  %49 = call noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %48)
  %50 = fadd double %.074102, %49
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.073103) #7
  %52 = load ptr, ptr %51, align 8, !tbaa !5
  %53 = call noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %52)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.073103) #7
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = call noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %55)
  %57 = insertelement <2 x double> poison, double %53, i64 0
  %58 = insertelement <2 x double> %57, double %56, i64 1
  %59 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %58, <2 x double> %46, <2 x double> %28)
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.073103) #7
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  %62 = call noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %61)
  %63 = call double @llvm.fmuladd.f64(double %62, double %45, double %.072104)
  %64 = fadd double %.066105, %45
  %65 = add nuw i64 %.073103, 1
  %66 = call noundef i64 @_ZNKSt6vectorIPK4ElemSaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %67 = icmp ult i64 %65, %66
  br i1 %67, label %.lr.ph107, label %._crit_edge108, !llvm.loop !10

.lr.ph:                                           ; preds = %.lr.ph107, %90
  %.06595 = phi i32 [ %93, %90 ], [ 0, %.lr.ph107 ]
  %.06794 = phi double [ %91, %90 ], [ 1.000000e-31, %.lr.ph107 ]
  %.06893 = phi double [ %92, %90 ], [ 0.000000e+00, %.lr.ph107 ]
  %.07091 = phi double [ %78, %90 ], [ 0.000000e+00, %.lr.ph107 ]
  %68 = phi <2 x double> [ %76, %90 ], [ <double 1.000000e-31, double 0.000000e+00>, %.lr.ph107 ]
  %69 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %31, i32 noundef %.06595)
  %70 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %69)
  %71 = call noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %70)
  %72 = fdiv double %71, %33
  %73 = call noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %70)
  %74 = insertelement <2 x double> poison, double %73, i64 0
  %75 = insertelement <2 x double> %74, double %72, i64 1
  %76 = fadd <2 x double> %68, %75
  %77 = call noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %70)
  %78 = call double @llvm.fmuladd.f64(double %77, double %72, double %.07091)
  %79 = call noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %70)
  %80 = load ptr, ptr %70, align 8, !tbaa !12
  %81 = getelementptr inbounds i8, ptr %80, i64 184
  %82 = load ptr, ptr %81, align 8
  %83 = invoke noundef double %82(ptr noundef nonnull align 8 dereferenceable(152) %70, double noundef %79, double noundef 1.000000e+00)
          to label %84 unwind label %96

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

90:                                               ; preds = %84
  %91 = fadd double %.06794, %83
  %92 = call double @llvm.fmuladd.f64(double %89, double %72, double %.06893)
  %93 = add nuw nsw i32 %.06595, 1
  %94 = call noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %31)
  %95 = icmp slt i32 %93, %94
  br i1 %95, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !14

96:                                               ; preds = %84, %.lr.ph
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %119

98:                                               ; preds = %._crit_edge108
  %99 = 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.23)
          to label %100 unwind label %117

100:                                              ; preds = %98
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %99, double noundef %19)
          to label %102 unwind label %117

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

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

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

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

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

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

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

116:                                              ; preds = %114
  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

117:                                              ; preds = %114, %112, %110, %108, %106, %104, %102, %100, %98, %._crit_edge108
  %118 = landingpad { ptr, i32 }
          cleanup
  br label %119

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

120:                                              ; preds = %119, %26
  %.pn.pn = phi { ptr, i32 } [ %.pn, %119 ], [ %27, %26 ]
  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