; LLVM IR from kroitor/gjk.c :: gjk (gjk)

; 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._vec2 = type { float, float }

@iter_count = external dso_local global i32, align 4

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @subtract(<2 x float>, <2 x float>) #0

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

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @negate(<2 x float>) #0

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @perpendicular(<2 x float>) #0

; Function Attrs: nounwind uwtable
declare dso_local float @dotProduct(<2 x float>, <2 x float>) #0

; Function Attrs: nounwind uwtable
declare dso_local float @lengthSquared(<2 x float>) #0

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @tripleProduct(<2 x float>, <2 x float>, <2 x float>) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @averagePoint(ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @support(ptr noundef, i64 noundef, ptr noundef, i64 noundef, <2 x float>) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @gjk(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca %struct._vec2, align 4
  %12 = alloca %struct._vec2, align 4
  %13 = alloca %struct._vec2, align 4
  %14 = alloca %struct._vec2, align 4
  %15 = alloca %struct._vec2, align 4
  %16 = alloca %struct._vec2, align 4
  %17 = alloca %struct._vec2, align 4
  %18 = alloca %struct._vec2, align 4
  %19 = alloca %struct._vec2, align 4
  %20 = alloca [3 x %struct._vec2], align 16
  %21 = alloca %struct._vec2, align 4
  %22 = alloca %struct._vec2, align 4
  %23 = alloca %struct._vec2, align 4
  %24 = alloca %struct._vec2, align 4
  %25 = alloca i32, align 4
  %26 = alloca %struct._vec2, align 4
  %27 = alloca %struct._vec2, align 4
  %28 = alloca %struct._vec2, align 4
  %29 = alloca %struct._vec2, align 4
  %30 = alloca %struct._vec2, align 4
  %31 = alloca %struct._vec2, align 4
  %32 = alloca %struct._vec2, align 4
  %33 = alloca %struct._vec2, align 4
  %34 = alloca %struct._vec2, align 4
  %35 = alloca %struct._vec2, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i64 %3, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  store i64 0, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = load i64, ptr %7, align 8, !tbaa !9
  %38 = call <2 x float> @averagePoint(ptr noundef %36, i64 noundef %37)
  store <2 x float> %38, ptr %21, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = load i64, ptr %9, align 8, !tbaa !9
  %41 = call <2 x float> @averagePoint(ptr noundef %39, i64 noundef %40)
  store <2 x float> %41, ptr %22, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %42 = load <2 x float>, ptr %21, align 4
  %43 = load <2 x float>, ptr %22, align 4
  %44 = call <2 x float> @subtract(<2 x float> %42, <2 x float> %43)
  store <2 x float> %44, ptr %23, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %23, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  %45 = getelementptr inbounds %struct._vec2, ptr %14, i32 0, i32 0
  %46 = load float, ptr %45, align 4, !tbaa !14
  %47 = fcmp oeq float %46, 0.000000e+00
  br i1 %47, label %48, label %54

48:                                               ; preds = %4
  %49 = getelementptr inbounds %struct._vec2, ptr %14, i32 0, i32 1
  %50 = load float, ptr %49, align 4, !tbaa !16
  %51 = fcmp oeq float %50, 0.000000e+00
  br i1 %51, label %52, label %54

52:                                               ; preds = %48
  %53 = getelementptr inbounds %struct._vec2, ptr %14, i32 0, i32 0
  store float 1.000000e+00, ptr %53, align 4, !tbaa !14
  br label %54

54:                                               ; preds = %52, %48, %4
  %55 = getelementptr inbounds [3 x %struct._vec2], ptr %20, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = load i64, ptr %7, align 8, !tbaa !9
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = load i64, ptr %9, align 8, !tbaa !9
  %60 = load <2 x float>, ptr %14, align 4
  %61 = call <2 x float> @support(ptr noundef %56, i64 noundef %57, ptr noundef %58, i64 noundef %59, <2 x float> %60)
  store <2 x float> %61, ptr %24, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %55, ptr align 4 %24, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 16 %55, i64 8, i1 false), !tbaa.struct !11
  %62 = load <2 x float>, ptr %11, align 4
  %63 = load <2 x float>, ptr %14, align 4
  %64 = call float @dotProduct(<2 x float> %62, <2 x float> %63)
  %65 = fcmp ole float %64, 0.000000e+00
  br i1 %65, label %66, label %67

66:                                               ; preds = %54
  store i32 0, ptr %5, align 4
  store i32 1, ptr %25, align 4
  br label %145

67:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  %68 = load <2 x float>, ptr %11, align 4
  %69 = call <2 x float> @negate(<2 x float> %68)
  store <2 x float> %69, ptr %26, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %26, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  br label %70

70:                                               ; preds = %140, %108, %67
  br label %71

71:                                               ; preds = %70
  %72 = load i32, ptr @iter_count, align 4, !tbaa !17
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr @iter_count, align 4, !tbaa !17
  %74 = load i64, ptr %10, align 8, !tbaa !9
  %75 = add i64 %74, 1
  store i64 %75, ptr %10, align 8, !tbaa !9
  %76 = getelementptr inbounds [3 x %struct._vec2], ptr %20, i64 0, i64 %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = load i64, ptr %7, align 8, !tbaa !9
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = load i64, ptr %9, align 8, !tbaa !9
  %81 = load <2 x float>, ptr %14, align 4
  %82 = call <2 x float> @support(ptr noundef %77, i64 noundef %78, ptr noundef %79, i64 noundef %80, <2 x float> %81)
  store <2 x float> %82, ptr %27, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %76, ptr align 4 %27, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 8 %76, i64 8, i1 false), !tbaa.struct !11
  %83 = load <2 x float>, ptr %11, align 4
  %84 = load <2 x float>, ptr %14, align 4
  %85 = call float @dotProduct(<2 x float> %83, <2 x float> %84)
  %86 = fcmp ole float %85, 0.000000e+00
  br i1 %86, label %87, label %88

87:                                               ; preds = %71
  store i32 0, ptr %5, align 4
  store i32 1, ptr %25, align 4
  br label %145

88:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  %89 = load <2 x float>, ptr %11, align 4
  %90 = call <2 x float> @negate(<2 x float> %89)
  store <2 x float> %90, ptr %28, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %28, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  %91 = load i64, ptr %10, align 8, !tbaa !9
  %92 = icmp ult i64 %91, 2
  br i1 %92, label %93, label %109

93:                                               ; preds = %88
  %94 = getelementptr inbounds [3 x %struct._vec2], ptr %20, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 16 %94, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #3
  %95 = load <2 x float>, ptr %12, align 4
  %96 = load <2 x float>, ptr %11, align 4
  %97 = call <2 x float> @subtract(<2 x float> %95, <2 x float> %96)
  store <2 x float> %97, ptr %29, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %29, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  %98 = load <2 x float>, ptr %16, align 4
  %99 = load <2 x float>, ptr %15, align 4
  %100 = load <2 x float>, ptr %16, align 4
  %101 = call <2 x float> @tripleProduct(<2 x float> %98, <2 x float> %99, <2 x float> %100)
  store <2 x float> %101, ptr %30, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %30, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  %102 = load <2 x float>, ptr %14, align 4
  %103 = call float @lengthSquared(<2 x float> %102)
  %104 = fcmp oeq float %103, 0.000000e+00
  br i1 %104, label %105, label %108

105:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #3
  %106 = load <2 x float>, ptr %16, align 4
  %107 = call <2 x float> @perpendicular(<2 x float> %106)
  store <2 x float> %107, ptr %31, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %31, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  br label %108

108:                                              ; preds = %105, %93
  br label %70

109:                                              ; preds = %88
  %110 = getelementptr inbounds [3 x %struct._vec2], ptr %20, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 8 %110, i64 8, i1 false), !tbaa.struct !11
  %111 = getelementptr inbounds [3 x %struct._vec2], ptr %20, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 16 %111, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #3
  %112 = load <2 x float>, ptr %12, align 4
  %113 = load <2 x float>, ptr %11, align 4
  %114 = call <2 x float> @subtract(<2 x float> %112, <2 x float> %113)
  store <2 x float> %114, ptr %32, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %32, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #3
  %115 = load <2 x float>, ptr %13, align 4
  %116 = load <2 x float>, ptr %11, align 4
  %117 = call <2 x float> @subtract(<2 x float> %115, <2 x float> %116)
  store <2 x float> %117, ptr %33, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %33, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #3
  %118 = load <2 x float>, ptr %16, align 4
  %119 = load <2 x float>, ptr %17, align 4
  %120 = load <2 x float>, ptr %17, align 4
  %121 = call <2 x float> @tripleProduct(<2 x float> %118, <2 x float> %119, <2 x float> %120)
  store <2 x float> %121, ptr %34, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %34, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #3
  %122 = load <2 x float>, ptr %19, align 4
  %123 = load <2 x float>, ptr %15, align 4
  %124 = call float @dotProduct(<2 x float> %122, <2 x float> %123)
  %125 = fcmp oge float %124, 0.000000e+00
  br i1 %125, label %126, label %127

126:                                              ; preds = %109
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %19, i64 8, i1 false), !tbaa.struct !11
  br label %140

127:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #3
  %128 = load <2 x float>, ptr %17, align 4
  %129 = load <2 x float>, ptr %16, align 4
  %130 = load <2 x float>, ptr %16, align 4
  %131 = call <2 x float> @tripleProduct(<2 x float> %128, <2 x float> %129, <2 x float> %130)
  store <2 x float> %131, ptr %35, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %35, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #3
  %132 = load <2 x float>, ptr %18, align 4
  %133 = load <2 x float>, ptr %15, align 4
  %134 = call float @dotProduct(<2 x float> %132, <2 x float> %133)
  %135 = fcmp olt float %134, 0.000000e+00
  br i1 %135, label %136, label %137

136:                                              ; preds = %127
  store i32 1, ptr %5, align 4
  store i32 1, ptr %25, align 4
  br label %145

137:                                              ; preds = %127
  %138 = getelementptr inbounds [3 x %struct._vec2], ptr %20, i64 0, i64 0
  %139 = getelementptr inbounds [3 x %struct._vec2], ptr %20, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %138, ptr align 8 %139, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !11
  br label %140

140:                                              ; preds = %137, %126
  %141 = getelementptr inbounds [3 x %struct._vec2], ptr %20, i64 0, i64 1
  %142 = getelementptr inbounds [3 x %struct._vec2], ptr %20, i64 0, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %141, ptr align 16 %142, i64 8, i1 false), !tbaa.struct !11
  %143 = load i64, ptr %10, align 8, !tbaa !9
  %144 = add i64 %143, -1
  store i64 %144, ptr %10, align 8, !tbaa !9
  br label %70

145:                                              ; preds = %136, %87, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %146 = load i32, ptr %5, align 4
  ret i32 %146
}

attributes #0 = { 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 #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{i64 0, i64 4, !12, i64 4, i64 4, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !13, i64 0}
!15 = !{!"_vec2", !13, i64 0, !13, i64 4}
!16 = !{!15, !13, i64 4}
!17 = !{!18, !18, i64 0}
!18 = !{!"int", !7, i64 0}


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

@iter_count = external dso_local local_unnamed_addr global i32, align 4

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @subtract(<2 x float>, <2 x float>) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @negate(<2 x float>) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @perpendicular(<2 x float>) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local float @dotProduct(<2 x float>, <2 x float>) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local float @lengthSquared(<2 x float>) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @tripleProduct(<2 x float>, <2 x float>, <2 x float>) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @averagePoint(ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @support(ptr noundef, i64 noundef, ptr noundef, i64 noundef, <2 x float>) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @gjk(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3) local_unnamed_addr #0 {
  %5 = tail call <2 x float> @averagePoint(ptr noundef %0, i64 noundef %1)
  %6 = tail call <2 x float> @averagePoint(ptr noundef %2, i64 noundef %3)
  %7 = tail call <2 x float> @subtract(<2 x float> %5, <2 x float> %6)
  %.sroa.030.0.vec.extract = extractelement <2 x float> %7, i64 0
  %8 = fcmp oeq float %.sroa.030.0.vec.extract, 0.000000e+00
  %.sroa.030.4.vec.extract = extractelement <2 x float> %7, i64 1
  %9 = fcmp oeq float %.sroa.030.4.vec.extract, 0.000000e+00
  %or.cond = select i1 %8, i1 %9, i1 false
  %.sroa.030.0.vec.insert = insertelement <2 x float> %7, float 1.000000e+00, i64 0
  %.sroa.030.0 = select i1 %or.cond, <2 x float> %.sroa.030.0.vec.insert, <2 x float> %7
  %10 = tail call <2 x float> @support(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, <2 x float> %.sroa.030.0)
  %11 = tail call float @dotProduct(<2 x float> %10, <2 x float> %.sroa.030.0)
  %12 = fcmp ugt float %11, 0.000000e+00
  br i1 %12, label %.outer, label %.loopexit

.outer:                                           ; preds = %4
  %13 = tail call <2 x float> @negate(<2 x float> %10)
  %14 = load i32, ptr @iter_count, align 4, !tbaa !5
  %15 = add nsw i32 %14, 1
  store i32 %15, ptr @iter_count, align 4, !tbaa !5
  %16 = tail call <2 x float> @support(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, <2 x float> %13)
  %17 = tail call float @dotProduct(<2 x float> %16, <2 x float> %13)
  %18 = fcmp ugt float %17, 0.000000e+00
  br i1 %18, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.outer
  %19 = tail call <2 x float> @negate(<2 x float> %16)
  %20 = tail call <2 x float> @subtract(<2 x float> %10, <2 x float> %16)
  %21 = tail call <2 x float> @tripleProduct(<2 x float> %20, <2 x float> %19, <2 x float> %20)
  %22 = tail call float @lengthSquared(<2 x float> %21)
  %23 = fcmp oeq float %22, 0.000000e+00
  br i1 %23, label %30, label %.outer.1

.lr.ph.split:                                     ; preds = %.outer.1, %41
  %.sroa.10.0 = phi <2 x float> [ %44, %41 ], [ %34, %.outer.1 ]
  %.sroa.6.0 = phi <2 x float> [ %.sroa.10.0, %41 ], [ %16, %.outer.1 ]
  %.sroa.0.0 = phi <2 x float> [ %.sroa.0.1, %41 ], [ %10, %.outer.1 ]
  %24 = tail call <2 x float> @negate(<2 x float> %.sroa.10.0)
  %25 = tail call <2 x float> @subtract(<2 x float> %.sroa.6.0, <2 x float> %.sroa.10.0)
  %26 = tail call <2 x float> @subtract(<2 x float> %.sroa.0.0, <2 x float> %.sroa.10.0)
  %27 = tail call <2 x float> @tripleProduct(<2 x float> %25, <2 x float> %26, <2 x float> %26)
  %28 = tail call float @dotProduct(<2 x float> %27, <2 x float> %24)
  %29 = fcmp ult float %28, 0.000000e+00
  br i1 %29, label %37, label %41

30:                                               ; preds = %.lr.ph
  %31 = tail call <2 x float> @perpendicular(<2 x float> %20)
  br label %.outer.1

.outer.1:                                         ; preds = %30, %.lr.ph
  %.sroa.030.2 = phi <2 x float> [ %31, %30 ], [ %21, %.lr.ph ]
  %32 = load i32, ptr @iter_count, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr @iter_count, align 4, !tbaa !5
  %34 = tail call <2 x float> @support(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, <2 x float> %.sroa.030.2)
  %35 = tail call float @dotProduct(<2 x float> %34, <2 x float> %.sroa.030.2)
  %36 = fcmp ugt float %35, 0.000000e+00
  br i1 %36, label %.lr.ph.split, label %.loopexit

37:                                               ; preds = %.lr.ph.split
  %38 = tail call <2 x float> @tripleProduct(<2 x float> %26, <2 x float> %25, <2 x float> %25)
  %39 = tail call float @dotProduct(<2 x float> %38, <2 x float> %24)
  %40 = fcmp olt float %39, 0.000000e+00
  br i1 %40, label %.loopexit, label %41

41:                                               ; preds = %37, %.lr.ph.split
  %.sroa.0.1 = phi <2 x float> [ %.sroa.0.0, %.lr.ph.split ], [ %.sroa.6.0, %37 ]
  %.sroa.030.3 = phi <2 x float> [ %27, %.lr.ph.split ], [ %38, %37 ]
  %42 = load i32, ptr @iter_count, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr @iter_count, align 4, !tbaa !5
  %44 = tail call <2 x float> @support(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, <2 x float> %.sroa.030.3)
  %45 = tail call float @dotProduct(<2 x float> %44, <2 x float> %.sroa.030.3)
  %46 = fcmp ugt float %45, 0.000000e+00
  br i1 %46, label %.lr.ph.split, label %.loopexit

.loopexit:                                        ; preds = %41, %37, %.outer, %.outer.1, %4
  %.0 = phi i32 [ 0, %4 ], [ 0, %.outer.1 ], [ 0, %.outer ], [ 0, %41 ], [ 1, %37 ]
  ret i32 %.0
}

attributes #0 = { 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" }

!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/C++ TBAA"}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass