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

; 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::clippedSegment_t" = type { i8, [2 x %class.Vector3] }
%"struct.geometry::types::plane_t" = type { %class.Vector3, %class.Vector3 }
%"struct.geometry::types::aabb_t" = type { %class.Vector3, %class.Vector3 }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector3plERKS_(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 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 noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) #2 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: 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
define dso_local void @_ZN8geometry7segment35clipSegmentAgainstAxisAlignedSquareERK7Vector3S3_RKNS_5types6aabb_tEi(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::clippedSegment_t") align 4 %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(24) %3, i32 noundef %4) #1 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %class.Vector3, align 4
  %14 = alloca %class.Vector3, align 4
  %15 = alloca float, align 4
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"struct.geometry::types::plane_t", align 4
  %22 = alloca %"struct.geometry::types::clippedSegment_t", align 4
  store ptr %0, ptr %6, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store i32 %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.geometry::types::aabb_t", ptr %23, i32 0, i32 1
  store ptr %24, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.geometry::types::aabb_t", ptr %25, i32 0, i32 0
  store ptr %26, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #5
  %27 = load ptr, ptr %11, align 8, !tbaa !5
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %14, ptr noundef nonnull align 4 dereferenceable(12) %27, ptr noundef nonnull align 4 dereferenceable(12) %28)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store float 2.000000e+00, ptr %15, align 4, !tbaa !11
  call void @_ZNK7Vector3dvERKf(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %13, ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %29 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %29, ptr %16, align 4, !tbaa !9
  call void @_ZN8geometry5types16clippedSegment_tC2Ev(ptr noundef nonnull align 4 dereferenceable(28) %0)
  %30 = getelementptr inbounds %"struct.geometry::types::clippedSegment_t", ptr %0, i32 0, i32 0
  store i8 1, ptr %30, align 4, !tbaa !13
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.geometry::types::clippedSegment_t", ptr %0, i32 0, i32 1
  %33 = getelementptr inbounds [2 x %class.Vector3], ptr %32, i64 0, i64 0
  %34 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %33, ptr noundef nonnull align 4 dereferenceable(12) %31)
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.geometry::types::clippedSegment_t", ptr %0, i32 0, i32 1
  %37 = getelementptr inbounds [2 x %class.Vector3], ptr %36, i64 0, i64 1
  %38 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %37, ptr noundef nonnull align 4 dereferenceable(12) %35)
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  store i8 0, ptr %17, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %98, %5
  %40 = load i32, ptr %18, align 4, !tbaa !9
  %41 = icmp slt i32 %40, 4
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  store i32 2, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %101

43:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %44 = load i32, ptr %18, align 4, !tbaa !9
  %45 = srem i32 %44, 2
  %46 = load i32, ptr %16, align 4, !tbaa !9
  %47 = add nsw i32 %45, %46
  %48 = srem i32 %47, 3
  store i32 %48, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #5
  call void @_ZN8geometry5types7plane_tC2Ev(ptr noundef nonnull align 4 dereferenceable(24) %21)
  %49 = load i32, ptr %18, align 4, !tbaa !9
  %50 = icmp slt i32 %49, 2
  %51 = zext i1 %50 to i64
  %52 = select i1 %50, float -1.000000e+00, float 1.000000e+00
  %53 = getelementptr inbounds %"struct.geometry::types::plane_t", ptr %21, i32 0, i32 1
  %54 = load i32, ptr %20, align 4, !tbaa !9
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %53, i32 noundef %54)
  store float %52, ptr %55, align 4, !tbaa !11
  %56 = getelementptr inbounds %"struct.geometry::types::plane_t", ptr %21, i32 0, i32 0
  %57 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %56, ptr noundef nonnull align 4 dereferenceable(12) %13)
  %58 = load i32, ptr %18, align 4, !tbaa !9
  %59 = icmp slt i32 %58, 2
  br i1 %59, label %60, label %65

60:                                               ; preds = %43
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = load i32, ptr %20, align 4, !tbaa !9
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %61, i32 noundef %62)
  %64 = load float, ptr %63, align 4, !tbaa !11
  br label %70

65:                                               ; preds = %43
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = load i32, ptr %20, align 4, !tbaa !9
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %66, i32 noundef %67)
  %69 = load float, ptr %68, align 4, !tbaa !11
  br label %70

70:                                               ; preds = %65, %60
  %71 = phi float [ %64, %60 ], [ %69, %65 ]
  %72 = getelementptr inbounds %"struct.geometry::types::plane_t", ptr %21, i32 0, i32 0
  %73 = load i32, ptr %20, align 4, !tbaa !9
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %72, i32 noundef %73)
  store float %71, ptr %74, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 28, ptr %22) #5
  %75 = getelementptr inbounds %"struct.geometry::types::clippedSegment_t", ptr %0, i32 0, i32 1
  %76 = getelementptr inbounds [2 x %class.Vector3], ptr %75, i64 0, i64 0
  %77 = getelementptr inbounds %"struct.geometry::types::clippedSegment_t", ptr %0, i32 0, i32 1
  %78 = getelementptr inbounds [2 x %class.Vector3], ptr %77, i64 0, i64 1
  call void @_ZN8geometry5plane11clipSegmentERK7Vector3S3_RKNS_5types7plane_tE(ptr dead_on_unwind writable sret(%"struct.geometry::types::clippedSegment_t") align 4 %22, ptr noundef nonnull align 4 dereferenceable(12) %76, ptr noundef nonnull align 4 dereferenceable(12) %78, ptr noundef nonnull align 4 dereferenceable(24) %21)
  %79 = getelementptr inbounds %"struct.geometry::types::clippedSegment_t", ptr %22, i32 0, i32 0
  %80 = load i8, ptr %79, align 4, !tbaa !13, !range !17, !noundef !18
  %81 = trunc i8 %80 to i1
  %82 = zext i1 %81 to i32
  %83 = load i8, ptr %17, align 1, !tbaa !16, !range !17, !noundef !18
  %84 = trunc i8 %83 to i1
  %85 = zext i1 %84 to i32
  %86 = or i32 %85, %82
  %87 = icmp ne i32 %86, 0
  %88 = zext i1 %87 to i8
  store i8 %88, ptr %17, align 1, !tbaa !16
  %89 = getelementptr inbounds %"struct.geometry::types::clippedSegment_t", ptr %22, i32 0, i32 0
  %90 = load i8, ptr %89, align 4, !tbaa !13, !range !17, !noundef !18
  %91 = trunc i8 %90 to i1
  br i1 %91, label %93, label %92

92:                                               ; preds = %70
  store i32 4, ptr %19, align 4
  br label %95

93:                                               ; preds = %70
  %94 = call noundef nonnull align 4 dereferenceable(28) ptr @_ZN8geometry5types16clippedSegment_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(28) %0, ptr noundef nonnull align 4 dereferenceable(28) %22)
  store i32 0, ptr %19, align 4
  br label %95

95:                                               ; preds = %93, %92
  call void @llvm.lifetime.end.p0(i64 28, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  %96 = load i32, ptr %19, align 4
  switch i32 %96, label %106 [
    i32 0, label %97
    i32 4, label %98
  ]

97:                                               ; preds = %95
  br label %98

98:                                               ; preds = %97, %95
  %99 = load i32, ptr %18, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %18, align 4, !tbaa !9
  br label %39, !llvm.loop !19

101:                                              ; preds = %42
  %102 = load i8, ptr %17, align 1, !tbaa !16, !range !17, !noundef !18
  %103 = trunc i8 %102 to i1
  %104 = getelementptr inbounds %"struct.geometry::types::clippedSegment_t", ptr %0, i32 0, i32 0
  %105 = zext i1 %103 to i8
  store i8 %105, ptr %104, align 4, !tbaa !13
  store i32 1, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  ret void

106:                                              ; preds = %95
  unreachable
}

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

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

declare void @_ZN8geometry5plane11clipSegmentERK7Vector3S3_RKNS_5types7plane_tE(ptr dead_on_unwind writable sret(%"struct.geometry::types::clippedSegment_t") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(24)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(28) ptr @_ZN8geometry5types16clippedSegment_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(28)) #3 align 2

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 = { "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, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN8geometry5types16clippedSegment_tE", !15, i64 0, !7, i64 4}
!15 = !{!"bool", !7, i64 0}
!16 = !{!15, !15, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; 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::clippedSegment_t" = type { i8, [2 x %class.Vector3] }
%"struct.geometry::types::plane_t" = type { %class.Vector3, %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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector3plERKS_(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 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 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 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 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
define dso_local void @_ZN8geometry7segment35clipSegmentAgainstAxisAlignedSquareERK7Vector3S3_RKNS_5types6aabb_tEi(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::clippedSegment_t") align 4 %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(24) %3, i32 noundef %4) local_unnamed_addr #1 {
  %6 = alloca %class.Vector3, align 4
  %7 = alloca %class.Vector3, align 4
  %8 = alloca float, align 4
  %9 = alloca %"struct.geometry::types::plane_t", align 4
  %10 = alloca %"struct.geometry::types::clippedSegment_t", align 4
  %11 = getelementptr inbounds i8, ptr %3, i64 12
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #5
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %7, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  store float 2.000000e+00, ptr %8, align 4, !tbaa !5
  call void @_ZNK7Vector3dvERKf(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %6, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #5
  call void @_ZN8geometry5types16clippedSegment_tC2Ev(ptr noundef nonnull align 4 dereferenceable(28) %0)
  store i8 1, ptr %0, align 4, !tbaa !9
  %12 = getelementptr inbounds i8, ptr %0, i64 4
  %13 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %1)
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  %15 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %2)
  %16 = getelementptr inbounds i8, ptr %9, i64 12
  %17 = srem i32 %4, 3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  call void @_ZN8geometry5types7plane_tC2Ev(ptr noundef nonnull align 4 dereferenceable(24) %9)
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %16, i32 noundef %17)
  store float -1.000000e+00, ptr %18, align 4, !tbaa !5
  %19 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %6)
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %3, i32 noundef %17)
  %.pre = load float, ptr %20, align 4, !tbaa !5
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %17)
  store float %.pre, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %10) #5
  call void @_ZN8geometry5plane11clipSegmentERK7Vector3S3_RKNS_5types7plane_tE(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::clippedSegment_t") align 4 %10, ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(24) %9)
  %22 = load i8, ptr %10, align 4, !tbaa !9, !range !12, !noundef !13
  %23 = trunc nuw i8 %22 to i1
  br i1 %23, label %24, label %26

24:                                               ; preds = %5
  %25 = call noundef nonnull align 4 dereferenceable(28) ptr @_ZN8geometry5types16clippedSegment_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(28) %0, ptr noundef nonnull align 4 dereferenceable(28) %10)
  br label %26

26:                                               ; preds = %5, %24
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  %27 = add nsw i32 %4, 1
  %28 = srem i32 %27, 3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  call void @_ZN8geometry5types7plane_tC2Ev(ptr noundef nonnull align 4 dereferenceable(24) %9)
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %16, i32 noundef %28)
  store float -1.000000e+00, ptr %29, align 4, !tbaa !5
  %30 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %6)
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %3, i32 noundef %28)
  %.pre23 = load float, ptr %31, align 4, !tbaa !5
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %28)
  store float %.pre23, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %10) #5
  call void @_ZN8geometry5plane11clipSegmentERK7Vector3S3_RKNS_5types7plane_tE(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::clippedSegment_t") align 4 %10, ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(24) %9)
  %33 = load i8, ptr %10, align 4, !tbaa !9, !range !12, !noundef !13
  %34 = trunc nuw i8 %33 to i1
  br i1 %34, label %35, label %37

35:                                               ; preds = %26
  %36 = call noundef nonnull align 4 dereferenceable(28) ptr @_ZN8geometry5types16clippedSegment_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(28) %0, ptr noundef nonnull align 4 dereferenceable(28) %10)
  br label %37

37:                                               ; preds = %35, %26
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  call void @_ZN8geometry5types7plane_tC2Ev(ptr noundef nonnull align 4 dereferenceable(24) %9)
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %16, i32 noundef %17)
  store float 1.000000e+00, ptr %38, align 4, !tbaa !5
  %39 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %6)
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %11, i32 noundef %17)
  %.pre24 = load float, ptr %40, align 4, !tbaa !5
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %17)
  store float %.pre24, ptr %41, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %10) #5
  call void @_ZN8geometry5plane11clipSegmentERK7Vector3S3_RKNS_5types7plane_tE(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::clippedSegment_t") align 4 %10, ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(24) %9)
  %42 = load i8, ptr %10, align 4, !tbaa !9, !range !12, !noundef !13
  %43 = trunc nuw i8 %42 to i1
  br i1 %43, label %44, label %46

44:                                               ; preds = %37
  %45 = call noundef nonnull align 4 dereferenceable(28) ptr @_ZN8geometry5types16clippedSegment_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(28) %0, ptr noundef nonnull align 4 dereferenceable(28) %10)
  br label %46

46:                                               ; preds = %44, %37
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  call void @_ZN8geometry5types7plane_tC2Ev(ptr noundef nonnull align 4 dereferenceable(24) %9)
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %16, i32 noundef %28)
  store float 1.000000e+00, ptr %47, align 4, !tbaa !5
  %48 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %6)
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %11, i32 noundef %28)
  %.pre25 = load float, ptr %49, align 4, !tbaa !5
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %28)
  store float %.pre25, ptr %50, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %10) #5
  call void @_ZN8geometry5plane11clipSegmentERK7Vector3S3_RKNS_5types7plane_tE(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::clippedSegment_t") align 4 %10, ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(24) %9)
  %51 = load i8, ptr %10, align 4, !tbaa !9, !range !12, !noundef !13
  %52 = trunc nuw i8 %51 to i1
  br i1 %52, label %53, label %55

53:                                               ; preds = %46
  %54 = call noundef nonnull align 4 dereferenceable(28) ptr @_ZN8geometry5types16clippedSegment_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(28) %0, ptr noundef nonnull align 4 dereferenceable(28) %10)
  br label %55

55:                                               ; preds = %53, %46
  %56 = or i8 %33, %22
  %57 = or i8 %42, %56
  %58 = or i8 %51, %57
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  store i8 %58, ptr %0, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  ret void
}

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

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

declare void @_ZN8geometry5plane11clipSegmentERK7Vector3S3_RKNS_5types7plane_tE(ptr dead_on_unwind writable sret(%"struct.geometry::types::clippedSegment_t") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(24)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(28) ptr @_ZN8geometry5types16clippedSegment_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(28)) local_unnamed_addr #3 align 2

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 = { "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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN8geometry5types16clippedSegment_tE", !11, i64 0, !7, i64 4}
!11 = !{!"bool", !7, i64 0}
!12 = !{i8 0, i8 2}
!13 = !{}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,SCCPPass,SROAPass,SimplifyCFGPass