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

; 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.LayerApex = type { %class.Apex, i32, ptr, double, ptr, double }
%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.CornerApex = type { %class.Apex, ptr, double, double, double, ptr }

@.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
@.str.11 = external hidden unnamed_addr constant [85 x i8], align 1
@__FUNCTION__._ZN7Polygon33calcOilLayerPc_markUntrappedFilmsEd = external hidden unnamed_addr constant [34 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(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984)) #2 align 2

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

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

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

; 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

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

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

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

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

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

declare noundef double @_ZN7Polygon25Pc_pin_disconnectOilLayerEi(ptr noundef nonnull align 8 dereferenceable(248), i32 noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9LayerApex24markCentreLayerTrappingsERKSt4pairIidEdddddb(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef, double noundef, double noundef, double noundef, i1 noundef zeroext) #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10CornerApex18markTrappingCornerERKSt4pairIidEdddddb(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef, double noundef, double noundef, double noundef, i1 noundef zeroext) #6 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Polygon33calcOilLayerPc_markUntrappedFilmsEd(ptr noundef nonnull align 8 dereferenceable(248) %0, double noundef %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca double, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %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::__cxx11::basic_string", align 8
  %22 = alloca i1, align 1
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca i1, align 1
  %25 = alloca %"class.std::allocator.7", align 1
  %26 = alloca i1, align 1
  %27 = alloca i1, align 1
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca i1, align 1
  %31 = alloca i1, align 1
  %32 = alloca %"class.std::__cxx11::basic_string", align 8
  %33 = alloca i1, align 1
  %34 = alloca %"class.std::allocator.7", align 1
  %35 = alloca i1, align 1
  %36 = alloca i1, align 1
  %37 = alloca i1, align 1
  %38 = alloca i1, align 1
  %39 = alloca i1, align 1
  %40 = alloca %"class.std::__cxx11::basic_string", align 8
  %41 = alloca i1, align 1
  %42 = alloca %"class.std::allocator.7", align 1
  %43 = alloca i1, align 1
  %44 = alloca i1, align 1
  %45 = alloca i1, align 1
  %46 = alloca i1, align 1
  %47 = alloca i1, align 1
  %48 = alloca %"class.std::__cxx11::basic_string", align 8
  %49 = alloca i1, align 1
  %50 = alloca i32, align 4
  %51 = alloca i1, align 1
  %52 = alloca i1, align 1
  %53 = alloca %"class.std::__cxx11::basic_string", align 8
  %54 = alloca %"class.std::__cxx11::basic_string", align 8
  %55 = alloca i1, align 1
  %56 = alloca %"class.std::allocator.7", align 1
  %57 = alloca i1, align 1
  %58 = alloca i1, align 1
  %59 = alloca i1, align 1
  %60 = alloca %"class.std::__cxx11::basic_string", align 8
  %61 = alloca i1, align 1
  %62 = alloca %"class.std::allocator.7", align 1
  %63 = alloca i1, align 1
  %64 = alloca i1, align 1
  %65 = alloca i1, align 1
  %66 = alloca i1, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store double %1, ptr %4, align 8, !tbaa !9
  %67 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %68 = getelementptr inbounds %class.ElemModel, ptr %67, i32 0, i32 3
  %69 = load ptr, ptr %68, align 8, !tbaa !11
  %70 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem11trappingOilEv(ptr noundef nonnull align 8 dereferenceable(408) %69)
  store ptr %70, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %71 = getelementptr inbounds %class.ElemModel, ptr %67, i32 0, i32 3
  %72 = load ptr, ptr %71, align 8, !tbaa !11
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem15trappingWatBulkEv(ptr noundef nonnull align 8 dereferenceable(408) %72)
  store ptr %73, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %74 = getelementptr inbounds %class.ElemModel, ptr %67, i32 0, i32 3
  %75 = load ptr, ptr %74, align 8, !tbaa !11
  %76 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem15trappingWatFilmEv(ptr noundef nonnull align 8 dereferenceable(408) %75)
  store ptr %76, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  %77 = getelementptr inbounds %class.ElemModel, ptr %67, i32 0, i32 4
  %78 = load ptr, ptr %77, align 8, !tbaa !16
  %79 = call noundef ptr @_ZNK10CommonData9injectantEv(ptr noundef nonnull align 8 dereferenceable(1972) %78)
  %80 = getelementptr inbounds %class.ElemModel, ptr %67, i32 0, i32 4
  %81 = load ptr, ptr %80, align 8, !tbaa !16
  %82 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984) %81)
  %83 = icmp eq ptr %79, %82
  %84 = zext i1 %83 to i8
  store i8 %84, ptr %8, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %85 = getelementptr inbounds %class.ElemModel, ptr %67, i32 0, i32 4
  %86 = load ptr, ptr %85, align 8, !tbaa !16
  %87 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %86)
  store double %87, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !18
  br label %88

88:                                               ; preds = %504, %2
  %89 = load i32, ptr %10, align 4, !tbaa !18
  %90 = getelementptr inbounds %class.Polygon, ptr %67, i32 0, i32 1
  %91 = load i32, ptr %90, align 8, !tbaa !19
  %92 = icmp slt i32 %89, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %507

94:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %95 = getelementptr inbounds %class.Polygon, ptr %67, i32 0, i32 4
  %96 = load ptr, ptr %95, align 8, !tbaa !27
  %97 = load i32, ptr %10, align 4, !tbaa !18
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds %class.LayerApex, ptr %96, i64 %98
  %100 = call noundef double @_ZNK9LayerApex11layerCollPcEv(ptr noundef nonnull align 8 dereferenceable(144) %99)
  store double %100, ptr %11, align 8, !tbaa !9
  %101 = getelementptr inbounds %class.Polygon, ptr %67, i32 0, i32 3
  %102 = load ptr, ptr %101, align 8, !tbaa !28
  %103 = load i32, ptr %10, align 4, !tbaa !18
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds %class.CornerApex, ptr %102, i64 %104
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = load double, ptr %4, align 8, !tbaa !9
  %108 = getelementptr inbounds %class.VoidElem, ptr %67, i32 0, i32 4
  %109 = load double, ptr %108, align 8, !tbaa !29
  %110 = getelementptr inbounds %class.VoidElem, ptr %67, i32 0, i32 3
  %111 = load double, ptr %110, align 8, !tbaa !30
  %112 = getelementptr inbounds %class.Polygon, ptr %67, i32 0, i32 2
  %113 = load i32, ptr %10, align 4, !tbaa !18
  %114 = sext i32 %113 to i64
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %112, i64 noundef %114) #7
  %116 = load double, ptr %115, align 8, !tbaa !9
  %117 = load double, ptr %9, align 8, !tbaa !9
  %118 = load i8, ptr %8, align 1, !tbaa !17, !range !31, !noundef !32
  %119 = trunc i8 %118 to i1
  call void @_ZN10CornerApex18markTrappingCornerERKSt4pairIidEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %105, ptr noundef nonnull align 8 dereferenceable(16) %106, double noundef %107, double noundef %109, double noundef %111, double noundef %116, double noundef %117, i1 noundef zeroext %119)
  %120 = getelementptr inbounds %class.Polygon, ptr %67, i32 0, i32 4
  %121 = load ptr, ptr %120, align 8, !tbaa !27
  %122 = load i32, ptr %10, align 4, !tbaa !18
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds %class.LayerApex, ptr %121, i64 %123
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = load double, ptr %4, align 8, !tbaa !9
  %127 = getelementptr inbounds %class.VoidElem, ptr %67, i32 0, i32 4
  %128 = load double, ptr %127, align 8, !tbaa !29
  %129 = getelementptr inbounds %class.VoidElem, ptr %67, i32 0, i32 3
  %130 = load double, ptr %129, align 8, !tbaa !30
  %131 = getelementptr inbounds %class.Polygon, ptr %67, i32 0, i32 2
  %132 = load i32, ptr %10, align 4, !tbaa !18
  %133 = sext i32 %132 to i64
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef %133) #7
  %135 = load double, ptr %134, align 8, !tbaa !9
  %136 = getelementptr inbounds %class.ElemModel, ptr %67, i32 0, i32 4
  %137 = load ptr, ptr %136, align 8, !tbaa !16
  %138 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %137)
  %139 = load i8, ptr %8, align 1, !tbaa !17, !range !31, !noundef !32
  %140 = trunc i8 %139 to i1
  call void @_ZN9LayerApex24markCentreLayerTrappingsERKSt4pairIidEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %124, ptr noundef nonnull align 8 dereferenceable(16) %125, double noundef %126, double noundef %128, double noundef %130, double noundef %135, double noundef %138, i1 noundef zeroext %140)
  %141 = getelementptr inbounds %class.Polygon, ptr %67, i32 0, i32 3
  %142 = load ptr, ptr %141, align 8, !tbaa !28
  %143 = load i32, ptr %10, align 4, !tbaa !18
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds %class.CornerApex, ptr %142, i64 %144
  %146 = load double, ptr %4, align 8, !tbaa !9
  %147 = getelementptr inbounds %class.VoidElem, ptr %67, i32 0, i32 4
  %148 = load double, ptr %147, align 8, !tbaa !29
  %149 = getelementptr inbounds %class.VoidElem, ptr %67, i32 0, i32 3
  %150 = load double, ptr %149, align 8, !tbaa !30
  %151 = getelementptr inbounds %class.Polygon, ptr %67, i32 0, i32 2
  %152 = load i32, ptr %10, align 4, !tbaa !18
  %153 = sext i32 %152 to i64
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %151, i64 noundef %153) #7
  %155 = load double, ptr %154, align 8, !tbaa !9
  %156 = load double, ptr %9, align 8, !tbaa !9
  %157 = load i8, ptr %8, align 1, !tbaa !17, !range !31, !noundef !32
  %158 = trunc i8 %157 to i1
  call void @_ZN10CornerApex14initCornerApexEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %145, double noundef %146, double noundef %148, double noundef %150, double noundef %155, double noundef %156, i1 noundef zeroext %158)
  %159 = getelementptr inbounds %class.Polygon, ptr %67, i32 0, i32 4
  %160 = load ptr, ptr %159, align 8, !tbaa !27
  %161 = load i32, ptr %10, align 4, !tbaa !18
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds %class.LayerApex, ptr %160, i64 %162
  %164 = load double, ptr %4, align 8, !tbaa !9
  %165 = getelementptr inbounds %class.VoidElem, ptr %67, i32 0, i32 4
  %166 = load double, ptr %165, align 8, !tbaa !29
  %167 = getelementptr inbounds %class.VoidElem, ptr %67, i32 0, i32 3
  %168 = load double, ptr %167, align 8, !tbaa !30
  %169 = getelementptr inbounds %class.Polygon, ptr %67, i32 0, i32 2
  %170 = load i32, ptr %10, align 4, !tbaa !18
  %171 = sext i32 %170 to i64
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %169, i64 noundef %171) #7
  %173 = load double, ptr %172, align 8, !tbaa !9
  %174 = load double, ptr %9, align 8, !tbaa !9
  %175 = load i8, ptr %8, align 1, !tbaa !17, !range !31, !noundef !32
  %176 = trunc i8 %175 to i1
  %177 = call noundef zeroext i1 @_ZN9LayerApex13initLayerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %163, double noundef %164, double noundef %166, double noundef %168, double noundef %173, double noundef %174, i1 noundef zeroext %176, i1 noundef zeroext true)
  br i1 %177, label %181, label %178

178:                                              ; preds = %94
  %179 = load i32, ptr %10, align 4, !tbaa !18
  %180 = call noundef double @_ZN7Polygon25Pc_pin_disconnectOilLayerEi(ptr noundef nonnull align 8 dereferenceable(248) %67, i32 noundef %179)
  br label %503

181:                                              ; preds = %94
  %182 = getelementptr inbounds %class.Polygon, ptr %67, i32 0, i32 4
  %183 = load ptr, ptr %182, align 8, !tbaa !27
  %184 = load i32, ptr %10, align 4, !tbaa !18
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds %class.LayerApex, ptr %183, i64 %185
  %187 = call noundef zeroext i1 @_ZNK4Apex6existsEv(ptr noundef nonnull align 8 dereferenceable(104) %186)
  br i1 %187, label %188, label %502

188:                                              ; preds = %181
  %189 = getelementptr inbounds %class.Polygon, ptr %67, i32 0, i32 4
  %190 = load ptr, ptr %189, align 8, !tbaa !27
  %191 = load i32, ptr %10, align 4, !tbaa !18
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds %class.LayerApex, ptr %190, i64 %192
  %194 = call noundef double @_ZNK9LayerApex14pinnedApexDistEv(ptr noundef nonnull align 8 dereferenceable(144) %193)
  %195 = getelementptr inbounds %class.ElemModel, ptr %67, i32 0, i32 5
  %196 = load double, ptr %195, align 8, !tbaa !33
  %197 = getelementptr inbounds %class.Polygon, ptr %67, i32 0, i32 2
  %198 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %197, i64 noundef 0) #7
  %199 = load double, ptr %198, align 8, !tbaa !9
  %200 = call double @tan(double noundef %199) #7
  %201 = fdiv double 1.000000e+00, %200
  %202 = getelementptr inbounds %class.Polygon, ptr %67, i32 0, i32 2
  %203 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %202, i64 noundef 1) #7
  %204 = load double, ptr %203, align 8, !tbaa !9
  %205 = call double @tan(double noundef %204) #7
  %206 = fdiv double 1.000000e+00, %205
  %207 = fadd double %201, %206
  %208 = fmul double %196, %207
  %209 = fcmp olt double %194, %208
  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 %24, align 1
  store i1 false, ptr %26, align 1
  store i1 false, ptr %27, align 1
  store i1 false, ptr %30, align 1
  store i1 false, ptr %31, align 1
  store i1 false, ptr %33, align 1
  store i1 false, ptr %35, align 1
  store i1 false, ptr %36, align 1
  store i1 false, ptr %37, align 1
  store i1 false, ptr %38, align 1
  store i1 false, ptr %39, align 1
  store i1 false, ptr %41, align 1
  store i1 false, ptr %43, align 1
  store i1 false, ptr %44, align 1
  store i1 false, ptr %45, align 1
  store i1 false, ptr %46, align 1
  store i1 false, ptr %47, align 1
  store i1 false, ptr %49, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #7
  store i1 false, ptr %51, align 1
  store i1 false, ptr %52, align 1
  store i1 false, ptr %55, align 1
  store i1 false, ptr %57, align 1
  store i1 false, ptr %58, align 1
  store i1 false, ptr %59, align 1
  store i1 false, ptr %61, align 1
  store i1 false, ptr %63, align 1
  store i1 false, ptr %64, align 1
  store i1 false, ptr %65, align 1
  store i1 false, ptr %66, align 1
  br i1 %209, label %226, label %210

210:                                              ; preds = %188
  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 32, ptr %21) #7
  store i1 true, ptr %22, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #7
  store i1 true, ptr %24, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #7
  store i1 true, ptr %26, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #7
  store i1 true, ptr %27, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %211 unwind label %331

211:                                              ; preds = %210
  store i1 true, ptr %30, 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 %21, ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef @.str.1)
          to label %212 unwind label %335

212:                                              ; preds = %211
  store i1 true, ptr %31, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %32) #7
  store i1 true, ptr %33, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #7
  store i1 true, ptr %35, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #7
  store i1 true, ptr %36, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef @__FUNCTION__._ZN7Polygon33calcOilLayerPc_markUntrappedFilmsEd, ptr noundef nonnull align 1 dereferenceable(1) %34)
          to label %213 unwind label %339

213:                                              ; preds = %212
  store i1 true, ptr %37, 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 %19, ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %32)
          to label %214 unwind label %343

214:                                              ; preds = %213
  store i1 true, ptr %38, 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.2)
          to label %215 unwind label %347

215:                                              ; preds = %214
  store i1 true, ptr %39, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %40) #7
  store i1 true, ptr %41, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %42) #7
  store i1 true, ptr %43, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %42) #7
  store i1 true, ptr %44, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %42)
          to label %216 unwind label %351

216:                                              ; preds = %215
  store i1 true, ptr %45, 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) %40)
          to label %217 unwind label %355

217:                                              ; preds = %216
  store i1 true, ptr %46, 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.4)
          to label %218 unwind label %359

218:                                              ; preds = %217
  store i1 true, ptr %47, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %48) #7
  store i1 true, ptr %49, align 1
  store i32 498, ptr %50, align 4, !tbaa !18
  invoke void @_Z2_sIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %48, ptr noundef nonnull align 4 dereferenceable(4) %50)
          to label %219 unwind label %363

219:                                              ; preds = %218
  store i1 true, ptr %51, 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 %12, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %48)
          to label %220 unwind label %367

220:                                              ; preds = %219
  store i1 true, ptr %52, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %54) #7
  store i1 true, ptr %55, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %56) #7
  store i1 true, ptr %57, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %56) #7
  store i1 true, ptr %58, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %54, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %56)
          to label %221 unwind label %371

221:                                              ; preds = %220
  store i1 true, ptr %59, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %60) #7
  store i1 true, ptr %61, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %62) #7
  store i1 true, ptr %63, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %62) #7
  store i1 true, ptr %64, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %60, ptr noundef @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %62)
          to label %222 unwind label %375

222:                                              ; preds = %221
  store i1 true, ptr %65, 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 %53, ptr noundef nonnull align 8 dereferenceable(32) %54, ptr noundef nonnull align 8 dereferenceable(32) %60)
          to label %223 unwind label %379

223:                                              ; preds = %222
  store i1 true, ptr %66, align 1
  %224 = invoke noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef %12, ptr noundef %53, i32 noundef 0)
          to label %225 unwind label %383

225:                                              ; preds = %223
  br label %226

226:                                              ; preds = %225, %188
  %227 = phi i1 [ true, %188 ], [ %224, %225 ]
  %228 = xor i1 %227, true
  %229 = load i1, ptr %66, align 1
  br i1 %229, label %230, label %231

230:                                              ; preds = %226
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %53) #7
  br label %231

231:                                              ; preds = %230, %226
  %232 = load i1, ptr %65, align 1
  br i1 %232, label %233, label %234

233:                                              ; preds = %231
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %60) #7
  br label %234

234:                                              ; preds = %233, %231
  %235 = load i1, ptr %64, align 1
  br i1 %235, label %236, label %237

236:                                              ; preds = %234
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %62) #7
  br label %237

237:                                              ; preds = %236, %234
  %238 = load i1, ptr %63, align 1
  br i1 %238, label %239, label %240

239:                                              ; preds = %237
  call void @llvm.lifetime.end.p0(i64 1, ptr %62) #7
  br label %240

240:                                              ; preds = %239, %237
  %241 = load i1, ptr %61, align 1
  br i1 %241, label %242, label %243

242:                                              ; preds = %240
  call void @llvm.lifetime.end.p0(i64 32, ptr %60) #7
  br label %243

243:                                              ; preds = %242, %240
  %244 = load i1, ptr %59, align 1
  br i1 %244, label %245, label %246

245:                                              ; preds = %243
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %54) #7
  br label %246

246:                                              ; preds = %245, %243
  %247 = load i1, ptr %58, align 1
  br i1 %247, label %248, label %249

248:                                              ; preds = %246
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %56) #7
  br label %249

249:                                              ; preds = %248, %246
  %250 = load i1, ptr %57, align 1
  br i1 %250, label %251, label %252

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

252:                                              ; preds = %251, %249
  %253 = load i1, ptr %55, align 1
  br i1 %253, label %254, label %255

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

255:                                              ; preds = %254, %252
  %256 = load i1, ptr %52, align 1
  br i1 %256, label %257, label %258

257:                                              ; preds = %255
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  br label %258

258:                                              ; preds = %257, %255
  %259 = load i1, ptr %51, align 1
  br i1 %259, label %260, label %261

260:                                              ; preds = %258
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %48) #7
  br label %261

261:                                              ; preds = %260, %258
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #7
  %262 = load i1, ptr %49, align 1
  br i1 %262, label %263, label %264

263:                                              ; preds = %261
  call void @llvm.lifetime.end.p0(i64 32, ptr %48) #7
  br label %264

264:                                              ; preds = %263, %261
  %265 = load i1, ptr %47, align 1
  br i1 %265, label %266, label %267

266:                                              ; preds = %264
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  br label %267

267:                                              ; preds = %266, %264
  %268 = load i1, ptr %46, align 1
  br i1 %268, label %269, label %270

269:                                              ; preds = %267
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %270

270:                                              ; preds = %269, %267
  %271 = load i1, ptr %45, align 1
  br i1 %271, label %272, label %273

272:                                              ; preds = %270
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #7
  br label %273

273:                                              ; preds = %272, %270
  %274 = load i1, ptr %44, align 1
  br i1 %274, label %275, label %276

275:                                              ; preds = %273
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %42) #7
  br label %276

276:                                              ; preds = %275, %273
  %277 = load i1, ptr %43, align 1
  br i1 %277, label %278, label %279

278:                                              ; preds = %276
  call void @llvm.lifetime.end.p0(i64 1, ptr %42) #7
  br label %279

279:                                              ; preds = %278, %276
  %280 = load i1, ptr %41, align 1
  br i1 %280, label %281, label %282

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

282:                                              ; preds = %281, %279
  %283 = load i1, ptr %39, align 1
  br i1 %283, label %284, label %285

284:                                              ; preds = %282
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %285

285:                                              ; preds = %284, %282
  %286 = load i1, ptr %38, align 1
  br i1 %286, label %287, label %288

287:                                              ; preds = %285
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  br label %288

288:                                              ; preds = %287, %285
  %289 = load i1, ptr %37, align 1
  br i1 %289, label %290, label %291

290:                                              ; preds = %288
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #7
  br label %291

291:                                              ; preds = %290, %288
  %292 = load i1, ptr %36, align 1
  br i1 %292, label %293, label %294

293:                                              ; preds = %291
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #7
  br label %294

294:                                              ; preds = %293, %291
  %295 = load i1, ptr %35, align 1
  br i1 %295, label %296, label %297

296:                                              ; preds = %294
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #7
  br label %297

297:                                              ; preds = %296, %294
  %298 = load i1, ptr %33, align 1
  br i1 %298, label %299, label %300

299:                                              ; preds = %297
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #7
  br label %300

300:                                              ; preds = %299, %297
  %301 = load i1, ptr %31, align 1
  br i1 %301, label %302, label %303

302:                                              ; preds = %300
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  br label %303

303:                                              ; preds = %302, %300
  %304 = load i1, ptr %30, align 1
  br i1 %304, label %305, label %306

305:                                              ; preds = %303
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  br label %306

306:                                              ; preds = %305, %303
  %307 = load i1, ptr %27, align 1
  br i1 %307, label %308, label %309

308:                                              ; preds = %306
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #7
  br label %309

309:                                              ; preds = %308, %306
  %310 = load i1, ptr %26, align 1
  br i1 %310, label %311, label %312

311:                                              ; preds = %309
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #7
  br label %312

312:                                              ; preds = %311, %309
  %313 = load i1, ptr %24, align 1
  br i1 %313, label %314, label %315

314:                                              ; preds = %312
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  br label %315

315:                                              ; preds = %314, %312
  %316 = load i1, ptr %22, align 1
  br i1 %316, label %317, label %318

317:                                              ; preds = %315
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  br label %318

318:                                              ; preds = %317, %315
  %319 = load i1, ptr %20, align 1
  br i1 %319, label %320, label %321

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

321:                                              ; preds = %320, %318
  %322 = load i1, ptr %18, align 1
  br i1 %322, label %323, label %324

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

324:                                              ; preds = %323, %321
  %325 = load i1, ptr %16, align 1
  br i1 %325, label %326, label %327

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

327:                                              ; preds = %326, %324
  %328 = load i1, ptr %14, align 1
  br i1 %328, label %329, label %330

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

330:                                              ; preds = %329, %327
  br label %502

331:                                              ; preds = %210
  %332 = landingpad { ptr, i32 }
          cleanup
  %333 = extractvalue { ptr, i32 } %332, 0
  store ptr %333, ptr %28, align 8
  %334 = extractvalue { ptr, i32 } %332, 1
  store i32 %334, ptr %29, align 4
  br label %477

335:                                              ; preds = %211
  %336 = landingpad { ptr, i32 }
          cleanup
  %337 = extractvalue { ptr, i32 } %336, 0
  store ptr %337, ptr %28, align 8
  %338 = extractvalue { ptr, i32 } %336, 1
  store i32 %338, ptr %29, align 4
  br label %473

339:                                              ; preds = %212
  %340 = landingpad { ptr, i32 }
          cleanup
  %341 = extractvalue { ptr, i32 } %340, 0
  store ptr %341, ptr %28, align 8
  %342 = extractvalue { ptr, i32 } %340, 1
  store i32 %342, ptr %29, align 4
  br label %460

343:                                              ; preds = %213
  %344 = landingpad { ptr, i32 }
          cleanup
  %345 = extractvalue { ptr, i32 } %344, 0
  store ptr %345, ptr %28, align 8
  %346 = extractvalue { ptr, i32 } %344, 1
  store i32 %346, ptr %29, align 4
  br label %456

347:                                              ; preds = %214
  %348 = landingpad { ptr, i32 }
          cleanup
  %349 = extractvalue { ptr, i32 } %348, 0
  store ptr %349, ptr %28, align 8
  %350 = extractvalue { ptr, i32 } %348, 1
  store i32 %350, ptr %29, align 4
  br label %452

351:                                              ; preds = %215
  %352 = landingpad { ptr, i32 }
          cleanup
  %353 = extractvalue { ptr, i32 } %352, 0
  store ptr %353, ptr %28, align 8
  %354 = extractvalue { ptr, i32 } %352, 1
  store i32 %354, ptr %29, align 4
  br label %439

355:                                              ; preds = %216
  %356 = landingpad { ptr, i32 }
          cleanup
  %357 = extractvalue { ptr, i32 } %356, 0
  store ptr %357, ptr %28, align 8
  %358 = extractvalue { ptr, i32 } %356, 1
  store i32 %358, ptr %29, align 4
  br label %435

359:                                              ; preds = %217
  %360 = landingpad { ptr, i32 }
          cleanup
  %361 = extractvalue { ptr, i32 } %360, 0
  store ptr %361, ptr %28, align 8
  %362 = extractvalue { ptr, i32 } %360, 1
  store i32 %362, ptr %29, align 4
  br label %431

363:                                              ; preds = %218
  %364 = landingpad { ptr, i32 }
          cleanup
  %365 = extractvalue { ptr, i32 } %364, 0
  store ptr %365, ptr %28, align 8
  %366 = extractvalue { ptr, i32 } %364, 1
  store i32 %366, ptr %29, align 4
  br label %424

367:                                              ; preds = %219
  %368 = landingpad { ptr, i32 }
          cleanup
  %369 = extractvalue { ptr, i32 } %368, 0
  store ptr %369, ptr %28, align 8
  %370 = extractvalue { ptr, i32 } %368, 1
  store i32 %370, ptr %29, align 4
  br label %420

371:                                              ; preds = %220
  %372 = landingpad { ptr, i32 }
          cleanup
  %373 = extractvalue { ptr, i32 } %372, 0
  store ptr %373, ptr %28, align 8
  %374 = extractvalue { ptr, i32 } %372, 1
  store i32 %374, ptr %29, align 4
  br label %407

375:                                              ; preds = %221
  %376 = landingpad { ptr, i32 }
          cleanup
  %377 = extractvalue { ptr, i32 } %376, 0
  store ptr %377, ptr %28, align 8
  %378 = extractvalue { ptr, i32 } %376, 1
  store i32 %378, ptr %29, align 4
  br label %394

379:                                              ; preds = %222
  %380 = landingpad { ptr, i32 }
          cleanup
  %381 = extractvalue { ptr, i32 } %380, 0
  store ptr %381, ptr %28, align 8
  %382 = extractvalue { ptr, i32 } %380, 1
  store i32 %382, ptr %29, align 4
  br label %390

383:                                              ; preds = %223
  %384 = landingpad { ptr, i32 }
          cleanup
  %385 = extractvalue { ptr, i32 } %384, 0
  store ptr %385, ptr %28, align 8
  %386 = extractvalue { ptr, i32 } %384, 1
  store i32 %386, ptr %29, align 4
  %387 = load i1, ptr %66, align 1
  br i1 %387, label %388, label %389

388:                                              ; preds = %383
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %53) #7
  br label %389

389:                                              ; preds = %388, %383
  br label %390

390:                                              ; preds = %389, %379
  %391 = load i1, ptr %65, align 1
  br i1 %391, label %392, label %393

392:                                              ; preds = %390
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %60) #7
  br label %393

393:                                              ; preds = %392, %390
  br label %394

394:                                              ; preds = %393, %375
  %395 = load i1, ptr %64, align 1
  br i1 %395, label %396, label %397

396:                                              ; preds = %394
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %62) #7
  br label %397

397:                                              ; preds = %396, %394
  %398 = load i1, ptr %63, align 1
  br i1 %398, label %399, label %400

399:                                              ; preds = %397
  call void @llvm.lifetime.end.p0(i64 1, ptr %62) #7
  br label %400

400:                                              ; preds = %399, %397
  %401 = load i1, ptr %61, align 1
  br i1 %401, label %402, label %403

402:                                              ; preds = %400
  call void @llvm.lifetime.end.p0(i64 32, ptr %60) #7
  br label %403

403:                                              ; preds = %402, %400
  %404 = load i1, ptr %59, align 1
  br i1 %404, label %405, label %406

405:                                              ; preds = %403
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %54) #7
  br label %406

406:                                              ; preds = %405, %403
  br label %407

407:                                              ; preds = %406, %371
  %408 = load i1, ptr %58, align 1
  br i1 %408, label %409, label %410

409:                                              ; preds = %407
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %56) #7
  br label %410

410:                                              ; preds = %409, %407
  %411 = load i1, ptr %57, align 1
  br i1 %411, label %412, label %413

412:                                              ; preds = %410
  call void @llvm.lifetime.end.p0(i64 1, ptr %56) #7
  br label %413

413:                                              ; preds = %412, %410
  %414 = load i1, ptr %55, align 1
  br i1 %414, label %415, label %416

415:                                              ; preds = %413
  call void @llvm.lifetime.end.p0(i64 32, ptr %54) #7
  br label %416

416:                                              ; preds = %415, %413
  %417 = load i1, ptr %52, 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) %12) #7
  br label %419

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

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

422:                                              ; preds = %420
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %48) #7
  br label %423

423:                                              ; preds = %422, %420
  br label %424

424:                                              ; preds = %423, %363
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #7
  %425 = load i1, ptr %49, align 1
  br i1 %425, label %426, label %427

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

427:                                              ; preds = %426, %424
  %428 = load i1, ptr %47, align 1
  br i1 %428, label %429, label %430

429:                                              ; preds = %427
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  br label %430

430:                                              ; preds = %429, %427
  br label %431

431:                                              ; preds = %430, %359
  %432 = load i1, ptr %46, align 1
  br i1 %432, label %433, label %434

433:                                              ; preds = %431
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %434

434:                                              ; preds = %433, %431
  br label %435

435:                                              ; preds = %434, %355
  %436 = load i1, ptr %45, align 1
  br i1 %436, label %437, label %438

437:                                              ; preds = %435
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #7
  br label %438

438:                                              ; preds = %437, %435
  br label %439

439:                                              ; preds = %438, %351
  %440 = load i1, ptr %44, align 1
  br i1 %440, label %441, label %442

441:                                              ; preds = %439
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %42) #7
  br label %442

442:                                              ; preds = %441, %439
  %443 = load i1, ptr %43, align 1
  br i1 %443, label %444, label %445

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

445:                                              ; preds = %444, %442
  %446 = load i1, ptr %41, align 1
  br i1 %446, label %447, label %448

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

448:                                              ; preds = %447, %445
  %449 = load i1, ptr %39, align 1
  br i1 %449, label %450, label %451

450:                                              ; preds = %448
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %451

451:                                              ; preds = %450, %448
  br label %452

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

454:                                              ; preds = %452
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  br label %455

455:                                              ; preds = %454, %452
  br label %456

456:                                              ; preds = %455, %343
  %457 = load i1, ptr %37, align 1
  br i1 %457, label %458, label %459

458:                                              ; preds = %456
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #7
  br label %459

459:                                              ; preds = %458, %456
  br label %460

460:                                              ; preds = %459, %339
  %461 = load i1, ptr %36, align 1
  br i1 %461, label %462, label %463

462:                                              ; preds = %460
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #7
  br label %463

463:                                              ; preds = %462, %460
  %464 = load i1, ptr %35, align 1
  br i1 %464, label %465, label %466

465:                                              ; preds = %463
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #7
  br label %466

466:                                              ; preds = %465, %463
  %467 = load i1, ptr %33, align 1
  br i1 %467, label %468, label %469

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

469:                                              ; preds = %468, %466
  %470 = load i1, ptr %31, align 1
  br i1 %470, label %471, label %472

471:                                              ; preds = %469
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  br label %472

472:                                              ; preds = %471, %469
  br label %473

473:                                              ; preds = %472, %335
  %474 = load i1, ptr %30, align 1
  br i1 %474, label %475, label %476

475:                                              ; preds = %473
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  br label %476

476:                                              ; preds = %475, %473
  br label %477

477:                                              ; preds = %476, %331
  %478 = load i1, ptr %27, align 1
  br i1 %478, label %479, label %480

479:                                              ; preds = %477
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #7
  br label %480

480:                                              ; preds = %479, %477
  %481 = load i1, ptr %26, align 1
  br i1 %481, label %482, label %483

482:                                              ; preds = %480
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #7
  br label %483

483:                                              ; preds = %482, %480
  %484 = load i1, ptr %24, align 1
  br i1 %484, label %485, label %486

485:                                              ; preds = %483
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  br label %486

486:                                              ; preds = %485, %483
  %487 = load i1, ptr %22, align 1
  br i1 %487, label %488, label %489

488:                                              ; preds = %486
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  br label %489

489:                                              ; preds = %488, %486
  %490 = load i1, ptr %20, align 1
  br i1 %490, label %491, label %492

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

492:                                              ; preds = %491, %489
  %493 = load i1, ptr %18, align 1
  br i1 %493, label %494, label %495

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

495:                                              ; preds = %494, %492
  %496 = load i1, ptr %16, align 1
  br i1 %496, label %497, label %498

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

498:                                              ; preds = %497, %495
  %499 = load i1, ptr %14, align 1
  br i1 %499, label %500, label %501

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

501:                                              ; preds = %500, %498
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %508

502:                                              ; preds = %330, %181
  br label %503

503:                                              ; preds = %502, %178
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %504

504:                                              ; preds = %503
  %505 = load i32, ptr %10, align 4, !tbaa !18
  %506 = add nsw i32 %505, 1
  store i32 %506, ptr %10, align 4, !tbaa !18
  br label %88, !llvm.loop !34

507:                                              ; preds = %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  ret void

508:                                              ; preds = %501
  %509 = load ptr, ptr %28, align 8
  %510 = load i32, ptr %29, align 4
  %511 = insertvalue { ptr, i32 } poison, ptr %509, 0
  %512 = insertvalue { ptr, i32 } %511, i32 %510, 1
  resume { ptr, i32 } %512
}

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 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 24}
!12 = !{!"_ZTS9ElemModel", !10, i64 8, !10, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !6, i64 48, !13, i64 56, !13, i64 57, !13, i64 58, !13, i64 59, !14, i64 60, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !15, i64 120, !15, i64 136}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSSt4pairIddE", !10, i64 0, !10, i64 8}
!16 = !{!12, !6, i64 32}
!17 = !{!13, !13, i64 0}
!18 = !{!14, !14, i64 0}
!19 = !{!20, !14, i64 184}
!20 = !{!"_ZTS7Polygon", !21, i64 0, !14, i64 184, !22, i64 192, !6, i64 216, !6, i64 224, !26, i64 232, !7, i64 234, !10, i64 240}
!21 = !{!"_ZTS8VoidElem", !12, i64 0, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176}
!22 = !{!"_ZTSSt6vectorIdSaIdEE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"short", !7, i64 0}
!27 = !{!20, !6, i64 224}
!28 = !{!20, !6, i64 216}
!29 = !{!21, !10, i64 176}
!30 = !{!21, !10, i64 168}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!12, !10, i64 40}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}


; 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.LayerApex = type { %class.Apex, i32, ptr, double, ptr, double }
%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.CornerApex = type { %class.Apex, ptr, double, double, double, ptr }

@.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
@.str.11 = external hidden unnamed_addr constant [85 x i8], align 1
@__FUNCTION__._ZN7Polygon33calcOilLayerPc_markUntrappedFilmsEd = external hidden unnamed_addr constant [34 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(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4Apex6existsEv(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(16) ptr @_ZNK4Elem15trappingWatBulkEv(ptr noundef nonnull align 8 dereferenceable(408)) local_unnamed_addr #2 align 2

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

; 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

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

; 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem11trappingOilEv(ptr noundef nonnull align 8 dereferenceable(408)) local_unnamed_addr #2 align 2

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

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

declare noundef double @_ZN7Polygon25Pc_pin_disconnectOilLayerEi(ptr noundef nonnull align 8 dereferenceable(248), i32 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9LayerApex24markCentreLayerTrappingsERKSt4pairIidEdddddb(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef, double noundef, double noundef, double noundef, i1 noundef zeroext) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10CornerApex18markTrappingCornerERKSt4pairIidEdddddb(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef, double noundef, double noundef, double noundef, i1 noundef zeroext) local_unnamed_addr #6 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Polygon33calcOilLayerPc_markUntrappedFilmsEd(ptr noundef nonnull align 8 dereferenceable(248) %0, double noundef %1) local_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 24
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  %24 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem11trappingOilEv(ptr noundef nonnull align 8 dereferenceable(408) %23)
  %25 = load ptr, ptr %22, align 8, !tbaa !5
  %26 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem15trappingWatBulkEv(ptr noundef nonnull align 8 dereferenceable(408) %25)
  %27 = load ptr, ptr %22, align 8, !tbaa !5
  %28 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem15trappingWatFilmEv(ptr noundef nonnull align 8 dereferenceable(408) %27)
  %29 = getelementptr inbounds i8, ptr %0, i64 32
  %30 = load ptr, ptr %29, align 8, !tbaa !14
  %31 = tail call noundef ptr @_ZNK10CommonData9injectantEv(ptr noundef nonnull align 8 dereferenceable(1972) %30)
  %32 = load ptr, ptr %29, align 8, !tbaa !14
  %33 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984) %32)
  %34 = icmp eq ptr %31, %33
  %35 = load ptr, ptr %29, align 8, !tbaa !14
  %36 = tail call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %35)
  %37 = getelementptr inbounds i8, ptr %0, i64 184
  %38 = load i32, ptr %37, align 8, !tbaa !15
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %40 = getelementptr inbounds i8, ptr %0, i64 224
  %41 = getelementptr inbounds i8, ptr %0, i64 216
  %42 = getelementptr inbounds i8, ptr %0, i64 176
  %43 = getelementptr inbounds i8, ptr %0, i64 168
  %44 = getelementptr inbounds i8, ptr %0, i64 192
  %45 = getelementptr inbounds i8, ptr %0, i64 40
  br label %46

._crit_edge:                                      ; preds = %.critedge191, %2
  ret void

46:                                               ; preds = %.lr.ph, %.critedge191
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %.critedge191 ]
  %47 = load ptr, ptr %40, align 8, !tbaa !23
  %48 = getelementptr inbounds %class.LayerApex, ptr %47, i64 %indvars.iv
  %49 = call noundef double @_ZNK9LayerApex11layerCollPcEv(ptr noundef nonnull align 8 dereferenceable(144) %48)
  %50 = load ptr, ptr %41, align 8, !tbaa !24
  %51 = getelementptr inbounds %class.CornerApex, ptr %50, i64 %indvars.iv
  %52 = load double, ptr %42, align 8, !tbaa !25
  %53 = load double, ptr %43, align 8, !tbaa !26
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %indvars.iv) #7
  %55 = load double, ptr %54, align 8, !tbaa !27
  call void @_ZN10CornerApex18markTrappingCornerERKSt4pairIidEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %51, ptr noundef nonnull align 8 dereferenceable(16) %28, double noundef %1, double noundef %52, double noundef %53, double noundef %55, double noundef %36, i1 noundef zeroext %34)
  %56 = load ptr, ptr %40, align 8, !tbaa !23
  %57 = getelementptr inbounds %class.LayerApex, ptr %56, i64 %indvars.iv
  %58 = load double, ptr %42, align 8, !tbaa !25
  %59 = load double, ptr %43, align 8, !tbaa !26
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %indvars.iv) #7
  %61 = load double, ptr %60, align 8, !tbaa !27
  %62 = load ptr, ptr %29, align 8, !tbaa !14
  %63 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %62)
  call void @_ZN9LayerApex24markCentreLayerTrappingsERKSt4pairIidEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %57, ptr noundef nonnull align 8 dereferenceable(16) %24, double noundef %1, double noundef %58, double noundef %59, double noundef %61, double noundef %63, i1 noundef zeroext %34)
  %64 = load ptr, ptr %41, align 8, !tbaa !24
  %65 = getelementptr inbounds %class.CornerApex, ptr %64, i64 %indvars.iv
  %66 = load double, ptr %42, align 8, !tbaa !25
  %67 = load double, ptr %43, align 8, !tbaa !26
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %indvars.iv) #7
  %69 = load double, ptr %68, align 8, !tbaa !27
  call void @_ZN10CornerApex14initCornerApexEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %65, double noundef %1, double noundef %66, double noundef %67, double noundef %69, double noundef %36, i1 noundef zeroext %34)
  %70 = load ptr, ptr %40, align 8, !tbaa !23
  %71 = getelementptr inbounds %class.LayerApex, ptr %70, i64 %indvars.iv
  %72 = load double, ptr %42, align 8, !tbaa !25
  %73 = load double, ptr %43, align 8, !tbaa !26
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %indvars.iv) #7
  %75 = load double, ptr %74, align 8, !tbaa !27
  %76 = call noundef zeroext i1 @_ZN9LayerApex13initLayerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %71, double noundef %1, double noundef %72, double noundef %73, double noundef %75, double noundef %36, i1 noundef zeroext %34, i1 noundef zeroext true)
  br i1 %76, label %80, label %77

77:                                               ; preds = %46
  %78 = trunc nuw nsw i64 %indvars.iv to i32
  %79 = call noundef double @_ZN7Polygon25Pc_pin_disconnectOilLayerEi(ptr noundef nonnull align 8 dereferenceable(248) %0, i32 noundef %78)
  br label %.critedge191

80:                                               ; preds = %46
  %81 = load ptr, ptr %40, align 8, !tbaa !23
  %82 = getelementptr inbounds %class.LayerApex, ptr %81, i64 %indvars.iv
  %83 = call noundef zeroext i1 @_ZNK4Apex6existsEv(ptr noundef nonnull align 8 dereferenceable(104) %82)
  br i1 %83, label %84, label %.critedge191

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

102:                                              ; preds = %84
  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 %103 unwind label %118

103:                                              ; preds = %102
  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 %104 unwind label %120

104:                                              ; preds = %103
  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__._ZN7Polygon33calcOilLayerPc_markUntrappedFilmsEd, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %105 unwind label %122

105:                                              ; preds = %104
  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 %106 unwind label %124

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 %6, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.2)
          to label %107 unwind label %126

107:                                              ; preds = %106
  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 %108 unwind label %128

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 %5, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %109 unwind label %130

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 %4, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.4)
          to label %110 unwind label %132

110:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #7
  store i32 498, ptr %16, align 4, !tbaa !29
  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 %111 unwind label %134

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 %3, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %112 unwind label %136

112:                                              ; preds = %111
  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 %113 unwind label %138

113:                                              ; preds = %112
  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 %114 unwind label %140

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 %17, ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %115 unwind label %142

115:                                              ; preds = %114
  %116 = invoke noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef nonnull %3, ptr noundef nonnull %17, i32 noundef 0)
          to label %.critedge170 unwind label %144

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

.critedge170:                                     ; preds = %115
  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 %.critedge191

118:                                              ; preds = %102
  %119 = landingpad { ptr, i32 }
          cleanup
  br label %158

120:                                              ; preds = %103
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %157

122:                                              ; preds = %104
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %156

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

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

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

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

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

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

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

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

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

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

144:                                              ; preds = %115
  %145 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %146

146:                                              ; preds = %142, %144
  %.pn = phi { ptr, i32 } [ %145, %144 ], [ %143, %142 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  br label %147

147:                                              ; preds = %140, %146
  %.pn.pn = phi { ptr, i32 } [ %.pn, %146 ], [ %141, %140 ]
  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 %148

148:                                              ; preds = %138, %147
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %147 ], [ %139, %138 ]
  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 %149

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

150:                                              ; preds = %149, %134
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %149 ], [ %135, %134 ]
  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 %151

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

152:                                              ; preds = %130, %151
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %151 ], [ %131, %130 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  br label %153

153:                                              ; preds = %128, %152
  %.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn, %152 ], [ %129, %128 ]
  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 %154

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

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

156:                                              ; preds = %122, %155
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %155 ], [ %123, %122 ]
  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 %157

157:                                              ; preds = %120, %156
  %.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, %156 ], [ %121, %120 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  br label %158

158:                                              ; preds = %118, %157
  %.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, %157 ], [ %119, %118 ]
  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

.critedge191:                                     ; preds = %117, %80, %.critedge170, %77
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %159 = load i32, ptr %37, align 8, !tbaa !15
  %160 = sext i32 %159 to i64
  %161 = icmp slt i64 %indvars.iv.next, %160
  br i1 %161, label %46, label %._crit_edge, !llvm.loop !30
}

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 24}
!6 = !{!"_ZTS9ElemModel", !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !11, i64 56, !11, i64 57, !11, i64 58, !11, i64 59, !12, i64 60, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !13, i64 120, !13, i64 136}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!"_ZTSSt4pairIddE", !7, i64 0, !7, i64 8}
!14 = !{!6, !10, i64 32}
!15 = !{!16, !12, i64 184}
!16 = !{!"_ZTS7Polygon", !17, i64 0, !12, i64 184, !18, i64 192, !10, i64 216, !10, i64 224, !22, i64 232, !8, i64 234, !7, i64 240}
!17 = !{!"_ZTS8VoidElem", !6, i64 0, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176}
!18 = !{!"_ZTSSt6vectorIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!22 = !{!"short", !8, i64 0}
!23 = !{!16, !10, i64 224}
!24 = !{!16, !10, i64 216}
!25 = !{!17, !7, i64 176}
!26 = !{!17, !7, i64 168}
!27 = !{!7, !7, i64 0}
!28 = !{!6, !7, i64 40}
!29 = !{!12, !12, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


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