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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::__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 }
%"struct.std::pair.0" = type { i32, 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" }
%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
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.11 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [29 x i8], align 1
@__FUNCTION__._ZN7Polygon28calcOilLayerPc_syncTrappingsEd = external hidden unnamed_addr constant [29 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [14 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 double @_ZNK4Apex7entryPcEv(ptr noundef nonnull align 8 dereferenceable(104)) #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 @_ZNK9LayerApex13trappedOLayerEv(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 @_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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local 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 uwtable
define dso_local void @_ZN7Polygon28calcOilLayerPc_syncTrappingsEd(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
  %67 = alloca i32, align 4
  %68 = alloca i32, align 4
  %69 = alloca %"class.std::__cxx11::basic_string", align 8
  %70 = alloca %"class.std::__cxx11::basic_string", align 8
  %71 = alloca i1, align 1
  %72 = alloca %"class.std::__cxx11::basic_string", align 8
  %73 = alloca i1, align 1
  %74 = alloca %"class.std::__cxx11::basic_string", align 8
  %75 = alloca i1, align 1
  %76 = alloca %"class.std::__cxx11::basic_string", align 8
  %77 = alloca i1, align 1
  %78 = alloca %"class.std::__cxx11::basic_string", align 8
  %79 = alloca i1, align 1
  %80 = alloca %"class.std::__cxx11::basic_string", align 8
  %81 = alloca i1, align 1
  %82 = alloca %"class.std::allocator.7", align 1
  %83 = alloca i1, align 1
  %84 = alloca i1, align 1
  %85 = alloca i1, align 1
  %86 = alloca i1, align 1
  %87 = alloca %"class.std::__cxx11::basic_string", align 8
  %88 = alloca i1, align 1
  %89 = alloca %"class.std::allocator.7", align 1
  %90 = alloca i1, align 1
  %91 = alloca i1, align 1
  %92 = alloca i1, align 1
  %93 = alloca i1, align 1
  %94 = alloca i1, align 1
  %95 = alloca %"class.std::__cxx11::basic_string", align 8
  %96 = alloca i1, align 1
  %97 = alloca %"class.std::allocator.7", align 1
  %98 = alloca i1, align 1
  %99 = alloca i1, align 1
  %100 = alloca i1, align 1
  %101 = alloca i1, align 1
  %102 = alloca i1, align 1
  %103 = alloca %"class.std::__cxx11::basic_string", align 8
  %104 = alloca i1, align 1
  %105 = alloca i32, align 4
  %106 = alloca i1, align 1
  %107 = alloca i1, align 1
  %108 = alloca %"class.std::__cxx11::basic_string", align 8
  %109 = alloca %"class.std::__cxx11::basic_string", align 8
  %110 = alloca i1, align 1
  %111 = alloca %"class.std::allocator.7", align 1
  %112 = alloca i1, align 1
  %113 = alloca i1, align 1
  %114 = alloca i1, align 1
  %115 = alloca %"class.std::__cxx11::basic_string", align 8
  %116 = alloca i1, align 1
  %117 = alloca %"class.std::allocator.7", align 1
  %118 = alloca i1, align 1
  %119 = alloca i1, align 1
  %120 = alloca i1, align 1
  %121 = alloca i1, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store double %1, ptr %4, align 8, !tbaa !9
  %122 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %123 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 3
  %124 = load ptr, ptr %123, align 8, !tbaa !11
  %125 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem11trappingOilEv(ptr noundef nonnull align 8 dereferenceable(408) %124)
  store ptr %125, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %126 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 3
  %127 = load ptr, ptr %126, align 8, !tbaa !11
  %128 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem15trappingWatBulkEv(ptr noundef nonnull align 8 dereferenceable(408) %127)
  store ptr %128, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %129 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 3
  %130 = load ptr, ptr %129, align 8, !tbaa !11
  %131 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem15trappingWatFilmEv(ptr noundef nonnull align 8 dereferenceable(408) %130)
  store ptr %131, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  %132 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 4
  %133 = load ptr, ptr %132, align 8, !tbaa !16
  %134 = call noundef ptr @_ZNK10CommonData9injectantEv(ptr noundef nonnull align 8 dereferenceable(1972) %133)
  %135 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 4
  %136 = load ptr, ptr %135, align 8, !tbaa !16
  %137 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984) %136)
  %138 = icmp eq ptr %134, %137
  %139 = zext i1 %138 to i8
  store i8 %139, ptr %8, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %140 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 4
  %141 = load ptr, ptr %140, align 8, !tbaa !16
  %142 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %141)
  store double %142, ptr %9, align 8, !tbaa !9
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.std::pair.0", ptr %143, i32 0, i32 0
  %145 = load i32, ptr %144, align 8, !tbaa !18
  %146 = icmp sgt i32 %145, -1
  br i1 %146, label %147, label %584

147:                                              ; preds = %2
  %148 = load ptr, ptr %122, align 8, !tbaa !20
  %149 = getelementptr inbounds ptr, ptr %148, i64 19
  %150 = load ptr, ptr %149, align 8
  %151 = call noundef zeroext i1 %150(ptr noundef nonnull align 8 dereferenceable(152) %122)
  br i1 %151, label %152, label %159

152:                                              ; preds = %147
  %153 = load ptr, ptr %6, align 8, !tbaa !5
  %154 = getelementptr inbounds %"struct.std::pair.0", ptr %153, i32 0, i32 0
  %155 = load i32, ptr %154, align 8, !tbaa !18
  %156 = icmp sgt i32 %155, 0
  br i1 %156, label %157, label %159

157:                                              ; preds = %152
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.16)
  br label %159

159:                                              ; preds = %157, %152, %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !22
  br label %160

160:                                              ; preds = %577, %159
  %161 = load i32, ptr %10, align 4, !tbaa !22
  %162 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 1
  %163 = load i32, ptr %162, align 8, !tbaa !23
  %164 = icmp slt i32 %161, %163
  br i1 %164, label %166, label %165

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

166:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %167 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 4
  %168 = load ptr, ptr %167, align 8, !tbaa !31
  %169 = load i32, ptr %10, align 4, !tbaa !22
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds %class.LayerApex, ptr %168, i64 %170
  %172 = call noundef double @_ZNK9LayerApex11layerCollPcEv(ptr noundef nonnull align 8 dereferenceable(144) %171)
  store double %172, ptr %11, align 8, !tbaa !9
  %173 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 3
  %174 = load ptr, ptr %173, align 8, !tbaa !32
  %175 = load i32, ptr %10, align 4, !tbaa !22
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds %class.CornerApex, ptr %174, i64 %176
  %178 = load double, ptr %4, align 8, !tbaa !9
  %179 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 4
  %180 = load double, ptr %179, align 8, !tbaa !33
  %181 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 3
  %182 = load double, ptr %181, align 8, !tbaa !34
  %183 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %184 = load i32, ptr %10, align 4, !tbaa !22
  %185 = sext i32 %184 to i64
  %186 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %183, i64 noundef %185) #7
  %187 = load double, ptr %186, align 8, !tbaa !9
  %188 = load double, ptr %9, align 8, !tbaa !9
  %189 = load i8, ptr %8, align 1, !tbaa !17, !range !35, !noundef !36
  %190 = trunc i8 %189 to i1
  call void @_ZN10CornerApex15finitCornerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %177, double noundef %178, double noundef %180, double noundef %182, double noundef %187, double noundef %188, i1 noundef zeroext %190, i1 noundef zeroext true)
  %191 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 4
  %192 = load ptr, ptr %191, align 8, !tbaa !31
  %193 = load i32, ptr %10, align 4, !tbaa !22
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds %class.LayerApex, ptr %192, i64 %194
  %196 = load ptr, ptr %5, align 8, !tbaa !5
  %197 = getelementptr inbounds %"struct.std::pair.0", ptr %196, i32 0, i32 1
  %198 = load double, ptr %197, align 8, !tbaa !37
  %199 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 4
  %200 = load double, ptr %199, align 8, !tbaa !33
  %201 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 3
  %202 = load double, ptr %201, align 8, !tbaa !34
  %203 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %204 = load i32, ptr %10, align 4, !tbaa !22
  %205 = sext i32 %204 to i64
  %206 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %203, i64 noundef %205) #7
  %207 = load double, ptr %206, align 8, !tbaa !9
  %208 = load double, ptr %9, align 8, !tbaa !9
  %209 = load i8, ptr %8, align 1, !tbaa !17, !range !35, !noundef !36
  %210 = trunc i8 %209 to i1
  %211 = call noundef zeroext i1 @_ZN9LayerApex14finitLayerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %195, double noundef %198, double noundef %200, double noundef %202, double noundef %207, double noundef %208, i1 noundef zeroext %210, i1 noundef zeroext true)
  br i1 %211, label %215, label %212

212:                                              ; preds = %166
  %213 = load i32, ptr %10, align 4, !tbaa !22
  %214 = call noundef double @_ZN7Polygon25Pc_pin_disconnectOilLayerEi(ptr noundef nonnull align 8 dereferenceable(248) %122, i32 noundef %213)
  br label %537

215:                                              ; preds = %166
  %216 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 4
  %217 = load ptr, ptr %216, align 8, !tbaa !31
  %218 = load i32, ptr %10, align 4, !tbaa !22
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds %class.LayerApex, ptr %217, i64 %219
  %221 = call noundef zeroext i1 @_ZNK4Apex6existsEv(ptr noundef nonnull align 8 dereferenceable(104) %220)
  br i1 %221, label %222, label %536

222:                                              ; preds = %215
  %223 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 4
  %224 = load ptr, ptr %223, align 8, !tbaa !31
  %225 = load i32, ptr %10, align 4, !tbaa !22
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds %class.LayerApex, ptr %224, i64 %226
  %228 = call noundef double @_ZNK9LayerApex14pinnedApexDistEv(ptr noundef nonnull align 8 dereferenceable(144) %227)
  %229 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 5
  %230 = load double, ptr %229, align 8, !tbaa !38
  %231 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %232 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %231, i64 noundef 0) #7
  %233 = load double, ptr %232, align 8, !tbaa !9
  %234 = call double @tan(double noundef %233) #7
  %235 = fdiv double 1.000000e+00, %234
  %236 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %237 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %236, i64 noundef 1) #7
  %238 = load double, ptr %237, align 8, !tbaa !9
  %239 = call double @tan(double noundef %238) #7
  %240 = fdiv double 1.000000e+00, %239
  %241 = fadd double %235, %240
  %242 = fmul double %230, %241
  %243 = fcmp olt double %228, %242
  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 %243, label %260, label %244

244:                                              ; preds = %222
  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 %245 unwind label %365

245:                                              ; preds = %244
  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 %246 unwind label %369

246:                                              ; preds = %245
  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__._ZN7Polygon28calcOilLayerPc_syncTrappingsEd, ptr noundef nonnull align 1 dereferenceable(1) %34)
          to label %247 unwind label %373

247:                                              ; preds = %246
  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 %248 unwind label %377

248:                                              ; preds = %247
  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 %249 unwind label %381

249:                                              ; preds = %248
  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 %250 unwind label %385

250:                                              ; preds = %249
  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 %251 unwind label %389

251:                                              ; preds = %250
  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 %252 unwind label %393

252:                                              ; preds = %251
  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 362, ptr %50, align 4, !tbaa !22
  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 %253 unwind label %397

253:                                              ; preds = %252
  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 %254 unwind label %401

254:                                              ; preds = %253
  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 %255 unwind label %405

255:                                              ; preds = %254
  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 %256 unwind label %409

256:                                              ; preds = %255
  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 %257 unwind label %413

257:                                              ; preds = %256
  store i1 true, ptr %66, align 1
  %258 = invoke noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef %12, ptr noundef %53, i32 noundef 0)
          to label %259 unwind label %417

259:                                              ; preds = %257
  br label %260

260:                                              ; preds = %259, %222
  %261 = phi i1 [ true, %222 ], [ %258, %259 ]
  %262 = xor i1 %261, true
  %263 = load i1, ptr %66, align 1
  br i1 %263, label %264, label %265

264:                                              ; preds = %260
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %53) #7
  br label %265

265:                                              ; preds = %264, %260
  %266 = load i1, ptr %65, align 1
  br i1 %266, label %267, label %268

267:                                              ; preds = %265
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %60) #7
  br label %268

268:                                              ; preds = %267, %265
  %269 = load i1, ptr %64, align 1
  br i1 %269, label %270, label %271

270:                                              ; preds = %268
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %62) #7
  br label %271

271:                                              ; preds = %270, %268
  %272 = load i1, ptr %63, align 1
  br i1 %272, label %273, label %274

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

274:                                              ; preds = %273, %271
  %275 = load i1, ptr %61, align 1
  br i1 %275, label %276, label %277

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

277:                                              ; preds = %276, %274
  %278 = load i1, ptr %59, align 1
  br i1 %278, label %279, label %280

279:                                              ; preds = %277
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %54) #7
  br label %280

280:                                              ; preds = %279, %277
  %281 = load i1, ptr %58, align 1
  br i1 %281, label %282, label %283

282:                                              ; preds = %280
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %56) #7
  br label %283

283:                                              ; preds = %282, %280
  %284 = load i1, ptr %57, align 1
  br i1 %284, label %285, label %286

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

286:                                              ; preds = %285, %283
  %287 = load i1, ptr %55, align 1
  br i1 %287, label %288, label %289

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

289:                                              ; preds = %288, %286
  %290 = load i1, ptr %52, align 1
  br i1 %290, label %291, label %292

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

292:                                              ; preds = %291, %289
  %293 = load i1, ptr %51, align 1
  br i1 %293, label %294, label %295

294:                                              ; preds = %292
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %48) #7
  br label %295

295:                                              ; preds = %294, %292
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #7
  %296 = load i1, ptr %49, align 1
  br i1 %296, label %297, label %298

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

298:                                              ; preds = %297, %295
  %299 = load i1, ptr %47, align 1
  br i1 %299, label %300, label %301

300:                                              ; preds = %298
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  br label %301

301:                                              ; preds = %300, %298
  %302 = load i1, ptr %46, align 1
  br i1 %302, label %303, label %304

303:                                              ; preds = %301
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %304

304:                                              ; preds = %303, %301
  %305 = load i1, ptr %45, align 1
  br i1 %305, label %306, label %307

306:                                              ; preds = %304
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #7
  br label %307

307:                                              ; preds = %306, %304
  %308 = load i1, ptr %44, align 1
  br i1 %308, label %309, label %310

309:                                              ; preds = %307
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %42) #7
  br label %310

310:                                              ; preds = %309, %307
  %311 = load i1, ptr %43, align 1
  br i1 %311, label %312, label %313

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

313:                                              ; preds = %312, %310
  %314 = load i1, ptr %41, align 1
  br i1 %314, label %315, label %316

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

316:                                              ; preds = %315, %313
  %317 = load i1, ptr %39, align 1
  br i1 %317, label %318, label %319

318:                                              ; preds = %316
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %319

319:                                              ; preds = %318, %316
  %320 = load i1, ptr %38, align 1
  br i1 %320, label %321, label %322

321:                                              ; preds = %319
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  br label %322

322:                                              ; preds = %321, %319
  %323 = load i1, ptr %37, align 1
  br i1 %323, label %324, label %325

324:                                              ; preds = %322
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #7
  br label %325

325:                                              ; preds = %324, %322
  %326 = load i1, ptr %36, align 1
  br i1 %326, label %327, label %328

327:                                              ; preds = %325
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #7
  br label %328

328:                                              ; preds = %327, %325
  %329 = load i1, ptr %35, align 1
  br i1 %329, label %330, label %331

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

331:                                              ; preds = %330, %328
  %332 = load i1, ptr %33, align 1
  br i1 %332, label %333, label %334

333:                                              ; preds = %331
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #7
  br label %334

334:                                              ; preds = %333, %331
  %335 = load i1, ptr %31, align 1
  br i1 %335, label %336, label %337

336:                                              ; preds = %334
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  br label %337

337:                                              ; preds = %336, %334
  %338 = load i1, ptr %30, align 1
  br i1 %338, label %339, label %340

339:                                              ; preds = %337
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  br label %340

340:                                              ; preds = %339, %337
  %341 = load i1, ptr %27, align 1
  br i1 %341, label %342, label %343

342:                                              ; preds = %340
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #7
  br label %343

343:                                              ; preds = %342, %340
  %344 = load i1, ptr %26, align 1
  br i1 %344, label %345, label %346

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

346:                                              ; preds = %345, %343
  %347 = load i1, ptr %24, align 1
  br i1 %347, label %348, label %349

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

349:                                              ; preds = %348, %346
  %350 = load i1, ptr %22, align 1
  br i1 %350, label %351, label %352

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

352:                                              ; preds = %351, %349
  %353 = load i1, ptr %20, align 1
  br i1 %353, label %354, label %355

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

355:                                              ; preds = %354, %352
  %356 = load i1, ptr %18, align 1
  br i1 %356, label %357, label %358

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

358:                                              ; preds = %357, %355
  %359 = load i1, ptr %16, align 1
  br i1 %359, label %360, label %361

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

361:                                              ; preds = %360, %358
  %362 = load i1, ptr %14, align 1
  br i1 %362, label %363, label %364

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

364:                                              ; preds = %363, %361
  br label %536

365:                                              ; preds = %244
  %366 = landingpad { ptr, i32 }
          cleanup
  %367 = extractvalue { ptr, i32 } %366, 0
  store ptr %367, ptr %28, align 8
  %368 = extractvalue { ptr, i32 } %366, 1
  store i32 %368, ptr %29, align 4
  br label %511

369:                                              ; preds = %245
  %370 = landingpad { ptr, i32 }
          cleanup
  %371 = extractvalue { ptr, i32 } %370, 0
  store ptr %371, ptr %28, align 8
  %372 = extractvalue { ptr, i32 } %370, 1
  store i32 %372, ptr %29, align 4
  br label %507

373:                                              ; preds = %246
  %374 = landingpad { ptr, i32 }
          cleanup
  %375 = extractvalue { ptr, i32 } %374, 0
  store ptr %375, ptr %28, align 8
  %376 = extractvalue { ptr, i32 } %374, 1
  store i32 %376, ptr %29, align 4
  br label %494

377:                                              ; preds = %247
  %378 = landingpad { ptr, i32 }
          cleanup
  %379 = extractvalue { ptr, i32 } %378, 0
  store ptr %379, ptr %28, align 8
  %380 = extractvalue { ptr, i32 } %378, 1
  store i32 %380, ptr %29, align 4
  br label %490

381:                                              ; preds = %248
  %382 = landingpad { ptr, i32 }
          cleanup
  %383 = extractvalue { ptr, i32 } %382, 0
  store ptr %383, ptr %28, align 8
  %384 = extractvalue { ptr, i32 } %382, 1
  store i32 %384, ptr %29, align 4
  br label %486

385:                                              ; preds = %249
  %386 = landingpad { ptr, i32 }
          cleanup
  %387 = extractvalue { ptr, i32 } %386, 0
  store ptr %387, ptr %28, align 8
  %388 = extractvalue { ptr, i32 } %386, 1
  store i32 %388, ptr %29, align 4
  br label %473

389:                                              ; preds = %250
  %390 = landingpad { ptr, i32 }
          cleanup
  %391 = extractvalue { ptr, i32 } %390, 0
  store ptr %391, ptr %28, align 8
  %392 = extractvalue { ptr, i32 } %390, 1
  store i32 %392, ptr %29, align 4
  br label %469

393:                                              ; preds = %251
  %394 = landingpad { ptr, i32 }
          cleanup
  %395 = extractvalue { ptr, i32 } %394, 0
  store ptr %395, ptr %28, align 8
  %396 = extractvalue { ptr, i32 } %394, 1
  store i32 %396, ptr %29, align 4
  br label %465

397:                                              ; preds = %252
  %398 = landingpad { ptr, i32 }
          cleanup
  %399 = extractvalue { ptr, i32 } %398, 0
  store ptr %399, ptr %28, align 8
  %400 = extractvalue { ptr, i32 } %398, 1
  store i32 %400, ptr %29, align 4
  br label %458

401:                                              ; preds = %253
  %402 = landingpad { ptr, i32 }
          cleanup
  %403 = extractvalue { ptr, i32 } %402, 0
  store ptr %403, ptr %28, align 8
  %404 = extractvalue { ptr, i32 } %402, 1
  store i32 %404, ptr %29, align 4
  br label %454

405:                                              ; preds = %254
  %406 = landingpad { ptr, i32 }
          cleanup
  %407 = extractvalue { ptr, i32 } %406, 0
  store ptr %407, ptr %28, align 8
  %408 = extractvalue { ptr, i32 } %406, 1
  store i32 %408, ptr %29, align 4
  br label %441

409:                                              ; preds = %255
  %410 = landingpad { ptr, i32 }
          cleanup
  %411 = extractvalue { ptr, i32 } %410, 0
  store ptr %411, ptr %28, align 8
  %412 = extractvalue { ptr, i32 } %410, 1
  store i32 %412, ptr %29, align 4
  br label %428

413:                                              ; preds = %256
  %414 = landingpad { ptr, i32 }
          cleanup
  %415 = extractvalue { ptr, i32 } %414, 0
  store ptr %415, ptr %28, align 8
  %416 = extractvalue { ptr, i32 } %414, 1
  store i32 %416, ptr %29, align 4
  br label %424

417:                                              ; preds = %257
  %418 = landingpad { ptr, i32 }
          cleanup
  %419 = extractvalue { ptr, i32 } %418, 0
  store ptr %419, ptr %28, align 8
  %420 = extractvalue { ptr, i32 } %418, 1
  store i32 %420, ptr %29, align 4
  %421 = load i1, ptr %66, align 1
  br i1 %421, label %422, label %423

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

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

424:                                              ; preds = %423, %413
  %425 = load i1, ptr %65, align 1
  br i1 %425, label %426, label %427

426:                                              ; preds = %424
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %60) #7
  br label %427

427:                                              ; preds = %426, %424
  br label %428

428:                                              ; preds = %427, %409
  %429 = load i1, ptr %64, align 1
  br i1 %429, label %430, label %431

430:                                              ; preds = %428
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %62) #7
  br label %431

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

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

434:                                              ; preds = %433, %431
  %435 = load i1, ptr %61, align 1
  br i1 %435, label %436, label %437

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

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

439:                                              ; preds = %437
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %54) #7
  br label %440

440:                                              ; preds = %439, %437
  br label %441

441:                                              ; preds = %440, %405
  %442 = load i1, ptr %58, align 1
  br i1 %442, label %443, label %444

443:                                              ; preds = %441
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %56) #7
  br label %444

444:                                              ; preds = %443, %441
  %445 = load i1, ptr %57, align 1
  br i1 %445, label %446, label %447

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

447:                                              ; preds = %446, %444
  %448 = load i1, ptr %55, align 1
  br i1 %448, label %449, label %450

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

450:                                              ; preds = %449, %447
  %451 = load i1, ptr %52, align 1
  br i1 %451, label %452, label %453

452:                                              ; preds = %450
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  br label %453

453:                                              ; preds = %452, %450
  br label %454

454:                                              ; preds = %453, %401
  %455 = load i1, ptr %51, align 1
  br i1 %455, label %456, label %457

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

457:                                              ; preds = %456, %454
  br label %458

458:                                              ; preds = %457, %397
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #7
  %459 = load i1, ptr %49, align 1
  br i1 %459, label %460, label %461

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

461:                                              ; preds = %460, %458
  %462 = load i1, ptr %47, align 1
  br i1 %462, label %463, label %464

463:                                              ; preds = %461
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  br label %464

464:                                              ; preds = %463, %461
  br label %465

465:                                              ; preds = %464, %393
  %466 = load i1, ptr %46, align 1
  br i1 %466, label %467, label %468

467:                                              ; preds = %465
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %468

468:                                              ; preds = %467, %465
  br label %469

469:                                              ; preds = %468, %389
  %470 = load i1, ptr %45, 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) %40) #7
  br label %472

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

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

475:                                              ; preds = %473
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %42) #7
  br label %476

476:                                              ; preds = %475, %473
  %477 = load i1, ptr %43, align 1
  br i1 %477, label %478, label %479

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

479:                                              ; preds = %478, %476
  %480 = load i1, ptr %41, align 1
  br i1 %480, label %481, label %482

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

482:                                              ; preds = %481, %479
  %483 = load i1, ptr %39, align 1
  br i1 %483, label %484, label %485

484:                                              ; preds = %482
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %485

485:                                              ; preds = %484, %482
  br label %486

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

488:                                              ; preds = %486
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  br label %489

489:                                              ; preds = %488, %486
  br label %490

490:                                              ; preds = %489, %377
  %491 = load i1, ptr %37, align 1
  br i1 %491, label %492, label %493

492:                                              ; preds = %490
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #7
  br label %493

493:                                              ; preds = %492, %490
  br label %494

494:                                              ; preds = %493, %373
  %495 = load i1, ptr %36, align 1
  br i1 %495, label %496, label %497

496:                                              ; preds = %494
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #7
  br label %497

497:                                              ; preds = %496, %494
  %498 = load i1, ptr %35, align 1
  br i1 %498, label %499, label %500

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

500:                                              ; preds = %499, %497
  %501 = load i1, ptr %33, align 1
  br i1 %501, label %502, label %503

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

503:                                              ; preds = %502, %500
  %504 = load i1, ptr %31, align 1
  br i1 %504, label %505, label %506

505:                                              ; preds = %503
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  br label %506

506:                                              ; preds = %505, %503
  br label %507

507:                                              ; preds = %506, %369
  %508 = load i1, ptr %30, align 1
  br i1 %508, label %509, label %510

509:                                              ; preds = %507
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  br label %510

510:                                              ; preds = %509, %507
  br label %511

511:                                              ; preds = %510, %365
  %512 = load i1, ptr %27, align 1
  br i1 %512, label %513, label %514

513:                                              ; preds = %511
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #7
  br label %514

514:                                              ; preds = %513, %511
  %515 = load i1, ptr %26, align 1
  br i1 %515, label %516, label %517

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

517:                                              ; preds = %516, %514
  %518 = load i1, ptr %24, align 1
  br i1 %518, label %519, label %520

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

520:                                              ; preds = %519, %517
  %521 = load i1, ptr %22, align 1
  br i1 %521, label %522, label %523

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

523:                                              ; preds = %522, %520
  %524 = load i1, ptr %20, align 1
  br i1 %524, label %525, label %526

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

526:                                              ; preds = %525, %523
  %527 = load i1, ptr %18, align 1
  br i1 %527, label %528, label %529

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

529:                                              ; preds = %528, %526
  %530 = load i1, ptr %16, align 1
  br i1 %530, label %531, label %532

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

532:                                              ; preds = %531, %529
  %533 = load i1, ptr %14, align 1
  br i1 %533, label %534, label %535

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

535:                                              ; preds = %534, %532
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %1266

536:                                              ; preds = %364, %215
  br label %537

537:                                              ; preds = %536, %212
  %538 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 4
  %539 = load ptr, ptr %538, align 8, !tbaa !31
  %540 = load i32, ptr %10, align 4, !tbaa !22
  %541 = sext i32 %540 to i64
  %542 = getelementptr inbounds %class.LayerApex, ptr %539, i64 %541
  %543 = load ptr, ptr %5, align 8, !tbaa !5
  %544 = load double, ptr %4, align 8, !tbaa !9
  %545 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 4
  %546 = load double, ptr %545, align 8, !tbaa !33
  %547 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 3
  %548 = load double, ptr %547, align 8, !tbaa !34
  %549 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %550 = load i32, ptr %10, align 4, !tbaa !22
  %551 = sext i32 %550 to i64
  %552 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %549, i64 noundef %551) #7
  %553 = load double, ptr %552, align 8, !tbaa !9
  %554 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 4
  %555 = load ptr, ptr %554, align 8, !tbaa !16
  %556 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %555)
  %557 = load i8, ptr %8, align 1, !tbaa !17, !range !35, !noundef !36
  %558 = trunc i8 %557 to i1
  call void @_ZN9LayerApex24markCentreLayerTrappingsERKSt4pairIidEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %542, ptr noundef nonnull align 8 dereferenceable(16) %543, double noundef %544, double noundef %546, double noundef %548, double noundef %553, double noundef %556, i1 noundef zeroext %558)
  %559 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 3
  %560 = load ptr, ptr %559, align 8, !tbaa !32
  %561 = load i32, ptr %10, align 4, !tbaa !22
  %562 = sext i32 %561 to i64
  %563 = getelementptr inbounds %class.CornerApex, ptr %560, i64 %562
  %564 = load double, ptr %4, align 8, !tbaa !9
  %565 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 4
  %566 = load double, ptr %565, align 8, !tbaa !33
  %567 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 3
  %568 = load double, ptr %567, align 8, !tbaa !34
  %569 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %570 = load i32, ptr %10, align 4, !tbaa !22
  %571 = sext i32 %570 to i64
  %572 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %569, i64 noundef %571) #7
  %573 = load double, ptr %572, align 8, !tbaa !9
  %574 = load double, ptr %9, align 8, !tbaa !9
  %575 = load i8, ptr %8, align 1, !tbaa !17, !range !35, !noundef !36
  %576 = trunc i8 %575 to i1
  call void @_ZN10CornerApex14initCornerApexEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %563, double noundef %564, double noundef %566, double noundef %568, double noundef %573, double noundef %574, i1 noundef zeroext %576)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %577

577:                                              ; preds = %537
  %578 = load i32, ptr %10, align 4, !tbaa !22
  %579 = add nsw i32 %578, 1
  store i32 %579, ptr %10, align 4, !tbaa !22
  br label %160, !llvm.loop !39

580:                                              ; preds = %165
  %581 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 3
  %582 = load ptr, ptr %581, align 8, !tbaa !11
  %583 = getelementptr inbounds %class.Apex, ptr %582, i32 0, i32 1
  store i8 0, ptr %583, align 8, !tbaa !41
  br label %584

584:                                              ; preds = %580, %2
  %585 = load ptr, ptr %7, align 8, !tbaa !5
  %586 = getelementptr inbounds %"struct.std::pair.0", ptr %585, i32 0, i32 0
  %587 = load i32, ptr %586, align 8, !tbaa !18
  %588 = icmp sgt i32 %587, -1
  br i1 %588, label %589, label %701

589:                                              ; preds = %584
  call void @llvm.lifetime.start.p0(i64 4, ptr %67) #7
  store i32 0, ptr %67, align 4, !tbaa !22
  br label %590

590:                                              ; preds = %697, %589
  %591 = load i32, ptr %67, align 4, !tbaa !22
  %592 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 1
  %593 = load i32, ptr %592, align 8, !tbaa !23
  %594 = icmp slt i32 %591, %593
  br i1 %594, label %596, label %595

595:                                              ; preds = %590
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #7
  br label %700

596:                                              ; preds = %590
  %597 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 3
  %598 = load ptr, ptr %597, align 8, !tbaa !32
  %599 = load i32, ptr %67, align 4, !tbaa !22
  %600 = sext i32 %599 to i64
  %601 = getelementptr inbounds %class.CornerApex, ptr %598, i64 %600
  %602 = load double, ptr %4, align 8, !tbaa !9
  %603 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 4
  %604 = load double, ptr %603, align 8, !tbaa !33
  %605 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 3
  %606 = load double, ptr %605, align 8, !tbaa !34
  %607 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %608 = load i32, ptr %67, align 4, !tbaa !22
  %609 = sext i32 %608 to i64
  %610 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %607, i64 noundef %609) #7
  %611 = load double, ptr %610, align 8, !tbaa !9
  %612 = load double, ptr %9, align 8, !tbaa !9
  %613 = load i8, ptr %8, align 1, !tbaa !17, !range !35, !noundef !36
  %614 = trunc i8 %613 to i1
  call void @_ZN10CornerApex15finitCornerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %601, double noundef %602, double noundef %604, double noundef %606, double noundef %611, double noundef %612, i1 noundef zeroext %614, i1 noundef zeroext true)
  %615 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 4
  %616 = load ptr, ptr %615, align 8, !tbaa !31
  %617 = load i32, ptr %67, align 4, !tbaa !22
  %618 = sext i32 %617 to i64
  %619 = getelementptr inbounds %class.LayerApex, ptr %616, i64 %618
  %620 = load double, ptr %4, align 8, !tbaa !9
  %621 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 4
  %622 = load double, ptr %621, align 8, !tbaa !33
  %623 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 3
  %624 = load double, ptr %623, align 8, !tbaa !34
  %625 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %626 = load i32, ptr %67, align 4, !tbaa !22
  %627 = sext i32 %626 to i64
  %628 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %625, i64 noundef %627) #7
  %629 = load double, ptr %628, align 8, !tbaa !9
  %630 = load double, ptr %9, align 8, !tbaa !9
  %631 = load i8, ptr %8, align 1, !tbaa !17, !range !35, !noundef !36
  %632 = trunc i8 %631 to i1
  %633 = call noundef zeroext i1 @_ZN9LayerApex14finitLayerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %619, double noundef %620, double noundef %622, double noundef %624, double noundef %629, double noundef %630, i1 noundef zeroext %632, i1 noundef zeroext false)
  br i1 %633, label %637, label %634

634:                                              ; preds = %596
  %635 = load i32, ptr %67, align 4, !tbaa !22
  %636 = call noundef double @_ZN7Polygon25Pc_pin_disconnectOilLayerEi(ptr noundef nonnull align 8 dereferenceable(248) %122, i32 noundef %635)
  br label %637

637:                                              ; preds = %634, %596
  %638 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 3
  %639 = load ptr, ptr %638, align 8, !tbaa !32
  %640 = load i32, ptr %67, align 4, !tbaa !22
  %641 = sext i32 %640 to i64
  %642 = getelementptr inbounds %class.CornerApex, ptr %639, i64 %641
  %643 = load ptr, ptr %7, align 8, !tbaa !5
  %644 = load double, ptr %4, align 8, !tbaa !9
  %645 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 4
  %646 = load double, ptr %645, align 8, !tbaa !33
  %647 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 3
  %648 = load double, ptr %647, align 8, !tbaa !34
  %649 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %650 = load i32, ptr %67, align 4, !tbaa !22
  %651 = sext i32 %650 to i64
  %652 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %649, i64 noundef %651) #7
  %653 = load double, ptr %652, align 8, !tbaa !9
  %654 = load double, ptr %9, align 8, !tbaa !9
  %655 = load i8, ptr %8, align 1, !tbaa !17, !range !35, !noundef !36
  %656 = trunc i8 %655 to i1
  call void @_ZN10CornerApex18markTrappingCornerERKSt4pairIidEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %642, ptr noundef nonnull align 8 dereferenceable(16) %643, double noundef %644, double noundef %646, double noundef %648, double noundef %653, double noundef %654, i1 noundef zeroext %656)
  %657 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 4
  %658 = load ptr, ptr %657, align 8, !tbaa !31
  %659 = load i32, ptr %67, align 4, !tbaa !22
  %660 = sext i32 %659 to i64
  %661 = getelementptr inbounds %class.LayerApex, ptr %658, i64 %660
  %662 = load ptr, ptr %5, align 8, !tbaa !5
  %663 = load double, ptr %4, align 8, !tbaa !9
  %664 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 4
  %665 = load double, ptr %664, align 8, !tbaa !33
  %666 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 3
  %667 = load double, ptr %666, align 8, !tbaa !34
  %668 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %669 = load i32, ptr %67, align 4, !tbaa !22
  %670 = sext i32 %669 to i64
  %671 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %668, i64 noundef %670) #7
  %672 = load double, ptr %671, align 8, !tbaa !9
  %673 = load double, ptr %9, align 8, !tbaa !9
  %674 = load i8, ptr %8, align 1, !tbaa !17, !range !35, !noundef !36
  %675 = trunc i8 %674 to i1
  call void @_ZN9LayerApex24markCentreLayerTrappingsERKSt4pairIidEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %661, ptr noundef nonnull align 8 dereferenceable(16) %662, double noundef %663, double noundef %665, double noundef %667, double noundef %672, double noundef %673, i1 noundef zeroext %675)
  %676 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 4
  %677 = load ptr, ptr %676, align 8, !tbaa !31
  %678 = load i32, ptr %67, align 4, !tbaa !22
  %679 = sext i32 %678 to i64
  %680 = getelementptr inbounds %class.LayerApex, ptr %677, i64 %679
  %681 = load double, ptr %4, align 8, !tbaa !9
  %682 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 4
  %683 = load double, ptr %682, align 8, !tbaa !33
  %684 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 3
  %685 = load double, ptr %684, align 8, !tbaa !34
  %686 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %687 = load i32, ptr %67, align 4, !tbaa !22
  %688 = sext i32 %687 to i64
  %689 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %686, i64 noundef %688) #7
  %690 = load double, ptr %689, align 8, !tbaa !9
  %691 = load double, ptr %9, align 8, !tbaa !9
  %692 = load i8, ptr %8, align 1, !tbaa !17, !range !35, !noundef !36
  %693 = trunc i8 %692 to i1
  %694 = call noundef zeroext i1 @_ZN9LayerApex13initLayerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %680, double noundef %681, double noundef %683, double noundef %685, double noundef %690, double noundef %691, i1 noundef zeroext %693, i1 noundef zeroext false)
  br i1 %694, label %696, label %695

695:                                              ; preds = %637
  br label %696

696:                                              ; preds = %695, %637
  br label %697

697:                                              ; preds = %696
  %698 = load i32, ptr %67, align 4, !tbaa !22
  %699 = add nsw i32 %698, 1
  store i32 %699, ptr %67, align 4, !tbaa !22
  br label %590, !llvm.loop !43

700:                                              ; preds = %595
  br label %701

701:                                              ; preds = %700, %584
  %702 = load ptr, ptr %6, align 8, !tbaa !5
  %703 = getelementptr inbounds %"struct.std::pair.0", ptr %702, i32 0, i32 0
  %704 = load i32, ptr %703, align 8, !tbaa !18
  %705 = icmp sgt i32 %704, -1
  br i1 %705, label %706, label %1265

706:                                              ; preds = %701
  call void @llvm.lifetime.start.p0(i64 4, ptr %68) #7
  store i32 0, ptr %68, align 4, !tbaa !22
  br label %707

707:                                              ; preds = %1258, %706
  %708 = load i32, ptr %68, align 4, !tbaa !22
  %709 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 1
  %710 = load i32, ptr %709, align 8, !tbaa !23
  %711 = icmp slt i32 %708, %710
  br i1 %711, label %713, label %712

712:                                              ; preds = %707
  call void @llvm.lifetime.end.p0(i64 4, ptr %68) #7
  br label %1261

713:                                              ; preds = %707
  %714 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 3
  %715 = load ptr, ptr %714, align 8, !tbaa !32
  %716 = load i32, ptr %68, align 4, !tbaa !22
  %717 = sext i32 %716 to i64
  %718 = getelementptr inbounds %class.CornerApex, ptr %715, i64 %717
  %719 = load double, ptr %4, align 8, !tbaa !9
  %720 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 4
  %721 = load double, ptr %720, align 8, !tbaa !33
  %722 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 3
  %723 = load double, ptr %722, align 8, !tbaa !34
  %724 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %725 = load i32, ptr %68, align 4, !tbaa !22
  %726 = sext i32 %725 to i64
  %727 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %724, i64 noundef %726) #7
  %728 = load double, ptr %727, align 8, !tbaa !9
  %729 = load double, ptr %9, align 8, !tbaa !9
  %730 = load i8, ptr %8, align 1, !tbaa !17, !range !35, !noundef !36
  %731 = trunc i8 %730 to i1
  call void @_ZN10CornerApex15finitCornerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %718, double noundef %719, double noundef %721, double noundef %723, double noundef %728, double noundef %729, i1 noundef zeroext %731, i1 noundef zeroext false)
  %732 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 4
  %733 = load ptr, ptr %732, align 8, !tbaa !31
  %734 = load i32, ptr %68, align 4, !tbaa !22
  %735 = sext i32 %734 to i64
  %736 = getelementptr inbounds %class.LayerApex, ptr %733, i64 %735
  %737 = load ptr, ptr %6, align 8, !tbaa !5
  %738 = getelementptr inbounds %"struct.std::pair.0", ptr %737, i32 0, i32 1
  %739 = load double, ptr %738, align 8, !tbaa !37
  %740 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 4
  %741 = load double, ptr %740, align 8, !tbaa !33
  %742 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 3
  %743 = load double, ptr %742, align 8, !tbaa !34
  %744 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %745 = load i32, ptr %68, align 4, !tbaa !22
  %746 = sext i32 %745 to i64
  %747 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %744, i64 noundef %746) #7
  %748 = load double, ptr %747, align 8, !tbaa !9
  %749 = load double, ptr %9, align 8, !tbaa !9
  %750 = load i8, ptr %8, align 1, !tbaa !17, !range !35, !noundef !36
  %751 = trunc i8 %750 to i1
  %752 = call noundef zeroext i1 @_ZN9LayerApex14finitLayerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %736, double noundef %739, double noundef %741, double noundef %743, double noundef %748, double noundef %749, i1 noundef zeroext %751, i1 noundef zeroext true)
  br i1 %752, label %756, label %753

753:                                              ; preds = %713
  %754 = load i32, ptr %68, align 4, !tbaa !22
  %755 = call noundef double @_ZN7Polygon25Pc_pin_disconnectOilLayerEi(ptr noundef nonnull align 8 dereferenceable(248) %122, i32 noundef %754)
  br label %1216

756:                                              ; preds = %713
  %757 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 4
  %758 = load ptr, ptr %757, align 8, !tbaa !31
  %759 = load i32, ptr %68, align 4, !tbaa !22
  %760 = sext i32 %759 to i64
  %761 = getelementptr inbounds %class.LayerApex, ptr %758, i64 %760
  %762 = call noundef zeroext i1 @_ZNK4Apex6existsEv(ptr noundef nonnull align 8 dereferenceable(104) %761)
  br i1 %762, label %763, label %1215

763:                                              ; preds = %756
  %764 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 4
  %765 = load ptr, ptr %764, align 8, !tbaa !31
  %766 = load i32, ptr %68, align 4, !tbaa !22
  %767 = sext i32 %766 to i64
  %768 = getelementptr inbounds %class.LayerApex, ptr %765, i64 %767
  %769 = call noundef double @_ZNK9LayerApex14pinnedApexDistEv(ptr noundef nonnull align 8 dereferenceable(144) %768)
  %770 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 5
  %771 = load double, ptr %770, align 8, !tbaa !38
  %772 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %773 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %772, i64 noundef 0) #7
  %774 = load double, ptr %773, align 8, !tbaa !9
  %775 = call double @tan(double noundef %774) #7
  %776 = fdiv double 1.000000e+00, %775
  %777 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %778 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %777, i64 noundef 1) #7
  %779 = load double, ptr %778, align 8, !tbaa !9
  %780 = call double @tan(double noundef %779) #7
  %781 = fdiv double 1.000000e+00, %780
  %782 = fadd double %776, %781
  %783 = fmul double %771, %782
  %784 = fcmp olt double %769, %783
  store i1 false, ptr %71, align 1
  store i1 false, ptr %73, align 1
  store i1 false, ptr %75, align 1
  store i1 false, ptr %77, align 1
  store i1 false, ptr %79, align 1
  store i1 false, ptr %81, align 1
  store i1 false, ptr %83, align 1
  store i1 false, ptr %84, align 1
  store i1 false, ptr %85, align 1
  store i1 false, ptr %86, align 1
  store i1 false, ptr %88, align 1
  store i1 false, ptr %90, align 1
  store i1 false, ptr %91, align 1
  store i1 false, ptr %92, align 1
  store i1 false, ptr %93, align 1
  store i1 false, ptr %94, align 1
  store i1 false, ptr %96, align 1
  store i1 false, ptr %98, align 1
  store i1 false, ptr %99, align 1
  store i1 false, ptr %100, align 1
  store i1 false, ptr %101, align 1
  store i1 false, ptr %102, align 1
  store i1 false, ptr %104, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %105) #7
  store i1 false, ptr %106, align 1
  store i1 false, ptr %107, align 1
  store i1 false, ptr %110, align 1
  store i1 false, ptr %112, align 1
  store i1 false, ptr %113, align 1
  store i1 false, ptr %114, align 1
  store i1 false, ptr %116, align 1
  store i1 false, ptr %118, align 1
  store i1 false, ptr %119, align 1
  store i1 false, ptr %120, align 1
  store i1 false, ptr %121, align 1
  br i1 %784, label %801, label %785

785:                                              ; preds = %763
  call void @llvm.lifetime.start.p0(i64 32, ptr %70) #7
  store i1 true, ptr %71, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %72) #7
  store i1 true, ptr %73, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %74) #7
  store i1 true, ptr %75, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %76) #7
  store i1 true, ptr %77, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %78) #7
  store i1 true, ptr %79, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %80) #7
  store i1 true, ptr %81, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %82) #7
  store i1 true, ptr %83, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %82) #7
  store i1 true, ptr %84, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %80, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %82)
          to label %786 unwind label %1043

786:                                              ; preds = %785
  store i1 true, ptr %85, 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 %78, ptr noundef nonnull align 8 dereferenceable(32) %80, ptr noundef @.str.1)
          to label %787 unwind label %1047

787:                                              ; preds = %786
  store i1 true, ptr %86, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %87) #7
  store i1 true, ptr %88, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %89) #7
  store i1 true, ptr %90, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %89) #7
  store i1 true, ptr %91, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %87, ptr noundef @__FUNCTION__._ZN7Polygon28calcOilLayerPc_syncTrappingsEd, ptr noundef nonnull align 1 dereferenceable(1) %89)
          to label %788 unwind label %1051

788:                                              ; preds = %787
  store i1 true, ptr %92, 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 %76, ptr noundef nonnull align 8 dereferenceable(32) %78, ptr noundef nonnull align 8 dereferenceable(32) %87)
          to label %789 unwind label %1055

789:                                              ; preds = %788
  store i1 true, ptr %93, 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 %74, ptr noundef nonnull align 8 dereferenceable(32) %76, ptr noundef @.str.2)
          to label %790 unwind label %1059

790:                                              ; preds = %789
  store i1 true, ptr %94, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %95) #7
  store i1 true, ptr %96, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %97) #7
  store i1 true, ptr %98, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %97) #7
  store i1 true, ptr %99, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %95, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %97)
          to label %791 unwind label %1063

791:                                              ; preds = %790
  store i1 true, ptr %100, 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 %72, ptr noundef nonnull align 8 dereferenceable(32) %74, ptr noundef nonnull align 8 dereferenceable(32) %95)
          to label %792 unwind label %1067

792:                                              ; preds = %791
  store i1 true, ptr %101, 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 %70, ptr noundef nonnull align 8 dereferenceable(32) %72, ptr noundef @.str.4)
          to label %793 unwind label %1071

793:                                              ; preds = %792
  store i1 true, ptr %102, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %103) #7
  store i1 true, ptr %104, align 1
  store i32 409, ptr %105, align 4, !tbaa !22
  invoke void @_Z2_sIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %103, ptr noundef nonnull align 4 dereferenceable(4) %105)
          to label %794 unwind label %1075

794:                                              ; preds = %793
  store i1 true, ptr %106, 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 %69, ptr noundef nonnull align 8 dereferenceable(32) %70, ptr noundef nonnull align 8 dereferenceable(32) %103)
          to label %795 unwind label %1079

795:                                              ; preds = %794
  store i1 true, ptr %107, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %109) #7
  store i1 true, ptr %110, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %111) #7
  store i1 true, ptr %112, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %111) #7
  store i1 true, ptr %113, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %109, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %111)
          to label %796 unwind label %1083

796:                                              ; preds = %795
  store i1 true, ptr %114, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %115) #7
  store i1 true, ptr %116, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %117) #7
  store i1 true, ptr %118, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %117) #7
  store i1 true, ptr %119, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %115, ptr noundef @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %117)
          to label %797 unwind label %1087

797:                                              ; preds = %796
  store i1 true, ptr %120, 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 %108, ptr noundef nonnull align 8 dereferenceable(32) %109, ptr noundef nonnull align 8 dereferenceable(32) %115)
          to label %798 unwind label %1091

798:                                              ; preds = %797
  store i1 true, ptr %121, align 1
  %799 = invoke noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef %69, ptr noundef %108, i32 noundef 0)
          to label %800 unwind label %1095

800:                                              ; preds = %798
  br label %801

801:                                              ; preds = %800, %763
  %802 = phi i1 [ true, %763 ], [ %799, %800 ]
  %803 = xor i1 %802, true
  %804 = load i1, ptr %121, align 1
  br i1 %804, label %805, label %806

805:                                              ; preds = %801
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %108) #7
  br label %806

806:                                              ; preds = %805, %801
  %807 = load i1, ptr %120, align 1
  br i1 %807, label %808, label %809

808:                                              ; preds = %806
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %115) #7
  br label %809

809:                                              ; preds = %808, %806
  %810 = load i1, ptr %119, align 1
  br i1 %810, label %811, label %812

811:                                              ; preds = %809
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %117) #7
  br label %812

812:                                              ; preds = %811, %809
  %813 = load i1, ptr %118, align 1
  br i1 %813, label %814, label %815

814:                                              ; preds = %812
  call void @llvm.lifetime.end.p0(i64 1, ptr %117) #7
  br label %815

815:                                              ; preds = %814, %812
  %816 = load i1, ptr %116, align 1
  br i1 %816, label %817, label %818

817:                                              ; preds = %815
  call void @llvm.lifetime.end.p0(i64 32, ptr %115) #7
  br label %818

818:                                              ; preds = %817, %815
  %819 = load i1, ptr %114, align 1
  br i1 %819, label %820, label %821

820:                                              ; preds = %818
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %109) #7
  br label %821

821:                                              ; preds = %820, %818
  %822 = load i1, ptr %113, align 1
  br i1 %822, label %823, label %824

823:                                              ; preds = %821
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %111) #7
  br label %824

824:                                              ; preds = %823, %821
  %825 = load i1, ptr %112, align 1
  br i1 %825, label %826, label %827

826:                                              ; preds = %824
  call void @llvm.lifetime.end.p0(i64 1, ptr %111) #7
  br label %827

827:                                              ; preds = %826, %824
  %828 = load i1, ptr %110, align 1
  br i1 %828, label %829, label %830

829:                                              ; preds = %827
  call void @llvm.lifetime.end.p0(i64 32, ptr %109) #7
  br label %830

830:                                              ; preds = %829, %827
  %831 = load i1, ptr %107, align 1
  br i1 %831, label %832, label %833

832:                                              ; preds = %830
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %69) #7
  br label %833

833:                                              ; preds = %832, %830
  %834 = load i1, ptr %106, align 1
  br i1 %834, label %835, label %836

835:                                              ; preds = %833
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %103) #7
  br label %836

836:                                              ; preds = %835, %833
  call void @llvm.lifetime.end.p0(i64 4, ptr %105) #7
  %837 = load i1, ptr %104, align 1
  br i1 %837, label %838, label %839

838:                                              ; preds = %836
  call void @llvm.lifetime.end.p0(i64 32, ptr %103) #7
  br label %839

839:                                              ; preds = %838, %836
  %840 = load i1, ptr %102, align 1
  br i1 %840, label %841, label %842

841:                                              ; preds = %839
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %70) #7
  br label %842

842:                                              ; preds = %841, %839
  %843 = load i1, ptr %101, align 1
  br i1 %843, label %844, label %845

844:                                              ; preds = %842
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %72) #7
  br label %845

845:                                              ; preds = %844, %842
  %846 = load i1, ptr %100, align 1
  br i1 %846, label %847, label %848

847:                                              ; preds = %845
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %95) #7
  br label %848

848:                                              ; preds = %847, %845
  %849 = load i1, ptr %99, align 1
  br i1 %849, label %850, label %851

850:                                              ; preds = %848
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %97) #7
  br label %851

851:                                              ; preds = %850, %848
  %852 = load i1, ptr %98, align 1
  br i1 %852, label %853, label %854

853:                                              ; preds = %851
  call void @llvm.lifetime.end.p0(i64 1, ptr %97) #7
  br label %854

854:                                              ; preds = %853, %851
  %855 = load i1, ptr %96, align 1
  br i1 %855, label %856, label %857

856:                                              ; preds = %854
  call void @llvm.lifetime.end.p0(i64 32, ptr %95) #7
  br label %857

857:                                              ; preds = %856, %854
  %858 = load i1, ptr %94, align 1
  br i1 %858, label %859, label %860

859:                                              ; preds = %857
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %74) #7
  br label %860

860:                                              ; preds = %859, %857
  %861 = load i1, ptr %93, align 1
  br i1 %861, label %862, label %863

862:                                              ; preds = %860
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %76) #7
  br label %863

863:                                              ; preds = %862, %860
  %864 = load i1, ptr %92, align 1
  br i1 %864, label %865, label %866

865:                                              ; preds = %863
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %87) #7
  br label %866

866:                                              ; preds = %865, %863
  %867 = load i1, ptr %91, align 1
  br i1 %867, label %868, label %869

868:                                              ; preds = %866
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %89) #7
  br label %869

869:                                              ; preds = %868, %866
  %870 = load i1, ptr %90, align 1
  br i1 %870, label %871, label %872

871:                                              ; preds = %869
  call void @llvm.lifetime.end.p0(i64 1, ptr %89) #7
  br label %872

872:                                              ; preds = %871, %869
  %873 = load i1, ptr %88, align 1
  br i1 %873, label %874, label %875

874:                                              ; preds = %872
  call void @llvm.lifetime.end.p0(i64 32, ptr %87) #7
  br label %875

875:                                              ; preds = %874, %872
  %876 = load i1, ptr %86, align 1
  br i1 %876, label %877, label %878

877:                                              ; preds = %875
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %78) #7
  br label %878

878:                                              ; preds = %877, %875
  %879 = load i1, ptr %85, align 1
  br i1 %879, label %880, label %881

880:                                              ; preds = %878
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %80) #7
  br label %881

881:                                              ; preds = %880, %878
  %882 = load i1, ptr %84, align 1
  br i1 %882, label %883, label %884

883:                                              ; preds = %881
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %82) #7
  br label %884

884:                                              ; preds = %883, %881
  %885 = load i1, ptr %83, align 1
  br i1 %885, label %886, label %887

886:                                              ; preds = %884
  call void @llvm.lifetime.end.p0(i64 1, ptr %82) #7
  br label %887

887:                                              ; preds = %886, %884
  %888 = load i1, ptr %81, align 1
  br i1 %888, label %889, label %890

889:                                              ; preds = %887
  call void @llvm.lifetime.end.p0(i64 32, ptr %80) #7
  br label %890

890:                                              ; preds = %889, %887
  %891 = load i1, ptr %79, align 1
  br i1 %891, label %892, label %893

892:                                              ; preds = %890
  call void @llvm.lifetime.end.p0(i64 32, ptr %78) #7
  br label %893

893:                                              ; preds = %892, %890
  %894 = load i1, ptr %77, align 1
  br i1 %894, label %895, label %896

895:                                              ; preds = %893
  call void @llvm.lifetime.end.p0(i64 32, ptr %76) #7
  br label %896

896:                                              ; preds = %895, %893
  %897 = load i1, ptr %75, align 1
  br i1 %897, label %898, label %899

898:                                              ; preds = %896
  call void @llvm.lifetime.end.p0(i64 32, ptr %74) #7
  br label %899

899:                                              ; preds = %898, %896
  %900 = load i1, ptr %73, align 1
  br i1 %900, label %901, label %902

901:                                              ; preds = %899
  call void @llvm.lifetime.end.p0(i64 32, ptr %72) #7
  br label %902

902:                                              ; preds = %901, %899
  %903 = load i1, ptr %71, align 1
  br i1 %903, label %904, label %905

904:                                              ; preds = %902
  call void @llvm.lifetime.end.p0(i64 32, ptr %70) #7
  br label %905

905:                                              ; preds = %904, %902
  %906 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 4
  %907 = load ptr, ptr %906, align 8, !tbaa !31
  %908 = load i32, ptr %68, align 4, !tbaa !22
  %909 = sext i32 %908 to i64
  %910 = getelementptr inbounds %class.LayerApex, ptr %907, i64 %909
  %911 = call noundef double @_ZNK9LayerApex14pinnedApexDistEv(ptr noundef nonnull align 8 dereferenceable(144) %910)
  %912 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 5
  %913 = load double, ptr %912, align 8, !tbaa !38
  %914 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %915 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %914, i64 noundef 0) #7
  %916 = load double, ptr %915, align 8, !tbaa !9
  %917 = call double @tan(double noundef %916) #7
  %918 = fdiv double 1.000000e+00, %917
  %919 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %920 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %919, i64 noundef 1) #7
  %921 = load double, ptr %920, align 8, !tbaa !9
  %922 = call double @tan(double noundef %921) #7
  %923 = fdiv double 1.000000e+00, %922
  %924 = fadd double %918, %923
  %925 = fmul double %913, %924
  %926 = fcmp olt double %911, %925
  br i1 %926, label %1214, label %927

927:                                              ; preds = %905
  %928 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %929 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 3
  %930 = load ptr, ptr %929, align 8, !tbaa !11
  %931 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 4
  %932 = load ptr, ptr %931, align 8, !tbaa !16
  %933 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984) %932)
  %934 = call noundef zeroext i1 @_ZNK4Elem20canBeAddedToEventVecERK5Fluid(ptr noundef nonnull align 8 dereferenceable(408) %930, ptr noundef nonnull align 8 dereferenceable(80) %933)
  %935 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %928, i1 noundef zeroext %934)
  %936 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 3
  %937 = load ptr, ptr %936, align 8, !tbaa !11
  %938 = call noundef zeroext i1 @_ZNK4Apex15isInOilFloodVecEv(ptr noundef nonnull align 8 dereferenceable(104) %937)
  %939 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %935, i1 noundef zeroext %938)
  %940 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 3
  %941 = load ptr, ptr %940, align 8, !tbaa !11
  %942 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem15trappingWatFilmEv(ptr noundef nonnull align 8 dereferenceable(408) %941)
  %943 = getelementptr inbounds %"struct.std::pair.0", ptr %942, i32 0, i32 0
  %944 = load i32, ptr %943, align 8, !tbaa !18
  %945 = icmp sgt i32 %944, -1
  %946 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %939, i1 noundef zeroext %945)
  %947 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 4
  %948 = load ptr, ptr %947, align 8, !tbaa !16
  %949 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984) %948)
  %950 = load ptr, ptr %122, align 8, !tbaa !20
  %951 = getelementptr inbounds ptr, ptr %950, i64 20
  %952 = load ptr, ptr %951, align 8
  %953 = call noundef zeroext i1 %952(ptr noundef nonnull align 8 dereferenceable(152) %122, ptr noundef nonnull align 8 dereferenceable(80) %949)
  %954 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %946, i1 noundef zeroext %953)
  %955 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 4
  %956 = load ptr, ptr %955, align 8, !tbaa !31
  %957 = load i32, ptr %68, align 4, !tbaa !22
  %958 = sext i32 %957 to i64
  %959 = getelementptr inbounds %class.LayerApex, ptr %956, i64 %958
  %960 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9LayerApex13trappedOLayerEv(ptr noundef nonnull align 8 dereferenceable(144) %959)
  %961 = getelementptr inbounds %"struct.std::pair.0", ptr %960, i32 0, i32 0
  %962 = load i32, ptr %961, align 8, !tbaa !18
  %963 = icmp sgt i32 %962, -1
  %964 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %954, i1 noundef zeroext %963)
  %965 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 3
  %966 = load ptr, ptr %965, align 8, !tbaa !11
  %967 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem11trappingOilEv(ptr noundef nonnull align 8 dereferenceable(408) %966)
  %968 = getelementptr inbounds %"struct.std::pair.0", ptr %967, i32 0, i32 0
  %969 = load i32, ptr %968, align 8, !tbaa !18
  %970 = icmp sgt i32 %969, -1
  %971 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %964, i1 noundef zeroext %970)
  %972 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 3
  %973 = load ptr, ptr %972, align 8, !tbaa !11
  %974 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem15trappingWatBulkEv(ptr noundef nonnull align 8 dereferenceable(408) %973)
  %975 = getelementptr inbounds %"struct.std::pair.0", ptr %974, i32 0, i32 0
  %976 = load i32, ptr %975, align 8, !tbaa !18
  %977 = icmp sgt i32 %976, -1
  %978 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %971, i1 noundef zeroext %977)
  %979 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %978, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %980 = load ptr, ptr %122, align 8, !tbaa !20
  %981 = getelementptr inbounds ptr, ptr %980, i64 28
  %982 = load ptr, ptr %981, align 8
  %983 = call noundef double %982(ptr noundef nonnull align 8 dereferenceable(248) %122)
  %984 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %983)
  %985 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %984, ptr noundef @.str.17)
  %986 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %985, ptr noundef @.str.18)
  %987 = load ptr, ptr %6, align 8, !tbaa !5
  %988 = getelementptr inbounds %"struct.std::pair.0", ptr %987, i32 0, i32 1
  %989 = load double, ptr %988, align 8, !tbaa !37
  %990 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %986, double noundef %989)
  %991 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %990, ptr noundef @.str.17)
  %992 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 3
  %993 = load ptr, ptr %992, align 8, !tbaa !11
  %994 = call noundef double @_ZNK4Apex7entryPcEv(ptr noundef nonnull align 8 dereferenceable(104) %993)
  %995 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %991, double noundef %994)
  %996 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %995, ptr noundef @.str.19)
  %997 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 4
  %998 = load ptr, ptr %997, align 8, !tbaa !31
  %999 = load i32, ptr %68, align 4, !tbaa !22
  %1000 = sext i32 %999 to i64
  %1001 = getelementptr inbounds %class.LayerApex, ptr %998, i64 %1000
  %1002 = call noundef double @_ZNK9LayerApex14pinnedApexDistEv(ptr noundef nonnull align 8 dereferenceable(144) %1001)
  %1003 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %1002)
  %1004 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1003, ptr noundef @.str.20)
  %1005 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 5
  %1006 = load double, ptr %1005, align 8, !tbaa !38
  %1007 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %1004, double noundef %1006)
  %1008 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1007, ptr noundef @.str.21)
  %1009 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %1010 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1009, i64 noundef 0) #7
  %1011 = load double, ptr %1010, align 8, !tbaa !9
  %1012 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %1008, double noundef %1011)
  %1013 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1012, ptr noundef @.str.22)
  %1014 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %1015 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1014, i64 noundef 1) #7
  %1016 = load double, ptr %1015, align 8, !tbaa !9
  %1017 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %1013, double noundef %1016)
  %1018 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1017, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %1019 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 4
  %1020 = load ptr, ptr %1019, align 8, !tbaa !31
  %1021 = load i32, ptr %68, align 4, !tbaa !22
  %1022 = sext i32 %1021 to i64
  %1023 = getelementptr inbounds %class.LayerApex, ptr %1020, i64 %1022
  %1024 = call noundef double @_ZNK9LayerApex14pinnedApexDistEv(ptr noundef nonnull align 8 dereferenceable(144) %1023)
  %1025 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %1024)
  %1026 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1025, ptr noundef @.str.20)
  %1027 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 5
  %1028 = load double, ptr %1027, align 8, !tbaa !38
  %1029 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %1030 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1029, i64 noundef 0) #7
  %1031 = load double, ptr %1030, align 8, !tbaa !9
  %1032 = call double @tan(double noundef %1031) #7
  %1033 = fdiv double 1.000000e+00, %1032
  %1034 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %1035 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1034, i64 noundef 1) #7
  %1036 = load double, ptr %1035, align 8, !tbaa !9
  %1037 = call double @tan(double noundef %1036) #7
  %1038 = fdiv double 1.000000e+00, %1037
  %1039 = fadd double %1033, %1038
  %1040 = fmul double %1028, %1039
  %1041 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %1026, double noundef %1040)
  %1042 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1041, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %1214

1043:                                             ; preds = %785
  %1044 = landingpad { ptr, i32 }
          cleanup
  %1045 = extractvalue { ptr, i32 } %1044, 0
  store ptr %1045, ptr %28, align 8
  %1046 = extractvalue { ptr, i32 } %1044, 1
  store i32 %1046, ptr %29, align 4
  br label %1189

1047:                                             ; preds = %786
  %1048 = landingpad { ptr, i32 }
          cleanup
  %1049 = extractvalue { ptr, i32 } %1048, 0
  store ptr %1049, ptr %28, align 8
  %1050 = extractvalue { ptr, i32 } %1048, 1
  store i32 %1050, ptr %29, align 4
  br label %1185

1051:                                             ; preds = %787
  %1052 = landingpad { ptr, i32 }
          cleanup
  %1053 = extractvalue { ptr, i32 } %1052, 0
  store ptr %1053, ptr %28, align 8
  %1054 = extractvalue { ptr, i32 } %1052, 1
  store i32 %1054, ptr %29, align 4
  br label %1172

1055:                                             ; preds = %788
  %1056 = landingpad { ptr, i32 }
          cleanup
  %1057 = extractvalue { ptr, i32 } %1056, 0
  store ptr %1057, ptr %28, align 8
  %1058 = extractvalue { ptr, i32 } %1056, 1
  store i32 %1058, ptr %29, align 4
  br label %1168

1059:                                             ; preds = %789
  %1060 = landingpad { ptr, i32 }
          cleanup
  %1061 = extractvalue { ptr, i32 } %1060, 0
  store ptr %1061, ptr %28, align 8
  %1062 = extractvalue { ptr, i32 } %1060, 1
  store i32 %1062, ptr %29, align 4
  br label %1164

1063:                                             ; preds = %790
  %1064 = landingpad { ptr, i32 }
          cleanup
  %1065 = extractvalue { ptr, i32 } %1064, 0
  store ptr %1065, ptr %28, align 8
  %1066 = extractvalue { ptr, i32 } %1064, 1
  store i32 %1066, ptr %29, align 4
  br label %1151

1067:                                             ; preds = %791
  %1068 = landingpad { ptr, i32 }
          cleanup
  %1069 = extractvalue { ptr, i32 } %1068, 0
  store ptr %1069, ptr %28, align 8
  %1070 = extractvalue { ptr, i32 } %1068, 1
  store i32 %1070, ptr %29, align 4
  br label %1147

1071:                                             ; preds = %792
  %1072 = landingpad { ptr, i32 }
          cleanup
  %1073 = extractvalue { ptr, i32 } %1072, 0
  store ptr %1073, ptr %28, align 8
  %1074 = extractvalue { ptr, i32 } %1072, 1
  store i32 %1074, ptr %29, align 4
  br label %1143

1075:                                             ; preds = %793
  %1076 = landingpad { ptr, i32 }
          cleanup
  %1077 = extractvalue { ptr, i32 } %1076, 0
  store ptr %1077, ptr %28, align 8
  %1078 = extractvalue { ptr, i32 } %1076, 1
  store i32 %1078, ptr %29, align 4
  br label %1136

1079:                                             ; preds = %794
  %1080 = landingpad { ptr, i32 }
          cleanup
  %1081 = extractvalue { ptr, i32 } %1080, 0
  store ptr %1081, ptr %28, align 8
  %1082 = extractvalue { ptr, i32 } %1080, 1
  store i32 %1082, ptr %29, align 4
  br label %1132

1083:                                             ; preds = %795
  %1084 = landingpad { ptr, i32 }
          cleanup
  %1085 = extractvalue { ptr, i32 } %1084, 0
  store ptr %1085, ptr %28, align 8
  %1086 = extractvalue { ptr, i32 } %1084, 1
  store i32 %1086, ptr %29, align 4
  br label %1119

1087:                                             ; preds = %796
  %1088 = landingpad { ptr, i32 }
          cleanup
  %1089 = extractvalue { ptr, i32 } %1088, 0
  store ptr %1089, ptr %28, align 8
  %1090 = extractvalue { ptr, i32 } %1088, 1
  store i32 %1090, ptr %29, align 4
  br label %1106

1091:                                             ; preds = %797
  %1092 = landingpad { ptr, i32 }
          cleanup
  %1093 = extractvalue { ptr, i32 } %1092, 0
  store ptr %1093, ptr %28, align 8
  %1094 = extractvalue { ptr, i32 } %1092, 1
  store i32 %1094, ptr %29, align 4
  br label %1102

1095:                                             ; preds = %798
  %1096 = landingpad { ptr, i32 }
          cleanup
  %1097 = extractvalue { ptr, i32 } %1096, 0
  store ptr %1097, ptr %28, align 8
  %1098 = extractvalue { ptr, i32 } %1096, 1
  store i32 %1098, ptr %29, align 4
  %1099 = load i1, ptr %121, align 1
  br i1 %1099, label %1100, label %1101

1100:                                             ; preds = %1095
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %108) #7
  br label %1101

1101:                                             ; preds = %1100, %1095
  br label %1102

1102:                                             ; preds = %1101, %1091
  %1103 = load i1, ptr %120, align 1
  br i1 %1103, label %1104, label %1105

1104:                                             ; preds = %1102
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %115) #7
  br label %1105

1105:                                             ; preds = %1104, %1102
  br label %1106

1106:                                             ; preds = %1105, %1087
  %1107 = load i1, ptr %119, align 1
  br i1 %1107, label %1108, label %1109

1108:                                             ; preds = %1106
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %117) #7
  br label %1109

1109:                                             ; preds = %1108, %1106
  %1110 = load i1, ptr %118, align 1
  br i1 %1110, label %1111, label %1112

1111:                                             ; preds = %1109
  call void @llvm.lifetime.end.p0(i64 1, ptr %117) #7
  br label %1112

1112:                                             ; preds = %1111, %1109
  %1113 = load i1, ptr %116, align 1
  br i1 %1113, label %1114, label %1115

1114:                                             ; preds = %1112
  call void @llvm.lifetime.end.p0(i64 32, ptr %115) #7
  br label %1115

1115:                                             ; preds = %1114, %1112
  %1116 = load i1, ptr %114, align 1
  br i1 %1116, label %1117, label %1118

1117:                                             ; preds = %1115
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %109) #7
  br label %1118

1118:                                             ; preds = %1117, %1115
  br label %1119

1119:                                             ; preds = %1118, %1083
  %1120 = load i1, ptr %113, align 1
  br i1 %1120, label %1121, label %1122

1121:                                             ; preds = %1119
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %111) #7
  br label %1122

1122:                                             ; preds = %1121, %1119
  %1123 = load i1, ptr %112, align 1
  br i1 %1123, label %1124, label %1125

1124:                                             ; preds = %1122
  call void @llvm.lifetime.end.p0(i64 1, ptr %111) #7
  br label %1125

1125:                                             ; preds = %1124, %1122
  %1126 = load i1, ptr %110, align 1
  br i1 %1126, label %1127, label %1128

1127:                                             ; preds = %1125
  call void @llvm.lifetime.end.p0(i64 32, ptr %109) #7
  br label %1128

1128:                                             ; preds = %1127, %1125
  %1129 = load i1, ptr %107, align 1
  br i1 %1129, label %1130, label %1131

1130:                                             ; preds = %1128
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %69) #7
  br label %1131

1131:                                             ; preds = %1130, %1128
  br label %1132

1132:                                             ; preds = %1131, %1079
  %1133 = load i1, ptr %106, align 1
  br i1 %1133, label %1134, label %1135

1134:                                             ; preds = %1132
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %103) #7
  br label %1135

1135:                                             ; preds = %1134, %1132
  br label %1136

1136:                                             ; preds = %1135, %1075
  call void @llvm.lifetime.end.p0(i64 4, ptr %105) #7
  %1137 = load i1, ptr %104, align 1
  br i1 %1137, label %1138, label %1139

1138:                                             ; preds = %1136
  call void @llvm.lifetime.end.p0(i64 32, ptr %103) #7
  br label %1139

1139:                                             ; preds = %1138, %1136
  %1140 = load i1, ptr %102, align 1
  br i1 %1140, label %1141, label %1142

1141:                                             ; preds = %1139
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %70) #7
  br label %1142

1142:                                             ; preds = %1141, %1139
  br label %1143

1143:                                             ; preds = %1142, %1071
  %1144 = load i1, ptr %101, align 1
  br i1 %1144, label %1145, label %1146

1145:                                             ; preds = %1143
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %72) #7
  br label %1146

1146:                                             ; preds = %1145, %1143
  br label %1147

1147:                                             ; preds = %1146, %1067
  %1148 = load i1, ptr %100, align 1
  br i1 %1148, label %1149, label %1150

1149:                                             ; preds = %1147
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %95) #7
  br label %1150

1150:                                             ; preds = %1149, %1147
  br label %1151

1151:                                             ; preds = %1150, %1063
  %1152 = load i1, ptr %99, align 1
  br i1 %1152, label %1153, label %1154

1153:                                             ; preds = %1151
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %97) #7
  br label %1154

1154:                                             ; preds = %1153, %1151
  %1155 = load i1, ptr %98, align 1
  br i1 %1155, label %1156, label %1157

1156:                                             ; preds = %1154
  call void @llvm.lifetime.end.p0(i64 1, ptr %97) #7
  br label %1157

1157:                                             ; preds = %1156, %1154
  %1158 = load i1, ptr %96, align 1
  br i1 %1158, label %1159, label %1160

1159:                                             ; preds = %1157
  call void @llvm.lifetime.end.p0(i64 32, ptr %95) #7
  br label %1160

1160:                                             ; preds = %1159, %1157
  %1161 = load i1, ptr %94, align 1
  br i1 %1161, label %1162, label %1163

1162:                                             ; preds = %1160
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %74) #7
  br label %1163

1163:                                             ; preds = %1162, %1160
  br label %1164

1164:                                             ; preds = %1163, %1059
  %1165 = load i1, ptr %93, align 1
  br i1 %1165, label %1166, label %1167

1166:                                             ; preds = %1164
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %76) #7
  br label %1167

1167:                                             ; preds = %1166, %1164
  br label %1168

1168:                                             ; preds = %1167, %1055
  %1169 = load i1, ptr %92, align 1
  br i1 %1169, label %1170, label %1171

1170:                                             ; preds = %1168
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %87) #7
  br label %1171

1171:                                             ; preds = %1170, %1168
  br label %1172

1172:                                             ; preds = %1171, %1051
  %1173 = load i1, ptr %91, align 1
  br i1 %1173, label %1174, label %1175

1174:                                             ; preds = %1172
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %89) #7
  br label %1175

1175:                                             ; preds = %1174, %1172
  %1176 = load i1, ptr %90, align 1
  br i1 %1176, label %1177, label %1178

1177:                                             ; preds = %1175
  call void @llvm.lifetime.end.p0(i64 1, ptr %89) #7
  br label %1178

1178:                                             ; preds = %1177, %1175
  %1179 = load i1, ptr %88, align 1
  br i1 %1179, label %1180, label %1181

1180:                                             ; preds = %1178
  call void @llvm.lifetime.end.p0(i64 32, ptr %87) #7
  br label %1181

1181:                                             ; preds = %1180, %1178
  %1182 = load i1, ptr %86, align 1
  br i1 %1182, label %1183, label %1184

1183:                                             ; preds = %1181
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %78) #7
  br label %1184

1184:                                             ; preds = %1183, %1181
  br label %1185

1185:                                             ; preds = %1184, %1047
  %1186 = load i1, ptr %85, align 1
  br i1 %1186, label %1187, label %1188

1187:                                             ; preds = %1185
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %80) #7
  br label %1188

1188:                                             ; preds = %1187, %1185
  br label %1189

1189:                                             ; preds = %1188, %1043
  %1190 = load i1, ptr %84, align 1
  br i1 %1190, label %1191, label %1192

1191:                                             ; preds = %1189
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %82) #7
  br label %1192

1192:                                             ; preds = %1191, %1189
  %1193 = load i1, ptr %83, align 1
  br i1 %1193, label %1194, label %1195

1194:                                             ; preds = %1192
  call void @llvm.lifetime.end.p0(i64 1, ptr %82) #7
  br label %1195

1195:                                             ; preds = %1194, %1192
  %1196 = load i1, ptr %81, align 1
  br i1 %1196, label %1197, label %1198

1197:                                             ; preds = %1195
  call void @llvm.lifetime.end.p0(i64 32, ptr %80) #7
  br label %1198

1198:                                             ; preds = %1197, %1195
  %1199 = load i1, ptr %79, align 1
  br i1 %1199, label %1200, label %1201

1200:                                             ; preds = %1198
  call void @llvm.lifetime.end.p0(i64 32, ptr %78) #7
  br label %1201

1201:                                             ; preds = %1200, %1198
  %1202 = load i1, ptr %77, align 1
  br i1 %1202, label %1203, label %1204

1203:                                             ; preds = %1201
  call void @llvm.lifetime.end.p0(i64 32, ptr %76) #7
  br label %1204

1204:                                             ; preds = %1203, %1201
  %1205 = load i1, ptr %75, align 1
  br i1 %1205, label %1206, label %1207

1206:                                             ; preds = %1204
  call void @llvm.lifetime.end.p0(i64 32, ptr %74) #7
  br label %1207

1207:                                             ; preds = %1206, %1204
  %1208 = load i1, ptr %73, align 1
  br i1 %1208, label %1209, label %1210

1209:                                             ; preds = %1207
  call void @llvm.lifetime.end.p0(i64 32, ptr %72) #7
  br label %1210

1210:                                             ; preds = %1209, %1207
  %1211 = load i1, ptr %71, align 1
  br i1 %1211, label %1212, label %1213

1212:                                             ; preds = %1210
  call void @llvm.lifetime.end.p0(i64 32, ptr %70) #7
  br label %1213

1213:                                             ; preds = %1212, %1210
  call void @llvm.lifetime.end.p0(i64 4, ptr %68) #7
  br label %1266

1214:                                             ; preds = %927, %905
  br label %1215

1215:                                             ; preds = %1214, %756
  br label %1216

1216:                                             ; preds = %1215, %753
  %1217 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 3
  %1218 = load ptr, ptr %1217, align 8, !tbaa !32
  %1219 = load i32, ptr %68, align 4, !tbaa !22
  %1220 = sext i32 %1219 to i64
  %1221 = getelementptr inbounds %class.CornerApex, ptr %1218, i64 %1220
  %1222 = load double, ptr %4, align 8, !tbaa !9
  %1223 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 4
  %1224 = load double, ptr %1223, align 8, !tbaa !33
  %1225 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 3
  %1226 = load double, ptr %1225, align 8, !tbaa !34
  %1227 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %1228 = load i32, ptr %68, align 4, !tbaa !22
  %1229 = sext i32 %1228 to i64
  %1230 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1227, i64 noundef %1229) #7
  %1231 = load double, ptr %1230, align 8, !tbaa !9
  %1232 = load double, ptr %9, align 8, !tbaa !9
  %1233 = load i8, ptr %8, align 1, !tbaa !17, !range !35, !noundef !36
  %1234 = trunc i8 %1233 to i1
  call void @_ZN10CornerApex14initCornerApexEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %1221, double noundef %1222, double noundef %1224, double noundef %1226, double noundef %1231, double noundef %1232, i1 noundef zeroext %1234)
  %1235 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 4
  %1236 = load ptr, ptr %1235, align 8, !tbaa !31
  %1237 = load i32, ptr %68, align 4, !tbaa !22
  %1238 = sext i32 %1237 to i64
  %1239 = getelementptr inbounds %class.LayerApex, ptr %1236, i64 %1238
  %1240 = load ptr, ptr %6, align 8, !tbaa !5
  %1241 = getelementptr inbounds %"struct.std::pair.0", ptr %1240, i32 0, i32 1
  %1242 = load double, ptr %1241, align 8, !tbaa !37
  %1243 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 4
  %1244 = load double, ptr %1243, align 8, !tbaa !33
  %1245 = getelementptr inbounds %class.VoidElem, ptr %122, i32 0, i32 3
  %1246 = load double, ptr %1245, align 8, !tbaa !34
  %1247 = getelementptr inbounds %class.Polygon, ptr %122, i32 0, i32 2
  %1248 = load i32, ptr %68, align 4, !tbaa !22
  %1249 = sext i32 %1248 to i64
  %1250 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1247, i64 noundef %1249) #7
  %1251 = load double, ptr %1250, align 8, !tbaa !9
  %1252 = load double, ptr %9, align 8, !tbaa !9
  %1253 = load i8, ptr %8, align 1, !tbaa !17, !range !35, !noundef !36
  %1254 = trunc i8 %1253 to i1
  %1255 = call noundef zeroext i1 @_ZN9LayerApex13initLayerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %1239, double noundef %1242, double noundef %1244, double noundef %1246, double noundef %1251, double noundef %1252, i1 noundef zeroext %1254, i1 noundef zeroext false)
  br i1 %1255, label %1257, label %1256

1256:                                             ; preds = %1216
  br label %1257

1257:                                             ; preds = %1256, %1216
  br label %1258

1258:                                             ; preds = %1257
  %1259 = load i32, ptr %68, align 4, !tbaa !22
  %1260 = add nsw i32 %1259, 1
  store i32 %1260, ptr %68, align 4, !tbaa !22
  br label %707, !llvm.loop !44

1261:                                             ; preds = %712
  %1262 = getelementptr inbounds %class.ElemModel, ptr %122, i32 0, i32 3
  %1263 = load ptr, ptr %1262, align 8, !tbaa !11
  %1264 = getelementptr inbounds %class.Apex, ptr %1263, i32 0, i32 1
  store i8 0, ptr %1264, align 8, !tbaa !41
  br label %1265

1265:                                             ; preds = %1261, %701
  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

1266:                                             ; preds = %1213, %535
  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 %1267

1267:                                             ; preds = %1266
  %1268 = load ptr, ptr %28, align 8
  %1269 = load i32, ptr %29, align 4
  %1270 = insertvalue { ptr, i32 } poison, ptr %1268, 0
  %1271 = insertvalue { ptr, i32 } %1270, i32 %1269, 1
  resume { ptr, i32 } %1271
}

; 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 void @_ZN10CornerApex15finitCornerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144), double noundef, double noundef, double noundef, double noundef, double noundef, i1 noundef zeroext, i1 noundef zeroext) #5

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

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
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext) #3 align 2

declare noundef zeroext i1 @_ZNK4Elem20canBeAddedToEventVecERK5Fluid(ptr noundef nonnull align 8 dereferenceable(408), ptr noundef nonnull align 8 dereferenceable(80)) #5

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

attributes #0 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!19, !14, i64 0}
!19 = !{!"_ZTSSt4pairIidE", !14, i64 0, !10, i64 8}
!20 = !{!21, !21, i64 0}
!21 = !{!"vtable pointer", !8, i64 0}
!22 = !{!14, !14, i64 0}
!23 = !{!24, !14, i64 184}
!24 = !{!"_ZTS7Polygon", !25, i64 0, !14, i64 184, !26, i64 192, !6, i64 216, !6, i64 224, !30, i64 232, !7, i64 234, !10, i64 240}
!25 = !{!"_ZTS8VoidElem", !12, i64 0, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176}
!26 = !{!"_ZTSSt6vectorIdSaIdEE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!"short", !7, i64 0}
!31 = !{!24, !6, i64 224}
!32 = !{!24, !6, i64 216}
!33 = !{!25, !10, i64 176}
!34 = !{!25, !10, i64 168}
!35 = !{i8 0, i8 2}
!36 = !{}
!37 = !{!19, !10, i64 8}
!38 = !{!12, !10, i64 40}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{!42, !13, i64 8}
!42 = !{!"_ZTS4Apex", !13, i64 8, !10, i64 16, !10, i64 24, !6, i64 32, !14, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !13, i64 80, !13, i64 81, !13, i64 82, !13, i64 83, !19, i64 88}
!43 = distinct !{!43, !40}
!44 = distinct !{!44, !40}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::__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
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.11 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [29 x i8], align 1
@__FUNCTION__._ZN7Polygon28calcOilLayerPc_syncTrappingsEd = external hidden unnamed_addr constant [29 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [14 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 double @_ZNK4Apex7entryPcEv(ptr noundef nonnull align 8 dereferenceable(104)) 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 @_ZNK9LayerApex13trappedOLayerEv(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 @_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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local 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 uwtable
define dso_local void @_ZN7Polygon28calcOilLayerPc_syncTrappingsEd(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 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca %"class.std::__cxx11::basic_string", align 8
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca %"class.std::allocator.7", align 1
  %30 = alloca %"class.std::__cxx11::basic_string", align 8
  %31 = alloca %"class.std::allocator.7", align 1
  %32 = alloca %"class.std::__cxx11::basic_string", align 8
  %33 = alloca %"class.std::allocator.7", align 1
  %34 = alloca %"class.std::__cxx11::basic_string", align 8
  %35 = alloca i32, align 4
  %36 = alloca %"class.std::__cxx11::basic_string", align 8
  %37 = alloca %"class.std::__cxx11::basic_string", align 8
  %38 = alloca %"class.std::allocator.7", align 1
  %39 = alloca %"class.std::__cxx11::basic_string", align 8
  %40 = alloca %"class.std::allocator.7", align 1
  %41 = getelementptr inbounds i8, ptr %0, i64 24
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  %43 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem11trappingOilEv(ptr noundef nonnull align 8 dereferenceable(408) %42)
  %44 = load ptr, ptr %41, align 8, !tbaa !5
  %45 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem15trappingWatBulkEv(ptr noundef nonnull align 8 dereferenceable(408) %44)
  %46 = load ptr, ptr %41, align 8, !tbaa !5
  %47 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem15trappingWatFilmEv(ptr noundef nonnull align 8 dereferenceable(408) %46)
  %48 = getelementptr inbounds i8, ptr %0, i64 32
  %49 = load ptr, ptr %48, align 8, !tbaa !14
  %50 = tail call noundef ptr @_ZNK10CommonData9injectantEv(ptr noundef nonnull align 8 dereferenceable(1972) %49)
  %51 = load ptr, ptr %48, align 8, !tbaa !14
  %52 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984) %51)
  %53 = icmp eq ptr %50, %52
  %54 = load ptr, ptr %48, align 8, !tbaa !14
  %55 = tail call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %54)
  %56 = load i32, ptr %43, align 8, !tbaa !15
  %57 = icmp sgt i32 %56, -1
  br i1 %57, label %58, label %197

58:                                               ; preds = %2
  %59 = load ptr, ptr %0, align 8, !tbaa !17
  %60 = getelementptr inbounds i8, ptr %59, i64 152
  %61 = load ptr, ptr %60, align 8
  %62 = tail call noundef zeroext i1 %61(ptr noundef nonnull align 8 dereferenceable(152) %0)
  %63 = load i32, ptr %45, align 8
  %64 = icmp sgt i32 %63, 0
  %or.cond = select i1 %62, i1 %64, i1 false
  br i1 %or.cond, label %65, label %67

65:                                               ; preds = %58
  %66 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.16)
  br label %67

67:                                               ; preds = %65, %58
  %68 = getelementptr inbounds i8, ptr %0, i64 184
  %69 = load i32, ptr %68, align 8, !tbaa !19
  %70 = icmp sgt i32 %69, 0
  br i1 %70, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %67
  %71 = getelementptr inbounds i8, ptr %0, i64 224
  %72 = getelementptr inbounds i8, ptr %0, i64 216
  %73 = getelementptr inbounds i8, ptr %0, i64 176
  %74 = getelementptr inbounds i8, ptr %0, i64 168
  %75 = getelementptr inbounds i8, ptr %0, i64 192
  %76 = getelementptr inbounds i8, ptr %43, i64 8
  %77 = getelementptr inbounds i8, ptr %0, i64 40
  br label %80

._crit_edge:                                      ; preds = %.critedge388, %67
  %78 = load ptr, ptr %41, align 8, !tbaa !5
  %79 = getelementptr inbounds i8, ptr %78, i64 8
  store i8 0, ptr %79, align 8, !tbaa !27
  br label %197

80:                                               ; preds = %.lr.ph, %.critedge388
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %.critedge388 ]
  %81 = load ptr, ptr %71, align 8, !tbaa !29
  %82 = getelementptr inbounds %class.LayerApex, ptr %81, i64 %indvars.iv
  %83 = call noundef double @_ZNK9LayerApex11layerCollPcEv(ptr noundef nonnull align 8 dereferenceable(144) %82)
  %84 = load ptr, ptr %72, align 8, !tbaa !30
  %85 = getelementptr inbounds %class.CornerApex, ptr %84, i64 %indvars.iv
  %86 = load double, ptr %73, align 8, !tbaa !31
  %87 = load double, ptr %74, align 8, !tbaa !32
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %indvars.iv) #7
  %89 = load double, ptr %88, align 8, !tbaa !33
  call void @_ZN10CornerApex15finitCornerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %85, double noundef %1, double noundef %86, double noundef %87, double noundef %89, double noundef %55, i1 noundef zeroext %53, i1 noundef zeroext true)
  %90 = load ptr, ptr %71, align 8, !tbaa !29
  %91 = getelementptr inbounds %class.LayerApex, ptr %90, i64 %indvars.iv
  %92 = load double, ptr %76, align 8, !tbaa !34
  %93 = load double, ptr %73, align 8, !tbaa !31
  %94 = load double, ptr %74, align 8, !tbaa !32
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %indvars.iv) #7
  %96 = load double, ptr %95, align 8, !tbaa !33
  %97 = call noundef zeroext i1 @_ZN9LayerApex14finitLayerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %91, double noundef %92, double noundef %93, double noundef %94, double noundef %96, double noundef %55, i1 noundef zeroext %53, i1 noundef zeroext true)
  br i1 %97, label %101, label %98

98:                                               ; preds = %80
  %99 = trunc nuw nsw i64 %indvars.iv to i32
  %100 = call noundef double @_ZN7Polygon25Pc_pin_disconnectOilLayerEi(ptr noundef nonnull align 8 dereferenceable(248) %0, i32 noundef %99)
  br label %.critedge388

101:                                              ; preds = %80
  %102 = load ptr, ptr %71, align 8, !tbaa !29
  %103 = getelementptr inbounds %class.LayerApex, ptr %102, i64 %indvars.iv
  %104 = call noundef zeroext i1 @_ZNK4Apex6existsEv(ptr noundef nonnull align 8 dereferenceable(104) %103)
  br i1 %104, label %105, label %.critedge388

105:                                              ; preds = %101
  %106 = load ptr, ptr %71, align 8, !tbaa !29
  %107 = getelementptr inbounds %class.LayerApex, ptr %106, i64 %indvars.iv
  %108 = call noundef double @_ZNK9LayerApex14pinnedApexDistEv(ptr noundef nonnull align 8 dereferenceable(144) %107)
  %109 = load double, ptr %77, align 8, !tbaa !35
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef 0) #7
  %111 = load double, ptr %110, align 8, !tbaa !33
  %112 = call double @tan(double noundef %111) #7
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef 1) #7
  %114 = load double, ptr %113, align 8, !tbaa !33
  %115 = call double @tan(double noundef %114) #7
  %116 = insertelement <2 x double> poison, double %112, i64 0
  %117 = insertelement <2 x double> %116, double %115, i64 1
  %118 = fdiv <2 x double> <double 1.000000e+00, double 1.000000e+00>, %117
  %shift = shufflevector <2 x double> %118, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %119 = fadd <2 x double> %118, %shift
  %120 = extractelement <2 x double> %119, i64 0
  %121 = fmul double %109, %120
  %122 = fcmp uge double %108, %121
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  br i1 %122, label %123, label %138

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

124:                                              ; preds = %123
  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 %125 unwind label %141

125:                                              ; preds = %124
  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__._ZN7Polygon28calcOilLayerPc_syncTrappingsEd, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %126 unwind label %143

126:                                              ; preds = %125
  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 %127 unwind label %145

127:                                              ; preds = %126
  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 %128 unwind label %147

128:                                              ; preds = %127
  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 %129 unwind label %149

129:                                              ; preds = %128
  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 %130 unwind label %151

130:                                              ; preds = %129
  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 %131 unwind label %153

131:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #7
  store i32 362, ptr %16, align 4, !tbaa !36
  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 %132 unwind label %155

132:                                              ; preds = %131
  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 %133 unwind label %157

133:                                              ; preds = %132
  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 %134 unwind label %159

134:                                              ; preds = %133
  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 %135 unwind label %161

135:                                              ; preds = %134
  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 %136 unwind label %163

136:                                              ; preds = %135
  %137 = invoke noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef nonnull %3, ptr noundef nonnull %17, i32 noundef 0)
          to label %.critedge367 unwind label %165

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

.critedge367:                                     ; preds = %136
  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 %.critedge388

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

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

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

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

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

149:                                              ; preds = %128
  %150 = landingpad { ptr, i32 }
          cleanup
  br label %174

151:                                              ; preds = %129
  %152 = landingpad { ptr, i32 }
          cleanup
  br label %173

153:                                              ; preds = %130
  %154 = landingpad { ptr, i32 }
          cleanup
  br label %172

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

157:                                              ; preds = %132
  %158 = landingpad { ptr, i32 }
          cleanup
  br label %170

159:                                              ; preds = %133
  %160 = landingpad { ptr, i32 }
          cleanup
  br label %169

161:                                              ; preds = %134
  %162 = landingpad { ptr, i32 }
          cleanup
  br label %168

163:                                              ; preds = %135
  %164 = landingpad { ptr, i32 }
          cleanup
  br label %167

165:                                              ; preds = %136
  %166 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %167

167:                                              ; preds = %163, %165
  %.pn339 = phi { ptr, i32 } [ %166, %165 ], [ %164, %163 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  br label %168

168:                                              ; preds = %161, %167
  %.pn339.pn = phi { ptr, i32 } [ %.pn339, %167 ], [ %162, %161 ]
  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 %169

169:                                              ; preds = %159, %168
  %.pn339.pn.pn = phi { ptr, i32 } [ %.pn339.pn, %168 ], [ %160, %159 ]
  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 %170

170:                                              ; preds = %157, %169
  %.pn339.pn.pn.pn = phi { ptr, i32 } [ %.pn339.pn.pn, %169 ], [ %158, %157 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %171

171:                                              ; preds = %170, %155
  %.pn339.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn339.pn.pn.pn, %170 ], [ %156, %155 ]
  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 %172

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

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

174:                                              ; preds = %149, %173
  %.pn339.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn339.pn.pn.pn.pn.pn.pn, %173 ], [ %150, %149 ]
  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 %175

175:                                              ; preds = %147, %174
  %.pn339.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn339.pn.pn.pn.pn.pn.pn.pn, %174 ], [ %148, %147 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  br label %176

176:                                              ; preds = %145, %175
  %.pn339.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn339.pn.pn.pn.pn.pn.pn.pn.pn, %175 ], [ %146, %145 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %177

177:                                              ; preds = %143, %176
  %.pn339.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn339.pn.pn.pn.pn.pn.pn.pn.pn.pn, %176 ], [ %144, %143 ]
  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 %178

178:                                              ; preds = %141, %177
  %.pn339.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn339.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %177 ], [ %142, %141 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  br label %179

179:                                              ; preds = %139, %178
  %.pn339.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn339.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %178 ], [ %140, %139 ]
  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 %484

.critedge388:                                     ; preds = %138, %101, %.critedge367, %98
  %180 = load ptr, ptr %71, align 8, !tbaa !29
  %181 = getelementptr inbounds %class.LayerApex, ptr %180, i64 %indvars.iv
  %182 = load double, ptr %73, align 8, !tbaa !31
  %183 = load double, ptr %74, align 8, !tbaa !32
  %184 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %indvars.iv) #7
  %185 = load double, ptr %184, align 8, !tbaa !33
  %186 = load ptr, ptr %48, align 8, !tbaa !14
  %187 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %186)
  call void @_ZN9LayerApex24markCentreLayerTrappingsERKSt4pairIidEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %181, ptr noundef nonnull align 8 dereferenceable(16) %43, double noundef %1, double noundef %182, double noundef %183, double noundef %185, double noundef %187, i1 noundef zeroext %53)
  %188 = load ptr, ptr %72, align 8, !tbaa !30
  %189 = getelementptr inbounds %class.CornerApex, ptr %188, i64 %indvars.iv
  %190 = load double, ptr %73, align 8, !tbaa !31
  %191 = load double, ptr %74, align 8, !tbaa !32
  %192 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %indvars.iv) #7
  %193 = load double, ptr %192, align 8, !tbaa !33
  call void @_ZN10CornerApex14initCornerApexEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %189, double noundef %1, double noundef %190, double noundef %191, double noundef %193, double noundef %55, i1 noundef zeroext %53)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %194 = load i32, ptr %68, align 8, !tbaa !19
  %195 = sext i32 %194 to i64
  %196 = icmp slt i64 %indvars.iv.next, %195
  br i1 %196, label %80, label %._crit_edge, !llvm.loop !37

197:                                              ; preds = %._crit_edge, %2
  %198 = load i32, ptr %47, align 8, !tbaa !15
  %199 = icmp sgt i32 %198, -1
  br i1 %199, label %.preheader426, label %.loopexit

.preheader426:                                    ; preds = %197
  %200 = getelementptr inbounds i8, ptr %0, i64 184
  %201 = load i32, ptr %200, align 8, !tbaa !19
  %202 = icmp sgt i32 %201, 0
  br i1 %202, label %.lr.ph429, label %.loopexit

.lr.ph429:                                        ; preds = %.preheader426
  %203 = getelementptr inbounds i8, ptr %0, i64 216
  %204 = getelementptr inbounds i8, ptr %0, i64 176
  %205 = getelementptr inbounds i8, ptr %0, i64 168
  %206 = getelementptr inbounds i8, ptr %0, i64 192
  %207 = getelementptr inbounds i8, ptr %0, i64 224
  br label %208

208:                                              ; preds = %.lr.ph429, %225
  %indvars.iv434 = phi i64 [ 0, %.lr.ph429 ], [ %indvars.iv.next435, %225 ]
  %209 = load ptr, ptr %203, align 8, !tbaa !30
  %210 = getelementptr inbounds %class.CornerApex, ptr %209, i64 %indvars.iv434
  %211 = load double, ptr %204, align 8, !tbaa !31
  %212 = load double, ptr %205, align 8, !tbaa !32
  %213 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %206, i64 noundef %indvars.iv434) #7
  %214 = load double, ptr %213, align 8, !tbaa !33
  call void @_ZN10CornerApex15finitCornerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %210, double noundef %1, double noundef %211, double noundef %212, double noundef %214, double noundef %55, i1 noundef zeroext %53, i1 noundef zeroext true)
  %215 = load ptr, ptr %207, align 8, !tbaa !29
  %216 = getelementptr inbounds %class.LayerApex, ptr %215, i64 %indvars.iv434
  %217 = load double, ptr %204, align 8, !tbaa !31
  %218 = load double, ptr %205, align 8, !tbaa !32
  %219 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %206, i64 noundef %indvars.iv434) #7
  %220 = load double, ptr %219, align 8, !tbaa !33
  %221 = call noundef zeroext i1 @_ZN9LayerApex14finitLayerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %216, double noundef %1, double noundef %217, double noundef %218, double noundef %220, double noundef %55, i1 noundef zeroext %53, i1 noundef zeroext false)
  br i1 %221, label %225, label %222

222:                                              ; preds = %208
  %223 = trunc nuw nsw i64 %indvars.iv434 to i32
  %224 = call noundef double @_ZN7Polygon25Pc_pin_disconnectOilLayerEi(ptr noundef nonnull align 8 dereferenceable(248) %0, i32 noundef %223)
  br label %225

225:                                              ; preds = %222, %208
  %226 = load ptr, ptr %203, align 8, !tbaa !30
  %227 = getelementptr inbounds %class.CornerApex, ptr %226, i64 %indvars.iv434
  %228 = load double, ptr %204, align 8, !tbaa !31
  %229 = load double, ptr %205, align 8, !tbaa !32
  %230 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %206, i64 noundef %indvars.iv434) #7
  %231 = load double, ptr %230, align 8, !tbaa !33
  call void @_ZN10CornerApex18markTrappingCornerERKSt4pairIidEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %227, ptr noundef nonnull align 8 dereferenceable(16) %47, double noundef %1, double noundef %228, double noundef %229, double noundef %231, double noundef %55, i1 noundef zeroext %53)
  %232 = load ptr, ptr %207, align 8, !tbaa !29
  %233 = getelementptr inbounds %class.LayerApex, ptr %232, i64 %indvars.iv434
  %234 = load double, ptr %204, align 8, !tbaa !31
  %235 = load double, ptr %205, align 8, !tbaa !32
  %236 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %206, i64 noundef %indvars.iv434) #7
  %237 = load double, ptr %236, align 8, !tbaa !33
  call void @_ZN9LayerApex24markCentreLayerTrappingsERKSt4pairIidEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %233, ptr noundef nonnull align 8 dereferenceable(16) %43, double noundef %1, double noundef %234, double noundef %235, double noundef %237, double noundef %55, i1 noundef zeroext %53)
  %238 = load ptr, ptr %207, align 8, !tbaa !29
  %239 = getelementptr inbounds %class.LayerApex, ptr %238, i64 %indvars.iv434
  %240 = load double, ptr %204, align 8, !tbaa !31
  %241 = load double, ptr %205, align 8, !tbaa !32
  %242 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %206, i64 noundef %indvars.iv434) #7
  %243 = load double, ptr %242, align 8, !tbaa !33
  %244 = call noundef zeroext i1 @_ZN9LayerApex13initLayerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %239, double noundef %1, double noundef %240, double noundef %241, double noundef %243, double noundef %55, i1 noundef zeroext %53, i1 noundef zeroext false)
  %indvars.iv.next435 = add nuw nsw i64 %indvars.iv434, 1
  %245 = load i32, ptr %200, align 8, !tbaa !19
  %246 = sext i32 %245 to i64
  %247 = icmp slt i64 %indvars.iv.next435, %246
  br i1 %247, label %208, label %.loopexit, !llvm.loop !39

.loopexit:                                        ; preds = %225, %.preheader426, %197
  %248 = load i32, ptr %45, align 8, !tbaa !15
  %249 = icmp sgt i32 %248, -1
  br i1 %249, label %.preheader, label %483

.preheader:                                       ; preds = %.loopexit
  %250 = getelementptr inbounds i8, ptr %0, i64 184
  %251 = load i32, ptr %250, align 8, !tbaa !19
  %252 = icmp sgt i32 %251, 0
  br i1 %252, label %.lr.ph431, label %._crit_edge432

.lr.ph431:                                        ; preds = %.preheader
  %253 = getelementptr inbounds i8, ptr %0, i64 216
  %254 = getelementptr inbounds i8, ptr %0, i64 176
  %255 = getelementptr inbounds i8, ptr %0, i64 168
  %256 = getelementptr inbounds i8, ptr %0, i64 192
  %257 = getelementptr inbounds i8, ptr %0, i64 224
  %258 = getelementptr inbounds i8, ptr %45, i64 8
  %259 = getelementptr inbounds i8, ptr %0, i64 40
  br label %262

._crit_edge432:                                   ; preds = %465, %.preheader
  %260 = load ptr, ptr %41, align 8, !tbaa !5
  %261 = getelementptr inbounds i8, ptr %260, i64 8
  store i8 0, ptr %261, align 8, !tbaa !27
  br label %483

262:                                              ; preds = %.lr.ph431, %465
  %indvars.iv437 = phi i64 [ 0, %.lr.ph431 ], [ %indvars.iv.next438, %465 ]
  %263 = load ptr, ptr %253, align 8, !tbaa !30
  %264 = getelementptr inbounds %class.CornerApex, ptr %263, i64 %indvars.iv437
  %265 = load double, ptr %254, align 8, !tbaa !31
  %266 = load double, ptr %255, align 8, !tbaa !32
  %267 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %256, i64 noundef %indvars.iv437) #7
  %268 = load double, ptr %267, align 8, !tbaa !33
  call void @_ZN10CornerApex15finitCornerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %264, double noundef %1, double noundef %265, double noundef %266, double noundef %268, double noundef %55, i1 noundef zeroext %53, i1 noundef zeroext false)
  %269 = load ptr, ptr %257, align 8, !tbaa !29
  %270 = getelementptr inbounds %class.LayerApex, ptr %269, i64 %indvars.iv437
  %271 = load double, ptr %258, align 8, !tbaa !34
  %272 = load double, ptr %254, align 8, !tbaa !31
  %273 = load double, ptr %255, align 8, !tbaa !32
  %274 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %256, i64 noundef %indvars.iv437) #7
  %275 = load double, ptr %274, align 8, !tbaa !33
  %276 = call noundef zeroext i1 @_ZN9LayerApex14finitLayerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %270, double noundef %271, double noundef %272, double noundef %273, double noundef %275, double noundef %55, i1 noundef zeroext %53, i1 noundef zeroext true)
  br i1 %276, label %280, label %277

277:                                              ; preds = %262
  %278 = trunc nuw nsw i64 %indvars.iv437 to i32
  %279 = call noundef double @_ZN7Polygon25Pc_pin_disconnectOilLayerEi(ptr noundef nonnull align 8 dereferenceable(248) %0, i32 noundef %278)
  br label %465

280:                                              ; preds = %262
  %281 = load ptr, ptr %257, align 8, !tbaa !29
  %282 = getelementptr inbounds %class.LayerApex, ptr %281, i64 %indvars.iv437
  %283 = call noundef zeroext i1 @_ZNK4Apex6existsEv(ptr noundef nonnull align 8 dereferenceable(104) %282)
  br i1 %283, label %284, label %465

284:                                              ; preds = %280
  %285 = load ptr, ptr %257, align 8, !tbaa !29
  %286 = getelementptr inbounds %class.LayerApex, ptr %285, i64 %indvars.iv437
  %287 = call noundef double @_ZNK9LayerApex14pinnedApexDistEv(ptr noundef nonnull align 8 dereferenceable(144) %286)
  %288 = load double, ptr %259, align 8, !tbaa !35
  %289 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %256, i64 noundef 0) #7
  %290 = load double, ptr %289, align 8, !tbaa !33
  %291 = call double @tan(double noundef %290) #7
  %292 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %256, i64 noundef 1) #7
  %293 = load double, ptr %292, align 8, !tbaa !33
  %294 = call double @tan(double noundef %293) #7
  %295 = insertelement <2 x double> poison, double %291, i64 0
  %296 = insertelement <2 x double> %295, double %294, i64 1
  %297 = fdiv <2 x double> <double 1.000000e+00, double 1.000000e+00>, %296
  %shift440 = shufflevector <2 x double> %297, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %298 = fadd <2 x double> %297, %shift440
  %299 = extractelement <2 x double> %298, i64 0
  %300 = fmul double %288, %299
  %301 = fcmp uge double %287, %300
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %35) #7
  br i1 %301, label %302, label %317

302:                                              ; preds = %284
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %23) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %24) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %25) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %26) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %27) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %28) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %29) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %29)
          to label %303 unwind label %424

303:                                              ; preds = %302
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %27, ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef nonnull @.str.1)
          to label %304 unwind label %426

304:                                              ; preds = %303
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %30) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %31) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull @__FUNCTION__._ZN7Polygon28calcOilLayerPc_syncTrappingsEd, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %305 unwind label %428

305:                                              ; preds = %304
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %26, ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull align 8 dereferenceable(32) %30)
          to label %306 unwind label %430

306:                                              ; preds = %305
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %25, ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull @.str.2)
          to label %307 unwind label %432

307:                                              ; preds = %306
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %32) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %33) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %33)
          to label %308 unwind label %434

308:                                              ; preds = %307
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %24, ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 8 dereferenceable(32) %32)
          to label %309 unwind label %436

309:                                              ; preds = %308
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %23, ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef nonnull @.str.4)
          to label %310 unwind label %438

310:                                              ; preds = %309
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %34) #7
  store i32 409, ptr %35, align 4, !tbaa !36
  invoke void @_Z2_sIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %34, ptr noundef nonnull align 4 dereferenceable(4) %35)
          to label %311 unwind label %440

311:                                              ; preds = %310
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %22, ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull align 8 dereferenceable(32) %34)
          to label %312 unwind label %442

312:                                              ; preds = %311
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %37) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %38) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %37, ptr noundef nonnull @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %38)
          to label %313 unwind label %444

313:                                              ; preds = %312
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %39) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %40) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %40) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %39, ptr noundef nonnull @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %40)
          to label %314 unwind label %446

314:                                              ; preds = %313
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %36, ptr noundef nonnull align 8 dereferenceable(32) %37, ptr noundef nonnull align 8 dereferenceable(32) %39)
          to label %315 unwind label %448

315:                                              ; preds = %314
  %316 = invoke noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef nonnull %22, ptr noundef nonnull %36, i32 noundef 0)
          to label %.critedge403 unwind label %450

317:                                              ; preds = %284
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %35) #7
  br label %.critedge424

.critedge403:                                     ; preds = %315
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %39) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %40) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %40) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %39) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %37) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %38) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %37) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %35) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %34) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %33) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %32) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %31) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %30) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %29) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %28) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %27) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %26) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %23) #7
  br label %.critedge424

.critedge424:                                     ; preds = %317, %.critedge403
  %318 = load ptr, ptr %257, align 8, !tbaa !29
  %319 = getelementptr inbounds %class.LayerApex, ptr %318, i64 %indvars.iv437
  %320 = call noundef double @_ZNK9LayerApex14pinnedApexDistEv(ptr noundef nonnull align 8 dereferenceable(144) %319)
  %321 = load double, ptr %259, align 8, !tbaa !35
  %322 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %256, i64 noundef 0) #7
  %323 = load double, ptr %322, align 8, !tbaa !33
  %324 = call double @tan(double noundef %323) #7
  %325 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %256, i64 noundef 1) #7
  %326 = load double, ptr %325, align 8, !tbaa !33
  %327 = call double @tan(double noundef %326) #7
  %328 = insertelement <2 x double> poison, double %324, i64 0
  %329 = insertelement <2 x double> %328, double %327, i64 1
  %330 = fdiv <2 x double> <double 1.000000e+00, double 1.000000e+00>, %329
  %shift441 = shufflevector <2 x double> %330, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %331 = fadd <2 x double> %330, %shift441
  %332 = extractelement <2 x double> %331, i64 0
  %333 = fmul double %321, %332
  %334 = fcmp olt double %320, %333
  br i1 %334, label %465, label %335

335:                                              ; preds = %.critedge424
  %336 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %337 = load ptr, ptr %41, align 8, !tbaa !5
  %338 = load ptr, ptr %48, align 8, !tbaa !14
  %339 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984) %338)
  %340 = call noundef zeroext i1 @_ZNK4Elem20canBeAddedToEventVecERK5Fluid(ptr noundef nonnull align 8 dereferenceable(408) %337, ptr noundef nonnull align 8 dereferenceable(80) %339)
  %341 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %336, i1 noundef zeroext %340)
  %342 = load ptr, ptr %41, align 8, !tbaa !5
  %343 = call noundef zeroext i1 @_ZNK4Apex15isInOilFloodVecEv(ptr noundef nonnull align 8 dereferenceable(104) %342)
  %344 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %341, i1 noundef zeroext %343)
  %345 = load ptr, ptr %41, align 8, !tbaa !5
  %346 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem15trappingWatFilmEv(ptr noundef nonnull align 8 dereferenceable(408) %345)
  %347 = load i32, ptr %346, align 8, !tbaa !15
  %348 = icmp sgt i32 %347, -1
  %349 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %344, i1 noundef zeroext %348)
  %350 = load ptr, ptr %48, align 8, !tbaa !14
  %351 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984) %350)
  %352 = load ptr, ptr %0, align 8, !tbaa !17
  %353 = getelementptr inbounds i8, ptr %352, i64 160
  %354 = load ptr, ptr %353, align 8
  %355 = call noundef zeroext i1 %354(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef nonnull align 8 dereferenceable(80) %351)
  %356 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %349, i1 noundef zeroext %355)
  %357 = load ptr, ptr %257, align 8, !tbaa !29
  %358 = getelementptr inbounds %class.LayerApex, ptr %357, i64 %indvars.iv437
  %359 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9LayerApex13trappedOLayerEv(ptr noundef nonnull align 8 dereferenceable(144) %358)
  %360 = load i32, ptr %359, align 8, !tbaa !15
  %361 = icmp sgt i32 %360, -1
  %362 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %356, i1 noundef zeroext %361)
  %363 = load ptr, ptr %41, align 8, !tbaa !5
  %364 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem11trappingOilEv(ptr noundef nonnull align 8 dereferenceable(408) %363)
  %365 = load i32, ptr %364, align 8, !tbaa !15
  %366 = icmp sgt i32 %365, -1
  %367 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %362, i1 noundef zeroext %366)
  %368 = load ptr, ptr %41, align 8, !tbaa !5
  %369 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem15trappingWatBulkEv(ptr noundef nonnull align 8 dereferenceable(408) %368)
  %370 = load i32, ptr %369, align 8, !tbaa !15
  %371 = icmp sgt i32 %370, -1
  %372 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %367, i1 noundef zeroext %371)
  %373 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %372, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %374 = load ptr, ptr %0, align 8, !tbaa !17
  %375 = getelementptr inbounds i8, ptr %374, i64 224
  %376 = load ptr, ptr %375, align 8
  %377 = call noundef double %376(ptr noundef nonnull align 8 dereferenceable(248) %0)
  %378 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %377)
  %379 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %378, ptr noundef nonnull @.str.17)
  %380 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %379, ptr noundef nonnull @.str.18)
  %381 = load double, ptr %258, align 8, !tbaa !34
  %382 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %380, double noundef %381)
  %383 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %382, ptr noundef nonnull @.str.17)
  %384 = load ptr, ptr %41, align 8, !tbaa !5
  %385 = call noundef double @_ZNK4Apex7entryPcEv(ptr noundef nonnull align 8 dereferenceable(104) %384)
  %386 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %383, double noundef %385)
  %387 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %386, ptr noundef nonnull @.str.19)
  %388 = load ptr, ptr %257, align 8, !tbaa !29
  %389 = getelementptr inbounds %class.LayerApex, ptr %388, i64 %indvars.iv437
  %390 = call noundef double @_ZNK9LayerApex14pinnedApexDistEv(ptr noundef nonnull align 8 dereferenceable(144) %389)
  %391 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %390)
  %392 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %391, ptr noundef nonnull @.str.20)
  %393 = load double, ptr %259, align 8, !tbaa !35
  %394 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %392, double noundef %393)
  %395 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %394, ptr noundef nonnull @.str.21)
  %396 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %256, i64 noundef 0) #7
  %397 = load double, ptr %396, align 8, !tbaa !33
  %398 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %395, double noundef %397)
  %399 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %398, ptr noundef nonnull @.str.22)
  %400 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %256, i64 noundef 1) #7
  %401 = load double, ptr %400, align 8, !tbaa !33
  %402 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %399, double noundef %401)
  %403 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %402, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %404 = load ptr, ptr %257, align 8, !tbaa !29
  %405 = getelementptr inbounds %class.LayerApex, ptr %404, i64 %indvars.iv437
  %406 = call noundef double @_ZNK9LayerApex14pinnedApexDistEv(ptr noundef nonnull align 8 dereferenceable(144) %405)
  %407 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %406)
  %408 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %407, ptr noundef nonnull @.str.20)
  %409 = load double, ptr %259, align 8, !tbaa !35
  %410 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %256, i64 noundef 0) #7
  %411 = load double, ptr %410, align 8, !tbaa !33
  %412 = call double @tan(double noundef %411) #7
  %413 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %256, i64 noundef 1) #7
  %414 = load double, ptr %413, align 8, !tbaa !33
  %415 = call double @tan(double noundef %414) #7
  %416 = insertelement <2 x double> poison, double %412, i64 0
  %417 = insertelement <2 x double> %416, double %415, i64 1
  %418 = fdiv <2 x double> <double 1.000000e+00, double 1.000000e+00>, %417
  %shift442 = shufflevector <2 x double> %418, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %419 = fadd <2 x double> %418, %shift442
  %420 = extractelement <2 x double> %419, i64 0
  %421 = fmul double %409, %420
  %422 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %408, double noundef %421)
  %423 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %422, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %465

424:                                              ; preds = %302
  %425 = landingpad { ptr, i32 }
          cleanup
  br label %464

426:                                              ; preds = %303
  %427 = landingpad { ptr, i32 }
          cleanup
  br label %463

428:                                              ; preds = %304
  %429 = landingpad { ptr, i32 }
          cleanup
  br label %462

430:                                              ; preds = %305
  %431 = landingpad { ptr, i32 }
          cleanup
  br label %461

432:                                              ; preds = %306
  %433 = landingpad { ptr, i32 }
          cleanup
  br label %460

434:                                              ; preds = %307
  %435 = landingpad { ptr, i32 }
          cleanup
  br label %459

436:                                              ; preds = %308
  %437 = landingpad { ptr, i32 }
          cleanup
  br label %458

438:                                              ; preds = %309
  %439 = landingpad { ptr, i32 }
          cleanup
  br label %457

440:                                              ; preds = %310
  %441 = landingpad { ptr, i32 }
          cleanup
  br label %456

442:                                              ; preds = %311
  %443 = landingpad { ptr, i32 }
          cleanup
  br label %455

444:                                              ; preds = %312
  %445 = landingpad { ptr, i32 }
          cleanup
  br label %454

446:                                              ; preds = %313
  %447 = landingpad { ptr, i32 }
          cleanup
  br label %453

448:                                              ; preds = %314
  %449 = landingpad { ptr, i32 }
          cleanup
  br label %452

450:                                              ; preds = %315
  %451 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #7
  br label %452

452:                                              ; preds = %448, %450
  %.pn = phi { ptr, i32 } [ %451, %450 ], [ %449, %448 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %39) #7
  br label %453

453:                                              ; preds = %446, %452
  %.pn.pn = phi { ptr, i32 } [ %.pn, %452 ], [ %447, %446 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %40) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %40) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %39) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %37) #7
  br label %454

454:                                              ; preds = %444, %453
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %453 ], [ %445, %444 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %38) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %37) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  br label %455

455:                                              ; preds = %442, %454
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %454 ], [ %443, %442 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #7
  br label %456

456:                                              ; preds = %455, %440
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %455 ], [ %441, %440 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %35) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %34) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  br label %457

457:                                              ; preds = %438, %456
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %456 ], [ %439, %438 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #7
  br label %458

458:                                              ; preds = %436, %457
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %457 ], [ %437, %436 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #7
  br label %459

459:                                              ; preds = %434, %458
  %.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn, %458 ], [ %435, %434 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %33) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %32) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #7
  br label %460

460:                                              ; preds = %432, %459
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn, %459 ], [ %433, %432 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #7
  br label %461

461:                                              ; preds = %430, %460
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn, %460 ], [ %431, %430 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #7
  br label %462

462:                                              ; preds = %428, %461
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %461 ], [ %429, %428 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %31) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %30) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #7
  br label %463

463:                                              ; preds = %426, %462
  %.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, %462 ], [ %427, %426 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #7
  br label %464

464:                                              ; preds = %424, %463
  %.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, %463 ], [ %425, %424 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %29) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %28) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %27) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %26) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %23) #7
  br label %484

465:                                              ; preds = %280, %335, %.critedge424, %277
  %466 = load ptr, ptr %253, align 8, !tbaa !30
  %467 = getelementptr inbounds %class.CornerApex, ptr %466, i64 %indvars.iv437
  %468 = load double, ptr %254, align 8, !tbaa !31
  %469 = load double, ptr %255, align 8, !tbaa !32
  %470 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %256, i64 noundef %indvars.iv437) #7
  %471 = load double, ptr %470, align 8, !tbaa !33
  call void @_ZN10CornerApex14initCornerApexEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %467, double noundef %1, double noundef %468, double noundef %469, double noundef %471, double noundef %55, i1 noundef zeroext %53)
  %472 = load ptr, ptr %257, align 8, !tbaa !29
  %473 = getelementptr inbounds %class.LayerApex, ptr %472, i64 %indvars.iv437
  %474 = load double, ptr %258, align 8, !tbaa !34
  %475 = load double, ptr %254, align 8, !tbaa !31
  %476 = load double, ptr %255, align 8, !tbaa !32
  %477 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %256, i64 noundef %indvars.iv437) #7
  %478 = load double, ptr %477, align 8, !tbaa !33
  %479 = call noundef zeroext i1 @_ZN9LayerApex13initLayerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %473, double noundef %474, double noundef %475, double noundef %476, double noundef %478, double noundef %55, i1 noundef zeroext %53, i1 noundef zeroext false)
  %indvars.iv.next438 = add nuw nsw i64 %indvars.iv437, 1
  %480 = load i32, ptr %250, align 8, !tbaa !19
  %481 = sext i32 %480 to i64
  %482 = icmp slt i64 %indvars.iv.next438, %481
  br i1 %482, label %262, label %._crit_edge432, !llvm.loop !40

483:                                              ; preds = %._crit_edge432, %.loopexit
  ret void

484:                                              ; preds = %464, %179
  %.pn339.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn339.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %179 ], [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %464 ]
  resume { ptr, i32 } %.pn339.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn
}

; 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 void @_ZN10CornerApex15finitCornerApexEdddddbb(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

declare noundef zeroext i1 @_ZN9LayerApex14finitLayerApexEdddddbb(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

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
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext) local_unnamed_addr #3 align 2

declare noundef zeroext i1 @_ZNK4Elem20canBeAddedToEventVecERK5Fluid(ptr noundef nonnull align 8 dereferenceable(408), ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #5

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

attributes #0 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 0}
!16 = !{!"_ZTSSt4pairIidE", !12, i64 0, !7, i64 8}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !9, i64 0}
!19 = !{!20, !12, i64 184}
!20 = !{!"_ZTS7Polygon", !21, i64 0, !12, i64 184, !22, i64 192, !10, i64 216, !10, i64 224, !26, i64 232, !8, i64 234, !7, i64 240}
!21 = !{!"_ZTS8VoidElem", !6, i64 0, !7, i64 152, !7, i64 160, !7, i64 168, !7, 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", !10, i64 0, !10, i64 8, !10, i64 16}
!26 = !{!"short", !8, i64 0}
!27 = !{!28, !11, i64 8}
!28 = !{!"_ZTS4Apex", !11, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !12, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !11, i64 80, !11, i64 81, !11, i64 82, !11, i64 83, !16, i64 88}
!29 = !{!20, !10, i64 224}
!30 = !{!20, !10, i64 216}
!31 = !{!21, !7, i64 176}
!32 = !{!21, !7, i64 168}
!33 = !{!7, !7, i64 0}
!34 = !{!16, !7, i64 8}
!35 = !{!6, !7, i64 40}
!36 = !{!12, !12, i64 0}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = distinct !{!39, !38}
!40 = distinct !{!40, !38}


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