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

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

@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@__PRETTY_FUNCTION__._ZN6b2Rope20SolveBend_XPBD_AngleEf = external hidden unnamed_addr constant [41 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #7

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6b2Rope20SolveBend_XPBD_AngleEf(ptr noundef nonnull align 8 dereferenceable(128) %0, float noundef %1) #5 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca float, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca %struct.b2Vec2, align 4
  %9 = alloca %struct.b2Vec2, align 4
  %10 = alloca %struct.b2Vec2, align 4
  %11 = alloca %struct.b2Vec2, 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 float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca %struct.b2Vec2, align 4
  %22 = alloca %struct.b2Vec2, align 4
  %23 = alloca %struct.b2Vec2, align 4
  %24 = alloca %struct.b2Vec2, align 4
  %25 = alloca %struct.b2Vec2, align 4
  %26 = alloca %struct.b2Vec2, align 4
  %27 = alloca %struct.b2Vec2, align 4
  %28 = alloca float, align 4
  %29 = alloca float, align 4
  %30 = alloca float, align 4
  %31 = alloca float, align 4
  %32 = alloca float, align 4
  %33 = alloca float, align 4
  %34 = alloca float, align 4
  %35 = alloca float, align 4
  %36 = alloca float, align 4
  %37 = alloca %struct.b2Vec2, align 4
  %38 = alloca %struct.b2Vec2, align 4
  %39 = alloca %struct.b2Vec2, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store float %1, ptr %4, align 4, !tbaa !9
  %40 = load ptr, ptr %3, align 8
  %41 = load float, ptr %4, align 4, !tbaa !9
  %42 = fcmp ogt float %41, 0.000000e+00
  br i1 %42, label %43, label %44

43:                                               ; preds = %2
  br label %46

44:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 506, ptr noundef @__PRETTY_FUNCTION__._ZN6b2Rope20SolveBend_XPBD_AngleEf) #9
  unreachable

45:                                               ; No predecessors!
  br label %46

46:                                               ; preds = %45, %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #10
  store i32 0, ptr %5, align 4, !tbaa !11
  br label %47

47:                                               ; preds = %271, %46
  %48 = load i32, ptr %5, align 4, !tbaa !11
  %49 = getelementptr inbounds %class.b2Rope, ptr %40, i32 0, i32 3
  %50 = load i32, ptr %49, align 8, !tbaa !13
  %51 = icmp slt i32 %48, %50
  br i1 %51, label %53, label %52

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

53:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  %54 = getelementptr inbounds %class.b2Rope, ptr %40, i32 0, i32 5
  %55 = load ptr, ptr %54, align 8, !tbaa !20
  %56 = load i32, ptr %5, align 4, !tbaa !11
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds %struct.b2RopeBend, ptr %55, i64 %57
  store ptr %58, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  %59 = getelementptr inbounds %class.b2Rope, ptr %40, i32 0, i32 7
  %60 = load ptr, ptr %59, align 8, !tbaa !21
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.b2RopeBend, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 4, !tbaa !22
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds %struct.b2Vec2, ptr %60, i64 %64
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %65, i64 8, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #10
  %66 = getelementptr inbounds %class.b2Rope, ptr %40, i32 0, i32 7
  %67 = load ptr, ptr %66, align 8, !tbaa !21
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.b2RopeBend, ptr %68, i32 0, i32 1
  %70 = load i32, ptr %69, align 4, !tbaa !25
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds %struct.b2Vec2, ptr %67, i64 %71
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 4 %72, i64 8, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #10
  %73 = getelementptr inbounds %class.b2Rope, ptr %40, i32 0, i32 7
  %74 = load ptr, ptr %73, align 8, !tbaa !21
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.b2RopeBend, ptr %75, i32 0, i32 2
  %77 = load i32, ptr %76, align 4, !tbaa !26
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds %struct.b2Vec2, ptr %74, i64 %78
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %79, i64 8, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #10
  %80 = getelementptr inbounds %class.b2Rope, ptr %40, i32 0, i32 8
  %81 = load ptr, ptr %80, align 8, !tbaa !27
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.b2RopeBend, ptr %82, i32 0, i32 0
  %84 = load i32, ptr %83, align 4, !tbaa !22
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds %struct.b2Vec2, ptr %81, i64 %85
  %87 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %86)
  store <2 x float> %87, ptr %11, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  %88 = getelementptr inbounds %class.b2Rope, ptr %40, i32 0, i32 8
  %89 = load ptr, ptr %88, align 8, !tbaa !27
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.b2RopeBend, ptr %90, i32 0, i32 1
  %92 = load i32, ptr %91, align 4, !tbaa !25
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds %struct.b2Vec2, ptr %89, i64 %93
  %95 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(8) %94)
  store <2 x float> %95, ptr %12, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #10
  %96 = getelementptr inbounds %class.b2Rope, ptr %40, i32 0, i32 8
  %97 = load ptr, ptr %96, align 8, !tbaa !27
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.b2RopeBend, ptr %98, i32 0, i32 2
  %100 = load i32, ptr %99, align 4, !tbaa !26
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds %struct.b2Vec2, ptr %97, i64 %101
  %103 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(8) %102)
  store <2 x float> %103, ptr %13, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  %104 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(8) %8)
  store <2 x float> %104, ptr %14, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  %105 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(8) %9)
  store <2 x float> %105, ptr %15, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #10
  %106 = getelementptr inbounds %class.b2Rope, ptr %40, i32 0, i32 12
  %107 = getelementptr inbounds %struct.b2RopeTuning, ptr %106, i32 0, i32 9
  %108 = load i8, ptr %107, align 4, !tbaa !28, !range !29, !noundef !30
  %109 = trunc i8 %108 to i1
  br i1 %109, label %110, label %125

110:                                              ; preds = %53
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.b2RopeBend, ptr %111, i32 0, i32 8
  %113 = load float, ptr %112, align 4, !tbaa !31
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.b2RopeBend, ptr %114, i32 0, i32 8
  %116 = load float, ptr %115, align 4, !tbaa !31
  %117 = fmul float %113, %116
  store float %117, ptr %16, align 4, !tbaa !9
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.b2RopeBend, ptr %118, i32 0, i32 9
  %120 = load float, ptr %119, align 4, !tbaa !32
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.b2RopeBend, ptr %121, i32 0, i32 9
  %123 = load float, ptr %122, align 4, !tbaa !32
  %124 = fmul float %120, %123
  store float %124, ptr %17, align 4, !tbaa !9
  br label %128

125:                                              ; preds = %53
  %126 = call noundef float @_ZNK6b2Vec213LengthSquaredEv(ptr noundef nonnull align 4 dereferenceable(8) %14)
  store float %126, ptr %16, align 4, !tbaa !9
  %127 = call noundef float @_ZNK6b2Vec213LengthSquaredEv(ptr noundef nonnull align 4 dereferenceable(8) %15)
  store float %127, ptr %17, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %125, %110
  %129 = load float, ptr %16, align 4, !tbaa !9
  %130 = load float, ptr %17, align 4, !tbaa !9
  %131 = fmul float %129, %130
  %132 = fcmp oeq float %131, 0.000000e+00
  br i1 %132, label %133, label %134

133:                                              ; preds = %128
  store i32 4, ptr %6, align 4
  br label %268

134:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #10
  %135 = call noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(8) %15)
  store float %135, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #10
  %136 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(8) %15)
  store float %136, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #10
  %137 = load float, ptr %18, align 4, !tbaa !9
  %138 = load float, ptr %19, align 4, !tbaa !9
  %139 = call float @atan2f(float noundef %137, float noundef %138) #10
  store float %139, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #10
  %140 = load float, ptr %16, align 4, !tbaa !9
  %141 = fdiv float -1.000000e+00, %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #10
  %142 = call <2 x float> @_ZNK6b2Vec24SkewEv(ptr noundef nonnull align 4 dereferenceable(8) %14)
  store <2 x float> %142, ptr %22, align 4
  %143 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %141, ptr noundef nonnull align 4 dereferenceable(8) %22)
  store <2 x float> %143, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #10
  %144 = load float, ptr %17, align 4, !tbaa !9
  %145 = fdiv float 1.000000e+00, %144
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #10
  %146 = call <2 x float> @_ZNK6b2Vec24SkewEv(ptr noundef nonnull align 4 dereferenceable(8) %15)
  store <2 x float> %146, ptr %24, align 4
  %147 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %145, ptr noundef nonnull align 4 dereferenceable(8) %24)
  store <2 x float> %147, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #10
  %148 = call <2 x float> @_ZNK6b2Vec2ngEv(ptr noundef nonnull align 4 dereferenceable(8) %21)
  store <2 x float> %148, ptr %25, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #10
  %149 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(8) %23)
  store <2 x float> %149, ptr %26, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %23, i64 8, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #10
  %150 = getelementptr inbounds %class.b2Rope, ptr %40, i32 0, i32 12
  %151 = getelementptr inbounds %struct.b2RopeTuning, ptr %150, i32 0, i32 10
  %152 = load i8, ptr %151, align 1, !tbaa !33, !range !29, !noundef !30
  %153 = trunc i8 %152 to i1
  br i1 %153, label %154, label %158

154:                                              ; preds = %134
  %155 = load ptr, ptr %7, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.b2RopeBend, ptr %155, i32 0, i32 6
  %157 = load float, ptr %156, align 4, !tbaa !34
  store float %157, ptr %28, align 4, !tbaa !9
  br label %174

158:                                              ; preds = %134
  %159 = load ptr, ptr %7, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.b2RopeBend, ptr %159, i32 0, i32 3
  %161 = load float, ptr %160, align 4, !tbaa !35
  %162 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %25, ptr noundef nonnull align 4 dereferenceable(8) %25)
  %163 = load ptr, ptr %7, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.b2RopeBend, ptr %163, i32 0, i32 4
  %165 = load float, ptr %164, align 4, !tbaa !36
  %166 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %26, ptr noundef nonnull align 4 dereferenceable(8) %26)
  %167 = fmul float %165, %166
  %168 = call float @llvm.fmuladd.f32(float %161, float %162, float %167)
  %169 = load ptr, ptr %7, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.b2RopeBend, ptr %169, i32 0, i32 5
  %171 = load float, ptr %170, align 4, !tbaa !37
  %172 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %27, ptr noundef nonnull align 4 dereferenceable(8) %27)
  %173 = call float @llvm.fmuladd.f32(float %171, float %172, float %168)
  store float %173, ptr %28, align 4, !tbaa !9
  br label %174

174:                                              ; preds = %158, %154
  %175 = load float, ptr %28, align 4, !tbaa !9
  %176 = fcmp oeq float %175, 0.000000e+00
  br i1 %176, label %177, label %178

177:                                              ; preds = %174
  store i32 4, ptr %6, align 4
  br label %267

178:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #10
  %179 = load ptr, ptr %7, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.b2RopeBend, ptr %179, i32 0, i32 12
  %181 = load float, ptr %180, align 4, !tbaa !38
  %182 = load float, ptr %4, align 4, !tbaa !9
  %183 = fmul float %181, %182
  %184 = load float, ptr %4, align 4, !tbaa !9
  %185 = fmul float %183, %184
  %186 = fdiv float 1.000000e+00, %185
  store float %186, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #10
  %187 = load float, ptr %4, align 4, !tbaa !9
  %188 = load float, ptr %4, align 4, !tbaa !9
  %189 = fmul float %187, %188
  %190 = load ptr, ptr %7, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.b2RopeBend, ptr %190, i32 0, i32 13
  %192 = load float, ptr %191, align 4, !tbaa !39
  %193 = fmul float %189, %192
  store float %193, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #10
  %194 = load float, ptr %29, align 4, !tbaa !9
  %195 = load float, ptr %30, align 4, !tbaa !9
  %196 = fmul float %194, %195
  %197 = load float, ptr %4, align 4, !tbaa !9
  %198 = fdiv float %196, %197
  store float %198, ptr %31, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #10
  %199 = load float, ptr %20, align 4, !tbaa !9
  store float %199, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #10
  %200 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %25, ptr noundef nonnull align 4 dereferenceable(8) %11)
  %201 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %26, ptr noundef nonnull align 4 dereferenceable(8) %12)
  %202 = fadd float %200, %201
  %203 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %27, ptr noundef nonnull align 4 dereferenceable(8) %13)
  %204 = fadd float %202, %203
  store float %204, ptr %33, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #10
  %205 = load float, ptr %32, align 4, !tbaa !9
  %206 = load float, ptr %29, align 4, !tbaa !9
  %207 = load ptr, ptr %7, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.b2RopeBend, ptr %207, i32 0, i32 7
  %209 = load float, ptr %208, align 4, !tbaa !40
  %210 = call float @llvm.fmuladd.f32(float %206, float %209, float %205)
  %211 = load float, ptr %31, align 4, !tbaa !9
  %212 = load float, ptr %33, align 4, !tbaa !9
  %213 = call float @llvm.fmuladd.f32(float %211, float %212, float %210)
  store float %213, ptr %34, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #10
  %214 = load float, ptr %31, align 4, !tbaa !9
  %215 = fadd float 1.000000e+00, %214
  %216 = load float, ptr %28, align 4, !tbaa !9
  %217 = load float, ptr %29, align 4, !tbaa !9
  %218 = call float @llvm.fmuladd.f32(float %215, float %216, float %217)
  store float %218, ptr %35, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #10
  %219 = load float, ptr %34, align 4, !tbaa !9
  %220 = fneg float %219
  %221 = load float, ptr %35, align 4, !tbaa !9
  %222 = fdiv float %220, %221
  store float %222, ptr %36, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #10
  %223 = load ptr, ptr %7, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.b2RopeBend, ptr %223, i32 0, i32 3
  %225 = load float, ptr %224, align 4, !tbaa !35
  %226 = load float, ptr %36, align 4, !tbaa !9
  %227 = fmul float %225, %226
  %228 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %227, ptr noundef nonnull align 4 dereferenceable(8) %25)
  store <2 x float> %228, ptr %37, align 4
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %37)
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #10
  %229 = load ptr, ptr %7, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.b2RopeBend, ptr %229, i32 0, i32 4
  %231 = load float, ptr %230, align 4, !tbaa !36
  %232 = load float, ptr %36, align 4, !tbaa !9
  %233 = fmul float %231, %232
  %234 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %233, ptr noundef nonnull align 4 dereferenceable(8) %26)
  store <2 x float> %234, ptr %38, align 4
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(8) %38)
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #10
  %235 = load ptr, ptr %7, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.b2RopeBend, ptr %235, i32 0, i32 5
  %237 = load float, ptr %236, align 4, !tbaa !37
  %238 = load float, ptr %36, align 4, !tbaa !9
  %239 = fmul float %237, %238
  %240 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %239, ptr noundef nonnull align 4 dereferenceable(8) %27)
  store <2 x float> %240, ptr %39, align 4
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(8) %39)
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #10
  %241 = getelementptr inbounds %class.b2Rope, ptr %40, i32 0, i32 7
  %242 = load ptr, ptr %241, align 8, !tbaa !21
  %243 = load ptr, ptr %7, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.b2RopeBend, ptr %243, i32 0, i32 0
  %245 = load i32, ptr %244, align 4, !tbaa !22
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds %struct.b2Vec2, ptr %242, i64 %246
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %247, ptr align 4 %8, i64 8, i1 false), !tbaa.struct !24
  %248 = getelementptr inbounds %class.b2Rope, ptr %40, i32 0, i32 7
  %249 = load ptr, ptr %248, align 8, !tbaa !21
  %250 = load ptr, ptr %7, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.b2RopeBend, ptr %250, i32 0, i32 1
  %252 = load i32, ptr %251, align 4, !tbaa !25
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds %struct.b2Vec2, ptr %249, i64 %253
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %254, ptr align 4 %9, i64 8, i1 false), !tbaa.struct !24
  %255 = getelementptr inbounds %class.b2Rope, ptr %40, i32 0, i32 7
  %256 = load ptr, ptr %255, align 8, !tbaa !21
  %257 = load ptr, ptr %7, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.b2RopeBend, ptr %257, i32 0, i32 2
  %259 = load i32, ptr %258, align 4, !tbaa !26
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds %struct.b2Vec2, ptr %256, i64 %260
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %261, ptr align 4 %10, i64 8, i1 false), !tbaa.struct !24
  %262 = load float, ptr %36, align 4, !tbaa !9
  %263 = load ptr, ptr %7, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.b2RopeBend, ptr %263, i32 0, i32 7
  %265 = load float, ptr %264, align 4, !tbaa !40
  %266 = fadd float %265, %262
  store float %266, ptr %264, align 4, !tbaa !40
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #10
  store i32 0, ptr %6, align 4
  br label %267

267:                                              ; preds = %178, %177
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #10
  br label %268

268:                                              ; preds = %267, %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  %269 = load i32, ptr %6, align 4
  switch i32 %269, label %275 [
    i32 0, label %270
    i32 4, label %271
  ]

270:                                              ; preds = %268
  br label %271

271:                                              ; preds = %270, %268
  %272 = load i32, ptr %5, align 4, !tbaa !11
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %5, align 4, !tbaa !11
  br label %47, !llvm.loop !41

274:                                              ; preds = %52
  ret void

275:                                              ; preds = %268
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #6

; Function Attrs: nounwind
declare float @atan2f(float noundef, float noundef) #8

attributes #0 = { noreturn 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 #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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 #6 = { 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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 #9 = { noreturn nounwind }
attributes #10 = { 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, !12, i64 16}
!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, !6, i64 32}
!21 = !{!14, !6, i64 48}
!22 = !{!23, !12, i64 0}
!23 = !{!"_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}
!24 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!25 = !{!23, !12, i64 4}
!26 = !{!23, !12, i64 8}
!27 = !{!14, !6, i64 56}
!28 = !{!14, !19, i64 124}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{!23, !10, i64 32}
!32 = !{!23, !10, i64 36}
!33 = !{!14, !19, i64 125}
!34 = !{!23, !10, i64 24}
!35 = !{!23, !10, i64 12}
!36 = !{!23, !10, i64 16}
!37 = !{!23, !10, i64 20}
!38 = !{!23, !10, i64 48}
!39 = !{!23, !10, i64 52}
!40 = !{!23, !10, i64 28}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.b2Vec2 = type { float, float }
%struct.b2RopeBend = type { i32, i32, i32, float, float, float, float, float, float, float, float, float, float, float }

@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@__PRETTY_FUNCTION__._ZN6b2Rope20SolveBend_XPBD_AngleEf = external hidden unnamed_addr constant [41 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress 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)) local_unnamed_addr #2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #6

; 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 #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6b2Rope20SolveBend_XPBD_AngleEf(ptr nocapture noundef nonnull readonly align 8 dereferenceable(128) %0, float noundef %1) local_unnamed_addr #4 align 2 {
  %3 = alloca %struct.b2Vec2, align 8
  %4 = alloca %struct.b2Vec2, align 8
  %5 = alloca %struct.b2Vec2, align 8
  %6 = alloca %struct.b2Vec2, align 8
  %7 = alloca %struct.b2Vec2, align 8
  %8 = alloca %struct.b2Vec2, align 8
  %9 = alloca %struct.b2Vec2, align 8
  %10 = alloca %struct.b2Vec2, align 8
  %11 = alloca %struct.b2Vec2, align 8
  %12 = alloca %struct.b2Vec2, align 8
  %13 = alloca %struct.b2Vec2, align 8
  %14 = alloca %struct.b2Vec2, align 8
  %15 = alloca %struct.b2Vec2, align 8
  %16 = alloca %struct.b2Vec2, align 8
  %17 = alloca %struct.b2Vec2, align 8
  %18 = alloca %struct.b2Vec2, align 8
  %19 = alloca %struct.b2Vec2, align 8
  %20 = alloca %struct.b2Vec2, align 8
  %21 = fcmp ogt float %1, 0.000000e+00
  br i1 %21, label %.preheader, label %31

.preheader:                                       ; preds = %2
  %22 = getelementptr inbounds i8, ptr %0, i64 16
  %23 = load i32, ptr %22, align 8, !tbaa !5
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %25 = getelementptr inbounds i8, ptr %0, i64 32
  %26 = getelementptr inbounds i8, ptr %0, i64 48
  %27 = getelementptr inbounds i8, ptr %0, i64 56
  %28 = getelementptr inbounds i8, ptr %0, i64 124
  %29 = getelementptr inbounds i8, ptr %0, i64 125
  %30 = fmul float %1, %1
  br label %32

31:                                               ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 506, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6b2Rope20SolveBend_XPBD_AngleEf) #8
  unreachable

._crit_edge:                                      ; preds = %171, %.preheader
  ret void

32:                                               ; preds = %.lr.ph, %171
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %171 ]
  %33 = load ptr, ptr %25, align 8, !tbaa !17
  %34 = getelementptr inbounds %struct.b2RopeBend, ptr %33, i64 %indvars.iv
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  %35 = load ptr, ptr %26, align 8, !tbaa !18
  %36 = load i32, ptr %34, align 4, !tbaa !19
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds %struct.b2Vec2, ptr %35, i64 %37
  %39 = load i64, ptr %38, align 4
  store i64 %39, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  %40 = getelementptr inbounds i8, ptr %34, i64 4
  %41 = load i32, ptr %40, align 4, !tbaa !21
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds %struct.b2Vec2, ptr %35, i64 %42
  %44 = load i64, ptr %43, align 4
  store i64 %44, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  %45 = getelementptr inbounds i8, ptr %34, i64 8
  %46 = load i32, ptr %45, align 4, !tbaa !22
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds %struct.b2Vec2, ptr %35, i64 %47
  %49 = load i64, ptr %48, align 4
  store i64 %49, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %50 = load ptr, ptr %27, align 8, !tbaa !23
  %51 = load i32, ptr %34, align 4, !tbaa !19
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds %struct.b2Vec2, ptr %50, i64 %52
  %54 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %53)
  store <2 x float> %54, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %55 = load ptr, ptr %27, align 8, !tbaa !23
  %56 = load i32, ptr %40, align 4, !tbaa !21
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds %struct.b2Vec2, ptr %55, i64 %57
  %59 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %58)
  store <2 x float> %59, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %60 = load ptr, ptr %27, align 8, !tbaa !23
  %61 = load i32, ptr %45, align 4, !tbaa !22
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds %struct.b2Vec2, ptr %60, i64 %62
  %64 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %63)
  store <2 x float> %64, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  %65 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store <2 x float> %65, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #9
  %66 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %4)
  store <2 x float> %66, ptr %10, align 8
  %67 = load i8, ptr %28, align 4, !tbaa !24, !range !25, !noundef !26
  %68 = trunc nuw i8 %67 to i1
  br i1 %68, label %69, label %73

69:                                               ; preds = %32
  %70 = getelementptr inbounds i8, ptr %34, i64 32
  %71 = load <2 x float>, ptr %70, align 4, !tbaa !27
  %72 = fmul <2 x float> %71, %71
  br label %78

73:                                               ; preds = %32
  %74 = call noundef float @_ZNK6b2Vec213LengthSquaredEv(ptr noundef nonnull align 4 dereferenceable(8) %9)
  %75 = call noundef float @_ZNK6b2Vec213LengthSquaredEv(ptr noundef nonnull align 4 dereferenceable(8) %10)
  %76 = insertelement <2 x float> poison, float %74, i64 0
  %77 = insertelement <2 x float> %76, float %75, i64 1
  br label %78

78:                                               ; preds = %73, %69
  %79 = phi <2 x float> [ %72, %69 ], [ %77, %73 ]
  %80 = extractelement <2 x float> %79, i64 0
  %81 = extractelement <2 x float> %79, i64 1
  %82 = fmul float %81, %80
  %83 = fcmp oeq float %82, 0.000000e+00
  br i1 %83, label %171, label %84

84:                                               ; preds = %78
  %85 = call noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(8) %10)
  %86 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(8) %10)
  %87 = call float @atan2f(float noundef %85, float noundef %86) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  %88 = fdiv float -1.000000e+00, %80
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  %89 = call <2 x float> @_ZNK6b2Vec24SkewEv(ptr noundef nonnull align 4 dereferenceable(8) %9)
  store <2 x float> %89, ptr %12, align 8
  %90 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %88, ptr noundef nonnull align 4 dereferenceable(8) %12)
  store <2 x float> %90, ptr %11, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #9
  %91 = fdiv float 1.000000e+00, %81
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #9
  %92 = call <2 x float> @_ZNK6b2Vec24SkewEv(ptr noundef nonnull align 4 dereferenceable(8) %10)
  store <2 x float> %92, ptr %14, align 8
  %93 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %91, ptr noundef nonnull align 4 dereferenceable(8) %14)
  store <2 x float> %93, ptr %13, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #9
  %94 = call <2 x float> @_ZNK6b2Vec2ngEv(ptr noundef nonnull align 4 dereferenceable(8) %11)
  store <2 x float> %94, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #9
  %95 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(8) %13)
  store <2 x float> %95, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #9
  %96 = load i64, ptr %13, align 8
  store i64 %96, ptr %17, align 8
  %97 = load i8, ptr %29, align 1, !tbaa !28, !range !25, !noundef !26
  %98 = trunc nuw i8 %97 to i1
  br i1 %98, label %99, label %102

99:                                               ; preds = %84
  %100 = getelementptr inbounds i8, ptr %34, i64 24
  %101 = load float, ptr %100, align 4, !tbaa !29
  br label %115

102:                                              ; preds = %84
  %103 = getelementptr inbounds i8, ptr %34, i64 12
  %104 = load float, ptr %103, align 4, !tbaa !30
  %105 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %15)
  %106 = getelementptr inbounds i8, ptr %34, i64 16
  %107 = load float, ptr %106, align 4, !tbaa !31
  %108 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(8) %16)
  %109 = fmul float %107, %108
  %110 = call float @llvm.fmuladd.f32(float %104, float %105, float %109)
  %111 = getelementptr inbounds i8, ptr %34, i64 20
  %112 = load float, ptr %111, align 4, !tbaa !32
  %113 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %17, ptr noundef nonnull align 4 dereferenceable(8) %17)
  %114 = call float @llvm.fmuladd.f32(float %112, float %113, float %110)
  br label %115

115:                                              ; preds = %102, %99
  %.058 = phi float [ %101, %99 ], [ %114, %102 ]
  %116 = fcmp oeq float %.058, 0.000000e+00
  br i1 %116, label %170, label %117

117:                                              ; preds = %115
  %118 = getelementptr inbounds i8, ptr %34, i64 48
  %119 = load float, ptr %118, align 4, !tbaa !33
  %120 = fmul float %119, %1
  %121 = fmul float %120, %1
  %122 = fdiv float 1.000000e+00, %121
  %123 = getelementptr inbounds i8, ptr %34, i64 52
  %124 = load float, ptr %123, align 4, !tbaa !34
  %125 = fmul float %30, %124
  %126 = fmul float %125, %122
  %127 = fdiv float %126, %1
  %128 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %6)
  %129 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(8) %7)
  %130 = fadd float %128, %129
  %131 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %17, ptr noundef nonnull align 4 dereferenceable(8) %8)
  %132 = fadd float %130, %131
  %133 = getelementptr inbounds i8, ptr %34, i64 28
  %134 = load float, ptr %133, align 4, !tbaa !35
  %135 = call float @llvm.fmuladd.f32(float %122, float %134, float %87)
  %136 = call float @llvm.fmuladd.f32(float %127, float %132, float %135)
  %137 = fadd float %127, 1.000000e+00
  %138 = call float @llvm.fmuladd.f32(float %137, float %.058, float %122)
  %139 = fneg float %136
  %140 = fdiv float %139, %138
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #9
  %141 = getelementptr inbounds i8, ptr %34, i64 12
  %142 = load float, ptr %141, align 4, !tbaa !30
  %143 = fmul float %142, %140
  %144 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %143, ptr noundef nonnull align 4 dereferenceable(8) %15)
  store <2 x float> %144, ptr %18, align 8
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %18)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #9
  %145 = getelementptr inbounds i8, ptr %34, i64 16
  %146 = load float, ptr %145, align 4, !tbaa !31
  %147 = fmul float %140, %146
  %148 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %147, ptr noundef nonnull align 4 dereferenceable(8) %16)
  store <2 x float> %148, ptr %19, align 8
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %19)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #9
  %149 = getelementptr inbounds i8, ptr %34, i64 20
  %150 = load float, ptr %149, align 4, !tbaa !32
  %151 = fmul float %140, %150
  %152 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %151, ptr noundef nonnull align 4 dereferenceable(8) %17)
  store <2 x float> %152, ptr %20, align 8
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %20)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #9
  %153 = load ptr, ptr %26, align 8, !tbaa !18
  %154 = load i32, ptr %34, align 4, !tbaa !19
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds %struct.b2Vec2, ptr %153, i64 %155
  %157 = load i64, ptr %3, align 8
  store i64 %157, ptr %156, align 4
  %158 = load ptr, ptr %26, align 8, !tbaa !18
  %159 = load i32, ptr %40, align 4, !tbaa !21
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds %struct.b2Vec2, ptr %158, i64 %160
  %162 = load i64, ptr %4, align 8
  store i64 %162, ptr %161, align 4
  %163 = load ptr, ptr %26, align 8, !tbaa !18
  %164 = load i32, ptr %45, align 4, !tbaa !22
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds %struct.b2Vec2, ptr %163, i64 %165
  %167 = load i64, ptr %5, align 8
  store i64 %167, ptr %166, align 4
  %168 = load float, ptr %133, align 4, !tbaa !35
  %169 = fadd float %140, %168
  store float %169, ptr %133, align 4, !tbaa !35
  br label %170

170:                                              ; preds = %115, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  br label %171

171:                                              ; preds = %78, %170
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %172 = load i32, ptr %22, align 8, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = icmp slt i64 %indvars.iv.next, %173
  br i1 %174, label %32, label %._crit_edge, !llvm.loop !36
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @atan2f(float noundef, float noundef) local_unnamed_addr #7

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


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