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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4fminIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef, double noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4fmaxIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef, double noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4AABB11getMinPointEv(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 8 dereferenceable(40)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4AABB11getMaxPointEv(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 8 dereferenceable(40)) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4AABB25getNearestPointInsideAABBEN5vmath4vec3Ed(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4 %0, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef %2, double noundef %3) #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, 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 i32, 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 double %3, ptr %8, align 8, !tbaa !9
  %14 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #5
  call void @_ZN4AABB11getMinPointEv(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %9, ptr noundef nonnull align 8 dereferenceable(40) %14)
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #5
  invoke void @_ZN4AABB11getMaxPointEv(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %10, ptr noundef nonnull align 8 dereferenceable(40) %14)
          to label %15 unwind label %76

15:                                               ; preds = %4
  %16 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 0
  %17 = load float, ptr %16, align 4, !tbaa !11
  %18 = fpext float %17 to double
  %19 = getelementptr inbounds %"class.vmath::vec3", ptr %9, i32 0, i32 0
  %20 = load float, ptr %19, align 4, !tbaa !11
  %21 = fpext float %20 to double
  %22 = load double, ptr %8, align 8, !tbaa !9
  %23 = fadd double %21, %22
  %24 = fcmp oge double %18, %23
  br i1 %24, label %25, label %80

25:                                               ; preds = %15
  %26 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 1
  %27 = load float, ptr %26, align 4, !tbaa !14
  %28 = fpext float %27 to double
  %29 = getelementptr inbounds %"class.vmath::vec3", ptr %9, i32 0, i32 1
  %30 = load float, ptr %29, align 4, !tbaa !14
  %31 = fpext float %30 to double
  %32 = load double, ptr %8, align 8, !tbaa !9
  %33 = fadd double %31, %32
  %34 = fcmp oge double %28, %33
  br i1 %34, label %35, label %80

35:                                               ; preds = %25
  %36 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 2
  %37 = load float, ptr %36, align 4, !tbaa !15
  %38 = fpext float %37 to double
  %39 = getelementptr inbounds %"class.vmath::vec3", ptr %9, i32 0, i32 2
  %40 = load float, ptr %39, align 4, !tbaa !15
  %41 = fpext float %40 to double
  %42 = load double, ptr %8, align 8, !tbaa !9
  %43 = fadd double %41, %42
  %44 = fcmp oge double %38, %43
  br i1 %44, label %45, label %80

45:                                               ; preds = %35
  %46 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 0
  %47 = load float, ptr %46, align 4, !tbaa !11
  %48 = fpext float %47 to double
  %49 = getelementptr inbounds %"class.vmath::vec3", ptr %10, i32 0, i32 0
  %50 = load float, ptr %49, align 4, !tbaa !11
  %51 = fpext float %50 to double
  %52 = load double, ptr %8, align 8, !tbaa !9
  %53 = fsub double %51, %52
  %54 = fcmp olt double %48, %53
  br i1 %54, label %55, label %80

55:                                               ; preds = %45
  %56 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 1
  %57 = load float, ptr %56, align 4, !tbaa !14
  %58 = fpext float %57 to double
  %59 = getelementptr inbounds %"class.vmath::vec3", ptr %10, i32 0, i32 1
  %60 = load float, ptr %59, align 4, !tbaa !14
  %61 = fpext float %60 to double
  %62 = load double, ptr %8, align 8, !tbaa !9
  %63 = fsub double %61, %62
  %64 = fcmp ole double %58, %63
  br i1 %64, label %65, label %80

65:                                               ; preds = %55
  %66 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 2
  %67 = load float, ptr %66, align 4, !tbaa !15
  %68 = fpext float %67 to double
  %69 = getelementptr inbounds %"class.vmath::vec3", ptr %10, i32 0, i32 2
  %70 = load float, ptr %69, align 4, !tbaa !15
  %71 = fpext float %70 to double
  %72 = load double, ptr %8, align 8, !tbaa !9
  %73 = fsub double %71, %72
  %74 = fcmp ole double %68, %73
  br i1 %74, label %75, label %80

75:                                               ; preds = %65
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %0, ptr align 4 %2, i64 12, i1 false), !tbaa.struct !16
  store i32 1, ptr %13, align 4
  br label %151

76:                                               ; preds = %4
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %11, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %12, align 4
  br label %152

80:                                               ; preds = %65, %55, %45, %35, %25, %15
  %81 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 0
  %82 = load float, ptr %81, align 4, !tbaa !11
  %83 = getelementptr inbounds %"class.vmath::vec3", ptr %9, i32 0, i32 0
  %84 = load float, ptr %83, align 4, !tbaa !11
  %85 = fpext float %84 to double
  %86 = load double, ptr %8, align 8, !tbaa !9
  %87 = fadd double %85, %86
  %88 = invoke noundef double @_ZSt4fmaxIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %82, double noundef %87)
          to label %89 unwind label %147

89:                                               ; preds = %80
  %90 = fptrunc double %88 to float
  %91 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 0
  store float %90, ptr %91, align 4, !tbaa !11
  %92 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 1
  %93 = load float, ptr %92, align 4, !tbaa !14
  %94 = getelementptr inbounds %"class.vmath::vec3", ptr %9, i32 0, i32 1
  %95 = load float, ptr %94, align 4, !tbaa !14
  %96 = fpext float %95 to double
  %97 = load double, ptr %8, align 8, !tbaa !9
  %98 = fadd double %96, %97
  %99 = invoke noundef double @_ZSt4fmaxIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %93, double noundef %98)
          to label %100 unwind label %147

100:                                              ; preds = %89
  %101 = fptrunc double %99 to float
  %102 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 1
  store float %101, ptr %102, align 4, !tbaa !14
  %103 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 2
  %104 = load float, ptr %103, align 4, !tbaa !15
  %105 = getelementptr inbounds %"class.vmath::vec3", ptr %9, i32 0, i32 2
  %106 = load float, ptr %105, align 4, !tbaa !15
  %107 = fpext float %106 to double
  %108 = load double, ptr %8, align 8, !tbaa !9
  %109 = fadd double %107, %108
  %110 = invoke noundef double @_ZSt4fmaxIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %104, double noundef %109)
          to label %111 unwind label %147

111:                                              ; preds = %100
  %112 = fptrunc double %110 to float
  %113 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 2
  store float %112, ptr %113, align 4, !tbaa !15
  %114 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 0
  %115 = load float, ptr %114, align 4, !tbaa !11
  %116 = getelementptr inbounds %"class.vmath::vec3", ptr %10, i32 0, i32 0
  %117 = load float, ptr %116, align 4, !tbaa !11
  %118 = fpext float %117 to double
  %119 = load double, ptr %8, align 8, !tbaa !9
  %120 = fsub double %118, %119
  %121 = invoke noundef double @_ZSt4fminIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %115, double noundef %120)
          to label %122 unwind label %147

122:                                              ; preds = %111
  %123 = fptrunc double %121 to float
  %124 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 0
  store float %123, ptr %124, align 4, !tbaa !11
  %125 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 1
  %126 = load float, ptr %125, align 4, !tbaa !14
  %127 = getelementptr inbounds %"class.vmath::vec3", ptr %10, i32 0, i32 1
  %128 = load float, ptr %127, align 4, !tbaa !14
  %129 = fpext float %128 to double
  %130 = load double, ptr %8, align 8, !tbaa !9
  %131 = fsub double %129, %130
  %132 = invoke noundef double @_ZSt4fminIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %126, double noundef %131)
          to label %133 unwind label %147

133:                                              ; preds = %122
  %134 = fptrunc double %132 to float
  %135 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 1
  store float %134, ptr %135, align 4, !tbaa !14
  %136 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 2
  %137 = load float, ptr %136, align 4, !tbaa !15
  %138 = getelementptr inbounds %"class.vmath::vec3", ptr %10, i32 0, i32 2
  %139 = load float, ptr %138, align 4, !tbaa !15
  %140 = fpext float %139 to double
  %141 = load double, ptr %8, align 8, !tbaa !9
  %142 = fsub double %140, %141
  %143 = invoke noundef double @_ZSt4fminIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %137, double noundef %142)
          to label %144 unwind label %147

144:                                              ; preds = %133
  %145 = fptrunc double %143 to float
  %146 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 2
  store float %145, ptr %146, align 4, !tbaa !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %0, ptr align 4 %2, i64 12, i1 false), !tbaa.struct !16
  store i32 1, ptr %13, align 4
  br label %151

147:                                              ; preds = %133, %122, %111, %100, %89, %80
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %11, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %12, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #5
  br label %152

151:                                              ; preds = %144, %75
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #5
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %9) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #5
  ret void

152:                                              ; preds = %147, %76
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #5
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %9) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #5
  br label %153

153:                                              ; preds = %152
  %154 = load ptr, ptr %11, align 8
  %155 = load i32, ptr %12, align 4
  %156 = insertvalue { ptr, i32 } poison, ptr %154, 0
  %157 = insertvalue { ptr, i32 } %156, i32 %155, 1
  resume { ptr, i32 } %157
}

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4fminIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef, double noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4fmaxIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef, double noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4AABB11getMaxPointEv(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4 align 2

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

7:                                                ; preds = %4
  %8 = load float, ptr %2, align 4, !tbaa !5
  %9 = fpext float %8 to double
  %10 = load float, ptr %5, align 4, !tbaa !5
  %11 = fpext float %10 to double
  %12 = fadd double %11, %3
  %13 = fcmp ugt double %12, %9
  br i1 %13, label %51, label %14

14:                                               ; preds = %7
  %15 = getelementptr inbounds i8, ptr %2, i64 4
  %16 = load float, ptr %15, align 4, !tbaa !10
  %17 = fpext float %16 to double
  %18 = getelementptr inbounds i8, ptr %5, i64 4
  %19 = load float, ptr %18, align 4, !tbaa !10
  %20 = fpext float %19 to double
  %21 = fadd double %20, %3
  %22 = fcmp ugt double %21, %17
  br i1 %22, label %51, label %23

23:                                               ; preds = %14
  %24 = getelementptr inbounds i8, ptr %2, i64 8
  %25 = load float, ptr %24, align 4, !tbaa !11
  %26 = fpext float %25 to double
  %27 = getelementptr inbounds i8, ptr %5, i64 8
  %28 = load float, ptr %27, align 4, !tbaa !11
  %29 = fpext float %28 to double
  %30 = fadd double %29, %3
  %31 = fcmp ugt double %30, %26
  br i1 %31, label %51, label %32

32:                                               ; preds = %23
  %33 = load float, ptr %6, align 4, !tbaa !5
  %34 = fpext float %33 to double
  %35 = fsub double %34, %3
  %36 = fcmp ogt double %35, %9
  br i1 %36, label %37, label %51

37:                                               ; preds = %32
  %38 = getelementptr inbounds i8, ptr %6, i64 4
  %39 = load float, ptr %38, align 4, !tbaa !10
  %40 = fpext float %39 to double
  %41 = fsub double %40, %3
  %42 = fcmp ult double %41, %17
  br i1 %42, label %51, label %43

43:                                               ; preds = %37
  %44 = getelementptr inbounds i8, ptr %6, i64 8
  %45 = load float, ptr %44, align 4, !tbaa !11
  %46 = fpext float %45 to double
  %47 = fsub double %46, %3
  %48 = fcmp ult double %47, %26
  br i1 %48, label %51, label %90

49:                                               ; preds = %4
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %5) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #5
  resume { ptr, i32 } %50

51:                                               ; preds = %43, %37, %32, %23, %14, %7
  %52 = call noundef double @_ZSt4fmaxIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %8, double noundef %12)
  %53 = fptrunc double %52 to float
  store float %53, ptr %2, align 4, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %2, i64 4
  %55 = load float, ptr %54, align 4, !tbaa !10
  %56 = getelementptr inbounds i8, ptr %5, i64 4
  %57 = load float, ptr %56, align 4, !tbaa !10
  %58 = fpext float %57 to double
  %59 = fadd double %58, %3
  %60 = call noundef double @_ZSt4fmaxIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %55, double noundef %59)
  %61 = fptrunc double %60 to float
  store float %61, ptr %54, align 4, !tbaa !10
  %62 = getelementptr inbounds i8, ptr %2, i64 8
  %63 = load float, ptr %62, align 4, !tbaa !11
  %64 = getelementptr inbounds i8, ptr %5, i64 8
  %65 = load float, ptr %64, align 4, !tbaa !11
  %66 = fpext float %65 to double
  %67 = fadd double %66, %3
  %68 = call noundef double @_ZSt4fmaxIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %63, double noundef %67)
  %69 = fptrunc double %68 to float
  store float %69, ptr %62, align 4, !tbaa !11
  %70 = load float, ptr %2, align 4, !tbaa !5
  %71 = load float, ptr %6, align 4, !tbaa !5
  %72 = fpext float %71 to double
  %73 = fsub double %72, %3
  %74 = call noundef double @_ZSt4fminIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %70, double noundef %73)
  %75 = fptrunc double %74 to float
  store float %75, ptr %2, align 4, !tbaa !5
  %76 = load float, ptr %54, align 4, !tbaa !10
  %77 = getelementptr inbounds i8, ptr %6, i64 4
  %78 = load float, ptr %77, align 4, !tbaa !10
  %79 = fpext float %78 to double
  %80 = fsub double %79, %3
  %81 = call noundef double @_ZSt4fminIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %76, double noundef %80)
  %82 = fptrunc double %81 to float
  store float %82, ptr %54, align 4, !tbaa !10
  %83 = load float, ptr %62, align 4, !tbaa !11
  %84 = getelementptr inbounds i8, ptr %6, i64 8
  %85 = load float, ptr %84, align 4, !tbaa !11
  %86 = fpext float %85 to double
  %87 = fsub double %86, %3
  %88 = call noundef double @_ZSt4fminIfdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %83, double noundef %87)
  %89 = fptrunc double %88 to float
  store float %89, ptr %62, align 4, !tbaa !11
  br label %90

90:                                               ; preds = %43, %51
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %2, i64 12, i1 false)
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %6) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %5) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #5
  ret void
}

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