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

; 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 }
%class.Polygon = type { %class.VoidElem, i32, %"class.std::vector.16", ptr, ptr, i16, i8, double }
%class.VoidElem = type { %class.ElemModel, double, double, double, double }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.LayerApex = type { %class.Apex, i32, ptr, double, ptr, double }
%class.Apex = type { ptr, i8, double, double, ptr, i32, double, double, double, double, i8, i8, i8, i8, %"struct.std::pair.0" }
%"struct.std::pair.0" = type { i32, double }

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [97 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@__FUNCTION__._ZN7Polygon31insertOilSnapEvent_IfSnapPcLgPcER6EventsIP4Apex11PceDrainCmpEd = external hidden unnamed_addr constant [32 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.8 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 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 double @_ZNK4Apex7entryPcEv(ptr noundef nonnull align 8 dereferenceable(104)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10EventsBaseIP4ApexE11quickInsertES1_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #3 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 uwtable
define dso_local void @_ZN7Polygon31insertOilSnapEvent_IfSnapPcLgPcER6EventsIP4Apex11PceDrainCmpEd(ptr noundef nonnull align 8 dereferenceable(248) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, double noundef %2) #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca i1, align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca i1, align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca i1, align 1
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca i1, align 1
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca i1, align 1
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca i1, align 1
  %20 = alloca %"class.std::allocator.7", align 1
  %21 = alloca i1, align 1
  %22 = alloca i1, align 1
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca i1, align 1
  %26 = alloca i1, align 1
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca i1, align 1
  %29 = alloca %"class.std::allocator.7", align 1
  %30 = alloca i1, align 1
  %31 = alloca i1, align 1
  %32 = alloca i1, align 1
  %33 = alloca i1, align 1
  %34 = alloca i1, align 1
  %35 = alloca %"class.std::__cxx11::basic_string", align 8
  %36 = alloca i1, align 1
  %37 = alloca %"class.std::allocator.7", align 1
  %38 = alloca i1, align 1
  %39 = alloca i1, align 1
  %40 = alloca i1, align 1
  %41 = alloca i1, align 1
  %42 = alloca i1, align 1
  %43 = alloca %"class.std::__cxx11::basic_string", align 8
  %44 = alloca i1, align 1
  %45 = alloca i32, align 4
  %46 = alloca i1, align 1
  %47 = alloca i1, align 1
  %48 = alloca %"class.std::__cxx11::basic_string", align 8
  %49 = alloca %"class.std::__cxx11::basic_string", align 8
  %50 = alloca i1, align 1
  %51 = alloca %"class.std::allocator.7", align 1
  %52 = alloca i1, align 1
  %53 = alloca i1, align 1
  %54 = alloca i1, align 1
  %55 = alloca %"class.std::__cxx11::basic_string", align 8
  %56 = alloca i1, align 1
  %57 = alloca %"class.std::allocator.7", align 1
  %58 = alloca i1, align 1
  %59 = alloca i1, align 1
  %60 = alloca i1, align 1
  %61 = alloca i1, align 1
  %62 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store double %2, ptr %6, align 8, !tbaa !9
  %63 = load ptr, ptr %4, align 8
  %64 = getelementptr inbounds %class.ElemModel, ptr %63, i32 0, i32 6
  %65 = load ptr, ptr %64, align 8, !tbaa !11
  %66 = getelementptr inbounds %class.ElemModel, ptr %63, i32 0, i32 4
  %67 = load ptr, ptr %66, align 8, !tbaa !16
  %68 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984) %67)
  %69 = icmp eq ptr %65, %68
  br i1 %69, label %70, label %398

70:                                               ; preds = %3
  %71 = getelementptr inbounds %class.Polygon, ptr %63, i32 0, i32 4
  %72 = load ptr, ptr %71, align 8, !tbaa !17
  %73 = getelementptr inbounds %class.LayerApex, ptr %72, i64 0
  %74 = call noundef zeroext i1 @_ZNK4Apex6existsEv(ptr noundef nonnull align 8 dereferenceable(104) %73)
  br i1 %74, label %75, label %398

75:                                               ; preds = %70
  %76 = getelementptr inbounds %class.Polygon, ptr %63, i32 0, i32 4
  %77 = load ptr, ptr %76, align 8, !tbaa !17
  %78 = getelementptr inbounds %class.LayerApex, ptr %77, i64 0
  %79 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9LayerApex13trappedOLayerEv(ptr noundef nonnull align 8 dereferenceable(144) %78)
  %80 = getelementptr inbounds %"struct.std::pair.0", ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 8, !tbaa !25
  %82 = icmp slt i32 %81, 0
  br i1 %82, label %83, label %398

83:                                               ; preds = %75
  %84 = getelementptr inbounds %class.Polygon, ptr %63, i32 0, i32 5
  %85 = load i16, ptr %84, align 8, !tbaa !27
  %86 = sext i16 %85 to i32
  %87 = icmp eq i32 %86, 0
  store i1 false, ptr %9, align 1
  store i1 false, ptr %11, align 1
  store i1 false, ptr %13, align 1
  store i1 false, ptr %15, align 1
  store i1 false, ptr %17, align 1
  store i1 false, ptr %19, align 1
  store i1 false, ptr %21, align 1
  store i1 false, ptr %22, align 1
  store i1 false, ptr %25, align 1
  store i1 false, ptr %26, align 1
  store i1 false, ptr %28, align 1
  store i1 false, ptr %30, align 1
  store i1 false, ptr %31, align 1
  store i1 false, ptr %32, align 1
  store i1 false, ptr %33, align 1
  store i1 false, ptr %34, align 1
  store i1 false, ptr %36, align 1
  store i1 false, ptr %38, align 1
  store i1 false, ptr %39, align 1
  store i1 false, ptr %40, align 1
  store i1 false, ptr %41, align 1
  store i1 false, ptr %42, align 1
  store i1 false, ptr %44, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #4
  store i1 false, ptr %46, align 1
  store i1 false, ptr %47, align 1
  store i1 false, ptr %50, align 1
  store i1 false, ptr %52, align 1
  store i1 false, ptr %53, align 1
  store i1 false, ptr %54, align 1
  store i1 false, ptr %56, align 1
  store i1 false, ptr %58, align 1
  store i1 false, ptr %59, align 1
  store i1 false, ptr %60, align 1
  store i1 false, ptr %61, align 1
  br i1 %87, label %104, label %88

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

89:                                               ; preds = %88
  store i1 true, ptr %25, 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 %16, ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef @.str.1)
          to label %90 unwind label %230

90:                                               ; preds = %89
  store i1 true, ptr %26, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #4
  store i1 true, ptr %28, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #4
  store i1 true, ptr %30, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #4
  store i1 true, ptr %31, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef @__FUNCTION__._ZN7Polygon31insertOilSnapEvent_IfSnapPcLgPcER6EventsIP4Apex11PceDrainCmpEd, ptr noundef nonnull align 1 dereferenceable(1) %29)
          to label %91 unwind label %234

91:                                               ; preds = %90
  store i1 true, ptr %32, 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 %14, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %27)
          to label %92 unwind label %238

92:                                               ; preds = %91
  store i1 true, ptr %33, 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 %12, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.2)
          to label %93 unwind label %242

93:                                               ; preds = %92
  store i1 true, ptr %34, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %35) #4
  store i1 true, ptr %36, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %37) #4
  store i1 true, ptr %38, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #4
  store i1 true, ptr %39, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %37)
          to label %94 unwind label %246

94:                                               ; preds = %93
  store i1 true, ptr %40, 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 %10, ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %35)
          to label %95 unwind label %250

95:                                               ; preds = %94
  store i1 true, ptr %41, 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 %8, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.4)
          to label %96 unwind label %254

96:                                               ; preds = %95
  store i1 true, ptr %42, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %43) #4
  store i1 true, ptr %44, align 1
  store i32 55, ptr %45, align 4, !tbaa !28
  invoke void @_Z2_sIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %43, ptr noundef nonnull align 4 dereferenceable(4) %45)
          to label %97 unwind label %258

97:                                               ; preds = %96
  store i1 true, ptr %46, 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 %7, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %43)
          to label %98 unwind label %262

98:                                               ; preds = %97
  store i1 true, ptr %47, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %49) #4
  store i1 true, ptr %50, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %51) #4
  store i1 true, ptr %52, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %51) #4
  store i1 true, ptr %53, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %49, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %51)
          to label %99 unwind label %266

99:                                               ; preds = %98
  store i1 true, ptr %54, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %55) #4
  store i1 true, ptr %56, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %57) #4
  store i1 true, ptr %58, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %57) #4
  store i1 true, ptr %59, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %55, ptr noundef @.str.7, ptr noundef nonnull align 1 dereferenceable(1) %57)
          to label %100 unwind label %270

100:                                              ; preds = %99
  store i1 true, ptr %60, 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 %48, ptr noundef nonnull align 8 dereferenceable(32) %49, ptr noundef nonnull align 8 dereferenceable(32) %55)
          to label %101 unwind label %274

101:                                              ; preds = %100
  store i1 true, ptr %61, align 1
  %102 = invoke noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef %7, ptr noundef %48, i32 noundef 0)
          to label %103 unwind label %278

103:                                              ; preds = %101
  br label %104

104:                                              ; preds = %103, %83
  %105 = phi i1 [ true, %83 ], [ %102, %103 ]
  %106 = xor i1 %105, true
  %107 = load i1, ptr %61, align 1
  br i1 %107, label %108, label %109

108:                                              ; preds = %104
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %48) #4
  br label %109

109:                                              ; preds = %108, %104
  %110 = load i1, ptr %60, align 1
  br i1 %110, label %111, label %112

111:                                              ; preds = %109
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %55) #4
  br label %112

112:                                              ; preds = %111, %109
  %113 = load i1, ptr %59, align 1
  br i1 %113, label %114, label %115

114:                                              ; preds = %112
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %57) #4
  br label %115

115:                                              ; preds = %114, %112
  %116 = load i1, ptr %58, align 1
  br i1 %116, label %117, label %118

117:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 1, ptr %57) #4
  br label %118

118:                                              ; preds = %117, %115
  %119 = load i1, ptr %56, align 1
  br i1 %119, label %120, label %121

120:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 32, ptr %55) #4
  br label %121

121:                                              ; preds = %120, %118
  %122 = load i1, ptr %54, align 1
  br i1 %122, label %123, label %124

123:                                              ; preds = %121
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %49) #4
  br label %124

124:                                              ; preds = %123, %121
  %125 = load i1, ptr %53, align 1
  br i1 %125, label %126, label %127

126:                                              ; preds = %124
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %51) #4
  br label %127

127:                                              ; preds = %126, %124
  %128 = load i1, ptr %52, align 1
  br i1 %128, label %129, label %130

129:                                              ; preds = %127
  call void @llvm.lifetime.end.p0(i64 1, ptr %51) #4
  br label %130

130:                                              ; preds = %129, %127
  %131 = load i1, ptr %50, align 1
  br i1 %131, label %132, label %133

132:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 32, ptr %49) #4
  br label %133

133:                                              ; preds = %132, %130
  %134 = load i1, ptr %47, align 1
  br i1 %134, label %135, label %136

135:                                              ; preds = %133
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  br label %136

136:                                              ; preds = %135, %133
  %137 = load i1, ptr %46, align 1
  br i1 %137, label %138, label %139

138:                                              ; preds = %136
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #4
  br label %139

139:                                              ; preds = %138, %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #4
  %140 = load i1, ptr %44, align 1
  br i1 %140, label %141, label %142

141:                                              ; preds = %139
  call void @llvm.lifetime.end.p0(i64 32, ptr %43) #4
  br label %142

142:                                              ; preds = %141, %139
  %143 = load i1, ptr %42, align 1
  br i1 %143, label %144, label %145

144:                                              ; preds = %142
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  br label %145

145:                                              ; preds = %144, %142
  %146 = load i1, ptr %41, align 1
  br i1 %146, label %147, label %148

147:                                              ; preds = %145
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  br label %148

148:                                              ; preds = %147, %145
  %149 = load i1, ptr %40, align 1
  br i1 %149, label %150, label %151

150:                                              ; preds = %148
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #4
  br label %151

151:                                              ; preds = %150, %148
  %152 = load i1, ptr %39, align 1
  br i1 %152, label %153, label %154

153:                                              ; preds = %151
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #4
  br label %154

154:                                              ; preds = %153, %151
  %155 = load i1, ptr %38, align 1
  br i1 %155, label %156, label %157

156:                                              ; preds = %154
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #4
  br label %157

157:                                              ; preds = %156, %154
  %158 = load i1, ptr %36, align 1
  br i1 %158, label %159, label %160

159:                                              ; preds = %157
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #4
  br label %160

160:                                              ; preds = %159, %157
  %161 = load i1, ptr %34, align 1
  br i1 %161, label %162, label %163

162:                                              ; preds = %160
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  br label %163

163:                                              ; preds = %162, %160
  %164 = load i1, ptr %33, align 1
  br i1 %164, label %165, label %166

165:                                              ; preds = %163
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #4
  br label %166

166:                                              ; preds = %165, %163
  %167 = load i1, ptr %32, align 1
  br i1 %167, label %168, label %169

168:                                              ; preds = %166
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #4
  br label %169

169:                                              ; preds = %168, %166
  %170 = load i1, ptr %31, align 1
  br i1 %170, label %171, label %172

171:                                              ; preds = %169
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #4
  br label %172

172:                                              ; preds = %171, %169
  %173 = load i1, ptr %30, align 1
  br i1 %173, label %174, label %175

174:                                              ; preds = %172
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #4
  br label %175

175:                                              ; preds = %174, %172
  %176 = load i1, ptr %28, align 1
  br i1 %176, label %177, label %178

177:                                              ; preds = %175
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #4
  br label %178

178:                                              ; preds = %177, %175
  %179 = load i1, ptr %26, align 1
  br i1 %179, label %180, label %181

180:                                              ; preds = %178
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  br label %181

181:                                              ; preds = %180, %178
  %182 = load i1, ptr %25, align 1
  br i1 %182, label %183, label %184

183:                                              ; preds = %181
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #4
  br label %184

184:                                              ; preds = %183, %181
  %185 = load i1, ptr %22, align 1
  br i1 %185, label %186, label %187

186:                                              ; preds = %184
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #4
  br label %187

187:                                              ; preds = %186, %184
  %188 = load i1, ptr %21, align 1
  br i1 %188, label %189, label %190

189:                                              ; preds = %187
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #4
  br label %190

190:                                              ; preds = %189, %187
  %191 = load i1, ptr %19, align 1
  br i1 %191, label %192, label %193

192:                                              ; preds = %190
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #4
  br label %193

193:                                              ; preds = %192, %190
  %194 = load i1, ptr %17, align 1
  br i1 %194, label %195, label %196

195:                                              ; preds = %193
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #4
  br label %196

196:                                              ; preds = %195, %193
  %197 = load i1, ptr %15, align 1
  br i1 %197, label %198, label %199

198:                                              ; preds = %196
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #4
  br label %199

199:                                              ; preds = %198, %196
  %200 = load i1, ptr %13, align 1
  br i1 %200, label %201, label %202

201:                                              ; preds = %199
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  br label %202

202:                                              ; preds = %201, %199
  %203 = load i1, ptr %11, align 1
  br i1 %203, label %204, label %205

204:                                              ; preds = %202
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #4
  br label %205

205:                                              ; preds = %204, %202
  %206 = load i1, ptr %9, align 1
  br i1 %206, label %207, label %208

207:                                              ; preds = %205
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #4
  br label %208

208:                                              ; preds = %207, %205
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #4
  %209 = call noundef double @_ZNK7Polygon24calcSnapOffPressureDrainEv(ptr noundef nonnull align 8 dereferenceable(248) %63)
  store double %209, ptr %62, align 8, !tbaa !9
  %210 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.8)
  %211 = getelementptr inbounds %class.ElemModel, ptr %63, i32 0, i32 3
  %212 = load ptr, ptr %211, align 8, !tbaa !29
  %213 = call noundef double @_ZNK4Apex7entryPcEv(ptr noundef nonnull align 8 dereferenceable(104) %212)
  %214 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %210, double noundef %213)
  %215 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %214, ptr noundef @.str.9)
  %216 = load double, ptr %62, align 8, !tbaa !9
  %217 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %215, double noundef %216)
  %218 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %217, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %219 = load double, ptr %62, align 8, !tbaa !9
  %220 = load double, ptr %6, align 8, !tbaa !9
  %221 = fcmp olt double %219, %220
  br i1 %221, label %222, label %397

222:                                              ; preds = %208
  %223 = load ptr, ptr %5, align 8, !tbaa !5
  %224 = getelementptr inbounds %class.ElemModel, ptr %63, i32 0, i32 3
  %225 = load ptr, ptr %224, align 8, !tbaa !29
  call void @_ZN10EventsBaseIP4ApexE11quickInsertES1_(ptr noundef nonnull align 8 dereferenceable(32) %223, ptr noundef %225)
  br label %397

226:                                              ; preds = %88
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %23, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %24, align 4
  br label %372

230:                                              ; preds = %89
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %23, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %24, align 4
  br label %368

234:                                              ; preds = %90
  %235 = landingpad { ptr, i32 }
          cleanup
  %236 = extractvalue { ptr, i32 } %235, 0
  store ptr %236, ptr %23, align 8
  %237 = extractvalue { ptr, i32 } %235, 1
  store i32 %237, ptr %24, align 4
  br label %355

238:                                              ; preds = %91
  %239 = landingpad { ptr, i32 }
          cleanup
  %240 = extractvalue { ptr, i32 } %239, 0
  store ptr %240, ptr %23, align 8
  %241 = extractvalue { ptr, i32 } %239, 1
  store i32 %241, ptr %24, align 4
  br label %351

242:                                              ; preds = %92
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %23, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %24, align 4
  br label %347

246:                                              ; preds = %93
  %247 = landingpad { ptr, i32 }
          cleanup
  %248 = extractvalue { ptr, i32 } %247, 0
  store ptr %248, ptr %23, align 8
  %249 = extractvalue { ptr, i32 } %247, 1
  store i32 %249, ptr %24, align 4
  br label %334

250:                                              ; preds = %94
  %251 = landingpad { ptr, i32 }
          cleanup
  %252 = extractvalue { ptr, i32 } %251, 0
  store ptr %252, ptr %23, align 8
  %253 = extractvalue { ptr, i32 } %251, 1
  store i32 %253, ptr %24, align 4
  br label %330

254:                                              ; preds = %95
  %255 = landingpad { ptr, i32 }
          cleanup
  %256 = extractvalue { ptr, i32 } %255, 0
  store ptr %256, ptr %23, align 8
  %257 = extractvalue { ptr, i32 } %255, 1
  store i32 %257, ptr %24, align 4
  br label %326

258:                                              ; preds = %96
  %259 = landingpad { ptr, i32 }
          cleanup
  %260 = extractvalue { ptr, i32 } %259, 0
  store ptr %260, ptr %23, align 8
  %261 = extractvalue { ptr, i32 } %259, 1
  store i32 %261, ptr %24, align 4
  br label %319

262:                                              ; preds = %97
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %23, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %24, align 4
  br label %315

266:                                              ; preds = %98
  %267 = landingpad { ptr, i32 }
          cleanup
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %23, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %24, align 4
  br label %302

270:                                              ; preds = %99
  %271 = landingpad { ptr, i32 }
          cleanup
  %272 = extractvalue { ptr, i32 } %271, 0
  store ptr %272, ptr %23, align 8
  %273 = extractvalue { ptr, i32 } %271, 1
  store i32 %273, ptr %24, align 4
  br label %289

274:                                              ; preds = %100
  %275 = landingpad { ptr, i32 }
          cleanup
  %276 = extractvalue { ptr, i32 } %275, 0
  store ptr %276, ptr %23, align 8
  %277 = extractvalue { ptr, i32 } %275, 1
  store i32 %277, ptr %24, align 4
  br label %285

278:                                              ; preds = %101
  %279 = landingpad { ptr, i32 }
          cleanup
  %280 = extractvalue { ptr, i32 } %279, 0
  store ptr %280, ptr %23, align 8
  %281 = extractvalue { ptr, i32 } %279, 1
  store i32 %281, ptr %24, align 4
  %282 = load i1, ptr %61, align 1
  br i1 %282, label %283, label %284

283:                                              ; preds = %278
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %48) #4
  br label %284

284:                                              ; preds = %283, %278
  br label %285

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

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

288:                                              ; preds = %287, %285
  br label %289

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

291:                                              ; preds = %289
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %57) #4
  br label %292

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

294:                                              ; preds = %292
  call void @llvm.lifetime.end.p0(i64 1, ptr %57) #4
  br label %295

295:                                              ; preds = %294, %292
  %296 = load i1, ptr %56, align 1
  br i1 %296, label %297, label %298

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

298:                                              ; preds = %297, %295
  %299 = load i1, ptr %54, 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) %49) #4
  br label %301

301:                                              ; preds = %300, %298
  br label %302

302:                                              ; preds = %301, %266
  %303 = load i1, ptr %53, align 1
  br i1 %303, label %304, label %305

304:                                              ; preds = %302
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %51) #4
  br label %305

305:                                              ; preds = %304, %302
  %306 = load i1, ptr %52, align 1
  br i1 %306, label %307, label %308

307:                                              ; preds = %305
  call void @llvm.lifetime.end.p0(i64 1, ptr %51) #4
  br label %308

308:                                              ; preds = %307, %305
  %309 = load i1, ptr %50, align 1
  br i1 %309, label %310, label %311

310:                                              ; preds = %308
  call void @llvm.lifetime.end.p0(i64 32, ptr %49) #4
  br label %311

311:                                              ; preds = %310, %308
  %312 = load i1, ptr %47, align 1
  br i1 %312, label %313, label %314

313:                                              ; preds = %311
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  br label %314

314:                                              ; preds = %313, %311
  br label %315

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

317:                                              ; preds = %315
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #4
  br label %318

318:                                              ; preds = %317, %315
  br label %319

319:                                              ; preds = %318, %258
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #4
  %320 = load i1, ptr %44, align 1
  br i1 %320, label %321, label %322

321:                                              ; preds = %319
  call void @llvm.lifetime.end.p0(i64 32, ptr %43) #4
  br label %322

322:                                              ; preds = %321, %319
  %323 = load i1, ptr %42, 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) %8) #4
  br label %325

325:                                              ; preds = %324, %322
  br label %326

326:                                              ; preds = %325, %254
  %327 = load i1, ptr %41, align 1
  br i1 %327, label %328, label %329

328:                                              ; preds = %326
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  br label %329

329:                                              ; preds = %328, %326
  br label %330

330:                                              ; preds = %329, %250
  %331 = load i1, ptr %40, align 1
  br i1 %331, label %332, label %333

332:                                              ; preds = %330
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #4
  br label %333

333:                                              ; preds = %332, %330
  br label %334

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

336:                                              ; preds = %334
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #4
  br label %337

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

339:                                              ; preds = %337
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #4
  br label %340

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

342:                                              ; preds = %340
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #4
  br label %343

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

345:                                              ; preds = %343
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  br label %346

346:                                              ; preds = %345, %343
  br label %347

347:                                              ; preds = %346, %242
  %348 = load i1, ptr %33, align 1
  br i1 %348, label %349, label %350

349:                                              ; preds = %347
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #4
  br label %350

350:                                              ; preds = %349, %347
  br label %351

351:                                              ; preds = %350, %238
  %352 = load i1, ptr %32, align 1
  br i1 %352, label %353, label %354

353:                                              ; preds = %351
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #4
  br label %354

354:                                              ; preds = %353, %351
  br label %355

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

357:                                              ; preds = %355
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #4
  br label %358

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

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

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

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

364:                                              ; preds = %363, %361
  %365 = load i1, ptr %26, align 1
  br i1 %365, label %366, label %367

366:                                              ; preds = %364
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  br label %367

367:                                              ; preds = %366, %364
  br label %368

368:                                              ; preds = %367, %230
  %369 = load i1, ptr %25, align 1
  br i1 %369, label %370, label %371

370:                                              ; preds = %368
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #4
  br label %371

371:                                              ; preds = %370, %368
  br label %372

372:                                              ; preds = %371, %226
  %373 = load i1, ptr %22, align 1
  br i1 %373, label %374, label %375

374:                                              ; preds = %372
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #4
  br label %375

375:                                              ; preds = %374, %372
  %376 = load i1, ptr %21, align 1
  br i1 %376, label %377, label %378

377:                                              ; preds = %375
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #4
  br label %378

378:                                              ; preds = %377, %375
  %379 = load i1, ptr %19, align 1
  br i1 %379, label %380, label %381

380:                                              ; preds = %378
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #4
  br label %381

381:                                              ; preds = %380, %378
  %382 = load i1, ptr %17, align 1
  br i1 %382, label %383, label %384

383:                                              ; preds = %381
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #4
  br label %384

384:                                              ; preds = %383, %381
  %385 = load i1, ptr %15, align 1
  br i1 %385, label %386, label %387

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

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

389:                                              ; preds = %387
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  br label %390

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

392:                                              ; preds = %390
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #4
  br label %393

393:                                              ; preds = %392, %390
  %394 = load i1, ptr %9, align 1
  br i1 %394, label %395, label %396

395:                                              ; preds = %393
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #4
  br label %396

396:                                              ; preds = %395, %393
  br label %399

397:                                              ; preds = %222, %208
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #4
  br label %398

398:                                              ; preds = %397, %75, %70, %3
  ret void

399:                                              ; preds = %396
  %400 = load ptr, ptr %23, align 8
  %401 = load i32, ptr %24, align 4
  %402 = insertvalue { ptr, i32 } poison, ptr %400, 0
  %403 = insertvalue { ptr, i32 } %402, i32 %401, 1
  resume { ptr, i32 } %403
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK7Polygon24calcSnapOffPressureDrainEv(ptr noundef nonnull align 8 dereferenceable(248)) #3 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

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 }

!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 48}
!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 = !{!18, !6, i64 224}
!18 = !{!"_ZTS7Polygon", !19, i64 0, !14, i64 184, !20, i64 192, !6, i64 216, !6, i64 224, !24, i64 232, !7, i64 234, !10, i64 240}
!19 = !{!"_ZTS8VoidElem", !12, i64 0, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176}
!20 = !{!"_ZTSSt6vectorIdSaIdEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"short", !7, i64 0}
!25 = !{!26, !14, i64 0}
!26 = !{!"_ZTSSt4pairIidE", !14, i64 0, !10, i64 8}
!27 = !{!18, !24, i64 232}
!28 = !{!14, !14, i64 0}
!29 = !{!12, !6, i64 24}


; 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 }

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [97 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@__FUNCTION__._ZN7Polygon31insertOilSnapEvent_IfSnapPcLgPcER6EventsIP4Apex11PceDrainCmpEd = external hidden unnamed_addr constant [32 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.8 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 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 double @_ZNK4Apex7entryPcEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10EventsBaseIP4ApexE11quickInsertES1_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #3 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 uwtable
define dso_local void @_ZN7Polygon31insertOilSnapEvent_IfSnapPcLgPcER6EventsIP4Apex11PceDrainCmpEd(ptr noundef nonnull align 8 dereferenceable(248) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, double noundef %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %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::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator.7", align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator.7", align 1
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator.7", align 1
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator.7", align 1
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator.7", align 1
  %23 = getelementptr inbounds i8, ptr %0, i64 48
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %0, i64 32
  %26 = load ptr, ptr %25, align 8, !tbaa !14
  %27 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984) %26)
  %28 = icmp eq ptr %24, %27
  br i1 %28, label %29, label %109

29:                                               ; preds = %3
  %30 = getelementptr inbounds i8, ptr %0, i64 224
  %31 = load ptr, ptr %30, align 8, !tbaa !15
  %32 = tail call noundef zeroext i1 @_ZNK4Apex6existsEv(ptr noundef nonnull align 8 dereferenceable(104) %31)
  br i1 %32, label %33, label %109

33:                                               ; preds = %29
  %34 = load ptr, ptr %30, align 8, !tbaa !15
  %35 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9LayerApex13trappedOLayerEv(ptr noundef nonnull align 8 dereferenceable(144) %34)
  %36 = load i32, ptr %35, align 8, !tbaa !23
  %37 = icmp slt i32 %36, 0
  br i1 %37, label %38, label %109

38:                                               ; preds = %33
  %39 = getelementptr inbounds i8, ptr %0, i64 232
  %40 = load i16, ptr %39, align 8, !tbaa !25
  %.not = icmp eq i16 %40, 0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #4
  br i1 %.not, label %.thread, label %41

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

42:                                               ; preds = %41
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.1)
          to label %43 unwind label %70

43:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @__FUNCTION__._ZN7Polygon31insertOilSnapEvent_IfSnapPcLgPcER6EventsIP4Apex11PceDrainCmpEd, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %44 unwind label %72

44:                                               ; preds = %43
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(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 align 8 dereferenceable(32) %12)
          to label %45 unwind label %74

45:                                               ; preds = %44
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(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 @.str.2)
          to label %46 unwind label %76

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %47 unwind label %78

47:                                               ; preds = %46
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(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 align 8 dereferenceable(32) %14)
          to label %48 unwind label %80

48:                                               ; preds = %47
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(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 @.str.4)
          to label %49 unwind label %82

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #4
  store i32 55, ptr %17, align 4, !tbaa !26
  invoke void @_Z2_sIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %50 unwind label %84

50:                                               ; preds = %49
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(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 align 8 dereferenceable(32) %16)
          to label %51 unwind label %86

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %20) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %52 unwind label %88

52:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %21) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %22) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull @.str.7, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %53 unwind label %90

53:                                               ; preds = %52
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %18, ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %21)
          to label %54 unwind label %92

54:                                               ; preds = %53
  %55 = invoke noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef nonnull %4, ptr noundef nonnull %18, i32 noundef 0)
          to label %.critedge146 unwind label %94

.thread:                                          ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #4
  br label %.critedge167

.critedge146:                                     ; preds = %54
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %21) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  br label %.critedge167

.critedge167:                                     ; preds = %.thread, %.critedge146
  %56 = call noundef double @_ZNK7Polygon24calcSnapOffPressureDrainEv(ptr noundef nonnull align 8 dereferenceable(248) %0)
  %57 = 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.8)
  %58 = getelementptr inbounds i8, ptr %0, i64 24
  %59 = load ptr, ptr %58, align 8, !tbaa !27
  %60 = call noundef double @_ZNK4Apex7entryPcEv(ptr noundef nonnull align 8 dereferenceable(104) %59)
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %57, double noundef %60)
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull @.str.9)
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %62, double noundef %56)
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %65 = fcmp olt double %56, %2
  br i1 %65, label %66, label %109

66:                                               ; preds = %.critedge167
  %67 = load ptr, ptr %58, align 8, !tbaa !27
  call void @_ZN10EventsBaseIP4ApexE11quickInsertES1_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef %67)
  br label %109

68:                                               ; preds = %41
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %108

70:                                               ; preds = %42
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %107

72:                                               ; preds = %43
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %106

74:                                               ; preds = %44
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %105

76:                                               ; preds = %45
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %104

78:                                               ; preds = %46
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %103

80:                                               ; preds = %47
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %102

82:                                               ; preds = %48
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %101

84:                                               ; preds = %49
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %100

86:                                               ; preds = %50
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %99

88:                                               ; preds = %51
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %98

90:                                               ; preds = %52
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %97

92:                                               ; preds = %53
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %96

94:                                               ; preds = %54
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #4
  br label %96

96:                                               ; preds = %92, %94
  %.pn = phi { ptr, i32 } [ %95, %94 ], [ %93, %92 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #4
  br label %97

97:                                               ; preds = %90, %96
  %.pn.pn = phi { ptr, i32 } [ %.pn, %96 ], [ %91, %90 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %21) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  br label %98

98:                                               ; preds = %88, %97
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %97 ], [ %89, %88 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  br label %99

99:                                               ; preds = %86, %98
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %98 ], [ %87, %86 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  br label %100

100:                                              ; preds = %99, %84
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %99 ], [ %85, %84 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  br label %101

101:                                              ; preds = %82, %100
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %100 ], [ %83, %82 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br label %102

102:                                              ; preds = %80, %101
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %101 ], [ %81, %80 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #4
  br label %103

103:                                              ; preds = %78, %102
  %.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn, %102 ], [ %79, %78 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  br label %104

104:                                              ; preds = %76, %103
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn, %103 ], [ %77, %76 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  br label %105

105:                                              ; preds = %74, %104
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn, %104 ], [ %75, %74 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  br label %106

106:                                              ; preds = %72, %105
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %105 ], [ %73, %72 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  br label %107

107:                                              ; preds = %70, %106
  %.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, %106 ], [ %71, %70 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  br label %108

108:                                              ; preds = %68, %107
  %.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, %107 ], [ %69, %68 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn

109:                                              ; preds = %.critedge167, %66, %33, %29, %3
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK7Polygon24calcSnapOffPressureDrainEv(ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #3 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

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 = { 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 48}
!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, !10, i64 224}
!16 = !{!"_ZTS7Polygon", !17, i64 0, !12, i64 184, !18, i64 192, !10, i64 216, !10, i64 224, !22, i64 232, !8, i64 234, !7, i64 240}
!17 = !{!"_ZTS8VoidElem", !6, i64 0, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176}
!18 = !{!"_ZTSSt6vectorIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!22 = !{!"short", !8, i64 0}
!23 = !{!24, !12, i64 0}
!24 = !{!"_ZTSSt4pairIidE", !12, i64 0, !7, i64 8}
!25 = !{!16, !22, i64 232}
!26 = !{!12, !12, i64 0}
!27 = !{!6, !10, i64 24}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass