; LLVM IR from atlantis13579/Riemann :: Src/Geometry (ConvexHull2)

; 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.Maths::TVector2" = type { float, float }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann20__convex_points_sortEPiiiiRKSt6vectorIN5Maths8TVector2IfEESaIS4_EE(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store float 0x3EE4F8B580000000, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %16 = load i32, ptr %7, align 4, !tbaa !9
  %17 = load i32, ptr %8, align 4, !tbaa !9
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %19, label %239

19:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %20 = load i32, ptr %7, align 4, !tbaa !9
  %21 = load i32, ptr %8, align 4, !tbaa !9
  %22 = call noundef i32 @_ZN5Maths9RandomIntEii(i32 noundef %20, i32 noundef %21)
  store i32 %22, ptr %15, align 4, !tbaa !9
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = load i32, ptr %15, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds i32, ptr %23, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !9
  store i32 %27, ptr %14, align 4, !tbaa !9
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds i32, ptr %28, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = load i32, ptr %15, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i32, ptr %33, i64 %35
  store i32 %32, ptr %36, align 4, !tbaa !9
  %37 = load i32, ptr %14, align 4, !tbaa !9
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i32, ptr %38, i64 %40
  store i32 %37, ptr %41, align 4, !tbaa !9
  %42 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %42, ptr %12, align 4, !tbaa !9
  %43 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %43, ptr %13, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %220, %19
  %45 = load i32, ptr %12, align 4, !tbaa !9
  %46 = load i32, ptr %13, align 4, !tbaa !9
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %48, label %221

48:                                               ; preds = %44
  br label %49

49:                                               ; preds = %116, %48
  %50 = load i32, ptr %12, align 4, !tbaa !9
  %51 = load i32, ptr %13, align 4, !tbaa !9
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %53, label %114

53:                                               ; preds = %49
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = load i32, ptr %14, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %56) #5
  %58 = getelementptr inbounds %"class.Maths::TVector2", ptr %57, i32 0, i32 1
  %59 = load float, ptr %58, align 4, !tbaa !13
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = load i32, ptr %13, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds i32, ptr %61, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %66) #5
  %68 = getelementptr inbounds %"class.Maths::TVector2", ptr %67, i32 0, i32 1
  %69 = load float, ptr %68, align 4, !tbaa !13
  %70 = fsub float %69, 0x3EE4F8B580000000
  %71 = fcmp olt float %59, %70
  br i1 %71, label %112, label %72

72:                                               ; preds = %53
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = load i32, ptr %14, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %75) #5
  %77 = getelementptr inbounds %"class.Maths::TVector2", ptr %76, i32 0, i32 1
  %78 = load float, ptr %77, align 4, !tbaa !13
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = load i32, ptr %13, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr %80, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef %85) #5
  %87 = getelementptr inbounds %"class.Maths::TVector2", ptr %86, i32 0, i32 1
  %88 = load float, ptr %87, align 4, !tbaa !13
  %89 = fsub float %78, %88
  %90 = call float @llvm.fabs.f32(float %89)
  %91 = fcmp ole float %90, 0x3EE4F8B580000000
  br i1 %91, label %92, label %110

92:                                               ; preds = %72
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = load i32, ptr %14, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %93, i64 noundef %95) #5
  %97 = getelementptr inbounds %"class.Maths::TVector2", ptr %96, i32 0, i32 0
  %98 = load float, ptr %97, align 4, !tbaa !15
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = load i32, ptr %13, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds i32, ptr %100, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %105) #5
  %107 = getelementptr inbounds %"class.Maths::TVector2", ptr %106, i32 0, i32 0
  %108 = load float, ptr %107, align 4, !tbaa !15
  %109 = fcmp ole float %98, %108
  br label %110

110:                                              ; preds = %92, %72
  %111 = phi i1 [ false, %72 ], [ %109, %92 ]
  br label %112

112:                                              ; preds = %110, %53
  %113 = phi i1 [ true, %53 ], [ %111, %110 ]
  br label %114

114:                                              ; preds = %112, %49
  %115 = phi i1 [ false, %49 ], [ %113, %112 ]
  br i1 %115, label %116, label %119

116:                                              ; preds = %114
  %117 = load i32, ptr %13, align 4, !tbaa !9
  %118 = add nsw i32 %117, -1
  store i32 %118, ptr %13, align 4, !tbaa !9
  br label %49, !llvm.loop !16

119:                                              ; preds = %114
  %120 = load i32, ptr %12, align 4, !tbaa !9
  %121 = load i32, ptr %13, align 4, !tbaa !9
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %123, label %134

123:                                              ; preds = %119
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = load i32, ptr %13, align 4, !tbaa !9
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds i32, ptr %124, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !9
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = load i32, ptr %12, align 4, !tbaa !9
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %12, align 4, !tbaa !9
  %132 = sext i32 %130 to i64
  %133 = getelementptr inbounds i32, ptr %129, i64 %132
  store i32 %128, ptr %133, align 4, !tbaa !9
  br label %134

134:                                              ; preds = %123, %119
  br label %135

135:                                              ; preds = %202, %134
  %136 = load i32, ptr %12, align 4, !tbaa !9
  %137 = load i32, ptr %13, align 4, !tbaa !9
  %138 = icmp slt i32 %136, %137
  br i1 %138, label %139, label %200

139:                                              ; preds = %135
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = load i32, ptr %14, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %140, i64 noundef %142) #5
  %144 = getelementptr inbounds %"class.Maths::TVector2", ptr %143, i32 0, i32 1
  %145 = load float, ptr %144, align 4, !tbaa !13
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  %147 = load ptr, ptr %6, align 8, !tbaa !5
  %148 = load i32, ptr %12, align 4, !tbaa !9
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds i32, ptr %147, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %146, i64 noundef %152) #5
  %154 = getelementptr inbounds %"class.Maths::TVector2", ptr %153, i32 0, i32 1
  %155 = load float, ptr %154, align 4, !tbaa !13
  %156 = fadd float %155, 0x3EE4F8B580000000
  %157 = fcmp ogt float %145, %156
  br i1 %157, label %198, label %158

158:                                              ; preds = %139
  %159 = load ptr, ptr %10, align 8, !tbaa !5
  %160 = load i32, ptr %14, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %159, i64 noundef %161) #5
  %163 = getelementptr inbounds %"class.Maths::TVector2", ptr %162, i32 0, i32 1
  %164 = load float, ptr %163, align 4, !tbaa !13
  %165 = load ptr, ptr %10, align 8, !tbaa !5
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  %167 = load i32, ptr %12, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds i32, ptr %166, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !9
  %171 = sext i32 %170 to i64
  %172 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %165, i64 noundef %171) #5
  %173 = getelementptr inbounds %"class.Maths::TVector2", ptr %172, i32 0, i32 1
  %174 = load float, ptr %173, align 4, !tbaa !13
  %175 = fsub float %164, %174
  %176 = call float @llvm.fabs.f32(float %175)
  %177 = fcmp ole float %176, 0x3EE4F8B580000000
  br i1 %177, label %178, label %196

178:                                              ; preds = %158
  %179 = load ptr, ptr %10, align 8, !tbaa !5
  %180 = load i32, ptr %14, align 4, !tbaa !9
  %181 = sext i32 %180 to i64
  %182 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %179, i64 noundef %181) #5
  %183 = getelementptr inbounds %"class.Maths::TVector2", ptr %182, i32 0, i32 0
  %184 = load float, ptr %183, align 4, !tbaa !15
  %185 = load ptr, ptr %10, align 8, !tbaa !5
  %186 = load ptr, ptr %6, align 8, !tbaa !5
  %187 = load i32, ptr %12, align 4, !tbaa !9
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds i32, ptr %186, i64 %188
  %190 = load i32, ptr %189, align 4, !tbaa !9
  %191 = sext i32 %190 to i64
  %192 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %185, i64 noundef %191) #5
  %193 = getelementptr inbounds %"class.Maths::TVector2", ptr %192, i32 0, i32 0
  %194 = load float, ptr %193, align 4, !tbaa !15
  %195 = fcmp oge float %184, %194
  br label %196

196:                                              ; preds = %178, %158
  %197 = phi i1 [ false, %158 ], [ %195, %178 ]
  br label %198

198:                                              ; preds = %196, %139
  %199 = phi i1 [ true, %139 ], [ %197, %196 ]
  br label %200

200:                                              ; preds = %198, %135
  %201 = phi i1 [ false, %135 ], [ %199, %198 ]
  br i1 %201, label %202, label %205

202:                                              ; preds = %200
  %203 = load i32, ptr %12, align 4, !tbaa !9
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %12, align 4, !tbaa !9
  br label %135, !llvm.loop !18

205:                                              ; preds = %200
  %206 = load i32, ptr %12, align 4, !tbaa !9
  %207 = load i32, ptr %13, align 4, !tbaa !9
  %208 = icmp slt i32 %206, %207
  br i1 %208, label %209, label %220

209:                                              ; preds = %205
  %210 = load ptr, ptr %6, align 8, !tbaa !5
  %211 = load i32, ptr %12, align 4, !tbaa !9
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds i32, ptr %210, i64 %212
  %214 = load i32, ptr %213, align 4, !tbaa !9
  %215 = load ptr, ptr %6, align 8, !tbaa !5
  %216 = load i32, ptr %13, align 4, !tbaa !9
  %217 = add nsw i32 %216, -1
  store i32 %217, ptr %13, align 4, !tbaa !9
  %218 = sext i32 %216 to i64
  %219 = getelementptr inbounds i32, ptr %215, i64 %218
  store i32 %214, ptr %219, align 4, !tbaa !9
  br label %220

220:                                              ; preds = %209, %205
  br label %44, !llvm.loop !19

221:                                              ; preds = %44
  %222 = load i32, ptr %14, align 4, !tbaa !9
  %223 = load ptr, ptr %6, align 8, !tbaa !5
  %224 = load i32, ptr %12, align 4, !tbaa !9
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds i32, ptr %223, i64 %225
  store i32 %222, ptr %226, align 4, !tbaa !9
  %227 = load ptr, ptr %6, align 8, !tbaa !5
  %228 = load i32, ptr %7, align 4, !tbaa !9
  %229 = load i32, ptr %12, align 4, !tbaa !9
  %230 = sub nsw i32 %229, 1
  %231 = load i32, ptr %9, align 4, !tbaa !9
  %232 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN7Riemann20__convex_points_sortEPiiiiRKSt6vectorIN5Maths8TVector2IfEESaIS4_EE(ptr noundef %227, i32 noundef %228, i32 noundef %230, i32 noundef %231, ptr noundef nonnull align 8 dereferenceable(24) %232)
  %233 = load ptr, ptr %6, align 8, !tbaa !5
  %234 = load i32, ptr %12, align 4, !tbaa !9
  %235 = add nsw i32 %234, 1
  %236 = load i32, ptr %8, align 4, !tbaa !9
  %237 = load i32, ptr %9, align 4, !tbaa !9
  %238 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN7Riemann20__convex_points_sortEPiiiiRKSt6vectorIN5Maths8TVector2IfEESaIS4_EE(ptr noundef %233, i32 noundef %235, i32 noundef %236, i32 noundef %237, ptr noundef nonnull align 8 dereferenceable(24) %238)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %239

239:                                              ; preds = %221, %5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  ret void
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN5Maths9RandomIntEii(i32 noundef, i32 noundef) #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #4

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

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


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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann20__convex_points_sortEPiiiiRKSt6vectorIN5Maths8TVector2IfEESaIS4_EE(ptr nocapture noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4) local_unnamed_addr #0 {
  %6 = icmp slt i32 %1, %2
  br i1 %6, label %.lr.ph104, label %tailrecurse._crit_edge

.lr.ph104:                                        ; preds = %5, %tailrecurse
  %.tr90103 = phi i32 [ %95, %tailrecurse ], [ %1, %5 ]
  %7 = tail call noundef i32 @_ZN5Maths9RandomIntEii(i32 noundef %.tr90103, i32 noundef %2)
  %8 = sext i32 %7 to i64
  %9 = getelementptr inbounds i32, ptr %0, i64 %8
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %11 = sext i32 %.tr90103 to i64
  %12 = getelementptr inbounds i32, ptr %0, i64 %11
  %13 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %13, ptr %9, align 4, !tbaa !5
  store i32 %10, ptr %12, align 4, !tbaa !5
  %14 = sext i32 %10 to i64
  br label %.preheader

.preheader:                                       ; preds = %.lr.ph104, %.critedge89
  %.0102 = phi i32 [ %.tr90103, %.lr.ph104 ], [ %.297, %.critedge89 ]
  %.083101 = phi i32 [ %2, %.lr.ph104 ], [ %.285, %.critedge89 ]
  %15 = sext i32 %.083101 to i64
  %16 = sext i32 %.0102 to i64
  br label %17

17:                                               ; preds = %.preheader, %.critedge2
  %indvars.iv = phi i64 [ %15, %.preheader ], [ %indvars.iv.next, %.critedge2 ]
  %18 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %14) #4
  %19 = getelementptr inbounds i8, ptr %18, i64 4
  %20 = load float, ptr %19, align 4, !tbaa !9
  %21 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %23) #4
  %25 = getelementptr inbounds i8, ptr %24, i64 4
  %26 = load float, ptr %25, align 4, !tbaa !9
  %27 = fadd float %26, 0xBEE4F8B580000000
  %28 = fcmp olt float %20, %27
  br i1 %28, label %.critedge2, label %29

29:                                               ; preds = %17
  %30 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %14) #4
  %31 = getelementptr inbounds i8, ptr %30, i64 4
  %32 = load float, ptr %31, align 4, !tbaa !9
  %33 = load i32, ptr %21, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %34) #4
  %36 = getelementptr inbounds i8, ptr %35, i64 4
  %37 = load float, ptr %36, align 4, !tbaa !9
  %38 = fsub float %32, %37
  %39 = tail call float @llvm.fabs.f32(float %38)
  %40 = fcmp ugt float %39, 0x3EE4F8B580000000
  br i1 %40, label %.critedge, label %41

41:                                               ; preds = %29
  %42 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %14) #4
  %43 = load float, ptr %42, align 4, !tbaa !12
  %44 = load i32, ptr %21, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %45) #4
  %47 = load float, ptr %46, align 4, !tbaa !12
  %48 = fcmp ugt float %43, %47
  br i1 %48, label %.critedge, label %.critedge2

.critedge2:                                       ; preds = %17, %41
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %49 = icmp sgt i64 %indvars.iv.next, %16
  br i1 %49, label %17, label %.critedge88, !llvm.loop !13

.critedge:                                        ; preds = %41, %29
  %50 = load i32, ptr %21, align 4, !tbaa !5
  %51 = add nsw i32 %.0102, 1
  %52 = getelementptr inbounds i32, ptr %0, i64 %16
  store i32 %50, ptr %52, align 4, !tbaa !5
  br label %.critedge88

.critedge88:                                      ; preds = %.critedge2, %.critedge
  %.18495.in = phi i64 [ %indvars.iv, %.critedge ], [ %indvars.iv.next, %.critedge2 ]
  %.1 = phi i32 [ %51, %.critedge ], [ %.0102, %.critedge2 ]
  %.18495 = trunc i64 %.18495.in to i32
  %53 = icmp slt i32 %.1, %.18495
  br i1 %53, label %.lr.ph.preheader, label %.critedge89

.lr.ph.preheader:                                 ; preds = %.critedge88
  %54 = sext i32 %.1 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.critedge6
  %indvars.iv113 = phi i64 [ %54, %.lr.ph.preheader ], [ %indvars.iv.next114, %.critedge6 ]
  %55 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %14) #4
  %56 = getelementptr inbounds i8, ptr %55, i64 4
  %57 = load float, ptr %56, align 4, !tbaa !9
  %58 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv113
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %60) #4
  %62 = getelementptr inbounds i8, ptr %61, i64 4
  %63 = load float, ptr %62, align 4, !tbaa !9
  %64 = fadd float %63, 0x3EE4F8B580000000
  %65 = fcmp ogt float %57, %64
  br i1 %65, label %.critedge6, label %66

66:                                               ; preds = %.lr.ph
  %67 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %14) #4
  %68 = getelementptr inbounds i8, ptr %67, i64 4
  %69 = load float, ptr %68, align 4, !tbaa !9
  %70 = load i32, ptr %58, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %71) #4
  %73 = getelementptr inbounds i8, ptr %72, i64 4
  %74 = load float, ptr %73, align 4, !tbaa !9
  %75 = fsub float %69, %74
  %76 = tail call float @llvm.fabs.f32(float %75)
  %77 = fcmp ugt float %76, 0x3EE4F8B580000000
  br i1 %77, label %.critedge4, label %78

78:                                               ; preds = %66
  %79 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %14) #4
  %80 = load float, ptr %79, align 4, !tbaa !12
  %81 = load i32, ptr %58, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN5Maths8TVector2IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %82) #4
  %84 = load float, ptr %83, align 4, !tbaa !12
  %85 = fcmp ult float %80, %84
  br i1 %85, label %.critedge4, label %.critedge6

.critedge6:                                       ; preds = %.lr.ph, %78
  %indvars.iv.next114 = add nsw i64 %indvars.iv113, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next114 to i32
  %exitcond.not = icmp eq i32 %lftr.wideiv, %.18495
  br i1 %exitcond.not, label %tailrecurse, label %.lr.ph, !llvm.loop !15

.critedge4:                                       ; preds = %78, %66
  %86 = trunc nsw i64 %indvars.iv113 to i32
  %87 = load i32, ptr %58, align 4, !tbaa !5
  %88 = add nsw i32 %.18495, -1
  %sext = shl i64 %.18495.in, 32
  %89 = ashr exact i64 %sext, 30
  %90 = getelementptr inbounds i8, ptr %0, i64 %89
  store i32 %87, ptr %90, align 4, !tbaa !5
  br label %.critedge89

.critedge89:                                      ; preds = %.critedge88, %.critedge4
  %.297 = phi i32 [ %86, %.critedge4 ], [ %.1, %.critedge88 ]
  %.285 = phi i32 [ %88, %.critedge4 ], [ %.18495, %.critedge88 ]
  %91 = icmp slt i32 %.297, %.285
  br i1 %91, label %.preheader, label %tailrecurse, !llvm.loop !16

tailrecurse:                                      ; preds = %.critedge89, %.critedge6
  %.297118 = phi i32 [ %.18495, %.critedge6 ], [ %.297, %.critedge89 ]
  %92 = sext i32 %.297118 to i64
  %93 = getelementptr inbounds i32, ptr %0, i64 %92
  store i32 %10, ptr %93, align 4, !tbaa !5
  %94 = add nsw i32 %.297118, -1
  tail call void @_ZN7Riemann20__convex_points_sortEPiiiiRKSt6vectorIN5Maths8TVector2IfEESaIS4_EE(ptr noundef %0, i32 noundef %.tr90103, i32 noundef %94, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4)
  %95 = add nsw i32 %.297118, 1
  %96 = icmp slt i32 %95, %2
  br i1 %96, label %.lr.ph104, label %tailrecurse._crit_edge

tailrecurse._crit_edge:                           ; preds = %tailrecurse, %5
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN5Maths9RandomIntEii(i32 noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #3

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 4}
!10 = !{!"_ZTSN5Maths8TVector2IfEE", !11, i64 0, !11, i64 4}
!11 = !{!"float", !7, i64 0}
!12 = !{!10, !11, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


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