; LLVM IR from ClementineAccount/Albuquerque :: lib/bullet/include/Bullet3Dynamics/ConstraintSolver (b3PgsJacobiSolver)

; 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.b3ProfileZone = type { i8 }
%class.b3Vector3 = type { %union.anon }
%union.anon = type { [4 x float] }
%class.b3PgsJacobiSolver = type { ptr, %class.b3AlignedObjectArray, %class.b3AlignedObjectArray.0, %class.b3AlignedObjectArray.0, %class.b3AlignedObjectArray.0, %class.b3AlignedObjectArray.0, %class.b3AlignedObjectArray.2, %class.b3AlignedObjectArray.2, %class.b3AlignedObjectArray.2, %class.b3AlignedObjectArray.4, %class.b3AlignedObjectArray.2, %class.b3AlignedObjectArray.2, %class.b3AlignedObjectArray.6, %class.b3AlignedObjectArray.6, i8, i32, i32, i64 }
%class.b3AlignedObjectArray = type <{ [4 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }>
%class.b3AlignedObjectArray.0 = type <{ [4 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }>
%class.b3AlignedObjectArray.4 = type <{ [4 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }>
%class.b3AlignedObjectArray.2 = type <{ [4 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }>
%class.b3AlignedObjectArray.6 = type <{ [4 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }>
%struct.b3SolverBody = type <{ %class.b3Transform, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %union.anon.8, [3 x i32], [12 x i8] }>
%class.b3Transform = type { %class.b3Matrix3x3, %class.b3Vector3 }
%class.b3Matrix3x3 = type { [3 x %class.b3Vector3] }
%union.anon.8 = type { ptr }

@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZmlRK9b3Vector3RKf(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13b3ProfileZoneC2EPKc(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN13b3ProfileZoneD2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { <2 x float>, <2 x float> } @_Z13b3MakeVector3fff(float noundef, float noundef, float noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK20b3AlignedObjectArrayI12b3SolverBodyE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25)) #5 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9b3Vector36isZeroEv(ptr noundef nonnull align 16 dereferenceable(16)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN20b3AlignedObjectArrayI9b3Vector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef, ptr noundef nonnull align 16 dereferenceable(16)) #7 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17b3PgsJacobiSolver17averageVelocitiesEv(ptr noundef nonnull align 8 dereferenceable(448) %0) #8 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %class.b3ProfileZone, align 1
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %class.b3Vector3, align 16
  %8 = alloca %class.b3Vector3, align 16
  %9 = alloca %class.b3Vector3, align 16
  %10 = alloca %class.b3Vector3, align 16
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca float, align 4
  %16 = alloca %class.b3Vector3, align 16
  %17 = alloca %class.b3Vector3, align 16
  store ptr %0, ptr %2, align 8, !tbaa !5
  %18 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #9
  call void @_ZN13b3ProfileZoneC2EPKc(ptr noundef nonnull align 1 dereferenceable(1) %3, ptr noundef @.str.3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #9
  %19 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 10
  %20 = invoke noundef i32 @_ZNK20b3AlignedObjectArrayIiE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %19)
          to label %21 unwind label %55

21:                                               ; preds = %1
  store i32 %20, ptr %4, align 4, !tbaa !9
  %22 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 12
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #9
  call void @llvm.memset.p0.i64(ptr align 16 %7, i8 0, i64 16, i1 false)
  invoke void @_ZN20b3AlignedObjectArrayI9b3Vector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25) %22, i32 noundef 0, ptr noundef nonnull align 16 dereferenceable(16) %7)
          to label %23 unwind label %59

23:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #9
  %24 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 12
  %25 = load i32, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #9
  %26 = invoke { <2 x float>, <2 x float> } @_Z13b3MakeVector3fff(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %27 unwind label %63

27:                                               ; preds = %23
  %28 = getelementptr inbounds %class.b3Vector3, ptr %8, i32 0, i32 0
  %29 = getelementptr inbounds %union.anon, ptr %28, i32 0, i32 0
  %30 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %29, i32 0, i32 0
  %31 = extractvalue { <2 x float>, <2 x float> } %26, 0
  store <2 x float> %31, ptr %30, align 16
  %32 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %29, i32 0, i32 1
  %33 = extractvalue { <2 x float>, <2 x float> } %26, 1
  store <2 x float> %33, ptr %32, align 8
  invoke void @_ZN20b3AlignedObjectArrayI9b3Vector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25) %24, i32 noundef %25, ptr noundef nonnull align 16 dereferenceable(16) %8)
          to label %34 unwind label %63

34:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #9
  %35 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 13
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #9
  call void @llvm.memset.p0.i64(ptr align 16 %9, i8 0, i64 16, i1 false)
  invoke void @_ZN20b3AlignedObjectArrayI9b3Vector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25) %35, i32 noundef 0, ptr noundef nonnull align 16 dereferenceable(16) %9)
          to label %36 unwind label %67

36:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #9
  %37 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 13
  %38 = load i32, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #9
  %39 = invoke { <2 x float>, <2 x float> } @_Z13b3MakeVector3fff(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %40 unwind label %71

40:                                               ; preds = %36
  %41 = getelementptr inbounds %class.b3Vector3, ptr %10, i32 0, i32 0
  %42 = getelementptr inbounds %union.anon, ptr %41, i32 0, i32 0
  %43 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %42, i32 0, i32 0
  %44 = extractvalue { <2 x float>, <2 x float> } %39, 0
  store <2 x float> %44, ptr %43, align 16
  %45 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %42, i32 0, i32 1
  %46 = extractvalue { <2 x float>, <2 x float> } %39, 1
  store <2 x float> %46, ptr %45, align 8
  invoke void @_ZN20b3AlignedObjectArrayI9b3Vector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25) %37, i32 noundef %38, ptr noundef nonnull align 16 dereferenceable(16) %10)
          to label %47 unwind label %71

47:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %123, %47
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 1
  %51 = invoke noundef i32 @_ZNK20b3AlignedObjectArrayI12b3SolverBodyE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %50)
          to label %52 unwind label %75

52:                                               ; preds = %48
  %53 = icmp slt i32 %49, %51
  br i1 %53, label %79, label %54

54:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  br label %127

55:                                               ; preds = %1
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %5, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %6, align 4
  br label %219

59:                                               ; preds = %21
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %5, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #9
  br label %219

63:                                               ; preds = %27, %23
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %5, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #9
  br label %219

67:                                               ; preds = %34
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %5, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #9
  br label %219

71:                                               ; preds = %40, %36
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %5, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #9
  br label %219

75:                                               ; preds = %83, %79, %48
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %5, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %6, align 4
  br label %126

79:                                               ; preds = %52
  %80 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 1
  %81 = load i32, ptr %11, align 4, !tbaa !9
  %82 = invoke noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %80, i32 noundef %81)
          to label %83 unwind label %75

83:                                               ; preds = %79
  %84 = getelementptr inbounds %struct.b3SolverBody, ptr %82, i32 0, i32 5
  %85 = invoke noundef zeroext i1 @_ZNK9b3Vector36isZeroEv(ptr noundef nonnull align 16 dereferenceable(16) %84)
          to label %86 unwind label %75

86:                                               ; preds = %83
  br i1 %85, label %122, label %87

87:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  %88 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 1
  %89 = load i32, ptr %11, align 4, !tbaa !9
  %90 = invoke noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %88, i32 noundef %89)
          to label %91 unwind label %118

91:                                               ; preds = %87
  %92 = getelementptr inbounds %struct.b3SolverBody, ptr %90, i32 0, i32 10
  %93 = load i32, ptr %92, align 16, !tbaa !11
  store i32 %93, ptr %12, align 4, !tbaa !9
  %94 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 1
  %95 = load i32, ptr %11, align 4, !tbaa !9
  %96 = invoke noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %94, i32 noundef %95)
          to label %97 unwind label %118

97:                                               ; preds = %91
  %98 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZNK12b3SolverBody22getDeltaLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(228) %96)
          to label %99 unwind label %118

99:                                               ; preds = %97
  %100 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 12
  %101 = load i32, ptr %12, align 4, !tbaa !9
  %102 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN20b3AlignedObjectArrayI9b3Vector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %100, i32 noundef %101)
          to label %103 unwind label %118

103:                                              ; preds = %99
  %104 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN9b3Vector3pLERKS_(ptr noundef nonnull align 16 dereferenceable(16) %102, ptr noundef nonnull align 16 dereferenceable(16) %98)
          to label %105 unwind label %118

105:                                              ; preds = %103
  %106 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 1
  %107 = load i32, ptr %11, align 4, !tbaa !9
  %108 = invoke noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %106, i32 noundef %107)
          to label %109 unwind label %118

109:                                              ; preds = %105
  %110 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZNK12b3SolverBody23getDeltaAngularVelocityEv(ptr noundef nonnull align 16 dereferenceable(228) %108)
          to label %111 unwind label %118

111:                                              ; preds = %109
  %112 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 13
  %113 = load i32, ptr %12, align 4, !tbaa !9
  %114 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN20b3AlignedObjectArrayI9b3Vector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %112, i32 noundef %113)
          to label %115 unwind label %118

115:                                              ; preds = %111
  %116 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN9b3Vector3pLERKS_(ptr noundef nonnull align 16 dereferenceable(16) %114, ptr noundef nonnull align 16 dereferenceable(16) %110)
          to label %117 unwind label %118

117:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %122

118:                                              ; preds = %115, %111, %109, %105, %103, %99, %97, %91, %87
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %5, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %126

122:                                              ; preds = %117, %86
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %11, align 4, !tbaa !9
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %11, align 4, !tbaa !9
  br label %48, !llvm.loop !12

126:                                              ; preds = %118, %75
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  br label %219

127:                                              ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %213, %127
  %129 = load i32, ptr %13, align 4, !tbaa !9
  %130 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 1
  %131 = invoke noundef i32 @_ZNK20b3AlignedObjectArrayI12b3SolverBodyE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %130)
          to label %132 unwind label %135

132:                                              ; preds = %128
  %133 = icmp slt i32 %129, %131
  br i1 %133, label %139, label %134

134:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %218

135:                                              ; preds = %128
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %5, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %6, align 4
  br label %217

139:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  %140 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 1
  %141 = load i32, ptr %13, align 4, !tbaa !9
  %142 = invoke noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %140, i32 noundef %141)
          to label %143 unwind label %195

143:                                              ; preds = %139
  %144 = getelementptr inbounds %struct.b3SolverBody, ptr %142, i32 0, i32 10
  %145 = load i32, ptr %144, align 16, !tbaa !11
  store i32 %145, ptr %14, align 4, !tbaa !9
  %146 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 1
  %147 = load i32, ptr %13, align 4, !tbaa !9
  %148 = invoke noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %146, i32 noundef %147)
          to label %149 unwind label %195

149:                                              ; preds = %143
  %150 = getelementptr inbounds %struct.b3SolverBody, ptr %148, i32 0, i32 5
  %151 = invoke noundef zeroext i1 @_ZNK9b3Vector36isZeroEv(ptr noundef nonnull align 16 dereferenceable(16) %150)
          to label %152 unwind label %195

152:                                              ; preds = %149
  br i1 %151, label %212, label %153

153:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  %154 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 10
  %155 = load i32, ptr %14, align 4, !tbaa !9
  %156 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25) %154, i32 noundef %155)
          to label %157 unwind label %199

157:                                              ; preds = %153
  %158 = load i32, ptr %156, align 4, !tbaa !9
  %159 = sitofp i32 %158 to float
  %160 = fdiv float 1.000000e+00, %159
  store float %160, ptr %15, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #9
  %161 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 12
  %162 = load i32, ptr %14, align 4, !tbaa !9
  %163 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN20b3AlignedObjectArrayI9b3Vector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %161, i32 noundef %162)
          to label %164 unwind label %203

164:                                              ; preds = %157
  %165 = invoke { <2 x float>, <2 x float> } @_ZmlRK9b3Vector3RKf(ptr noundef nonnull align 16 dereferenceable(16) %163, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %166 unwind label %203

166:                                              ; preds = %164
  %167 = getelementptr inbounds %class.b3Vector3, ptr %16, i32 0, i32 0
  %168 = getelementptr inbounds %union.anon, ptr %167, i32 0, i32 0
  %169 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %168, i32 0, i32 0
  %170 = extractvalue { <2 x float>, <2 x float> } %165, 0
  store <2 x float> %170, ptr %169, align 16
  %171 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %168, i32 0, i32 1
  %172 = extractvalue { <2 x float>, <2 x float> } %165, 1
  store <2 x float> %172, ptr %171, align 8
  %173 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 1
  %174 = load i32, ptr %13, align 4, !tbaa !9
  %175 = invoke noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %173, i32 noundef %174)
          to label %176 unwind label %203

176:                                              ; preds = %166
  %177 = getelementptr inbounds %struct.b3SolverBody, ptr %175, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %177, ptr align 16 %16, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #9
  %178 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 13
  %179 = load i32, ptr %14, align 4, !tbaa !9
  %180 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN20b3AlignedObjectArrayI9b3Vector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %178, i32 noundef %179)
          to label %181 unwind label %207

181:                                              ; preds = %176
  %182 = invoke { <2 x float>, <2 x float> } @_ZmlRK9b3Vector3RKf(ptr noundef nonnull align 16 dereferenceable(16) %180, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %183 unwind label %207

183:                                              ; preds = %181
  %184 = getelementptr inbounds %class.b3Vector3, ptr %17, i32 0, i32 0
  %185 = getelementptr inbounds %union.anon, ptr %184, i32 0, i32 0
  %186 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %185, i32 0, i32 0
  %187 = extractvalue { <2 x float>, <2 x float> } %182, 0
  store <2 x float> %187, ptr %186, align 16
  %188 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %185, i32 0, i32 1
  %189 = extractvalue { <2 x float>, <2 x float> } %182, 1
  store <2 x float> %189, ptr %188, align 8
  %190 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %18, i32 0, i32 1
  %191 = load i32, ptr %13, align 4, !tbaa !9
  %192 = invoke noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %190, i32 noundef %191)
          to label %193 unwind label %207

193:                                              ; preds = %183
  %194 = getelementptr inbounds %struct.b3SolverBody, ptr %192, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %194, ptr align 16 %17, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  br label %212

195:                                              ; preds = %149, %143, %139
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %5, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %6, align 4
  br label %216

199:                                              ; preds = %153
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %5, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %6, align 4
  br label %211

203:                                              ; preds = %166, %164, %157
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %5, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #9
  br label %211

207:                                              ; preds = %183, %181, %176
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %5, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #9
  br label %211

211:                                              ; preds = %207, %203, %199
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  br label %216

212:                                              ; preds = %193, %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  br label %213

213:                                              ; preds = %212
  %214 = load i32, ptr %13, align 4, !tbaa !9
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %13, align 4, !tbaa !9
  br label %128, !llvm.loop !17

216:                                              ; preds = %211, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  br label %217

217:                                              ; preds = %216, %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %219

218:                                              ; preds = %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  call void @_ZN13b3ProfileZoneD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #9
  ret void

219:                                              ; preds = %217, %126, %71, %67, %63, %59, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  call void @_ZN13b3ProfileZoneD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #9
  br label %220

220:                                              ; preds = %219
  %221 = load ptr, ptr %5, align 8
  %222 = load i32, ptr %6, align 4
  %223 = insertvalue { ptr, i32 } poison, ptr %221, 0
  %224 = insertvalue { ptr, i32 } %223, i32 %222, 1
  resume { ptr, i32 } %224
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK20b3AlignedObjectArrayIiE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZNK12b3SolverBody22getDeltaLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(228)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZN20b3AlignedObjectArrayI9b3Vector3EixEi(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZN9b3Vector3pLERKS_(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZNK12b3SolverBody23getDeltaAngularVelocityEv(ptr noundef nonnull align 16 dereferenceable(228)) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree 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 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 #9 = { 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 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{i64 0, i64 16, !11}
!17 = distinct !{!17, !13}


; 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.b3ProfileZone = type { i8 }
%class.b3Vector3 = type { %union.anon }
%union.anon = type { [4 x float] }

@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13b3ProfileZoneC2EPKc(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN13b3ProfileZoneD2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { <2 x float>, <2 x float> } @_Z13b3MakeVector3fff(float noundef, float noundef, float noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK20b3AlignedObjectArrayI12b3SolverBodyE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9b3Vector36isZeroEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN20b3AlignedObjectArrayI9b3Vector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef, ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17b3PgsJacobiSolver17averageVelocitiesEv(ptr noundef nonnull align 8 dereferenceable(448) %0) local_unnamed_addr #7 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %class.b3ProfileZone, align 1
  %3 = alloca %class.b3Vector3, align 16
  %4 = alloca %class.b3Vector3, align 16
  %5 = alloca %class.b3Vector3, align 16
  %6 = alloca %class.b3Vector3, align 16
  %7 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #8
  call void @_ZN13b3ProfileZoneC2EPKc(ptr noundef nonnull align 1 dereferenceable(1) %2, ptr noundef nonnull @.str.3)
  %8 = getelementptr inbounds i8, ptr %0, i64 296
  %9 = call noundef i32 @_ZNK20b3AlignedObjectArrayIiE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
  %10 = getelementptr inbounds i8, ptr %0, i64 360
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %3, i8 0, i64 16, i1 false)
  invoke void @_ZN20b3AlignedObjectArrayI9b3Vector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25) %10, i32 noundef 0, ptr noundef nonnull align 16 dereferenceable(16) %3)
          to label %11 unwind label %29

11:                                               ; preds = %1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  %12 = call { <2 x float>, <2 x float> } @_Z13b3MakeVector3fff(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %13 = extractvalue { <2 x float>, <2 x float> } %12, 0
  store <2 x float> %13, ptr %4, align 16
  %14 = getelementptr inbounds i8, ptr %4, i64 8
  %15 = extractvalue { <2 x float>, <2 x float> } %12, 1
  store <2 x float> %15, ptr %14, align 8
  invoke void @_ZN20b3AlignedObjectArrayI9b3Vector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25) %10, i32 noundef %9, ptr noundef nonnull align 16 dereferenceable(16) %4)
          to label %16 unwind label %31

16:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  %17 = getelementptr inbounds i8, ptr %0, i64 392
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %5, i8 0, i64 16, i1 false)
  invoke void @_ZN20b3AlignedObjectArrayI9b3Vector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25) %17, i32 noundef 0, ptr noundef nonnull align 16 dereferenceable(16) %5)
          to label %18 unwind label %33

18:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #8
  %19 = call { <2 x float>, <2 x float> } @_Z13b3MakeVector3fff(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %20 = extractvalue { <2 x float>, <2 x float> } %19, 0
  store <2 x float> %20, ptr %6, align 16
  %21 = getelementptr inbounds i8, ptr %6, i64 8
  %22 = extractvalue { <2 x float>, <2 x float> } %19, 1
  store <2 x float> %22, ptr %21, align 8
  invoke void @_ZN20b3AlignedObjectArrayI9b3Vector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25) %17, i32 noundef %9, ptr noundef nonnull align 16 dereferenceable(16) %6)
          to label %23 unwind label %35

23:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  %24 = getelementptr inbounds i8, ptr %0, i64 8
  %25 = call noundef i32 @_ZNK20b3AlignedObjectArrayI12b3SolverBodyE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %24)
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph, label %.preheader

.preheader:                                       ; preds = %52, %23
  %27 = call noundef i32 @_ZNK20b3AlignedObjectArrayI12b3SolverBodyE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %24)
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph31, label %._crit_edge

29:                                               ; preds = %1
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  br label %90

31:                                               ; preds = %11
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  br label %90

33:                                               ; preds = %16
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  br label %90

35:                                               ; preds = %18
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  br label %90

.lr.ph:                                           ; preds = %23, %52
  %.02529 = phi i32 [ %53, %52 ], [ 0, %23 ]
  %37 = call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %24, i32 noundef %.02529)
  %38 = getelementptr inbounds i8, ptr %37, i64 128
  %39 = call noundef zeroext i1 @_ZNK9b3Vector36isZeroEv(ptr noundef nonnull align 16 dereferenceable(16) %38)
  br i1 %39, label %52, label %40

40:                                               ; preds = %.lr.ph
  %41 = call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %24, i32 noundef %.02529)
  %42 = getelementptr inbounds i8, ptr %41, i64 208
  %43 = load i32, ptr %42, align 16, !tbaa !5
  %44 = call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %24, i32 noundef %.02529)
  %45 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNK12b3SolverBody22getDeltaLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(228) %44)
  %46 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN20b3AlignedObjectArrayI9b3Vector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %10, i32 noundef %43)
  %47 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN9b3Vector3pLERKS_(ptr noundef nonnull align 16 dereferenceable(16) %46, ptr noundef nonnull align 16 dereferenceable(16) %45)
  %48 = call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %24, i32 noundef %.02529)
  %49 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNK12b3SolverBody23getDeltaAngularVelocityEv(ptr noundef nonnull align 16 dereferenceable(228) %48)
  %50 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN20b3AlignedObjectArrayI9b3Vector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %17, i32 noundef %43)
  %51 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN9b3Vector3pLERKS_(ptr noundef nonnull align 16 dereferenceable(16) %50, ptr noundef nonnull align 16 dereferenceable(16) %49)
  br label %52

52:                                               ; preds = %.lr.ph, %40
  %53 = add nuw nsw i32 %.02529, 1
  %54 = call noundef i32 @_ZNK20b3AlignedObjectArrayI12b3SolverBodyE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %24)
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %.lr.ph, label %.preheader, !llvm.loop !8

._crit_edge:                                      ; preds = %86, %.preheader
  call void @_ZN13b3ProfileZoneD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #8
  ret void

.lr.ph31:                                         ; preds = %.preheader, %86
  %.02630 = phi i32 [ %87, %86 ], [ 0, %.preheader ]
  %56 = call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %24, i32 noundef %.02630)
  %57 = getelementptr inbounds i8, ptr %56, i64 208
  %58 = load i32, ptr %57, align 16, !tbaa !5
  %59 = call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %24, i32 noundef %.02630)
  %60 = getelementptr inbounds i8, ptr %59, i64 128
  %61 = call noundef zeroext i1 @_ZNK9b3Vector36isZeroEv(ptr noundef nonnull align 16 dereferenceable(16) %60)
  br i1 %61, label %86, label %62

62:                                               ; preds = %.lr.ph31
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25) %8, i32 noundef %58)
  %64 = load i32, ptr %63, align 4, !tbaa !10
  %65 = sitofp i32 %64 to float
  %66 = fdiv float 1.000000e+00, %65
  store float %66, ptr %7, align 4, !tbaa !12
  %67 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN20b3AlignedObjectArrayI9b3Vector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %10, i32 noundef %58)
  %68 = invoke { <2 x float>, <2 x float> } @_ZmlRK9b3Vector3RKf(ptr noundef nonnull align 16 dereferenceable(16) %67, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %69 unwind label %81

69:                                               ; preds = %62
  %70 = extractvalue { <2 x float>, <2 x float> } %68, 0
  %71 = extractvalue { <2 x float>, <2 x float> } %68, 1
  %72 = call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %24, i32 noundef %.02630)
  %73 = getelementptr inbounds i8, ptr %72, i64 64
  store <2 x float> %70, ptr %73, align 16
  %.sroa.52.0..sroa_idx = getelementptr inbounds i8, ptr %72, i64 72
  store <2 x float> %71, ptr %.sroa.52.0..sroa_idx, align 8, !tbaa !5
  %74 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN20b3AlignedObjectArrayI9b3Vector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %17, i32 noundef %58)
  %75 = invoke { <2 x float>, <2 x float> } @_ZmlRK9b3Vector3RKf(ptr noundef nonnull align 16 dereferenceable(16) %74, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %76 unwind label %83

76:                                               ; preds = %69
  %77 = extractvalue { <2 x float>, <2 x float> } %75, 0
  %78 = extractvalue { <2 x float>, <2 x float> } %75, 1
  %79 = call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %24, i32 noundef %.02630)
  %80 = getelementptr inbounds i8, ptr %79, i64 80
  store <2 x float> %77, ptr %80, align 16
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %79, i64 88
  store <2 x float> %78, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br label %86

81:                                               ; preds = %62
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %85

83:                                               ; preds = %69
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %85

85:                                               ; preds = %83, %81
  %.pn = phi { ptr, i32 } [ %84, %83 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br label %90

86:                                               ; preds = %76, %.lr.ph31
  %87 = add nuw nsw i32 %.02630, 1
  %88 = call noundef i32 @_ZNK20b3AlignedObjectArrayI12b3SolverBodyE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %24)
  %89 = icmp slt i32 %87, %88
  br i1 %89, label %.lr.ph31, label %._crit_edge, !llvm.loop !14

90:                                               ; preds = %85, %35, %33, %31, %29
  %.pn.pn = phi { ptr, i32 } [ %.pn, %85 ], [ %36, %35 ], [ %34, %33 ], [ %32, %31 ], [ %30, %29 ]
  call void @_ZN13b3ProfileZoneD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #8
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK20b3AlignedObjectArrayIiE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZNK12b3SolverBody22getDeltaLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(228)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZN20b3AlignedObjectArrayI9b3Vector3EixEi(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZN9b3Vector3pLERKS_(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZNK12b3SolverBody23getDeltaAngularVelocityEv(ptr noundef nonnull align 16 dereferenceable(228)) local_unnamed_addr #3 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 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 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !6, i64 0}
!14 = distinct !{!14, !9}


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