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

; 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.b2RopeBend = type { i32, i32, i32, float, float, float, float, float, float, float, float, float, float, float }
%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: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #2

; 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 uwtable
define dso_local void @_ZN6b2Rope4StepEfiRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(128) %0, float noundef %1, i32 noundef %2, ptr noundef nonnull align 4 dereferenceable(8) %3) #3 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca float, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.b2Vec2, align 4
  %13 = alloca %struct.b2Vec2, align 4
  %14 = alloca %struct.b2Vec2, align 4
  %15 = alloca %struct.b2Vec2, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %struct.b2Vec2, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %struct.b2Vec2, align 4
  %23 = alloca %struct.b2Vec2, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store float %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !11
  store ptr %3, ptr %8, align 8, !tbaa !5
  %24 = load ptr, ptr %5, align 8
  %25 = load float, ptr %6, align 4, !tbaa !9
  %26 = fpext float %25 to double
  %27 = fcmp oeq double %26, 0.000000e+00
  br i1 %27, label %28, label %29

28:                                               ; preds = %4
  br label %256

29:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %30 = load float, ptr %6, align 4, !tbaa !9
  %31 = fdiv float 1.000000e+00, %30
  store float %31, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %32 = load float, ptr %6, align 4, !tbaa !9
  %33 = fneg float %32
  %34 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 12
  %35 = getelementptr inbounds %struct.b2RopeTuning, ptr %34, i32 0, i32 2
  %36 = load float, ptr %35, align 8, !tbaa !13
  %37 = fmul float %33, %36
  %38 = call float @expf(float noundef %37) #6, !tbaa !11
  store float %38, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !11
  br label %39

39:                                               ; preds = %90, %29
  %40 = load i32, ptr %11, align 4, !tbaa !11
  %41 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 1
  %42 = load i32, ptr %41, align 8, !tbaa !20
  %43 = icmp slt i32 %40, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %93

45:                                               ; preds = %39
  %46 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 10
  %47 = load ptr, ptr %46, align 8, !tbaa !21
  %48 = load i32, ptr %11, align 4, !tbaa !11
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds float, ptr %47, i64 %49
  %51 = load float, ptr %50, align 4, !tbaa !9
  %52 = fcmp ogt float %51, 0.000000e+00
  br i1 %52, label %53, label %68

53:                                               ; preds = %45
  %54 = load float, ptr %10, align 4, !tbaa !9
  %55 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 9
  %56 = load ptr, ptr %55, align 8, !tbaa !22
  %57 = load i32, ptr %11, align 4, !tbaa !11
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds %struct.b2Vec2, ptr %56, i64 %58
  call void @_ZN6b2Vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8) %59, float noundef %54)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %60 = load float, ptr %6, align 4, !tbaa !9
  %61 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 11
  %62 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %60, ptr noundef nonnull align 4 dereferenceable(8) %61)
  store <2 x float> %62, ptr %12, align 4
  %63 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 9
  %64 = load ptr, ptr %63, align 8, !tbaa !22
  %65 = load i32, ptr %11, align 4, !tbaa !11
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds %struct.b2Vec2, ptr %64, i64 %66
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %67, ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %89

68:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %69 = load float, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %70 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 6
  %71 = load ptr, ptr %70, align 8, !tbaa !23
  %72 = load i32, ptr %11, align 4, !tbaa !11
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds %struct.b2Vec2, ptr %71, i64 %73
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %74, ptr noundef nonnull align 4 dereferenceable(8) %75)
  store <2 x float> %76, ptr %15, align 4
  %77 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 8
  %78 = load ptr, ptr %77, align 8, !tbaa !24
  %79 = load i32, ptr %11, align 4, !tbaa !11
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds %struct.b2Vec2, ptr %78, i64 %80
  %82 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %81)
  store <2 x float> %82, ptr %14, align 4
  %83 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %69, ptr noundef nonnull align 4 dereferenceable(8) %14)
  store <2 x float> %83, ptr %13, align 4
  %84 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 9
  %85 = load ptr, ptr %84, align 8, !tbaa !22
  %86 = load i32, ptr %11, align 4, !tbaa !11
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds %struct.b2Vec2, ptr %85, i64 %87
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %88, ptr align 4 %13, i64 8, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %89

89:                                               ; preds = %68, %53
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %11, align 4, !tbaa !11
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %11, align 4, !tbaa !11
  br label %39, !llvm.loop !26

93:                                               ; preds = %44
  %94 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 12
  %95 = getelementptr inbounds %struct.b2RopeTuning, ptr %94, i32 0, i32 1
  %96 = load i32, ptr %95, align 4, !tbaa !28
  %97 = icmp eq i32 %96, 0
  br i1 %97, label %98, label %100

98:                                               ; preds = %93
  %99 = load float, ptr %6, align 4, !tbaa !9
  call void @_ZN6b2Rope15ApplyBendForcesEf(ptr noundef nonnull align 8 dereferenceable(128) %24, float noundef %99)
  br label %100

100:                                              ; preds = %98, %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !11
  br label %101

101:                                              ; preds = %114, %100
  %102 = load i32, ptr %16, align 4, !tbaa !11
  %103 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 3
  %104 = load i32, ptr %103, align 8, !tbaa !29
  %105 = icmp slt i32 %102, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %117

107:                                              ; preds = %101
  %108 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 5
  %109 = load ptr, ptr %108, align 8, !tbaa !30
  %110 = load i32, ptr %16, align 4, !tbaa !11
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds %struct.b2RopeBend, ptr %109, i64 %111
  %113 = getelementptr inbounds %struct.b2RopeBend, ptr %112, i32 0, i32 7
  store float 0.000000e+00, ptr %113, align 4, !tbaa !31
  br label %114

114:                                              ; preds = %107
  %115 = load i32, ptr %16, align 4, !tbaa !11
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %16, align 4, !tbaa !11
  br label %101, !llvm.loop !33

117:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !11
  br label %118

118:                                              ; preds = %131, %117
  %119 = load i32, ptr %17, align 4, !tbaa !11
  %120 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 2
  %121 = load i32, ptr %120, align 4, !tbaa !34
  %122 = icmp slt i32 %119, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %134

124:                                              ; preds = %118
  %125 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 4
  %126 = load ptr, ptr %125, align 8, !tbaa !35
  %127 = load i32, ptr %17, align 4, !tbaa !11
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds %struct.b2RopeStretch, ptr %126, i64 %128
  %130 = getelementptr inbounds %struct.b2RopeStretch, ptr %129, i32 0, i32 5
  store float 0.000000e+00, ptr %130, align 4, !tbaa !36
  br label %131

131:                                              ; preds = %124
  %132 = load i32, ptr %17, align 4, !tbaa !11
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %17, align 4, !tbaa !11
  br label %118, !llvm.loop !38

134:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %135

135:                                              ; preds = %154, %134
  %136 = load i32, ptr %18, align 4, !tbaa !11
  %137 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 1
  %138 = load i32, ptr %137, align 8, !tbaa !20
  %139 = icmp slt i32 %136, %138
  br i1 %139, label %141, label %140

140:                                              ; preds = %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %157

141:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %142 = load float, ptr %6, align 4, !tbaa !9
  %143 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 9
  %144 = load ptr, ptr %143, align 8, !tbaa !22
  %145 = load i32, ptr %18, align 4, !tbaa !11
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds %struct.b2Vec2, ptr %144, i64 %146
  %148 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %142, ptr noundef nonnull align 4 dereferenceable(8) %147)
  store <2 x float> %148, ptr %19, align 4
  %149 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 7
  %150 = load ptr, ptr %149, align 8, !tbaa !39
  %151 = load i32, ptr %18, align 4, !tbaa !11
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds %struct.b2Vec2, ptr %150, i64 %152
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %153, ptr noundef nonnull align 4 dereferenceable(8) %19)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %154

154:                                              ; preds = %141
  %155 = load i32, ptr %18, align 4, !tbaa !11
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %18, align 4, !tbaa !11
  br label %135, !llvm.loop !40

157:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !11
  br label %158

158:                                              ; preds = %213, %157
  %159 = load i32, ptr %20, align 4, !tbaa !11
  %160 = load i32, ptr %7, align 4, !tbaa !11
  %161 = icmp slt i32 %159, %160
  br i1 %161, label %163, label %162

162:                                              ; preds = %158
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %216

163:                                              ; preds = %158
  %164 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 12
  %165 = getelementptr inbounds %struct.b2RopeTuning, ptr %164, i32 0, i32 1
  %166 = load i32, ptr %165, align 4, !tbaa !28
  %167 = icmp eq i32 %166, 1
  br i1 %167, label %168, label %169

168:                                              ; preds = %163
  call void @_ZN6b2Rope19SolveBend_PBD_AngleEv(ptr noundef nonnull align 8 dereferenceable(128) %24)
  br label %198

169:                                              ; preds = %163
  %170 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 12
  %171 = getelementptr inbounds %struct.b2RopeTuning, ptr %170, i32 0, i32 1
  %172 = load i32, ptr %171, align 4, !tbaa !28
  %173 = icmp eq i32 %172, 2
  br i1 %173, label %174, label %176

174:                                              ; preds = %169
  %175 = load float, ptr %6, align 4, !tbaa !9
  call void @_ZN6b2Rope20SolveBend_XPBD_AngleEf(ptr noundef nonnull align 8 dereferenceable(128) %24, float noundef %175)
  br label %197

176:                                              ; preds = %169
  %177 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 12
  %178 = getelementptr inbounds %struct.b2RopeTuning, ptr %177, i32 0, i32 1
  %179 = load i32, ptr %178, align 4, !tbaa !28
  %180 = icmp eq i32 %179, 3
  br i1 %180, label %181, label %182

181:                                              ; preds = %176
  call void @_ZN6b2Rope22SolveBend_PBD_DistanceEv(ptr noundef nonnull align 8 dereferenceable(128) %24)
  br label %196

182:                                              ; preds = %176
  %183 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 12
  %184 = getelementptr inbounds %struct.b2RopeTuning, ptr %183, i32 0, i32 1
  %185 = load i32, ptr %184, align 4, !tbaa !28
  %186 = icmp eq i32 %185, 4
  br i1 %186, label %187, label %188

187:                                              ; preds = %182
  call void @_ZN6b2Rope20SolveBend_PBD_HeightEv(ptr noundef nonnull align 8 dereferenceable(128) %24)
  br label %195

188:                                              ; preds = %182
  %189 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 12
  %190 = getelementptr inbounds %struct.b2RopeTuning, ptr %189, i32 0, i32 1
  %191 = load i32, ptr %190, align 4, !tbaa !28
  %192 = icmp eq i32 %191, 5
  br i1 %192, label %193, label %194

193:                                              ; preds = %188
  call void @_ZN6b2Rope22SolveBend_PBD_TriangleEv(ptr noundef nonnull align 8 dereferenceable(128) %24)
  br label %194

194:                                              ; preds = %193, %188
  br label %195

195:                                              ; preds = %194, %187
  br label %196

196:                                              ; preds = %195, %181
  br label %197

197:                                              ; preds = %196, %174
  br label %198

198:                                              ; preds = %197, %168
  %199 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 12
  %200 = getelementptr inbounds %struct.b2RopeTuning, ptr %199, i32 0, i32 0
  %201 = load i32, ptr %200, align 8, !tbaa !41
  %202 = icmp eq i32 %201, 0
  br i1 %202, label %203, label %204

203:                                              ; preds = %198
  call void @_ZN6b2Rope16SolveStretch_PBDEv(ptr noundef nonnull align 8 dereferenceable(128) %24)
  br label %212

204:                                              ; preds = %198
  %205 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 12
  %206 = getelementptr inbounds %struct.b2RopeTuning, ptr %205, i32 0, i32 0
  %207 = load i32, ptr %206, align 8, !tbaa !41
  %208 = icmp eq i32 %207, 1
  br i1 %208, label %209, label %211

209:                                              ; preds = %204
  %210 = load float, ptr %6, align 4, !tbaa !9
  call void @_ZN6b2Rope17SolveStretch_XPBDEf(ptr noundef nonnull align 8 dereferenceable(128) %24, float noundef %210)
  br label %211

211:                                              ; preds = %209, %204
  br label %212

212:                                              ; preds = %211, %203
  br label %213

213:                                              ; preds = %212
  %214 = load i32, ptr %20, align 4, !tbaa !11
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %20, align 4, !tbaa !11
  br label %158, !llvm.loop !42

216:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !11
  br label %217

217:                                              ; preds = %252, %216
  %218 = load i32, ptr %21, align 4, !tbaa !11
  %219 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 1
  %220 = load i32, ptr %219, align 8, !tbaa !20
  %221 = icmp slt i32 %218, %220
  br i1 %221, label %223, label %222

222:                                              ; preds = %217
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %255

223:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %224 = load float, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %225 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 7
  %226 = load ptr, ptr %225, align 8, !tbaa !39
  %227 = load i32, ptr %21, align 4, !tbaa !11
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds %struct.b2Vec2, ptr %226, i64 %228
  %230 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 8
  %231 = load ptr, ptr %230, align 8, !tbaa !24
  %232 = load i32, ptr %21, align 4, !tbaa !11
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds %struct.b2Vec2, ptr %231, i64 %233
  %235 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %229, ptr noundef nonnull align 4 dereferenceable(8) %234)
  store <2 x float> %235, ptr %23, align 4
  %236 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %224, ptr noundef nonnull align 4 dereferenceable(8) %23)
  store <2 x float> %236, ptr %22, align 4
  %237 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 9
  %238 = load ptr, ptr %237, align 8, !tbaa !22
  %239 = load i32, ptr %21, align 4, !tbaa !11
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds %struct.b2Vec2, ptr %238, i64 %240
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %241, ptr align 4 %22, i64 8, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  %242 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 7
  %243 = load ptr, ptr %242, align 8, !tbaa !39
  %244 = load i32, ptr %21, align 4, !tbaa !11
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds %struct.b2Vec2, ptr %243, i64 %245
  %247 = getelementptr inbounds %class.b2Rope, ptr %24, i32 0, i32 8
  %248 = load ptr, ptr %247, align 8, !tbaa !24
  %249 = load i32, ptr %21, align 4, !tbaa !11
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds %struct.b2Vec2, ptr %248, i64 %250
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %251, ptr align 4 %246, i64 8, i1 false), !tbaa.struct !25
  br label %252

252:                                              ; preds = %223
  %253 = load i32, ptr %21, align 4, !tbaa !11
  %254 = add nsw i32 %253, 1
  store i32 %254, ptr %21, align 4, !tbaa !11
  br label %217, !llvm.loop !43

255:                                              ; preds = %222
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %256

256:                                              ; preds = %255, %28
  ret void
}

; Function Attrs: nounwind
declare float @expf(float noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8), float noundef) #5 align 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)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6b2Rope15ApplyBendForcesEf(ptr noundef nonnull align 8 dereferenceable(128), float noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6b2Rope19SolveBend_PBD_AngleEv(ptr noundef nonnull align 8 dereferenceable(128)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6b2Rope20SolveBend_XPBD_AngleEf(ptr noundef nonnull align 8 dereferenceable(128), float noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6b2Rope22SolveBend_PBD_DistanceEv(ptr noundef nonnull align 8 dereferenceable(128)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6b2Rope20SolveBend_PBD_HeightEv(ptr noundef nonnull align 8 dereferenceable(128)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6b2Rope22SolveBend_PBD_TriangleEv(ptr noundef nonnull align 8 dereferenceable(128)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6b2Rope16SolveStretch_PBDEv(ptr noundef nonnull align 8 dereferenceable(128)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6b2Rope17SolveStretch_XPBDEf(ptr noundef nonnull align 8 dereferenceable(128), float noundef) #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 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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !10, i64 96}
!14 = !{!"_ZTS6b2Rope", !15, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !15, i64 80, !16, i64 88}
!15 = !{!"_ZTS6b2Vec2", !10, i64 0, !10, i64 4}
!16 = !{!"_ZTS12b2RopeTuning", !17, i64 0, !18, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !19, i64 36, !19, i64 37, !19, i64 38}
!17 = !{!"_ZTS17b2StretchingModel", !7, i64 0}
!18 = !{!"_ZTS14b2BendingModel", !7, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!14, !12, i64 8}
!21 = !{!14, !6, i64 72}
!22 = !{!14, !6, i64 64}
!23 = !{!14, !6, i64 40}
!24 = !{!14, !6, i64 56}
!25 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!14, !18, i64 92}
!29 = !{!14, !12, i64 16}
!30 = !{!14, !6, i64 32}
!31 = !{!32, !10, i64 28}
!32 = !{!"_ZTS10b2RopeBend", !12, i64 0, !12, i64 4, !12, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52}
!33 = distinct !{!33, !27}
!34 = !{!14, !12, i64 12}
!35 = !{!14, !6, i64 24}
!36 = !{!37, !10, i64 20}
!37 = !{!"_ZTS13b2RopeStretch", !12, i64 0, !12, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!38 = distinct !{!38, !27}
!39 = !{!14, !6, i64 48}
!40 = distinct !{!40, !27}
!41 = !{!14, !17, i64 88}
!42 = distinct !{!42, !27}
!43 = distinct !{!43, !27}


; 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.b2RopeBend = type { i32, i32, i32, float, float, float, float, float, float, float, float, float, 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: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) 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

; 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 uwtable
define dso_local void @_ZN6b2Rope4StepEfiRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(128) %0, float noundef %1, i32 noundef %2, ptr noundef nonnull align 4 dereferenceable(8) %3) local_unnamed_addr #2 align 2 {
  %5 = alloca %struct.b2Vec2, align 8
  %6 = alloca %struct.b2Vec2, align 8
  %7 = alloca %struct.b2Vec2, align 8
  %8 = alloca %struct.b2Vec2, align 8
  %9 = alloca %struct.b2Vec2, align 8
  %10 = fcmp oeq float %1, 0.000000e+00
  br i1 %10, label %.loopexit, label %11

11:                                               ; preds = %4
  %12 = fdiv float 1.000000e+00, %1
  %13 = fneg float %1
  %14 = getelementptr inbounds i8, ptr %0, i64 88
  %15 = getelementptr inbounds i8, ptr %0, i64 96
  %16 = load float, ptr %15, align 8, !tbaa !5
  %17 = fmul float %16, %13
  %18 = tail call float @expf(float noundef %17) #5, !tbaa !17
  %19 = getelementptr inbounds i8, ptr %0, i64 8
  %20 = load i32, ptr %19, align 8, !tbaa !18
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %11
  %22 = getelementptr inbounds i8, ptr %0, i64 72
  %23 = getelementptr inbounds i8, ptr %0, i64 40
  %24 = getelementptr inbounds i8, ptr %0, i64 56
  %25 = getelementptr inbounds i8, ptr %0, i64 64
  %26 = getelementptr inbounds i8, ptr %0, i64 80
  br label %30

._crit_edge:                                      ; preds = %51, %11
  %27 = getelementptr inbounds i8, ptr %0, i64 92
  %28 = load i32, ptr %27, align 4, !tbaa !19
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %55, label %56

30:                                               ; preds = %.lr.ph, %51
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %51 ]
  %31 = load ptr, ptr %22, align 8, !tbaa !20
  %32 = getelementptr inbounds float, ptr %31, i64 %indvars.iv
  %33 = load float, ptr %32, align 4, !tbaa !21
  %34 = fcmp ogt float %33, 0.000000e+00
  br i1 %34, label %35, label %41

35:                                               ; preds = %30
  %36 = load ptr, ptr %25, align 8, !tbaa !22
  %37 = getelementptr inbounds %struct.b2Vec2, ptr %36, i64 %indvars.iv
  call void @_ZN6b2Vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8) %37, float noundef %18)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %38 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %1, ptr noundef nonnull align 4 dereferenceable(8) %26)
  store <2 x float> %38, ptr %5, align 8
  %39 = load ptr, ptr %25, align 8, !tbaa !22
  %40 = getelementptr inbounds %struct.b2Vec2, ptr %39, i64 %indvars.iv
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %40, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %51

41:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %42 = load ptr, ptr %23, align 8, !tbaa !23
  %43 = getelementptr inbounds %struct.b2Vec2, ptr %42, i64 %indvars.iv
  %44 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %43, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store <2 x float> %44, ptr %7, align 8
  %45 = load ptr, ptr %24, align 8, !tbaa !24
  %46 = getelementptr inbounds %struct.b2Vec2, ptr %45, i64 %indvars.iv
  %47 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %46)
  store <2 x float> %47, ptr %6, align 8
  %48 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %12, ptr noundef nonnull align 4 dereferenceable(8) %6)
  %49 = load ptr, ptr %25, align 8, !tbaa !22
  %50 = getelementptr inbounds %struct.b2Vec2, ptr %49, i64 %indvars.iv
  store <2 x float> %48, ptr %50, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %51

51:                                               ; preds = %35, %41
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %52 = load i32, ptr %19, align 8, !tbaa !18
  %53 = sext i32 %52 to i64
  %54 = icmp slt i64 %indvars.iv.next, %53
  br i1 %54, label %30, label %._crit_edge, !llvm.loop !25

55:                                               ; preds = %._crit_edge
  call void @_ZN6b2Rope15ApplyBendForcesEf(ptr noundef nonnull align 8 dereferenceable(128) %0, float noundef %1)
  br label %56

56:                                               ; preds = %55, %._crit_edge
  %57 = getelementptr inbounds i8, ptr %0, i64 16
  %58 = load i32, ptr %57, align 8, !tbaa !27
  %59 = icmp sgt i32 %58, 0
  br i1 %59, label %.lr.ph54, label %.preheader50

.lr.ph54:                                         ; preds = %56
  %60 = getelementptr inbounds i8, ptr %0, i64 32
  %61 = load ptr, ptr %60, align 8, !tbaa !28
  %wide.trip.count = zext nneg i32 %58 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %62 = icmp ult i32 %58, 4
  br i1 %62, label %.preheader50.loopexit.unr-lcssa, label %.lr.ph54.new

.lr.ph54.new:                                     ; preds = %.lr.ph54
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %70

.preheader50.loopexit.unr-lcssa:                  ; preds = %70, %.lr.ph54
  %indvars.iv64.unr = phi i64 [ 0, %.lr.ph54 ], [ %indvars.iv.next65.3, %70 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader50, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader50.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv64.epil = phi i64 [ %indvars.iv.next65.epil, %.epil.preheader ], [ %indvars.iv64.unr, %.preheader50.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader50.loopexit.unr-lcssa ]
  %63 = getelementptr inbounds %struct.b2RopeBend, ptr %61, i64 %indvars.iv64.epil, i32 7
  store float 0.000000e+00, ptr %63, align 4, !tbaa !29
  %indvars.iv.next65.epil = add nuw nsw i64 %indvars.iv64.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader50, label %.epil.preheader, !llvm.loop !31

.preheader50:                                     ; preds = %.preheader50.loopexit.unr-lcssa, %.epil.preheader, %56
  %64 = getelementptr inbounds i8, ptr %0, i64 12
  %65 = load i32, ptr %64, align 4, !tbaa !33
  %66 = icmp sgt i32 %65, 0
  br i1 %66, label %.lr.ph56, label %.preheader49

.lr.ph56:                                         ; preds = %.preheader50
  %67 = getelementptr inbounds i8, ptr %0, i64 24
  %68 = load ptr, ptr %67, align 8, !tbaa !34
  %wide.trip.count70 = zext nneg i32 %65 to i64
  %xtraiter80 = and i64 %wide.trip.count70, 3
  %69 = icmp ult i32 %65, 4
  br i1 %69, label %.preheader49.loopexit.unr-lcssa, label %.lr.ph56.new

.lr.ph56.new:                                     ; preds = %.lr.ph56
  %unroll_iter83 = and i64 %wide.trip.count70, 2147483644
  br label %80

70:                                               ; preds = %70, %.lr.ph54.new
  %indvars.iv64 = phi i64 [ 0, %.lr.ph54.new ], [ %indvars.iv.next65.3, %70 ]
  %niter = phi i64 [ 0, %.lr.ph54.new ], [ %niter.next.3, %70 ]
  %71 = getelementptr inbounds %struct.b2RopeBend, ptr %61, i64 %indvars.iv64, i32 7
  store float 0.000000e+00, ptr %71, align 4, !tbaa !29
  %indvars.iv.next65 = or disjoint i64 %indvars.iv64, 1
  %72 = getelementptr inbounds %struct.b2RopeBend, ptr %61, i64 %indvars.iv.next65, i32 7
  store float 0.000000e+00, ptr %72, align 4, !tbaa !29
  %indvars.iv.next65.1 = or disjoint i64 %indvars.iv64, 2
  %73 = getelementptr inbounds %struct.b2RopeBend, ptr %61, i64 %indvars.iv.next65.1, i32 7
  store float 0.000000e+00, ptr %73, align 4, !tbaa !29
  %indvars.iv.next65.2 = or disjoint i64 %indvars.iv64, 3
  %74 = getelementptr inbounds %struct.b2RopeBend, ptr %61, i64 %indvars.iv.next65.2, i32 7
  store float 0.000000e+00, ptr %74, align 4, !tbaa !29
  %indvars.iv.next65.3 = add nuw nsw i64 %indvars.iv64, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader50.loopexit.unr-lcssa, label %70, !llvm.loop !35

.preheader49.loopexit.unr-lcssa:                  ; preds = %80, %.lr.ph56
  %indvars.iv67.unr = phi i64 [ 0, %.lr.ph56 ], [ %indvars.iv.next68.3, %80 ]
  %lcmp.mod82.not = icmp eq i64 %xtraiter80, 0
  br i1 %lcmp.mod82.not, label %.preheader49, label %.epil.preheader79

.epil.preheader79:                                ; preds = %.preheader49.loopexit.unr-lcssa, %.epil.preheader79
  %indvars.iv67.epil = phi i64 [ %indvars.iv.next68.epil, %.epil.preheader79 ], [ %indvars.iv67.unr, %.preheader49.loopexit.unr-lcssa ]
  %epil.iter81 = phi i64 [ %epil.iter81.next, %.epil.preheader79 ], [ 0, %.preheader49.loopexit.unr-lcssa ]
  %75 = getelementptr inbounds %struct.b2RopeStretch, ptr %68, i64 %indvars.iv67.epil, i32 5
  store float 0.000000e+00, ptr %75, align 4, !tbaa !36
  %indvars.iv.next68.epil = add nuw nsw i64 %indvars.iv67.epil, 1
  %epil.iter81.next = add i64 %epil.iter81, 1
  %epil.iter81.cmp.not = icmp eq i64 %epil.iter81.next, %xtraiter80
  br i1 %epil.iter81.cmp.not, label %.preheader49, label %.epil.preheader79, !llvm.loop !38

.preheader49:                                     ; preds = %.preheader49.loopexit.unr-lcssa, %.epil.preheader79, %.preheader50
  %76 = load i32, ptr %19, align 8, !tbaa !18
  %77 = icmp sgt i32 %76, 0
  br i1 %77, label %.lr.ph58, label %.preheader48

.lr.ph58:                                         ; preds = %.preheader49
  %78 = getelementptr inbounds i8, ptr %0, i64 64
  %79 = getelementptr inbounds i8, ptr %0, i64 48
  br label %87

80:                                               ; preds = %80, %.lr.ph56.new
  %indvars.iv67 = phi i64 [ 0, %.lr.ph56.new ], [ %indvars.iv.next68.3, %80 ]
  %niter84 = phi i64 [ 0, %.lr.ph56.new ], [ %niter84.next.3, %80 ]
  %81 = getelementptr inbounds %struct.b2RopeStretch, ptr %68, i64 %indvars.iv67, i32 5
  store float 0.000000e+00, ptr %81, align 4, !tbaa !36
  %indvars.iv.next68 = or disjoint i64 %indvars.iv67, 1
  %82 = getelementptr inbounds %struct.b2RopeStretch, ptr %68, i64 %indvars.iv.next68, i32 5
  store float 0.000000e+00, ptr %82, align 4, !tbaa !36
  %indvars.iv.next68.1 = or disjoint i64 %indvars.iv67, 2
  %83 = getelementptr inbounds %struct.b2RopeStretch, ptr %68, i64 %indvars.iv.next68.1, i32 5
  store float 0.000000e+00, ptr %83, align 4, !tbaa !36
  %indvars.iv.next68.2 = or disjoint i64 %indvars.iv67, 3
  %84 = getelementptr inbounds %struct.b2RopeStretch, ptr %68, i64 %indvars.iv.next68.2, i32 5
  store float 0.000000e+00, ptr %84, align 4, !tbaa !36
  %indvars.iv.next68.3 = add nuw nsw i64 %indvars.iv67, 4
  %niter84.next.3 = add i64 %niter84, 4
  %niter84.ncmp.3 = icmp eq i64 %niter84.next.3, %unroll_iter83
  br i1 %niter84.ncmp.3, label %.preheader49.loopexit.unr-lcssa, label %80, !llvm.loop !39

.preheader48:                                     ; preds = %87, %.preheader49
  %85 = phi i32 [ %76, %.preheader49 ], [ %93, %87 ]
  %86 = icmp sgt i32 %2, 0
  br i1 %86, label %.lr.ph60, label %.preheader

87:                                               ; preds = %.lr.ph58, %87
  %indvars.iv72 = phi i64 [ 0, %.lr.ph58 ], [ %indvars.iv.next73, %87 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %88 = load ptr, ptr %78, align 8, !tbaa !22
  %89 = getelementptr inbounds %struct.b2Vec2, ptr %88, i64 %indvars.iv72
  %90 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %1, ptr noundef nonnull align 4 dereferenceable(8) %89)
  store <2 x float> %90, ptr %8, align 8
  %91 = load ptr, ptr %79, align 8, !tbaa !40
  %92 = getelementptr inbounds %struct.b2Vec2, ptr %91, i64 %indvars.iv72
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %92, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %93 = load i32, ptr %19, align 8, !tbaa !18
  %94 = sext i32 %93 to i64
  %95 = icmp slt i64 %indvars.iv.next73, %94
  br i1 %95, label %87, label %.preheader48, !llvm.loop !41

.preheader.loopexit:                              ; preds = %111
  %.pre = load i32, ptr %19, align 8, !tbaa !18
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %.preheader48
  %96 = phi i32 [ %.pre, %.preheader.loopexit ], [ %85, %.preheader48 ]
  %97 = icmp sgt i32 %96, 0
  br i1 %97, label %.lr.ph62, label %.loopexit

.lr.ph62:                                         ; preds = %.preheader
  %98 = getelementptr inbounds i8, ptr %0, i64 48
  %99 = getelementptr inbounds i8, ptr %0, i64 56
  %100 = getelementptr inbounds i8, ptr %0, i64 64
  br label %113

.lr.ph60:                                         ; preds = %.preheader48, %111
  %.04259 = phi i32 [ %112, %111 ], [ 0, %.preheader48 ]
  %101 = load i32, ptr %27, align 4, !tbaa !19
  switch i32 %101, label %107 [
    i32 1, label %102
    i32 2, label %103
    i32 3, label %104
    i32 4, label %105
    i32 5, label %106
  ]

102:                                              ; preds = %.lr.ph60
  call void @_ZN6b2Rope19SolveBend_PBD_AngleEv(ptr noundef nonnull align 8 dereferenceable(128) %0)
  br label %107

103:                                              ; preds = %.lr.ph60
  call void @_ZN6b2Rope20SolveBend_XPBD_AngleEf(ptr noundef nonnull align 8 dereferenceable(128) %0, float noundef %1)
  br label %107

104:                                              ; preds = %.lr.ph60
  call void @_ZN6b2Rope22SolveBend_PBD_DistanceEv(ptr noundef nonnull align 8 dereferenceable(128) %0)
  br label %107

105:                                              ; preds = %.lr.ph60
  call void @_ZN6b2Rope20SolveBend_PBD_HeightEv(ptr noundef nonnull align 8 dereferenceable(128) %0)
  br label %107

106:                                              ; preds = %.lr.ph60
  call void @_ZN6b2Rope22SolveBend_PBD_TriangleEv(ptr noundef nonnull align 8 dereferenceable(128) %0)
  br label %107

107:                                              ; preds = %.lr.ph60, %103, %105, %106, %104, %102
  %108 = load i32, ptr %14, align 8, !tbaa !42
  switch i32 %108, label %111 [
    i32 0, label %109
    i32 1, label %110
  ]

109:                                              ; preds = %107
  call void @_ZN6b2Rope16SolveStretch_PBDEv(ptr noundef nonnull align 8 dereferenceable(128) %0)
  br label %111

110:                                              ; preds = %107
  call void @_ZN6b2Rope17SolveStretch_XPBDEf(ptr noundef nonnull align 8 dereferenceable(128) %0, float noundef %1)
  br label %111

111:                                              ; preds = %107, %109, %110
  %112 = add nuw nsw i32 %.04259, 1
  %exitcond75.not = icmp eq i32 %112, %2
  br i1 %exitcond75.not, label %.preheader.loopexit, label %.lr.ph60, !llvm.loop !43

113:                                              ; preds = %.lr.ph62, %113
  %indvars.iv76 = phi i64 [ 0, %.lr.ph62 ], [ %indvars.iv.next77, %113 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %114 = load ptr, ptr %98, align 8, !tbaa !40
  %115 = getelementptr inbounds %struct.b2Vec2, ptr %114, i64 %indvars.iv76
  %116 = load ptr, ptr %99, align 8, !tbaa !24
  %117 = getelementptr inbounds %struct.b2Vec2, ptr %116, i64 %indvars.iv76
  %118 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %115, ptr noundef nonnull align 4 dereferenceable(8) %117)
  store <2 x float> %118, ptr %9, align 8
  %119 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %12, ptr noundef nonnull align 4 dereferenceable(8) %9)
  %120 = load ptr, ptr %100, align 8, !tbaa !22
  %121 = getelementptr inbounds %struct.b2Vec2, ptr %120, i64 %indvars.iv76
  store <2 x float> %119, ptr %121, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  %122 = load ptr, ptr %98, align 8, !tbaa !40
  %123 = getelementptr inbounds %struct.b2Vec2, ptr %122, i64 %indvars.iv76
  %124 = load ptr, ptr %99, align 8, !tbaa !24
  %125 = getelementptr inbounds %struct.b2Vec2, ptr %124, i64 %indvars.iv76
  %126 = load i64, ptr %123, align 4
  store i64 %126, ptr %125, align 4
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %127 = load i32, ptr %19, align 8, !tbaa !18
  %128 = sext i32 %127 to i64
  %129 = icmp slt i64 %indvars.iv.next77, %128
  br i1 %129, label %113, label %.loopexit, !llvm.loop !44

.loopexit:                                        ; preds = %113, %.preheader, %4
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @expf(float noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8), float noundef) local_unnamed_addr #4 align 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)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6b2Rope15ApplyBendForcesEf(ptr noundef nonnull align 8 dereferenceable(128), float noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6b2Rope19SolveBend_PBD_AngleEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6b2Rope20SolveBend_XPBD_AngleEf(ptr noundef nonnull align 8 dereferenceable(128), float noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6b2Rope22SolveBend_PBD_DistanceEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6b2Rope20SolveBend_PBD_HeightEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6b2Rope22SolveBend_PBD_TriangleEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6b2Rope16SolveStretch_PBDEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6b2Rope17SolveStretch_XPBDEf(ptr noundef nonnull align 8 dereferenceable(128), float noundef) 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 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 nofree nounwind willreturn memory(write) "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 = { 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 96}
!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 = !{!11, !11, i64 0}
!18 = !{!6, !11, i64 8}
!19 = !{!6, !15, i64 92}
!20 = !{!6, !12, i64 72}
!21 = !{!8, !8, i64 0}
!22 = !{!6, !12, i64 64}
!23 = !{!6, !12, i64 40}
!24 = !{!6, !12, i64 56}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!6, !11, i64 16}
!28 = !{!6, !12, i64 32}
!29 = !{!30, !8, i64 28}
!30 = !{!"_ZTS10b2RopeBend", !11, i64 0, !11, i64 4, !11, i64 8, !8, i64 12, !8, i64 16, !8, i64 20, !8, i64 24, !8, i64 28, !8, i64 32, !8, i64 36, !8, i64 40, !8, i64 44, !8, i64 48, !8, i64 52}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.unroll.disable"}
!33 = !{!6, !11, i64 12}
!34 = !{!6, !12, i64 24}
!35 = distinct !{!35, !26}
!36 = !{!37, !8, i64 20}
!37 = !{!"_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}
!38 = distinct !{!38, !32}
!39 = distinct !{!39, !26}
!40 = !{!6, !12, i64 48}
!41 = distinct !{!41, !26}
!42 = !{!6, !14, i64 88}
!43 = distinct !{!43, !26}
!44 = distinct !{!44, !26}


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