; LLVM IR from mtsamis/box2d-optimized :: src/rope/b2_rope.ll (ZN6b2Rope16SolveStretch_PBDEv)

; 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.b2Vec2 = type { float, float }
%class.b2Rope = type { %struct.b2Vec2, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.b2Vec2, %struct.b2RopeTuning }
%struct.b2RopeTuning = type <{ i32, i32, float, float, float, float, float, float, float, i8, i8, i8, i8 }>
%struct.b2RopeStretch = type { i32, i32, float, float, float, 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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6b2Rope16SolveStretch_PBDEv(ptr noundef nonnull align 8 dereferenceable(128) %0) #4 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca float, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca %struct.b2Vec2, align 4
  %8 = alloca %struct.b2Vec2, align 4
  %9 = alloca %struct.b2Vec2, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca %struct.b2Vec2, align 4
  %15 = alloca %struct.b2Vec2, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %16 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %17 = getelementptr inbounds %class.b2Rope, ptr %16, i32 0, i32 12
  %18 = getelementptr inbounds %struct.b2RopeTuning, ptr %17, i32 0, i32 3
  %19 = load float, ptr %18, align 4, !tbaa !9
  store float %19, ptr %3, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !19
  br label %20

20:                                               ; preds = %106, %1
  %21 = load i32, ptr %4, align 4, !tbaa !19
  %22 = getelementptr inbounds %class.b2Rope, ptr %16, i32 0, i32 2
  %23 = load i32, ptr %22, align 4, !tbaa !20
  %24 = icmp slt i32 %21, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %20
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %109

26:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %27 = getelementptr inbounds %class.b2Rope, ptr %16, i32 0, i32 4
  %28 = load ptr, ptr %27, align 8, !tbaa !21
  %29 = load i32, ptr %4, align 4, !tbaa !19
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds %struct.b2RopeStretch, ptr %28, i64 %30
  store ptr %31, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %32 = getelementptr inbounds %class.b2Rope, ptr %16, i32 0, i32 7
  %33 = load ptr, ptr %32, align 8, !tbaa !22
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.b2RopeStretch, ptr %34, i32 0, i32 0
  %36 = load i32, ptr %35, align 4, !tbaa !23
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds %struct.b2Vec2, ptr %33, i64 %37
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 %38, i64 8, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %39 = getelementptr inbounds %class.b2Rope, ptr %16, i32 0, i32 7
  %40 = load ptr, ptr %39, align 8, !tbaa !22
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.b2RopeStretch, ptr %41, i32 0, i32 1
  %43 = load i32, ptr %42, align 4, !tbaa !26
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds %struct.b2Vec2, ptr %40, i64 %44
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %45, i64 8, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %46 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %7)
  store <2 x float> %46, ptr %9, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %47 = call noundef float @_ZN6b2Vec29NormalizeEv(ptr noundef nonnull align 4 dereferenceable(8) %9)
  store float %47, ptr %10, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.b2RopeStretch, ptr %48, i32 0, i32 2
  %50 = load float, ptr %49, align 4, !tbaa !27
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.b2RopeStretch, ptr %51, i32 0, i32 3
  %53 = load float, ptr %52, align 4, !tbaa !28
  %54 = fadd float %50, %53
  store float %54, ptr %11, align 4, !tbaa !18
  %55 = load float, ptr %11, align 4, !tbaa !18
  %56 = fcmp oeq float %55, 0.000000e+00
  br i1 %56, label %57, label %58

57:                                               ; preds = %26
  store i32 4, ptr %5, align 4
  br label %103

58:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.b2RopeStretch, ptr %59, i32 0, i32 2
  %61 = load float, ptr %60, align 4, !tbaa !27
  %62 = load float, ptr %11, align 4, !tbaa !18
  %63 = fdiv float %61, %62
  store float %63, ptr %12, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.b2RopeStretch, ptr %64, i32 0, i32 3
  %66 = load float, ptr %65, align 4, !tbaa !28
  %67 = load float, ptr %11, align 4, !tbaa !18
  %68 = fdiv float %66, %67
  store float %68, ptr %13, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %69 = load float, ptr %3, align 4, !tbaa !18
  %70 = load float, ptr %12, align 4, !tbaa !18
  %71 = fmul float %69, %70
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.b2RopeStretch, ptr %72, i32 0, i32 4
  %74 = load float, ptr %73, align 4, !tbaa !29
  %75 = load float, ptr %10, align 4, !tbaa !18
  %76 = fsub float %74, %75
  %77 = fmul float %71, %76
  %78 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %77, ptr noundef nonnull align 4 dereferenceable(8) %9)
  store <2 x float> %78, ptr %14, align 4
  call void @_ZN6b2Vec2mIERKS_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %79 = load float, ptr %3, align 4, !tbaa !18
  %80 = load float, ptr %13, align 4, !tbaa !18
  %81 = fmul float %79, %80
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.b2RopeStretch, ptr %82, i32 0, i32 4
  %84 = load float, ptr %83, align 4, !tbaa !29
  %85 = load float, ptr %10, align 4, !tbaa !18
  %86 = fsub float %84, %85
  %87 = fmul float %81, %86
  %88 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %87, ptr noundef nonnull align 4 dereferenceable(8) %9)
  store <2 x float> %88, ptr %15, align 4
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %89 = getelementptr inbounds %class.b2Rope, ptr %16, i32 0, i32 7
  %90 = load ptr, ptr %89, align 8, !tbaa !22
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.b2RopeStretch, ptr %91, i32 0, i32 0
  %93 = load i32, ptr %92, align 4, !tbaa !23
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds %struct.b2Vec2, ptr %90, i64 %94
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %95, ptr align 4 %7, i64 8, i1 false), !tbaa.struct !25
  %96 = getelementptr inbounds %class.b2Rope, ptr %16, i32 0, i32 7
  %97 = load ptr, ptr %96, align 8, !tbaa !22
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.b2RopeStretch, ptr %98, i32 0, i32 1
  %100 = load i32, ptr %99, align 4, !tbaa !26
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds %struct.b2Vec2, ptr %97, i64 %101
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %102, ptr align 4 %8, i64 8, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  store i32 0, ptr %5, align 4
  br label %103

103:                                              ; preds = %58, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, 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
  %104 = load i32, ptr %5, align 4
  switch i32 %104, label %110 [
    i32 0, label %105
    i32 4, label %106
  ]

105:                                              ; preds = %103
  br label %106

106:                                              ; preds = %105, %103
  %107 = load i32, ptr %4, align 4, !tbaa !19
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %4, align 4, !tbaa !19
  br label %20, !llvm.loop !30

109:                                              ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  ret void

110:                                              ; preds = %103
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN6b2Vec29NormalizeEv(ptr noundef nonnull align 4 dereferenceable(8)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2mIERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3 align 2

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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"="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 = { 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, !12, i64 100}
!10 = !{!"_ZTS6b2Rope", !11, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !11, i64 80, !14, i64 88}
!11 = !{!"_ZTS6b2Vec2", !12, i64 0, !12, i64 4}
!12 = !{!"float", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTS12b2RopeTuning", !15, i64 0, !16, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !17, i64 36, !17, i64 37, !17, i64 38}
!15 = !{!"_ZTS17b2StretchingModel", !7, i64 0}
!16 = !{!"_ZTS14b2BendingModel", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!12, !12, i64 0}
!19 = !{!13, !13, i64 0}
!20 = !{!10, !13, i64 12}
!21 = !{!10, !6, i64 24}
!22 = !{!10, !6, i64 48}
!23 = !{!24, !13, i64 0}
!24 = !{!"_ZTS13b2RopeStretch", !13, i64 0, !13, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28}
!25 = !{i64 0, i64 4, !18, i64 4, i64 4, !18}
!26 = !{!24, !13, i64 4}
!27 = !{!24, !12, i64 8}
!28 = !{!24, !12, i64 12}
!29 = !{!24, !12, i64 16}
!30 = distinct !{!30, !31}
!31 = !{!"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"

%struct.b2Vec2 = type { float, float }
%struct.b2RopeStretch = type { i32, i32, float, float, float, 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

; 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 <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6b2Rope16SolveStretch_PBDEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(128) %0) local_unnamed_addr #3 align 2 {
  %2 = alloca %struct.b2Vec2, align 8
  %3 = alloca %struct.b2Vec2, align 8
  %4 = alloca %struct.b2Vec2, align 8
  %5 = alloca %struct.b2Vec2, align 8
  %6 = alloca %struct.b2Vec2, align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 100
  %8 = load float, ptr %7, align 4, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 12
  %10 = load i32, ptr %9, align 4, !tbaa !17
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %13 = getelementptr inbounds i8, ptr %0, i64 48
  br label %14

._crit_edge:                                      ; preds = %59, %1
  ret void

14:                                               ; preds = %.lr.ph, %59
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %59 ]
  %15 = load ptr, ptr %12, align 8, !tbaa !18
  %16 = getelementptr inbounds %struct.b2RopeStretch, ptr %15, i64 %indvars.iv
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %17 = load ptr, ptr %13, align 8, !tbaa !19
  %18 = load i32, ptr %16, align 4, !tbaa !20
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds %struct.b2Vec2, ptr %17, i64 %19
  %21 = load i64, ptr %20, align 4
  store i64 %21, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %22 = getelementptr inbounds i8, ptr %16, i64 4
  %23 = load i32, ptr %22, align 4, !tbaa !22
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds %struct.b2Vec2, ptr %17, i64 %24
  %26 = load i64, ptr %25, align 4
  store i64 %26, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %27 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %2)
  store <2 x float> %27, ptr %4, align 8
  %28 = call noundef float @_ZN6b2Vec29NormalizeEv(ptr noundef nonnull align 4 dereferenceable(8) %4)
  %29 = getelementptr inbounds i8, ptr %16, i64 8
  %30 = load float, ptr %29, align 4, !tbaa !23
  %31 = getelementptr inbounds i8, ptr %16, i64 12
  %32 = load float, ptr %31, align 4, !tbaa !24
  %33 = fadd float %30, %32
  %34 = fcmp oeq float %33, 0.000000e+00
  br i1 %34, label %59, label %35

35:                                               ; preds = %14
  %36 = fdiv float %30, %33
  %37 = fdiv float %32, %33
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %38 = fmul float %8, %36
  %39 = getelementptr inbounds i8, ptr %16, i64 16
  %40 = load float, ptr %39, align 4, !tbaa !25
  %41 = fsub float %40, %28
  %42 = fmul float %38, %41
  %43 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %42, ptr noundef nonnull align 4 dereferenceable(8) %4)
  store <2 x float> %43, ptr %5, align 8
  call void @_ZN6b2Vec2mIERKS_(ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %44 = fmul float %8, %37
  %45 = load float, ptr %39, align 4, !tbaa !25
  %46 = fsub float %45, %28
  %47 = fmul float %44, %46
  %48 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %47, ptr noundef nonnull align 4 dereferenceable(8) %4)
  store <2 x float> %48, ptr %6, align 8
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %49 = load ptr, ptr %13, align 8, !tbaa !19
  %50 = load i32, ptr %16, align 4, !tbaa !20
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds %struct.b2Vec2, ptr %49, i64 %51
  %53 = load i64, ptr %2, align 8
  store i64 %53, ptr %52, align 4
  %54 = load ptr, ptr %13, align 8, !tbaa !19
  %55 = load i32, ptr %22, align 4, !tbaa !22
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds %struct.b2Vec2, ptr %54, i64 %56
  %58 = load i64, ptr %3, align 8
  store i64 %58, ptr %57, align 4
  br label %59

59:                                               ; preds = %14, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %60 = load i32, ptr %9, align 4, !tbaa !17
  %61 = sext i32 %60 to i64
  %62 = icmp slt i64 %indvars.iv.next, %61
  br i1 %62, label %14, label %._crit_edge, !llvm.loop !26
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN6b2Vec29NormalizeEv(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2mIERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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, !8, i64 100}
!6 = !{!"_ZTS6b2Rope", !7, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !7, i64 80, !13, i64 88}
!7 = !{!"_ZTS6b2Vec2", !8, i64 0, !8, i64 4}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"any pointer", !9, i64 0}
!13 = !{!"_ZTS12b2RopeTuning", !14, i64 0, !15, i64 4, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20, !8, i64 24, !8, i64 28, !8, i64 32, !16, i64 36, !16, i64 37, !16, i64 38}
!14 = !{!"_ZTS17b2StretchingModel", !9, i64 0}
!15 = !{!"_ZTS14b2BendingModel", !9, i64 0}
!16 = !{!"bool", !9, i64 0}
!17 = !{!6, !11, i64 12}
!18 = !{!6, !12, i64 24}
!19 = !{!6, !12, i64 48}
!20 = !{!21, !11, i64 0}
!21 = !{!"_ZTS13b2RopeStretch", !11, i64 0, !11, i64 4, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20, !8, i64 24, !8, i64 28}
!22 = !{!21, !11, i64 4}
!23 = !{!21, !8, i64 8}
!24 = !{!21, !8, i64 12}
!25 = !{!21, !8, i64 16}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass