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

; 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 }
%class.AABB = type { %"class.vmath::vec3", double, double, double }

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

declare void @_ZN5vmath4vec3C1Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4AABBC2ERSt6vectorIN5vmath4vec3ESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca %"class.vmath::vec3", align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca double, align 8
  %16 = alloca %"class.vmath::vec3", align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %3, align 8
  %18 = getelementptr inbounds %class.AABB, ptr %17, i32 0, i32 0
  call void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %18)
  %19 = getelementptr inbounds %class.AABB, ptr %17, i32 0, i32 1
  store double 0.000000e+00, ptr %19, align 8, !tbaa !9
  %20 = getelementptr inbounds %class.AABB, ptr %17, i32 0, i32 2
  store double 0.000000e+00, ptr %20, align 8, !tbaa !14
  %21 = getelementptr inbounds %class.AABB, ptr %17, i32 0, i32 3
  store double 0.000000e+00, ptr %21, align 8, !tbaa !15
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  %24 = icmp eq i64 %23, 0
  br i1 %24, label %25, label %26

25:                                               ; preds = %2
  br label %138

26:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef 0) #6
  %29 = getelementptr inbounds %"class.vmath::vec3", ptr %28, i32 0, i32 0
  %30 = load float, ptr %29, align 4, !tbaa !16
  %31 = fpext float %30 to double
  store double %31, ptr %5, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef 0) #6
  %34 = getelementptr inbounds %"class.vmath::vec3", ptr %33, i32 0, i32 1
  %35 = load float, ptr %34, align 4, !tbaa !18
  %36 = fpext float %35 to double
  store double %36, ptr %6, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef 0) #6
  %39 = getelementptr inbounds %"class.vmath::vec3", ptr %38, i32 0, i32 2
  %40 = load float, ptr %39, align 4, !tbaa !19
  %41 = fpext float %40 to double
  store double %41, ptr %7, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef 0) #6
  %44 = getelementptr inbounds %"class.vmath::vec3", ptr %43, i32 0, i32 0
  %45 = load float, ptr %44, align 4, !tbaa !16
  %46 = fpext float %45 to double
  store double %46, ptr %8, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef 0) #6
  %49 = getelementptr inbounds %"class.vmath::vec3", ptr %48, i32 0, i32 1
  %50 = load float, ptr %49, align 4, !tbaa !18
  %51 = fpext float %50 to double
  store double %51, ptr %9, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef 0) #6
  %54 = getelementptr inbounds %"class.vmath::vec3", ptr %53, i32 0, i32 2
  %55 = load float, ptr %54, align 4, !tbaa !19
  %56 = fpext float %55 to double
  store double %56, ptr %10, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #6
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %11)
          to label %57 unwind label %65

57:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !20
  br label %58

58:                                               ; preds = %104, %57
  %59 = load i32, ptr %14, align 4, !tbaa !20
  %60 = zext i32 %59 to i64
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #6
  %63 = icmp ult i64 %60, %62
  br i1 %63, label %69, label %64

64:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %111

65:                                               ; preds = %26
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %12, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %13, align 4
  br label %144

69:                                               ; preds = %58
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = load i32, ptr %14, align 4, !tbaa !20
  %72 = zext i32 %71 to i64
  %73 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %72) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %73, i64 12, i1 false), !tbaa.struct !22
  %74 = getelementptr inbounds %"class.vmath::vec3", ptr %11, i32 0, i32 0
  %75 = load float, ptr %74, align 4, !tbaa !16
  %76 = load double, ptr %5, align 8, !tbaa !17
  %77 = 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 %75, double noundef %76)
          to label %78 unwind label %107

78:                                               ; preds = %69
  store double %77, ptr %5, align 8, !tbaa !17
  %79 = getelementptr inbounds %"class.vmath::vec3", ptr %11, i32 0, i32 1
  %80 = load float, ptr %79, align 4, !tbaa !18
  %81 = load double, ptr %6, align 8, !tbaa !17
  %82 = 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 %80, double noundef %81)
          to label %83 unwind label %107

83:                                               ; preds = %78
  store double %82, ptr %6, align 8, !tbaa !17
  %84 = getelementptr inbounds %"class.vmath::vec3", ptr %11, i32 0, i32 2
  %85 = load float, ptr %84, align 4, !tbaa !19
  %86 = load double, ptr %7, align 8, !tbaa !17
  %87 = 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 %85, double noundef %86)
          to label %88 unwind label %107

88:                                               ; preds = %83
  store double %87, ptr %7, align 8, !tbaa !17
  %89 = getelementptr inbounds %"class.vmath::vec3", ptr %11, i32 0, i32 0
  %90 = load float, ptr %89, align 4, !tbaa !16
  %91 = load double, ptr %8, align 8, !tbaa !17
  %92 = 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 %90, double noundef %91)
          to label %93 unwind label %107

93:                                               ; preds = %88
  store double %92, ptr %8, align 8, !tbaa !17
  %94 = getelementptr inbounds %"class.vmath::vec3", ptr %11, i32 0, i32 1
  %95 = load float, ptr %94, align 4, !tbaa !18
  %96 = load double, ptr %9, align 8, !tbaa !17
  %97 = 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 %95, double noundef %96)
          to label %98 unwind label %107

98:                                               ; preds = %93
  store double %97, ptr %9, align 8, !tbaa !17
  %99 = getelementptr inbounds %"class.vmath::vec3", ptr %11, i32 0, i32 2
  %100 = load float, ptr %99, align 4, !tbaa !19
  %101 = load double, ptr %10, align 8, !tbaa !17
  %102 = 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 %100, double noundef %101)
          to label %103 unwind label %107

103:                                              ; preds = %98
  store double %102, ptr %10, align 8, !tbaa !17
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %14, align 4, !tbaa !20
  %106 = add i32 %105, 1
  store i32 %106, ptr %14, align 4, !tbaa !20
  br label %58, !llvm.loop !24

107:                                              ; preds = %98, %93, %88, %83, %78, %69
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %12, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %143

111:                                              ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store double 1.000000e-09, ptr %15, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #6
  %112 = load double, ptr %5, align 8, !tbaa !17
  %113 = fptrunc double %112 to float
  %114 = load double, ptr %6, align 8, !tbaa !17
  %115 = fptrunc double %114 to float
  %116 = load double, ptr %7, align 8, !tbaa !17
  %117 = fptrunc double %116 to float
  invoke void @_ZN5vmath4vec3C1Efff(ptr noundef nonnull align 4 dereferenceable(12) %16, float noundef %113, float noundef %115, float noundef %117)
          to label %118 unwind label %139

118:                                              ; preds = %111
  %119 = getelementptr inbounds %class.AABB, ptr %17, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %119, ptr align 4 %16, i64 12, i1 false), !tbaa.struct !22
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %16) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #6
  %120 = load double, ptr %8, align 8, !tbaa !17
  %121 = load double, ptr %5, align 8, !tbaa !17
  %122 = fsub double %120, %121
  %123 = load double, ptr %15, align 8, !tbaa !17
  %124 = fadd double %122, %123
  %125 = getelementptr inbounds %class.AABB, ptr %17, i32 0, i32 1
  store double %124, ptr %125, align 8, !tbaa !9
  %126 = load double, ptr %9, align 8, !tbaa !17
  %127 = load double, ptr %6, align 8, !tbaa !17
  %128 = fsub double %126, %127
  %129 = load double, ptr %15, align 8, !tbaa !17
  %130 = fadd double %128, %129
  %131 = getelementptr inbounds %class.AABB, ptr %17, i32 0, i32 2
  store double %130, ptr %131, align 8, !tbaa !14
  %132 = load double, ptr %10, align 8, !tbaa !17
  %133 = load double, ptr %7, align 8, !tbaa !17
  %134 = fsub double %132, %133
  %135 = load double, ptr %15, align 8, !tbaa !17
  %136 = fadd double %134, %135
  %137 = getelementptr inbounds %class.AABB, ptr %17, i32 0, i32 3
  store double %136, ptr %137, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %11) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %138

138:                                              ; preds = %118, %25
  ret void

139:                                              ; preds = %111
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %12, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %143

143:                                              ; preds = %139, %107
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %11) #6
  br label %144

144:                                              ; preds = %143, %65
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %18) #6
  br label %145

145:                                              ; preds = %144
  %146 = load ptr, ptr %12, align 8
  %147 = load i32, ptr %13, align 4
  %148 = insertvalue { ptr, i32 } poison, ptr %146, 0
  %149 = insertvalue { ptr, i32 } %148, i32 %147, 1
  resume { ptr, i32 } %149
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

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

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

attributes #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 #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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 #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, !13, i64 16}
!10 = !{!"_ZTS4AABB", !11, i64 0, !13, i64 16, !13, i64 24, !13, i64 32}
!11 = !{!"_ZTSN5vmath4vec3E", !12, i64 0, !12, i64 4, !12, i64 8}
!12 = !{!"float", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!10, !13, i64 24}
!15 = !{!10, !13, i64 32}
!16 = !{!11, !12, i64 0}
!17 = !{!13, !13, i64 0}
!18 = !{!11, !12, i64 4}
!19 = !{!11, !12, i64 8}
!20 = !{!21, !21, i64 0}
!21 = !{!"int", !7, i64 0}
!22 = !{i64 0, i64 4, !23, i64 4, i64 4, !23, i64 8, i64 4, !23}
!23 = !{!12, !12, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"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.vmath::vec3" = type { float, float, float }

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

declare void @_ZN5vmath4vec3C1Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #0

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4AABBC2ERSt6vectorIN5vmath4vec3ESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.vmath::vec3", align 4
  %4 = alloca %"class.vmath::vec3", align 4
  tail call void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %0)
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = getelementptr inbounds i8, ptr %0, i64 24
  %7 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %5, i8 0, i64 24, i1 false)
  %8 = tail call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %9 = icmp eq i64 %8, 0
  br i1 %9, label %68, label %10

10:                                               ; preds = %2
  %11 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #7
  %12 = load float, ptr %11, align 4, !tbaa !5
  %13 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #7
  %14 = getelementptr inbounds i8, ptr %13, i64 4
  %15 = load float, ptr %14, align 4, !tbaa !10
  %16 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #7
  %17 = getelementptr inbounds i8, ptr %16, i64 8
  %18 = load float, ptr %17, align 4, !tbaa !11
  %19 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #7
  %20 = load float, ptr %19, align 4, !tbaa !5
  %21 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #7
  %22 = getelementptr inbounds i8, ptr %21, i64 4
  %23 = load float, ptr %22, align 4, !tbaa !10
  %24 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #7
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  %26 = load float, ptr %25, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #7
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %3)
          to label %27 unwind label %40

27:                                               ; preds = %10
  %28 = fpext float %26 to double
  %29 = fpext float %23 to double
  %30 = fpext float %20 to double
  %31 = fpext float %18 to double
  %32 = fpext float %15 to double
  %33 = fpext float %12 to double
  %34 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %.not = icmp eq i64 %34, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %27
  %35 = getelementptr inbounds i8, ptr %3, i64 4
  %36 = getelementptr inbounds i8, ptr %3, i64 8
  br label %42

._crit_edge:                                      ; preds = %42, %27
  %.039.lcssa = phi double [ %32, %27 ], [ %48, %42 ]
  %.038.lcssa = phi double [ %31, %27 ], [ %50, %42 ]
  %.037.lcssa = phi double [ %30, %27 ], [ %52, %42 ]
  %.036.lcssa = phi double [ %29, %27 ], [ %54, %42 ]
  %.035.lcssa = phi double [ %28, %27 ], [ %56, %42 ]
  %.0.lcssa = phi double [ %33, %27 ], [ %46, %42 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #7
  %37 = fptrunc double %.0.lcssa to float
  %38 = fptrunc double %.039.lcssa to float
  %39 = fptrunc double %.038.lcssa to float
  invoke void @_ZN5vmath4vec3C1Efff(ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef %37, float noundef %38, float noundef %39)
          to label %61 unwind label %69

40:                                               ; preds = %10
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %71

42:                                               ; preds = %.lr.ph, %42
  %43 = phi i64 [ 0, %.lr.ph ], [ %58, %42 ]
  %.048 = phi double [ %33, %.lr.ph ], [ %46, %42 ]
  %.03247 = phi i32 [ 0, %.lr.ph ], [ %57, %42 ]
  %.03546 = phi double [ %28, %.lr.ph ], [ %56, %42 ]
  %.03645 = phi double [ %29, %.lr.ph ], [ %54, %42 ]
  %.03744 = phi double [ %30, %.lr.ph ], [ %52, %42 ]
  %.03843 = phi double [ %31, %.lr.ph ], [ %50, %42 ]
  %.03942 = phi double [ %32, %.lr.ph ], [ %48, %42 ]
  %44 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %43) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %44, i64 12, i1 false), !tbaa.struct !12
  %45 = load float, ptr %3, align 4, !tbaa !5
  %46 = 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 %45, double noundef %.048)
  %47 = load float, ptr %35, align 4, !tbaa !10
  %48 = 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 %47, double noundef %.03942)
  %49 = load float, ptr %36, align 4, !tbaa !11
  %50 = 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 %49, double noundef %.03843)
  %51 = load float, ptr %3, align 4, !tbaa !5
  %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 %51, double noundef %.03744)
  %53 = load float, ptr %35, align 4, !tbaa !10
  %54 = 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 %53, double noundef %.03645)
  %55 = load float, ptr %36, align 4, !tbaa !11
  %56 = 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 %.03546)
  %57 = add i32 %.03247, 1
  %58 = zext i32 %57 to i64
  %59 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %60 = icmp ugt i64 %59, %58
  br i1 %60, label %42, label %._crit_edge, !llvm.loop !14

61:                                               ; preds = %._crit_edge
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %4, i64 12, i1 false), !tbaa.struct !12
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %4) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #7
  %62 = fsub double %.037.lcssa, %.0.lcssa
  %63 = fadd double %62, 1.000000e-09
  store double %63, ptr %5, align 8, !tbaa !16
  %64 = fsub double %.036.lcssa, %.039.lcssa
  %65 = fadd double %64, 1.000000e-09
  store double %65, ptr %6, align 8, !tbaa !19
  %66 = fsub double %.035.lcssa, %.038.lcssa
  %67 = fadd double %66, 1.000000e-09
  store double %67, ptr %7, align 8, !tbaa !20
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %3) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #7
  br label %68

68:                                               ; preds = %2, %61
  ret void

69:                                               ; preds = %._crit_edge
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %3) #7
  br label %71

71:                                               ; preds = %69, %40
  %.pn = phi { ptr, i32 } [ %70, %69 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %0) #7
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

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

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

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

attributes #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 #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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}
!12 = !{i64 0, i64 4, !13, i64 4, i64 4, !13, i64 8, i64 4, !13}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !18, i64 16}
!17 = !{!"_ZTS4AABB", !6, i64 0, !18, i64 16, !18, i64 24, !18, i64 32}
!18 = !{!"double", !8, i64 0}
!19 = !{!17, !18, i64 24}
!20 = !{!17, !18, i64 32}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass