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

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

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

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@__FUNCTION__._ZN6Circle18initWaterInjectionEd = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@_ZN9ElemModel2PIE = external constant double, align 8

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

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

; 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)) #1

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

; 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) #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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 #0 align 2

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

; 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) #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Polygon18initWaterInjectionEd(ptr noundef nonnull align 8 dereferenceable(248) %0, double noundef %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca double, align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca i1, align 1
  %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::allocator.2", align 1
  %19 = alloca i1, align 1
  %20 = alloca i1, align 1
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i1, align 1
  %24 = alloca i1, align 1
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca i1, align 1
  %27 = alloca %"class.std::allocator.2", align 1
  %28 = alloca i1, align 1
  %29 = alloca i1, align 1
  %30 = alloca i1, align 1
  %31 = alloca i1, align 1
  %32 = alloca i1, align 1
  %33 = alloca %"class.std::__cxx11::basic_string", align 8
  %34 = alloca i1, align 1
  %35 = alloca %"class.std::allocator.2", align 1
  %36 = alloca i1, align 1
  %37 = alloca i1, align 1
  %38 = alloca i1, align 1
  %39 = alloca i1, align 1
  %40 = alloca i1, align 1
  %41 = alloca %"class.std::__cxx11::basic_string", align 8
  %42 = alloca i1, align 1
  %43 = alloca i32, align 4
  %44 = alloca i1, align 1
  %45 = alloca i1, align 1
  %46 = alloca %"class.std::__cxx11::basic_string", align 8
  %47 = alloca %"class.std::__cxx11::basic_string", align 8
  %48 = alloca i1, align 1
  %49 = alloca %"class.std::allocator.2", align 1
  %50 = alloca i1, align 1
  %51 = alloca i1, align 1
  %52 = alloca i1, align 1
  %53 = alloca %"class.std::__cxx11::basic_string", align 8
  %54 = alloca i1, align 1
  %55 = alloca %"class.std::allocator.2", align 1
  %56 = alloca i1, align 1
  %57 = alloca i1, align 1
  %58 = alloca i1, align 1
  %59 = alloca i1, align 1
  %60 = alloca i32, align 4
  %61 = alloca double, align 8
  %62 = alloca i32, align 4
  %63 = alloca i32, align 4
  %64 = alloca double, align 8
  %65 = alloca double, align 8
  %66 = alloca double, align 8
  %67 = alloca double, align 8
  %68 = alloca double, align 8
  %69 = alloca double, align 8
  %70 = alloca double, align 8
  %71 = alloca i32, align 4
  %72 = alloca double, align 8
  %73 = alloca double, align 8
  %74 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store double %1, ptr %4, align 8, !tbaa !9
  %75 = load ptr, ptr %3, align 8
  %76 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 3
  %77 = load ptr, ptr %76, align 8, !tbaa !11
  %78 = call noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %77)
  %79 = icmp sgt i32 %78, 0
  store i1 false, ptr %7, align 1
  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 %20, align 1
  store i1 false, ptr %23, align 1
  store i1 false, ptr %24, align 1
  store i1 false, ptr %26, align 1
  store i1 false, ptr %28, align 1
  store i1 false, ptr %29, 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 %34, 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 %40, align 1
  store i1 false, ptr %42, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #8
  store i1 false, ptr %44, align 1
  store i1 false, ptr %45, align 1
  store i1 false, ptr %48, align 1
  store i1 false, ptr %50, align 1
  store i1 false, ptr %51, align 1
  store i1 false, ptr %52, align 1
  store i1 false, ptr %54, align 1
  store i1 false, ptr %56, align 1
  store i1 false, ptr %57, align 1
  store i1 false, ptr %58, align 1
  store i1 false, ptr %59, align 1
  br i1 %79, label %96, label %80

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

81:                                               ; preds = %80
  store i1 true, ptr %23, 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 %14, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.1)
          to label %82 unwind label %215

82:                                               ; preds = %81
  store i1 true, ptr %24, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #8
  store i1 true, ptr %26, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #8
  store i1 true, ptr %28, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  store i1 true, ptr %29, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef @__FUNCTION__._ZN6Circle18initWaterInjectionEd, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %83 unwind label %219

83:                                               ; preds = %82
  store i1 true, ptr %30, 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) %14, ptr noundef nonnull align 8 dereferenceable(32) %25)
          to label %84 unwind label %223

84:                                               ; preds = %83
  store i1 true, ptr %31, 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 %10, ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.2)
          to label %85 unwind label %227

85:                                               ; preds = %84
  store i1 true, ptr %32, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %33) #8
  store i1 true, ptr %34, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #8
  store i1 true, ptr %36, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #8
  store i1 true, ptr %37, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %35)
          to label %86 unwind label %231

86:                                               ; preds = %85
  store i1 true, ptr %38, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %33)
          to label %87 unwind label %235

87:                                               ; preds = %86
  store i1 true, ptr %39, 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 %6, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str.4)
          to label %88 unwind label %239

88:                                               ; preds = %87
  store i1 true, ptr %40, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %41) #8
  store i1 true, ptr %42, align 1
  store i32 120, ptr %43, align 4, !tbaa !16
  invoke void @_Z2_sIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %41, ptr noundef nonnull align 4 dereferenceable(4) %43)
          to label %89 unwind label %243

89:                                               ; preds = %88
  store i1 true, ptr %44, 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 %5, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %41)
          to label %90 unwind label %247

90:                                               ; preds = %89
  store i1 true, ptr %45, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %47) #8
  store i1 true, ptr %48, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %49) #8
  store i1 true, ptr %50, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %49) #8
  store i1 true, ptr %51, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %47, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %49)
          to label %91 unwind label %251

91:                                               ; preds = %90
  store i1 true, ptr %52, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %53) #8
  store i1 true, ptr %54, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %55) #8
  store i1 true, ptr %56, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %55) #8
  store i1 true, ptr %57, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %53, ptr noundef @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %55)
          to label %92 unwind label %255

92:                                               ; preds = %91
  store i1 true, ptr %58, 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 %46, ptr noundef nonnull align 8 dereferenceable(32) %47, ptr noundef nonnull align 8 dereferenceable(32) %53)
          to label %93 unwind label %259

93:                                               ; preds = %92
  store i1 true, ptr %59, align 1
  %94 = invoke noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef %5, ptr noundef %46, i32 noundef 0)
          to label %95 unwind label %263

95:                                               ; preds = %93
  br label %96

96:                                               ; preds = %95, %2
  %97 = phi i1 [ true, %2 ], [ %94, %95 ]
  %98 = xor i1 %97, true
  %99 = load i1, ptr %59, align 1
  br i1 %99, label %100, label %101

100:                                              ; preds = %96
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #8
  br label %101

101:                                              ; preds = %100, %96
  %102 = load i1, ptr %58, align 1
  br i1 %102, label %103, label %104

103:                                              ; preds = %101
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %53) #8
  br label %104

104:                                              ; preds = %103, %101
  %105 = load i1, ptr %57, align 1
  br i1 %105, label %106, label %107

106:                                              ; preds = %104
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %55) #8
  br label %107

107:                                              ; preds = %106, %104
  %108 = load i1, ptr %56, align 1
  br i1 %108, label %109, label %110

109:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 1, ptr %55) #8
  br label %110

110:                                              ; preds = %109, %107
  %111 = load i1, ptr %54, align 1
  br i1 %111, label %112, label %113

112:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 32, ptr %53) #8
  br label %113

113:                                              ; preds = %112, %110
  %114 = load i1, ptr %52, align 1
  br i1 %114, label %115, label %116

115:                                              ; preds = %113
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %47) #8
  br label %116

116:                                              ; preds = %115, %113
  %117 = load i1, ptr %51, align 1
  br i1 %117, label %118, label %119

118:                                              ; preds = %116
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %49) #8
  br label %119

119:                                              ; preds = %118, %116
  %120 = load i1, ptr %50, align 1
  br i1 %120, label %121, label %122

121:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 1, ptr %49) #8
  br label %122

122:                                              ; preds = %121, %119
  %123 = load i1, ptr %48, align 1
  br i1 %123, label %124, label %125

124:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 32, ptr %47) #8
  br label %125

125:                                              ; preds = %124, %122
  %126 = load i1, ptr %45, align 1
  br i1 %126, label %127, label %128

127:                                              ; preds = %125
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  br label %128

128:                                              ; preds = %127, %125
  %129 = load i1, ptr %44, align 1
  br i1 %129, label %130, label %131

130:                                              ; preds = %128
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %41) #8
  br label %131

131:                                              ; preds = %130, %128
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  %132 = load i1, ptr %42, align 1
  br i1 %132, label %133, label %134

133:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 32, ptr %41) #8
  br label %134

134:                                              ; preds = %133, %131
  %135 = load i1, ptr %40, align 1
  br i1 %135, label %136, label %137

136:                                              ; preds = %134
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  br label %137

137:                                              ; preds = %136, %134
  %138 = load i1, ptr %39, align 1
  br i1 %138, label %139, label %140

139:                                              ; preds = %137
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  br label %140

140:                                              ; preds = %139, %137
  %141 = load i1, ptr %38, align 1
  br i1 %141, label %142, label %143

142:                                              ; preds = %140
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #8
  br label %143

143:                                              ; preds = %142, %140
  %144 = load i1, ptr %37, align 1
  br i1 %144, label %145, label %146

145:                                              ; preds = %143
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #8
  br label %146

146:                                              ; preds = %145, %143
  %147 = load i1, ptr %36, align 1
  br i1 %147, label %148, label %149

148:                                              ; preds = %146
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #8
  br label %149

149:                                              ; preds = %148, %146
  %150 = load i1, ptr %34, align 1
  br i1 %150, label %151, label %152

151:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #8
  br label %152

152:                                              ; preds = %151, %149
  %153 = load i1, ptr %32, align 1
  br i1 %153, label %154, label %155

154:                                              ; preds = %152
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  br label %155

155:                                              ; preds = %154, %152
  %156 = load i1, ptr %31, align 1
  br i1 %156, label %157, label %158

157:                                              ; preds = %155
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  br label %158

158:                                              ; preds = %157, %155
  %159 = load i1, ptr %30, align 1
  br i1 %159, label %160, label %161

160:                                              ; preds = %158
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #8
  br label %161

161:                                              ; preds = %160, %158
  %162 = load i1, ptr %29, align 1
  br i1 %162, label %163, label %164

163:                                              ; preds = %161
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  br label %164

164:                                              ; preds = %163, %161
  %165 = load i1, ptr %28, align 1
  br i1 %165, label %166, label %167

166:                                              ; preds = %164
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #8
  br label %167

167:                                              ; preds = %166, %164
  %168 = load i1, ptr %26, align 1
  br i1 %168, label %169, label %170

169:                                              ; preds = %167
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #8
  br label %170

170:                                              ; preds = %169, %167
  %171 = load i1, ptr %24, align 1
  br i1 %171, label %172, label %173

172:                                              ; preds = %170
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #8
  br label %173

173:                                              ; preds = %172, %170
  %174 = load i1, ptr %23, align 1
  br i1 %174, label %175, label %176

175:                                              ; preds = %173
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #8
  br label %176

176:                                              ; preds = %175, %173
  %177 = load i1, ptr %20, align 1
  br i1 %177, label %178, label %179

178:                                              ; preds = %176
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #8
  br label %179

179:                                              ; preds = %178, %176
  %180 = load i1, ptr %19, align 1
  br i1 %180, label %181, label %182

181:                                              ; preds = %179
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #8
  br label %182

182:                                              ; preds = %181, %179
  %183 = load i1, ptr %17, align 1
  br i1 %183, label %184, label %185

184:                                              ; preds = %182
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #8
  br label %185

185:                                              ; preds = %184, %182
  %186 = load i1, ptr %15, align 1
  br i1 %186, label %187, label %188

187:                                              ; preds = %185
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #8
  br label %188

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

190:                                              ; preds = %188
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  br label %191

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

193:                                              ; preds = %191
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #8
  br label %194

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

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

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

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

200:                                              ; preds = %199, %197
  %201 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 3
  %202 = load ptr, ptr %201, align 8, !tbaa !11
  call void @_ZN4Elem15resetEventIndexEv(ptr noundef nonnull align 8 dereferenceable(408) %202)
  %203 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 3
  %204 = load ptr, ptr %203, align 8, !tbaa !11
  call void @_ZN4Apex16setInWatFloodVecEb(ptr noundef nonnull align 8 dereferenceable(104) %204, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %60) #8
  store i32 0, ptr %60, align 4, !tbaa !16
  br label %205

205:                                              ; preds = %388, %200
  %206 = load i32, ptr %60, align 4, !tbaa !16
  %207 = getelementptr inbounds %class.Polygon, ptr %75, i32 0, i32 1
  %208 = load i32, ptr %207, align 8, !tbaa !17
  %209 = icmp slt i32 %206, %208
  br i1 %209, label %382, label %210

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

211:                                              ; preds = %80
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %21, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %22, align 4
  br label %357

215:                                              ; preds = %81
  %216 = landingpad { ptr, i32 }
          cleanup
  %217 = extractvalue { ptr, i32 } %216, 0
  store ptr %217, ptr %21, align 8
  %218 = extractvalue { ptr, i32 } %216, 1
  store i32 %218, ptr %22, align 4
  br label %353

219:                                              ; preds = %82
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %21, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %22, align 4
  br label %340

223:                                              ; preds = %83
  %224 = landingpad { ptr, i32 }
          cleanup
  %225 = extractvalue { ptr, i32 } %224, 0
  store ptr %225, ptr %21, align 8
  %226 = extractvalue { ptr, i32 } %224, 1
  store i32 %226, ptr %22, align 4
  br label %336

227:                                              ; preds = %84
  %228 = landingpad { ptr, i32 }
          cleanup
  %229 = extractvalue { ptr, i32 } %228, 0
  store ptr %229, ptr %21, align 8
  %230 = extractvalue { ptr, i32 } %228, 1
  store i32 %230, ptr %22, align 4
  br label %332

231:                                              ; preds = %85
  %232 = landingpad { ptr, i32 }
          cleanup
  %233 = extractvalue { ptr, i32 } %232, 0
  store ptr %233, ptr %21, align 8
  %234 = extractvalue { ptr, i32 } %232, 1
  store i32 %234, ptr %22, align 4
  br label %319

235:                                              ; preds = %86
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %21, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %22, align 4
  br label %315

239:                                              ; preds = %87
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %21, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %22, align 4
  br label %311

243:                                              ; preds = %88
  %244 = landingpad { ptr, i32 }
          cleanup
  %245 = extractvalue { ptr, i32 } %244, 0
  store ptr %245, ptr %21, align 8
  %246 = extractvalue { ptr, i32 } %244, 1
  store i32 %246, ptr %22, align 4
  br label %304

247:                                              ; preds = %89
  %248 = landingpad { ptr, i32 }
          cleanup
  %249 = extractvalue { ptr, i32 } %248, 0
  store ptr %249, ptr %21, align 8
  %250 = extractvalue { ptr, i32 } %248, 1
  store i32 %250, ptr %22, align 4
  br label %300

251:                                              ; preds = %90
  %252 = landingpad { ptr, i32 }
          cleanup
  %253 = extractvalue { ptr, i32 } %252, 0
  store ptr %253, ptr %21, align 8
  %254 = extractvalue { ptr, i32 } %252, 1
  store i32 %254, ptr %22, align 4
  br label %287

255:                                              ; preds = %91
  %256 = landingpad { ptr, i32 }
          cleanup
  %257 = extractvalue { ptr, i32 } %256, 0
  store ptr %257, ptr %21, align 8
  %258 = extractvalue { ptr, i32 } %256, 1
  store i32 %258, ptr %22, align 4
  br label %274

259:                                              ; preds = %92
  %260 = landingpad { ptr, i32 }
          cleanup
  %261 = extractvalue { ptr, i32 } %260, 0
  store ptr %261, ptr %21, align 8
  %262 = extractvalue { ptr, i32 } %260, 1
  store i32 %262, ptr %22, align 4
  br label %270

263:                                              ; preds = %93
  %264 = landingpad { ptr, i32 }
          cleanup
  %265 = extractvalue { ptr, i32 } %264, 0
  store ptr %265, ptr %21, align 8
  %266 = extractvalue { ptr, i32 } %264, 1
  store i32 %266, ptr %22, align 4
  %267 = load i1, ptr %59, align 1
  br i1 %267, label %268, label %269

268:                                              ; preds = %263
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #8
  br label %269

269:                                              ; preds = %268, %263
  br label %270

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

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

273:                                              ; preds = %272, %270
  br label %274

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

276:                                              ; preds = %274
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %55) #8
  br label %277

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

279:                                              ; preds = %277
  call void @llvm.lifetime.end.p0(i64 1, ptr %55) #8
  br label %280

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

282:                                              ; preds = %280
  call void @llvm.lifetime.end.p0(i64 32, ptr %53) #8
  br label %283

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

285:                                              ; preds = %283
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %47) #8
  br label %286

286:                                              ; preds = %285, %283
  br label %287

287:                                              ; preds = %286, %251
  %288 = load i1, ptr %51, align 1
  br i1 %288, label %289, label %290

289:                                              ; preds = %287
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %49) #8
  br label %290

290:                                              ; preds = %289, %287
  %291 = load i1, ptr %50, align 1
  br i1 %291, label %292, label %293

292:                                              ; preds = %290
  call void @llvm.lifetime.end.p0(i64 1, ptr %49) #8
  br label %293

293:                                              ; preds = %292, %290
  %294 = load i1, ptr %48, align 1
  br i1 %294, label %295, label %296

295:                                              ; preds = %293
  call void @llvm.lifetime.end.p0(i64 32, ptr %47) #8
  br label %296

296:                                              ; preds = %295, %293
  %297 = load i1, ptr %45, align 1
  br i1 %297, label %298, label %299

298:                                              ; preds = %296
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  br label %299

299:                                              ; preds = %298, %296
  br label %300

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

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

303:                                              ; preds = %302, %300
  br label %304

304:                                              ; preds = %303, %243
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  %305 = load i1, ptr %42, align 1
  br i1 %305, label %306, label %307

306:                                              ; preds = %304
  call void @llvm.lifetime.end.p0(i64 32, ptr %41) #8
  br label %307

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

309:                                              ; preds = %307
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  br label %310

310:                                              ; preds = %309, %307
  br label %311

311:                                              ; preds = %310, %239
  %312 = load i1, ptr %39, 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) %8) #8
  br label %314

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

315:                                              ; preds = %314, %235
  %316 = load i1, ptr %38, 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) %33) #8
  br label %318

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

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

321:                                              ; preds = %319
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #8
  br label %322

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

324:                                              ; preds = %322
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #8
  br label %325

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

327:                                              ; preds = %325
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #8
  br label %328

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

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

331:                                              ; preds = %330, %328
  br label %332

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

334:                                              ; preds = %332
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  br label %335

335:                                              ; preds = %334, %332
  br label %336

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

338:                                              ; preds = %336
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #8
  br label %339

339:                                              ; preds = %338, %336
  br label %340

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

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

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

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

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

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

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

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

352:                                              ; preds = %351, %349
  br label %353

353:                                              ; preds = %352, %215
  %354 = load i1, ptr %23, align 1
  br i1 %354, label %355, label %356

355:                                              ; preds = %353
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #8
  br label %356

356:                                              ; preds = %355, %353
  br label %357

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

359:                                              ; preds = %357
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #8
  br label %360

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

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

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

365:                                              ; preds = %363
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #8
  br label %366

366:                                              ; preds = %365, %363
  %367 = load i1, ptr %15, align 1
  br i1 %367, label %368, label %369

368:                                              ; preds = %366
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #8
  br label %369

369:                                              ; preds = %368, %366
  %370 = load i1, ptr %13, align 1
  br i1 %370, label %371, label %372

371:                                              ; preds = %369
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  br label %372

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

374:                                              ; preds = %372
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #8
  br label %375

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

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

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

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

381:                                              ; preds = %380, %378
  br label %623

382:                                              ; preds = %205
  %383 = getelementptr inbounds %class.Polygon, ptr %75, i32 0, i32 4
  %384 = load ptr, ptr %383, align 8, !tbaa !25
  %385 = load i32, ptr %60, align 4, !tbaa !16
  %386 = sext i32 %385 to i64
  %387 = getelementptr inbounds %class.LayerApex, ptr %384, i64 %386
  call void @_ZN4Apex16setInWatFloodVecEb(ptr noundef nonnull align 8 dereferenceable(104) %387, i1 noundef zeroext false)
  br label %388

388:                                              ; preds = %382
  %389 = load i32, ptr %60, align 4, !tbaa !16
  %390 = add nsw i32 %389, 1
  store i32 %390, ptr %60, align 4, !tbaa !16
  br label %205, !llvm.loop !26

391:                                              ; preds = %210
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #8
  %392 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 4
  %393 = load ptr, ptr %392, align 8, !tbaa !28
  %394 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %393)
  store double %394, ptr %61, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %62) #8
  store i32 0, ptr %62, align 4, !tbaa !16
  br label %395

395:                                              ; preds = %447, %391
  %396 = load i32, ptr %62, align 4, !tbaa !16
  %397 = getelementptr inbounds %class.Polygon, ptr %75, i32 0, i32 1
  %398 = load i32, ptr %397, align 8, !tbaa !17
  %399 = icmp slt i32 %396, %398
  br i1 %399, label %401, label %400

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

401:                                              ; preds = %395
  %402 = getelementptr inbounds %class.Polygon, ptr %75, i32 0, i32 3
  %403 = load ptr, ptr %402, align 8, !tbaa !29
  %404 = load i32, ptr %62, align 4, !tbaa !16
  %405 = sext i32 %404 to i64
  %406 = getelementptr inbounds %class.CornerApex, ptr %403, i64 %405
  %407 = load double, ptr %4, align 8, !tbaa !9
  %408 = getelementptr inbounds %class.VoidElem, ptr %75, i32 0, i32 4
  %409 = load double, ptr %408, align 8, !tbaa !30
  %410 = getelementptr inbounds %class.VoidElem, ptr %75, i32 0, i32 3
  %411 = load double, ptr %410, align 8, !tbaa !31
  %412 = getelementptr inbounds %class.Polygon, ptr %75, i32 0, i32 2
  %413 = load i32, ptr %62, align 4, !tbaa !16
  %414 = sext i32 %413 to i64
  %415 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %412, i64 noundef %414) #8
  %416 = load double, ptr %415, align 8, !tbaa !9
  %417 = load double, ptr %61, align 8, !tbaa !9
  call void @_ZN10CornerApex14initCornerApexEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %406, double noundef %407, double noundef %409, double noundef %411, double noundef %416, double noundef %417, i1 noundef zeroext false)
  %418 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 6
  %419 = load ptr, ptr %418, align 8, !tbaa !32
  %420 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 4
  %421 = load ptr, ptr %420, align 8, !tbaa !28
  %422 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984) %421)
  %423 = icmp eq ptr %419, %422
  br i1 %423, label %424, label %446

424:                                              ; preds = %401
  %425 = getelementptr inbounds %class.Polygon, ptr %75, i32 0, i32 4
  %426 = load ptr, ptr %425, align 8, !tbaa !25
  %427 = load i32, ptr %62, align 4, !tbaa !16
  %428 = sext i32 %427 to i64
  %429 = getelementptr inbounds %class.LayerApex, ptr %426, i64 %428
  %430 = load double, ptr %4, align 8, !tbaa !9
  %431 = getelementptr inbounds %class.VoidElem, ptr %75, i32 0, i32 4
  %432 = load double, ptr %431, align 8, !tbaa !30
  %433 = getelementptr inbounds %class.VoidElem, ptr %75, i32 0, i32 3
  %434 = load double, ptr %433, align 8, !tbaa !31
  %435 = getelementptr inbounds %class.Polygon, ptr %75, i32 0, i32 2
  %436 = load i32, ptr %62, align 4, !tbaa !16
  %437 = sext i32 %436 to i64
  %438 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %435, i64 noundef %437) #8
  %439 = load double, ptr %438, align 8, !tbaa !9
  %440 = load double, ptr %61, align 8, !tbaa !9
  %441 = call noundef zeroext i1 @_ZN9LayerApex13initLayerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %429, double noundef %430, double noundef %432, double noundef %434, double noundef %439, double noundef %440, i1 noundef zeroext false, i1 noundef zeroext false)
  br i1 %441, label %445, label %442

442:                                              ; preds = %424
  %443 = load i32, ptr %62, align 4, !tbaa !16
  %444 = call noundef double @_ZN7Polygon25Pc_pin_disconnectOilLayerEi(ptr noundef nonnull align 8 dereferenceable(248) %75, i32 noundef %443)
  br label %445

445:                                              ; preds = %442, %424
  br label %446

446:                                              ; preds = %445, %401
  br label %447

447:                                              ; preds = %446
  %448 = load i32, ptr %62, align 4, !tbaa !16
  %449 = add nsw i32 %448, 1
  store i32 %449, ptr %62, align 4, !tbaa !16
  br label %395, !llvm.loop !33

450:                                              ; preds = %400
  %451 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 6
  %452 = load ptr, ptr %451, align 8, !tbaa !32
  %453 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 4
  %454 = load ptr, ptr %453, align 8, !tbaa !28
  %455 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984) %454)
  %456 = icmp eq ptr %452, %455
  br i1 %456, label %457, label %486

457:                                              ; preds = %450
  %458 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 4
  %459 = load ptr, ptr %458, align 8, !tbaa !28
  %460 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %459)
  %461 = getelementptr inbounds %class.VoidElem, ptr %75, i32 0, i32 3
  %462 = load double, ptr %461, align 8, !tbaa !31
  %463 = call double @cos(double noundef %462) #8
  %464 = fmul double 2.000000e+00, %463
  %465 = fmul double %460, %464
  %466 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 5
  %467 = load double, ptr %466, align 8, !tbaa !34
  %468 = fdiv double %465, %467
  %469 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 16
  store double %468, ptr %469, align 8, !tbaa !35
  %470 = load double, ptr %4, align 8, !tbaa !9
  %471 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 15
  %472 = load double, ptr %471, align 8, !tbaa !36
  %473 = fcmp olt double %470, %472
  br i1 %473, label %474, label %485

474:                                              ; preds = %457
  %475 = load double, ptr %4, align 8, !tbaa !9
  %476 = getelementptr inbounds %class.VoidElem, ptr %75, i32 0, i32 3
  %477 = load double, ptr %476, align 8, !tbaa !31
  %478 = call double @cos(double noundef %477) #8
  %479 = fmul double %475, %478
  %480 = getelementptr inbounds %class.VoidElem, ptr %75, i32 0, i32 4
  %481 = load double, ptr %480, align 8, !tbaa !30
  %482 = call double @cos(double noundef %481) #8
  %483 = fdiv double %479, %482
  %484 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 16
  store double %483, ptr %484, align 8, !tbaa !35
  br label %485

485:                                              ; preds = %474, %457
  store i32 1, ptr %63, align 4
  br label %620

486:                                              ; preds = %450
  %487 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 10
  store i8 0, ptr %487, align 1, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #8
  %488 = getelementptr inbounds %class.VoidElem, ptr %75, i32 0, i32 2
  %489 = load double, ptr %488, align 8, !tbaa !38
  store double %489, ptr %65, align 8, !tbaa !9
  %490 = getelementptr inbounds %class.Polygon, ptr %75, i32 0, i32 3
  %491 = load ptr, ptr %490, align 8, !tbaa !29
  %492 = getelementptr inbounds %class.CornerApex, ptr %491, i64 0
  %493 = load double, ptr %4, align 8, !tbaa !9
  %494 = getelementptr inbounds %class.Polygon, ptr %75, i32 0, i32 2
  %495 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %494, i64 noundef 0) #8
  %496 = load double, ptr %495, align 8, !tbaa !9
  %497 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 4
  %498 = load ptr, ptr %497, align 8, !tbaa !28
  %499 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %498)
  call void @_ZNK10CornerApex18getCApexDistConAngERdS0_dddbbb(ptr noundef nonnull align 8 dereferenceable(144) %492, ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull align 8 dereferenceable(8) %65, double noundef %493, double noundef %496, double noundef %499, i1 noundef zeroext true, i1 noundef zeroext false, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %66) #8
  %500 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 4
  %501 = load ptr, ptr %500, align 8, !tbaa !28
  %502 = call noundef double @_ZNK10CommonData19maxPcLastDrainCycleEv(ptr noundef nonnull align 8 dereferenceable(1972) %501)
  %503 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 3
  %504 = load ptr, ptr %503, align 8, !tbaa !11
  %505 = call noundef double @_ZNK4Apex17gravityCorrectionEv(ptr noundef nonnull align 8 dereferenceable(104) %504)
  %506 = fsub double %502, %505
  store double %506, ptr %66, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #8
  %507 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 4
  %508 = load ptr, ptr %507, align 8, !tbaa !28
  %509 = call noundef double @_ZNK10CommonData9maxEverPcEv(ptr noundef nonnull align 8 dereferenceable(1972) %508)
  %510 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 3
  %511 = load ptr, ptr %510, align 8, !tbaa !11
  %512 = call noundef double @_ZNK4Apex17gravityCorrectionEv(ptr noundef nonnull align 8 dereferenceable(104) %511)
  %513 = fsub double %509, %512
  store double %513, ptr %67, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #8
  %514 = getelementptr inbounds %class.Polygon, ptr %75, i32 0, i32 3
  %515 = load ptr, ptr %514, align 8, !tbaa !29
  %516 = getelementptr inbounds %class.CornerApex, ptr %515, i64 0
  %517 = call noundef zeroext i1 @_ZNK10CornerApex17pinnedInInitStateEv(ptr noundef nonnull align 8 dereferenceable(144) %516)
  br i1 %517, label %518, label %520

518:                                              ; preds = %486
  %519 = load double, ptr %67, align 8, !tbaa !9
  br label %522

520:                                              ; preds = %486
  %521 = load double, ptr %66, align 8, !tbaa !9
  br label %522

522:                                              ; preds = %520, %518
  %523 = phi double [ %519, %518 ], [ %521, %520 ]
  store double %523, ptr %68, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %69) #8
  store double 0.000000e+00, ptr %69, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %70) #8
  %524 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 5
  %525 = load double, ptr %524, align 8, !tbaa !34
  %526 = load double, ptr %68, align 8, !tbaa !9
  %527 = fmul double %525, %526
  %528 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 4
  %529 = load ptr, ptr %528, align 8, !tbaa !28
  %530 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %529)
  %531 = fdiv double %527, %530
  store double %531, ptr %70, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %71) #8
  store i32 0, ptr %71, align 4, !tbaa !16
  br label %532

532:                                              ; preds = %557, %522
  %533 = load i32, ptr %71, align 4, !tbaa !16
  %534 = getelementptr inbounds %class.Polygon, ptr %75, i32 0, i32 1
  %535 = load i32, ptr %534, align 8, !tbaa !17
  %536 = icmp slt i32 %533, %535
  br i1 %536, label %538, label %537

537:                                              ; preds = %532
  store i32 8, ptr %63, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %71) #8
  br label %560

538:                                              ; preds = %532
  %539 = getelementptr inbounds %class.Polygon, ptr %75, i32 0, i32 3
  %540 = load ptr, ptr %539, align 8, !tbaa !29
  %541 = load i32, ptr %71, align 4, !tbaa !16
  %542 = sext i32 %541 to i64
  %543 = getelementptr inbounds %class.CornerApex, ptr %540, i64 %542
  %544 = call noundef zeroext i1 @_ZNK10CornerApex12cornerExistsEv(ptr noundef nonnull align 8 dereferenceable(144) %543)
  br i1 %544, label %545, label %556

545:                                              ; preds = %538
  %546 = load double, ptr %65, align 8, !tbaa !9
  %547 = getelementptr inbounds %class.Polygon, ptr %75, i32 0, i32 2
  %548 = load i32, ptr %71, align 4, !tbaa !16
  %549 = sext i32 %548 to i64
  %550 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %547, i64 noundef %549) #8
  %551 = load double, ptr %550, align 8, !tbaa !9
  %552 = fadd double %546, %551
  %553 = call double @cos(double noundef %552) #8
  %554 = load double, ptr %69, align 8, !tbaa !9
  %555 = fadd double %554, %553
  store double %555, ptr %69, align 8, !tbaa !9
  br label %556

556:                                              ; preds = %545, %538
  br label %557

557:                                              ; preds = %556
  %558 = load i32, ptr %71, align 4, !tbaa !16
  %559 = add nsw i32 %558, 1
  store i32 %559, ptr %71, align 4, !tbaa !16
  br label %532, !llvm.loop !39

560:                                              ; preds = %537
  call void @llvm.lifetime.start.p0(i64 8, ptr %72) #8
  %561 = getelementptr inbounds %class.VoidElem, ptr %75, i32 0, i32 1
  %562 = load double, ptr %561, align 8, !tbaa !40
  %563 = fmul double -4.000000e+00, %562
  %564 = load double, ptr %69, align 8, !tbaa !9
  %565 = fmul double %563, %564
  %566 = load double, ptr %70, align 8, !tbaa !9
  %567 = load double, ptr %65, align 8, !tbaa !9
  %568 = call double @cos(double noundef %567) #8
  %569 = fsub double %566, %568
  %570 = getelementptr inbounds %class.VoidElem, ptr %75, i32 0, i32 1
  %571 = load double, ptr %570, align 8, !tbaa !40
  %572 = fmul double 1.200000e+01, %571
  %573 = load double, ptr %65, align 8, !tbaa !9
  %574 = call double @sin(double noundef %573) #8
  %575 = call double @llvm.fmuladd.f64(double %572, double %574, double %569)
  %576 = fdiv double %565, %575
  store double %576, ptr %72, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %73) #8
  store double -1.000000e+00, ptr %73, align 8, !tbaa !9
  %577 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef nonnull align 8 dereferenceable(8) %73)
  %578 = load double, ptr %577, align 8, !tbaa !9
  store double %578, ptr %72, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %73) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %74) #8
  store double 1.000000e+00, ptr %74, align 8, !tbaa !9
  %579 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef nonnull align 8 dereferenceable(8) %74)
  %580 = load double, ptr %579, align 8, !tbaa !9
  store double %580, ptr %72, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %74) #8
  %581 = load double, ptr %72, align 8, !tbaa !9
  %582 = call double @acos(double noundef %581) #8
  %583 = getelementptr inbounds %class.Polygon, ptr %75, i32 0, i32 7
  store double %582, ptr %583, align 8, !tbaa !41
  call void @llvm.lifetime.end.p0(i64 8, ptr %72) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #8
  %584 = getelementptr inbounds %class.VoidElem, ptr %75, i32 0, i32 3
  %585 = load double, ptr %584, align 8, !tbaa !31
  %586 = getelementptr inbounds %class.Polygon, ptr %75, i32 0, i32 7
  %587 = load double, ptr %586, align 8, !tbaa !41
  %588 = fcmp olt double %585, %587
  br i1 %588, label %589, label %592

589:                                              ; preds = %560
  %590 = call noundef double @_ZNK7Polygon26Pc_pistonType_ImbHingCLineEv(ptr noundef nonnull align 8 dereferenceable(248) %75)
  %591 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 16
  store double %590, ptr %591, align 8, !tbaa !35
  br label %619

592:                                              ; preds = %560
  %593 = getelementptr inbounds %class.VoidElem, ptr %75, i32 0, i32 3
  %594 = load double, ptr %593, align 8, !tbaa !31
  %595 = load double, ptr @_ZN9ElemModel2PIE, align 8, !tbaa !9
  %596 = fdiv double %595, 2.000000e+00
  %597 = getelementptr inbounds %class.Polygon, ptr %75, i32 0, i32 2
  %598 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %597, i64 noundef 0) #8
  %599 = load double, ptr %598, align 8, !tbaa !9
  %600 = fadd double %596, %599
  %601 = fcmp ole double %594, %600
  br i1 %601, label %602, label %615

602:                                              ; preds = %592
  %603 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 4
  %604 = load ptr, ptr %603, align 8, !tbaa !28
  %605 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %604)
  %606 = getelementptr inbounds %class.VoidElem, ptr %75, i32 0, i32 3
  %607 = load double, ptr %606, align 8, !tbaa !31
  %608 = call double @cos(double noundef %607) #8
  %609 = fmul double 2.000000e+00, %608
  %610 = fmul double %605, %609
  %611 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 5
  %612 = load double, ptr %611, align 8, !tbaa !34
  %613 = fdiv double %610, %612
  %614 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 16
  store double %613, ptr %614, align 8, !tbaa !35
  br label %618

615:                                              ; preds = %592
  %616 = call noundef double @_ZNK7Polygon20Pc_pistonType_ImbnwwEv(ptr noundef nonnull align 8 dereferenceable(248) %75)
  %617 = getelementptr inbounds %class.ElemModel, ptr %75, i32 0, i32 16
  store double %616, ptr %617, align 8, !tbaa !35
  br label %618

618:                                              ; preds = %615, %602
  br label %619

619:                                              ; preds = %618, %589
  store i32 0, ptr %63, align 4
  br label %620

620:                                              ; preds = %619, %485
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #8
  %621 = load i32, ptr %63, align 4
  switch i32 %621, label %628 [
    i32 0, label %622
    i32 1, label %622
  ]

622:                                              ; preds = %620, %620
  ret void

623:                                              ; preds = %381
  %624 = load ptr, ptr %21, align 8
  %625 = load i32, ptr %22, align 4
  %626 = insertvalue { ptr, i32 } poison, ptr %624, 0
  %627 = insertvalue { ptr, i32 } %626, i32 %625, 1
  resume { ptr, i32 } %627

628:                                              ; preds = %620
  unreachable
}

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

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) #7

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { "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 #8 = { 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 = !{!14, !14, i64 0}
!17 = !{!18, !14, i64 184}
!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 = !{!18, !6, i64 224}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!12, !6, i64 32}
!29 = !{!18, !6, i64 216}
!30 = !{!19, !10, i64 176}
!31 = !{!19, !10, i64 168}
!32 = !{!12, !6, i64 48}
!33 = distinct !{!33, !27}
!34 = !{!12, !10, i64 40}
!35 = !{!12, !10, i64 96}
!36 = !{!12, !10, i64 88}
!37 = !{!12, !13, i64 59}
!38 = !{!19, !10, i64 160}
!39 = distinct !{!39, !27}
!40 = !{!19, !10, i64 152}
!41 = !{!18, !10, i64 240}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.2" = 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
@__FUNCTION__._ZN6Circle18initWaterInjectionEd = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@_ZN9ElemModel2PIE = external local_unnamed_addr constant double, align 8

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

; 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 #1

; 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 #1

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

; 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 #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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 #0 align 2

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

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

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

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

; 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 nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

; 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 #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Polygon18initWaterInjectionEd(ptr noundef nonnull align 8 dereferenceable(248) %0, double noundef %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator.2", align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator.2", align 1
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator.2", 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.2", align 1
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::allocator.2", align 1
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = getelementptr inbounds i8, ptr %0, i64 24
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %29 = tail call noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %28)
  %30 = icmp slt i32 %29, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #8
  br i1 %30, label %31, label %46

31:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  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 %32 unwind label %64

32:                                               ; preds = %31
  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 %33 unwind label %66

33:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @__FUNCTION__._ZN6Circle18initWaterInjectionEd, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %34 unwind label %68

34:                                               ; preds = %33
  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 %35 unwind label %70

35:                                               ; preds = %34
  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 %36 unwind label %72

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  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 %37 unwind label %74

37:                                               ; preds = %36
  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 %38 unwind label %76

38:                                               ; preds = %37
  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 %39 unwind label %78

39:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #8
  store i32 120, ptr %16, align 4, !tbaa !14
  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 %40 unwind label %80

40:                                               ; preds = %39
  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 %41 unwind label %82

41:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %18) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %19) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #8
  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 %42 unwind label %84

42:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %20) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %21) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %43 unwind label %86

43:                                               ; preds = %42
  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 %44 unwind label %88

44:                                               ; preds = %43
  %45 = invoke noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef nonnull %3, ptr noundef nonnull %17, i32 noundef 0)
          to label %.critedge176 unwind label %90

46:                                               ; preds = %2
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #8
  br label %.critedge197

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

.critedge197:                                     ; preds = %46, %.critedge176
  %47 = load ptr, ptr %27, align 8, !tbaa !5
  call void @_ZN4Elem15resetEventIndexEv(ptr noundef nonnull align 8 dereferenceable(408) %47)
  %48 = load ptr, ptr %27, align 8, !tbaa !5
  call void @_ZN4Apex16setInWatFloodVecEb(ptr noundef nonnull align 8 dereferenceable(104) %48, i1 noundef zeroext false)
  %49 = getelementptr inbounds i8, ptr %0, i64 184
  %50 = load i32, ptr %49, align 8, !tbaa !15
  %51 = icmp sgt i32 %50, 0
  br i1 %51, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.critedge197
  %52 = getelementptr inbounds i8, ptr %0, i64 224
  br label %105

._crit_edge:                                      ; preds = %105, %.critedge197
  %53 = getelementptr inbounds i8, ptr %0, i64 32
  %54 = load ptr, ptr %53, align 8, !tbaa !23
  %55 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %54)
  %56 = load i32, ptr %49, align 8, !tbaa !15
  %57 = icmp sgt i32 %56, 0
  br i1 %57, label %.lr.ph201, label %._crit_edge202

.lr.ph201:                                        ; preds = %._crit_edge
  %58 = getelementptr inbounds i8, ptr %0, i64 216
  %59 = getelementptr inbounds i8, ptr %0, i64 176
  %60 = getelementptr inbounds i8, ptr %0, i64 168
  %61 = getelementptr inbounds i8, ptr %0, i64 192
  %62 = getelementptr inbounds i8, ptr %0, i64 48
  %63 = getelementptr inbounds i8, ptr %0, i64 224
  br label %116

64:                                               ; preds = %31
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %104

66:                                               ; preds = %32
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %103

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

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

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

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

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

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

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

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

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

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

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

90:                                               ; preds = %44
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #8
  br label %92

92:                                               ; preds = %88, %90
  %.pn = phi { ptr, i32 } [ %91, %90 ], [ %89, %88 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #8
  br label %93

93:                                               ; preds = %86, %92
  %.pn.pn = phi { ptr, i32 } [ %.pn, %92 ], [ %87, %86 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #8
  br label %94

94:                                               ; preds = %84, %93
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %93 ], [ %85, %84 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  br label %95

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

96:                                               ; preds = %95, %80
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %95 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  br label %97

97:                                               ; preds = %78, %96
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %96 ], [ %79, %78 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  br label %98

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

99:                                               ; preds = %74, %98
  %.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn, %98 ], [ %75, %74 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  br label %100

100:                                              ; preds = %72, %99
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn, %99 ], [ %73, %72 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  br label %101

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

102:                                              ; preds = %68, %101
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %101 ], [ %69, %68 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  br label %103

103:                                              ; preds = %66, %102
  %.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, %102 ], [ %67, %66 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  br label %104

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

105:                                              ; preds = %.lr.ph, %105
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %105 ]
  %106 = load ptr, ptr %52, align 8, !tbaa !24
  %107 = getelementptr inbounds %class.LayerApex, ptr %106, i64 %indvars.iv
  call void @_ZN4Apex16setInWatFloodVecEb(ptr noundef nonnull align 8 dereferenceable(104) %107, i1 noundef zeroext false)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %108 = load i32, ptr %49, align 8, !tbaa !15
  %109 = sext i32 %108 to i64
  %110 = icmp slt i64 %indvars.iv.next, %109
  br i1 %110, label %105, label %._crit_edge, !llvm.loop !25

._crit_edge202:                                   ; preds = %138, %._crit_edge
  %111 = getelementptr inbounds i8, ptr %0, i64 48
  %112 = load ptr, ptr %111, align 8, !tbaa !27
  %113 = load ptr, ptr %53, align 8, !tbaa !23
  %114 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984) %113)
  %115 = icmp eq ptr %112, %114
  br i1 %115, label %142, label %165

116:                                              ; preds = %.lr.ph201, %138
  %indvars.iv209 = phi i64 [ 0, %.lr.ph201 ], [ %indvars.iv.next210, %138 ]
  %117 = load ptr, ptr %58, align 8, !tbaa !28
  %118 = getelementptr inbounds %class.CornerApex, ptr %117, i64 %indvars.iv209
  %119 = load double, ptr %59, align 8, !tbaa !29
  %120 = load double, ptr %60, align 8, !tbaa !30
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %indvars.iv209) #8
  %122 = load double, ptr %121, align 8, !tbaa !31
  call void @_ZN10CornerApex14initCornerApexEdddddb(ptr noundef nonnull align 8 dereferenceable(144) %118, double noundef %1, double noundef %119, double noundef %120, double noundef %122, double noundef %55, i1 noundef zeroext false)
  %123 = load ptr, ptr %62, align 8, !tbaa !27
  %124 = load ptr, ptr %53, align 8, !tbaa !23
  %125 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984) %124)
  %126 = icmp eq ptr %123, %125
  br i1 %126, label %127, label %138

127:                                              ; preds = %116
  %128 = load ptr, ptr %63, align 8, !tbaa !24
  %129 = getelementptr inbounds %class.LayerApex, ptr %128, i64 %indvars.iv209
  %130 = load double, ptr %59, align 8, !tbaa !29
  %131 = load double, ptr %60, align 8, !tbaa !30
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %indvars.iv209) #8
  %133 = load double, ptr %132, align 8, !tbaa !31
  %134 = call noundef zeroext i1 @_ZN9LayerApex13initLayerApexEdddddbb(ptr noundef nonnull align 8 dereferenceable(144) %129, double noundef %1, double noundef %130, double noundef %131, double noundef %133, double noundef %55, i1 noundef zeroext false, i1 noundef zeroext false)
  br i1 %134, label %138, label %135

135:                                              ; preds = %127
  %136 = trunc nuw nsw i64 %indvars.iv209 to i32
  %137 = call noundef double @_ZN7Polygon25Pc_pin_disconnectOilLayerEi(ptr noundef nonnull align 8 dereferenceable(248) %0, i32 noundef %136)
  br label %138

138:                                              ; preds = %116, %135, %127
  %indvars.iv.next210 = add nuw nsw i64 %indvars.iv209, 1
  %139 = load i32, ptr %49, align 8, !tbaa !15
  %140 = sext i32 %139 to i64
  %141 = icmp slt i64 %indvars.iv.next210, %140
  br i1 %141, label %116, label %._crit_edge202, !llvm.loop !32

142:                                              ; preds = %._crit_edge202
  %143 = load ptr, ptr %53, align 8, !tbaa !23
  %144 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %143)
  %145 = getelementptr inbounds i8, ptr %0, i64 168
  %146 = load double, ptr %145, align 8, !tbaa !30
  %147 = call double @cos(double noundef %146) #8
  %148 = fmul double %147, 2.000000e+00
  %149 = fmul double %144, %148
  %150 = getelementptr inbounds i8, ptr %0, i64 40
  %151 = load double, ptr %150, align 8, !tbaa !33
  %152 = fdiv double %149, %151
  %153 = getelementptr inbounds i8, ptr %0, i64 96
  store double %152, ptr %153, align 8, !tbaa !34
  %154 = getelementptr inbounds i8, ptr %0, i64 88
  %155 = load double, ptr %154, align 8, !tbaa !35
  %156 = fcmp ogt double %155, %1
  br i1 %156, label %157, label %256

157:                                              ; preds = %142
  %158 = load double, ptr %145, align 8, !tbaa !30
  %159 = call double @cos(double noundef %158) #8
  %160 = fmul double %159, %1
  %161 = getelementptr inbounds i8, ptr %0, i64 176
  %162 = load double, ptr %161, align 8, !tbaa !29
  %163 = call double @cos(double noundef %162) #8
  %164 = fdiv double %160, %163
  store double %164, ptr %153, align 8, !tbaa !34
  br label %256

165:                                              ; preds = %._crit_edge202
  %166 = getelementptr inbounds i8, ptr %0, i64 59
  store i8 0, ptr %166, align 1, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #8
  %167 = getelementptr inbounds i8, ptr %0, i64 160
  %168 = load double, ptr %167, align 8, !tbaa !37
  store double %168, ptr %23, align 8, !tbaa !31
  %169 = getelementptr inbounds i8, ptr %0, i64 216
  %170 = load ptr, ptr %169, align 8, !tbaa !28
  %171 = getelementptr inbounds i8, ptr %0, i64 192
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %171, i64 noundef 0) #8
  %173 = load double, ptr %172, align 8, !tbaa !31
  %174 = load ptr, ptr %53, align 8, !tbaa !23
  %175 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %174)
  call void @_ZNK10CornerApex18getCApexDistConAngERdS0_dddbbb(ptr noundef nonnull align 8 dereferenceable(144) %170, ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23, double noundef %1, double noundef %173, double noundef %175, i1 noundef zeroext true, i1 noundef zeroext false, i1 noundef zeroext false)
  %176 = load ptr, ptr %53, align 8, !tbaa !23
  %177 = call noundef double @_ZNK10CommonData19maxPcLastDrainCycleEv(ptr noundef nonnull align 8 dereferenceable(1972) %176)
  %178 = load ptr, ptr %27, align 8, !tbaa !5
  %179 = call noundef double @_ZNK4Apex17gravityCorrectionEv(ptr noundef nonnull align 8 dereferenceable(104) %178)
  %180 = fsub double %177, %179
  %181 = load ptr, ptr %53, align 8, !tbaa !23
  %182 = call noundef double @_ZNK10CommonData9maxEverPcEv(ptr noundef nonnull align 8 dereferenceable(1972) %181)
  %183 = load ptr, ptr %27, align 8, !tbaa !5
  %184 = call noundef double @_ZNK4Apex17gravityCorrectionEv(ptr noundef nonnull align 8 dereferenceable(104) %183)
  %185 = fsub double %182, %184
  %186 = load ptr, ptr %169, align 8, !tbaa !28
  %187 = call noundef zeroext i1 @_ZNK10CornerApex17pinnedInInitStateEv(ptr noundef nonnull align 8 dereferenceable(144) %186)
  %188 = select i1 %187, double %185, double %180
  %189 = getelementptr inbounds i8, ptr %0, i64 40
  %190 = load double, ptr %189, align 8, !tbaa !33
  %191 = fmul double %190, %188
  %192 = load ptr, ptr %53, align 8, !tbaa !23
  %193 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %192)
  %194 = fdiv double %191, %193
  %195 = load i32, ptr %49, align 8, !tbaa !15
  %196 = icmp sgt i32 %195, 0
  br i1 %196, label %.lr.ph206, label %._crit_edge207

._crit_edge207:                                   ; preds = %229, %165
  %.098.lcssa = phi double [ 0.000000e+00, %165 ], [ %.1, %229 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #8
  %197 = getelementptr inbounds i8, ptr %0, i64 152
  %198 = load double, ptr %197, align 8, !tbaa !38
  %199 = fmul double %198, -4.000000e+00
  %200 = fmul double %.098.lcssa, %199
  %201 = load double, ptr %23, align 8, !tbaa !31
  %202 = call double @cos(double noundef %201) #8
  %203 = fsub double %194, %202
  %204 = load double, ptr %197, align 8, !tbaa !38
  %205 = fmul double %204, 1.200000e+01
  %206 = load double, ptr %23, align 8, !tbaa !31
  %207 = call double @sin(double noundef %206) #8
  %208 = call double @llvm.fmuladd.f64(double %205, double %207, double %203)
  %209 = fdiv double %200, %208
  store double %209, ptr %24, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #8
  store double -1.000000e+00, ptr %25, align 8, !tbaa !31
  %210 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25)
  %211 = load double, ptr %210, align 8, !tbaa !31
  store double %211, ptr %24, align 8, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #8
  store double 1.000000e+00, ptr %26, align 8, !tbaa !31
  %212 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %213 = load double, ptr %212, align 8, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #8
  %214 = call double @acos(double noundef %213) #8
  %215 = getelementptr inbounds i8, ptr %0, i64 240
  store double %214, ptr %215, align 8, !tbaa !39
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #8
  %216 = getelementptr inbounds i8, ptr %0, i64 168
  %217 = load double, ptr %216, align 8, !tbaa !30
  %218 = fcmp olt double %217, %214
  br i1 %218, label %233, label %236

.lr.ph206:                                        ; preds = %165, %229
  %indvars.iv212 = phi i64 [ %indvars.iv.next213, %229 ], [ 0, %165 ]
  %.098203 = phi double [ %.1, %229 ], [ 0.000000e+00, %165 ]
  %219 = load ptr, ptr %169, align 8, !tbaa !28
  %220 = getelementptr inbounds %class.CornerApex, ptr %219, i64 %indvars.iv212
  %221 = call noundef zeroext i1 @_ZNK10CornerApex12cornerExistsEv(ptr noundef nonnull align 8 dereferenceable(144) %220)
  br i1 %221, label %222, label %229

222:                                              ; preds = %.lr.ph206
  %223 = load double, ptr %23, align 8, !tbaa !31
  %224 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %171, i64 noundef %indvars.iv212) #8
  %225 = load double, ptr %224, align 8, !tbaa !31
  %226 = fadd double %223, %225
  %227 = call double @cos(double noundef %226) #8
  %228 = fadd double %.098203, %227
  br label %229

229:                                              ; preds = %.lr.ph206, %222
  %.1 = phi double [ %228, %222 ], [ %.098203, %.lr.ph206 ]
  %indvars.iv.next213 = add nuw nsw i64 %indvars.iv212, 1
  %230 = load i32, ptr %49, align 8, !tbaa !15
  %231 = sext i32 %230 to i64
  %232 = icmp slt i64 %indvars.iv.next213, %231
  br i1 %232, label %.lr.ph206, label %._crit_edge207, !llvm.loop !40

233:                                              ; preds = %._crit_edge207
  %234 = call noundef double @_ZNK7Polygon26Pc_pistonType_ImbHingCLineEv(ptr noundef nonnull align 8 dereferenceable(248) %0)
  %235 = getelementptr inbounds i8, ptr %0, i64 96
  store double %234, ptr %235, align 8, !tbaa !34
  br label %256

236:                                              ; preds = %._crit_edge207
  %237 = load double, ptr @_ZN9ElemModel2PIE, align 8, !tbaa !31
  %238 = fmul double %237, 5.000000e-01
  %239 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %171, i64 noundef 0) #8
  %240 = load double, ptr %239, align 8, !tbaa !31
  %241 = fadd double %238, %240
  %242 = fcmp ugt double %217, %241
  br i1 %242, label %253, label %243

243:                                              ; preds = %236
  %244 = load ptr, ptr %53, align 8, !tbaa !23
  %245 = call noundef double @_ZNK7GNMData7sigmaOWEv(ptr noundef nonnull align 8 dereferenceable(984) %244)
  %246 = load double, ptr %216, align 8, !tbaa !30
  %247 = call double @cos(double noundef %246) #8
  %248 = fmul double %247, 2.000000e+00
  %249 = fmul double %245, %248
  %250 = load double, ptr %189, align 8, !tbaa !33
  %251 = fdiv double %249, %250
  %252 = getelementptr inbounds i8, ptr %0, i64 96
  store double %251, ptr %252, align 8, !tbaa !34
  br label %256

253:                                              ; preds = %236
  %254 = call noundef double @_ZNK7Polygon20Pc_pistonType_ImbnwwEv(ptr noundef nonnull align 8 dereferenceable(248) %0)
  %255 = getelementptr inbounds i8, ptr %0, i64 96
  store double %254, ptr %255, align 8, !tbaa !34
  br label %256

256:                                              ; preds = %233, %253, %243, %142, %157
  ret void
}

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 #7

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 #7

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { "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 #8 = { 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 = !{!12, !12, i64 0}
!15 = !{!16, !12, i64 184}
!16 = !{!"_ZTS7Polygon", !17, i64 0, !12, i64 184, !18, i64 192, !10, i64 216, !10, i64 224, !22, i64 232, !8, i64 234, !7, i64 240}
!17 = !{!"_ZTS8VoidElem", !6, i64 0, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176}
!18 = !{!"_ZTSSt6vectorIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!22 = !{!"short", !8, i64 0}
!23 = !{!6, !10, i64 32}
!24 = !{!16, !10, i64 224}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!6, !10, i64 48}
!28 = !{!16, !10, i64 216}
!29 = !{!17, !7, i64 176}
!30 = !{!17, !7, i64 168}
!31 = !{!7, !7, i64 0}
!32 = distinct !{!32, !26}
!33 = !{!6, !7, i64 40}
!34 = !{!6, !7, i64 96}
!35 = !{!6, !7, i64 88}
!36 = !{!6, !11, i64 59}
!37 = !{!17, !7, i64 160}
!38 = !{!17, !7, i64 152}
!39 = !{!16, !7, i64 240}
!40 = distinct !{!40, !26}


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