; 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 }
%"class.__gnu_cxx::__normal_iterator.0" = type { ptr }
%class.ElemGCmpRed = type { i8 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZTI9ElemModel = external dso_local constant { ptr, ptr }, align 8
@_ZTI7Polygon = external constant ptr
@.str.13 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [14 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 ptr @_ZNSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

; 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 ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

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

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

; Function Attrs: nounwind
declare double @tan(double noundef) #6

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z24printCornerAngStatisticsRKSt6vectorIPK4ElemSaIS2_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 %"class.__gnu_cxx::__normal_iterator.0", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %17 = alloca %class.ElemGCmpRed, align 1
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca i64, align 8
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca %"class.std::vector", align 8
  %29 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %30 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %32 = alloca %"class.std::allocator", align 1
  %33 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %34 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %35 = alloca %class.ElemGCmpRed, align 1
  %36 = alloca double, align 8
  %37 = alloca double, align 8
  %38 = alloca double, align 8
  %39 = alloca double, align 8
  %40 = alloca i64, align 8
  %41 = alloca ptr, align 8
  %42 = alloca i32, align 4
  %43 = alloca double, align 8
  %44 = alloca double, align 8
  %45 = alloca %"class.std::vector", align 8
  %46 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %47 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %48 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %49 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %50 = alloca %"class.std::allocator", align 1
  %51 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %52 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %53 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %54 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %55 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %56 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %57 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %58 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %59 = alloca %class.ElemGCmpRed, align 1
  %60 = alloca double, align 8
  %61 = alloca double, align 8
  %62 = alloca double, align 8
  %63 = alloca double, align 8
  %64 = alloca i64, align 8
  %65 = alloca ptr, align 8
  %66 = alloca i32, align 4
  %67 = alloca double, align 8
  %68 = 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) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %69) #7
  %71 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %70, ptr %71, align 8
  %72 = load i32, ptr %5, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef %73) #7
  %75 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %74, ptr %75, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %76) #7
  %78 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %77, ptr %78, align 8
  %79 = load i32, ptr %6, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %11, i64 noundef %80) #7
  %82 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %81, ptr %82, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #7
  call void @_ZNSaIPK4ElemEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  %83 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8
  %85 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8
  invoke void @_ZNSt6vectorIPK4ElemSaIS2_EEC2IN9__gnu_cxx17__normal_iteratorIPKS2_S4_EEvEET_SB_RKS3_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr %84, ptr %86, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %87 unwind label %102

87:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorIPK4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  %88 = call ptr @_ZNSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %89 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %15, i32 0, i32 0
  store ptr %88, ptr %89, align 8
  %90 = call ptr @_ZNSt6vectorIPK4ElemSaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %91 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %16, i32 0, i32 0
  store ptr %90, ptr %91, align 8
  %92 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %15, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8
  %94 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %16, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPPK4ElemSt6vectorIS4_SaIS4_EEEE11ElemGCmpRedEvT_SB_T0_(ptr %93, ptr %95)
          to label %96 unwind label %106

96:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store double 0.000000e+00, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store double 0.000000e+00, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store double 1.000000e-32, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store double 1.000000e-32, ptr %21, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store i64 0, ptr %22, align 8, !tbaa !13
  br label %97

97:                                               ; preds = %199, %96
  %98 = load i64, ptr %22, align 8, !tbaa !13
  %99 = call noundef i64 @_ZNKSt6vectorIPK4ElemSaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %100 = icmp ult i64 %98, %99
  br i1 %100, label %110, label %101

101:                                              ; preds = %97
  store i32 2, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %203

102:                                              ; preds = %3
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %13, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %14, align 4
  call void @_ZNSt15__new_allocatorIPK4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %257

106:                                              ; preds = %87
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %13, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %14, align 4
  br label %256

110:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %111 = load i64, ptr %22, align 8, !tbaa !13
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %111) #7
  %113 = load ptr, ptr %112, align 8, !tbaa !5
  %114 = invoke noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %113)
          to label %115 unwind label %119

115:                                              ; preds = %110
  %116 = icmp eq ptr %114, null
  br i1 %116, label %123, label %117

117:                                              ; preds = %115
  %118 = call ptr @__dynamic_cast(ptr %114, ptr @_ZTI9ElemModel, ptr @_ZTI7Polygon, i64 0) #7
  br label %124

119:                                              ; preds = %110
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %13, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %14, align 4
  br label %202

123:                                              ; preds = %115
  br label %124

124:                                              ; preds = %123, %117
  %125 = phi ptr [ %118, %117 ], [ null, %123 ]
  store ptr %125, ptr %24, align 8, !tbaa !5
  %126 = load ptr, ptr %24, align 8, !tbaa !5
  %127 = icmp ne ptr %126, null
  br i1 %127, label %128, label %198

128:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %129

129:                                              ; preds = %184, %128
  %130 = load i32, ptr %25, align 4, !tbaa !9
  %131 = load ptr, ptr %24, align 8, !tbaa !5
  %132 = load ptr, ptr %131, align 8, !tbaa !15
  %133 = getelementptr inbounds ptr, ptr %132, i64 24
  %134 = load ptr, ptr %133, align 8
  %135 = invoke noundef i32 %134(ptr noundef nonnull align 8 dereferenceable(248) %131)
          to label %136 unwind label %139

136:                                              ; preds = %129
  %137 = icmp slt i32 %130, %135
  br i1 %137, label %143, label %138

138:                                              ; preds = %136
  store i32 5, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %197

139:                                              ; preds = %129
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %13, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %14, align 4
  br label %196

143:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %144 = load ptr, ptr %24, align 8, !tbaa !5
  %145 = invoke noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %144)
          to label %146 unwind label %187

146:                                              ; preds = %143
  store double %145, ptr %26, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %147 = load double, ptr %26, align 8, !tbaa !11
  %148 = load double, ptr %26, align 8, !tbaa !11
  %149 = fmul double %147, %148
  %150 = load ptr, ptr %24, align 8, !tbaa !5
  %151 = load i32, ptr %25, align 4, !tbaa !9
  %152 = invoke noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %150, i32 noundef %151)
          to label %153 unwind label %191

153:                                              ; preds = %146
  %154 = call double @tan(double noundef %152) #7
  %155 = fdiv double %149, %154
  %156 = load ptr, ptr %24, align 8, !tbaa !5
  %157 = invoke noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %156)
          to label %158 unwind label %191

158:                                              ; preds = %153
  %159 = fdiv double %155, %157
  %160 = load i64, ptr %22, align 8, !tbaa !13
  %161 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %160) #7
  %162 = load ptr, ptr %161, align 8, !tbaa !5
  %163 = invoke noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %162)
          to label %164 unwind label %191

164:                                              ; preds = %158
  %165 = fmul double %159, %163
  store double %165, ptr %27, align 8, !tbaa !11
  %166 = load double, ptr %27, align 8, !tbaa !11
  %167 = load ptr, ptr %24, align 8, !tbaa !5
  %168 = load i32, ptr %25, align 4, !tbaa !9
  %169 = invoke noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %167, i32 noundef %168)
          to label %170 unwind label %191

170:                                              ; preds = %164
  %171 = load double, ptr %19, align 8, !tbaa !11
  %172 = call double @llvm.fmuladd.f64(double %166, double %169, double %171)
  store double %172, ptr %19, align 8, !tbaa !11
  %173 = load double, ptr %27, align 8, !tbaa !11
  %174 = load double, ptr %20, align 8, !tbaa !11
  %175 = fadd double %174, %173
  store double %175, ptr %20, align 8, !tbaa !11
  %176 = load ptr, ptr %24, align 8, !tbaa !5
  %177 = load i32, ptr %25, align 4, !tbaa !9
  %178 = invoke noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %176, i32 noundef %177)
          to label %179 unwind label %191

179:                                              ; preds = %170
  %180 = load double, ptr %18, align 8, !tbaa !11
  %181 = fadd double %180, %178
  store double %181, ptr %18, align 8, !tbaa !11
  %182 = load double, ptr %21, align 8, !tbaa !11
  %183 = fadd double %182, 1.000000e+00
  store double %183, ptr %21, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %184

184:                                              ; preds = %179
  %185 = load i32, ptr %25, align 4, !tbaa !9
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %25, align 4, !tbaa !9
  br label %129, !llvm.loop !17

187:                                              ; preds = %143
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %13, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %14, align 4
  br label %195

191:                                              ; preds = %170, %164, %158, %153, %146
  %192 = landingpad { ptr, i32 }
          cleanup
  %193 = extractvalue { ptr, i32 } %192, 0
  store ptr %193, ptr %13, align 8
  %194 = extractvalue { ptr, i32 } %192, 1
  store i32 %194, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %195

195:                                              ; preds = %191, %187
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %196

196:                                              ; preds = %195, %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %202

197:                                              ; preds = %138
  br label %198

198:                                              ; preds = %197, %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %199

199:                                              ; preds = %198
  %200 = load i64, ptr %22, align 8, !tbaa !13
  %201 = add i64 %200, 1
  store i64 %201, ptr %22, align 8, !tbaa !13
  br label %97, !llvm.loop !19

202:                                              ; preds = %196, %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %255

203:                                              ; preds = %101
  %204 = load double, ptr %18, align 8, !tbaa !11
  %205 = load double, ptr %21, align 8, !tbaa !11
  %206 = fdiv double %204, %205
  store double %206, ptr %18, align 8, !tbaa !11
  %207 = load double, ptr %19, align 8, !tbaa !11
  %208 = load double, ptr %20, align 8, !tbaa !11
  %209 = fdiv double %207, %208
  store double %209, ptr %19, align 8, !tbaa !11
  %210 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.13)
          to label %211 unwind label %251

211:                                              ; preds = %203
  %212 = load double, ptr %18, align 8, !tbaa !11
  %213 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %210, double noundef %212)
          to label %214 unwind label %251

214:                                              ; preds = %211
  %215 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %213, ptr noundef @.str.4)
          to label %216 unwind label %251

216:                                              ; preds = %214
  %217 = load double, ptr %19, align 8, !tbaa !11
  %218 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %215, double noundef %217)
          to label %219 unwind label %251

219:                                              ; preds = %216
  %220 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %218, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %221 unwind label %251

221:                                              ; preds = %219
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @_ZNSt6vectorIPK4ElemSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %222 = load ptr, ptr %4, align 8, !tbaa !5
  %223 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %222) #7
  %224 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %30, i32 0, i32 0
  store ptr %223, ptr %224, align 8
  %225 = load i32, ptr %6, align 4, !tbaa !9
  %226 = sext i32 %225 to i64
  %227 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %30, i64 noundef %226) #7
  %228 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  store ptr %227, ptr %228, align 8
  %229 = load ptr, ptr %4, align 8, !tbaa !5
  %230 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %229) #7
  %231 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %31, i32 0, i32 0
  store ptr %230, ptr %231, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #7
  call void @_ZNSaIPK4ElemEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #7
  %232 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  %233 = load ptr, ptr %232, align 8
  %234 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %31, i32 0, i32 0
  %235 = load ptr, ptr %234, align 8
  invoke void @_ZNSt6vectorIPK4ElemSaIS2_EEC2IN9__gnu_cxx17__normal_iteratorIPKS2_S4_EEvEET_SB_RKS3_(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr %233, ptr %235, ptr noundef nonnull align 1 dereferenceable(1) %32)
          to label %236 unwind label %258

236:                                              ; preds = %221
  call void @_ZNSt15__new_allocatorIPK4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  %237 = call ptr @_ZNSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  %238 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %33, i32 0, i32 0
  store ptr %237, ptr %238, align 8
  %239 = call ptr @_ZNSt6vectorIPK4ElemSaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  %240 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %34, i32 0, i32 0
  store ptr %239, ptr %240, align 8
  %241 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %33, i32 0, i32 0
  %242 = load ptr, ptr %241, align 8
  %243 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %34, i32 0, i32 0
  %244 = load ptr, ptr %243, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPPK4ElemSt6vectorIS4_SaIS4_EEEE11ElemGCmpRedEvT_SB_T0_(ptr %242, ptr %244)
          to label %245 unwind label %262

245:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #7
  store double 0.000000e+00, ptr %36, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  store double 0.000000e+00, ptr %37, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  store double 1.000000e-32, ptr %38, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  store double 1.000000e-32, ptr %39, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #7
  store i64 0, ptr %40, align 8, !tbaa !13
  br label %246

246:                                              ; preds = %355, %245
  %247 = load i64, ptr %40, align 8, !tbaa !13
  %248 = call noundef i64 @_ZNKSt6vectorIPK4ElemSaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  %249 = icmp ult i64 %247, %248
  br i1 %249, label %266, label %250

250:                                              ; preds = %246
  store i32 8, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  br label %359

251:                                              ; preds = %219, %216, %214, %211, %203
  %252 = landingpad { ptr, i32 }
          cleanup
  %253 = extractvalue { ptr, i32 } %252, 0
  store ptr %253, ptr %13, align 8
  %254 = extractvalue { ptr, i32 } %252, 1
  store i32 %254, ptr %14, align 4
  br label %255

255:                                              ; preds = %251, %202
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %256

256:                                              ; preds = %255, %106
  call void @_ZNSt6vectorIPK4ElemSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  br label %257

257:                                              ; preds = %256, %102
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  br label %570

258:                                              ; preds = %221
  %259 = landingpad { ptr, i32 }
          cleanup
  %260 = extractvalue { ptr, i32 } %259, 0
  store ptr %260, ptr %13, align 8
  %261 = extractvalue { ptr, i32 } %259, 1
  store i32 %261, ptr %14, align 4
  call void @_ZNSt15__new_allocatorIPK4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  br label %438

262:                                              ; preds = %236
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %13, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %14, align 4
  br label %437

266:                                              ; preds = %246
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #7
  %267 = load i64, ptr %40, align 8, !tbaa !13
  %268 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %267) #7
  %269 = load ptr, ptr %268, align 8, !tbaa !5
  %270 = invoke noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %269)
          to label %271 unwind label %275

271:                                              ; preds = %266
  %272 = icmp eq ptr %270, null
  br i1 %272, label %279, label %273

273:                                              ; preds = %271
  %274 = call ptr @__dynamic_cast(ptr %270, ptr @_ZTI9ElemModel, ptr @_ZTI7Polygon, i64 0) #7
  br label %280

275:                                              ; preds = %266
  %276 = landingpad { ptr, i32 }
          cleanup
  %277 = extractvalue { ptr, i32 } %276, 0
  store ptr %277, ptr %13, align 8
  %278 = extractvalue { ptr, i32 } %276, 1
  store i32 %278, ptr %14, align 4
  br label %358

279:                                              ; preds = %271
  br label %280

280:                                              ; preds = %279, %273
  %281 = phi ptr [ %274, %273 ], [ null, %279 ]
  store ptr %281, ptr %41, align 8, !tbaa !5
  %282 = load ptr, ptr %41, align 8, !tbaa !5
  %283 = icmp ne ptr %282, null
  br i1 %283, label %284, label %354

284:                                              ; preds = %280
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #7
  store i32 0, ptr %42, align 4, !tbaa !9
  br label %285

285:                                              ; preds = %340, %284
  %286 = load i32, ptr %42, align 4, !tbaa !9
  %287 = load ptr, ptr %41, align 8, !tbaa !5
  %288 = load ptr, ptr %287, align 8, !tbaa !15
  %289 = getelementptr inbounds ptr, ptr %288, i64 24
  %290 = load ptr, ptr %289, align 8
  %291 = invoke noundef i32 %290(ptr noundef nonnull align 8 dereferenceable(248) %287)
          to label %292 unwind label %295

292:                                              ; preds = %285
  %293 = icmp slt i32 %286, %291
  br i1 %293, label %299, label %294

294:                                              ; preds = %292
  store i32 11, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  br label %353

295:                                              ; preds = %285
  %296 = landingpad { ptr, i32 }
          cleanup
  %297 = extractvalue { ptr, i32 } %296, 0
  store ptr %297, ptr %13, align 8
  %298 = extractvalue { ptr, i32 } %296, 1
  store i32 %298, ptr %14, align 4
  br label %352

299:                                              ; preds = %292
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #7
  %300 = load ptr, ptr %41, align 8, !tbaa !5
  %301 = invoke noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %300)
          to label %302 unwind label %343

302:                                              ; preds = %299
  store double %301, ptr %43, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #7
  %303 = load double, ptr %43, align 8, !tbaa !11
  %304 = load double, ptr %43, align 8, !tbaa !11
  %305 = fmul double %303, %304
  %306 = load ptr, ptr %41, align 8, !tbaa !5
  %307 = load i32, ptr %42, align 4, !tbaa !9
  %308 = invoke noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %306, i32 noundef %307)
          to label %309 unwind label %347

309:                                              ; preds = %302
  %310 = call double @tan(double noundef %308) #7
  %311 = fdiv double %305, %310
  %312 = load ptr, ptr %41, align 8, !tbaa !5
  %313 = invoke noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %312)
          to label %314 unwind label %347

314:                                              ; preds = %309
  %315 = fdiv double %311, %313
  %316 = load i64, ptr %40, align 8, !tbaa !13
  %317 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %316) #7
  %318 = load ptr, ptr %317, align 8, !tbaa !5
  %319 = invoke noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %318)
          to label %320 unwind label %347

320:                                              ; preds = %314
  %321 = fmul double %315, %319
  store double %321, ptr %44, align 8, !tbaa !11
  %322 = load double, ptr %44, align 8, !tbaa !11
  %323 = load ptr, ptr %41, align 8, !tbaa !5
  %324 = load i32, ptr %42, align 4, !tbaa !9
  %325 = invoke noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %323, i32 noundef %324)
          to label %326 unwind label %347

326:                                              ; preds = %320
  %327 = load double, ptr %37, align 8, !tbaa !11
  %328 = call double @llvm.fmuladd.f64(double %322, double %325, double %327)
  store double %328, ptr %37, align 8, !tbaa !11
  %329 = load double, ptr %44, align 8, !tbaa !11
  %330 = load double, ptr %38, align 8, !tbaa !11
  %331 = fadd double %330, %329
  store double %331, ptr %38, align 8, !tbaa !11
  %332 = load ptr, ptr %41, align 8, !tbaa !5
  %333 = load i32, ptr %42, align 4, !tbaa !9
  %334 = invoke noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %332, i32 noundef %333)
          to label %335 unwind label %347

335:                                              ; preds = %326
  %336 = load double, ptr %36, align 8, !tbaa !11
  %337 = fadd double %336, %334
  store double %337, ptr %36, align 8, !tbaa !11
  %338 = load double, ptr %39, align 8, !tbaa !11
  %339 = fadd double %338, 1.000000e+00
  store double %339, ptr %39, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #7
  br label %340

340:                                              ; preds = %335
  %341 = load i32, ptr %42, align 4, !tbaa !9
  %342 = add nsw i32 %341, 1
  store i32 %342, ptr %42, align 4, !tbaa !9
  br label %285, !llvm.loop !20

343:                                              ; preds = %299
  %344 = landingpad { ptr, i32 }
          cleanup
  %345 = extractvalue { ptr, i32 } %344, 0
  store ptr %345, ptr %13, align 8
  %346 = extractvalue { ptr, i32 } %344, 1
  store i32 %346, ptr %14, align 4
  br label %351

347:                                              ; preds = %326, %320, %314, %309, %302
  %348 = landingpad { ptr, i32 }
          cleanup
  %349 = extractvalue { ptr, i32 } %348, 0
  store ptr %349, ptr %13, align 8
  %350 = extractvalue { ptr, i32 } %348, 1
  store i32 %350, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #7
  br label %351

351:                                              ; preds = %347, %343
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #7
  br label %352

352:                                              ; preds = %351, %295
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  br label %358

353:                                              ; preds = %294
  br label %354

354:                                              ; preds = %353, %280
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  br label %355

355:                                              ; preds = %354
  %356 = load i64, ptr %40, align 8, !tbaa !13
  %357 = add i64 %356, 1
  store i64 %357, ptr %40, align 8, !tbaa !13
  br label %246, !llvm.loop !21

358:                                              ; preds = %352, %275
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  br label %436

359:                                              ; preds = %250
  %360 = load double, ptr %36, align 8, !tbaa !11
  %361 = load double, ptr %39, align 8, !tbaa !11
  %362 = fdiv double %360, %361
  store double %362, ptr %36, align 8, !tbaa !11
  %363 = load double, ptr %37, align 8, !tbaa !11
  %364 = load double, ptr %38, align 8, !tbaa !11
  %365 = fdiv double %363, %364
  store double %365, ptr %37, align 8, !tbaa !11
  %366 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.14)
          to label %367 unwind label %432

367:                                              ; preds = %359
  %368 = load double, ptr %36, align 8, !tbaa !11
  %369 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %366, double noundef %368)
          to label %370 unwind label %432

370:                                              ; preds = %367
  %371 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %369, ptr noundef @.str.4)
          to label %372 unwind label %432

372:                                              ; preds = %370
  %373 = load double, ptr %37, align 8, !tbaa !11
  %374 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %371, double noundef %373)
          to label %375 unwind label %432

375:                                              ; preds = %372
  %376 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %374, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %377 unwind label %432

377:                                              ; preds = %375
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  call void @_ZNSt6vectorIPK4ElemSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %45) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #7
  %378 = load ptr, ptr %4, align 8, !tbaa !5
  %379 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %378) #7
  %380 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %47, i32 0, i32 0
  store ptr %379, ptr %380, align 8
  %381 = load i32, ptr %5, align 4, !tbaa !9
  %382 = sext i32 %381 to i64
  %383 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %47, i64 noundef %382) #7
  %384 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %46, i32 0, i32 0
  store ptr %383, ptr %384, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #7
  %385 = load ptr, ptr %4, align 8, !tbaa !5
  %386 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %385) #7
  %387 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %49, i32 0, i32 0
  store ptr %386, ptr %387, align 8
  %388 = load i32, ptr %6, align 4, !tbaa !9
  %389 = sext i32 %388 to i64
  %390 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %49, i64 noundef %389) #7
  %391 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %48, i32 0, i32 0
  store ptr %390, ptr %391, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %50) #7
  call void @_ZNSaIPK4ElemEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #7
  %392 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %46, i32 0, i32 0
  %393 = load ptr, ptr %392, align 8
  %394 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %48, i32 0, i32 0
  %395 = load ptr, ptr %394, align 8
  invoke void @_ZNSt6vectorIPK4ElemSaIS2_EEC2IN9__gnu_cxx17__normal_iteratorIPKS2_S4_EEvEET_SB_RKS3_(ptr noundef nonnull align 8 dereferenceable(24) %45, ptr %393, ptr %395, ptr noundef nonnull align 1 dereferenceable(1) %50)
          to label %396 unwind label %439

396:                                              ; preds = %377
  call void @_ZNSt15__new_allocatorIPK4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %50) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #7
  %397 = call ptr @_ZNSt6vectorIPK4ElemSaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #7
  %398 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %52, i32 0, i32 0
  store ptr %397, ptr %398, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEC2IPS3_vEERKNS0_IT_S8_EE(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef nonnull align 8 dereferenceable(8) %52) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #7
  %399 = load ptr, ptr %4, align 8, !tbaa !5
  %400 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %399) #7
  %401 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %54, i32 0, i32 0
  store ptr %400, ptr %401, align 8
  %402 = load i32, ptr %6, align 4, !tbaa !9
  %403 = sext i32 %402 to i64
  %404 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %54, i64 noundef %403) #7
  %405 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %53, i32 0, i32 0
  store ptr %404, ptr %405, align 8
  %406 = load ptr, ptr %4, align 8, !tbaa !5
  %407 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %406) #7
  %408 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %55, i32 0, i32 0
  store ptr %407, ptr %408, align 8
  %409 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %51, i32 0, i32 0
  %410 = load ptr, ptr %409, align 8
  %411 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %53, i32 0, i32 0
  %412 = load ptr, ptr %411, align 8
  %413 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %55, i32 0, i32 0
  %414 = load ptr, ptr %413, align 8
  %415 = invoke ptr @_ZNSt6vectorIPK4ElemSaIS2_EE6insertIN9__gnu_cxx17__normal_iteratorIPKS2_S4_EEvEENS7_IPS2_S4_EESA_T_SD_(ptr noundef nonnull align 8 dereferenceable(24) %45, ptr %410, ptr %412, ptr %414)
          to label %416 unwind label %443

416:                                              ; preds = %396
  %417 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %56, i32 0, i32 0
  store ptr %415, ptr %417, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #7
  %418 = call ptr @_ZNSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #7
  %419 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %57, i32 0, i32 0
  store ptr %418, ptr %419, align 8
  %420 = call ptr @_ZNSt6vectorIPK4ElemSaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #7
  %421 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %58, i32 0, i32 0
  store ptr %420, ptr %421, align 8
  %422 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %57, i32 0, i32 0
  %423 = load ptr, ptr %422, align 8
  %424 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %58, i32 0, i32 0
  %425 = load ptr, ptr %424, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPPK4ElemSt6vectorIS4_SaIS4_EEEE11ElemGCmpRedEvT_SB_T0_(ptr %423, ptr %425)
          to label %426 unwind label %447

426:                                              ; preds = %416
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #7
  store double 0.000000e+00, ptr %60, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #7
  store double 0.000000e+00, ptr %61, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #7
  store double 1.000000e-32, ptr %62, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #7
  store double 1.000000e-32, ptr %63, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #7
  store i64 0, ptr %64, align 8, !tbaa !13
  br label %427

427:                                              ; preds = %540, %426
  %428 = load i64, ptr %64, align 8, !tbaa !13
  %429 = call noundef i64 @_ZNKSt6vectorIPK4ElemSaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #7
  %430 = icmp ult i64 %428, %429
  br i1 %430, label %451, label %431

431:                                              ; preds = %427
  store i32 14, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #7
  br label %544

432:                                              ; preds = %375, %372, %370, %367, %359
  %433 = landingpad { ptr, i32 }
          cleanup
  %434 = extractvalue { ptr, i32 } %433, 0
  store ptr %434, ptr %13, align 8
  %435 = extractvalue { ptr, i32 } %433, 1
  store i32 %435, ptr %14, align 4
  br label %436

436:                                              ; preds = %432, %358
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  br label %437

437:                                              ; preds = %436, %262
  call void @_ZNSt6vectorIPK4ElemSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  br label %438

438:                                              ; preds = %437, %258
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #7
  br label %570

439:                                              ; preds = %377
  %440 = landingpad { ptr, i32 }
          cleanup
  %441 = extractvalue { ptr, i32 } %440, 0
  store ptr %441, ptr %13, align 8
  %442 = extractvalue { ptr, i32 } %440, 1
  store i32 %442, ptr %14, align 4
  call void @_ZNSt15__new_allocatorIPK4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %50) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #7
  br label %569

443:                                              ; preds = %396
  %444 = landingpad { ptr, i32 }
          cleanup
  %445 = extractvalue { ptr, i32 } %444, 0
  store ptr %445, ptr %13, align 8
  %446 = extractvalue { ptr, i32 } %444, 1
  store i32 %446, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #7
  br label %568

447:                                              ; preds = %416
  %448 = landingpad { ptr, i32 }
          cleanup
  %449 = extractvalue { ptr, i32 } %448, 0
  store ptr %449, ptr %13, align 8
  %450 = extractvalue { ptr, i32 } %448, 1
  store i32 %450, ptr %14, align 4
  br label %568

451:                                              ; preds = %427
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #7
  %452 = load i64, ptr %64, align 8, !tbaa !13
  %453 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %452) #7
  %454 = load ptr, ptr %453, align 8, !tbaa !5
  %455 = invoke noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %454)
          to label %456 unwind label %460

456:                                              ; preds = %451
  %457 = icmp eq ptr %455, null
  br i1 %457, label %464, label %458

458:                                              ; preds = %456
  %459 = call ptr @__dynamic_cast(ptr %455, ptr @_ZTI9ElemModel, ptr @_ZTI7Polygon, i64 0) #7
  br label %465

460:                                              ; preds = %451
  %461 = landingpad { ptr, i32 }
          cleanup
  %462 = extractvalue { ptr, i32 } %461, 0
  store ptr %462, ptr %13, align 8
  %463 = extractvalue { ptr, i32 } %461, 1
  store i32 %463, ptr %14, align 4
  br label %543

464:                                              ; preds = %456
  br label %465

465:                                              ; preds = %464, %458
  %466 = phi ptr [ %459, %458 ], [ null, %464 ]
  store ptr %466, ptr %65, align 8, !tbaa !5
  %467 = load ptr, ptr %65, align 8, !tbaa !5
  %468 = icmp ne ptr %467, null
  br i1 %468, label %469, label %539

469:                                              ; preds = %465
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #7
  store i32 0, ptr %66, align 4, !tbaa !9
  br label %470

470:                                              ; preds = %525, %469
  %471 = load i32, ptr %66, align 4, !tbaa !9
  %472 = load ptr, ptr %65, align 8, !tbaa !5
  %473 = load ptr, ptr %472, align 8, !tbaa !15
  %474 = getelementptr inbounds ptr, ptr %473, i64 24
  %475 = load ptr, ptr %474, align 8
  %476 = invoke noundef i32 %475(ptr noundef nonnull align 8 dereferenceable(248) %472)
          to label %477 unwind label %480

477:                                              ; preds = %470
  %478 = icmp slt i32 %471, %476
  br i1 %478, label %484, label %479

479:                                              ; preds = %477
  store i32 17, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #7
  br label %538

480:                                              ; preds = %470
  %481 = landingpad { ptr, i32 }
          cleanup
  %482 = extractvalue { ptr, i32 } %481, 0
  store ptr %482, ptr %13, align 8
  %483 = extractvalue { ptr, i32 } %481, 1
  store i32 %483, ptr %14, align 4
  br label %537

484:                                              ; preds = %477
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #7
  %485 = load ptr, ptr %65, align 8, !tbaa !5
  %486 = invoke noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %485)
          to label %487 unwind label %528

487:                                              ; preds = %484
  store double %486, ptr %67, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #7
  %488 = load double, ptr %67, align 8, !tbaa !11
  %489 = load double, ptr %67, align 8, !tbaa !11
  %490 = fmul double %488, %489
  %491 = load ptr, ptr %65, align 8, !tbaa !5
  %492 = load i32, ptr %66, align 4, !tbaa !9
  %493 = invoke noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %491, i32 noundef %492)
          to label %494 unwind label %532

494:                                              ; preds = %487
  %495 = call double @tan(double noundef %493) #7
  %496 = fdiv double %490, %495
  %497 = load ptr, ptr %65, align 8, !tbaa !5
  %498 = invoke noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %497)
          to label %499 unwind label %532

499:                                              ; preds = %494
  %500 = fdiv double %496, %498
  %501 = load i64, ptr %64, align 8, !tbaa !13
  %502 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %501) #7
  %503 = load ptr, ptr %502, align 8, !tbaa !5
  %504 = invoke noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %503)
          to label %505 unwind label %532

505:                                              ; preds = %499
  %506 = fmul double %500, %504
  store double %506, ptr %68, align 8, !tbaa !11
  %507 = load double, ptr %68, align 8, !tbaa !11
  %508 = load ptr, ptr %65, align 8, !tbaa !5
  %509 = load i32, ptr %66, align 4, !tbaa !9
  %510 = invoke noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %508, i32 noundef %509)
          to label %511 unwind label %532

511:                                              ; preds = %505
  %512 = load double, ptr %61, align 8, !tbaa !11
  %513 = call double @llvm.fmuladd.f64(double %507, double %510, double %512)
  store double %513, ptr %61, align 8, !tbaa !11
  %514 = load double, ptr %68, align 8, !tbaa !11
  %515 = load double, ptr %62, align 8, !tbaa !11
  %516 = fadd double %515, %514
  store double %516, ptr %62, align 8, !tbaa !11
  %517 = load ptr, ptr %65, align 8, !tbaa !5
  %518 = load i32, ptr %66, align 4, !tbaa !9
  %519 = invoke noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %517, i32 noundef %518)
          to label %520 unwind label %532

520:                                              ; preds = %511
  %521 = load double, ptr %60, align 8, !tbaa !11
  %522 = fadd double %521, %519
  store double %522, ptr %60, align 8, !tbaa !11
  %523 = load double, ptr %63, align 8, !tbaa !11
  %524 = fadd double %523, 1.000000e+00
  store double %524, ptr %63, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #7
  br label %525

525:                                              ; preds = %520
  %526 = load i32, ptr %66, align 4, !tbaa !9
  %527 = add nsw i32 %526, 1
  store i32 %527, ptr %66, align 4, !tbaa !9
  br label %470, !llvm.loop !22

528:                                              ; preds = %484
  %529 = landingpad { ptr, i32 }
          cleanup
  %530 = extractvalue { ptr, i32 } %529, 0
  store ptr %530, ptr %13, align 8
  %531 = extractvalue { ptr, i32 } %529, 1
  store i32 %531, ptr %14, align 4
  br label %536

532:                                              ; preds = %511, %505, %499, %494, %487
  %533 = landingpad { ptr, i32 }
          cleanup
  %534 = extractvalue { ptr, i32 } %533, 0
  store ptr %534, ptr %13, align 8
  %535 = extractvalue { ptr, i32 } %533, 1
  store i32 %535, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #7
  br label %536

536:                                              ; preds = %532, %528
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #7
  br label %537

537:                                              ; preds = %536, %480
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #7
  br label %543

538:                                              ; preds = %479
  br label %539

539:                                              ; preds = %538, %465
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #7
  br label %540

540:                                              ; preds = %539
  %541 = load i64, ptr %64, align 8, !tbaa !13
  %542 = add i64 %541, 1
  store i64 %542, ptr %64, align 8, !tbaa !13
  br label %427, !llvm.loop !23

543:                                              ; preds = %537, %460
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #7
  br label %567

544:                                              ; preds = %431
  %545 = load double, ptr %60, align 8, !tbaa !11
  %546 = load double, ptr %63, align 8, !tbaa !11
  %547 = fdiv double %545, %546
  store double %547, ptr %60, align 8, !tbaa !11
  %548 = load double, ptr %61, align 8, !tbaa !11
  %549 = load double, ptr %62, align 8, !tbaa !11
  %550 = fdiv double %548, %549
  store double %550, ptr %61, align 8, !tbaa !11
  %551 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.15)
          to label %552 unwind label %563

552:                                              ; preds = %544
  %553 = load double, ptr %60, align 8, !tbaa !11
  %554 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %551, double noundef %553)
          to label %555 unwind label %563

555:                                              ; preds = %552
  %556 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %554, ptr noundef @.str.4)
          to label %557 unwind label %563

557:                                              ; preds = %555
  %558 = load double, ptr %61, align 8, !tbaa !11
  %559 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %556, double noundef %558)
          to label %560 unwind label %563

560:                                              ; preds = %557
  %561 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %559, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %562 unwind label %563

562:                                              ; preds = %560
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #7
  call void @_ZNSt6vectorIPK4ElemSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %45) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %45) #7
  ret void

563:                                              ; preds = %560, %557, %555, %552, %544
  %564 = landingpad { ptr, i32 }
          cleanup
  %565 = extractvalue { ptr, i32 } %564, 0
  store ptr %565, ptr %13, align 8
  %566 = extractvalue { ptr, i32 } %564, 1
  store i32 %566, ptr %14, align 4
  br label %567

567:                                              ; preds = %563, %543
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #7
  br label %568

568:                                              ; preds = %567, %447, %443
  call void @_ZNSt6vectorIPK4ElemSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %45) #7
  br label %569

569:                                              ; preds = %568, %439
  call void @llvm.lifetime.end.p0(i64 24, ptr %45) #7
  br label %570

570:                                              ; preds = %569, %438, %257
  %571 = load ptr, ptr %13, align 8
  %572 = load i32, ptr %14, align 4
  %573 = insertvalue { ptr, i32 } poison, ptr %571, 0
  %574 = insertvalue { ptr, i32 } %573, i32 %572, 1
  resume { ptr, i32 } %574
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPPK4ElemSt6vectorIS4_SaIS4_EEEE11ElemGCmpRedEvT_SB_T0_(ptr, ptr) #0

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

; 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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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}
!20 = distinct !{!20, !18}
!21 = distinct !{!21, !18}
!22 = distinct !{!22, !18}
!23 = distinct !{!23, !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 }
%"class.__gnu_cxx::__normal_iterator.0" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZTI9ElemModel = external dso_local constant { ptr, ptr }, align 8
@_ZTI7Polygon = external constant ptr
@.str.13 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [14 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 ptr @_ZNSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

; 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 ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEC2IPS3_vEERKNS0_IT_S8_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) 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 nofree nounwind willreturn memory(write)
declare double @tan(double noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z24printCornerAngStatisticsRKSt6vectorIPK4ElemSaIS2_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
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %18 = tail call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %18, ptr %5, align 8
  %19 = sext i32 %1 to i64
  %20 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %21 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %21, ptr %6, align 8
  %22 = sext i32 %2 to i64
  %23 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %22) #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 %20, ptr %23, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %24 unwind label %31

24:                                               ; 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
  %25 = call ptr @_ZNSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %26 = call ptr @_ZNSt6vectorIPK4ElemSaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPPK4ElemSt6vectorIS4_SaIS4_EEEE11ElemGCmpRedEvT_SB_T0_(ptr %25, ptr %26)
          to label %.preheader200 unwind label %33

.preheader200:                                    ; preds = %24
  %27 = call noundef i64 @_ZNKSt6vectorIPK4ElemSaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %.not255 = icmp eq i64 %27, 0
  br i1 %.not255, label %._crit_edge, label %.lr.ph

._crit_edge.loopexit:                             ; preds = %.thread
  %28 = fdiv double %.2148, %.2151
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader200
  %.0152.lcssa = phi double [ 1.000000e-32, %.preheader200 ], [ %.2154, %._crit_edge.loopexit ]
  %.0130.lcssa = phi double [ 0.000000e+00, %.preheader200 ], [ %.2132, %._crit_edge.loopexit ]
  %29 = phi double [ 0.000000e+00, %.preheader200 ], [ %28, %._crit_edge.loopexit ]
  %30 = 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.13)
          to label %71 unwind label %91

31:                                               ; preds = %3
  %32 = 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 %94

33:                                               ; preds = %24
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %93

.lr.ph:                                           ; preds = %.preheader200, %.thread
  %.0130229 = phi double [ %.2132, %.thread ], [ 0.000000e+00, %.preheader200 ]
  %.0146228 = phi double [ %.2148, %.thread ], [ 0.000000e+00, %.preheader200 ]
  %.0149227 = phi double [ %.2151, %.thread ], [ 1.000000e-32, %.preheader200 ]
  %.0152226 = phi double [ %.2154, %.thread ], [ 1.000000e-32, %.preheader200 ]
  %.0155225 = phi i64 [ %68, %.thread ], [ 0, %.preheader200 ]
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.0155225) #7
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %36)
  %38 = icmp eq ptr %37, null
  br i1 %38, label %.thread, label %39

39:                                               ; preds = %.lr.ph
  %40 = call ptr @__dynamic_cast(ptr nonnull %37, ptr nonnull @_ZTI9ElemModel, ptr nonnull @_ZTI7Polygon, i64 0) #7
  %.not185 = icmp eq ptr %40, null
  br i1 %.not185, label %.thread, label %.preheader199

.preheader199:                                    ; preds = %39, %49
  %.0156 = phi i32 [ %67, %49 ], [ 0, %39 ]
  %.1153 = phi double [ %66, %49 ], [ %.0152226, %39 ]
  %.1150 = phi double [ %63, %49 ], [ %.0149227, %39 ]
  %.1147 = phi double [ %62, %49 ], [ %.0146228, %39 ]
  %.1131 = phi double [ %65, %49 ], [ %.0130229, %39 ]
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = getelementptr inbounds i8, ptr %41, i64 192
  %43 = load ptr, ptr %42, align 8
  %44 = invoke noundef i32 %43(ptr noundef nonnull align 8 dereferenceable(248) %40)
          to label %45 unwind label %47

45:                                               ; preds = %.preheader199
  %46 = icmp slt i32 %.0156, %44
  br i1 %46, label %49, label %.thread

47:                                               ; preds = %.preheader199
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %93

49:                                               ; preds = %45
  %50 = call noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %40)
  %51 = fmul double %50, %50
  %52 = call noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %40, i32 noundef %.0156)
  %53 = call double @tan(double noundef %52) #7
  %54 = fdiv double %51, %53
  %55 = call noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %40)
  %56 = fdiv double %54, %55
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.0155225) #7
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  %59 = call noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %58)
  %60 = fmul double %56, %59
  %61 = call noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %40, i32 noundef %.0156)
  %62 = call double @llvm.fmuladd.f64(double %60, double %61, double %.1147)
  %63 = fadd double %.1150, %60
  %64 = call noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %40, i32 noundef %.0156)
  %65 = fadd double %.1131, %64
  %66 = fadd double %.1153, 1.000000e+00
  %67 = add nuw nsw i32 %.0156, 1
  br label %.preheader199, !llvm.loop !11

.thread:                                          ; preds = %45, %.lr.ph, %39
  %.2154 = phi double [ %.0152226, %39 ], [ %.0152226, %.lr.ph ], [ %.1153, %45 ]
  %.2151 = phi double [ %.0149227, %39 ], [ %.0149227, %.lr.ph ], [ %.1150, %45 ]
  %.2148 = phi double [ %.0146228, %39 ], [ %.0146228, %.lr.ph ], [ %.1147, %45 ]
  %.2132 = phi double [ %.0130229, %39 ], [ %.0130229, %.lr.ph ], [ %.1131, %45 ]
  %68 = add nuw i64 %.0155225, 1
  %69 = call noundef i64 @_ZNKSt6vectorIPK4ElemSaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %70 = icmp ult i64 %68, %69
  br i1 %70, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !13

71:                                               ; preds = %._crit_edge
  %72 = fdiv double %.0130.lcssa, %.0152.lcssa
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %30, double noundef %72)
          to label %74 unwind label %91

74:                                               ; preds = %71
  %75 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull @.str.4)
          to label %76 unwind label %91

76:                                               ; preds = %74
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %75, double noundef %29)
          to label %78 unwind label %91

78:                                               ; preds = %76
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %80 unwind label %91

80:                                               ; preds = %78
  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
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %81 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %81, ptr %9, align 8
  %82 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef %22) #7
  %83 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #7
  call void @_ZNSaIPK4ElemEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  invoke void @_ZNSt6vectorIPK4ElemSaIS2_EEC2IN9__gnu_cxx17__normal_iteratorIPKS2_S4_EEvEET_SB_RKS3_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr %82, ptr %83, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %84 unwind label %95

84:                                               ; preds = %80
  call void @_ZNSt15__new_allocatorIPK4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %85 = call ptr @_ZNSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %86 = call ptr @_ZNSt6vectorIPK4ElemSaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPPK4ElemSt6vectorIS4_SaIS4_EEEE11ElemGCmpRedEvT_SB_T0_(ptr %85, ptr %86)
          to label %.preheader198 unwind label %97

.preheader198:                                    ; preds = %84
  %87 = call noundef i64 @_ZNKSt6vectorIPK4ElemSaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %.not256 = icmp eq i64 %87, 0
  br i1 %.not256, label %._crit_edge239, label %.lr.ph238

._crit_edge239.loopexit:                          ; preds = %.thread192
  %88 = fdiv double %.2162, %.2165
  br label %._crit_edge239

._crit_edge239:                                   ; preds = %._crit_edge239.loopexit, %.preheader198
  %.0167.lcssa = phi double [ 1.000000e-32, %.preheader198 ], [ %.2169, %._crit_edge239.loopexit ]
  %.0157.lcssa = phi double [ 0.000000e+00, %.preheader198 ], [ %.2159, %._crit_edge239.loopexit ]
  %89 = phi double [ 0.000000e+00, %.preheader198 ], [ %88, %._crit_edge239.loopexit ]
  %90 = 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.14)
          to label %135 unwind label %163

91:                                               ; preds = %78, %76, %74, %71, %._crit_edge
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %93

93:                                               ; preds = %47, %91, %33
  %.pn186.pn = phi { ptr, i32 } [ %34, %33 ], [ %48, %47 ], [ %92, %91 ]
  call void @_ZNSt6vectorIPK4ElemSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  br label %94

94:                                               ; preds = %93, %31
  %.pn186.pn.pn = phi { ptr, i32 } [ %.pn186.pn, %93 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  br label %223

95:                                               ; preds = %80
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIPK4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %166

97:                                               ; preds = %84
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %165

.lr.ph238:                                        ; preds = %.preheader198, %.thread192
  %.0157237 = phi double [ %.2159, %.thread192 ], [ 0.000000e+00, %.preheader198 ]
  %.0160236 = phi double [ %.2162, %.thread192 ], [ 0.000000e+00, %.preheader198 ]
  %.0163235 = phi double [ %.2165, %.thread192 ], [ 1.000000e-32, %.preheader198 ]
  %.0167234 = phi double [ %.2169, %.thread192 ], [ 1.000000e-32, %.preheader198 ]
  %.0170233 = phi i64 [ %132, %.thread192 ], [ 0, %.preheader198 ]
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.0170233) #7
  %100 = load ptr, ptr %99, align 8, !tbaa !5
  %101 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %100)
  %102 = icmp eq ptr %101, null
  br i1 %102, label %.thread192, label %103

103:                                              ; preds = %.lr.ph238
  %104 = call ptr @__dynamic_cast(ptr nonnull %101, ptr nonnull @_ZTI9ElemModel, ptr nonnull @_ZTI7Polygon, i64 0) #7
  %.not180 = icmp eq ptr %104, null
  br i1 %.not180, label %.thread192, label %.preheader197

.preheader197:                                    ; preds = %103, %113
  %.1168 = phi double [ %130, %113 ], [ %.0167234, %103 ]
  %.0166 = phi i32 [ %131, %113 ], [ 0, %103 ]
  %.1164 = phi double [ %127, %113 ], [ %.0163235, %103 ]
  %.1161 = phi double [ %126, %113 ], [ %.0160236, %103 ]
  %.1158 = phi double [ %129, %113 ], [ %.0157237, %103 ]
  %105 = load ptr, ptr %104, align 8, !tbaa !9
  %106 = getelementptr inbounds i8, ptr %105, i64 192
  %107 = load ptr, ptr %106, align 8
  %108 = invoke noundef i32 %107(ptr noundef nonnull align 8 dereferenceable(248) %104)
          to label %109 unwind label %111

109:                                              ; preds = %.preheader197
  %110 = icmp slt i32 %.0166, %108
  br i1 %110, label %113, label %.thread192

111:                                              ; preds = %.preheader197
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %165

113:                                              ; preds = %109
  %114 = call noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %104)
  %115 = fmul double %114, %114
  %116 = call noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %104, i32 noundef %.0166)
  %117 = call double @tan(double noundef %116) #7
  %118 = fdiv double %115, %117
  %119 = call noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %104)
  %120 = fdiv double %118, %119
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.0170233) #7
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  %123 = call noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %122)
  %124 = fmul double %120, %123
  %125 = call noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %104, i32 noundef %.0166)
  %126 = call double @llvm.fmuladd.f64(double %124, double %125, double %.1161)
  %127 = fadd double %.1164, %124
  %128 = call noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %104, i32 noundef %.0166)
  %129 = fadd double %.1158, %128
  %130 = fadd double %.1168, 1.000000e+00
  %131 = add nuw nsw i32 %.0166, 1
  br label %.preheader197, !llvm.loop !14

.thread192:                                       ; preds = %109, %.lr.ph238, %103
  %.2169 = phi double [ %.0167234, %103 ], [ %.0167234, %.lr.ph238 ], [ %.1168, %109 ]
  %.2165 = phi double [ %.0163235, %103 ], [ %.0163235, %.lr.ph238 ], [ %.1164, %109 ]
  %.2162 = phi double [ %.0160236, %103 ], [ %.0160236, %.lr.ph238 ], [ %.1161, %109 ]
  %.2159 = phi double [ %.0157237, %103 ], [ %.0157237, %.lr.ph238 ], [ %.1158, %109 ]
  %132 = add nuw i64 %.0170233, 1
  %133 = call noundef i64 @_ZNKSt6vectorIPK4ElemSaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %134 = icmp ult i64 %132, %133
  br i1 %134, label %.lr.ph238, label %._crit_edge239.loopexit, !llvm.loop !15

135:                                              ; preds = %._crit_edge239
  %136 = fdiv double %.0157.lcssa, %.0167.lcssa
  %137 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %90, double noundef %136)
          to label %138 unwind label %163

138:                                              ; preds = %135
  %139 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %137, ptr noundef nonnull @.str.4)
          to label %140 unwind label %163

140:                                              ; preds = %138
  %141 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %139, double noundef %89)
          to label %142 unwind label %163

142:                                              ; preds = %140
  %143 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %141, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %144 unwind label %163

144:                                              ; preds = %142
  call void @_ZNSt6vectorIPK4ElemSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %145 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %145, ptr %12, align 8
  %146 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %12, i64 noundef %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %147 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %147, ptr %13, align 8
  %148 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %13, i64 noundef %22) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #7
  call void @_ZNSaIPK4ElemEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  invoke void @_ZNSt6vectorIPK4ElemSaIS2_EEC2IN9__gnu_cxx17__normal_iteratorIPKS2_S4_EEvEET_SB_RKS3_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr %146, ptr %148, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %149 unwind label %167

149:                                              ; preds = %144
  call void @_ZNSt15__new_allocatorIPK4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  %150 = call ptr @_ZNSt6vectorIPK4ElemSaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  store ptr %150, ptr %16, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEC2IPS3_vEERKNS0_IT_S8_EE(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %151 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %151, ptr %17, align 8
  %152 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPK4ElemSt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %17, i64 noundef %22) #7
  %153 = call ptr @_ZNKSt6vectorIPK4ElemSaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %154 = load ptr, ptr %15, align 8
  %155 = invoke ptr @_ZNSt6vectorIPK4ElemSaIS2_EE6insertIN9__gnu_cxx17__normal_iteratorIPKS2_S4_EEvEENS7_IPS2_S4_EESA_T_SD_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr %154, ptr %152, ptr %153)
          to label %156 unwind label %169

156:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  %157 = call ptr @_ZNSt6vectorIPK4ElemSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %158 = call ptr @_ZNSt6vectorIPK4ElemSaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPPK4ElemSt6vectorIS4_SaIS4_EEEE11ElemGCmpRedEvT_SB_T0_(ptr %157, ptr %158)
          to label %.preheader196 unwind label %171

.preheader196:                                    ; preds = %156
  %159 = call noundef i64 @_ZNKSt6vectorIPK4ElemSaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %.not257 = icmp eq i64 %159, 0
  br i1 %.not257, label %._crit_edge250, label %.lr.ph249

._crit_edge250.loopexit:                          ; preds = %.thread194
  %160 = fdiv double %.2142, %.2139
  br label %._crit_edge250

._crit_edge250:                                   ; preds = %._crit_edge250.loopexit, %.preheader196
  %.0143.lcssa = phi double [ 0.000000e+00, %.preheader196 ], [ %.2145, %._crit_edge250.loopexit ]
  %.0134.lcssa = phi double [ 1.000000e-32, %.preheader196 ], [ %.2136, %._crit_edge250.loopexit ]
  %161 = phi double [ 0.000000e+00, %.preheader196 ], [ %160, %._crit_edge250.loopexit ]
  %162 = 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.15)
          to label %209 unwind label %219

163:                                              ; preds = %142, %140, %138, %135, %._crit_edge239
  %164 = landingpad { ptr, i32 }
          cleanup
  br label %165

165:                                              ; preds = %111, %163, %97
  %.pn181.pn = phi { ptr, i32 } [ %98, %97 ], [ %112, %111 ], [ %164, %163 ]
  call void @_ZNSt6vectorIPK4ElemSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  br label %166

166:                                              ; preds = %165, %95
  %.pn181.pn.pn = phi { ptr, i32 } [ %.pn181.pn, %165 ], [ %96, %95 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br label %223

167:                                              ; preds = %144
  %168 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIPK4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br label %222

169:                                              ; preds = %149
  %170 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  br label %221

171:                                              ; preds = %156
  %172 = landingpad { ptr, i32 }
          cleanup
  br label %221

.lr.ph249:                                        ; preds = %.preheader196, %.thread194
  %.0133248 = phi i64 [ %206, %.thread194 ], [ 0, %.preheader196 ]
  %.0134247 = phi double [ %.2136, %.thread194 ], [ 1.000000e-32, %.preheader196 ]
  %.0137246 = phi double [ %.2139, %.thread194 ], [ 1.000000e-32, %.preheader196 ]
  %.0140245 = phi double [ %.2142, %.thread194 ], [ 0.000000e+00, %.preheader196 ]
  %.0143244 = phi double [ %.2145, %.thread194 ], [ 0.000000e+00, %.preheader196 ]
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %.0133248) #7
  %174 = load ptr, ptr %173, align 8, !tbaa !5
  %175 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %174)
  %176 = icmp eq ptr %175, null
  br i1 %176, label %.thread194, label %177

177:                                              ; preds = %.lr.ph249
  %178 = call ptr @__dynamic_cast(ptr nonnull %175, ptr nonnull @_ZTI9ElemModel, ptr nonnull @_ZTI7Polygon, i64 0) #7
  %.not = icmp eq ptr %178, null
  br i1 %.not, label %.thread194, label %.preheader

.preheader:                                       ; preds = %177, %187
  %.1144 = phi double [ %203, %187 ], [ %.0143244, %177 ]
  %.1141 = phi double [ %200, %187 ], [ %.0140245, %177 ]
  %.1138 = phi double [ %201, %187 ], [ %.0137246, %177 ]
  %.1135 = phi double [ %204, %187 ], [ %.0134247, %177 ]
  %.0129 = phi i32 [ %205, %187 ], [ 0, %177 ]
  %179 = load ptr, ptr %178, align 8, !tbaa !9
  %180 = getelementptr inbounds i8, ptr %179, i64 192
  %181 = load ptr, ptr %180, align 8
  %182 = invoke noundef i32 %181(ptr noundef nonnull align 8 dereferenceable(248) %178)
          to label %183 unwind label %185

183:                                              ; preds = %.preheader
  %184 = icmp slt i32 %.0129, %182
  br i1 %184, label %187, label %.thread194

185:                                              ; preds = %.preheader
  %186 = landingpad { ptr, i32 }
          cleanup
  br label %221

187:                                              ; preds = %183
  %188 = call noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %178)
  %189 = fmul double %188, %188
  %190 = call noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %178, i32 noundef %.0129)
  %191 = call double @tan(double noundef %190) #7
  %192 = fdiv double %189, %191
  %193 = call noundef double @_ZNK9ElemModel4areaEv(ptr noundef nonnull align 8 dereferenceable(152) %178)
  %194 = fdiv double %192, %193
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %.0133248) #7
  %196 = load ptr, ptr %195, align 8, !tbaa !5
  %197 = call noundef double @_ZNK4Elem10flowVolumeEv(ptr noundef nonnull align 8 dereferenceable(408) %196)
  %198 = fmul double %194, %197
  %199 = call noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %178, i32 noundef %.0129)
  %200 = call double @llvm.fmuladd.f64(double %198, double %199, double %.1141)
  %201 = fadd double %.1138, %198
  %202 = call noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %178, i32 noundef %.0129)
  %203 = fadd double %.1144, %202
  %204 = fadd double %.1135, 1.000000e+00
  %205 = add nuw nsw i32 %.0129, 1
  br label %.preheader, !llvm.loop !16

.thread194:                                       ; preds = %183, %.lr.ph249, %177
  %.2145 = phi double [ %.0143244, %177 ], [ %.0143244, %.lr.ph249 ], [ %.1144, %183 ]
  %.2142 = phi double [ %.0140245, %177 ], [ %.0140245, %.lr.ph249 ], [ %.1141, %183 ]
  %.2139 = phi double [ %.0137246, %177 ], [ %.0137246, %.lr.ph249 ], [ %.1138, %183 ]
  %.2136 = phi double [ %.0134247, %177 ], [ %.0134247, %.lr.ph249 ], [ %.1135, %183 ]
  %206 = add nuw i64 %.0133248, 1
  %207 = call noundef i64 @_ZNKSt6vectorIPK4ElemSaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %208 = icmp ult i64 %206, %207
  br i1 %208, label %.lr.ph249, label %._crit_edge250.loopexit, !llvm.loop !17

209:                                              ; preds = %._crit_edge250
  %210 = fdiv double %.0143.lcssa, %.0134.lcssa
  %211 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %162, double noundef %210)
          to label %212 unwind label %219

212:                                              ; preds = %209
  %213 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %211, ptr noundef nonnull @.str.4)
          to label %214 unwind label %219

214:                                              ; preds = %212
  %215 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %213, double noundef %161)
          to label %216 unwind label %219

216:                                              ; preds = %214
  %217 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %215, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %218 unwind label %219

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

219:                                              ; preds = %216, %214, %212, %209, %._crit_edge250
  %220 = landingpad { ptr, i32 }
          cleanup
  br label %221

221:                                              ; preds = %185, %219, %171, %169
  %.pn.pn = phi { ptr, i32 } [ %172, %171 ], [ %170, %169 ], [ %186, %185 ], [ %220, %219 ]
  call void @_ZNSt6vectorIPK4ElemSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  br label %222

222:                                              ; preds = %221, %167
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %221 ], [ %168, %167 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #7
  br label %223

223:                                              ; preds = %222, %166, %94
  %.pn186.pn.pn.pn = phi { ptr, i32 } [ %.pn186.pn.pn, %94 ], [ %.pn181.pn.pn, %166 ], [ %.pn.pn.pn, %222 ]
  resume { ptr, i32 } %.pn186.pn.pn.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPPK4ElemSt6vectorIS4_SaIS4_EEEE11ElemGCmpRedEvT_SB_T0_(ptr, ptr) local_unnamed_addr #0

; 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 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 = { 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 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


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