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

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%class.var3 = type { double, double, double }
%class.CornerApex = type { %class.Apex, ptr, double, double, double, ptr }
%class.Apex = type { ptr, i8, double, double, ptr, i32, double, double, double, double, i8, i8, i8, i8, %"struct.std::pair" }
%"struct.std::pair" = type { i32, double }
%class.LayerApex = type { %class.Apex, i32, ptr, double, ptr, double }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZTI9ElemModel = external dso_local constant { ptr, ptr }, align 8
@_ZTI7Polygon = external constant ptr
@.str.74 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4var3IdEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z15rotateAroundVec4var3IdEdS0_(ptr dead_on_unwind noalias writable sret(%class.var3) align 8, ptr noundef byval(%class.var3) align 8, double noundef, ptr noundef byval(%class.var3) align 8) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef byval(%class.var3) align 8, ptr noundef byval(%class.var3) align 8, ptr noundef byval(%class.var3) align 8, ptr noundef byval(%class.var3) align 8, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4var3IdEmiERKS0_(ptr dead_on_unwind noalias writable sret(%class.var3) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4var3IdEdvEd(ptr dead_on_unwind noalias writable sret(%class.var3) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_Z3magIdET_RK4var3IS0_E(ptr noundef nonnull align 8 dereferenceable(24)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) #6

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4var3IdEeoERKS0_(ptr dead_on_unwind noalias writable sret(%class.var3) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4var3IdEngEv(ptr dead_on_unwind noalias writable sret(%class.var3) align 8, ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13addThroatMeshRKSt6vectorIPK4ElemSaIS2_EEmRS_I4var3IdESaIS8_EERS_IiSaIiEERS_ImSaImEERS_IfSaIfEESE_dbjdd(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %6, double noundef %7, i1 noundef zeroext %8, i32 noundef %9, double noundef %10, double noundef %11) #5 {
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca double, align 8
  %21 = alloca i8, align 1
  %22 = alloca i32, align 4
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca %class.var3, align 8
  %28 = alloca ptr, align 8
  %29 = alloca %class.var3, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  %32 = alloca double, align 8
  %33 = alloca double, align 8
  %34 = alloca double, align 8
  %35 = alloca double, align 8
  %36 = alloca double, align 8
  %37 = alloca %class.var3, align 8
  %38 = alloca %class.var3, align 8
  %39 = alloca %class.var3, align 8
  %40 = alloca i64, align 8
  %41 = alloca i32, align 4
  %42 = alloca %class.var3, align 8
  %43 = alloca %class.var3, align 8
  %44 = alloca %class.var3, align 8
  %45 = alloca %class.var3, align 8
  %46 = alloca %class.var3, align 8
  %47 = alloca ptr, align 8
  %48 = alloca i32, align 4
  %49 = alloca double, align 8
  %50 = alloca double, align 8
  %51 = alloca double, align 8
  %52 = alloca double, align 8
  %53 = alloca double, align 8
  %54 = alloca double, align 8
  %55 = alloca double, align 8
  %56 = alloca %class.var3, align 8
  %57 = alloca %class.var3, align 8
  %58 = alloca %class.var3, align 8
  %59 = alloca %class.var3, align 8
  %60 = alloca i32, align 4
  %61 = alloca float, align 4
  %62 = alloca %class.var3, align 8
  %63 = alloca %class.var3, align 8
  %64 = alloca %class.var3, align 8
  %65 = alloca %class.var3, align 8
  %66 = alloca i32, align 4
  %67 = alloca float, align 4
  %68 = alloca %class.var3, align 8
  %69 = alloca %class.var3, align 8
  %70 = alloca %class.var3, align 8
  %71 = alloca %class.var3, align 8
  %72 = alloca i32, align 4
  %73 = alloca float, align 4
  %74 = alloca %class.var3, align 8
  %75 = alloca %class.var3, align 8
  %76 = alloca %class.var3, align 8
  %77 = alloca %class.var3, align 8
  %78 = alloca i32, align 4
  %79 = alloca float, align 4
  %80 = alloca double, align 8
  %81 = alloca double, align 8
  %82 = alloca %class.var3, align 8
  %83 = alloca %class.var3, align 8
  %84 = alloca %class.var3, align 8
  %85 = alloca %class.var3, align 8
  %86 = alloca i32, align 4
  %87 = alloca float, align 4
  %88 = alloca %class.var3, align 8
  %89 = alloca %class.var3, align 8
  %90 = alloca %class.var3, align 8
  %91 = alloca %class.var3, align 8
  %92 = alloca i32, align 4
  %93 = alloca float, align 4
  %94 = alloca %class.var3, align 8
  %95 = alloca %class.var3, align 8
  %96 = alloca %class.var3, align 8
  %97 = alloca %class.var3, align 8
  %98 = alloca i32, align 4
  %99 = alloca float, align 4
  %100 = alloca %class.var3, align 8
  %101 = alloca %class.var3, align 8
  %102 = alloca %class.var3, align 8
  %103 = alloca %class.var3, align 8
  %104 = alloca i32, align 4
  %105 = alloca float, align 4
  %106 = alloca %class.var3, align 8
  %107 = alloca %class.var3, align 8
  %108 = alloca %class.var3, align 8
  %109 = alloca i32, align 4
  %110 = alloca i32, align 4
  %111 = alloca double, align 8
  %112 = alloca %class.var3, align 8
  %113 = alloca %class.var3, align 8
  %114 = alloca %class.var3, align 8
  %115 = alloca %class.var3, align 8
  %116 = alloca %class.var3, align 8
  %117 = alloca %class.var3, align 8
  %118 = alloca %class.var3, align 8
  %119 = alloca i32, align 4
  %120 = alloca float, align 4
  %121 = alloca %class.var3, align 8
  %122 = alloca %class.var3, align 8
  %123 = alloca %class.var3, align 8
  %124 = alloca %class.var3, align 8
  %125 = alloca i32, align 4
  %126 = alloca float, align 4
  store ptr %0, ptr %13, align 8, !tbaa !5
  store i64 %1, ptr %14, align 8, !tbaa !9
  store ptr %2, ptr %15, align 8, !tbaa !5
  store ptr %3, ptr %16, align 8, !tbaa !5
  store ptr %4, ptr %17, align 8, !tbaa !5
  store ptr %5, ptr %18, align 8, !tbaa !5
  store ptr %6, ptr %19, align 8, !tbaa !5
  store double %7, ptr %20, align 8, !tbaa !11
  %127 = zext i1 %8 to i8
  store i8 %127, ptr %21, align 1, !tbaa !13
  store i32 %9, ptr %22, align 4, !tbaa !15
  store double %10, ptr %23, align 8, !tbaa !11
  store double %11, ptr %24, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #10
  %128 = load ptr, ptr %13, align 8, !tbaa !5
  %129 = load i64, ptr %14, align 8, !tbaa !9
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %128, i64 noundef %129) #10
  %131 = load ptr, ptr %130, align 8, !tbaa !5
  store ptr %131, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #10
  %132 = load ptr, ptr %25, align 8, !tbaa !5
  %133 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %132, i32 noundef 0)
  %134 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN4Elem4nodeEv(ptr noundef nonnull align 8 dereferenceable(408) %133)
  store ptr %134, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %27) #10
  %135 = load ptr, ptr %26, align 8, !tbaa !5
  %136 = getelementptr inbounds %class.var3, ptr %135, i32 0, i32 0
  %137 = load double, ptr %136, align 8, !tbaa !17
  %138 = load ptr, ptr %26, align 8, !tbaa !5
  %139 = getelementptr inbounds %class.var3, ptr %138, i32 0, i32 1
  %140 = load double, ptr %139, align 8, !tbaa !19
  %141 = load ptr, ptr %26, align 8, !tbaa !5
  %142 = getelementptr inbounds %class.var3, ptr %141, i32 0, i32 2
  %143 = load double, ptr %142, align 8, !tbaa !20
  call void @_ZN4var3IdEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %27, double noundef %137, double noundef %140, double noundef %143)
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #10
  %144 = load ptr, ptr %25, align 8, !tbaa !5
  %145 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %144, i32 noundef 1)
  %146 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN4Elem4nodeEv(ptr noundef nonnull align 8 dereferenceable(408) %145)
  store ptr %146, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #10
  %147 = load ptr, ptr %28, align 8, !tbaa !5
  %148 = getelementptr inbounds %class.var3, ptr %147, i32 0, i32 0
  %149 = load double, ptr %148, align 8, !tbaa !17
  %150 = load ptr, ptr %28, align 8, !tbaa !5
  %151 = getelementptr inbounds %class.var3, ptr %150, i32 0, i32 1
  %152 = load double, ptr %151, align 8, !tbaa !19
  %153 = load ptr, ptr %28, align 8, !tbaa !5
  %154 = getelementptr inbounds %class.var3, ptr %153, i32 0, i32 2
  %155 = load double, ptr %154, align 8, !tbaa !20
  call void @_ZN4var3IdEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %29, double noundef %149, double noundef %152, double noundef %155)
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #10
  %156 = load ptr, ptr %25, align 8, !tbaa !5
  %157 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %156)
  %158 = call noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %157)
  %159 = load double, ptr %20, align 8, !tbaa !11
  %160 = fmul double %158, %159
  store double %160, ptr %30, align 8, !tbaa !11
  %161 = load ptr, ptr %25, align 8, !tbaa !5
  %162 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %161, i32 noundef 0)
  %163 = call noundef zeroext i1 @_ZNK4Elem16isEntryOrExitResEv(ptr noundef nonnull align 8 dereferenceable(408) %162)
  br i1 %163, label %164, label %204

164:                                              ; preds = %12
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #10
  %165 = load ptr, ptr %25, align 8, !tbaa !5
  %166 = call noundef double @_ZNK6Throat12throatLengthEv(ptr noundef nonnull align 8 dereferenceable(456) %165)
  store double %166, ptr %32, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #10
  %167 = load ptr, ptr %25, align 8, !tbaa !5
  %168 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %167, i32 noundef 1)
  %169 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %168)
  %170 = call noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %169)
  %171 = call double @llvm.fmuladd.f64(double 1.100000e+00, double %170, double 2.000000e-09)
  store double %171, ptr %33, align 8, !tbaa !11
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33)
  %173 = load double, ptr %172, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  store double %173, ptr %31, align 8, !tbaa !11
  %174 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 1)
  %175 = load double, ptr %174, align 8, !tbaa !11
  %176 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef 1)
  store double %175, ptr %176, align 8, !tbaa !11
  %177 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 2)
  %178 = load double, ptr %177, align 8, !tbaa !11
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef 2)
  store double %178, ptr %179, align 8, !tbaa !11
  %180 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 1)
  %181 = load double, ptr %180, align 8, !tbaa !11
  %182 = fadd double %181, 1.000000e-09
  store double %182, ptr %180, align 8, !tbaa !11
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 2)
  %184 = load double, ptr %183, align 8, !tbaa !11
  %185 = fadd double %184, 1.000000e-09
  store double %185, ptr %183, align 8, !tbaa !11
  %186 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef 0)
  %187 = load double, ptr %186, align 8, !tbaa !11
  %188 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 0)
  %189 = load double, ptr %188, align 8, !tbaa !11
  %190 = fcmp olt double %187, %189
  br i1 %190, label %191, label %197

191:                                              ; preds = %164
  %192 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 0)
  %193 = load double, ptr %192, align 8, !tbaa !11
  %194 = load double, ptr %31, align 8, !tbaa !11
  %195 = fsub double %193, %194
  %196 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef 0)
  store double %195, ptr %196, align 8, !tbaa !11
  br label %203

197:                                              ; preds = %164
  %198 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 0)
  %199 = load double, ptr %198, align 8, !tbaa !11
  %200 = load double, ptr %31, align 8, !tbaa !11
  %201 = fadd double %199, %200
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef 0)
  store double %201, ptr %202, align 8, !tbaa !11
  br label %203

203:                                              ; preds = %197, %191
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #10
  br label %204

204:                                              ; preds = %203, %12
  %205 = load ptr, ptr %25, align 8, !tbaa !5
  %206 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %205, i32 noundef 1)
  %207 = call noundef zeroext i1 @_ZNK4Elem16isEntryOrExitResEv(ptr noundef nonnull align 8 dereferenceable(408) %206)
  br i1 %207, label %208, label %248

208:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #10
  %209 = load ptr, ptr %25, align 8, !tbaa !5
  %210 = call noundef double @_ZNK6Throat12throatLengthEv(ptr noundef nonnull align 8 dereferenceable(456) %209)
  store double %210, ptr %35, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #10
  %211 = load ptr, ptr %25, align 8, !tbaa !5
  %212 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %211, i32 noundef 0)
  %213 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %212)
  %214 = call noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %213)
  %215 = call double @llvm.fmuladd.f64(double 1.100000e+00, double %214, double 2.000000e-09)
  store double %215, ptr %36, align 8, !tbaa !11
  %216 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %36)
  %217 = load double, ptr %216, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #10
  store double %217, ptr %34, align 8, !tbaa !11
  %218 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef 1)
  %219 = load double, ptr %218, align 8, !tbaa !11
  %220 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 1)
  store double %219, ptr %220, align 8, !tbaa !11
  %221 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef 2)
  %222 = load double, ptr %221, align 8, !tbaa !11
  %223 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 2)
  store double %222, ptr %223, align 8, !tbaa !11
  %224 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 1)
  %225 = load double, ptr %224, align 8, !tbaa !11
  %226 = fadd double %225, 1.000000e-09
  store double %226, ptr %224, align 8, !tbaa !11
  %227 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 2)
  %228 = load double, ptr %227, align 8, !tbaa !11
  %229 = fadd double %228, 1.000000e-09
  store double %229, ptr %227, align 8, !tbaa !11
  %230 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 0)
  %231 = load double, ptr %230, align 8, !tbaa !11
  %232 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef 0)
  %233 = load double, ptr %232, align 8, !tbaa !11
  %234 = fcmp olt double %231, %233
  br i1 %234, label %235, label %241

235:                                              ; preds = %208
  %236 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef 0)
  %237 = load double, ptr %236, align 8, !tbaa !11
  %238 = load double, ptr %34, align 8, !tbaa !11
  %239 = fsub double %237, %238
  %240 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 0)
  store double %239, ptr %240, align 8, !tbaa !11
  br label %247

241:                                              ; preds = %208
  %242 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef 0)
  %243 = load double, ptr %242, align 8, !tbaa !11
  %244 = load double, ptr %34, align 8, !tbaa !11
  %245 = fadd double %243, %244
  %246 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 0)
  store double %245, ptr %246, align 8, !tbaa !11
  br label %247

247:                                              ; preds = %241, %235
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #10
  br label %248

248:                                              ; preds = %247, %204
  call void @llvm.lifetime.start.p0(i64 24, ptr %37) #10
  call void @_ZNK4var3IdEmiERKS0_(ptr dead_on_unwind writable sret(%class.var3) align 8 %37, ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 8 dereferenceable(24) %27)
  call void @llvm.lifetime.start.p0(i64 24, ptr %38) #10
  %249 = call noundef double @_Z3magIdET_RK4var3IS0_E(ptr noundef nonnull align 8 dereferenceable(24) %37)
  %250 = fadd double %249, 1.000000e-33
  call void @_ZNK4var3IdEdvEd(ptr dead_on_unwind writable sret(%class.var3) align 8 %38, ptr noundef nonnull align 8 dereferenceable(24) %37, double noundef %250)
  call void @llvm.lifetime.start.p0(i64 24, ptr %39) #10
  call void @_ZN4var3IdEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %39, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #10
  store i64 0, ptr %40, align 8, !tbaa !9
  br label %251

251:                                              ; preds = %265, %248
  %252 = load i64, ptr %40, align 8, !tbaa !9
  %253 = icmp ult i64 %252, 3
  br i1 %253, label %255, label %254

254:                                              ; preds = %251
  store i32 2, ptr %41, align 4
  br label %268

255:                                              ; preds = %251
  %256 = load i64, ptr %40, align 8, !tbaa !9
  %257 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %256)
  %258 = load double, ptr %257, align 8, !tbaa !11
  %259 = call noundef double @_ZSt3absd(double noundef %258)
  %260 = fcmp olt double %259, 6.000000e-01
  br i1 %260, label %261, label %264

261:                                              ; preds = %255
  %262 = load i64, ptr %40, align 8, !tbaa !9
  %263 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %262)
  store double 1.000000e+00, ptr %263, align 8, !tbaa !11
  store i32 2, ptr %41, align 4
  br label %268

264:                                              ; preds = %255
  br label %265

265:                                              ; preds = %264
  %266 = load i64, ptr %40, align 8, !tbaa !9
  %267 = add i64 %266, 1
  store i64 %267, ptr %40, align 8, !tbaa !9
  br label %251, !llvm.loop !21

268:                                              ; preds = %261, %254
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #10
  br label %269

269:                                              ; preds = %268
  call void @llvm.lifetime.start.p0(i64 24, ptr %42) #10
  call void @_ZNK4var3IdEeoERKS0_(ptr dead_on_unwind writable sret(%class.var3) align 8 %42, ptr noundef nonnull align 8 dereferenceable(24) %38, ptr noundef nonnull align 8 dereferenceable(24) %39)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %39, ptr align 8 %42, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 24, ptr %42) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr %43) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %44, ptr align 8 %39, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %45, ptr align 8 %38, i64 24, i1 false), !tbaa.struct !23
  call void @_Z15rotateAroundVec4var3IdEdS0_(ptr dead_on_unwind writable sret(%class.var3) align 8 %43, ptr noundef byval(%class.var3) align 8 %44, double noundef 0x3FE921FB54442D11, ptr noundef byval(%class.var3) align 8 %45)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %39, ptr align 8 %43, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 24, ptr %43) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr %46) #10
  %270 = call noundef double @_Z3magIdET_RK4var3IS0_E(ptr noundef nonnull align 8 dereferenceable(24) %39)
  %271 = fadd double %270, 1.000000e-33
  call void @_ZNK4var3IdEdvEd(ptr dead_on_unwind writable sret(%class.var3) align 8 %46, ptr noundef nonnull align 8 dereferenceable(24) %39, double noundef %271)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %39, ptr align 8 %46, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 24, ptr %46) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #10
  %272 = load ptr, ptr %25, align 8, !tbaa !5
  %273 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %272)
  %274 = icmp eq ptr %273, null
  br i1 %274, label %277, label %275

275:                                              ; preds = %269
  %276 = call ptr @__dynamic_cast(ptr %273, ptr @_ZTI9ElemModel, ptr @_ZTI7Polygon, i64 0) #10
  br label %278

277:                                              ; preds = %269
  br label %278

278:                                              ; preds = %277, %275
  %279 = phi ptr [ %276, %275 ], [ null, %277 ]
  store ptr %279, ptr %47, align 8, !tbaa !5
  %280 = load ptr, ptr %47, align 8, !tbaa !5
  %281 = icmp ne ptr %280, null
  br i1 %281, label %282, label %523

282:                                              ; preds = %278
  %283 = load i8, ptr %21, align 1, !tbaa !13, !range !24, !noundef !25
  %284 = trunc i8 %283 to i1
  br i1 %284, label %285, label %523

285:                                              ; preds = %282
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #10
  store i32 0, ptr %48, align 4, !tbaa !15
  br label %286

286:                                              ; preds = %519, %285
  %287 = load i32, ptr %48, align 4, !tbaa !15
  %288 = load ptr, ptr %47, align 8, !tbaa !5
  %289 = load ptr, ptr %288, align 8, !tbaa !26
  %290 = getelementptr inbounds ptr, ptr %289, i64 24
  %291 = load ptr, ptr %290, align 8
  %292 = call noundef i32 %291(ptr noundef nonnull align 8 dereferenceable(248) %288)
  %293 = icmp slt i32 %287, %292
  br i1 %293, label %295, label %294

294:                                              ; preds = %286
  store i32 5, ptr %41, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #10
  br label %522

295:                                              ; preds = %286
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #10
  %296 = load ptr, ptr %47, align 8, !tbaa !5
  %297 = load i32, ptr %48, align 4, !tbaa !15
  %298 = call noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %296, i32 noundef %297)
  store double %298, ptr %49, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #10
  %299 = load double, ptr %30, align 8, !tbaa !11
  %300 = load double, ptr %49, align 8, !tbaa !11
  %301 = call double @sin(double noundef %300) #10
  %302 = fdiv double %299, %301
  store double %302, ptr %50, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #10
  %303 = load double, ptr %30, align 8, !tbaa !11
  %304 = load double, ptr %49, align 8, !tbaa !11
  %305 = call double @tan(double noundef %304) #10
  %306 = fdiv double %303, %305
  store double %306, ptr %51, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #10
  store double 0.000000e+00, ptr %52, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #10
  store double 0.000000e+00, ptr %53, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #10
  %307 = load double, ptr %49, align 8, !tbaa !11
  %308 = fsub double 0x3FF921FB54442D11, %307
  store double %308, ptr %54, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #10
  %309 = load double, ptr %49, align 8, !tbaa !11
  %310 = fsub double 0x3FF921FB54442D11, %309
  store double %310, ptr %55, align 8, !tbaa !11
  %311 = load ptr, ptr %47, align 8, !tbaa !5
  %312 = call noundef ptr @_ZNK7Polygon13waterInCornerEv(ptr noundef nonnull align 8 dereferenceable(248) %311)
  %313 = load i32, ptr %48, align 4, !tbaa !15
  %314 = sext i32 %313 to i64
  %315 = getelementptr inbounds %class.CornerApex, ptr %312, i64 %314
  %316 = call noundef zeroext i1 @_ZNK10CornerApex12cornerExistsEv(ptr noundef nonnull align 8 dereferenceable(144) %315)
  br i1 %316, label %317, label %371

317:                                              ; preds = %295
  %318 = load ptr, ptr %47, align 8, !tbaa !5
  %319 = call noundef ptr @_ZNK7Polygon13waterInCornerEv(ptr noundef nonnull align 8 dereferenceable(248) %318)
  %320 = load i32, ptr %48, align 4, !tbaa !15
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds %class.CornerApex, ptr %319, i64 %321
  %323 = load double, ptr %23, align 8, !tbaa !11
  %324 = load double, ptr %49, align 8, !tbaa !11
  %325 = load double, ptr %24, align 8, !tbaa !11
  call void @_ZNK10CornerApex18getCApexDistConAngERdS0_dddbbb(ptr noundef nonnull align 8 dereferenceable(144) %322, ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull align 8 dereferenceable(8) %55, double noundef %323, double noundef %324, double noundef %325, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext false)
  %326 = load double, ptr %20, align 8, !tbaa !11
  %327 = load double, ptr %53, align 8, !tbaa !11
  %328 = fmul double %327, %326
  store double %328, ptr %53, align 8, !tbaa !11
  %329 = load double, ptr %53, align 8, !tbaa !11
  %330 = load double, ptr %51, align 8, !tbaa !11
  %331 = load double, ptr %20, align 8, !tbaa !11
  %332 = fmul double %330, %331
  %333 = fcmp ogt double %329, %332
  br i1 %333, label %334, label %347

334:                                              ; preds = %317
  %335 = load double, ptr %51, align 8, !tbaa !11
  %336 = load double, ptr %20, align 8, !tbaa !11
  %337 = fmul double %335, %336
  store double %337, ptr %53, align 8, !tbaa !11
  %338 = load double, ptr %53, align 8, !tbaa !11
  %339 = load double, ptr %51, align 8, !tbaa !11
  %340 = load double, ptr %20, align 8, !tbaa !11
  %341 = fmul double %339, %340
  %342 = fmul double %341, 1.500000e+00
  %343 = fcmp ogt double %338, %342
  br i1 %343, label %344, label %346

344:                                              ; preds = %334
  %345 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.74)
  br label %346

346:                                              ; preds = %344, %334
  br label %347

347:                                              ; preds = %346, %317
  %348 = load ptr, ptr %15, align 8, !tbaa !5
  %349 = load ptr, ptr %19, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %56, ptr align 8 %27, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %57, ptr align 8 %29, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %58, ptr align 8 %39, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %59, ptr align 8 %39, i64 24, i1 false), !tbaa.struct !23
  %350 = load double, ptr %52, align 8, !tbaa !11
  %351 = load double, ptr %53, align 8, !tbaa !11
  %352 = load double, ptr %54, align 8, !tbaa !11
  %353 = load double, ptr %55, align 8, !tbaa !11
  %354 = load double, ptr %50, align 8, !tbaa !11
  %355 = load double, ptr %49, align 8, !tbaa !11
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %348, ptr noundef nonnull align 8 dereferenceable(24) %349, ptr noundef byval(%class.var3) align 8 %56, ptr noundef byval(%class.var3) align 8 %57, ptr noundef byval(%class.var3) align 8 %58, ptr noundef byval(%class.var3) align 8 %59, double noundef %350, double noundef %351, double noundef %352, double noundef %353, double noundef %354, double noundef %355, double noundef 1.000000e+00)
  %356 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %60) #10
  store i32 3, ptr %60, align 4, !tbaa !15
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %356, ptr noundef nonnull align 4 dereferenceable(4) %60)
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #10
  %357 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %357, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %358 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %61) #10
  store float 0.000000e+00, ptr %61, align 4, !tbaa !28
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %358, ptr noundef nonnull align 4 dereferenceable(4) %61)
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #10
  %359 = load ptr, ptr %15, align 8, !tbaa !5
  %360 = load ptr, ptr %19, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %62, ptr align 8 %27, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %63, ptr align 8 %29, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %64, ptr align 8 %39, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %65, ptr align 8 %39, i64 24, i1 false), !tbaa.struct !23
  %361 = load double, ptr %52, align 8, !tbaa !11
  %362 = load double, ptr %53, align 8, !tbaa !11
  %363 = load double, ptr %54, align 8, !tbaa !11
  %364 = load double, ptr %55, align 8, !tbaa !11
  %365 = load double, ptr %50, align 8, !tbaa !11
  %366 = load double, ptr %49, align 8, !tbaa !11
  %367 = fneg double %366
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %359, ptr noundef nonnull align 8 dereferenceable(24) %360, ptr noundef byval(%class.var3) align 8 %62, ptr noundef byval(%class.var3) align 8 %63, ptr noundef byval(%class.var3) align 8 %64, ptr noundef byval(%class.var3) align 8 %65, double noundef %361, double noundef %362, double noundef %363, double noundef %364, double noundef %365, double noundef %367, double noundef 1.000000e+00)
  %368 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #10
  store i32 3, ptr %66, align 4, !tbaa !15
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %368, ptr noundef nonnull align 4 dereferenceable(4) %66)
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #10
  %369 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %369, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %370 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %67) #10
  store float 0.000000e+00, ptr %67, align 4, !tbaa !28
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %370, ptr noundef nonnull align 4 dereferenceable(4) %67)
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #10
  br label %371

371:                                              ; preds = %347, %295
  %372 = load ptr, ptr %47, align 8, !tbaa !5
  %373 = call noundef ptr @_ZNK7Polygon13oilLayerConstEv(ptr noundef nonnull align 8 dereferenceable(248) %372)
  %374 = load i32, ptr %48, align 4, !tbaa !15
  %375 = sext i32 %374 to i64
  %376 = getelementptr inbounds %class.LayerApex, ptr %373, i64 %375
  %377 = call noundef zeroext i1 @_ZNK4Apex6existsEv(ptr noundef nonnull align 8 dereferenceable(104) %376)
  br i1 %377, label %378, label %423

378:                                              ; preds = %371
  %379 = load ptr, ptr %47, align 8, !tbaa !5
  %380 = call noundef ptr @_ZNK7Polygon13waterInCornerEv(ptr noundef nonnull align 8 dereferenceable(248) %379)
  %381 = load i32, ptr %48, align 4, !tbaa !15
  %382 = sext i32 %381 to i64
  %383 = getelementptr inbounds %class.CornerApex, ptr %380, i64 %382
  %384 = load double, ptr %23, align 8, !tbaa !11
  %385 = load double, ptr %49, align 8, !tbaa !11
  %386 = load double, ptr %24, align 8, !tbaa !11
  call void @_ZNK10CornerApex18getCApexDistConAngERdS0_dddbbb(ptr noundef nonnull align 8 dereferenceable(144) %383, ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef nonnull align 8 dereferenceable(8) %54, double noundef %384, double noundef %385, double noundef %386, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext false)
  %387 = load double, ptr %20, align 8, !tbaa !11
  %388 = load double, ptr %52, align 8, !tbaa !11
  %389 = fmul double %388, %387
  store double %389, ptr %52, align 8, !tbaa !11
  %390 = load ptr, ptr %47, align 8, !tbaa !5
  %391 = call noundef ptr @_ZNK7Polygon13oilLayerConstEv(ptr noundef nonnull align 8 dereferenceable(248) %390)
  %392 = load i32, ptr %48, align 4, !tbaa !15
  %393 = sext i32 %392 to i64
  %394 = getelementptr inbounds %class.LayerApex, ptr %391, i64 %393
  %395 = load double, ptr %23, align 8, !tbaa !11
  %396 = load double, ptr %24, align 8, !tbaa !11
  call void @_ZNK9LayerApex13getCAApexDistERdS0_RKdddb(ptr noundef nonnull align 8 dereferenceable(144) %394, ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull align 8 dereferenceable(8) %49, double noundef %395, double noundef %396, i1 noundef zeroext false)
  %397 = load double, ptr %20, align 8, !tbaa !11
  %398 = load double, ptr %53, align 8, !tbaa !11
  %399 = fmul double %398, %397
  store double %399, ptr %53, align 8, !tbaa !11
  %400 = load ptr, ptr %15, align 8, !tbaa !5
  %401 = load ptr, ptr %19, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %68, ptr align 8 %27, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %69, ptr align 8 %29, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %70, ptr align 8 %39, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %71, ptr align 8 %39, i64 24, i1 false), !tbaa.struct !23
  %402 = load double, ptr %52, align 8, !tbaa !11
  %403 = load double, ptr %53, align 8, !tbaa !11
  %404 = load double, ptr %54, align 8, !tbaa !11
  %405 = load double, ptr %55, align 8, !tbaa !11
  %406 = load double, ptr %50, align 8, !tbaa !11
  %407 = load double, ptr %49, align 8, !tbaa !11
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %400, ptr noundef nonnull align 8 dereferenceable(24) %401, ptr noundef byval(%class.var3) align 8 %68, ptr noundef byval(%class.var3) align 8 %69, ptr noundef byval(%class.var3) align 8 %70, ptr noundef byval(%class.var3) align 8 %71, double noundef %402, double noundef %403, double noundef %404, double noundef %405, double noundef %406, double noundef %407, double noundef 1.000000e+00)
  %408 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %72) #10
  store i32 10, ptr %72, align 4, !tbaa !15
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %408, ptr noundef nonnull align 4 dereferenceable(4) %72)
  call void @llvm.lifetime.end.p0(i64 4, ptr %72) #10
  %409 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %409, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %410 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %73) #10
  store float 1.000000e+00, ptr %73, align 4, !tbaa !28
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %410, ptr noundef nonnull align 4 dereferenceable(4) %73)
  call void @llvm.lifetime.end.p0(i64 4, ptr %73) #10
  %411 = load ptr, ptr %15, align 8, !tbaa !5
  %412 = load ptr, ptr %19, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %74, ptr align 8 %27, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %75, ptr align 8 %29, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %76, ptr align 8 %39, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %77, ptr align 8 %39, i64 24, i1 false), !tbaa.struct !23
  %413 = load double, ptr %52, align 8, !tbaa !11
  %414 = load double, ptr %53, align 8, !tbaa !11
  %415 = load double, ptr %54, align 8, !tbaa !11
  %416 = load double, ptr %55, align 8, !tbaa !11
  %417 = load double, ptr %50, align 8, !tbaa !11
  %418 = load double, ptr %49, align 8, !tbaa !11
  %419 = fneg double %418
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %411, ptr noundef nonnull align 8 dereferenceable(24) %412, ptr noundef byval(%class.var3) align 8 %74, ptr noundef byval(%class.var3) align 8 %75, ptr noundef byval(%class.var3) align 8 %76, ptr noundef byval(%class.var3) align 8 %77, double noundef %413, double noundef %414, double noundef %415, double noundef %416, double noundef %417, double noundef %419, double noundef 1.000000e+00)
  %420 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %78) #10
  store i32 10, ptr %78, align 4, !tbaa !15
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %420, ptr noundef nonnull align 4 dereferenceable(4) %78)
  call void @llvm.lifetime.end.p0(i64 4, ptr %78) #10
  %421 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %421, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %422 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %79) #10
  store float 1.000000e+00, ptr %79, align 4, !tbaa !28
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %422, ptr noundef nonnull align 4 dereferenceable(4) %79)
  call void @llvm.lifetime.end.p0(i64 4, ptr %79) #10
  br label %423

423:                                              ; preds = %378, %371
  %424 = load double, ptr %53, align 8, !tbaa !11
  %425 = load double, ptr %51, align 8, !tbaa !11
  %426 = fsub double %425, 0x3C9CD2B297D889BC
  %427 = fcmp olt double %424, %426
  br i1 %427, label %428, label %467

428:                                              ; preds = %423
  call void @llvm.lifetime.start.p0(i64 8, ptr %80) #10
  %429 = load double, ptr %53, align 8, !tbaa !11
  store double %429, ptr %80, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %81) #10
  %430 = load double, ptr %51, align 8, !tbaa !11
  store double %430, ptr %81, align 8, !tbaa !11
  %431 = load double, ptr %55, align 8, !tbaa !11
  store double %431, ptr %54, align 8, !tbaa !11
  store double 0.000000e+00, ptr %55, align 8, !tbaa !11
  %432 = load ptr, ptr %15, align 8, !tbaa !5
  %433 = load ptr, ptr %19, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %82, ptr align 8 %27, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %83, ptr align 8 %29, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %84, ptr align 8 %39, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %85, ptr align 8 %39, i64 24, i1 false), !tbaa.struct !23
  %434 = load double, ptr %80, align 8, !tbaa !11
  %435 = load double, ptr %81, align 8, !tbaa !11
  %436 = load double, ptr %54, align 8, !tbaa !11
  %437 = load double, ptr %55, align 8, !tbaa !11
  %438 = load double, ptr %50, align 8, !tbaa !11
  %439 = load double, ptr %49, align 8, !tbaa !11
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %432, ptr noundef nonnull align 8 dereferenceable(24) %433, ptr noundef byval(%class.var3) align 8 %82, ptr noundef byval(%class.var3) align 8 %83, ptr noundef byval(%class.var3) align 8 %84, ptr noundef byval(%class.var3) align 8 %85, double noundef %434, double noundef %435, double noundef %436, double noundef %437, double noundef %438, double noundef %439, double noundef 1.000000e+00)
  %440 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %86) #10
  store i32 1, ptr %86, align 4, !tbaa !15
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %440, ptr noundef nonnull align 4 dereferenceable(4) %86)
  call void @llvm.lifetime.end.p0(i64 4, ptr %86) #10
  %441 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %441, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %442 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %87) #10
  %443 = load ptr, ptr %47, align 8, !tbaa !5
  %444 = load ptr, ptr %443, align 8, !tbaa !26
  %445 = getelementptr inbounds ptr, ptr %444, i64 19
  %446 = load ptr, ptr %445, align 8
  %447 = call noundef zeroext i1 %446(ptr noundef nonnull align 8 dereferenceable(152) %443)
  %448 = uitofp i1 %447 to float
  store float %448, ptr %87, align 4, !tbaa !28
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %442, ptr noundef nonnull align 4 dereferenceable(4) %87)
  call void @llvm.lifetime.end.p0(i64 4, ptr %87) #10
  %449 = load ptr, ptr %15, align 8, !tbaa !5
  %450 = load ptr, ptr %19, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %88, ptr align 8 %27, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %89, ptr align 8 %29, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %90, ptr align 8 %39, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %91, ptr align 8 %39, i64 24, i1 false), !tbaa.struct !23
  %451 = load double, ptr %80, align 8, !tbaa !11
  %452 = load double, ptr %81, align 8, !tbaa !11
  %453 = load double, ptr %54, align 8, !tbaa !11
  %454 = load double, ptr %55, align 8, !tbaa !11
  %455 = load double, ptr %50, align 8, !tbaa !11
  %456 = load double, ptr %49, align 8, !tbaa !11
  %457 = fneg double %456
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %449, ptr noundef nonnull align 8 dereferenceable(24) %450, ptr noundef byval(%class.var3) align 8 %88, ptr noundef byval(%class.var3) align 8 %89, ptr noundef byval(%class.var3) align 8 %90, ptr noundef byval(%class.var3) align 8 %91, double noundef %451, double noundef %452, double noundef %453, double noundef %454, double noundef %455, double noundef %457, double noundef 1.000000e+00)
  %458 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %92) #10
  store i32 1, ptr %92, align 4, !tbaa !15
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %458, ptr noundef nonnull align 4 dereferenceable(4) %92)
  call void @llvm.lifetime.end.p0(i64 4, ptr %92) #10
  %459 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %459, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %460 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %93) #10
  %461 = load ptr, ptr %47, align 8, !tbaa !5
  %462 = load ptr, ptr %461, align 8, !tbaa !26
  %463 = getelementptr inbounds ptr, ptr %462, i64 19
  %464 = load ptr, ptr %463, align 8
  %465 = call noundef zeroext i1 %464(ptr noundef nonnull align 8 dereferenceable(152) %461)
  %466 = uitofp i1 %465 to float
  store float %466, ptr %93, align 4, !tbaa !28
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %460, ptr noundef nonnull align 4 dereferenceable(4) %93)
  call void @llvm.lifetime.end.p0(i64 4, ptr %93) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %81) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %80) #10
  br label %467

467:                                              ; preds = %428, %423
  %468 = load ptr, ptr %15, align 8, !tbaa !5
  %469 = load ptr, ptr %19, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %94, ptr align 8 %27, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %95, ptr align 8 %29, i64 24, i1 false), !tbaa.struct !23
  call void @_ZNK4var3IdEngEv(ptr dead_on_unwind writable sret(%class.var3) align 8 %96, ptr noundef nonnull align 8 dereferenceable(24) %39)
  call void @_ZNK4var3IdEngEv(ptr dead_on_unwind writable sret(%class.var3) align 8 %97, ptr noundef nonnull align 8 dereferenceable(24) %39)
  %470 = load double, ptr %30, align 8, !tbaa !11
  %471 = load double, ptr %55, align 8, !tbaa !11
  %472 = fsub double 0x3FF921FB54442D11, %471
  %473 = load double, ptr %55, align 8, !tbaa !11
  %474 = fsub double 0x3FF921FB54442D11, %473
  %475 = load double, ptr %49, align 8, !tbaa !11
  %476 = fsub double 0x3FF921FB54442D11, %475
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %468, ptr noundef nonnull align 8 dereferenceable(24) %469, ptr noundef byval(%class.var3) align 8 %94, ptr noundef byval(%class.var3) align 8 %95, ptr noundef byval(%class.var3) align 8 %96, ptr noundef byval(%class.var3) align 8 %97, double noundef 0.000000e+00, double noundef %470, double noundef %472, double noundef %474, double noundef 0.000000e+00, double noundef %476, double noundef 1.000000e+00)
  %477 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %98) #10
  store i32 2, ptr %98, align 4, !tbaa !15
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %477, ptr noundef nonnull align 4 dereferenceable(4) %98)
  call void @llvm.lifetime.end.p0(i64 4, ptr %98) #10
  %478 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %478, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %479 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %99) #10
  %480 = load ptr, ptr %47, align 8, !tbaa !5
  %481 = load ptr, ptr %480, align 8, !tbaa !26
  %482 = getelementptr inbounds ptr, ptr %481, i64 19
  %483 = load ptr, ptr %482, align 8
  %484 = call noundef zeroext i1 %483(ptr noundef nonnull align 8 dereferenceable(152) %480)
  %485 = uitofp i1 %484 to float
  store float %485, ptr %99, align 4, !tbaa !28
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %479, ptr noundef nonnull align 4 dereferenceable(4) %99)
  call void @llvm.lifetime.end.p0(i64 4, ptr %99) #10
  %486 = load ptr, ptr %15, align 8, !tbaa !5
  %487 = load ptr, ptr %19, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %100, ptr align 8 %27, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %101, ptr align 8 %29, i64 24, i1 false), !tbaa.struct !23
  call void @_ZNK4var3IdEngEv(ptr dead_on_unwind writable sret(%class.var3) align 8 %102, ptr noundef nonnull align 8 dereferenceable(24) %39)
  call void @_ZNK4var3IdEngEv(ptr dead_on_unwind writable sret(%class.var3) align 8 %103, ptr noundef nonnull align 8 dereferenceable(24) %39)
  %488 = load double, ptr %30, align 8, !tbaa !11
  %489 = load double, ptr %55, align 8, !tbaa !11
  %490 = fsub double 0x3FF921FB54442D11, %489
  %491 = load double, ptr %55, align 8, !tbaa !11
  %492 = fsub double 0x3FF921FB54442D11, %491
  %493 = load double, ptr %49, align 8, !tbaa !11
  %494 = fadd double 0xBFF921FB54442D11, %493
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %486, ptr noundef nonnull align 8 dereferenceable(24) %487, ptr noundef byval(%class.var3) align 8 %100, ptr noundef byval(%class.var3) align 8 %101, ptr noundef byval(%class.var3) align 8 %102, ptr noundef byval(%class.var3) align 8 %103, double noundef 0.000000e+00, double noundef %488, double noundef %490, double noundef %492, double noundef 0.000000e+00, double noundef %494, double noundef 1.000000e+00)
  %495 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %104) #10
  store i32 2, ptr %104, align 4, !tbaa !15
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %495, ptr noundef nonnull align 4 dereferenceable(4) %104)
  call void @llvm.lifetime.end.p0(i64 4, ptr %104) #10
  %496 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %496, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %497 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %105) #10
  %498 = load ptr, ptr %47, align 8, !tbaa !5
  %499 = load ptr, ptr %498, align 8, !tbaa !26
  %500 = getelementptr inbounds ptr, ptr %499, i64 19
  %501 = load ptr, ptr %500, align 8
  %502 = call noundef zeroext i1 %501(ptr noundef nonnull align 8 dereferenceable(152) %498)
  %503 = uitofp i1 %502 to float
  store float %503, ptr %105, align 4, !tbaa !28
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %497, ptr noundef nonnull align 4 dereferenceable(4) %105)
  call void @llvm.lifetime.end.p0(i64 4, ptr %105) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr %106) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %107, ptr align 8 %39, i64 24, i1 false), !tbaa.struct !23
  %504 = load ptr, ptr %47, align 8, !tbaa !5
  %505 = load i32, ptr %48, align 4, !tbaa !15
  %506 = call noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %504, i32 noundef %505)
  %507 = fsub double 0x400921FB54442D11, %506
  %508 = load ptr, ptr %47, align 8, !tbaa !5
  %509 = load i32, ptr %48, align 4, !tbaa !15
  %510 = add nsw i32 %509, 1
  %511 = load ptr, ptr %47, align 8, !tbaa !5
  %512 = load ptr, ptr %511, align 8, !tbaa !26
  %513 = getelementptr inbounds ptr, ptr %512, i64 24
  %514 = load ptr, ptr %513, align 8
  %515 = call noundef i32 %514(ptr noundef nonnull align 8 dereferenceable(248) %511)
  %516 = srem i32 %510, %515
  %517 = call noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %508, i32 noundef %516)
  %518 = fsub double %507, %517
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %108, ptr align 8 %38, i64 24, i1 false), !tbaa.struct !23
  call void @_Z15rotateAroundVec4var3IdEdS0_(ptr dead_on_unwind writable sret(%class.var3) align 8 %106, ptr noundef byval(%class.var3) align 8 %107, double noundef %518, ptr noundef byval(%class.var3) align 8 %108)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %39, ptr align 8 %106, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 24, ptr %106) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #10
  br label %519

519:                                              ; preds = %467
  %520 = load i32, ptr %48, align 4, !tbaa !15
  %521 = add nsw i32 %520, 1
  store i32 %521, ptr %48, align 4, !tbaa !15
  br label %286, !llvm.loop !30

522:                                              ; preds = %294
  br label %578

523:                                              ; preds = %282, %278
  call void @llvm.lifetime.start.p0(i64 4, ptr %109) #10
  %524 = load i32, ptr %22, align 4, !tbaa !15
  %525 = add i32 %524, 1
  %526 = udiv i32 %525, 2
  store i32 %526, ptr %109, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %110) #10
  store i32 0, ptr %110, align 4, !tbaa !15
  br label %527

527:                                              ; preds = %574, %523
  %528 = load i32, ptr %110, align 4, !tbaa !15
  %529 = load i32, ptr %109, align 4, !tbaa !15
  %530 = mul nsw i32 2, %529
  %531 = icmp slt i32 %528, %530
  br i1 %531, label %533, label %532

532:                                              ; preds = %527
  store i32 8, ptr %41, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %110) #10
  br label %577

533:                                              ; preds = %527
  call void @llvm.lifetime.start.p0(i64 8, ptr %111) #10
  %534 = load i32, ptr %109, align 4, !tbaa !15
  %535 = sitofp i32 %534 to double
  %536 = fdiv double 0x3FF921FB54442D11, %535
  store double %536, ptr %111, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %112) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %113, ptr align 8 %39, i64 24, i1 false), !tbaa.struct !23
  %537 = load double, ptr %111, align 8, !tbaa !11
  %538 = fmul double 2.000000e+00, %537
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %114, ptr align 8 %38, i64 24, i1 false), !tbaa.struct !23
  call void @_Z15rotateAroundVec4var3IdEdS0_(ptr dead_on_unwind writable sret(%class.var3) align 8 %112, ptr noundef byval(%class.var3) align 8 %113, double noundef %538, ptr noundef byval(%class.var3) align 8 %114)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %39, ptr align 8 %112, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 24, ptr %112) #10
  %539 = load ptr, ptr %15, align 8, !tbaa !5
  %540 = load ptr, ptr %19, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %115, ptr align 8 %27, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %116, ptr align 8 %29, i64 24, i1 false), !tbaa.struct !23
  call void @_ZNK4var3IdEngEv(ptr dead_on_unwind writable sret(%class.var3) align 8 %117, ptr noundef nonnull align 8 dereferenceable(24) %39)
  call void @_ZNK4var3IdEngEv(ptr dead_on_unwind writable sret(%class.var3) align 8 %118, ptr noundef nonnull align 8 dereferenceable(24) %39)
  %541 = load double, ptr %30, align 8, !tbaa !11
  %542 = load double, ptr %111, align 8, !tbaa !11
  %543 = fsub double 0x400921FB54442D11, %542
  %544 = fmul double 6.000000e-01, %543
  %545 = load double, ptr %111, align 8, !tbaa !11
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %539, ptr noundef nonnull align 8 dereferenceable(24) %540, ptr noundef byval(%class.var3) align 8 %115, ptr noundef byval(%class.var3) align 8 %116, ptr noundef byval(%class.var3) align 8 %117, ptr noundef byval(%class.var3) align 8 %118, double noundef 0.000000e+00, double noundef %541, double noundef 0.000000e+00, double noundef %544, double noundef 0.000000e+00, double noundef %545, double noundef 1.000000e+00)
  %546 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %119) #10
  store i32 5, ptr %119, align 4, !tbaa !15
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %546, ptr noundef nonnull align 4 dereferenceable(4) %119)
  call void @llvm.lifetime.end.p0(i64 4, ptr %119) #10
  %547 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %547, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %548 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %120) #10
  %549 = load ptr, ptr %25, align 8, !tbaa !5
  %550 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %549)
  %551 = load ptr, ptr %550, align 8, !tbaa !26
  %552 = getelementptr inbounds ptr, ptr %551, i64 19
  %553 = load ptr, ptr %552, align 8
  %554 = call noundef zeroext i1 %553(ptr noundef nonnull align 8 dereferenceable(152) %550)
  %555 = uitofp i1 %554 to float
  store float %555, ptr %120, align 4, !tbaa !28
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %548, ptr noundef nonnull align 4 dereferenceable(4) %120)
  call void @llvm.lifetime.end.p0(i64 4, ptr %120) #10
  %556 = load ptr, ptr %15, align 8, !tbaa !5
  %557 = load ptr, ptr %19, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %121, ptr align 8 %27, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %122, ptr align 8 %29, i64 24, i1 false), !tbaa.struct !23
  call void @_ZNK4var3IdEngEv(ptr dead_on_unwind writable sret(%class.var3) align 8 %123, ptr noundef nonnull align 8 dereferenceable(24) %39)
  call void @_ZNK4var3IdEngEv(ptr dead_on_unwind writable sret(%class.var3) align 8 %124, ptr noundef nonnull align 8 dereferenceable(24) %39)
  %558 = load double, ptr %30, align 8, !tbaa !11
  %559 = load double, ptr %111, align 8, !tbaa !11
  %560 = fsub double 0x400921FB54442D11, %559
  %561 = fmul double 6.000000e-01, %560
  %562 = load double, ptr %111, align 8, !tbaa !11
  %563 = fneg double %562
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %556, ptr noundef nonnull align 8 dereferenceable(24) %557, ptr noundef byval(%class.var3) align 8 %121, ptr noundef byval(%class.var3) align 8 %122, ptr noundef byval(%class.var3) align 8 %123, ptr noundef byval(%class.var3) align 8 %124, double noundef 0.000000e+00, double noundef %558, double noundef 0.000000e+00, double noundef %561, double noundef 0.000000e+00, double noundef %563, double noundef 1.000000e+00)
  %564 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %125) #10
  store i32 5, ptr %125, align 4, !tbaa !15
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %564, ptr noundef nonnull align 4 dereferenceable(4) %125)
  call void @llvm.lifetime.end.p0(i64 4, ptr %125) #10
  %565 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %565, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %566 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %126) #10
  %567 = load ptr, ptr %25, align 8, !tbaa !5
  %568 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %567)
  %569 = load ptr, ptr %568, align 8, !tbaa !26
  %570 = getelementptr inbounds ptr, ptr %569, i64 19
  %571 = load ptr, ptr %570, align 8
  %572 = call noundef zeroext i1 %571(ptr noundef nonnull align 8 dereferenceable(152) %568)
  %573 = uitofp i1 %572 to float
  store float %573, ptr %126, align 4, !tbaa !28
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %566, ptr noundef nonnull align 4 dereferenceable(4) %126)
  call void @llvm.lifetime.end.p0(i64 4, ptr %126) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %111) #10
  br label %574

574:                                              ; preds = %533
  %575 = load i32, ptr %110, align 4, !tbaa !15
  %576 = add nsw i32 %575, 1
  store i32 %576, ptr %110, align 4, !tbaa !15
  br label %527, !llvm.loop !31

577:                                              ; preds = %532
  call void @llvm.lifetime.end.p0(i64 4, ptr %109) #10
  br label %578

578:                                              ; preds = %577, %522
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %39) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %38) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %37) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  ret void
}

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) #8

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 speculatable willreturn memory(none) }
attributes #3 = { 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 #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 = { 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 #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { "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 #10 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !12, i64 0}
!18 = !{!"_ZTS4var3IdE", !12, i64 0, !12, i64 8, !12, i64 16}
!19 = !{!18, !12, i64 8}
!20 = !{!18, !12, i64 16}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{i64 0, i64 8, !11, i64 8, i64 8, !11, i64 16, i64 8, !11}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!27, !27, i64 0}
!27 = !{!"vtable pointer", !8, i64 0}
!28 = !{!29, !29, i64 0}
!29 = !{!"float", !7, i64 0}
!30 = distinct !{!30, !22}
!31 = distinct !{!31, !22}


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%class.var3 = type { double, double, double }
%class.CornerApex = type { %class.Apex, ptr, double, double, double, ptr }
%class.Apex = type { ptr, i8, double, double, ptr, i32, double, double, double, double, i8, i8, i8, i8, %"struct.std::pair" }
%"struct.std::pair" = type { i32, double }
%class.LayerApex = type { %class.Apex, i32, ptr, double, ptr, double }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZTI9ElemModel = external dso_local constant { ptr, ptr }, align 8
@_ZTI7Polygon = external constant ptr
@.str.74 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4var3IdEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z15rotateAroundVec4var3IdEdS0_(ptr dead_on_unwind noalias writable sret(%class.var3) align 8, ptr noundef byval(%class.var3) align 8, double noundef, ptr noundef byval(%class.var3) align 8) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef byval(%class.var3) align 8, ptr noundef byval(%class.var3) align 8, ptr noundef byval(%class.var3) align 8, ptr noundef byval(%class.var3) align 8, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4var3IdEmiERKS0_(ptr dead_on_unwind noalias writable sret(%class.var3) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4var3IdEdvEd(ptr dead_on_unwind noalias writable sret(%class.var3) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_Z3magIdET_RK4var3IS0_E(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4var3IdEeoERKS0_(ptr dead_on_unwind noalias writable sret(%class.var3) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4var3IdEngEv(ptr dead_on_unwind noalias writable sret(%class.var3) align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13addThroatMeshRKSt6vectorIPK4ElemSaIS2_EEmRS_I4var3IdESaIS8_EERS_IiSaIiEERS_ImSaImEERS_IfSaIfEESE_dbjdd(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %6, double noundef %7, i1 noundef zeroext %8, i32 noundef %9, double noundef %10, double noundef %11) local_unnamed_addr #5 {
  %13 = alloca i64, align 8
  %14 = alloca %class.var3, align 8
  %15 = alloca %class.var3, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca %class.var3, align 8
  %21 = alloca %class.var3, align 8
  %22 = alloca %class.var3, align 8
  %23 = alloca %class.var3, align 8
  %24 = alloca %class.var3, align 8
  %25 = alloca %class.var3, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca i32, align 4
  %32 = alloca float, align 4
  %33 = alloca i32, align 4
  %34 = alloca float, align 4
  %35 = alloca i32, align 4
  %36 = alloca float, align 4
  %37 = alloca i32, align 4
  %38 = alloca float, align 4
  %39 = alloca i32, align 4
  %40 = alloca float, align 4
  %41 = alloca i32, align 4
  %42 = alloca float, align 4
  %43 = alloca %class.var3, align 8
  %44 = alloca %class.var3, align 8
  %45 = alloca %class.var3, align 8
  %46 = alloca %class.var3, align 8
  %47 = alloca i32, align 4
  %48 = alloca float, align 4
  %49 = alloca %class.var3, align 8
  %50 = alloca %class.var3, align 8
  %51 = alloca %class.var3, align 8
  %52 = alloca %class.var3, align 8
  %53 = alloca i32, align 4
  %54 = alloca float, align 4
  %55 = alloca %class.var3, align 8
  %56 = alloca %class.var3, align 8
  %57 = alloca %class.var3, align 8
  %58 = alloca %class.var3, align 8
  %59 = alloca %class.var3, align 8
  %60 = alloca %class.var3, align 8
  %61 = alloca %class.var3, align 8
  %62 = alloca i32, align 4
  %63 = alloca float, align 4
  %64 = alloca %class.var3, align 8
  %65 = alloca %class.var3, align 8
  %66 = alloca %class.var3, align 8
  %67 = alloca %class.var3, align 8
  %68 = alloca i32, align 4
  %69 = alloca float, align 4
  store i64 %1, ptr %13, align 8, !tbaa !5
  %70 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPK4ElemSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1) #10
  %71 = load ptr, ptr %70, align 8, !tbaa !9
  %72 = tail call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %71, i32 noundef 0)
  %73 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN4Elem4nodeEv(ptr noundef nonnull align 8 dereferenceable(408) %72)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #10
  %74 = load double, ptr %73, align 8, !tbaa !11
  %75 = getelementptr inbounds i8, ptr %73, i64 8
  %76 = load double, ptr %75, align 8, !tbaa !14
  %77 = getelementptr inbounds i8, ptr %73, i64 16
  %78 = load double, ptr %77, align 8, !tbaa !15
  call void @_ZN4var3IdEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %14, double noundef %74, double noundef %76, double noundef %78)
  %79 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %71, i32 noundef 1)
  %80 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN4Elem4nodeEv(ptr noundef nonnull align 8 dereferenceable(408) %79)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #10
  %81 = load double, ptr %80, align 8, !tbaa !11
  %82 = getelementptr inbounds i8, ptr %80, i64 8
  %83 = load double, ptr %82, align 8, !tbaa !14
  %84 = getelementptr inbounds i8, ptr %80, i64 16
  %85 = load double, ptr %84, align 8, !tbaa !15
  call void @_ZN4var3IdEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %15, double noundef %81, double noundef %83, double noundef %85)
  %86 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %71)
  %87 = call noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %86)
  %88 = fmul double %87, %7
  %89 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %71, i32 noundef 0)
  %90 = call noundef zeroext i1 @_ZNK4Elem16isEntryOrExitResEv(ptr noundef nonnull align 8 dereferenceable(408) %89)
  br i1 %90, label %.sink.split, label %119

.sink.split:                                      ; preds = %12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #10
  %91 = call noundef double @_ZNK6Throat12throatLengthEv(ptr noundef nonnull align 8 dereferenceable(456) %71)
  store double %91, ptr %16, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #10
  %92 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %71, i32 noundef 1)
  %93 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %92)
  %94 = call noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %93)
  %95 = call double @llvm.fmuladd.f64(double %94, double 1.100000e+00, double 2.000000e-09)
  store double %95, ptr %17, align 8, !tbaa !16
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %97 = load double, ptr %96, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #10
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 1)
  %99 = load double, ptr %98, align 8, !tbaa !16
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 1)
  store double %99, ptr %100, align 8, !tbaa !16
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 2)
  %102 = load double, ptr %101, align 8, !tbaa !16
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 2)
  store double %102, ptr %103, align 8, !tbaa !16
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 1)
  %105 = load double, ptr %104, align 8, !tbaa !16
  %106 = fadd double %105, 1.000000e-09
  store double %106, ptr %104, align 8, !tbaa !16
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 2)
  %108 = load double, ptr %107, align 8, !tbaa !16
  %109 = fadd double %108, 1.000000e-09
  store double %109, ptr %107, align 8, !tbaa !16
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 0)
  %111 = load double, ptr %110, align 8, !tbaa !16
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 0)
  %113 = load double, ptr %112, align 8, !tbaa !16
  %114 = fcmp olt double %111, %113
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 0)
  %116 = load double, ptr %115, align 8, !tbaa !16
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 0)
  %118 = fneg double %97
  %.sink.p = select i1 %114, double %118, double %97
  %.sink = fadd double %116, %.sink.p
  store double %.sink, ptr %117, align 8, !tbaa !16
  br label %119

119:                                              ; preds = %.sink.split, %12
  %120 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %71, i32 noundef 1)
  %121 = call noundef zeroext i1 @_ZNK4Elem16isEntryOrExitResEv(ptr noundef nonnull align 8 dereferenceable(408) %120)
  br i1 %121, label %.sink.split167, label %150

.sink.split167:                                   ; preds = %119
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #10
  %122 = call noundef double @_ZNK6Throat12throatLengthEv(ptr noundef nonnull align 8 dereferenceable(456) %71)
  store double %122, ptr %18, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #10
  %123 = call noundef ptr @_ZNK4Elem4neibEi(ptr noundef nonnull align 8 dereferenceable(408) %71, i32 noundef 0)
  %124 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %123)
  %125 = call noundef double @_ZNK9ElemModel3RRREv(ptr noundef nonnull align 8 dereferenceable(152) %124)
  %126 = call double @llvm.fmuladd.f64(double %125, double 1.100000e+00, double 2.000000e-09)
  store double %126, ptr %19, align 8, !tbaa !16
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19)
  %128 = load double, ptr %127, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #10
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 1)
  %130 = load double, ptr %129, align 8, !tbaa !16
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 1)
  store double %130, ptr %131, align 8, !tbaa !16
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 2)
  %133 = load double, ptr %132, align 8, !tbaa !16
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 2)
  store double %133, ptr %134, align 8, !tbaa !16
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 1)
  %136 = load double, ptr %135, align 8, !tbaa !16
  %137 = fadd double %136, 1.000000e-09
  store double %137, ptr %135, align 8, !tbaa !16
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 2)
  %139 = load double, ptr %138, align 8, !tbaa !16
  %140 = fadd double %139, 1.000000e-09
  store double %140, ptr %138, align 8, !tbaa !16
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 0)
  %142 = load double, ptr %141, align 8, !tbaa !16
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 0)
  %144 = load double, ptr %143, align 8, !tbaa !16
  %145 = fcmp olt double %142, %144
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 0)
  %147 = load double, ptr %146, align 8, !tbaa !16
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 0)
  %149 = fneg double %128
  %.sink168.p = select i1 %145, double %149, double %128
  %.sink168 = fadd double %147, %.sink168.p
  store double %.sink168, ptr %148, align 8, !tbaa !16
  br label %150

150:                                              ; preds = %.sink.split167, %119
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #10
  call void @_ZNK4var3IdEmiERKS0_(ptr dead_on_unwind nonnull writable sret(%class.var3) align 8 %20, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %14)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %21) #10
  %151 = call noundef double @_Z3magIdET_RK4var3IS0_E(ptr noundef nonnull align 8 dereferenceable(24) %20)
  %152 = fadd double %151, 1.000000e-33
  call void @_ZNK4var3IdEdvEd(ptr dead_on_unwind nonnull writable sret(%class.var3) align 8 %21, ptr noundef nonnull align 8 dereferenceable(24) %20, double noundef %152)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %22) #10
  call void @_ZN4var3IdEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %22, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef 0)
  %154 = load double, ptr %153, align 8, !tbaa !16
  %155 = call noundef double @_ZSt3absd(double noundef %154)
  %156 = fcmp olt double %155, 6.000000e-01
  br i1 %156, label %157, label %159

157:                                              ; preds = %164, %159, %150
  %.0159.lcssa = phi i64 [ 0, %150 ], [ 1, %159 ], [ 2, %164 ]
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %.0159.lcssa)
  store double 1.000000e+00, ptr %158, align 8, !tbaa !16
  br label %.loopexit157

159:                                              ; preds = %150
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef 1)
  %161 = load double, ptr %160, align 8, !tbaa !16
  %162 = call noundef double @_ZSt3absd(double noundef %161)
  %163 = fcmp olt double %162, 6.000000e-01
  br i1 %163, label %157, label %164

164:                                              ; preds = %159
  %165 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4var3IdEixEl(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef 2)
  %166 = load double, ptr %165, align 8, !tbaa !16
  %167 = call noundef double @_ZSt3absd(double noundef %166)
  %168 = fcmp olt double %167, 6.000000e-01
  br i1 %168, label %157, label %.loopexit157

.loopexit157:                                     ; preds = %164, %157
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %23) #10
  call void @_ZNK4var3IdEeoERKS0_(ptr dead_on_unwind nonnull writable sret(%class.var3) align 8 %23, ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 8 dereferenceable(24) %22)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(24) %23, i64 24, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %24) #10
  call void @_Z15rotateAroundVec4var3IdEdS0_(ptr dead_on_unwind nonnull writable sret(%class.var3) align 8 %24, ptr noundef nonnull byval(%class.var3) align 8 %22, double noundef 0x3FE921FB54442D11, ptr noundef nonnull byval(%class.var3) align 8 %21)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(24) %24, i64 24, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %24) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %25) #10
  %169 = call noundef double @_Z3magIdET_RK4var3IS0_E(ptr noundef nonnull align 8 dereferenceable(24) %22)
  %170 = fadd double %169, 1.000000e-33
  call void @_ZNK4var3IdEdvEd(ptr dead_on_unwind nonnull writable sret(%class.var3) align 8 %25, ptr noundef nonnull align 8 dereferenceable(24) %22, double noundef %170)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(24) %25, i64 24, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %25) #10
  %171 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %71)
  %172 = icmp eq ptr %171, null
  br i1 %172, label %.thread, label %173

173:                                              ; preds = %.loopexit157
  %174 = call ptr @__dynamic_cast(ptr nonnull %171, ptr nonnull @_ZTI9ElemModel, ptr nonnull @_ZTI7Polygon, i64 0) #10
  %.not = icmp ne ptr %174, null
  %brmerge.not = and i1 %.not, %8
  br i1 %brmerge.not, label %.preheader, label %.thread

.preheader:                                       ; preds = %173
  %175 = load ptr, ptr %174, align 8, !tbaa !18
  %176 = getelementptr inbounds i8, ptr %175, i64 192
  %177 = load ptr, ptr %176, align 8
  %178 = call noundef i32 %177(ptr noundef nonnull align 8 dereferenceable(248) %174)
  %179 = icmp sgt i32 %178, 0
  br i1 %179, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader, %262
  %indvars.iv = phi i64 [ %indvars.iv.next, %262 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #10
  %180 = trunc nuw nsw i64 %indvars.iv to i32
  %181 = call noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %174, i32 noundef %180)
  store double %181, ptr %26, align 8, !tbaa !16
  %182 = call double @sin(double noundef %181) #10
  %183 = fdiv double %88, %182
  %184 = load double, ptr %26, align 8, !tbaa !16
  %185 = call double @tan(double noundef %184) #10
  %186 = fdiv double %88, %185
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #10
  store double 0.000000e+00, ptr %27, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #10
  store double 0.000000e+00, ptr %28, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #10
  %187 = load double, ptr %26, align 8, !tbaa !16
  %188 = fsub double 0x3FF921FB54442D11, %187
  store double %188, ptr %29, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %30) #10
  store double %188, ptr %30, align 8, !tbaa !16
  %189 = call noundef ptr @_ZNK7Polygon13waterInCornerEv(ptr noundef nonnull align 8 dereferenceable(248) %174)
  %190 = getelementptr inbounds %class.CornerApex, ptr %189, i64 %indvars.iv
  %191 = call noundef zeroext i1 @_ZNK10CornerApex12cornerExistsEv(ptr noundef nonnull align 8 dereferenceable(144) %190)
  br i1 %191, label %192, label %217

192:                                              ; preds = %.lr.ph
  %193 = call noundef ptr @_ZNK7Polygon13waterInCornerEv(ptr noundef nonnull align 8 dereferenceable(248) %174)
  %194 = getelementptr inbounds %class.CornerApex, ptr %193, i64 %indvars.iv
  %195 = load double, ptr %26, align 8, !tbaa !16
  call void @_ZNK10CornerApex18getCApexDistConAngERdS0_dddbbb(ptr noundef nonnull align 8 dereferenceable(144) %194, ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %30, double noundef %10, double noundef %195, double noundef %11, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext false)
  %196 = load double, ptr %28, align 8, !tbaa !16
  %197 = fmul double %196, %7
  store double %197, ptr %28, align 8, !tbaa !16
  %198 = fmul double %186, %7
  %199 = fcmp ogt double %197, %198
  br i1 %199, label %200, label %205

200:                                              ; preds = %192
  store double %198, ptr %28, align 8, !tbaa !16
  %201 = fmul double %198, 1.500000e+00
  %202 = fcmp ogt double %198, %201
  br i1 %202, label %203, label %205

203:                                              ; preds = %200
  %204 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.74)
  %.pre = load double, ptr %28, align 8, !tbaa !16
  br label %205

205:                                              ; preds = %200, %203, %192
  %206 = phi double [ %198, %200 ], [ %.pre, %203 ], [ %197, %192 ]
  %207 = load double, ptr %27, align 8, !tbaa !16
  %208 = load double, ptr %29, align 8, !tbaa !16
  %209 = load double, ptr %30, align 8, !tbaa !16
  %210 = load double, ptr %26, align 8, !tbaa !16
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull byval(%class.var3) align 8 %14, ptr noundef nonnull byval(%class.var3) align 8 %15, ptr noundef nonnull byval(%class.var3) align 8 %22, ptr noundef nonnull byval(%class.var3) align 8 %22, double noundef %207, double noundef %206, double noundef %208, double noundef %209, double noundef %183, double noundef %210, double noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %31) #10
  store i32 3, ptr %31, align 4, !tbaa !20
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %31)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #10
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %32) #10
  store float 0.000000e+00, ptr %32, align 4, !tbaa !22
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %32)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %32) #10
  %211 = load double, ptr %27, align 8, !tbaa !16
  %212 = load double, ptr %28, align 8, !tbaa !16
  %213 = load double, ptr %29, align 8, !tbaa !16
  %214 = load double, ptr %30, align 8, !tbaa !16
  %215 = load double, ptr %26, align 8, !tbaa !16
  %216 = fneg double %215
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull byval(%class.var3) align 8 %14, ptr noundef nonnull byval(%class.var3) align 8 %15, ptr noundef nonnull byval(%class.var3) align 8 %22, ptr noundef nonnull byval(%class.var3) align 8 %22, double noundef %211, double noundef %212, double noundef %213, double noundef %214, double noundef %183, double noundef %216, double noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %33) #10
  store i32 3, ptr %33, align 4, !tbaa !20
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %33)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %33) #10
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %34) #10
  store float 0.000000e+00, ptr %34, align 4, !tbaa !22
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %34)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %34) #10
  br label %217

217:                                              ; preds = %205, %.lr.ph
  %218 = call noundef ptr @_ZNK7Polygon13oilLayerConstEv(ptr noundef nonnull align 8 dereferenceable(248) %174)
  %219 = getelementptr inbounds %class.LayerApex, ptr %218, i64 %indvars.iv
  %220 = call noundef zeroext i1 @_ZNK4Apex6existsEv(ptr noundef nonnull align 8 dereferenceable(104) %219)
  br i1 %220, label %221, label %241

221:                                              ; preds = %217
  %222 = call noundef ptr @_ZNK7Polygon13waterInCornerEv(ptr noundef nonnull align 8 dereferenceable(248) %174)
  %223 = getelementptr inbounds %class.CornerApex, ptr %222, i64 %indvars.iv
  %224 = load double, ptr %26, align 8, !tbaa !16
  call void @_ZNK10CornerApex18getCApexDistConAngERdS0_dddbbb(ptr noundef nonnull align 8 dereferenceable(144) %223, ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %29, double noundef %10, double noundef %224, double noundef %11, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext false)
  %225 = load double, ptr %27, align 8, !tbaa !16
  %226 = fmul double %225, %7
  store double %226, ptr %27, align 8, !tbaa !16
  %227 = call noundef ptr @_ZNK7Polygon13oilLayerConstEv(ptr noundef nonnull align 8 dereferenceable(248) %174)
  %228 = getelementptr inbounds %class.LayerApex, ptr %227, i64 %indvars.iv
  call void @_ZNK9LayerApex13getCAApexDistERdS0_RKdddb(ptr noundef nonnull align 8 dereferenceable(144) %228, ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %26, double noundef %10, double noundef %11, i1 noundef zeroext false)
  %229 = load double, ptr %28, align 8, !tbaa !16
  %230 = fmul double %229, %7
  store double %230, ptr %28, align 8, !tbaa !16
  %231 = load double, ptr %27, align 8, !tbaa !16
  %232 = load double, ptr %29, align 8, !tbaa !16
  %233 = load double, ptr %30, align 8, !tbaa !16
  %234 = load double, ptr %26, align 8, !tbaa !16
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull byval(%class.var3) align 8 %14, ptr noundef nonnull byval(%class.var3) align 8 %15, ptr noundef nonnull byval(%class.var3) align 8 %22, ptr noundef nonnull byval(%class.var3) align 8 %22, double noundef %231, double noundef %230, double noundef %232, double noundef %233, double noundef %183, double noundef %234, double noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %35) #10
  store i32 10, ptr %35, align 4, !tbaa !20
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %35)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %35) #10
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %36) #10
  store float 1.000000e+00, ptr %36, align 4, !tbaa !22
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %36)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %36) #10
  %235 = load double, ptr %27, align 8, !tbaa !16
  %236 = load double, ptr %28, align 8, !tbaa !16
  %237 = load double, ptr %29, align 8, !tbaa !16
  %238 = load double, ptr %30, align 8, !tbaa !16
  %239 = load double, ptr %26, align 8, !tbaa !16
  %240 = fneg double %239
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull byval(%class.var3) align 8 %14, ptr noundef nonnull byval(%class.var3) align 8 %15, ptr noundef nonnull byval(%class.var3) align 8 %22, ptr noundef nonnull byval(%class.var3) align 8 %22, double noundef %235, double noundef %236, double noundef %237, double noundef %238, double noundef %183, double noundef %240, double noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %37) #10
  store i32 10, ptr %37, align 4, !tbaa !20
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %37)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %37) #10
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %38) #10
  store float 1.000000e+00, ptr %38, align 4, !tbaa !22
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %38)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %38) #10
  br label %241

241:                                              ; preds = %221, %217
  %242 = load double, ptr %28, align 8, !tbaa !16
  %243 = fadd double %186, 0xBC9CD2B297D889BC
  %244 = fcmp olt double %242, %243
  br i1 %244, label %245, label %262

245:                                              ; preds = %241
  %246 = load double, ptr %30, align 8, !tbaa !16
  store double %246, ptr %29, align 8, !tbaa !16
  store double 0.000000e+00, ptr %30, align 8, !tbaa !16
  %247 = load double, ptr %26, align 8, !tbaa !16
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull byval(%class.var3) align 8 %14, ptr noundef nonnull byval(%class.var3) align 8 %15, ptr noundef nonnull byval(%class.var3) align 8 %22, ptr noundef nonnull byval(%class.var3) align 8 %22, double noundef %242, double noundef %186, double noundef %246, double noundef 0.000000e+00, double noundef %183, double noundef %247, double noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %39) #10
  store i32 1, ptr %39, align 4, !tbaa !20
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %39)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %39) #10
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %40) #10
  %248 = load ptr, ptr %174, align 8, !tbaa !18
  %249 = getelementptr inbounds i8, ptr %248, i64 152
  %250 = load ptr, ptr %249, align 8
  %251 = call noundef zeroext i1 %250(ptr noundef nonnull align 8 dereferenceable(152) %174)
  %252 = uitofp i1 %251 to float
  store float %252, ptr %40, align 4, !tbaa !22
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %40)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %40) #10
  %253 = load double, ptr %29, align 8, !tbaa !16
  %254 = load double, ptr %30, align 8, !tbaa !16
  %255 = load double, ptr %26, align 8, !tbaa !16
  %256 = fneg double %255
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull byval(%class.var3) align 8 %14, ptr noundef nonnull byval(%class.var3) align 8 %15, ptr noundef nonnull byval(%class.var3) align 8 %22, ptr noundef nonnull byval(%class.var3) align 8 %22, double noundef %242, double noundef %186, double noundef %253, double noundef %254, double noundef %183, double noundef %256, double noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %41) #10
  store i32 1, ptr %41, align 4, !tbaa !20
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %41)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %41) #10
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %42) #10
  %257 = load ptr, ptr %174, align 8, !tbaa !18
  %258 = getelementptr inbounds i8, ptr %257, i64 152
  %259 = load ptr, ptr %258, align 8
  %260 = call noundef zeroext i1 %259(ptr noundef nonnull align 8 dereferenceable(152) %174)
  %261 = uitofp i1 %260 to float
  store float %261, ptr %42, align 4, !tbaa !22
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %42)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %42) #10
  br label %262

262:                                              ; preds = %245, %241
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %43, ptr noundef nonnull align 8 dereferenceable(24) %14, i64 24, i1 false), !tbaa.struct !17
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %44, ptr noundef nonnull align 8 dereferenceable(24) %15, i64 24, i1 false), !tbaa.struct !17
  call void @_ZNK4var3IdEngEv(ptr dead_on_unwind nonnull writable sret(%class.var3) align 8 %45, ptr noundef nonnull align 8 dereferenceable(24) %22)
  call void @_ZNK4var3IdEngEv(ptr dead_on_unwind nonnull writable sret(%class.var3) align 8 %46, ptr noundef nonnull align 8 dereferenceable(24) %22)
  %263 = load double, ptr %30, align 8, !tbaa !16
  %264 = fsub double 0x3FF921FB54442D11, %263
  %265 = load double, ptr %26, align 8, !tbaa !16
  %266 = fsub double 0x3FF921FB54442D11, %265
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull byval(%class.var3) align 8 %43, ptr noundef nonnull byval(%class.var3) align 8 %44, ptr noundef nonnull byval(%class.var3) align 8 %45, ptr noundef nonnull byval(%class.var3) align 8 %46, double noundef 0.000000e+00, double noundef %88, double noundef %264, double noundef %264, double noundef 0.000000e+00, double noundef %266, double noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %47) #10
  store i32 2, ptr %47, align 4, !tbaa !20
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %47)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %47) #10
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %48) #10
  %267 = load ptr, ptr %174, align 8, !tbaa !18
  %268 = getelementptr inbounds i8, ptr %267, i64 152
  %269 = load ptr, ptr %268, align 8
  %270 = call noundef zeroext i1 %269(ptr noundef nonnull align 8 dereferenceable(152) %174)
  %271 = uitofp i1 %270 to float
  store float %271, ptr %48, align 4, !tbaa !22
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %48)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %48) #10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %49, ptr noundef nonnull align 8 dereferenceable(24) %14, i64 24, i1 false), !tbaa.struct !17
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %50, ptr noundef nonnull align 8 dereferenceable(24) %15, i64 24, i1 false), !tbaa.struct !17
  call void @_ZNK4var3IdEngEv(ptr dead_on_unwind nonnull writable sret(%class.var3) align 8 %51, ptr noundef nonnull align 8 dereferenceable(24) %22)
  call void @_ZNK4var3IdEngEv(ptr dead_on_unwind nonnull writable sret(%class.var3) align 8 %52, ptr noundef nonnull align 8 dereferenceable(24) %22)
  %272 = load double, ptr %30, align 8, !tbaa !16
  %273 = fsub double 0x3FF921FB54442D11, %272
  %274 = load double, ptr %26, align 8, !tbaa !16
  %275 = fadd double %274, 0xBFF921FB54442D11
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull byval(%class.var3) align 8 %49, ptr noundef nonnull byval(%class.var3) align 8 %50, ptr noundef nonnull byval(%class.var3) align 8 %51, ptr noundef nonnull byval(%class.var3) align 8 %52, double noundef 0.000000e+00, double noundef %88, double noundef %273, double noundef %273, double noundef 0.000000e+00, double noundef %275, double noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %53) #10
  store i32 2, ptr %53, align 4, !tbaa !20
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %53)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %53) #10
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %54) #10
  %276 = load ptr, ptr %174, align 8, !tbaa !18
  %277 = getelementptr inbounds i8, ptr %276, i64 152
  %278 = load ptr, ptr %277, align 8
  %279 = call noundef zeroext i1 %278(ptr noundef nonnull align 8 dereferenceable(152) %174)
  %280 = uitofp i1 %279 to float
  store float %280, ptr %54, align 4, !tbaa !22
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %54)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %54) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %55) #10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %56, ptr noundef nonnull align 8 dereferenceable(24) %22, i64 24, i1 false), !tbaa.struct !17
  %281 = call noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %174, i32 noundef %180)
  %282 = fsub double 0x400921FB54442D11, %281
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %283 = load ptr, ptr %174, align 8, !tbaa !18
  %284 = getelementptr inbounds i8, ptr %283, i64 192
  %285 = load ptr, ptr %284, align 8
  %286 = call noundef i32 %285(ptr noundef nonnull align 8 dereferenceable(248) %174)
  %287 = trunc nuw nsw i64 %indvars.iv.next to i32
  %288 = srem i32 %287, %286
  %289 = call noundef double @_ZNK7Polygon16cornerHalfAnglesEi(ptr noundef nonnull align 8 dereferenceable(248) %174, i32 noundef %288)
  %290 = fsub double %282, %289
  call void @_Z15rotateAroundVec4var3IdEdS0_(ptr dead_on_unwind nonnull writable sret(%class.var3) align 8 %55, ptr noundef nonnull byval(%class.var3) align 8 %56, double noundef %290, ptr noundef nonnull byval(%class.var3) align 8 %21)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(24) %55, i64 24, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %55) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #10
  %291 = load ptr, ptr %174, align 8, !tbaa !18
  %292 = getelementptr inbounds i8, ptr %291, i64 192
  %293 = load ptr, ptr %292, align 8
  %294 = call noundef i32 %293(ptr noundef nonnull align 8 dereferenceable(248) %174)
  %295 = sext i32 %294 to i64
  %296 = icmp slt i64 %indvars.iv.next, %295
  br i1 %296, label %.lr.ph, label %.loopexit, !llvm.loop !24

.thread:                                          ; preds = %.loopexit157, %173
  %297 = add i32 %9, 1
  %298 = and i32 %297, -2
  %299 = icmp sgt i32 %298, 0
  br i1 %299, label %.lr.ph162, label %.loopexit

.lr.ph162:                                        ; preds = %.thread
  %300 = lshr i32 %297, 1
  %301 = uitofp nneg i32 %300 to double
  %302 = fdiv double 0x3FF921FB54442D11, %301
  %303 = fmul double %302, 2.000000e+00
  %304 = fsub double 0x400921FB54442D11, %302
  %305 = fmul double %304, 6.000000e-01
  %306 = fneg double %302
  br label %307

307:                                              ; preds = %.lr.ph162, %307
  %.0146161 = phi i32 [ 0, %.lr.ph162 ], [ %320, %307 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %57) #10
  call void @_Z15rotateAroundVec4var3IdEdS0_(ptr dead_on_unwind nonnull writable sret(%class.var3) align 8 %57, ptr noundef nonnull byval(%class.var3) align 8 %22, double noundef %303, ptr noundef nonnull byval(%class.var3) align 8 %21)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(24) %57, i64 24, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %57) #10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull align 8 dereferenceable(24) %14, i64 24, i1 false), !tbaa.struct !17
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %59, ptr noundef nonnull align 8 dereferenceable(24) %15, i64 24, i1 false), !tbaa.struct !17
  call void @_ZNK4var3IdEngEv(ptr dead_on_unwind nonnull writable sret(%class.var3) align 8 %60, ptr noundef nonnull align 8 dereferenceable(24) %22)
  call void @_ZNK4var3IdEngEv(ptr dead_on_unwind nonnull writable sret(%class.var3) align 8 %61, ptr noundef nonnull align 8 dereferenceable(24) %22)
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull byval(%class.var3) align 8 %58, ptr noundef nonnull byval(%class.var3) align 8 %59, ptr noundef nonnull byval(%class.var3) align 8 %60, ptr noundef nonnull byval(%class.var3) align 8 %61, double noundef 0.000000e+00, double noundef %88, double noundef 0.000000e+00, double noundef %305, double noundef 0.000000e+00, double noundef %302, double noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %62) #10
  store i32 5, ptr %62, align 4, !tbaa !20
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %62)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %62) #10
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %63) #10
  %308 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %71)
  %309 = load ptr, ptr %308, align 8, !tbaa !18
  %310 = getelementptr inbounds i8, ptr %309, i64 152
  %311 = load ptr, ptr %310, align 8
  %312 = call noundef zeroext i1 %311(ptr noundef nonnull align 8 dereferenceable(152) %308)
  %313 = uitofp i1 %312 to float
  store float %313, ptr %63, align 4, !tbaa !22
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %63)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %63) #10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %64, ptr noundef nonnull align 8 dereferenceable(24) %14, i64 24, i1 false), !tbaa.struct !17
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %65, ptr noundef nonnull align 8 dereferenceable(24) %15, i64 24, i1 false), !tbaa.struct !17
  call void @_ZNK4var3IdEngEv(ptr dead_on_unwind nonnull writable sret(%class.var3) align 8 %66, ptr noundef nonnull align 8 dereferenceable(24) %22)
  call void @_ZNK4var3IdEngEv(ptr dead_on_unwind nonnull writable sret(%class.var3) align 8 %67, ptr noundef nonnull align 8 dereferenceable(24) %22)
  call void @_Z21insertHalfCornerointsRSt6vectorI4var3IdESaIS1_EERS_IiSaIiEES1_S1_S1_S1_ddddddd(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull byval(%class.var3) align 8 %64, ptr noundef nonnull byval(%class.var3) align 8 %65, ptr noundef nonnull byval(%class.var3) align 8 %66, ptr noundef nonnull byval(%class.var3) align 8 %67, double noundef 0.000000e+00, double noundef %88, double noundef 0.000000e+00, double noundef %305, double noundef 0.000000e+00, double noundef %306, double noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %68) #10
  store i32 5, ptr %68, align 4, !tbaa !20
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %68)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %68) #10
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %69) #10
  %314 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %71)
  %315 = load ptr, ptr %314, align 8, !tbaa !18
  %316 = getelementptr inbounds i8, ptr %315, i64 152
  %317 = load ptr, ptr %316, align 8
  %318 = call noundef zeroext i1 %317(ptr noundef nonnull align 8 dereferenceable(152) %314)
  %319 = uitofp i1 %318 to float
  store float %319, ptr %69, align 4, !tbaa !22
  call void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %69)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %69) #10
  %320 = add nuw nsw i32 %.0146161, 1
  %exitcond.not = icmp eq i32 %320, %298
  br i1 %exitcond.not, label %.loopexit, label %307, !llvm.loop !26

.loopexit:                                        ; preds = %262, %307, %.preheader, %.thread
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #10
  ret void
}

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) local_unnamed_addr #8

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 speculatable willreturn memory(none) }
attributes #3 = { 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 #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 = { 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 #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { mustprogress nofree nounwind willreturn memory(read) }
attributes #9 = { "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 #10 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS4var3IdE", !13, i64 0, !13, i64 8, !13, i64 16}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!12, !13, i64 16}
!16 = !{!13, !13, i64 0}
!17 = !{i64 0, i64 8, !16, i64 8, i64 8, !16, i64 16, i64 8, !16}
!18 = !{!19, !19, i64 0}
!19 = !{!"vtable pointer", !8, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"int", !7, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"float", !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}


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