; LLVM IR from SourangshuGhosh/Fluid-Simulation-for-Computer-Graphics :: src/collision.ll (ZN9Collision17getTriangleNormalEN5vmath4vec3ES1_S1_)

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

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

declare void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

declare void @_ZN5vmathmiERKNS_4vec3ES2_(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5vmath5crossERKNS_4vec3ES2_(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4fabsf(float noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9Collision17getTriangleNormalEN5vmath4vec3ES1_S1_(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4 %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #5 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.vmath::vec3", align 4
  %10 = alloca %"class.vmath::vec3", align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.vmath::vec3", align 4
  %14 = alloca double, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.vmath::vec3", align 4
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #6
  call void @_ZN5vmathmiERKNS_4vec3ES2_(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %9, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %1)
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #6
  invoke void @_ZN5vmathmiERKNS_4vec3ES2_(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %10, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %1)
          to label %17 unwind label %44

17:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #6
  invoke void @_ZN5vmathmiERKNS_4vec3ES2_(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %13, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %2)
          to label %18 unwind label %48

18:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store double 1.000000e-09, ptr %14, align 8, !tbaa !9
  %19 = getelementptr inbounds %"class.vmath::vec3", ptr %9, i32 0, i32 0
  %20 = load float, ptr %19, align 4, !tbaa !11
  %21 = invoke noundef float @_ZSt4fabsf(float noundef %20)
          to label %22 unwind label %52

22:                                               ; preds = %18
  %23 = fpext float %21 to double
  %24 = load double, ptr %14, align 8, !tbaa !9
  %25 = fcmp olt double %23, %24
  br i1 %25, label %26, label %56

26:                                               ; preds = %22
  %27 = getelementptr inbounds %"class.vmath::vec3", ptr %9, i32 0, i32 1
  %28 = load float, ptr %27, align 4, !tbaa !14
  %29 = invoke noundef float @_ZSt4fabsf(float noundef %28)
          to label %30 unwind label %52

30:                                               ; preds = %26
  %31 = fpext float %29 to double
  %32 = load double, ptr %14, align 8, !tbaa !9
  %33 = fcmp olt double %31, %32
  br i1 %33, label %34, label %56

34:                                               ; preds = %30
  %35 = getelementptr inbounds %"class.vmath::vec3", ptr %9, i32 0, i32 2
  %36 = load float, ptr %35, align 4, !tbaa !15
  %37 = invoke noundef float @_ZSt4fabsf(float noundef %36)
          to label %38 unwind label %52

38:                                               ; preds = %34
  %39 = fpext float %37 to double
  %40 = load double, ptr %14, align 8, !tbaa !9
  %41 = fcmp olt double %39, %40
  br i1 %41, label %42, label %56

42:                                               ; preds = %38
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %0)
          to label %43 unwind label %52

43:                                               ; preds = %42
  store i32 1, ptr %15, align 4
  br label %120

44:                                               ; preds = %4
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %11, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %12, align 4
  br label %123

48:                                               ; preds = %17
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %11, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %12, align 4
  br label %122

52:                                               ; preds = %106, %98, %90, %82, %80, %72, %64, %56, %42, %34, %26, %18
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %11, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %12, align 4
  br label %121

56:                                               ; preds = %38, %30, %22
  %57 = getelementptr inbounds %"class.vmath::vec3", ptr %10, i32 0, i32 0
  %58 = load float, ptr %57, align 4, !tbaa !11
  %59 = invoke noundef float @_ZSt4fabsf(float noundef %58)
          to label %60 unwind label %52

60:                                               ; preds = %56
  %61 = fpext float %59 to double
  %62 = load double, ptr %14, align 8, !tbaa !9
  %63 = fcmp olt double %61, %62
  br i1 %63, label %64, label %82

64:                                               ; preds = %60
  %65 = getelementptr inbounds %"class.vmath::vec3", ptr %10, i32 0, i32 1
  %66 = load float, ptr %65, align 4, !tbaa !14
  %67 = invoke noundef float @_ZSt4fabsf(float noundef %66)
          to label %68 unwind label %52

68:                                               ; preds = %64
  %69 = fpext float %67 to double
  %70 = load double, ptr %14, align 8, !tbaa !9
  %71 = fcmp olt double %69, %70
  br i1 %71, label %72, label %82

72:                                               ; preds = %68
  %73 = getelementptr inbounds %"class.vmath::vec3", ptr %10, i32 0, i32 2
  %74 = load float, ptr %73, align 4, !tbaa !15
  %75 = invoke noundef float @_ZSt4fabsf(float noundef %74)
          to label %76 unwind label %52

76:                                               ; preds = %72
  %77 = fpext float %75 to double
  %78 = load double, ptr %14, align 8, !tbaa !9
  %79 = fcmp olt double %77, %78
  br i1 %79, label %80, label %82

80:                                               ; preds = %76
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %0)
          to label %81 unwind label %52

81:                                               ; preds = %80
  store i32 1, ptr %15, align 4
  br label %120

82:                                               ; preds = %76, %68, %60
  %83 = getelementptr inbounds %"class.vmath::vec3", ptr %13, i32 0, i32 0
  %84 = load float, ptr %83, align 4, !tbaa !11
  %85 = invoke noundef float @_ZSt4fabsf(float noundef %84)
          to label %86 unwind label %52

86:                                               ; preds = %82
  %87 = fpext float %85 to double
  %88 = load double, ptr %14, align 8, !tbaa !9
  %89 = fcmp olt double %87, %88
  br i1 %89, label %90, label %108

90:                                               ; preds = %86
  %91 = getelementptr inbounds %"class.vmath::vec3", ptr %13, i32 0, i32 1
  %92 = load float, ptr %91, align 4, !tbaa !14
  %93 = invoke noundef float @_ZSt4fabsf(float noundef %92)
          to label %94 unwind label %52

94:                                               ; preds = %90
  %95 = fpext float %93 to double
  %96 = load double, ptr %14, align 8, !tbaa !9
  %97 = fcmp olt double %95, %96
  br i1 %97, label %98, label %108

98:                                               ; preds = %94
  %99 = getelementptr inbounds %"class.vmath::vec3", ptr %13, i32 0, i32 2
  %100 = load float, ptr %99, align 4, !tbaa !15
  %101 = invoke noundef float @_ZSt4fabsf(float noundef %100)
          to label %102 unwind label %52

102:                                              ; preds = %98
  %103 = fpext float %101 to double
  %104 = load double, ptr %14, align 8, !tbaa !9
  %105 = fcmp olt double %103, %104
  br i1 %105, label %106, label %108

106:                                              ; preds = %102
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %0)
          to label %107 unwind label %52

107:                                              ; preds = %106
  store i32 1, ptr %15, align 4
  br label %120

108:                                              ; preds = %102, %94, %86
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #6
  invoke void @_ZN5vmath5crossERKNS_4vec3ES2_(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %16, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %109 unwind label %111

109:                                              ; preds = %108
  invoke void @_ZN5vmath9normalizeERKNS_4vec3E(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %0, ptr noundef nonnull align 4 dereferenceable(12) %16)
          to label %110 unwind label %115

110:                                              ; preds = %109
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %16) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #6
  store i32 1, ptr %15, align 4
  br label %120

111:                                              ; preds = %108
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %11, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %12, align 4
  br label %119

115:                                              ; preds = %109
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %11, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %12, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %16) #6
  br label %119

119:                                              ; preds = %115, %111
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #6
  br label %121

120:                                              ; preds = %110, %107, %81, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %13) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #6
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #6
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %9) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #6
  ret void

121:                                              ; preds = %119, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %13) #6
  br label %122

122:                                              ; preds = %121, %48
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #6
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #6
  br label %123

123:                                              ; preds = %122, %44
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #6
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %9) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #6
  br label %124

124:                                              ; preds = %123
  %125 = load ptr, ptr %11, align 8
  %126 = load i32, ptr %12, align 4
  %127 = insertvalue { ptr, i32 } poison, ptr %125, 0
  %128 = insertvalue { ptr, i32 } %127, i32 %126, 1
  resume { ptr, i32 } %128
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5vmath9normalizeERKNS_4vec3E(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 4 dereferenceable(12)) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { inlinehint 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 #5 = { 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 #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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN5vmath4vec3E", !13, i64 0, !13, i64 4, !13, i64 8}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !13, i64 4}
!15 = !{!12, !13, 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"

%"class.vmath::vec3" = type { float, float, float }

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

declare void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

declare void @_ZN5vmathmiERKNS_4vec3ES2_(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5vmath5crossERKNS_4vec3ES2_(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4fabsf(float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9Collision17getTriangleNormalEN5vmath4vec3ES1_S1_(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4 %0, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef %3) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.vmath::vec3", align 4
  %6 = alloca %"class.vmath::vec3", align 4
  %7 = alloca %"class.vmath::vec3", align 4
  %8 = alloca %"class.vmath::vec3", align 4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #6
  call void @_ZN5vmathmiERKNS_4vec3ES2_(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %5, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %1)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #6
  invoke void @_ZN5vmathmiERKNS_4vec3ES2_(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %6, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %1)
          to label %9 unwind label %27

9:                                                ; preds = %4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #6
  invoke void @_ZN5vmathmiERKNS_4vec3ES2_(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %7, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %2)
          to label %10 unwind label %29

10:                                               ; preds = %9
  %11 = load float, ptr %5, align 4, !tbaa !5
  %12 = call noundef float @_ZSt4fabsf(float noundef %11)
  %13 = fpext float %12 to double
  %14 = fcmp olt double %13, 1.000000e-09
  br i1 %14, label %15, label %33

15:                                               ; preds = %10
  %16 = getelementptr inbounds i8, ptr %5, i64 4
  %17 = load float, ptr %16, align 4, !tbaa !10
  %18 = call noundef float @_ZSt4fabsf(float noundef %17)
  %19 = fpext float %18 to double
  %20 = fcmp olt double %19, 1.000000e-09
  br i1 %20, label %21, label %33

21:                                               ; preds = %15
  %22 = getelementptr inbounds i8, ptr %5, i64 8
  %23 = load float, ptr %22, align 4, !tbaa !11
  %24 = call noundef float @_ZSt4fabsf(float noundef %23)
  %25 = fpext float %24 to double
  %26 = fcmp olt double %25, 1.000000e-09
  br i1 %26, label %.invoke, label %33

27:                                               ; preds = %4
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %78

29:                                               ; preds = %9
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %77

31:                                               ; preds = %.invoke
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %76

33:                                               ; preds = %21, %15, %10
  %34 = load float, ptr %6, align 4, !tbaa !5
  %35 = call noundef float @_ZSt4fabsf(float noundef %34)
  %36 = fpext float %35 to double
  %37 = fcmp olt double %36, 1.000000e-09
  br i1 %37, label %38, label %50

38:                                               ; preds = %33
  %39 = getelementptr inbounds i8, ptr %6, i64 4
  %40 = load float, ptr %39, align 4, !tbaa !10
  %41 = call noundef float @_ZSt4fabsf(float noundef %40)
  %42 = fpext float %41 to double
  %43 = fcmp olt double %42, 1.000000e-09
  br i1 %43, label %44, label %50

44:                                               ; preds = %38
  %45 = getelementptr inbounds i8, ptr %6, i64 8
  %46 = load float, ptr %45, align 4, !tbaa !11
  %47 = call noundef float @_ZSt4fabsf(float noundef %46)
  %48 = fpext float %47 to double
  %49 = fcmp olt double %48, 1.000000e-09
  br i1 %49, label %.invoke, label %50

50:                                               ; preds = %44, %38, %33
  %51 = load float, ptr %7, align 4, !tbaa !5
  %52 = call noundef float @_ZSt4fabsf(float noundef %51)
  %53 = fpext float %52 to double
  %54 = fcmp olt double %53, 1.000000e-09
  br i1 %54, label %55, label %67

55:                                               ; preds = %50
  %56 = getelementptr inbounds i8, ptr %7, i64 4
  %57 = load float, ptr %56, align 4, !tbaa !10
  %58 = call noundef float @_ZSt4fabsf(float noundef %57)
  %59 = fpext float %58 to double
  %60 = fcmp olt double %59, 1.000000e-09
  br i1 %60, label %61, label %67

61:                                               ; preds = %55
  %62 = getelementptr inbounds i8, ptr %7, i64 8
  %63 = load float, ptr %62, align 4, !tbaa !11
  %64 = call noundef float @_ZSt4fabsf(float noundef %63)
  %65 = fpext float %64 to double
  %66 = fcmp olt double %65, 1.000000e-09
  br i1 %66, label %.invoke, label %67

.invoke:                                          ; preds = %21, %61, %44
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %0)
          to label %75 unwind label %31

67:                                               ; preds = %61, %55, %50
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #6
  invoke void @_ZN5vmath5crossERKNS_4vec3ES2_(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %8, ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %6)
          to label %68 unwind label %70

68:                                               ; preds = %67
  invoke void @_ZN5vmath9normalizeERKNS_4vec3E(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %0, ptr noundef nonnull align 4 dereferenceable(12) %8)
          to label %69 unwind label %72

69:                                               ; preds = %68
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %8) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #6
  br label %75

70:                                               ; preds = %67
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %74

72:                                               ; preds = %68
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %8) #6
  br label %74

74:                                               ; preds = %72, %70
  %.pn = phi { ptr, i32 } [ %73, %72 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #6
  br label %76

75:                                               ; preds = %.invoke, %69
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %7) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #6
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %5) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  ret void

76:                                               ; preds = %74, %31
  %.pn15 = phi { ptr, i32 } [ %32, %31 ], [ %.pn, %74 ]
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %7) #6
  br label %77

77:                                               ; preds = %76, %29
  %.pn15.pn = phi { ptr, i32 } [ %.pn15, %76 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %6) #6
  br label %78

78:                                               ; preds = %77, %27
  %.pn15.pn.pn = phi { ptr, i32 } [ %.pn15.pn, %77 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #6
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %5) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn15.pn.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5vmath9normalizeERKNS_4vec3E(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { inlinehint 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 #5 = { 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 #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, !7, i64 0}
!6 = !{!"_ZTSN5vmath4vec3E", !7, i64 0, !7, i64 4, !7, i64 8}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{!6, !7, i64 8}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass