; LLVM IR from Sonryle/JoePhys :: JoePhys/src/Spring.ll (ZN6Spring6UpdateEd)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.vec2 = type { float, float }
%struct.Spring = type { float, float, ptr, ptr }
%struct.Particle = type { i8, %struct.vec2, %struct.vec2, float, float, float, %struct.vec2, [2 x %struct.vec2] }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Spring6UpdateEd(ptr noundef nonnull align 8 dereferenceable(24) %0, double noundef %1) #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca double, align 8
  %5 = alloca %struct.vec2, align 4
  %6 = alloca %struct.vec2, align 4
  %7 = alloca %struct.vec2, align 4
  %8 = alloca %struct.vec2, align 4
  %9 = alloca %struct.vec2, align 4
  %10 = alloca %struct.vec2, align 4
  %11 = alloca %struct.vec2, align 4
  %12 = alloca %struct.vec2, align 4
  %13 = alloca %struct.vec2, align 4
  %14 = alloca %struct.vec2, align 4
  %15 = alloca %struct.vec2, align 4
  %16 = alloca %struct.vec2, align 4
  %17 = alloca %struct.vec2, align 4
  %18 = alloca %struct.vec2, align 4
  %19 = alloca %struct.vec2, align 4
  %20 = alloca %struct.vec2, align 4
  %21 = alloca %struct.vec2, align 4
  %22 = alloca %struct.vec2, align 4
  %23 = alloca %struct.vec2, align 4
  %24 = alloca %struct.vec2, align 4
  %25 = alloca %struct.vec2, align 4
  %26 = alloca %struct.vec2, align 4
  %27 = alloca %struct.vec2, align 4
  %28 = alloca %struct.vec2, align 4
  %29 = alloca %struct.vec2, align 4
  %30 = alloca %struct.vec2, align 4
  %31 = alloca %struct.vec2, align 4
  %32 = alloca %struct.vec2, align 4
  %33 = alloca %struct.vec2, align 4
  %34 = alloca %struct.vec2, align 4
  %35 = alloca %struct.vec2, align 4
  %36 = alloca %struct.vec2, align 4
  %37 = alloca %struct.vec2, align 4
  %38 = alloca %struct.vec2, align 4
  %39 = alloca %struct.vec2, align 4
  %40 = alloca %struct.vec2, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store double %1, ptr %4, align 8, !tbaa !9
  %41 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %42 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 3
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = getelementptr inbounds %struct.Particle, ptr %43, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 4 %44, i64 8, i1 false), !tbaa.struct !14
  %45 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 2
  %46 = load ptr, ptr %45, align 8, !tbaa !16
  %47 = getelementptr inbounds %struct.Particle, ptr %46, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 %47, i64 8, i1 false), !tbaa.struct !14
  %48 = load <2 x float>, ptr %6, align 4
  %49 = load <2 x float>, ptr %7, align 4
  %50 = call <2 x float> @_Zmi4vec2S_(<2 x float> %48, <2 x float> %49)
  store <2 x float> %50, ptr %5, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %5, i64 8, i1 false), !tbaa.struct !14
  %51 = load <2 x float>, ptr %10, align 4
  %52 = call <2 x float> @_Z9normalize4vec2(<2 x float> %51)
  store <2 x float> %52, ptr %9, align 4
  %53 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 0
  %54 = load float, ptr %53, align 8, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %5, i64 8, i1 false), !tbaa.struct !14
  %55 = load <2 x float>, ptr %11, align 4
  %56 = call noundef float @_Z6length4vec2(<2 x float> %55)
  %57 = fsub float %54, %56
  %58 = load <2 x float>, ptr %9, align 4
  %59 = call <2 x float> @_Zml4vec2f(<2 x float> %58, float noundef %57)
  store <2 x float> %59, ptr %8, align 4
  %60 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 1
  %61 = load float, ptr %60, align 4, !tbaa !18
  %62 = call <2 x float> @_ZN4vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8) %8, float noundef %61)
  store <2 x float> %62, ptr %12, align 4
  %63 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 3
  %64 = load ptr, ptr %63, align 8, !tbaa !11
  %65 = getelementptr inbounds %struct.Particle, ptr %64, i32 0, i32 0
  %66 = load i8, ptr %65, align 4, !tbaa !19, !range !23, !noundef !24
  %67 = trunc i8 %66 to i1
  br i1 %67, label %81, label %68

68:                                               ; preds = %2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %8, i64 8, i1 false), !tbaa.struct !14
  %69 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 3
  %70 = load ptr, ptr %69, align 8, !tbaa !11
  %71 = getelementptr inbounds %struct.Particle, ptr %70, i32 0, i32 5
  %72 = load float, ptr %71, align 4, !tbaa !25
  %73 = load <2 x float>, ptr %14, align 4
  %74 = call <2 x float> @_Zdv4vec2f(<2 x float> %73, float noundef %72)
  store <2 x float> %74, ptr %13, align 4
  %75 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 3
  %76 = load ptr, ptr %75, align 8, !tbaa !11
  %77 = getelementptr inbounds %struct.Particle, ptr %76, i32 0, i32 7
  %78 = getelementptr inbounds [2 x %struct.vec2], ptr %77, i64 0, i64 0
  %79 = load <2 x float>, ptr %13, align 4
  %80 = call <2 x float> @_ZN4vec2pLES_(ptr noundef nonnull align 4 dereferenceable(8) %78, <2 x float> %79)
  store <2 x float> %80, ptr %15, align 4
  br label %81

81:                                               ; preds = %68, %2
  %82 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 2
  %83 = load ptr, ptr %82, align 8, !tbaa !16
  %84 = getelementptr inbounds %struct.Particle, ptr %83, i32 0, i32 0
  %85 = load i8, ptr %84, align 4, !tbaa !19, !range !23, !noundef !24
  %86 = trunc i8 %85 to i1
  br i1 %86, label %102, label %87

87:                                               ; preds = %81
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %8, i64 8, i1 false), !tbaa.struct !14
  %88 = load <2 x float>, ptr %18, align 4
  %89 = call <2 x float> @_Zng4vec2(<2 x float> %88)
  store <2 x float> %89, ptr %17, align 4
  %90 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 2
  %91 = load ptr, ptr %90, align 8, !tbaa !16
  %92 = getelementptr inbounds %struct.Particle, ptr %91, i32 0, i32 5
  %93 = load float, ptr %92, align 4, !tbaa !25
  %94 = load <2 x float>, ptr %17, align 4
  %95 = call <2 x float> @_Zdv4vec2f(<2 x float> %94, float noundef %93)
  store <2 x float> %95, ptr %16, align 4
  %96 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 2
  %97 = load ptr, ptr %96, align 8, !tbaa !16
  %98 = getelementptr inbounds %struct.Particle, ptr %97, i32 0, i32 7
  %99 = getelementptr inbounds [2 x %struct.vec2], ptr %98, i64 0, i64 0
  %100 = load <2 x float>, ptr %16, align 4
  %101 = call <2 x float> @_ZN4vec2pLES_(ptr noundef nonnull align 4 dereferenceable(8) %99, <2 x float> %100)
  store <2 x float> %101, ptr %19, align 4
  br label %102

102:                                              ; preds = %87, %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %103 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 3
  %104 = load ptr, ptr %103, align 8, !tbaa !11
  %105 = getelementptr inbounds %struct.Particle, ptr %104, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %105, i64 8, i1 false), !tbaa.struct !14
  %106 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 3
  %107 = load ptr, ptr %106, align 8, !tbaa !11
  %108 = getelementptr inbounds %struct.Particle, ptr %107, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %108, i64 8, i1 false), !tbaa.struct !14
  %109 = load double, ptr %4, align 8, !tbaa !9
  %110 = fptrunc double %109 to float
  %111 = load <2 x float>, ptr %24, align 4
  %112 = call <2 x float> @_Zml4vec2f(<2 x float> %111, float noundef %110)
  store <2 x float> %112, ptr %23, align 4
  %113 = load <2 x float>, ptr %22, align 4
  %114 = load <2 x float>, ptr %23, align 4
  %115 = call <2 x float> @_Zpl4vec2S_(<2 x float> %113, <2 x float> %114)
  store <2 x float> %115, ptr %21, align 4
  %116 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 2
  %117 = load ptr, ptr %116, align 8, !tbaa !16
  %118 = getelementptr inbounds %struct.Particle, ptr %117, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %118, i64 8, i1 false), !tbaa.struct !14
  %119 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 2
  %120 = load ptr, ptr %119, align 8, !tbaa !16
  %121 = getelementptr inbounds %struct.Particle, ptr %120, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %121, i64 8, i1 false), !tbaa.struct !14
  %122 = load double, ptr %4, align 8, !tbaa !9
  %123 = fptrunc double %122 to float
  %124 = load <2 x float>, ptr %28, align 4
  %125 = call <2 x float> @_Zml4vec2f(<2 x float> %124, float noundef %123)
  store <2 x float> %125, ptr %27, align 4
  %126 = load <2 x float>, ptr %26, align 4
  %127 = load <2 x float>, ptr %27, align 4
  %128 = call <2 x float> @_Zpl4vec2S_(<2 x float> %126, <2 x float> %127)
  store <2 x float> %128, ptr %25, align 4
  %129 = load <2 x float>, ptr %21, align 4
  %130 = load <2 x float>, ptr %25, align 4
  %131 = call <2 x float> @_Zmi4vec2S_(<2 x float> %129, <2 x float> %130)
  store <2 x float> %131, ptr %20, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %20, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %5, i64 8, i1 false), !tbaa.struct !14
  %132 = load <2 x float>, ptr %31, align 4
  %133 = call <2 x float> @_Z9normalize4vec2(<2 x float> %132)
  store <2 x float> %133, ptr %30, align 4
  %134 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 0
  %135 = load float, ptr %134, align 8, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %5, i64 8, i1 false), !tbaa.struct !14
  %136 = load <2 x float>, ptr %32, align 4
  %137 = call noundef float @_Z6length4vec2(<2 x float> %136)
  %138 = fsub float %135, %137
  %139 = load <2 x float>, ptr %30, align 4
  %140 = call <2 x float> @_Zml4vec2f(<2 x float> %139, float noundef %138)
  store <2 x float> %140, ptr %29, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %29, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  %141 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 1
  %142 = load float, ptr %141, align 4, !tbaa !18
  %143 = call <2 x float> @_ZN4vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8) %8, float noundef %142)
  store <2 x float> %143, ptr %33, align 4
  %144 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 3
  %145 = load ptr, ptr %144, align 8, !tbaa !11
  %146 = getelementptr inbounds %struct.Particle, ptr %145, i32 0, i32 0
  %147 = load i8, ptr %146, align 4, !tbaa !19, !range !23, !noundef !24
  %148 = trunc i8 %147 to i1
  br i1 %148, label %162, label %149

149:                                              ; preds = %102
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %8, i64 8, i1 false), !tbaa.struct !14
  %150 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 3
  %151 = load ptr, ptr %150, align 8, !tbaa !11
  %152 = getelementptr inbounds %struct.Particle, ptr %151, i32 0, i32 5
  %153 = load float, ptr %152, align 4, !tbaa !25
  %154 = load <2 x float>, ptr %35, align 4
  %155 = call <2 x float> @_Zdv4vec2f(<2 x float> %154, float noundef %153)
  store <2 x float> %155, ptr %34, align 4
  %156 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 3
  %157 = load ptr, ptr %156, align 8, !tbaa !11
  %158 = getelementptr inbounds %struct.Particle, ptr %157, i32 0, i32 7
  %159 = getelementptr inbounds [2 x %struct.vec2], ptr %158, i64 0, i64 1
  %160 = load <2 x float>, ptr %34, align 4
  %161 = call <2 x float> @_ZN4vec2pLES_(ptr noundef nonnull align 4 dereferenceable(8) %159, <2 x float> %160)
  store <2 x float> %161, ptr %36, align 4
  br label %162

162:                                              ; preds = %149, %102
  %163 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 2
  %164 = load ptr, ptr %163, align 8, !tbaa !16
  %165 = getelementptr inbounds %struct.Particle, ptr %164, i32 0, i32 0
  %166 = load i8, ptr %165, align 4, !tbaa !19, !range !23, !noundef !24
  %167 = trunc i8 %166 to i1
  br i1 %167, label %183, label %168

168:                                              ; preds = %162
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 4 %8, i64 8, i1 false), !tbaa.struct !14
  %169 = load <2 x float>, ptr %39, align 4
  %170 = call <2 x float> @_Zng4vec2(<2 x float> %169)
  store <2 x float> %170, ptr %38, align 4
  %171 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 2
  %172 = load ptr, ptr %171, align 8, !tbaa !16
  %173 = getelementptr inbounds %struct.Particle, ptr %172, i32 0, i32 5
  %174 = load float, ptr %173, align 4, !tbaa !25
  %175 = load <2 x float>, ptr %38, align 4
  %176 = call <2 x float> @_Zdv4vec2f(<2 x float> %175, float noundef %174)
  store <2 x float> %176, ptr %37, align 4
  %177 = getelementptr inbounds %struct.Spring, ptr %41, i32 0, i32 2
  %178 = load ptr, ptr %177, align 8, !tbaa !16
  %179 = getelementptr inbounds %struct.Particle, ptr %178, i32 0, i32 7
  %180 = getelementptr inbounds [2 x %struct.vec2], ptr %179, i64 0, i64 1
  %181 = load <2 x float>, ptr %37, align 4
  %182 = call <2 x float> @_ZN4vec2pLES_(ptr noundef nonnull align 4 dereferenceable(8) %180, <2 x float> %181)
  store <2 x float> %182, ptr %40, align 4
  br label %183

183:                                              ; preds = %168, %162
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret void
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Zmi4vec2S_(<2 x float>, <2 x float>) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Zml4vec2f(<2 x float>, float noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Z9normalize4vec2(<2 x float>) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z6length4vec2(<2 x float>) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZN4vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8), float noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Zdv4vec2f(<2 x float>, float noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZN4vec2pLES_(ptr noundef nonnull align 4 dereferenceable(8), <2 x float>) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Zng4vec2(<2 x float>) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Zpl4vec2S_(<2 x float>, <2 x float>) #2

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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, !6, i64 16}
!12 = !{!"_ZTS6Spring", !13, i64 0, !13, i64 4, !6, i64 8, !6, i64 16}
!13 = !{!"float", !7, i64 0}
!14 = !{i64 0, i64 4, !15, i64 4, i64 4, !15}
!15 = !{!13, !13, i64 0}
!16 = !{!12, !6, i64 8}
!17 = !{!12, !13, i64 0}
!18 = !{!12, !13, i64 4}
!19 = !{!20, !21, i64 0}
!20 = !{!"_ZTS8Particle", !21, i64 0, !22, i64 4, !22, i64 12, !13, i64 20, !13, i64 24, !13, i64 28, !22, i64 32, !7, i64 40}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTS4vec2", !13, i64 0, !13, i64 4}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!20, !13, i64 28}


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

%struct.vec2 = type { float, float }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Spring6UpdateEd(ptr nocapture noundef nonnull readonly align 8 dereferenceable(24) %0, double noundef %1) local_unnamed_addr #0 align 2 {
  %3 = alloca %struct.vec2, align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 16
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %5, i64 4
  %.sroa.033.0.copyload = load <2 x float>, ptr %6, align 4
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  %8 = load ptr, ptr %7, align 8, !tbaa !11
  %9 = getelementptr inbounds i8, ptr %8, i64 4
  %.sroa.032.0.copyload = load <2 x float>, ptr %9, align 4
  %10 = tail call <2 x float> @_Zmi4vec2S_(<2 x float> %.sroa.033.0.copyload, <2 x float> %.sroa.032.0.copyload)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %11 = tail call <2 x float> @_Z9normalize4vec2(<2 x float> %10)
  %12 = load float, ptr %0, align 8, !tbaa !12
  %13 = tail call noundef float @_Z6length4vec2(<2 x float> %10)
  %14 = fsub float %12, %13
  %15 = tail call <2 x float> @_Zml4vec2f(<2 x float> %11, float noundef %14)
  store <2 x float> %15, ptr %3, align 8
  %16 = getelementptr inbounds i8, ptr %0, i64 4
  %17 = load float, ptr %16, align 4, !tbaa !13
  %18 = call <2 x float> @_ZN4vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8) %3, float noundef %17)
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = load i8, ptr %19, align 4, !tbaa !14, !range !18, !noundef !19
  %21 = trunc nuw i8 %20 to i1
  br i1 %21, label %29, label %22

22:                                               ; preds = %2
  %.sroa.026.0.copyload = load <2 x float>, ptr %3, align 8
  %23 = getelementptr inbounds i8, ptr %19, i64 28
  %24 = load float, ptr %23, align 4, !tbaa !20
  %25 = call <2 x float> @_Zdv4vec2f(<2 x float> %.sroa.026.0.copyload, float noundef %24)
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %26, i64 40
  %28 = call <2 x float> @_ZN4vec2pLES_(ptr noundef nonnull align 4 dereferenceable(8) %27, <2 x float> %25)
  br label %29

29:                                               ; preds = %22, %2
  %30 = load ptr, ptr %7, align 8, !tbaa !11
  %31 = load i8, ptr %30, align 4, !tbaa !14, !range !18, !noundef !19
  %32 = trunc nuw i8 %31 to i1
  br i1 %32, label %42, label %33

33:                                               ; preds = %29
  %.sroa.022.0.copyload = load <2 x float>, ptr %3, align 8
  %34 = call <2 x float> @_Zng4vec2(<2 x float> %.sroa.022.0.copyload)
  %35 = load ptr, ptr %7, align 8, !tbaa !11
  %36 = getelementptr inbounds i8, ptr %35, i64 28
  %37 = load float, ptr %36, align 4, !tbaa !20
  %38 = call <2 x float> @_Zdv4vec2f(<2 x float> %34, float noundef %37)
  %39 = load ptr, ptr %7, align 8, !tbaa !11
  %40 = getelementptr inbounds i8, ptr %39, i64 40
  %41 = call <2 x float> @_ZN4vec2pLES_(ptr noundef nonnull align 4 dereferenceable(8) %40, <2 x float> %38)
  br label %42

42:                                               ; preds = %33, %29
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %43, i64 4
  %.sroa.018.0.copyload = load <2 x float>, ptr %44, align 4
  %45 = getelementptr inbounds i8, ptr %43, i64 12
  %.sroa.016.0.copyload = load <2 x float>, ptr %45, align 4
  %46 = fptrunc double %1 to float
  %47 = call <2 x float> @_Zml4vec2f(<2 x float> %.sroa.016.0.copyload, float noundef %46)
  %48 = call <2 x float> @_Zpl4vec2S_(<2 x float> %.sroa.018.0.copyload, <2 x float> %47)
  %49 = load ptr, ptr %7, align 8, !tbaa !11
  %50 = getelementptr inbounds i8, ptr %49, i64 4
  %.sroa.014.0.copyload = load <2 x float>, ptr %50, align 4
  %51 = getelementptr inbounds i8, ptr %49, i64 12
  %.sroa.012.0.copyload = load <2 x float>, ptr %51, align 4
  %52 = call <2 x float> @_Zml4vec2f(<2 x float> %.sroa.012.0.copyload, float noundef %46)
  %53 = call <2 x float> @_Zpl4vec2S_(<2 x float> %.sroa.014.0.copyload, <2 x float> %52)
  %54 = call <2 x float> @_Zmi4vec2S_(<2 x float> %48, <2 x float> %53)
  %55 = call <2 x float> @_Z9normalize4vec2(<2 x float> %54)
  %56 = load float, ptr %0, align 8, !tbaa !12
  %57 = call noundef float @_Z6length4vec2(<2 x float> %54)
  %58 = fsub float %56, %57
  %59 = call <2 x float> @_Zml4vec2f(<2 x float> %55, float noundef %58)
  store <2 x float> %59, ptr %3, align 8
  %60 = load float, ptr %16, align 4, !tbaa !13
  %61 = call <2 x float> @_ZN4vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8) %3, float noundef %60)
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = load i8, ptr %62, align 4, !tbaa !14, !range !18, !noundef !19
  %64 = trunc nuw i8 %63 to i1
  br i1 %64, label %72, label %65

65:                                               ; preds = %42
  %.sroa.05.0.copyload = load <2 x float>, ptr %3, align 8
  %66 = getelementptr inbounds i8, ptr %62, i64 28
  %67 = load float, ptr %66, align 4, !tbaa !20
  %68 = call <2 x float> @_Zdv4vec2f(<2 x float> %.sroa.05.0.copyload, float noundef %67)
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %69, i64 48
  %71 = call <2 x float> @_ZN4vec2pLES_(ptr noundef nonnull align 4 dereferenceable(8) %70, <2 x float> %68)
  br label %72

72:                                               ; preds = %65, %42
  %73 = load ptr, ptr %7, align 8, !tbaa !11
  %74 = load i8, ptr %73, align 4, !tbaa !14, !range !18, !noundef !19
  %75 = trunc nuw i8 %74 to i1
  br i1 %75, label %85, label %76

76:                                               ; preds = %72
  %.sroa.01.0.copyload = load <2 x float>, ptr %3, align 8
  %77 = call <2 x float> @_Zng4vec2(<2 x float> %.sroa.01.0.copyload)
  %78 = load ptr, ptr %7, align 8, !tbaa !11
  %79 = getelementptr inbounds i8, ptr %78, i64 28
  %80 = load float, ptr %79, align 4, !tbaa !20
  %81 = call <2 x float> @_Zdv4vec2f(<2 x float> %77, float noundef %80)
  %82 = load ptr, ptr %7, align 8, !tbaa !11
  %83 = getelementptr inbounds i8, ptr %82, i64 48
  %84 = call <2 x float> @_ZN4vec2pLES_(ptr noundef nonnull align 4 dereferenceable(8) %83, <2 x float> %81)
  br label %85

85:                                               ; preds = %76, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  ret void
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Zmi4vec2S_(<2 x float>, <2 x float>) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Zml4vec2f(<2 x float>, float noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Z9normalize4vec2(<2 x float>) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z6length4vec2(<2 x float>) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZN4vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8), float noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Zdv4vec2f(<2 x float>, float noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZN4vec2pLES_(ptr noundef nonnull align 4 dereferenceable(8), <2 x float>) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Zng4vec2(<2 x float>) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Zpl4vec2S_(<2 x float>, <2 x float>) local_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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !10, i64 16}
!6 = !{!"_ZTS6Spring", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!6, !7, i64 0}
!13 = !{!6, !7, i64 4}
!14 = !{!15, !16, i64 0}
!15 = !{!"_ZTS8Particle", !16, i64 0, !17, i64 4, !17, i64 12, !7, i64 20, !7, i64 24, !7, i64 28, !17, i64 32, !8, i64 40}
!16 = !{!"bool", !8, i64 0}
!17 = !{!"_ZTS4vec2", !7, i64 0, !7, i64 4}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!15, !7, i64 28}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass