; LLVM IR from Slingshot-Physics/slingshot-community :: common/geometry/src (polygon)

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

%class.Vector3 = type { [3 x float] }
%"struct.geometry::types::polygon50_t" = type { i32, [50 x %class.Vector3] }
%"struct.geometry::polygon::polyComparator_t" = type { i8 }

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector3miERKS_(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector312crossProductERKS_(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) #2 align 2

; 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 dso_local void @_ZN8geometry5types11polygon50_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(604), ptr noundef nonnull align 4 dereferenceable(604)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector3dvERKf(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry7polygon10convexHullERKNS_5types11polygon50_tERS2_(ptr noundef nonnull align 4 dereferenceable(604) %0, ptr noundef nonnull align 4 dereferenceable(604) %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %class.Vector3, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.geometry::types::polygon50_t", align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %class.Vector3, align 4
  %11 = alloca float, align 4
  %12 = alloca %class.Vector3, align 4
  %13 = alloca float, align 4
  %14 = alloca %class.Vector3, align 4
  %15 = alloca %class.Vector3, align 4
  %16 = alloca %"struct.geometry::polygon::polyComparator_t", align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i8, align 1
  %22 = alloca %class.Vector3, align 4
  %23 = alloca %class.Vector3, align 4
  %24 = alloca %class.Vector3, align 4
  %25 = alloca %class.Vector3, align 4
  %26 = alloca %class.Vector3, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %5) #5
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %27, i32 0, i32 1
  %29 = getelementptr inbounds [50 x %class.Vector3], ptr %28, i64 0, i64 0
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %29)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %87, %2
  %31 = load i32, ptr %6, align 4, !tbaa !9
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %32, i32 0, i32 0
  %34 = load i32, ptr %33, align 4, !tbaa !11
  %35 = icmp ult i32 %31, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %90

37:                                               ; preds = %30
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %38, i32 0, i32 1
  %40 = load i32, ptr %6, align 4, !tbaa !9
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds [50 x %class.Vector3], ptr %39, i64 0, i64 %41
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %42, i32 noundef 1)
  %44 = load float, ptr %43, align 4, !tbaa !13
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 1)
  %46 = load float, ptr %45, align 4, !tbaa !13
  %47 = fcmp olt float %44, %46
  br i1 %47, label %48, label %55

48:                                               ; preds = %37
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %49, i32 0, i32 1
  %51 = load i32, ptr %6, align 4, !tbaa !9
  %52 = zext i32 %51 to i64
  %53 = getelementptr inbounds [50 x %class.Vector3], ptr %50, i64 0, i64 %52
  %54 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %53)
  br label %86

55:                                               ; preds = %37
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %56, i32 0, i32 1
  %58 = load i32, ptr %6, align 4, !tbaa !9
  %59 = zext i32 %58 to i64
  %60 = getelementptr inbounds [50 x %class.Vector3], ptr %57, i64 0, i64 %59
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %60, i32 noundef 1)
  %62 = load float, ptr %61, align 4, !tbaa !13
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 1)
  %64 = load float, ptr %63, align 4, !tbaa !13
  %65 = fcmp oeq float %62, %64
  br i1 %65, label %66, label %85

66:                                               ; preds = %55
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %67, i32 0, i32 1
  %69 = load i32, ptr %6, align 4, !tbaa !9
  %70 = zext i32 %69 to i64
  %71 = getelementptr inbounds [50 x %class.Vector3], ptr %68, i64 0, i64 %70
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %71, i32 noundef 0)
  %73 = load float, ptr %72, align 4, !tbaa !13
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 0)
  %75 = load float, ptr %74, align 4, !tbaa !13
  %76 = fcmp olt float %73, %75
  br i1 %76, label %77, label %84

77:                                               ; preds = %66
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %78, i32 0, i32 1
  %80 = load i32, ptr %6, align 4, !tbaa !9
  %81 = zext i32 %80 to i64
  %82 = getelementptr inbounds [50 x %class.Vector3], ptr %79, i64 0, i64 %81
  %83 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %82)
  br label %84

84:                                               ; preds = %77, %66
  br label %85

85:                                               ; preds = %84, %55
  br label %86

86:                                               ; preds = %85, %48
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %6, align 4, !tbaa !9
  %89 = add i32 %88, 1
  store i32 %89, ptr %6, align 4, !tbaa !9
  br label %30, !llvm.loop !15

90:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 604, ptr %7) #5
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN8geometry5types11polygon50_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(604) %7, ptr noundef nonnull align 4 dereferenceable(604) %91)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %92

92:                                               ; preds = %131, %90
  %93 = load i32, ptr %8, align 4, !tbaa !9
  %94 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %7, i32 0, i32 0
  %95 = load i32, ptr %94, align 4, !tbaa !11
  %96 = icmp ult i32 %93, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %134

98:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %99 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %7, i32 0, i32 1
  %100 = load i32, ptr %8, align 4, !tbaa !9
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds [50 x %class.Vector3], ptr %99, i64 0, i64 %101
  store ptr %102, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #5
  call void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #5
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %103, ptr noundef nonnull align 4 dereferenceable(12) %5)
  %104 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #5
  store float %104, ptr %11, align 4, !tbaa !13
  %105 = load float, ptr %11, align 4, !tbaa !13
  %106 = fcmp olt float %105, 0x3E7AD7F2A0000000
  br i1 %106, label %107, label %115

107:                                              ; preds = %98
  %108 = call float @sqrtf(float noundef 2.000000e+00) #5
  %109 = fdiv float -1.000000e+00, %108
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %10, i32 noundef 0)
  store float %109, ptr %110, align 4, !tbaa !13
  %111 = call float @sqrtf(float noundef 2.000000e+00) #5
  %112 = fdiv float -1.000000e+00, %111
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %10, i32 noundef 1)
  store float %112, ptr %113, align 4, !tbaa !13
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %10, i32 noundef 2)
  store float 0.000000e+00, ptr %114, align 4, !tbaa !13
  br label %120

115:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %116 = load float, ptr %11, align 4, !tbaa !13
  %117 = call noundef float @_ZSt4fmaxff(float noundef %116, float noundef 0x3E7AD7F2A0000000)
  store float %117, ptr %13, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #5
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %15, ptr noundef nonnull align 4 dereferenceable(12) %118, ptr noundef nonnull align 4 dereferenceable(12) %5)
  call void @_ZNK7Vector3dvERKf(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %14, ptr noundef nonnull align 4 dereferenceable(12) %15, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %119 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %120

120:                                              ; preds = %115, %107
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %10, i32 noundef 1)
  %122 = load float, ptr %121, align 4, !tbaa !13
  %123 = fpext float %122 to double
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %10, i32 noundef 0)
  %125 = load float, ptr %124, align 4, !tbaa !13
  %126 = fpext float %125 to double
  %127 = call double @atan2(double noundef %123, double noundef %126) #5
  %128 = fptrunc double %127 to float
  %129 = load ptr, ptr %9, align 8, !tbaa !5
  %130 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %129, i32 noundef 2)
  store float %128, ptr %130, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %131

131:                                              ; preds = %120
  %132 = load i32, ptr %8, align 4, !tbaa !9
  %133 = add i32 %132, 1
  store i32 %133, ptr %8, align 4, !tbaa !9
  br label %92, !llvm.loop !17

134:                                              ; preds = %97
  %135 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %7, i32 0, i32 1
  %136 = getelementptr inbounds [50 x %class.Vector3], ptr %135, i64 0, i64 0
  %137 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %7, i32 0, i32 1
  %138 = getelementptr inbounds [50 x %class.Vector3], ptr %137, i64 0, i64 0
  %139 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %7, i32 0, i32 0
  %140 = load i32, ptr %139, align 4, !tbaa !11
  %141 = zext i32 %140 to i64
  %142 = getelementptr inbounds %class.Vector3, ptr %138, i64 %141
  call void @_ZSt4sortIP7Vector3N8geometry7polygon16polyComparator_tEEvT_S5_T0_(ptr noundef %136, ptr noundef %142)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %143, i32 0, i32 0
  store ptr %144, ptr %17, align 8, !tbaa !5
  %145 = load ptr, ptr %17, align 8, !tbaa !5
  store i32 0, ptr %145, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %146

146:                                              ; preds = %235, %134
  %147 = load i32, ptr %18, align 4, !tbaa !9
  %148 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %7, i32 0, i32 0
  %149 = load i32, ptr %148, align 4, !tbaa !11
  %150 = icmp ult i32 %147, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %146
  store i32 8, ptr %19, align 4
  br label %238

152:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %153 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %7, i32 0, i32 1
  %154 = load i32, ptr %18, align 4, !tbaa !9
  %155 = zext i32 %154 to i64
  %156 = getelementptr inbounds [50 x %class.Vector3], ptr %153, i64 0, i64 %155
  store ptr %156, ptr %20, align 8, !tbaa !5
  %157 = load ptr, ptr %17, align 8, !tbaa !5
  %158 = load i32, ptr %157, align 4, !tbaa !9
  %159 = icmp ult i32 %158, 2
  br i1 %159, label %160, label %177

160:                                              ; preds = %152
  %161 = load ptr, ptr %20, align 8, !tbaa !5
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %162, i32 0, i32 1
  %164 = load ptr, ptr %17, align 8, !tbaa !5
  %165 = load i32, ptr %164, align 4, !tbaa !9
  %166 = zext i32 %165 to i64
  %167 = getelementptr inbounds [50 x %class.Vector3], ptr %163, i64 0, i64 %166
  %168 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %167, ptr noundef nonnull align 4 dereferenceable(12) %161)
  %169 = load ptr, ptr %17, align 8, !tbaa !5
  %170 = load i32, ptr %169, align 4, !tbaa !9
  %171 = add i32 %170, 1
  store i32 %171, ptr %169, align 4, !tbaa !9
  %172 = load ptr, ptr %17, align 8, !tbaa !5
  %173 = load i32, ptr %172, align 4, !tbaa !9
  %174 = icmp eq i32 %173, 49
  br i1 %174, label %175, label %176

175:                                              ; preds = %160
  store i32 1, ptr %19, align 4
  br label %232

176:                                              ; preds = %160
  br label %231

177:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #5
  store i8 0, ptr %21, align 1, !tbaa !18
  br label %178

178:                                              ; preds = %209, %177
  store i8 0, ptr %21, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #5
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  %180 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %179, i32 0, i32 1
  %181 = load ptr, ptr %17, align 8, !tbaa !5
  %182 = load i32, ptr %181, align 4, !tbaa !9
  %183 = sub i32 %182, 1
  %184 = zext i32 %183 to i64
  %185 = getelementptr inbounds [50 x %class.Vector3], ptr %180, i64 0, i64 %184
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %22, ptr noundef nonnull align 4 dereferenceable(12) %185)
  call void @llvm.lifetime.start.p0(i64 12, ptr %23) #5
  %186 = load ptr, ptr %4, align 8, !tbaa !5
  %187 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %186, i32 0, i32 1
  %188 = load ptr, ptr %17, align 8, !tbaa !5
  %189 = load i32, ptr %188, align 4, !tbaa !9
  %190 = sub i32 %189, 2
  %191 = zext i32 %190 to i64
  %192 = getelementptr inbounds [50 x %class.Vector3], ptr %187, i64 0, i64 %191
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %23, ptr noundef nonnull align 4 dereferenceable(12) %192)
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #5
  %193 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %25, ptr noundef nonnull align 4 dereferenceable(12) %193, ptr noundef nonnull align 4 dereferenceable(12) %22)
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %26, ptr noundef nonnull align 4 dereferenceable(12) %22, ptr noundef nonnull align 4 dereferenceable(12) %23)
  call void @_ZNK7Vector312crossProductERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %24, ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(12) %26)
  %194 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %24, i32 noundef 2)
  %195 = load float, ptr %194, align 4, !tbaa !13
  %196 = fcmp oge float %195, 0.000000e+00
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #5
  br i1 %196, label %197, label %201

197:                                              ; preds = %178
  store i8 1, ptr %21, align 1, !tbaa !18
  %198 = load ptr, ptr %17, align 8, !tbaa !5
  %199 = load i32, ptr %198, align 4, !tbaa !9
  %200 = sub i32 %199, 1
  store i32 %200, ptr %198, align 4, !tbaa !9
  br label %201

201:                                              ; preds = %197, %178
  call void @llvm.lifetime.end.p0(i64 12, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #5
  br label %202

202:                                              ; preds = %201
  %203 = load i8, ptr %21, align 1, !tbaa !18, !range !20, !noundef !21
  %204 = trunc i8 %203 to i1
  br i1 %204, label %205, label %209

205:                                              ; preds = %202
  %206 = load ptr, ptr %17, align 8, !tbaa !5
  %207 = load i32, ptr %206, align 4, !tbaa !9
  %208 = icmp ugt i32 %207, 2
  br label %209

209:                                              ; preds = %205, %202
  %210 = phi i1 [ false, %202 ], [ %208, %205 ]
  br i1 %210, label %178, label %211, !llvm.loop !22

211:                                              ; preds = %209
  %212 = load ptr, ptr %20, align 8, !tbaa !5
  %213 = load ptr, ptr %4, align 8, !tbaa !5
  %214 = getelementptr inbounds %"struct.geometry::types::polygon50_t", ptr %213, i32 0, i32 1
  %215 = load ptr, ptr %17, align 8, !tbaa !5
  %216 = load i32, ptr %215, align 4, !tbaa !9
  %217 = zext i32 %216 to i64
  %218 = getelementptr inbounds [50 x %class.Vector3], ptr %214, i64 0, i64 %217
  %219 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %218, ptr noundef nonnull align 4 dereferenceable(12) %212)
  %220 = load ptr, ptr %17, align 8, !tbaa !5
  %221 = load i32, ptr %220, align 4, !tbaa !9
  %222 = add i32 %221, 1
  store i32 %222, ptr %220, align 4, !tbaa !9
  %223 = load ptr, ptr %17, align 8, !tbaa !5
  %224 = load i32, ptr %223, align 4, !tbaa !9
  %225 = icmp eq i32 %224, 49
  br i1 %225, label %226, label %227

226:                                              ; preds = %211
  store i32 1, ptr %19, align 4
  br label %228

227:                                              ; preds = %211
  store i32 0, ptr %19, align 4
  br label %228

228:                                              ; preds = %227, %226
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #5
  %229 = load i32, ptr %19, align 4
  switch i32 %229, label %232 [
    i32 0, label %230
  ]

230:                                              ; preds = %228
  br label %231

231:                                              ; preds = %230, %176
  store i32 0, ptr %19, align 4
  br label %232

232:                                              ; preds = %231, %228, %175
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  %233 = load i32, ptr %19, align 4
  switch i32 %233, label %238 [
    i32 0, label %234
  ]

234:                                              ; preds = %232
  br label %235

235:                                              ; preds = %234
  %236 = load i32, ptr %18, align 4, !tbaa !9
  %237 = add i32 %236, 1
  store i32 %237, ptr %18, align 4, !tbaa !9
  br label %146, !llvm.loop !23

238:                                              ; preds = %232, %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  %239 = load i32, ptr %19, align 4
  switch i32 %239, label %241 [
    i32 8, label %240
  ]

240:                                              ; preds = %238
  store i32 0, ptr %19, align 4
  br label %241

241:                                              ; preds = %240, %238
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 604, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %5) #5
  %242 = load i32, ptr %19, align 4
  switch i32 %242, label %244 [
    i32 0, label %243
    i32 1, label %243
  ]

243:                                              ; preds = %241, %241
  ret void

244:                                              ; preds = %241
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) #2 align 2

; Function Attrs: nounwind
declare float @sqrtf(float noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4fmaxff(float noundef, float noundef) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP7Vector3N8geometry7polygon16polyComparator_tEEvT_S5_T0_(ptr noundef, ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSN8geometry5types11polygon50_tE", !10, i64 0, !7, i64 4}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}


; 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.Vector3 = type { [3 x float] }
%"struct.geometry::types::polygon50_t" = type { i32, [50 x %class.Vector3] }

; 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 uwtable
declare dso_local void @_ZNK7Vector3miERKS_(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector312crossProductERKS_(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8geometry5types11polygon50_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(604), ptr noundef nonnull align 4 dereferenceable(604)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector3dvERKf(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry7polygon10convexHullERKNS_5types11polygon50_tERS2_(ptr noundef nonnull align 4 dereferenceable(604) %0, ptr noundef nonnull align 4 dereferenceable(604) %1) local_unnamed_addr #1 {
  %3 = alloca %class.Vector3, align 4
  %4 = alloca %"struct.geometry::types::polygon50_t", align 4
  %5 = alloca %class.Vector3, align 4
  %6 = alloca %class.Vector3, align 4
  %7 = alloca float, align 4
  %8 = alloca %class.Vector3, align 4
  %9 = alloca %class.Vector3, align 4
  %10 = alloca %class.Vector3, align 4
  %11 = alloca %class.Vector3, align 4
  %12 = alloca %class.Vector3, align 4
  %13 = alloca %class.Vector3, align 4
  %14 = alloca %class.Vector3, align 4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #5
  %15 = getelementptr inbounds i8, ptr %0, i64 4
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %15)
  %16 = load i32, ptr %0, align 4, !tbaa !5
  %.not74 = icmp eq i32 %16, 0
  br i1 %.not74, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %38, %2
  call void @llvm.lifetime.start.p0(i64 604, ptr nonnull %4) #5
  call void @_ZN8geometry5types11polygon50_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(604) %4, ptr noundef nonnull align 4 dereferenceable(604) %0)
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %.not75 = icmp eq i32 %17, 0
  br i1 %.not75, label %._crit_edge68, label %.lr.ph67

.lr.ph67:                                         ; preds = %._crit_edge
  %18 = getelementptr inbounds i8, ptr %4, i64 4
  br label %47

.lr.ph:                                           ; preds = %2, %38
  %indvars.iv = phi i64 [ %indvars.iv.next, %38 ], [ 0, %2 ]
  %19 = getelementptr inbounds [50 x %class.Vector3], ptr %15, i64 0, i64 %indvars.iv
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %19, i32 noundef 1)
  %21 = load float, ptr %20, align 4, !tbaa !10
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %3, i32 noundef 1)
  %23 = load float, ptr %22, align 4, !tbaa !10
  %24 = fcmp olt float %21, %23
  br i1 %24, label %.sink.split, label %25

25:                                               ; preds = %.lr.ph
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %19, i32 noundef 1)
  %27 = load float, ptr %26, align 4, !tbaa !10
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %3, i32 noundef 1)
  %29 = load float, ptr %28, align 4, !tbaa !10
  %30 = fcmp oeq float %27, %29
  br i1 %30, label %31, label %38

31:                                               ; preds = %25
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %19, i32 noundef 0)
  %33 = load float, ptr %32, align 4, !tbaa !10
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %3, i32 noundef 0)
  %35 = load float, ptr %34, align 4, !tbaa !10
  %36 = fcmp olt float %33, %35
  br i1 %36, label %.sink.split, label %38

.sink.split:                                      ; preds = %31, %.lr.ph
  %37 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %19)
  br label %38

38:                                               ; preds = %.sink.split, %31, %25
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %39 = load i32, ptr %0, align 4, !tbaa !5
  %40 = zext i32 %39 to i64
  %41 = icmp ult i64 %indvars.iv.next, %40
  br i1 %41, label %.lr.ph, label %._crit_edge, !llvm.loop !12

._crit_edge68.loopexit:                           ; preds = %58
  %42 = zext i32 %68 to i64
  br label %._crit_edge68

._crit_edge68:                                    ; preds = %._crit_edge, %._crit_edge68.loopexit
  %.lcssa63 = phi i64 [ %42, %._crit_edge68.loopexit ], [ 0, %._crit_edge ]
  %43 = getelementptr inbounds i8, ptr %4, i64 4
  %44 = getelementptr inbounds %class.Vector3, ptr %43, i64 %.lcssa63
  call void @_ZSt4sortIP7Vector3N8geometry7polygon16polyComparator_tEEvT_S5_T0_(ptr noundef nonnull %43, ptr noundef nonnull %44)
  store i32 0, ptr %1, align 4, !tbaa !14
  %45 = getelementptr inbounds i8, ptr %1, i64 4
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %.not76 = icmp eq i32 %46, 0
  br i1 %.not76, label %.critedge._crit_edge, label %.lr.ph71

47:                                               ; preds = %.lr.ph67, %58
  %indvars.iv78 = phi i64 [ 0, %.lr.ph67 ], [ %indvars.iv.next79, %58 ]
  %48 = getelementptr inbounds [50 x %class.Vector3], ptr %18, i64 0, i64 %indvars.iv78
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #5
  call void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %5)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %6, ptr noundef nonnull align 4 dereferenceable(12) %48, ptr noundef nonnull align 4 dereferenceable(12) %3)
  %49 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  %50 = fcmp olt float %49, 0x3E7AD7F2A0000000
  br i1 %50, label %51, label %55

51:                                               ; preds = %47
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 0)
  store float 0xBFE6A09E60000000, ptr %52, align 4, !tbaa !10
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 1)
  store float 0xBFE6A09E60000000, ptr %53, align 4, !tbaa !10
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 2)
  store float 0.000000e+00, ptr %54, align 4, !tbaa !10
  br label %58

55:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  %56 = call noundef float @_ZSt4fmaxff(float noundef %49, float noundef 0x3E7AD7F2A0000000)
  store float %56, ptr %7, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %9, ptr noundef nonnull align 4 dereferenceable(12) %48, ptr noundef nonnull align 4 dereferenceable(12) %3)
  call void @_ZNK7Vector3dvERKf(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %8, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %57 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %58

58:                                               ; preds = %55, %51
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 1)
  %60 = load float, ptr %59, align 4, !tbaa !10
  %61 = fpext float %60 to double
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 0)
  %63 = load float, ptr %62, align 4, !tbaa !10
  %64 = fpext float %63 to double
  %65 = call double @atan2(double noundef %61, double noundef %64) #5
  %66 = fptrunc double %65 to float
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %48, i32 noundef 2)
  store float %66, ptr %67, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #5
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %68 = load i32, ptr %4, align 4, !tbaa !5
  %69 = zext i32 %68 to i64
  %70 = icmp ult i64 %indvars.iv.next79, %69
  br i1 %70, label %47, label %._crit_edge68.loopexit, !llvm.loop !15

.lr.ph71:                                         ; preds = %._crit_edge68, %.critedge61
  %71 = phi i32 [ %102, %.critedge61 ], [ 0, %._crit_edge68 ]
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %.critedge61 ], [ 0, %._crit_edge68 ]
  %72 = getelementptr inbounds [50 x %class.Vector3], ptr %43, i64 0, i64 %indvars.iv81
  %73 = icmp ult i32 %71, 2
  br i1 %73, label %74, label %.preheader

74:                                               ; preds = %.lr.ph71
  %75 = zext nneg i32 %71 to i64
  %76 = getelementptr inbounds [50 x %class.Vector3], ptr %45, i64 0, i64 %75
  %77 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %76, ptr noundef nonnull align 4 dereferenceable(12) %72)
  %78 = load i32, ptr %1, align 4, !tbaa !14
  %79 = add i32 %78, 1
  store i32 %79, ptr %1, align 4, !tbaa !14
  %80 = icmp eq i32 %79, 49
  br i1 %80, label %.critedge._crit_edge, label %.critedge61

.preheader:                                       ; preds = %.lr.ph71, %92
  %81 = phi i32 [ %94, %92 ], [ %71, %.lr.ph71 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #5
  %82 = add i32 %81, -1
  %83 = zext i32 %82 to i64
  %84 = getelementptr inbounds [50 x %class.Vector3], ptr %45, i64 0, i64 %83
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %84)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #5
  %85 = load i32, ptr %1, align 4, !tbaa !14
  %86 = add i32 %85, -2
  %87 = zext i32 %86 to i64
  %88 = getelementptr inbounds [50 x %class.Vector3], ptr %45, i64 0, i64 %87
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %88)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %13, ptr noundef nonnull align 4 dereferenceable(12) %72, ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %14, ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @_ZNK7Vector312crossProductERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %14)
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %12, i32 noundef 2)
  %90 = load float, ptr %89, align 4, !tbaa !10
  %91 = fcmp ult float %90, 0.000000e+00
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #5
  br i1 %91, label %.critedge.critedge, label %92

92:                                               ; preds = %.preheader
  %93 = load i32, ptr %1, align 4, !tbaa !14
  %94 = add i32 %93, -1
  store i32 %94, ptr %1, align 4, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #5
  %95 = icmp ugt i32 %94, 2
  br i1 %95, label %.preheader, label %.critedge, !llvm.loop !16

.critedge.critedge:                               ; preds = %.preheader
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #5
  %.pre = load i32, ptr %1, align 4, !tbaa !14
  br label %.critedge

.critedge:                                        ; preds = %92, %.critedge.critedge
  %96 = phi i32 [ %.pre, %.critedge.critedge ], [ %94, %92 ]
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds [50 x %class.Vector3], ptr %45, i64 0, i64 %97
  %99 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %98, ptr noundef nonnull align 4 dereferenceable(12) %72)
  %100 = load i32, ptr %1, align 4, !tbaa !14
  %101 = add i32 %100, 1
  store i32 %101, ptr %1, align 4, !tbaa !14
  %.not = icmp eq i32 %101, 49
  br i1 %.not, label %.critedge._crit_edge, label %.critedge61

.critedge61:                                      ; preds = %.critedge, %74
  %102 = phi i32 [ %101, %.critedge ], [ %79, %74 ]
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %103 = load i32, ptr %4, align 4, !tbaa !5
  %104 = zext i32 %103 to i64
  %105 = icmp ult i64 %indvars.iv.next82, %104
  br i1 %105, label %.lr.ph71, label %.critedge._crit_edge, !llvm.loop !17

.critedge._crit_edge:                             ; preds = %.critedge61, %74, %.critedge, %._crit_edge68
  call void @llvm.lifetime.end.p0(i64 604, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #5
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4fmaxff(float noundef, float noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP7Vector3N8geometry7polygon16polyComparator_tEEvT_S5_T0_(ptr noundef, ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 = { 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, !7, i64 0}
!6 = !{!"_ZTSN8geometry5types11polygon50_tE", !7, i64 0, !8, i64 4}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}


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