; LLVM IR from erincatto/box2d :: src (manifold)

; 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.b2Manifold = type { %struct.b2Vec2, float, [2 x %struct.b2ManifoldPoint], i32 }
%struct.b2Vec2 = type { float, float }
%struct.b2ManifoldPoint = type { %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, float, i16, i8 }
%struct.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2Rot = type { float, float }
%struct.b2Circle = type { %struct.b2Vec2, float }
%struct.b2Polygon = type { [8 x %struct.b2Vec2], [8 x %struct.b2Vec2], %struct.b2Vec2, float, i32 }

@b2_lengthUnitsPerMeter = external global float, align 4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, 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 nounwind uwtable
declare hidden { <2 x float>, <2 x float> } @b2InvMulTransforms(<2 x float>, <2 x float>, <2 x float>, <2 x float>) #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2TransformPoint(<2 x float>, <2 x float>, <2 x float>) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2Sub(<2 x float>, <2 x float>) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2MulAdd(<2 x float>, float noundef, <2 x float>) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2Lerp(<2 x float>, <2 x float>, float noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2RotateVector(<2 x float>, <2 x float>) #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2Add(<2 x float>, <2 x float>) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2Dot(<2 x float>, <2 x float>) #2

; Function Attrs: nounwind uwtable
define dso_local void @b2CollidePolygonAndCircle(ptr dead_on_unwind noalias writable sret(%struct.b2Manifold) align 4 %0, ptr noundef %1, <2 x float> %2, <2 x float> %3, ptr noundef %4, <2 x float> %5, <2 x float> %6) #4 {
  %8 = alloca %struct.b2Transform, align 4
  %9 = alloca %struct.b2Transform, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca float, align 4
  %13 = alloca %struct.b2Transform, align 4
  %14 = alloca %struct.b2Vec2, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca i32, align 4
  %19 = alloca float, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca float, align 4
  %25 = alloca %struct.b2Vec2, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca %struct.b2Vec2, align 4
  %30 = alloca %struct.b2Vec2, align 4
  %31 = alloca float, align 4
  %32 = alloca %struct.b2Vec2, align 4
  %33 = alloca %struct.b2Vec2, align 4
  %34 = alloca float, align 4
  %35 = alloca %struct.b2Vec2, align 4
  %36 = alloca %struct.b2Vec2, align 4
  %37 = alloca %struct.b2Vec2, align 4
  %38 = alloca %struct.b2Vec2, align 4
  %39 = alloca %struct.b2Vec2, align 4
  %40 = alloca %struct.b2Vec2, align 4
  %41 = alloca %struct.b2Vec2, align 4
  %42 = alloca %struct.b2Vec2, align 4
  %43 = alloca %struct.b2Vec2, align 4
  %44 = alloca ptr, align 8
  %45 = alloca %struct.b2Vec2, align 4
  %46 = alloca %struct.b2Vec2, align 4
  %47 = alloca %struct.b2Vec2, align 4
  %48 = alloca %struct.b2Vec2, align 4
  %49 = alloca %struct.b2Vec2, align 4
  %50 = alloca %struct.b2Vec2, align 4
  %51 = alloca %struct.b2Vec2, align 4
  %52 = alloca %struct.b2Vec2, align 4
  %53 = alloca %struct.b2Vec2, align 4
  %54 = alloca %struct.b2Vec2, align 4
  %55 = alloca %struct.b2Vec2, align 4
  %56 = alloca %struct.b2Vec2, align 4
  %57 = alloca ptr, align 8
  %58 = alloca %struct.b2Vec2, align 4
  %59 = alloca %struct.b2Vec2, align 4
  %60 = alloca %struct.b2Vec2, align 4
  %61 = alloca %struct.b2Vec2, align 4
  %62 = alloca %struct.b2Vec2, align 4
  %63 = alloca %struct.b2Vec2, align 4
  %64 = alloca %struct.b2Vec2, align 4
  %65 = alloca %struct.b2Vec2, align 4
  %66 = alloca %struct.b2Vec2, align 4
  %67 = alloca %struct.b2Vec2, align 4
  %68 = alloca %struct.b2Vec2, align 4
  %69 = alloca ptr, align 8
  %70 = alloca %struct.b2Vec2, align 4
  %71 = alloca %struct.b2Vec2, align 4
  %72 = alloca %struct.b2Vec2, align 4
  %73 = alloca %struct.b2Vec2, align 4
  %74 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 0
  store <2 x float> %2, ptr %74, align 4
  %75 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 1
  store <2 x float> %3, ptr %75, align 4
  %76 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  store <2 x float> %5, ptr %76, align 4
  %77 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  store <2 x float> %6, ptr %77, align 4
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 4 %0, i8 0, i64 112, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %78 = load float, ptr @b2_lengthUnitsPerMeter, align 4, !tbaa !9
  %79 = fmul float 0x3F747AE140000000, %78
  %80 = fmul float 4.000000e+00, %79
  store float %80, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  %81 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 0
  %82 = load <2 x float>, ptr %81, align 4
  %83 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 1
  %84 = load <2 x float>, ptr %83, align 4
  %85 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  %86 = load <2 x float>, ptr %85, align 4
  %87 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  %88 = load <2 x float>, ptr %87, align 4
  %89 = call { <2 x float>, <2 x float> } @b2InvMulTransforms(<2 x float> %82, <2 x float> %84, <2 x float> %86, <2 x float> %88)
  %90 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %13, i32 0, i32 0
  %91 = extractvalue { <2 x float>, <2 x float> } %89, 0
  store <2 x float> %91, ptr %90, align 4
  %92 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %13, i32 0, i32 1
  %93 = extractvalue { <2 x float>, <2 x float> } %89, 1
  store <2 x float> %93, ptr %92, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.b2Circle, ptr %94, i32 0, i32 0
  %96 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %13, i32 0, i32 0
  %97 = load <2 x float>, ptr %96, align 4
  %98 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %13, i32 0, i32 1
  %99 = load <2 x float>, ptr %98, align 4
  %100 = load <2 x float>, ptr %95, align 4
  %101 = call <2 x float> @b2TransformPoint(<2 x float> %97, <2 x float> %99, <2 x float> %100)
  store <2 x float> %101, ptr %14, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.b2Polygon, ptr %102, i32 0, i32 3
  %104 = load float, ptr %103, align 4, !tbaa !11
  store float %104, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.b2Circle, ptr %105, i32 0, i32 1
  %107 = load float, ptr %106, align 4, !tbaa !15
  store float %107, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %108 = load float, ptr %15, align 4, !tbaa !9
  %109 = load float, ptr %16, align 4, !tbaa !9
  %110 = fadd float %108, %109
  store float %110, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store float 0xC7EFFFFFE0000000, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.b2Polygon, ptr %111, i32 0, i32 4
  %113 = load i32, ptr %112, align 4, !tbaa !18
  store i32 %113, ptr %20, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.b2Polygon, ptr %114, i32 0, i32 0
  %116 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %115, i64 0, i64 0
  store ptr %116, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.b2Polygon, ptr %117, i32 0, i32 1
  %119 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %118, i64 0, i64 0
  store ptr %119, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !17
  br label %120

120:                                              ; preds = %147, %7
  %121 = load i32, ptr %23, align 4, !tbaa !17
  %122 = load i32, ptr %20, align 4, !tbaa !17
  %123 = icmp slt i32 %121, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %150

125:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %126 = load ptr, ptr %22, align 8, !tbaa !5
  %127 = load i32, ptr %23, align 4, !tbaa !17
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds %struct.b2Vec2, ptr %126, i64 %128
  %130 = load ptr, ptr %21, align 8, !tbaa !5
  %131 = load i32, ptr %23, align 4, !tbaa !17
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds %struct.b2Vec2, ptr %130, i64 %132
  %134 = load <2 x float>, ptr %14, align 4
  %135 = load <2 x float>, ptr %133, align 4
  %136 = call <2 x float> @b2Sub(<2 x float> %134, <2 x float> %135)
  store <2 x float> %136, ptr %25, align 4
  %137 = load <2 x float>, ptr %129, align 4
  %138 = load <2 x float>, ptr %25, align 4
  %139 = call float @b2Dot(<2 x float> %137, <2 x float> %138)
  store float %139, ptr %24, align 4, !tbaa !9
  %140 = load float, ptr %24, align 4, !tbaa !9
  %141 = load float, ptr %19, align 4, !tbaa !9
  %142 = fcmp ogt float %140, %141
  br i1 %142, label %143, label %146

143:                                              ; preds = %125
  %144 = load float, ptr %24, align 4, !tbaa !9
  store float %144, ptr %19, align 4, !tbaa !9
  %145 = load i32, ptr %23, align 4, !tbaa !17
  store i32 %145, ptr %18, align 4, !tbaa !17
  br label %146

146:                                              ; preds = %143, %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %23, align 4, !tbaa !17
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %23, align 4, !tbaa !17
  br label %120, !llvm.loop !19

150:                                              ; preds = %124
  %151 = load float, ptr %19, align 4, !tbaa !9
  %152 = load float, ptr %17, align 4, !tbaa !9
  %153 = load float, ptr %12, align 4, !tbaa !9
  %154 = fadd float %152, %153
  %155 = fcmp ogt float %151, %154
  br i1 %155, label %156, label %157

156:                                              ; preds = %150
  store i32 1, ptr %26, align 4
  br label %430

157:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %158 = load i32, ptr %18, align 4, !tbaa !17
  store i32 %158, ptr %27, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %159 = load i32, ptr %27, align 4, !tbaa !17
  %160 = add nsw i32 %159, 1
  %161 = load i32, ptr %20, align 4, !tbaa !17
  %162 = icmp slt i32 %160, %161
  br i1 %162, label %163, label %166

163:                                              ; preds = %157
  %164 = load i32, ptr %27, align 4, !tbaa !17
  %165 = add nsw i32 %164, 1
  br label %167

166:                                              ; preds = %157
  br label %167

167:                                              ; preds = %166, %163
  %168 = phi i32 [ %165, %163 ], [ 0, %166 ]
  store i32 %168, ptr %28, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %169 = load ptr, ptr %21, align 8, !tbaa !5
  %170 = load i32, ptr %27, align 4, !tbaa !17
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds %struct.b2Vec2, ptr %169, i64 %171
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %172, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %173 = load ptr, ptr %21, align 8, !tbaa !5
  %174 = load i32, ptr %28, align 4, !tbaa !17
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds %struct.b2Vec2, ptr %173, i64 %175
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %176, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  %177 = load <2 x float>, ptr %14, align 4
  %178 = load <2 x float>, ptr %29, align 4
  %179 = call <2 x float> @b2Sub(<2 x float> %177, <2 x float> %178)
  store <2 x float> %179, ptr %32, align 4
  %180 = load <2 x float>, ptr %30, align 4
  %181 = load <2 x float>, ptr %29, align 4
  %182 = call <2 x float> @b2Sub(<2 x float> %180, <2 x float> %181)
  store <2 x float> %182, ptr %33, align 4
  %183 = load <2 x float>, ptr %32, align 4
  %184 = load <2 x float>, ptr %33, align 4
  %185 = call float @b2Dot(<2 x float> %183, <2 x float> %184)
  store float %185, ptr %31, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #5
  %186 = load <2 x float>, ptr %14, align 4
  %187 = load <2 x float>, ptr %30, align 4
  %188 = call <2 x float> @b2Sub(<2 x float> %186, <2 x float> %187)
  store <2 x float> %188, ptr %35, align 4
  %189 = load <2 x float>, ptr %29, align 4
  %190 = load <2 x float>, ptr %30, align 4
  %191 = call <2 x float> @b2Sub(<2 x float> %189, <2 x float> %190)
  store <2 x float> %191, ptr %36, align 4
  %192 = load <2 x float>, ptr %35, align 4
  %193 = load <2 x float>, ptr %36, align 4
  %194 = call float @b2Dot(<2 x float> %192, <2 x float> %193)
  store float %194, ptr %34, align 4, !tbaa !9
  %195 = load float, ptr %31, align 4, !tbaa !9
  %196 = fcmp olt float %195, 0.000000e+00
  br i1 %196, label %197, label %278

197:                                              ; preds = %167
  %198 = load float, ptr %19, align 4, !tbaa !9
  %199 = fcmp ogt float %198, 0x3E80000000000000
  br i1 %199, label %200, label %278

200:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #5
  %201 = load <2 x float>, ptr %14, align 4
  %202 = load <2 x float>, ptr %29, align 4
  %203 = call <2 x float> @b2Sub(<2 x float> %201, <2 x float> %202)
  store <2 x float> %203, ptr %38, align 4
  %204 = load <2 x float>, ptr %38, align 4
  %205 = call <2 x float> @b2Normalize(<2 x float> %204)
  store <2 x float> %205, ptr %37, align 4
  %206 = load <2 x float>, ptr %14, align 4
  %207 = load <2 x float>, ptr %29, align 4
  %208 = call <2 x float> @b2Sub(<2 x float> %206, <2 x float> %207)
  store <2 x float> %208, ptr %39, align 4
  %209 = load <2 x float>, ptr %39, align 4
  %210 = load <2 x float>, ptr %37, align 4
  %211 = call float @b2Dot(<2 x float> %209, <2 x float> %210)
  store float %211, ptr %19, align 4, !tbaa !9
  %212 = load float, ptr %19, align 4, !tbaa !9
  %213 = load float, ptr %17, align 4, !tbaa !9
  %214 = load float, ptr %12, align 4, !tbaa !9
  %215 = fadd float %213, %214
  %216 = fcmp ogt float %212, %215
  br i1 %216, label %217, label %218

217:                                              ; preds = %200
  store i32 1, ptr %26, align 4
  br label %275

218:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #5
  %219 = load float, ptr %15, align 4, !tbaa !9
  %220 = load <2 x float>, ptr %29, align 4
  %221 = load <2 x float>, ptr %37, align 4
  %222 = call <2 x float> @b2MulAdd(<2 x float> %220, float noundef %219, <2 x float> %221)
  store <2 x float> %222, ptr %40, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #5
  %223 = load float, ptr %16, align 4, !tbaa !9
  %224 = load <2 x float>, ptr %14, align 4
  %225 = load <2 x float>, ptr %37, align 4
  %226 = call <2 x float> @b2MulSub(<2 x float> %224, float noundef %223, <2 x float> %225)
  store <2 x float> %226, ptr %41, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #5
  %227 = load <2 x float>, ptr %40, align 4
  %228 = load <2 x float>, ptr %41, align 4
  %229 = call <2 x float> @b2Lerp(<2 x float> %227, <2 x float> %228, float noundef 5.000000e-01)
  store <2 x float> %229, ptr %42, align 4
  %230 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #5
  %231 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 1
  %232 = load <2 x float>, ptr %231, align 4
  %233 = load <2 x float>, ptr %37, align 4
  %234 = call <2 x float> @b2RotateVector(<2 x float> %232, <2 x float> %233)
  store <2 x float> %234, ptr %43, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %230, ptr align 4 %43, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #5
  %235 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %236 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %235, i64 0, i64 0
  %237 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %236, i64 0
  store ptr %237, ptr %44, align 8, !tbaa !5
  %238 = load ptr, ptr %44, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %238, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #5
  %240 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 1
  %241 = load <2 x float>, ptr %240, align 4
  %242 = load <2 x float>, ptr %42, align 4
  %243 = call <2 x float> @b2RotateVector(<2 x float> %241, <2 x float> %242)
  store <2 x float> %243, ptr %45, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %239, ptr align 4 %45, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #5
  %244 = load ptr, ptr %44, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %244, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #5
  %246 = load ptr, ptr %44, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %246, i32 0, i32 1
  %248 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 0
  %249 = getelementptr inbounds %struct.b2Transform, ptr %9, i32 0, i32 0
  %250 = load <2 x float>, ptr %248, align 4
  %251 = load <2 x float>, ptr %249, align 4
  %252 = call <2 x float> @b2Sub(<2 x float> %250, <2 x float> %251)
  store <2 x float> %252, ptr %47, align 4
  %253 = load <2 x float>, ptr %247, align 4
  %254 = load <2 x float>, ptr %47, align 4
  %255 = call <2 x float> @b2Add(<2 x float> %253, <2 x float> %254)
  store <2 x float> %255, ptr %46, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %245, ptr align 4 %46, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #5
  %256 = load ptr, ptr %44, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %256, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #5
  %258 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 0
  %259 = load ptr, ptr %44, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %259, i32 0, i32 1
  %261 = load <2 x float>, ptr %258, align 4
  %262 = load <2 x float>, ptr %260, align 4
  %263 = call <2 x float> @b2Add(<2 x float> %261, <2 x float> %262)
  store <2 x float> %263, ptr %48, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %257, ptr align 4 %48, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #5
  %264 = load <2 x float>, ptr %41, align 4
  %265 = load <2 x float>, ptr %40, align 4
  %266 = call <2 x float> @b2Sub(<2 x float> %264, <2 x float> %265)
  store <2 x float> %266, ptr %49, align 4
  %267 = load <2 x float>, ptr %49, align 4
  %268 = load <2 x float>, ptr %37, align 4
  %269 = call float @b2Dot(<2 x float> %267, <2 x float> %268)
  %270 = load ptr, ptr %44, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %270, i32 0, i32 3
  store float %269, ptr %271, align 4, !tbaa !22
  %272 = load ptr, ptr %44, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %272, i32 0, i32 8
  store i16 0, ptr %273, align 4, !tbaa !26
  %274 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 3
  store i32 1, ptr %274, align 4, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #5
  store i32 0, ptr %26, align 4
  br label %275

275:                                              ; preds = %218, %217
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #5
  %276 = load i32, ptr %26, align 4
  switch i32 %276, label %429 [
    i32 0, label %277
  ]

277:                                              ; preds = %275
  br label %428

278:                                              ; preds = %197, %167
  %279 = load float, ptr %34, align 4, !tbaa !9
  %280 = fcmp olt float %279, 0.000000e+00
  br i1 %280, label %281, label %362

281:                                              ; preds = %278
  %282 = load float, ptr %19, align 4, !tbaa !9
  %283 = fcmp ogt float %282, 0x3E80000000000000
  br i1 %283, label %284, label %362

284:                                              ; preds = %281
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #5
  %285 = load <2 x float>, ptr %14, align 4
  %286 = load <2 x float>, ptr %30, align 4
  %287 = call <2 x float> @b2Sub(<2 x float> %285, <2 x float> %286)
  store <2 x float> %287, ptr %51, align 4
  %288 = load <2 x float>, ptr %51, align 4
  %289 = call <2 x float> @b2Normalize(<2 x float> %288)
  store <2 x float> %289, ptr %50, align 4
  %290 = load <2 x float>, ptr %14, align 4
  %291 = load <2 x float>, ptr %30, align 4
  %292 = call <2 x float> @b2Sub(<2 x float> %290, <2 x float> %291)
  store <2 x float> %292, ptr %52, align 4
  %293 = load <2 x float>, ptr %52, align 4
  %294 = load <2 x float>, ptr %50, align 4
  %295 = call float @b2Dot(<2 x float> %293, <2 x float> %294)
  store float %295, ptr %19, align 4, !tbaa !9
  %296 = load float, ptr %19, align 4, !tbaa !9
  %297 = load float, ptr %17, align 4, !tbaa !9
  %298 = load float, ptr %12, align 4, !tbaa !9
  %299 = fadd float %297, %298
  %300 = fcmp ogt float %296, %299
  br i1 %300, label %301, label %302

301:                                              ; preds = %284
  store i32 1, ptr %26, align 4
  br label %359

302:                                              ; preds = %284
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #5
  %303 = load float, ptr %15, align 4, !tbaa !9
  %304 = load <2 x float>, ptr %30, align 4
  %305 = load <2 x float>, ptr %50, align 4
  %306 = call <2 x float> @b2MulAdd(<2 x float> %304, float noundef %303, <2 x float> %305)
  store <2 x float> %306, ptr %53, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #5
  %307 = load float, ptr %16, align 4, !tbaa !9
  %308 = load <2 x float>, ptr %14, align 4
  %309 = load <2 x float>, ptr %50, align 4
  %310 = call <2 x float> @b2MulSub(<2 x float> %308, float noundef %307, <2 x float> %309)
  store <2 x float> %310, ptr %54, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #5
  %311 = load <2 x float>, ptr %53, align 4
  %312 = load <2 x float>, ptr %54, align 4
  %313 = call <2 x float> @b2Lerp(<2 x float> %311, <2 x float> %312, float noundef 5.000000e-01)
  store <2 x float> %313, ptr %55, align 4
  %314 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #5
  %315 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 1
  %316 = load <2 x float>, ptr %315, align 4
  %317 = load <2 x float>, ptr %50, align 4
  %318 = call <2 x float> @b2RotateVector(<2 x float> %316, <2 x float> %317)
  store <2 x float> %318, ptr %56, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %314, ptr align 4 %56, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #5
  %319 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %320 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %319, i64 0, i64 0
  %321 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %320, i64 0
  store ptr %321, ptr %57, align 8, !tbaa !5
  %322 = load ptr, ptr %57, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %322, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #5
  %324 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 1
  %325 = load <2 x float>, ptr %324, align 4
  %326 = load <2 x float>, ptr %55, align 4
  %327 = call <2 x float> @b2RotateVector(<2 x float> %325, <2 x float> %326)
  store <2 x float> %327, ptr %58, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %323, ptr align 4 %58, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #5
  %328 = load ptr, ptr %57, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %328, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #5
  %330 = load ptr, ptr %57, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %330, i32 0, i32 1
  %332 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 0
  %333 = getelementptr inbounds %struct.b2Transform, ptr %9, i32 0, i32 0
  %334 = load <2 x float>, ptr %332, align 4
  %335 = load <2 x float>, ptr %333, align 4
  %336 = call <2 x float> @b2Sub(<2 x float> %334, <2 x float> %335)
  store <2 x float> %336, ptr %60, align 4
  %337 = load <2 x float>, ptr %331, align 4
  %338 = load <2 x float>, ptr %60, align 4
  %339 = call <2 x float> @b2Add(<2 x float> %337, <2 x float> %338)
  store <2 x float> %339, ptr %59, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %329, ptr align 4 %59, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #5
  %340 = load ptr, ptr %57, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %340, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #5
  %342 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 0
  %343 = load ptr, ptr %57, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %343, i32 0, i32 1
  %345 = load <2 x float>, ptr %342, align 4
  %346 = load <2 x float>, ptr %344, align 4
  %347 = call <2 x float> @b2Add(<2 x float> %345, <2 x float> %346)
  store <2 x float> %347, ptr %61, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %341, ptr align 4 %61, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #5
  %348 = load <2 x float>, ptr %54, align 4
  %349 = load <2 x float>, ptr %53, align 4
  %350 = call <2 x float> @b2Sub(<2 x float> %348, <2 x float> %349)
  store <2 x float> %350, ptr %62, align 4
  %351 = load <2 x float>, ptr %62, align 4
  %352 = load <2 x float>, ptr %50, align 4
  %353 = call float @b2Dot(<2 x float> %351, <2 x float> %352)
  %354 = load ptr, ptr %57, align 8, !tbaa !5
  %355 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %354, i32 0, i32 3
  store float %353, ptr %355, align 4, !tbaa !22
  %356 = load ptr, ptr %57, align 8, !tbaa !5
  %357 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %356, i32 0, i32 8
  store i16 0, ptr %357, align 4, !tbaa !26
  %358 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 3
  store i32 1, ptr %358, align 4, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #5
  store i32 0, ptr %26, align 4
  br label %359

359:                                              ; preds = %302, %301
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #5
  %360 = load i32, ptr %26, align 4
  switch i32 %360, label %429 [
    i32 0, label %361
  ]

361:                                              ; preds = %359
  br label %427

362:                                              ; preds = %281, %278
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #5
  %363 = load ptr, ptr %22, align 8, !tbaa !5
  %364 = load i32, ptr %18, align 4, !tbaa !17
  %365 = sext i32 %364 to i64
  %366 = getelementptr inbounds %struct.b2Vec2, ptr %363, i64 %365
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %63, ptr align 4 %366, i64 8, i1 false), !tbaa.struct !21
  %367 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #5
  %368 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 1
  %369 = load <2 x float>, ptr %368, align 4
  %370 = load <2 x float>, ptr %63, align 4
  %371 = call <2 x float> @b2RotateVector(<2 x float> %369, <2 x float> %370)
  store <2 x float> %371, ptr %64, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %367, ptr align 4 %64, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #5
  %372 = load float, ptr %15, align 4, !tbaa !9
  %373 = load <2 x float>, ptr %14, align 4
  %374 = load <2 x float>, ptr %29, align 4
  %375 = call <2 x float> @b2Sub(<2 x float> %373, <2 x float> %374)
  store <2 x float> %375, ptr %66, align 4
  %376 = load <2 x float>, ptr %66, align 4
  %377 = load <2 x float>, ptr %63, align 4
  %378 = call float @b2Dot(<2 x float> %376, <2 x float> %377)
  %379 = fsub float %372, %378
  %380 = load <2 x float>, ptr %14, align 4
  %381 = load <2 x float>, ptr %63, align 4
  %382 = call <2 x float> @b2MulAdd(<2 x float> %380, float noundef %379, <2 x float> %381)
  store <2 x float> %382, ptr %65, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #5
  %383 = load float, ptr %16, align 4, !tbaa !9
  %384 = load <2 x float>, ptr %14, align 4
  %385 = load <2 x float>, ptr %63, align 4
  %386 = call <2 x float> @b2MulSub(<2 x float> %384, float noundef %383, <2 x float> %385)
  store <2 x float> %386, ptr %67, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #5
  %387 = load <2 x float>, ptr %65, align 4
  %388 = load <2 x float>, ptr %67, align 4
  %389 = call <2 x float> @b2Lerp(<2 x float> %387, <2 x float> %388, float noundef 5.000000e-01)
  store <2 x float> %389, ptr %68, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %69) #5
  %390 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %391 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %390, i64 0, i64 0
  %392 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %391, i64 0
  store ptr %392, ptr %69, align 8, !tbaa !5
  %393 = load ptr, ptr %69, align 8, !tbaa !5
  %394 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %393, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %70) #5
  %395 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 1
  %396 = load <2 x float>, ptr %395, align 4
  %397 = load <2 x float>, ptr %68, align 4
  %398 = call <2 x float> @b2RotateVector(<2 x float> %396, <2 x float> %397)
  store <2 x float> %398, ptr %70, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %394, ptr align 4 %70, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #5
  %399 = load ptr, ptr %69, align 8, !tbaa !5
  %400 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %399, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %71) #5
  %401 = load ptr, ptr %69, align 8, !tbaa !5
  %402 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %401, i32 0, i32 1
  %403 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 0
  %404 = getelementptr inbounds %struct.b2Transform, ptr %9, i32 0, i32 0
  %405 = load <2 x float>, ptr %403, align 4
  %406 = load <2 x float>, ptr %404, align 4
  %407 = call <2 x float> @b2Sub(<2 x float> %405, <2 x float> %406)
  store <2 x float> %407, ptr %72, align 4
  %408 = load <2 x float>, ptr %402, align 4
  %409 = load <2 x float>, ptr %72, align 4
  %410 = call <2 x float> @b2Add(<2 x float> %408, <2 x float> %409)
  store <2 x float> %410, ptr %71, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %400, ptr align 4 %71, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %71) #5
  %411 = load ptr, ptr %69, align 8, !tbaa !5
  %412 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %411, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %73) #5
  %413 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 0
  %414 = load ptr, ptr %69, align 8, !tbaa !5
  %415 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %414, i32 0, i32 1
  %416 = load <2 x float>, ptr %413, align 4
  %417 = load <2 x float>, ptr %415, align 4
  %418 = call <2 x float> @b2Add(<2 x float> %416, <2 x float> %417)
  store <2 x float> %418, ptr %73, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %412, ptr align 4 %73, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %73) #5
  %419 = load float, ptr %19, align 4, !tbaa !9
  %420 = load float, ptr %17, align 4, !tbaa !9
  %421 = fsub float %419, %420
  %422 = load ptr, ptr %69, align 8, !tbaa !5
  %423 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %422, i32 0, i32 3
  store float %421, ptr %423, align 4, !tbaa !22
  %424 = load ptr, ptr %69, align 8, !tbaa !5
  %425 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %424, i32 0, i32 8
  store i16 0, ptr %425, align 4, !tbaa !26
  %426 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 3
  store i32 1, ptr %426, align 4, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #5
  br label %427

427:                                              ; preds = %362, %361
  br label %428

428:                                              ; preds = %427, %277
  store i32 1, ptr %26, align 4
  br label %429

429:                                              ; preds = %428, %359, %275
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %430

430:                                              ; preds = %429, %156
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2Normalize(<2 x float>) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2MulSub(<2 x float>, float noundef, <2 x float>) #2

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !10, i64 136}
!12 = !{!"b2Polygon", !7, i64 0, !7, i64 64, !13, i64 128, !10, i64 136, !14, i64 140}
!13 = !{!"b2Vec2", !10, i64 0, !10, i64 4}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !10, i64 8}
!16 = !{!"b2Circle", !13, i64 0, !10, i64 8}
!17 = !{!14, !14, i64 0}
!18 = !{!12, !14, i64 140}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!22 = !{!23, !10, i64 24}
!23 = !{!"b2ManifoldPoint", !13, i64 0, !13, i64 8, !13, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !24, i64 44, !25, i64 46}
!24 = !{!"short", !7, i64 0}
!25 = !{!"_Bool", !7, i64 0}
!26 = !{!23, !24, i64 44}
!27 = !{!28, !14, i64 108}
!28 = !{!"b2Manifold", !13, i64 0, !10, i64 8, !7, i64 12, !14, i64 108}


; 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.b2Manifold = type { %struct.b2Vec2, float, [2 x %struct.b2ManifoldPoint], i32 }
%struct.b2Vec2 = type { float, float }
%struct.b2ManifoldPoint = type { %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, float, i16, i8 }

@b2_lengthUnitsPerMeter = external local_unnamed_addr global float, align 4

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden { <2 x float>, <2 x float> } @b2InvMulTransforms(<2 x float>, <2 x float>, <2 x float>, <2 x float>) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2TransformPoint(<2 x float>, <2 x float>, <2 x float>) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2Sub(<2 x float>, <2 x float>) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2MulAdd(<2 x float>, float noundef, <2 x float>) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2Lerp(<2 x float>, <2 x float>, float noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2RotateVector(<2 x float>, <2 x float>) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2Add(<2 x float>, <2 x float>) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2Dot(<2 x float>, <2 x float>) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @b2CollidePolygonAndCircle(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.b2Manifold) align 4 %0, ptr nocapture noundef readonly %1, <2 x float> %2, <2 x float> %3, ptr nocapture noundef readonly %4, <2 x float> %5, <2 x float> %6) local_unnamed_addr #2 {
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(112) %0, i8 0, i64 112, i1 false)
  %8 = load float, ptr @b2_lengthUnitsPerMeter, align 4, !tbaa !5
  %9 = fmul float %8, 0x3F747AE140000000
  %10 = fmul float %9, 4.000000e+00
  %11 = tail call { <2 x float>, <2 x float> } @b2InvMulTransforms(<2 x float> %2, <2 x float> %3, <2 x float> %5, <2 x float> %6)
  %12 = extractvalue { <2 x float>, <2 x float> } %11, 0
  %13 = extractvalue { <2 x float>, <2 x float> } %11, 1
  %14 = load <2 x float>, ptr %4, align 4
  %15 = tail call <2 x float> @b2TransformPoint(<2 x float> %12, <2 x float> %13, <2 x float> %14)
  %16 = getelementptr inbounds i8, ptr %1, i64 136
  %17 = load float, ptr %16, align 4, !tbaa !9
  %18 = getelementptr inbounds i8, ptr %4, i64 8
  %19 = load float, ptr %18, align 4, !tbaa !13
  %20 = fadd float %17, %19
  %21 = getelementptr inbounds i8, ptr %1, i64 140
  %22 = load i32, ptr %21, align 4, !tbaa !15
  %23 = getelementptr inbounds i8, ptr %1, i64 64
  %24 = icmp sgt i32 %22, 0
  br i1 %24, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %7
  %wide.trip.count = zext nneg i32 %22 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %7
  %.0172.lcssa = phi float [ 0xC7EFFFFFE0000000, %7 ], [ %.1173, %.lr.ph ]
  %.0.lcssa = phi i32 [ 0, %7 ], [ %.1, %.lr.ph ]
  %25 = fadd float %10, %20
  %26 = fcmp ogt float %.0172.lcssa, %25
  br i1 %26, label %.critedge, label %35

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %.0184 = phi i32 [ 0, %.lr.ph.preheader ], [ %.1, %.lr.ph ]
  %.0172183 = phi float [ 0xC7EFFFFFE0000000, %.lr.ph.preheader ], [ %.1173, %.lr.ph ]
  %27 = getelementptr inbounds %struct.b2Vec2, ptr %23, i64 %indvars.iv
  %28 = getelementptr inbounds %struct.b2Vec2, ptr %1, i64 %indvars.iv
  %29 = load <2 x float>, ptr %28, align 4
  %30 = tail call <2 x float> @b2Sub(<2 x float> %15, <2 x float> %29)
  %31 = load <2 x float>, ptr %27, align 4
  %32 = tail call float @b2Dot(<2 x float> %31, <2 x float> %30)
  %33 = fcmp ogt float %32, %.0172183
  %.1173 = select i1 %33, float %32, float %.0172183
  %34 = trunc nuw nsw i64 %indvars.iv to i32
  %.1 = select i1 %33, i32 %34, i32 %.0184
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !16

35:                                               ; preds = %._crit_edge
  %36 = add nsw i32 %.0.lcssa, 1
  %37 = icmp slt i32 %36, %22
  %38 = select i1 %37, i32 %36, i32 0
  %39 = sext i32 %.0.lcssa to i64
  %40 = getelementptr inbounds %struct.b2Vec2, ptr %1, i64 %39
  %.sroa.085.0.copyload = load <2 x float>, ptr %40, align 4
  %41 = sext i32 %38 to i64
  %42 = getelementptr inbounds %struct.b2Vec2, ptr %1, i64 %41
  %.sroa.079.0.copyload = load <2 x float>, ptr %42, align 4
  %43 = tail call <2 x float> @b2Sub(<2 x float> %15, <2 x float> %.sroa.085.0.copyload)
  %44 = tail call <2 x float> @b2Sub(<2 x float> %.sroa.079.0.copyload, <2 x float> %.sroa.085.0.copyload)
  %45 = tail call float @b2Dot(<2 x float> %43, <2 x float> %44)
  %46 = tail call <2 x float> @b2Sub(<2 x float> %15, <2 x float> %.sroa.079.0.copyload)
  %47 = tail call <2 x float> @b2Sub(<2 x float> %.sroa.085.0.copyload, <2 x float> %.sroa.079.0.copyload)
  %48 = tail call float @b2Dot(<2 x float> %46, <2 x float> %47)
  %49 = fcmp olt float %45, 0.000000e+00
  %50 = fcmp ogt float %.0172.lcssa, 0x3E80000000000000
  %or.cond = and i1 %49, %50
  br i1 %or.cond, label %51, label %71

51:                                               ; preds = %35
  %52 = tail call <2 x float> @b2Sub(<2 x float> %15, <2 x float> %.sroa.085.0.copyload)
  %53 = tail call <2 x float> @b2Normalize(<2 x float> %52)
  %54 = tail call <2 x float> @b2Sub(<2 x float> %15, <2 x float> %.sroa.085.0.copyload)
  %55 = tail call float @b2Dot(<2 x float> %54, <2 x float> %53)
  %56 = fcmp ule float %55, %25
  br i1 %56, label %57, label %.critedge

57:                                               ; preds = %51
  %58 = tail call <2 x float> @b2MulAdd(<2 x float> %.sroa.085.0.copyload, float noundef %17, <2 x float> %53)
  %59 = tail call <2 x float> @b2MulSub(<2 x float> %15, float noundef %19, <2 x float> %53)
  %60 = tail call <2 x float> @b2Lerp(<2 x float> %58, <2 x float> %59, float noundef 5.000000e-01)
  %61 = tail call <2 x float> @b2RotateVector(<2 x float> %3, <2 x float> %53)
  store <2 x float> %61, ptr %0, align 4
  %62 = getelementptr inbounds i8, ptr %0, i64 12
  %63 = getelementptr inbounds i8, ptr %0, i64 20
  %64 = tail call <2 x float> @b2RotateVector(<2 x float> %3, <2 x float> %60)
  store <2 x float> %64, ptr %63, align 4
  %65 = getelementptr inbounds i8, ptr %0, i64 28
  %66 = tail call <2 x float> @b2Sub(<2 x float> %2, <2 x float> %5)
  %67 = tail call <2 x float> @b2Add(<2 x float> %64, <2 x float> %66)
  store <2 x float> %67, ptr %65, align 4
  %68 = tail call <2 x float> @b2Add(<2 x float> %2, <2 x float> %64)
  store <2 x float> %68, ptr %62, align 4
  %69 = tail call <2 x float> @b2Sub(<2 x float> %59, <2 x float> %58)
  %70 = tail call float @b2Dot(<2 x float> %69, <2 x float> %53)
  br label %.critedge.sink.split

71:                                               ; preds = %35
  %72 = fcmp olt float %48, 0.000000e+00
  %or.cond4 = and i1 %72, %50
  br i1 %or.cond4, label %73, label %93

73:                                               ; preds = %71
  %74 = tail call <2 x float> @b2Sub(<2 x float> %15, <2 x float> %.sroa.079.0.copyload)
  %75 = tail call <2 x float> @b2Normalize(<2 x float> %74)
  %76 = tail call <2 x float> @b2Sub(<2 x float> %15, <2 x float> %.sroa.079.0.copyload)
  %77 = tail call float @b2Dot(<2 x float> %76, <2 x float> %75)
  %78 = fcmp ule float %77, %25
  br i1 %78, label %79, label %.critedge

79:                                               ; preds = %73
  %80 = tail call <2 x float> @b2MulAdd(<2 x float> %.sroa.079.0.copyload, float noundef %17, <2 x float> %75)
  %81 = tail call <2 x float> @b2MulSub(<2 x float> %15, float noundef %19, <2 x float> %75)
  %82 = tail call <2 x float> @b2Lerp(<2 x float> %80, <2 x float> %81, float noundef 5.000000e-01)
  %83 = tail call <2 x float> @b2RotateVector(<2 x float> %3, <2 x float> %75)
  store <2 x float> %83, ptr %0, align 4
  %84 = getelementptr inbounds i8, ptr %0, i64 12
  %85 = getelementptr inbounds i8, ptr %0, i64 20
  %86 = tail call <2 x float> @b2RotateVector(<2 x float> %3, <2 x float> %82)
  store <2 x float> %86, ptr %85, align 4
  %87 = getelementptr inbounds i8, ptr %0, i64 28
  %88 = tail call <2 x float> @b2Sub(<2 x float> %2, <2 x float> %5)
  %89 = tail call <2 x float> @b2Add(<2 x float> %86, <2 x float> %88)
  store <2 x float> %89, ptr %87, align 4
  %90 = tail call <2 x float> @b2Add(<2 x float> %2, <2 x float> %86)
  store <2 x float> %90, ptr %84, align 4
  %91 = tail call <2 x float> @b2Sub(<2 x float> %81, <2 x float> %80)
  %92 = tail call float @b2Dot(<2 x float> %91, <2 x float> %75)
  br label %.critedge.sink.split

93:                                               ; preds = %71
  %94 = getelementptr inbounds %struct.b2Vec2, ptr %23, i64 %39
  %.sroa.019.0.copyload = load <2 x float>, ptr %94, align 4
  %95 = tail call <2 x float> @b2RotateVector(<2 x float> %3, <2 x float> %.sroa.019.0.copyload)
  store <2 x float> %95, ptr %0, align 4
  %96 = tail call <2 x float> @b2Sub(<2 x float> %15, <2 x float> %.sroa.085.0.copyload)
  %97 = tail call float @b2Dot(<2 x float> %96, <2 x float> %.sroa.019.0.copyload)
  %98 = fsub float %17, %97
  %99 = tail call <2 x float> @b2MulAdd(<2 x float> %15, float noundef %98, <2 x float> %.sroa.019.0.copyload)
  %100 = tail call <2 x float> @b2MulSub(<2 x float> %15, float noundef %19, <2 x float> %.sroa.019.0.copyload)
  %101 = tail call <2 x float> @b2Lerp(<2 x float> %99, <2 x float> %100, float noundef 5.000000e-01)
  %102 = getelementptr inbounds i8, ptr %0, i64 12
  %103 = getelementptr inbounds i8, ptr %0, i64 20
  %104 = tail call <2 x float> @b2RotateVector(<2 x float> %3, <2 x float> %101)
  store <2 x float> %104, ptr %103, align 4
  %105 = getelementptr inbounds i8, ptr %0, i64 28
  %106 = tail call <2 x float> @b2Sub(<2 x float> %2, <2 x float> %5)
  %107 = tail call <2 x float> @b2Add(<2 x float> %104, <2 x float> %106)
  store <2 x float> %107, ptr %105, align 4
  %108 = tail call <2 x float> @b2Add(<2 x float> %2, <2 x float> %104)
  store <2 x float> %108, ptr %102, align 4
  %109 = fsub float %.0172.lcssa, %20
  br label %.critedge.sink.split

.critedge.sink.split:                             ; preds = %93, %57, %79
  %.sink = phi float [ %92, %79 ], [ %70, %57 ], [ %109, %93 ]
  %110 = getelementptr inbounds i8, ptr %0, i64 36
  store float %.sink, ptr %110, align 4, !tbaa !18
  %111 = getelementptr inbounds i8, ptr %0, i64 56
  store i16 0, ptr %111, align 4, !tbaa !22
  %112 = getelementptr inbounds i8, ptr %0, i64 108
  store i32 1, ptr %112, align 4, !tbaa !23
  br label %.critedge

.critedge:                                        ; preds = %.critedge.sink.split, %51, %73, %._crit_edge
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2Normalize(<2 x float>) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2MulSub(<2 x float>, float noundef, <2 x float>) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 136}
!10 = !{!"b2Polygon", !7, i64 0, !7, i64 64, !11, i64 128, !6, i64 136, !12, i64 140}
!11 = !{!"b2Vec2", !6, i64 0, !6, i64 4}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"b2Circle", !11, i64 0, !6, i64 8}
!15 = !{!10, !12, i64 140}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !6, i64 24}
!19 = !{!"b2ManifoldPoint", !11, i64 0, !11, i64 8, !11, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !20, i64 44, !21, i64 46}
!20 = !{!"short", !7, i64 0}
!21 = !{!"_Bool", !7, i64 0}
!22 = !{!19, !20, i64 44}
!23 = !{!24, !12, i64 108}
!24 = !{!"b2Manifold", !11, i64 0, !6, i64 8, !7, i64 12, !12, i64 108}


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