; LLVM IR from jdeokkim/ferox :: src (geometry)

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

%struct.frVertices_ = type { [8 x %struct.frVector2_], i32 }
%struct.frVector2_ = type { float, float }
%struct.frShape_ = type { i32, %union.frShapeData_, %struct.frMaterial_, float }
%union.frShapeData_ = type { %struct.anon.0 }
%struct.anon.0 = type { %struct.frVertices_, %struct.frVertices_ }
%struct.frMaterial_ = type { float, float, float }

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @frSetPolygonVertices(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.frVertices_, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.frVector2_, align 4
  %10 = alloca %struct.frVector2_, align 4
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  %13 = alloca float, align 4
  %14 = alloca %struct.frVector2_, align 4
  %15 = alloca %struct.frVector2_, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = icmp eq ptr %16, null
  br i1 %17, label %26, label %18

18:                                               ; preds = %2
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = icmp eq ptr %19, null
  br i1 %20, label %26, label %21

21:                                               ; preds = %18
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.frVertices_, ptr %22, i32 0, i32 1
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = icmp sle i32 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %21, %18, %2
  br label %161

27:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 68, ptr %5) #6
  call void @llvm.memset.p0.i64(ptr align 4 %5, i8 0, i64 68, i1 false)
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  call void @frJarvisMarch(ptr noundef %28, ptr noundef %5)
  %29 = getelementptr inbounds %struct.frVertices_, ptr %5, i32 0, i32 1
  %30 = load i32, ptr %29, align 4, !tbaa !9
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.frShape_, ptr %31, i32 0, i32 1
  %33 = getelementptr inbounds %struct.anon.0, ptr %32, i32 0, i32 0
  %34 = getelementptr inbounds %struct.frVertices_, ptr %33, i32 0, i32 1
  store i32 %30, ptr %34, align 4, !tbaa !12
  %35 = getelementptr inbounds %struct.frVertices_, ptr %5, i32 0, i32 1
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.frShape_, ptr %37, i32 0, i32 1
  %39 = getelementptr inbounds %struct.anon.0, ptr %38, i32 0, i32 1
  %40 = getelementptr inbounds %struct.frVertices_, ptr %39, i32 0, i32 1
  store i32 %36, ptr %40, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !13
  br label %41

41:                                               ; preds = %59, %27
  %42 = load i32, ptr %6, align 4, !tbaa !13
  %43 = getelementptr inbounds %struct.frVertices_, ptr %5, i32 0, i32 1
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = icmp slt i32 %42, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %62

47:                                               ; preds = %41
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.frShape_, ptr %48, i32 0, i32 1
  %50 = getelementptr inbounds %struct.anon.0, ptr %49, i32 0, i32 0
  %51 = getelementptr inbounds %struct.frVertices_, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %6, align 4, !tbaa !13
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [8 x %struct.frVector2_], ptr %51, i64 0, i64 %53
  %55 = getelementptr inbounds %struct.frVertices_, ptr %5, i32 0, i32 0
  %56 = load i32, ptr %6, align 4, !tbaa !13
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [8 x %struct.frVector2_], ptr %55, i64 0, i64 %57
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %54, ptr align 4 %58, i64 8, i1 false), !tbaa.struct !14
  br label %59

59:                                               ; preds = %47
  %60 = load i32, ptr %6, align 4, !tbaa !13
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %6, align 4, !tbaa !13
  br label %41, !llvm.loop !17

62:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %63 = getelementptr inbounds %struct.frVertices_, ptr %5, i32 0, i32 1
  %64 = load i32, ptr %63, align 4, !tbaa !9
  %65 = sub nsw i32 %64, 1
  store i32 %65, ptr %7, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !13
  br label %66

66:                                               ; preds = %99, %62
  %67 = load i32, ptr %8, align 4, !tbaa !13
  %68 = getelementptr inbounds %struct.frVertices_, ptr %5, i32 0, i32 1
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = icmp slt i32 %67, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %103

72:                                               ; preds = %66
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.frShape_, ptr %73, i32 0, i32 1
  %75 = getelementptr inbounds %struct.anon.0, ptr %74, i32 0, i32 1
  %76 = getelementptr inbounds %struct.frVertices_, ptr %75, i32 0, i32 0
  %77 = load i32, ptr %8, align 4, !tbaa !13
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [8 x %struct.frVector2_], ptr %76, i64 0, i64 %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.frShape_, ptr %80, i32 0, i32 1
  %82 = getelementptr inbounds %struct.anon.0, ptr %81, i32 0, i32 0
  %83 = getelementptr inbounds %struct.frVertices_, ptr %82, i32 0, i32 0
  %84 = load i32, ptr %8, align 4, !tbaa !13
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [8 x %struct.frVector2_], ptr %83, i64 0, i64 %85
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.frShape_, ptr %87, i32 0, i32 1
  %89 = getelementptr inbounds %struct.anon.0, ptr %88, i32 0, i32 0
  %90 = getelementptr inbounds %struct.frVertices_, ptr %89, i32 0, i32 0
  %91 = load i32, ptr %7, align 4, !tbaa !13
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [8 x %struct.frVector2_], ptr %90, i64 0, i64 %92
  %94 = load <2 x float>, ptr %86, align 4
  %95 = load <2 x float>, ptr %93, align 4
  %96 = call <2 x float> @frVector2Subtract(<2 x float> %94, <2 x float> %95)
  store <2 x float> %96, ptr %10, align 4
  %97 = load <2 x float>, ptr %10, align 4
  %98 = call <2 x float> @frVector2LeftNormal(<2 x float> %97)
  store <2 x float> %98, ptr %9, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %79, ptr align 4 %9, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %99

99:                                               ; preds = %72
  %100 = load i32, ptr %8, align 4, !tbaa !13
  store i32 %100, ptr %7, align 4, !tbaa !13
  %101 = load i32, ptr %8, align 4, !tbaa !13
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %8, align 4, !tbaa !13
  br label %66, !llvm.loop !19

103:                                              ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store float 0.000000e+00, ptr %11, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !13
  br label %104

104:                                              ; preds = %152, %103
  %105 = load i32, ptr %12, align 4, !tbaa !13
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.frShape_, ptr %106, i32 0, i32 1
  %108 = getelementptr inbounds %struct.anon.0, ptr %107, i32 0, i32 0
  %109 = getelementptr inbounds %struct.frVertices_, ptr %108, i32 0, i32 1
  %110 = load i32, ptr %109, align 4, !tbaa !12
  %111 = sub nsw i32 %110, 1
  %112 = icmp slt i32 %105, %111
  br i1 %112, label %114, label %113

113:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %155

114:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.frShape_, ptr %115, i32 0, i32 1
  %117 = getelementptr inbounds %struct.anon.0, ptr %116, i32 0, i32 0
  %118 = getelementptr inbounds %struct.frVertices_, ptr %117, i32 0, i32 0
  %119 = load i32, ptr %12, align 4, !tbaa !13
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [8 x %struct.frVector2_], ptr %118, i64 0, i64 %120
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.frShape_, ptr %122, i32 0, i32 1
  %124 = getelementptr inbounds %struct.anon.0, ptr %123, i32 0, i32 0
  %125 = getelementptr inbounds %struct.frVertices_, ptr %124, i32 0, i32 0
  %126 = getelementptr inbounds [8 x %struct.frVector2_], ptr %125, i64 0, i64 0
  %127 = load <2 x float>, ptr %121, align 4
  %128 = load <2 x float>, ptr %126, align 4
  %129 = call <2 x float> @frVector2Subtract(<2 x float> %127, <2 x float> %128)
  store <2 x float> %129, ptr %14, align 4
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.frShape_, ptr %130, i32 0, i32 1
  %132 = getelementptr inbounds %struct.anon.0, ptr %131, i32 0, i32 0
  %133 = getelementptr inbounds %struct.frVertices_, ptr %132, i32 0, i32 0
  %134 = load i32, ptr %12, align 4, !tbaa !13
  %135 = add nsw i32 %134, 1
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [8 x %struct.frVector2_], ptr %133, i64 0, i64 %136
  %138 = load ptr, ptr %3, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.frShape_, ptr %138, i32 0, i32 1
  %140 = getelementptr inbounds %struct.anon.0, ptr %139, i32 0, i32 0
  %141 = getelementptr inbounds %struct.frVertices_, ptr %140, i32 0, i32 0
  %142 = getelementptr inbounds [8 x %struct.frVector2_], ptr %141, i64 0, i64 0
  %143 = load <2 x float>, ptr %137, align 4
  %144 = load <2 x float>, ptr %142, align 4
  %145 = call <2 x float> @frVector2Subtract(<2 x float> %143, <2 x float> %144)
  store <2 x float> %145, ptr %15, align 4
  %146 = load <2 x float>, ptr %14, align 4
  %147 = load <2 x float>, ptr %15, align 4
  %148 = call float @frVector2Cross(<2 x float> %146, <2 x float> %147)
  store float %148, ptr %13, align 4, !tbaa !15
  %149 = load float, ptr %13, align 4, !tbaa !15
  %150 = load float, ptr %11, align 4, !tbaa !15
  %151 = fadd float %150, %149
  store float %151, ptr %11, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %152

152:                                              ; preds = %114
  %153 = load i32, ptr %12, align 4, !tbaa !13
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %12, align 4, !tbaa !13
  br label %104, !llvm.loop !20

155:                                              ; preds = %113
  %156 = load float, ptr %11, align 4, !tbaa !15
  %157 = fmul float 5.000000e-01, %156
  %158 = call float @llvm.fabs.f32(float %157)
  %159 = load ptr, ptr %3, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.frShape_, ptr %159, i32 0, i32 3
  store float %158, ptr %160, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 68, ptr %5) #6
  br label %161

161:                                              ; preds = %155, %26
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: alwaysinline nounwind uwtable
declare float @frVector2Cross(<2 x float>, <2 x float>) #4

; Function Attrs: nounwind uwtable
declare hidden void @frJarvisMarch(ptr noundef, ptr noundef) #2

; Function Attrs: alwaysinline nounwind uwtable
declare <2 x float> @frVector2LeftNormal(<2 x float>) #4

; Function Attrs: alwaysinline nounwind uwtable
declare <2 x float> @frVector2Subtract(<2 x float>, <2 x float>) #4

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

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="64" "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { alwaysinline nounwind uwtable "min-legal-vector-width"="64" "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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/C++ TBAA"}
!9 = !{!10, !11, i64 64}
!10 = !{!"frVertices_", !7, i64 0, !11, i64 64}
!11 = !{!"int", !7, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{i64 0, i64 4, !15, i64 4, i64 4, !15}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}
!21 = !{!22, !16, i64 152}
!22 = !{!"frShape_", !11, i64 0, !7, i64 4, !23, i64 140, !16, i64 152}
!23 = !{!"frMaterial_", !16, i64 0, !16, i64 4, !16, i64 8}


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

%struct.frVertices_ = type { [8 x %struct.frVector2_], i32 }
%struct.frVector2_ = type { float, float }

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @frSetPolygonVertices(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca %struct.frVertices_, align 4
  %4 = icmp eq ptr %0, null
  %5 = icmp eq ptr %1, null
  %or.cond = or i1 %4, %5
  br i1 %or.cond, label %51, label %6

6:                                                ; preds = %2
  %7 = getelementptr inbounds i8, ptr %1, i64 64
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %9 = icmp slt i32 %8, 1
  br i1 %9, label %51, label %10

10:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 68, ptr nonnull %3) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(68) %3, i8 0, i64 68, i1 false)
  call void @frJarvisMarch(ptr noundef nonnull %1, ptr noundef nonnull %3)
  %11 = getelementptr inbounds i8, ptr %3, i64 64
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %13 = getelementptr i8, ptr %0, i64 4
  %14 = getelementptr inbounds i8, ptr %0, i64 68
  store i32 %12, ptr %14, align 4, !tbaa !10
  %15 = getelementptr inbounds i8, ptr %0, i64 72
  %16 = getelementptr inbounds i8, ptr %0, i64 136
  store i32 %12, ptr %16, align 4, !tbaa !10
  %17 = icmp sgt i32 %12, 0
  br i1 %17, label %.lr.ph47.preheader, label %._crit_edge51

.lr.ph47.preheader:                               ; preds = %10
  %18 = zext nneg i32 %12 to i64
  %19 = shl nuw nsw i64 %18, 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr nonnull align 4 %3, i64 %19, i1 false)
  %20 = add nsw i32 %12, -1
  br label %.lr.ph47

.preheader:                                       ; preds = %.lr.ph47
  %.pr = load i32, ptr %14, align 4, !tbaa !10
  %21 = icmp sgt i32 %.pr, 1
  br i1 %21, label %.lr.ph50, label %._crit_edge51

.lr.ph47:                                         ; preds = %.lr.ph47.preheader, %.lr.ph47
  %indvars.iv = phi i64 [ 0, %.lr.ph47.preheader ], [ %indvars.iv.next, %.lr.ph47 ]
  %.03645 = phi i32 [ %20, %.lr.ph47.preheader ], [ %33, %.lr.ph47 ]
  %22 = getelementptr inbounds [8 x %struct.frVector2_], ptr %15, i64 0, i64 %indvars.iv
  %23 = getelementptr inbounds [8 x %struct.frVector2_], ptr %13, i64 0, i64 %indvars.iv
  %24 = sext i32 %.03645 to i64
  %25 = getelementptr inbounds [8 x %struct.frVector2_], ptr %13, i64 0, i64 %24
  %26 = load <2 x float>, ptr %23, align 4
  %27 = load <2 x float>, ptr %25, align 4
  %28 = call <2 x float> @frVector2Subtract(<2 x float> %26, <2 x float> %27)
  %29 = call <2 x float> @frVector2LeftNormal(<2 x float> %28)
  store <2 x float> %29, ptr %22, align 4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %30 = load i32, ptr %11, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = icmp slt i64 %indvars.iv.next, %31
  %33 = trunc nuw nsw i64 %indvars.iv to i32
  br i1 %32, label %.lr.ph47, label %.preheader, !llvm.loop !11

._crit_edge51.loopexit:                           ; preds = %.lr.ph50
  %34 = fmul float %46, 5.000000e-01
  br label %._crit_edge51

._crit_edge51:                                    ; preds = %10, %._crit_edge51.loopexit, %.preheader
  %.039.lcssa = phi float [ 0.000000e+00, %.preheader ], [ %34, %._crit_edge51.loopexit ], [ 0.000000e+00, %10 ]
  %35 = call float @llvm.fabs.f32(float %.039.lcssa)
  %36 = getelementptr inbounds i8, ptr %0, i64 152
  store float %35, ptr %36, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 68, ptr nonnull %3) #6
  br label %51

.lr.ph50:                                         ; preds = %.preheader, %.lr.ph50
  %indvars.iv54 = phi i64 [ %indvars.iv.next55, %.lr.ph50 ], [ 0, %.preheader ]
  %.03948 = phi float [ %46, %.lr.ph50 ], [ 0.000000e+00, %.preheader ]
  %37 = getelementptr inbounds [8 x %struct.frVector2_], ptr %13, i64 0, i64 %indvars.iv54
  %38 = load <2 x float>, ptr %37, align 4
  %39 = load <2 x float>, ptr %13, align 4
  %40 = call <2 x float> @frVector2Subtract(<2 x float> %38, <2 x float> %39)
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %41 = getelementptr inbounds [8 x %struct.frVector2_], ptr %13, i64 0, i64 %indvars.iv.next55
  %42 = load <2 x float>, ptr %41, align 4
  %43 = load <2 x float>, ptr %13, align 4
  %44 = call <2 x float> @frVector2Subtract(<2 x float> %42, <2 x float> %43)
  %45 = call float @frVector2Cross(<2 x float> %40, <2 x float> %44)
  %46 = fadd float %.03948, %45
  %47 = load i32, ptr %14, align 4, !tbaa !10
  %48 = add nsw i32 %47, -1
  %49 = sext i32 %48 to i64
  %50 = icmp slt i64 %indvars.iv.next55, %49
  br i1 %50, label %.lr.ph50, label %._crit_edge51.loopexit, !llvm.loop !17

51:                                               ; preds = %2, %6, %._crit_edge51
  ret void
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: alwaysinline nounwind uwtable
declare float @frVector2Cross(<2 x float>, <2 x float>) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden void @frJarvisMarch(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: alwaysinline nounwind uwtable
declare <2 x float> @frVector2LeftNormal(<2 x float>) local_unnamed_addr #4

; Function Attrs: alwaysinline nounwind uwtable
declare <2 x float> @frVector2Subtract(<2 x float>, <2 x float>) local_unnamed_addr #4

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

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="64" "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 nounwind willreturn memory(argmem: write) }
attributes #4 = { alwaysinline nounwind uwtable "min-legal-vector-width"="64" "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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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, !9, i64 64}
!6 = !{!"frVertices_", !7, i64 0, !9, i64 64}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!7, !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !16, i64 152}
!14 = !{!"frShape_", !9, i64 0, !7, i64 4, !15, i64 140, !16, i64 152}
!15 = !{!"frMaterial_", !16, i64 0, !16, i64 4, !16, i64 8}
!16 = !{!"float", !7, i64 0}
!17 = distinct !{!17, !12}


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