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

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.7" = type { i8 }
%class.ElemModel = type { ptr, double, double, ptr, ptr, double, ptr, i8, i8, i8, i8, i32, double, double, double, double, double, double, double, %"struct.std::pair", %"struct.std::pair" }
%"struct.std::pair" = type { double, double }
%class.Polygon = type { %class.VoidElem, i32, %"class.std::vector.16", ptr, ptr, i16, i8, double }
%class.VoidElem = type { %class.ElemModel, double, double, double, double }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.CornerApex = type { %class.Apex, ptr, double, double, double, ptr }
%class.Apex = type { ptr, i8, double, double, ptr, i32, double, double, double, double, i8, i8, i8, i8, %"struct.std::pair.0" }
%"struct.std::pair.0" = type { i32, double }
%class.LayerApex = type { %class.Apex, i32, ptr, double, ptr, double }

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [97 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@__FUNCTION__._ZN7Polygon31fillCentreWithWaterCreateLayersEb = external hidden unnamed_addr constant [32 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [85 x i8], align 1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef, ptr noundef, i32 noundef) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #0

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #0

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2_sIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 4 dereferenceable(4)) #3

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Polygon31fillCentreWithWaterCreateLayersEb(ptr noundef nonnull align 8 dereferenceable(248) %0, i1 noundef zeroext %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca double, align 8
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca i1, align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca i1, align 1
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca i1, align 1
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca i1, align 1
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca i1, align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca i1, align 1
  %21 = alloca %"class.std::allocator.7", align 1
  %22 = alloca i1, align 1
  %23 = alloca i1, align 1
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i1, align 1
  %27 = alloca i1, align 1
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca i1, align 1
  %30 = alloca %"class.std::allocator.7", align 1
  %31 = alloca i1, align 1
  %32 = alloca i1, align 1
  %33 = alloca i1, align 1
  %34 = alloca i1, align 1
  %35 = alloca i1, align 1
  %36 = alloca %"class.std::__cxx11::basic_string", align 8
  %37 = alloca i1, align 1
  %38 = alloca %"class.std::allocator.7", align 1
  %39 = alloca i1, align 1
  %40 = alloca i1, align 1
  %41 = alloca i1, align 1
  %42 = alloca i1, align 1
  %43 = alloca i1, align 1
  %44 = alloca %"class.std::__cxx11::basic_string", align 8
  %45 = alloca i1, align 1
  %46 = alloca i32, align 4
  %47 = alloca i1, align 1
  %48 = alloca i1, align 1
  %49 = alloca %"class.std::__cxx11::basic_string", align 8
  %50 = alloca %"class.std::__cxx11::basic_string", align 8
  %51 = alloca i1, align 1
  %52 = alloca %"class.std::allocator.7", align 1
  %53 = alloca i1, align 1
  %54 = alloca i1, align 1
  %55 = alloca i1, align 1
  %56 = alloca %"class.std::__cxx11::basic_string", align 8
  %57 = alloca i1, align 1
  %58 = alloca %"class.std::allocator.7", align 1
  %59 = alloca i1, align 1
  %60 = alloca i1, align 1
  %61 = alloca i1, align 1
  %62 = alloca i1, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  %63 = zext i1 %1 to i8
  store i8 %63, ptr %4, align 1, !tbaa !9
  %64 = load ptr, ptr %3, align 8
  %65 = getelementptr inbounds %class.ElemModel, ptr %64, i32 0, i32 4
  %66 = load ptr, ptr %65, align 8, !tbaa !11
  %67 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984) %66)
  %68 = getelementptr inbounds %class.ElemModel, ptr %64, i32 0, i32 6
  store ptr %67, ptr %68, align 8, !tbaa !16
  %69 = getelementptr inbounds %class.ElemModel, ptr %64, i32 0, i32 7
  store i8 1, ptr %69, align 8, !tbaa !17
  %70 = getelementptr inbounds %class.ElemModel, ptr %64, i32 0, i32 8
  store i8 0, ptr %70, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %71 = getelementptr inbounds %class.ElemModel, ptr %64, i32 0, i32 4
  %72 = load ptr, ptr %71, align 8, !tbaa !11
  %73 = call noundef double @_ZNK10CommonData14GuessCappPressEv(ptr noundef nonnull align 8 dereferenceable(1972) %72)
  %74 = getelementptr inbounds %class.ElemModel, ptr %64, i32 0, i32 3
  %75 = load ptr, ptr %74, align 8, !tbaa !19
  %76 = call noundef double @_ZNK4Apex17gravityCorrectionEv(ptr noundef nonnull align 8 dereferenceable(104) %75)
  %77 = fsub double %73, %76
  store double %77, ptr %5, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !21
  br label %78

78:                                               ; preds = %470, %2
  %79 = load i32, ptr %6, align 4, !tbaa !21
  %80 = getelementptr inbounds %class.Polygon, ptr %64, i32 0, i32 1
  %81 = load i32, ptr %80, align 8, !tbaa !22
  %82 = icmp slt i32 %79, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %473

84:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %85 = getelementptr inbounds %class.Polygon, ptr %64, i32 0, i32 3
  %86 = load ptr, ptr %85, align 8, !tbaa !30
  %87 = getelementptr inbounds %class.CornerApex, ptr %86, i64 0
  %88 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10CornerApex13trappedCornerEv(ptr noundef nonnull align 8 dereferenceable(144) %87)
  %89 = getelementptr inbounds %"struct.std::pair.0", ptr %88, i32 0, i32 0
  %90 = load i32, ptr %89, align 8, !tbaa !31
  %91 = icmp slt i32 %90, 0
  br i1 %91, label %92, label %94

92:                                               ; preds = %84
  %93 = call noundef double @_ZNK7Polygon22calcSnapOffPressureImbEv(ptr noundef nonnull align 8 dereferenceable(248) %64)
  br label %95

94:                                               ; preds = %84
  br label %95

95:                                               ; preds = %94, %92
  %96 = phi double [ %93, %92 ], [ -1.000000e+27, %94 ]
  store double %96, ptr %7, align 8, !tbaa !20
  %97 = load i8, ptr %4, align 1, !tbaa !9, !range !33, !noundef !34
  %98 = trunc i8 %97 to i1
  br i1 %98, label %469, label %99

99:                                               ; preds = %95
  %100 = getelementptr inbounds %class.ElemModel, ptr %64, i32 0, i32 3
  %101 = load ptr, ptr %100, align 8, !tbaa !19
  %102 = call noundef double @_ZNK4Apex7entryPcEv(ptr noundef nonnull align 8 dereferenceable(104) %101)
  %103 = load double, ptr %7, align 8, !tbaa !20
  %104 = fcmp ogt double %102, %103
  br i1 %104, label %105, label %469

105:                                              ; preds = %99
  %106 = getelementptr inbounds %class.Polygon, ptr %64, i32 0, i32 3
  %107 = load ptr, ptr %106, align 8, !tbaa !30
  %108 = load i32, ptr %6, align 4, !tbaa !21
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds %class.CornerApex, ptr %107, i64 %109
  %111 = load double, ptr %5, align 8, !tbaa !20
  %112 = getelementptr inbounds %class.VoidElem, ptr %64, i32 0, i32 4
  %113 = load double, ptr %112, align 8, !tbaa !35
  %114 = getelementptr inbounds %class.VoidElem, ptr %64, i32 0, i32 3
  %115 = load double, ptr %114, align 8, !tbaa !36
  %116 = getelementptr inbounds %class.Polygon, ptr %64, i32 0, i32 2
  %117 = load i32, ptr %6, align 4, !tbaa !21
  %118 = sext i32 %117 to i64
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %116, i64 noundef %118) #7
  %120 = load double, ptr %119, align 8, !tbaa !20
  %121 = getelementptr inbounds %class.ElemModel, ptr %64, i32 0, i32 4
  %122 = load ptr, ptr %121, align 8, !tbaa !11
  %123 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %122)
  call void @_ZN10CornerApex14initCornerApexEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %110, double noundef %111, double noundef %113, double noundef %115, double noundef %120, double noundef %123, i1 noundef zeroext false)
  %124 = getelementptr inbounds %class.Polygon, ptr %64, i32 0, i32 4
  %125 = load ptr, ptr %124, align 8, !tbaa !37
  %126 = load i32, ptr %6, align 4, !tbaa !21
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds %class.LayerApex, ptr %125, i64 %127
  %129 = load double, ptr %5, align 8, !tbaa !20
  %130 = getelementptr inbounds %class.VoidElem, ptr %64, i32 0, i32 4
  %131 = load double, ptr %130, align 8, !tbaa !35
  %132 = getelementptr inbounds %class.VoidElem, ptr %64, i32 0, i32 3
  %133 = load double, ptr %132, align 8, !tbaa !36
  %134 = getelementptr inbounds %class.Polygon, ptr %64, i32 0, i32 7
  %135 = load double, ptr %134, align 8, !tbaa !38
  %136 = getelementptr inbounds %class.Polygon, ptr %64, i32 0, i32 2
  %137 = load i32, ptr %6, align 4, !tbaa !21
  %138 = sext i32 %137 to i64
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %136, i64 noundef %138) #7
  %140 = load double, ptr %139, align 8, !tbaa !20
  %141 = getelementptr inbounds %class.ElemModel, ptr %64, i32 0, i32 4
  %142 = load ptr, ptr %141, align 8, !tbaa !11
  %143 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %142)
  %144 = call noundef zeroext i1 @_ZN9LayerApex12createOLayerEddddddb(ptr noundef nonnull align 8 dereferenceable(144) %128, double noundef %129, double noundef %131, double noundef %133, double noundef %135, double noundef %140, double noundef %143, i1 noundef zeroext false)
  br i1 %144, label %145, label %462

145:                                              ; preds = %105
  %146 = getelementptr inbounds %class.Polygon, ptr %64, i32 0, i32 4
  %147 = load ptr, ptr %146, align 8, !tbaa !37
  %148 = load i32, ptr %6, align 4, !tbaa !21
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds %class.LayerApex, ptr %147, i64 %149
  %151 = call noundef double @_ZNK9LayerApex14pinnedApexDistEv(ptr noundef nonnull align 8 dereferenceable(144) %150)
  %152 = getelementptr inbounds %class.ElemModel, ptr %64, i32 0, i32 5
  %153 = load double, ptr %152, align 8, !tbaa !39
  %154 = getelementptr inbounds %class.Polygon, ptr %64, i32 0, i32 2
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %154, i64 noundef 0) #7
  %156 = load double, ptr %155, align 8, !tbaa !20
  %157 = call double @tan(double noundef %156) #7
  %158 = fdiv double 1.000000e+00, %157
  %159 = getelementptr inbounds %class.Polygon, ptr %64, i32 0, i32 2
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %159, i64 noundef 1) #7
  %161 = load double, ptr %160, align 8, !tbaa !20
  %162 = call double @tan(double noundef %161) #7
  %163 = fdiv double 1.000000e+00, %162
  %164 = fadd double %158, %163
  %165 = fmul double %153, %164
  %166 = fcmp olt double %151, %165
  store i1 false, ptr %10, align 1
  store i1 false, ptr %12, align 1
  store i1 false, ptr %14, align 1
  store i1 false, ptr %16, align 1
  store i1 false, ptr %18, align 1
  store i1 false, ptr %20, align 1
  store i1 false, ptr %22, align 1
  store i1 false, ptr %23, align 1
  store i1 false, ptr %26, align 1
  store i1 false, ptr %27, align 1
  store i1 false, ptr %29, align 1
  store i1 false, ptr %31, align 1
  store i1 false, ptr %32, align 1
  store i1 false, ptr %33, align 1
  store i1 false, ptr %34, align 1
  store i1 false, ptr %35, align 1
  store i1 false, ptr %37, align 1
  store i1 false, ptr %39, align 1
  store i1 false, ptr %40, align 1
  store i1 false, ptr %41, align 1
  store i1 false, ptr %42, align 1
  store i1 false, ptr %43, align 1
  store i1 false, ptr %45, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #7
  store i1 false, ptr %47, align 1
  store i1 false, ptr %48, align 1
  store i1 false, ptr %51, align 1
  store i1 false, ptr %53, align 1
  store i1 false, ptr %54, align 1
  store i1 false, ptr %55, align 1
  store i1 false, ptr %57, align 1
  store i1 false, ptr %59, align 1
  store i1 false, ptr %60, align 1
  store i1 false, ptr %61, align 1
  store i1 false, ptr %62, align 1
  br i1 %166, label %183, label %167

167:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #7
  store i1 true, ptr %10, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  store i1 true, ptr %12, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #7
  store i1 true, ptr %14, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #7
  store i1 true, ptr %16, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #7
  store i1 true, ptr %18, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #7
  store i1 true, ptr %20, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #7
  store i1 true, ptr %22, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #7
  store i1 true, ptr %23, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %168 unwind label %291

168:                                              ; preds = %167
  store i1 true, ptr %26, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.1)
          to label %169 unwind label %295

169:                                              ; preds = %168
  store i1 true, ptr %27, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %28) #7
  store i1 true, ptr %29, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #7
  store i1 true, ptr %31, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #7
  store i1 true, ptr %32, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef @__FUNCTION__._ZN7Polygon31fillCentreWithWaterCreateLayersEb, ptr noundef nonnull align 1 dereferenceable(1) %30)
          to label %170 unwind label %299

170:                                              ; preds = %169
  store i1 true, ptr %33, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %28)
          to label %171 unwind label %303

171:                                              ; preds = %170
  store i1 true, ptr %34, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %13, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.2)
          to label %172 unwind label %307

172:                                              ; preds = %171
  store i1 true, ptr %35, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %36) #7
  store i1 true, ptr %37, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %38) #7
  store i1 true, ptr %39, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #7
  store i1 true, ptr %40, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %38)
          to label %173 unwind label %311

173:                                              ; preds = %172
  store i1 true, ptr %41, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %36)
          to label %174 unwind label %315

174:                                              ; preds = %173
  store i1 true, ptr %42, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str.4)
          to label %175 unwind label %319

175:                                              ; preds = %174
  store i1 true, ptr %43, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %44) #7
  store i1 true, ptr %45, align 1
  store i32 249, ptr %46, align 4, !tbaa !21
  invoke void @_Z2_sIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %44, ptr noundef nonnull align 4 dereferenceable(4) %46)
          to label %176 unwind label %323

176:                                              ; preds = %175
  store i1 true, ptr %47, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %44)
          to label %177 unwind label %327

177:                                              ; preds = %176
  store i1 true, ptr %48, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %50) #7
  store i1 true, ptr %51, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %52) #7
  store i1 true, ptr %53, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %52) #7
  store i1 true, ptr %54, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %50, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %52)
          to label %178 unwind label %331

178:                                              ; preds = %177
  store i1 true, ptr %55, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %56) #7
  store i1 true, ptr %57, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %58) #7
  store i1 true, ptr %59, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %58) #7
  store i1 true, ptr %60, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %56, ptr noundef @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %58)
          to label %179 unwind label %335

179:                                              ; preds = %178
  store i1 true, ptr %61, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %49, ptr noundef nonnull align 8 dereferenceable(32) %50, ptr noundef nonnull align 8 dereferenceable(32) %56)
          to label %180 unwind label %339

180:                                              ; preds = %179
  store i1 true, ptr %62, align 1
  %181 = invoke noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef %8, ptr noundef %49, i32 noundef 0)
          to label %182 unwind label %343

182:                                              ; preds = %180
  br label %183

183:                                              ; preds = %182, %145
  %184 = phi i1 [ true, %145 ], [ %181, %182 ]
  %185 = xor i1 %184, true
  %186 = load i1, ptr %62, align 1
  br i1 %186, label %187, label %188

187:                                              ; preds = %183
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %49) #7
  br label %188

188:                                              ; preds = %187, %183
  %189 = load i1, ptr %61, align 1
  br i1 %189, label %190, label %191

190:                                              ; preds = %188
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %56) #7
  br label %191

191:                                              ; preds = %190, %188
  %192 = load i1, ptr %60, align 1
  br i1 %192, label %193, label %194

193:                                              ; preds = %191
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %58) #7
  br label %194

194:                                              ; preds = %193, %191
  %195 = load i1, ptr %59, align 1
  br i1 %195, label %196, label %197

196:                                              ; preds = %194
  call void @llvm.lifetime.end.p0(i64 1, ptr %58) #7
  br label %197

197:                                              ; preds = %196, %194
  %198 = load i1, ptr %57, align 1
  br i1 %198, label %199, label %200

199:                                              ; preds = %197
  call void @llvm.lifetime.end.p0(i64 32, ptr %56) #7
  br label %200

200:                                              ; preds = %199, %197
  %201 = load i1, ptr %55, align 1
  br i1 %201, label %202, label %203

202:                                              ; preds = %200
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %50) #7
  br label %203

203:                                              ; preds = %202, %200
  %204 = load i1, ptr %54, align 1
  br i1 %204, label %205, label %206

205:                                              ; preds = %203
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %52) #7
  br label %206

206:                                              ; preds = %205, %203
  %207 = load i1, ptr %53, align 1
  br i1 %207, label %208, label %209

208:                                              ; preds = %206
  call void @llvm.lifetime.end.p0(i64 1, ptr %52) #7
  br label %209

209:                                              ; preds = %208, %206
  %210 = load i1, ptr %51, align 1
  br i1 %210, label %211, label %212

211:                                              ; preds = %209
  call void @llvm.lifetime.end.p0(i64 32, ptr %50) #7
  br label %212

212:                                              ; preds = %211, %209
  %213 = load i1, ptr %48, align 1
  br i1 %213, label %214, label %215

214:                                              ; preds = %212
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %215

215:                                              ; preds = %214, %212
  %216 = load i1, ptr %47, align 1
  br i1 %216, label %217, label %218

217:                                              ; preds = %215
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #7
  br label %218

218:                                              ; preds = %217, %215
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #7
  %219 = load i1, ptr %45, align 1
  br i1 %219, label %220, label %221

220:                                              ; preds = %218
  call void @llvm.lifetime.end.p0(i64 32, ptr %44) #7
  br label %221

221:                                              ; preds = %220, %218
  %222 = load i1, ptr %43, align 1
  br i1 %222, label %223, label %224

223:                                              ; preds = %221
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  br label %224

224:                                              ; preds = %223, %221
  %225 = load i1, ptr %42, align 1
  br i1 %225, label %226, label %227

226:                                              ; preds = %224
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %227

227:                                              ; preds = %226, %224
  %228 = load i1, ptr %41, align 1
  br i1 %228, label %229, label %230

229:                                              ; preds = %227
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #7
  br label %230

230:                                              ; preds = %229, %227
  %231 = load i1, ptr %40, align 1
  br i1 %231, label %232, label %233

232:                                              ; preds = %230
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #7
  br label %233

233:                                              ; preds = %232, %230
  %234 = load i1, ptr %39, align 1
  br i1 %234, label %235, label %236

235:                                              ; preds = %233
  call void @llvm.lifetime.end.p0(i64 1, ptr %38) #7
  br label %236

236:                                              ; preds = %235, %233
  %237 = load i1, ptr %37, align 1
  br i1 %237, label %238, label %239

238:                                              ; preds = %236
  call void @llvm.lifetime.end.p0(i64 32, ptr %36) #7
  br label %239

239:                                              ; preds = %238, %236
  %240 = load i1, ptr %35, align 1
  br i1 %240, label %241, label %242

241:                                              ; preds = %239
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  br label %242

242:                                              ; preds = %241, %239
  %243 = load i1, ptr %34, align 1
  br i1 %243, label %244, label %245

244:                                              ; preds = %242
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %245

245:                                              ; preds = %244, %242
  %246 = load i1, ptr %33, align 1
  br i1 %246, label %247, label %248

247:                                              ; preds = %245
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #7
  br label %248

248:                                              ; preds = %247, %245
  %249 = load i1, ptr %32, align 1
  br i1 %249, label %250, label %251

250:                                              ; preds = %248
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #7
  br label %251

251:                                              ; preds = %250, %248
  %252 = load i1, ptr %31, align 1
  br i1 %252, label %253, label %254

253:                                              ; preds = %251
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #7
  br label %254

254:                                              ; preds = %253, %251
  %255 = load i1, ptr %29, align 1
  br i1 %255, label %256, label %257

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

257:                                              ; preds = %256, %254
  %258 = load i1, ptr %27, align 1
  br i1 %258, label %259, label %260

259:                                              ; preds = %257
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %260

260:                                              ; preds = %259, %257
  %261 = load i1, ptr %26, align 1
  br i1 %261, label %262, label %263

262:                                              ; preds = %260
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  br label %263

263:                                              ; preds = %262, %260
  %264 = load i1, ptr %23, align 1
  br i1 %264, label %265, label %266

265:                                              ; preds = %263
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #7
  br label %266

266:                                              ; preds = %265, %263
  %267 = load i1, ptr %22, align 1
  br i1 %267, label %268, label %269

268:                                              ; preds = %266
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #7
  br label %269

269:                                              ; preds = %268, %266
  %270 = load i1, ptr %20, align 1
  br i1 %270, label %271, label %272

271:                                              ; preds = %269
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  br label %272

272:                                              ; preds = %271, %269
  %273 = load i1, ptr %18, align 1
  br i1 %273, label %274, label %275

274:                                              ; preds = %272
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  br label %275

275:                                              ; preds = %274, %272
  %276 = load i1, ptr %16, align 1
  br i1 %276, label %277, label %278

277:                                              ; preds = %275
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  br label %278

278:                                              ; preds = %277, %275
  %279 = load i1, ptr %14, align 1
  br i1 %279, label %280, label %281

280:                                              ; preds = %278
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  br label %281

281:                                              ; preds = %280, %278
  %282 = load i1, ptr %12, align 1
  br i1 %282, label %283, label %284

283:                                              ; preds = %281
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  br label %284

284:                                              ; preds = %283, %281
  %285 = load i1, ptr %10, align 1
  br i1 %285, label %286, label %287

286:                                              ; preds = %284
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  br label %287

287:                                              ; preds = %286, %284
  %288 = getelementptr inbounds %class.Polygon, ptr %64, i32 0, i32 5
  %289 = load i16, ptr %288, align 8, !tbaa !40
  %290 = add i16 %289, 1
  store i16 %290, ptr %288, align 8, !tbaa !40
  br label %468

291:                                              ; preds = %167
  %292 = landingpad { ptr, i32 }
          cleanup
  %293 = extractvalue { ptr, i32 } %292, 0
  store ptr %293, ptr %24, align 8
  %294 = extractvalue { ptr, i32 } %292, 1
  store i32 %294, ptr %25, align 4
  br label %437

295:                                              ; preds = %168
  %296 = landingpad { ptr, i32 }
          cleanup
  %297 = extractvalue { ptr, i32 } %296, 0
  store ptr %297, ptr %24, align 8
  %298 = extractvalue { ptr, i32 } %296, 1
  store i32 %298, ptr %25, align 4
  br label %433

299:                                              ; preds = %169
  %300 = landingpad { ptr, i32 }
          cleanup
  %301 = extractvalue { ptr, i32 } %300, 0
  store ptr %301, ptr %24, align 8
  %302 = extractvalue { ptr, i32 } %300, 1
  store i32 %302, ptr %25, align 4
  br label %420

303:                                              ; preds = %170
  %304 = landingpad { ptr, i32 }
          cleanup
  %305 = extractvalue { ptr, i32 } %304, 0
  store ptr %305, ptr %24, align 8
  %306 = extractvalue { ptr, i32 } %304, 1
  store i32 %306, ptr %25, align 4
  br label %416

307:                                              ; preds = %171
  %308 = landingpad { ptr, i32 }
          cleanup
  %309 = extractvalue { ptr, i32 } %308, 0
  store ptr %309, ptr %24, align 8
  %310 = extractvalue { ptr, i32 } %308, 1
  store i32 %310, ptr %25, align 4
  br label %412

311:                                              ; preds = %172
  %312 = landingpad { ptr, i32 }
          cleanup
  %313 = extractvalue { ptr, i32 } %312, 0
  store ptr %313, ptr %24, align 8
  %314 = extractvalue { ptr, i32 } %312, 1
  store i32 %314, ptr %25, align 4
  br label %399

315:                                              ; preds = %173
  %316 = landingpad { ptr, i32 }
          cleanup
  %317 = extractvalue { ptr, i32 } %316, 0
  store ptr %317, ptr %24, align 8
  %318 = extractvalue { ptr, i32 } %316, 1
  store i32 %318, ptr %25, align 4
  br label %395

319:                                              ; preds = %174
  %320 = landingpad { ptr, i32 }
          cleanup
  %321 = extractvalue { ptr, i32 } %320, 0
  store ptr %321, ptr %24, align 8
  %322 = extractvalue { ptr, i32 } %320, 1
  store i32 %322, ptr %25, align 4
  br label %391

323:                                              ; preds = %175
  %324 = landingpad { ptr, i32 }
          cleanup
  %325 = extractvalue { ptr, i32 } %324, 0
  store ptr %325, ptr %24, align 8
  %326 = extractvalue { ptr, i32 } %324, 1
  store i32 %326, ptr %25, align 4
  br label %384

327:                                              ; preds = %176
  %328 = landingpad { ptr, i32 }
          cleanup
  %329 = extractvalue { ptr, i32 } %328, 0
  store ptr %329, ptr %24, align 8
  %330 = extractvalue { ptr, i32 } %328, 1
  store i32 %330, ptr %25, align 4
  br label %380

331:                                              ; preds = %177
  %332 = landingpad { ptr, i32 }
          cleanup
  %333 = extractvalue { ptr, i32 } %332, 0
  store ptr %333, ptr %24, align 8
  %334 = extractvalue { ptr, i32 } %332, 1
  store i32 %334, ptr %25, align 4
  br label %367

335:                                              ; preds = %178
  %336 = landingpad { ptr, i32 }
          cleanup
  %337 = extractvalue { ptr, i32 } %336, 0
  store ptr %337, ptr %24, align 8
  %338 = extractvalue { ptr, i32 } %336, 1
  store i32 %338, ptr %25, align 4
  br label %354

339:                                              ; preds = %179
  %340 = landingpad { ptr, i32 }
          cleanup
  %341 = extractvalue { ptr, i32 } %340, 0
  store ptr %341, ptr %24, align 8
  %342 = extractvalue { ptr, i32 } %340, 1
  store i32 %342, ptr %25, align 4
  br label %350

343:                                              ; preds = %180
  %344 = landingpad { ptr, i32 }
          cleanup
  %345 = extractvalue { ptr, i32 } %344, 0
  store ptr %345, ptr %24, align 8
  %346 = extractvalue { ptr, i32 } %344, 1
  store i32 %346, ptr %25, align 4
  %347 = load i1, ptr %62, align 1
  br i1 %347, label %348, label %349

348:                                              ; preds = %343
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %49) #7
  br label %349

349:                                              ; preds = %348, %343
  br label %350

350:                                              ; preds = %349, %339
  %351 = load i1, ptr %61, align 1
  br i1 %351, label %352, label %353

352:                                              ; preds = %350
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %56) #7
  br label %353

353:                                              ; preds = %352, %350
  br label %354

354:                                              ; preds = %353, %335
  %355 = load i1, ptr %60, align 1
  br i1 %355, label %356, label %357

356:                                              ; preds = %354
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %58) #7
  br label %357

357:                                              ; preds = %356, %354
  %358 = load i1, ptr %59, align 1
  br i1 %358, label %359, label %360

359:                                              ; preds = %357
  call void @llvm.lifetime.end.p0(i64 1, ptr %58) #7
  br label %360

360:                                              ; preds = %359, %357
  %361 = load i1, ptr %57, align 1
  br i1 %361, label %362, label %363

362:                                              ; preds = %360
  call void @llvm.lifetime.end.p0(i64 32, ptr %56) #7
  br label %363

363:                                              ; preds = %362, %360
  %364 = load i1, ptr %55, align 1
  br i1 %364, label %365, label %366

365:                                              ; preds = %363
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %50) #7
  br label %366

366:                                              ; preds = %365, %363
  br label %367

367:                                              ; preds = %366, %331
  %368 = load i1, ptr %54, align 1
  br i1 %368, label %369, label %370

369:                                              ; preds = %367
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %52) #7
  br label %370

370:                                              ; preds = %369, %367
  %371 = load i1, ptr %53, align 1
  br i1 %371, label %372, label %373

372:                                              ; preds = %370
  call void @llvm.lifetime.end.p0(i64 1, ptr %52) #7
  br label %373

373:                                              ; preds = %372, %370
  %374 = load i1, ptr %51, align 1
  br i1 %374, label %375, label %376

375:                                              ; preds = %373
  call void @llvm.lifetime.end.p0(i64 32, ptr %50) #7
  br label %376

376:                                              ; preds = %375, %373
  %377 = load i1, ptr %48, align 1
  br i1 %377, label %378, label %379

378:                                              ; preds = %376
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %379

379:                                              ; preds = %378, %376
  br label %380

380:                                              ; preds = %379, %327
  %381 = load i1, ptr %47, align 1
  br i1 %381, label %382, label %383

382:                                              ; preds = %380
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #7
  br label %383

383:                                              ; preds = %382, %380
  br label %384

384:                                              ; preds = %383, %323
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #7
  %385 = load i1, ptr %45, align 1
  br i1 %385, label %386, label %387

386:                                              ; preds = %384
  call void @llvm.lifetime.end.p0(i64 32, ptr %44) #7
  br label %387

387:                                              ; preds = %386, %384
  %388 = load i1, ptr %43, align 1
  br i1 %388, label %389, label %390

389:                                              ; preds = %387
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  br label %390

390:                                              ; preds = %389, %387
  br label %391

391:                                              ; preds = %390, %319
  %392 = load i1, ptr %42, align 1
  br i1 %392, label %393, label %394

393:                                              ; preds = %391
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %394

394:                                              ; preds = %393, %391
  br label %395

395:                                              ; preds = %394, %315
  %396 = load i1, ptr %41, align 1
  br i1 %396, label %397, label %398

397:                                              ; preds = %395
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #7
  br label %398

398:                                              ; preds = %397, %395
  br label %399

399:                                              ; preds = %398, %311
  %400 = load i1, ptr %40, align 1
  br i1 %400, label %401, label %402

401:                                              ; preds = %399
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #7
  br label %402

402:                                              ; preds = %401, %399
  %403 = load i1, ptr %39, align 1
  br i1 %403, label %404, label %405

404:                                              ; preds = %402
  call void @llvm.lifetime.end.p0(i64 1, ptr %38) #7
  br label %405

405:                                              ; preds = %404, %402
  %406 = load i1, ptr %37, align 1
  br i1 %406, label %407, label %408

407:                                              ; preds = %405
  call void @llvm.lifetime.end.p0(i64 32, ptr %36) #7
  br label %408

408:                                              ; preds = %407, %405
  %409 = load i1, ptr %35, align 1
  br i1 %409, label %410, label %411

410:                                              ; preds = %408
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  br label %411

411:                                              ; preds = %410, %408
  br label %412

412:                                              ; preds = %411, %307
  %413 = load i1, ptr %34, align 1
  br i1 %413, label %414, label %415

414:                                              ; preds = %412
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %415

415:                                              ; preds = %414, %412
  br label %416

416:                                              ; preds = %415, %303
  %417 = load i1, ptr %33, align 1
  br i1 %417, label %418, label %419

418:                                              ; preds = %416
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #7
  br label %419

419:                                              ; preds = %418, %416
  br label %420

420:                                              ; preds = %419, %299
  %421 = load i1, ptr %32, align 1
  br i1 %421, label %422, label %423

422:                                              ; preds = %420
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #7
  br label %423

423:                                              ; preds = %422, %420
  %424 = load i1, ptr %31, align 1
  br i1 %424, label %425, label %426

425:                                              ; preds = %423
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #7
  br label %426

426:                                              ; preds = %425, %423
  %427 = load i1, ptr %29, align 1
  br i1 %427, label %428, label %429

428:                                              ; preds = %426
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #7
  br label %429

429:                                              ; preds = %428, %426
  %430 = load i1, ptr %27, align 1
  br i1 %430, label %431, label %432

431:                                              ; preds = %429
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %432

432:                                              ; preds = %431, %429
  br label %433

433:                                              ; preds = %432, %295
  %434 = load i1, ptr %26, align 1
  br i1 %434, label %435, label %436

435:                                              ; preds = %433
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  br label %436

436:                                              ; preds = %435, %433
  br label %437

437:                                              ; preds = %436, %291
  %438 = load i1, ptr %23, align 1
  br i1 %438, label %439, label %440

439:                                              ; preds = %437
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #7
  br label %440

440:                                              ; preds = %439, %437
  %441 = load i1, ptr %22, align 1
  br i1 %441, label %442, label %443

442:                                              ; preds = %440
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #7
  br label %443

443:                                              ; preds = %442, %440
  %444 = load i1, ptr %20, align 1
  br i1 %444, label %445, label %446

445:                                              ; preds = %443
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  br label %446

446:                                              ; preds = %445, %443
  %447 = load i1, ptr %18, align 1
  br i1 %447, label %448, label %449

448:                                              ; preds = %446
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  br label %449

449:                                              ; preds = %448, %446
  %450 = load i1, ptr %16, align 1
  br i1 %450, label %451, label %452

451:                                              ; preds = %449
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  br label %452

452:                                              ; preds = %451, %449
  %453 = load i1, ptr %14, align 1
  br i1 %453, label %454, label %455

454:                                              ; preds = %452
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  br label %455

455:                                              ; preds = %454, %452
  %456 = load i1, ptr %12, align 1
  br i1 %456, label %457, label %458

457:                                              ; preds = %455
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  br label %458

458:                                              ; preds = %457, %455
  %459 = load i1, ptr %10, align 1
  br i1 %459, label %460, label %461

460:                                              ; preds = %458
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  br label %461

461:                                              ; preds = %460, %458
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %500

462:                                              ; preds = %105
  %463 = getelementptr inbounds %class.Polygon, ptr %64, i32 0, i32 3
  %464 = load ptr, ptr %463, align 8, !tbaa !30
  %465 = load i32, ptr %6, align 4, !tbaa !21
  %466 = sext i32 %465 to i64
  %467 = getelementptr inbounds %class.CornerApex, ptr %464, i64 %466
  call void @_ZN10CornerApex12removeCornerEv(ptr noundef nonnull align 8 dereferenceable(144) %467)
  br label %468

468:                                              ; preds = %462, %287
  br label %469

469:                                              ; preds = %468, %99, %95
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %470

470:                                              ; preds = %469
  %471 = load i32, ptr %6, align 4, !tbaa !21
  %472 = add nsw i32 %471, 1
  store i32 %472, ptr %6, align 4, !tbaa !21
  br label %78, !llvm.loop !41

473:                                              ; preds = %83
  %474 = getelementptr inbounds %class.Polygon, ptr %64, i32 0, i32 5
  %475 = load i16, ptr %474, align 8, !tbaa !40
  %476 = icmp ne i16 %475, 0
  br i1 %476, label %477, label %479

477:                                              ; preds = %473
  %478 = getelementptr inbounds %class.ElemModel, ptr %64, i32 0, i32 8
  store i8 1, ptr %478, align 1, !tbaa !18
  br label %479

479:                                              ; preds = %477, %473
  %480 = getelementptr inbounds %class.Polygon, ptr %64, i32 0, i32 5
  %481 = load i16, ptr %480, align 8, !tbaa !40
  %482 = sext i16 %481 to i32
  %483 = getelementptr inbounds %class.Polygon, ptr %64, i32 0, i32 1
  %484 = load i32, ptr %483, align 8, !tbaa !22
  %485 = icmp eq i32 %482, %484
  %486 = getelementptr inbounds %class.ElemModel, ptr %64, i32 0, i32 9
  %487 = zext i1 %485 to i8
  store i8 %487, ptr %486, align 2, !tbaa !43
  %488 = getelementptr inbounds %class.ElemModel, ptr %64, i32 0, i32 4
  %489 = load ptr, ptr %488, align 8, !tbaa !11
  %490 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %489)
  %491 = getelementptr inbounds %class.VoidElem, ptr %64, i32 0, i32 3
  %492 = load double, ptr %491, align 8, !tbaa !36
  %493 = call double @cos(double noundef %492) #7
  %494 = fmul double 2.000000e+00, %493
  %495 = fmul double %490, %494
  %496 = getelementptr inbounds %class.ElemModel, ptr %64, i32 0, i32 5
  %497 = load double, ptr %496, align 8, !tbaa !39
  %498 = fdiv double %495, %497
  %499 = getelementptr inbounds %class.ElemModel, ptr %64, i32 0, i32 16
  store double %498, ptr %499, align 8, !tbaa !44
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  ret void

500:                                              ; preds = %461
  %501 = load ptr, ptr %24, align 8
  %502 = load i32, ptr %25, align 4
  %503 = insertvalue { ptr, i32 } poison, ptr %501, 0
  %504 = insertvalue { ptr, i32 } %503, i32 %502, 1
  resume { ptr, i32 } %504
}

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

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

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

declare void @_ZN10CornerApex14initCornerApexEdddddb(ptr noundef nonnull align 8 dereferenceable(144), double noundef, double noundef, double noundef, double noundef, double noundef, i1 noundef zeroext) #5

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

declare noundef zeroext i1 @_ZN9LayerApex12createOLayerEddddddb(ptr noundef nonnull align 8 dereferenceable(144), double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, i1 noundef zeroext) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10CornerApex12removeCornerEv(ptr noundef nonnull align 8 dereferenceable(144)) #6 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 = { 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress 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 #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 = !{!"bool", !7, i64 0}
!11 = !{!12, !6, i64 32}
!12 = !{!"_ZTS9ElemModel", !13, i64 8, !13, i64 16, !6, i64 24, !6, i64 32, !13, i64 40, !6, i64 48, !10, i64 56, !10, i64 57, !10, i64 58, !10, i64 59, !14, i64 60, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !13, i64 112, !15, i64 120, !15, i64 136}
!13 = !{!"double", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSSt4pairIddE", !13, i64 0, !13, i64 8}
!16 = !{!12, !6, i64 48}
!17 = !{!12, !10, i64 56}
!18 = !{!12, !10, i64 57}
!19 = !{!12, !6, i64 24}
!20 = !{!13, !13, i64 0}
!21 = !{!14, !14, i64 0}
!22 = !{!23, !14, i64 184}
!23 = !{!"_ZTS7Polygon", !24, i64 0, !14, i64 184, !25, i64 192, !6, i64 216, !6, i64 224, !29, i64 232, !7, i64 234, !13, i64 240}
!24 = !{!"_ZTS8VoidElem", !12, i64 0, !13, i64 152, !13, i64 160, !13, i64 168, !13, i64 176}
!25 = !{!"_ZTSSt6vectorIdSaIdEE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"short", !7, i64 0}
!30 = !{!23, !6, i64 216}
!31 = !{!32, !14, i64 0}
!32 = !{!"_ZTSSt4pairIidE", !14, i64 0, !13, i64 8}
!33 = !{i8 0, i8 2}
!34 = !{}
!35 = !{!24, !13, i64 176}
!36 = !{!24, !13, i64 168}
!37 = !{!23, !6, i64 224}
!38 = !{!23, !13, i64 240}
!39 = !{!12, !13, i64 40}
!40 = !{!23, !29, i64 232}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}
!43 = !{!12, !10, i64 58}
!44 = !{!12, !13, i64 96}


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.7" = type { i8 }
%class.CornerApex = type { %class.Apex, ptr, double, double, double, ptr }
%class.Apex = type { ptr, i8, double, double, ptr, i32, double, double, double, double, i8, i8, i8, i8, %"struct.std::pair.0" }
%"struct.std::pair.0" = type { i32, double }
%class.LayerApex = type { %class.Apex, i32, ptr, double, ptr, double }

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [97 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@__FUNCTION__._ZN7Polygon31fillCentreWithWaterCreateLayersEb = external hidden unnamed_addr constant [32 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [85 x i8], align 1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) 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: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #0

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2_sIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Polygon31fillCentreWithWaterCreateLayersEb(ptr noundef nonnull align 8 dereferenceable(248) %0, i1 noundef zeroext %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator.7", align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator.7", align 1
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator.7", align 1
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator.7", align 1
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::allocator.7", align 1
  %22 = getelementptr inbounds i8, ptr %0, i64 32
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  %24 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984) %23)
  %25 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %24, ptr %25, align 8, !tbaa !14
  %26 = getelementptr inbounds i8, ptr %0, i64 56
  store i8 1, ptr %26, align 8, !tbaa !15
  %27 = getelementptr inbounds i8, ptr %0, i64 57
  store i8 0, ptr %27, align 1, !tbaa !16
  %28 = load ptr, ptr %22, align 8, !tbaa !5
  %29 = tail call noundef double @_ZNK10CommonData14GuessCappPressEv(ptr noundef nonnull align 8 dereferenceable(1972) %28)
  %30 = getelementptr inbounds i8, ptr %0, i64 24
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  %32 = tail call noundef double @_ZNK4Apex17gravityCorrectionEv(ptr noundef nonnull align 8 dereferenceable(104) %31)
  %33 = fsub double %29, %32
  %34 = getelementptr inbounds i8, ptr %0, i64 184
  %35 = load i32, ptr %34, align 8, !tbaa !18
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %37 = getelementptr inbounds i8, ptr %0, i64 216
  %38 = getelementptr inbounds i8, ptr %0, i64 176
  %39 = getelementptr inbounds i8, ptr %0, i64 168
  %40 = getelementptr inbounds i8, ptr %0, i64 192
  %41 = getelementptr inbounds i8, ptr %0, i64 224
  %42 = getelementptr inbounds i8, ptr %0, i64 240
  %43 = getelementptr inbounds i8, ptr %0, i64 40
  %44 = getelementptr inbounds i8, ptr %0, i64 232
  br i1 %1, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %51
  %.0129191.us = phi i32 [ %52, %51 ], [ 0, %.lr.ph ]
  %45 = load ptr, ptr %37, align 8, !tbaa !26
  %46 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10CornerApex13trappedCornerEv(ptr noundef nonnull align 8 dereferenceable(144) %45)
  %47 = load i32, ptr %46, align 8, !tbaa !27
  %48 = icmp slt i32 %47, 0
  br i1 %48, label %49, label %51

49:                                               ; preds = %.lr.ph.split.us
  %50 = tail call noundef double @_ZNK7Polygon22calcSnapOffPressureImbEv(ptr noundef nonnull align 8 dereferenceable(248) %0)
  br label %51

51:                                               ; preds = %49, %.lr.ph.split.us
  %52 = add nuw nsw i32 %.0129191.us, 1
  %53 = load i32, ptr %34, align 8, !tbaa !18
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !29

._crit_edge:                                      ; preds = %167, %51, %2
  %.lcssa = phi i32 [ %35, %2 ], [ %53, %51 ], [ %168, %167 ]
  %55 = getelementptr inbounds i8, ptr %0, i64 232
  %56 = load i16, ptr %55, align 8, !tbaa !31
  %.not = icmp eq i16 %56, 0
  br i1 %.not, label %172, label %171

.lr.ph.split:                                     ; preds = %.lr.ph, %167
  %indvars.iv = phi i64 [ %indvars.iv.next, %167 ], [ 0, %.lr.ph ]
  %57 = load ptr, ptr %37, align 8, !tbaa !26
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10CornerApex13trappedCornerEv(ptr noundef nonnull align 8 dereferenceable(144) %57)
  %59 = load i32, ptr %58, align 8, !tbaa !27
  %60 = icmp slt i32 %59, 0
  br i1 %60, label %61, label %63

61:                                               ; preds = %.lr.ph.split
  %62 = call noundef double @_ZNK7Polygon22calcSnapOffPressureImbEv(ptr noundef nonnull align 8 dereferenceable(248) %0)
  br label %63

63:                                               ; preds = %.lr.ph.split, %61
  %64 = phi double [ %62, %61 ], [ -1.000000e+27, %.lr.ph.split ]
  %65 = load ptr, ptr %30, align 8, !tbaa !17
  %66 = call noundef double @_ZNK4Apex7entryPcEv(ptr noundef nonnull align 8 dereferenceable(104) %65)
  %67 = fcmp ogt double %66, %64
  br i1 %67, label %68, label %167

68:                                               ; preds = %63
  %69 = load ptr, ptr %37, align 8, !tbaa !26
  %70 = getelementptr inbounds %class.CornerApex, ptr %69, i64 %indvars.iv
  %71 = load double, ptr %38, align 8, !tbaa !32
  %72 = load double, ptr %39, align 8, !tbaa !33
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %indvars.iv) #7
  %74 = load double, ptr %73, align 8, !tbaa !34
  %75 = load ptr, ptr %22, align 8, !tbaa !5
  %76 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %75)
  call void @_ZN10CornerApex14initCornerApexEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %70, double noundef %33, double noundef %71, double noundef %72, double noundef %74, double noundef %76, i1 noundef zeroext false)
  %77 = load ptr, ptr %41, align 8, !tbaa !35
  %78 = getelementptr inbounds %class.LayerApex, ptr %77, i64 %indvars.iv
  %79 = load double, ptr %38, align 8, !tbaa !32
  %80 = load double, ptr %39, align 8, !tbaa !33
  %81 = load double, ptr %42, align 8, !tbaa !36
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %indvars.iv) #7
  %83 = load double, ptr %82, align 8, !tbaa !34
  %84 = load ptr, ptr %22, align 8, !tbaa !5
  %85 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %84)
  %86 = call noundef zeroext i1 @_ZN9LayerApex12createOLayerEddddddb(ptr noundef nonnull align 8 dereferenceable(144) %78, double noundef %33, double noundef %79, double noundef %80, double noundef %81, double noundef %83, double noundef %85, i1 noundef zeroext false)
  br i1 %86, label %87, label %164

87:                                               ; preds = %68
  %88 = load ptr, ptr %41, align 8, !tbaa !35
  %89 = getelementptr inbounds %class.LayerApex, ptr %88, i64 %indvars.iv
  %90 = call noundef double @_ZNK9LayerApex14pinnedApexDistEv(ptr noundef nonnull align 8 dereferenceable(144) %89)
  %91 = load double, ptr %43, align 8, !tbaa !37
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef 0) #7
  %93 = load double, ptr %92, align 8, !tbaa !34
  %94 = call double @tan(double noundef %93) #7
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef 1) #7
  %96 = load double, ptr %95, align 8, !tbaa !34
  %97 = call double @tan(double noundef %96) #7
  %98 = insertelement <2 x double> poison, double %94, i64 0
  %99 = insertelement <2 x double> %98, double %97, i64 1
  %100 = fdiv <2 x double> <double 1.000000e+00, double 1.000000e+00>, %99
  %shift = shufflevector <2 x double> %100, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %101 = fadd <2 x double> %100, %shift
  %102 = extractelement <2 x double> %101, i64 0
  %103 = fmul double %91, %102
  %104 = fcmp uge double %90, %103
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  br i1 %104, label %105, label %120

105:                                              ; preds = %87
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %106 unwind label %123

106:                                              ; preds = %105
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.1)
          to label %107 unwind label %125

107:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @__FUNCTION__._ZN7Polygon31fillCentreWithWaterCreateLayersEb, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %108 unwind label %127

108:                                              ; preds = %107
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %109 unwind label %129

109:                                              ; preds = %108
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.2)
          to label %110 unwind label %131

110:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %111 unwind label %133

111:                                              ; preds = %110
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %112 unwind label %135

112:                                              ; preds = %111
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.4)
          to label %113 unwind label %137

113:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #7
  store i32 249, ptr %16, align 4, !tbaa !38
  invoke void @_Z2_sIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %114 unwind label %139

114:                                              ; preds = %113
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %3, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %115 unwind label %141

115:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %19) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %116 unwind label %143

116:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %20) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %21) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %117 unwind label %145

117:                                              ; preds = %116
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %118 unwind label %147

118:                                              ; preds = %117
  %119 = invoke noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef nonnull %3, ptr noundef nonnull %17, i32 noundef 0)
          to label %.critedge155 unwind label %149

120:                                              ; preds = %87
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  br label %.critedge176

.critedge155:                                     ; preds = %118
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(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 32, ptr nonnull %13) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(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 32, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br label %.critedge176

.critedge176:                                     ; preds = %120, %.critedge155
  %121 = load i16, ptr %44, align 8, !tbaa !31
  %122 = add i16 %121, 1
  store i16 %122, ptr %44, align 8, !tbaa !31
  br label %167

123:                                              ; preds = %105
  %124 = landingpad { ptr, i32 }
          cleanup
  br label %163

125:                                              ; preds = %106
  %126 = landingpad { ptr, i32 }
          cleanup
  br label %162

127:                                              ; preds = %107
  %128 = landingpad { ptr, i32 }
          cleanup
  br label %161

129:                                              ; preds = %108
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %160

131:                                              ; preds = %109
  %132 = landingpad { ptr, i32 }
          cleanup
  br label %159

133:                                              ; preds = %110
  %134 = landingpad { ptr, i32 }
          cleanup
  br label %158

135:                                              ; preds = %111
  %136 = landingpad { ptr, i32 }
          cleanup
  br label %157

137:                                              ; preds = %112
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %156

139:                                              ; preds = %113
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %155

141:                                              ; preds = %114
  %142 = landingpad { ptr, i32 }
          cleanup
  br label %154

143:                                              ; preds = %115
  %144 = landingpad { ptr, i32 }
          cleanup
  br label %153

145:                                              ; preds = %116
  %146 = landingpad { ptr, i32 }
          cleanup
  br label %152

147:                                              ; preds = %117
  %148 = landingpad { ptr, i32 }
          cleanup
  br label %151

149:                                              ; preds = %118
  %150 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %151

151:                                              ; preds = %147, %149
  %.pn = phi { ptr, i32 } [ %150, %149 ], [ %148, %147 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  br label %152

152:                                              ; preds = %145, %151
  %.pn.pn = phi { ptr, i32 } [ %.pn, %151 ], [ %146, %145 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br label %153

153:                                              ; preds = %143, %152
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %152 ], [ %144, %143 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  br label %154

154:                                              ; preds = %141, %153
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %153 ], [ %142, %141 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %155

155:                                              ; preds = %154, %139
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %154 ], [ %140, %139 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  br label %156

156:                                              ; preds = %137, %155
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %155 ], [ %138, %137 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  br label %157

157:                                              ; preds = %135, %156
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %156 ], [ %136, %135 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  br label %158

158:                                              ; preds = %133, %157
  %.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn, %157 ], [ %134, %133 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(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 32, ptr nonnull %13) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  br label %159

159:                                              ; preds = %131, %158
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn, %158 ], [ %132, %131 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  br label %160

160:                                              ; preds = %129, %159
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn, %159 ], [ %130, %129 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %161

161:                                              ; preds = %127, %160
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %160 ], [ %128, %127 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %162

162:                                              ; preds = %125, %161
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %161 ], [ %126, %125 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  br label %163

163:                                              ; preds = %123, %162
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %162 ], [ %124, %123 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(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 32, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn

164:                                              ; preds = %68
  %165 = load ptr, ptr %37, align 8, !tbaa !26
  %166 = getelementptr inbounds %class.CornerApex, ptr %165, i64 %indvars.iv
  call void @_ZN10CornerApex12removeCornerEv(ptr noundef nonnull align 8 dereferenceable(144) %166)
  br label %167

167:                                              ; preds = %.critedge176, %164, %63
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %168 = load i32, ptr %34, align 8, !tbaa !18
  %169 = sext i32 %168 to i64
  %170 = icmp slt i64 %indvars.iv.next, %169
  br i1 %170, label %.lr.ph.split, label %._crit_edge, !llvm.loop !29

171:                                              ; preds = %._crit_edge
  store i8 1, ptr %27, align 1, !tbaa !16
  br label %172

172:                                              ; preds = %171, %._crit_edge
  %173 = sext i16 %56 to i32
  %174 = icmp eq i32 %.lcssa, %173
  %175 = getelementptr inbounds i8, ptr %0, i64 58
  %176 = zext i1 %174 to i8
  store i8 %176, ptr %175, align 2, !tbaa !39
  %177 = load ptr, ptr %22, align 8, !tbaa !5
  %178 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %177)
  %179 = getelementptr inbounds i8, ptr %0, i64 168
  %180 = load double, ptr %179, align 8, !tbaa !33
  %181 = call double @cos(double noundef %180) #7
  %182 = fmul double %181, 2.000000e+00
  %183 = fmul double %178, %182
  %184 = getelementptr inbounds i8, ptr %0, i64 40
  %185 = load double, ptr %184, align 8, !tbaa !37
  %186 = fdiv double %183, %185
  %187 = getelementptr inbounds i8, ptr %0, i64 96
  store double %186, ptr %187, align 8, !tbaa !40
  ret void
}

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

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

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

declare void @_ZN10CornerApex14initCornerApexEdddddb(ptr noundef nonnull align 8 dereferenceable(144), double noundef, double noundef, double noundef, double noundef, double noundef, i1 noundef zeroext) local_unnamed_addr #5

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

declare noundef zeroext i1 @_ZN9LayerApex12createOLayerEddddddb(ptr noundef nonnull align 8 dereferenceable(144), double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, i1 noundef zeroext) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10CornerApex12removeCornerEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #6 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 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress 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 #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, !10, i64 32}
!6 = !{!"_ZTS9ElemModel", !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !11, i64 56, !11, i64 57, !11, i64 58, !11, i64 59, !12, i64 60, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !13, i64 120, !13, i64 136}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!"_ZTSSt4pairIddE", !7, i64 0, !7, i64 8}
!14 = !{!6, !10, i64 48}
!15 = !{!6, !11, i64 56}
!16 = !{!6, !11, i64 57}
!17 = !{!6, !10, i64 24}
!18 = !{!19, !12, i64 184}
!19 = !{!"_ZTS7Polygon", !20, i64 0, !12, i64 184, !21, i64 192, !10, i64 216, !10, i64 224, !25, i64 232, !8, i64 234, !7, i64 240}
!20 = !{!"_ZTS8VoidElem", !6, i64 0, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176}
!21 = !{!"_ZTSSt6vectorIdSaIdEE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!25 = !{!"short", !8, i64 0}
!26 = !{!19, !10, i64 216}
!27 = !{!28, !12, i64 0}
!28 = !{!"_ZTSSt4pairIidE", !12, i64 0, !7, i64 8}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!19, !25, i64 232}
!32 = !{!20, !7, i64 176}
!33 = !{!20, !7, i64 168}
!34 = !{!7, !7, i64 0}
!35 = !{!19, !10, i64 224}
!36 = !{!19, !7, i64 240}
!37 = !{!6, !7, i64 40}
!38 = !{!12, !12, i64 0}
!39 = !{!6, !11, i64 58}
!40 = !{!6, !7, i64 96}


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