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

@b2_lengthUnitsPerMeter = external global float, align 4
@.str.1 = external hidden unnamed_addr constant [64 x i8], align 1
@b2Vec2_zero = external hidden constant %struct.b2Vec2, align 4
@.str.2 = external hidden unnamed_addr constant [30 x i8], align 1

; 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

declare i32 @b2InternalAssertFcn(ptr noundef, ptr noundef, i32 noundef) #4

; Function Attrs: cold noreturn nounwind memory(inaccessiblemem: write)
declare void @llvm.trap() #5

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

; Function Attrs: nounwind
declare float @sqrtf(float noundef) #7

; Function Attrs: nounwind uwtable
define dso_local void @b2CollidePolygons(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) #8 {
  %8 = alloca %struct.b2Transform, align 4
  %9 = alloca %struct.b2Transform, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %struct.b2Vec2, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca %struct.b2Transform, align 4
  %16 = alloca %struct.b2Vec2, align 4
  %17 = alloca %struct.b2Transform, align 4
  %18 = alloca %struct.b2Polygon, align 4
  %19 = alloca i32, align 4
  %20 = alloca %struct.b2Vec2, align 4
  %21 = alloca %struct.b2Polygon, align 4
  %22 = alloca i32, align 4
  %23 = alloca %struct.b2Vec2, align 4
  %24 = alloca %struct.b2Vec2, align 4
  %25 = alloca i32, align 4
  %26 = alloca float, align 4
  %27 = alloca i32, align 4
  %28 = alloca float, align 4
  %29 = alloca float, align 4
  %30 = alloca i32, align 4
  %31 = alloca i8, align 1
  %32 = alloca %struct.b2Vec2, align 4
  %33 = alloca i32, align 4
  %34 = alloca ptr, align 8
  %35 = alloca float, align 4
  %36 = alloca i32, align 4
  %37 = alloca float, align 4
  %38 = alloca %struct.b2Vec2, align 4
  %39 = alloca i32, align 4
  %40 = alloca ptr, align 8
  %41 = alloca float, align 4
  %42 = alloca i32, align 4
  %43 = alloca float, align 4
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca i32, align 4
  %47 = alloca i32, 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.b2SegmentDistanceResult, align 4
  %53 = alloca float, align 4
  %54 = alloca float, align 4
  %55 = alloca %struct.b2Manifold, align 4
  %56 = alloca float, align 4
  %57 = alloca i32, align 4
  %58 = alloca %struct.b2Vec2, align 4
  %59 = alloca float, 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 float, 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 float, align 4
  %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 = alloca float, align 4
  %75 = alloca %struct.b2Vec2, align 4
  %76 = alloca %struct.b2Vec2, align 4
  %77 = alloca %struct.b2Vec2, align 4
  %78 = alloca %struct.b2Manifold, align 4
  %79 = alloca %struct.b2Vec2, align 4
  %80 = alloca i32, align 4
  %81 = alloca ptr, align 8
  %82 = alloca %struct.b2Vec2, align 4
  %83 = alloca %struct.b2Vec2, align 4
  %84 = alloca %struct.b2Vec2, align 4
  %85 = alloca %struct.b2Vec2, align 4
  %86 = alloca %struct.b2Vec2, align 4
  %87 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 0
  store <2 x float> %2, ptr %87, align 4
  %88 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 1
  store <2 x float> %3, ptr %88, align 4
  %89 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  store <2 x float> %5, ptr %89, align 4
  %90 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  store <2 x float> %6, ptr %90, align 4
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  %91 = load ptr, ptr %10, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.b2Polygon, ptr %91, i32 0, i32 0
  %93 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %92, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %93, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  %94 = load float, ptr @b2_lengthUnitsPerMeter, align 4, !tbaa !10
  %95 = fmul float 0x3F747AE140000000, %94
  store float %95, ptr %13, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #10
  %96 = load float, ptr @b2_lengthUnitsPerMeter, align 4, !tbaa !10
  %97 = fmul float 0x3F747AE140000000, %96
  %98 = fmul float 4.000000e+00, %97
  store float %98, ptr %14, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #10
  %99 = getelementptr inbounds %struct.b2Transform, ptr %15, i32 0, i32 0
  %100 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 0
  %101 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 1
  %102 = load <2 x float>, ptr %101, align 4
  %103 = load <2 x float>, ptr %12, align 4
  %104 = call <2 x float> @b2RotateVector(<2 x float> %102, <2 x float> %103)
  store <2 x float> %104, ptr %16, align 4
  %105 = load <2 x float>, ptr %100, align 4
  %106 = load <2 x float>, ptr %16, align 4
  %107 = call <2 x float> @b2Add(<2 x float> %105, <2 x float> %106)
  store <2 x float> %107, ptr %99, align 4
  %108 = getelementptr inbounds %struct.b2Transform, ptr %15, i32 0, i32 1
  %109 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %108, ptr align 4 %109, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #10
  %110 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %15, i32 0, i32 0
  %111 = load <2 x float>, ptr %110, align 4
  %112 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %15, i32 0, i32 1
  %113 = load <2 x float>, ptr %112, align 4
  %114 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  %115 = load <2 x float>, ptr %114, align 4
  %116 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  %117 = load <2 x float>, ptr %116, align 4
  %118 = call { <2 x float>, <2 x float> } @b2InvMulTransforms(<2 x float> %111, <2 x float> %113, <2 x float> %115, <2 x float> %117)
  %119 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 0
  %120 = extractvalue { <2 x float>, <2 x float> } %118, 0
  store <2 x float> %120, ptr %119, align 4
  %121 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 1
  %122 = extractvalue { <2 x float>, <2 x float> } %118, 1
  store <2 x float> %122, ptr %121, align 4
  call void @llvm.lifetime.start.p0(i64 144, ptr %18) #10
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.b2Polygon, ptr %123, i32 0, i32 4
  %125 = load i32, ptr %124, align 4, !tbaa !12
  %126 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 4
  store i32 %125, ptr %126, align 4, !tbaa !12
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.b2Polygon, ptr %127, i32 0, i32 3
  %129 = load float, ptr %128, align 4, !tbaa !16
  %130 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 3
  store float %129, ptr %130, align 4, !tbaa !16
  %131 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 0
  %132 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %131, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %132, ptr align 4 @b2Vec2_zero, i64 8, i1 false), !tbaa.struct !9
  %133 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 1
  %134 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %133, i64 0, i64 0
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.b2Polygon, ptr %135, i32 0, i32 1
  %137 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %136, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %134, ptr align 4 %137, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #10
  store i32 1, ptr %19, align 4, !tbaa !17
  br label %138

138:                                              ; preds = %166, %7
  %139 = load i32, ptr %19, align 4, !tbaa !17
  %140 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 4
  %141 = load i32, ptr %140, align 4, !tbaa !12
  %142 = icmp slt i32 %139, %141
  br i1 %142, label %144, label %143

143:                                              ; preds = %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #10
  br label %169

144:                                              ; preds = %138
  %145 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 0
  %146 = load i32, ptr %19, align 4, !tbaa !17
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %145, i64 0, i64 %147
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #10
  %149 = load ptr, ptr %10, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.b2Polygon, ptr %149, i32 0, i32 0
  %151 = load i32, ptr %19, align 4, !tbaa !17
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %150, i64 0, i64 %152
  %154 = load <2 x float>, ptr %153, align 4
  %155 = load <2 x float>, ptr %12, align 4
  %156 = call <2 x float> @b2Sub(<2 x float> %154, <2 x float> %155)
  store <2 x float> %156, ptr %20, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %148, ptr align 4 %20, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  %157 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 1
  %158 = load i32, ptr %19, align 4, !tbaa !17
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %157, i64 0, i64 %159
  %161 = load ptr, ptr %10, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.b2Polygon, ptr %161, i32 0, i32 1
  %163 = load i32, ptr %19, align 4, !tbaa !17
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %162, i64 0, i64 %164
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %160, ptr align 4 %165, i64 8, i1 false), !tbaa.struct !9
  br label %166

166:                                              ; preds = %144
  %167 = load i32, ptr %19, align 4, !tbaa !17
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %19, align 4, !tbaa !17
  br label %138, !llvm.loop !18

169:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 144, ptr %21) #10
  %170 = load ptr, ptr %11, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.b2Polygon, ptr %170, i32 0, i32 4
  %172 = load i32, ptr %171, align 4, !tbaa !12
  %173 = getelementptr inbounds %struct.b2Polygon, ptr %21, i32 0, i32 4
  store i32 %172, ptr %173, align 4, !tbaa !12
  %174 = load ptr, ptr %11, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.b2Polygon, ptr %174, i32 0, i32 3
  %176 = load float, ptr %175, align 4, !tbaa !16
  %177 = getelementptr inbounds %struct.b2Polygon, ptr %21, i32 0, i32 3
  store float %176, ptr %177, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #10
  store i32 0, ptr %22, align 4, !tbaa !17
  br label %178

178:                                              ; preds = %213, %169
  %179 = load i32, ptr %22, align 4, !tbaa !17
  %180 = getelementptr inbounds %struct.b2Polygon, ptr %21, i32 0, i32 4
  %181 = load i32, ptr %180, align 4, !tbaa !12
  %182 = icmp slt i32 %179, %181
  br i1 %182, label %184, label %183

183:                                              ; preds = %178
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  br label %216

184:                                              ; preds = %178
  %185 = getelementptr inbounds %struct.b2Polygon, ptr %21, i32 0, i32 0
  %186 = load i32, ptr %22, align 4, !tbaa !17
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %185, i64 0, i64 %187
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #10
  %189 = load ptr, ptr %11, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.b2Polygon, ptr %189, i32 0, i32 0
  %191 = load i32, ptr %22, align 4, !tbaa !17
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %190, i64 0, i64 %192
  %194 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 0
  %195 = load <2 x float>, ptr %194, align 4
  %196 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 1
  %197 = load <2 x float>, ptr %196, align 4
  %198 = load <2 x float>, ptr %193, align 4
  %199 = call <2 x float> @b2TransformPoint(<2 x float> %195, <2 x float> %197, <2 x float> %198)
  store <2 x float> %199, ptr %23, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %188, ptr align 4 %23, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  %200 = getelementptr inbounds %struct.b2Polygon, ptr %21, i32 0, i32 1
  %201 = load i32, ptr %22, align 4, !tbaa !17
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %200, i64 0, i64 %202
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #10
  %204 = getelementptr inbounds %struct.b2Transform, ptr %17, i32 0, i32 1
  %205 = load ptr, ptr %11, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.b2Polygon, ptr %205, i32 0, i32 1
  %207 = load i32, ptr %22, align 4, !tbaa !17
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %206, i64 0, i64 %208
  %210 = load <2 x float>, ptr %204, align 4
  %211 = load <2 x float>, ptr %209, align 4
  %212 = call <2 x float> @b2RotateVector(<2 x float> %210, <2 x float> %211)
  store <2 x float> %212, ptr %24, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %203, ptr align 4 %24, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #10
  br label %213

213:                                              ; preds = %184
  %214 = load i32, ptr %22, align 4, !tbaa !17
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %22, align 4, !tbaa !17
  br label %178, !llvm.loop !20

216:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #10
  store i32 0, ptr %25, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #10
  %217 = call float @b2FindMaxSeparation(ptr noundef %25, ptr noundef %18, ptr noundef %21)
  store float %217, ptr %26, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #10
  store i32 0, ptr %27, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #10
  %218 = call float @b2FindMaxSeparation(ptr noundef %27, ptr noundef %21, ptr noundef %18)
  store float %218, ptr %28, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #10
  %219 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 3
  %220 = load float, ptr %219, align 4, !tbaa !16
  %221 = getelementptr inbounds %struct.b2Polygon, ptr %21, i32 0, i32 3
  %222 = load float, ptr %221, align 4, !tbaa !16
  %223 = fadd float %220, %222
  store float %223, ptr %29, align 4, !tbaa !10
  %224 = load float, ptr %26, align 4, !tbaa !10
  %225 = load float, ptr %14, align 4, !tbaa !10
  %226 = load float, ptr %29, align 4, !tbaa !10
  %227 = fadd float %225, %226
  %228 = fcmp ogt float %224, %227
  br i1 %228, label %235, label %229

229:                                              ; preds = %216
  %230 = load float, ptr %28, align 4, !tbaa !10
  %231 = load float, ptr %14, align 4, !tbaa !10
  %232 = load float, ptr %29, align 4, !tbaa !10
  %233 = fadd float %231, %232
  %234 = fcmp ogt float %230, %233
  br i1 %234, label %235, label %242

235:                                              ; preds = %229, %216
  call void @llvm.memset.p0.i64(ptr align 4 %0, i8 0, i64 112, i1 false)
  %236 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 0
  %237 = getelementptr inbounds %struct.b2Vec2, ptr %236, i32 0, i32 0
  %238 = getelementptr inbounds %struct.b2Vec2, ptr %236, i32 0, i32 1
  %239 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 1
  %240 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %241 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 3
  store i32 1, ptr %30, align 4
  br label %728

242:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #10
  %243 = load float, ptr %26, align 4, !tbaa !10
  %244 = load float, ptr %28, align 4, !tbaa !10
  %245 = fcmp oge float %243, %244
  br i1 %245, label %246, label %279

246:                                              ; preds = %242
  store i8 0, ptr %31, align 1, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #10
  %247 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 1
  %248 = load i32, ptr %25, align 4, !tbaa !17
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %247, i64 0, i64 %249
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %250, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #10
  %251 = getelementptr inbounds %struct.b2Polygon, ptr %21, i32 0, i32 4
  %252 = load i32, ptr %251, align 4, !tbaa !12
  store i32 %252, ptr %33, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #10
  %253 = getelementptr inbounds %struct.b2Polygon, ptr %21, i32 0, i32 1
  %254 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %253, i64 0, i64 0
  store ptr %254, ptr %34, align 8, !tbaa !5
  store i32 0, ptr %27, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #10
  store float 0x47EFFFFFE0000000, ptr %35, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #10
  store i32 0, ptr %36, align 4, !tbaa !17
  br label %255

255:                                              ; preds = %275, %246
  %256 = load i32, ptr %36, align 4, !tbaa !17
  %257 = load i32, ptr %33, align 4, !tbaa !17
  %258 = icmp slt i32 %256, %257
  br i1 %258, label %260, label %259

259:                                              ; preds = %255
  store i32 8, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #10
  br label %278

260:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #10
  %261 = load ptr, ptr %34, align 8, !tbaa !5
  %262 = load i32, ptr %36, align 4, !tbaa !17
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds %struct.b2Vec2, ptr %261, i64 %263
  %265 = load <2 x float>, ptr %32, align 4
  %266 = load <2 x float>, ptr %264, align 4
  %267 = call float @b2Dot(<2 x float> %265, <2 x float> %266)
  store float %267, ptr %37, align 4, !tbaa !10
  %268 = load float, ptr %37, align 4, !tbaa !10
  %269 = load float, ptr %35, align 4, !tbaa !10
  %270 = fcmp olt float %268, %269
  br i1 %270, label %271, label %274

271:                                              ; preds = %260
  %272 = load float, ptr %37, align 4, !tbaa !10
  store float %272, ptr %35, align 4, !tbaa !10
  %273 = load i32, ptr %36, align 4, !tbaa !17
  store i32 %273, ptr %27, align 4, !tbaa !17
  br label %274

274:                                              ; preds = %271, %260
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #10
  br label %275

275:                                              ; preds = %274
  %276 = load i32, ptr %36, align 4, !tbaa !17
  %277 = add nsw i32 %276, 1
  store i32 %277, ptr %36, align 4, !tbaa !17
  br label %255, !llvm.loop !23

278:                                              ; preds = %259
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  br label %312

279:                                              ; preds = %242
  store i8 1, ptr %31, align 1, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #10
  %280 = getelementptr inbounds %struct.b2Polygon, ptr %21, i32 0, i32 1
  %281 = load i32, ptr %27, align 4, !tbaa !17
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %280, i64 0, i64 %282
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %38, ptr align 4 %283, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #10
  %284 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 4
  %285 = load i32, ptr %284, align 4, !tbaa !12
  store i32 %285, ptr %39, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #10
  %286 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 1
  %287 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %286, i64 0, i64 0
  store ptr %287, ptr %40, align 8, !tbaa !5
  store i32 0, ptr %25, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #10
  store float 0x47EFFFFFE0000000, ptr %41, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #10
  store i32 0, ptr %42, align 4, !tbaa !17
  br label %288

288:                                              ; preds = %308, %279
  %289 = load i32, ptr %42, align 4, !tbaa !17
  %290 = load i32, ptr %39, align 4, !tbaa !17
  %291 = icmp slt i32 %289, %290
  br i1 %291, label %293, label %292

292:                                              ; preds = %288
  store i32 11, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #10
  br label %311

293:                                              ; preds = %288
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #10
  %294 = load ptr, ptr %40, align 8, !tbaa !5
  %295 = load i32, ptr %42, align 4, !tbaa !17
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds %struct.b2Vec2, ptr %294, i64 %296
  %298 = load <2 x float>, ptr %38, align 4
  %299 = load <2 x float>, ptr %297, align 4
  %300 = call float @b2Dot(<2 x float> %298, <2 x float> %299)
  store float %300, ptr %43, align 4, !tbaa !10
  %301 = load float, ptr %43, align 4, !tbaa !10
  %302 = load float, ptr %41, align 4, !tbaa !10
  %303 = fcmp olt float %301, %302
  br i1 %303, label %304, label %307

304:                                              ; preds = %293
  %305 = load float, ptr %43, align 4, !tbaa !10
  store float %305, ptr %41, align 4, !tbaa !10
  %306 = load i32, ptr %42, align 4, !tbaa !17
  store i32 %306, ptr %25, align 4, !tbaa !17
  br label %307

307:                                              ; preds = %304, %293
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #10
  br label %308

308:                                              ; preds = %307
  %309 = load i32, ptr %42, align 4, !tbaa !17
  %310 = add nsw i32 %309, 1
  store i32 %310, ptr %42, align 4, !tbaa !17
  br label %288, !llvm.loop !24

311:                                              ; preds = %292
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #10
  br label %312

312:                                              ; preds = %311, %278
  call void @llvm.memset.p0.i64(ptr align 4 %0, i8 0, i64 112, i1 false)
  %313 = load float, ptr %26, align 4, !tbaa !10
  %314 = load float, ptr %13, align 4, !tbaa !10
  %315 = fmul float 0x3FB99999A0000000, %314
  %316 = fcmp ogt float %313, %315
  br i1 %316, label %322, label %317

317:                                              ; preds = %312
  %318 = load float, ptr %28, align 4, !tbaa !10
  %319 = load float, ptr %13, align 4, !tbaa !10
  %320 = fmul float 0x3FB99999A0000000, %319
  %321 = fcmp ogt float %318, %320
  br i1 %321, label %322, label %663

322:                                              ; preds = %317, %312
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #10
  %323 = load i32, ptr %25, align 4, !tbaa !17
  store i32 %323, ptr %44, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #10
  %324 = load i32, ptr %25, align 4, !tbaa !17
  %325 = add nsw i32 %324, 1
  %326 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 4
  %327 = load i32, ptr %326, align 4, !tbaa !12
  %328 = icmp slt i32 %325, %327
  br i1 %328, label %329, label %332

329:                                              ; preds = %322
  %330 = load i32, ptr %25, align 4, !tbaa !17
  %331 = add nsw i32 %330, 1
  br label %333

332:                                              ; preds = %322
  br label %333

333:                                              ; preds = %332, %329
  %334 = phi i32 [ %331, %329 ], [ 0, %332 ]
  store i32 %334, ptr %45, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #10
  %335 = load i32, ptr %27, align 4, !tbaa !17
  store i32 %335, ptr %46, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #10
  %336 = load i32, ptr %27, align 4, !tbaa !17
  %337 = add nsw i32 %336, 1
  %338 = getelementptr inbounds %struct.b2Polygon, ptr %21, i32 0, i32 4
  %339 = load i32, ptr %338, align 4, !tbaa !12
  %340 = icmp slt i32 %337, %339
  br i1 %340, label %341, label %344

341:                                              ; preds = %333
  %342 = load i32, ptr %27, align 4, !tbaa !17
  %343 = add nsw i32 %342, 1
  br label %345

344:                                              ; preds = %333
  br label %345

345:                                              ; preds = %344, %341
  %346 = phi i32 [ %343, %341 ], [ 0, %344 ]
  store i32 %346, ptr %47, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #10
  %347 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 0
  %348 = load i32, ptr %44, align 4, !tbaa !17
  %349 = sext i32 %348 to i64
  %350 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %347, i64 0, i64 %349
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %48, ptr align 4 %350, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #10
  %351 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 0
  %352 = load i32, ptr %45, align 4, !tbaa !17
  %353 = sext i32 %352 to i64
  %354 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %351, i64 0, i64 %353
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %49, ptr align 4 %354, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #10
  %355 = getelementptr inbounds %struct.b2Polygon, ptr %21, i32 0, i32 0
  %356 = load i32, ptr %46, align 4, !tbaa !17
  %357 = sext i32 %356 to i64
  %358 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %355, i64 0, i64 %357
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %50, ptr align 4 %358, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #10
  %359 = getelementptr inbounds %struct.b2Polygon, ptr %21, i32 0, i32 0
  %360 = load i32, ptr %47, align 4, !tbaa !17
  %361 = sext i32 %360 to i64
  %362 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %359, i64 0, i64 %361
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %51, ptr align 4 %362, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 28, ptr %52) #10
  %363 = load <2 x float>, ptr %48, align 4
  %364 = load <2 x float>, ptr %49, align 4
  %365 = load <2 x float>, ptr %50, align 4
  %366 = load <2 x float>, ptr %51, align 4
  call void @b2SegmentDistance(ptr dead_on_unwind writable sret(%struct.b2SegmentDistanceResult) align 4 %52, <2 x float> %363, <2 x float> %364, <2 x float> %365, <2 x float> %366)
  br label %367

367:                                              ; preds = %345
  %368 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %52, i32 0, i32 4
  %369 = load float, ptr %368, align 4, !tbaa !25
  %370 = fcmp ogt float %369, 0.000000e+00
  br i1 %370, label %375, label %371

371:                                              ; preds = %367
  %372 = call i32 @b2InternalAssertFcn(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 848)
  %373 = icmp ne i32 %372, 0
  br i1 %373, label %374, label %375

374:                                              ; preds = %371
  call void @llvm.trap()
  br label %375

375:                                              ; preds = %374, %371, %367
  br label %376

376:                                              ; preds = %375
  br label %377

377:                                              ; preds = %376
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #10
  %378 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %52, i32 0, i32 4
  %379 = load float, ptr %378, align 4, !tbaa !25
  %380 = call float @sqrtf(float noundef %379) #10
  store float %380, ptr %53, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #10
  %381 = load float, ptr %53, align 4, !tbaa !10
  %382 = load float, ptr %29, align 4, !tbaa !10
  %383 = fsub float %381, %382
  store float %383, ptr %54, align 4, !tbaa !10
  %384 = load float, ptr %53, align 4, !tbaa !10
  %385 = load float, ptr %29, align 4, !tbaa !10
  %386 = fsub float %384, %385
  %387 = load float, ptr %14, align 4, !tbaa !10
  %388 = fcmp ogt float %386, %387
  br i1 %388, label %389, label %390

389:                                              ; preds = %377
  store i32 1, ptr %30, align 4
  br label %660

390:                                              ; preds = %377
  call void @llvm.lifetime.start.p0(i64 112, ptr %55) #10
  %391 = load i32, ptr %25, align 4, !tbaa !17
  %392 = load i32, ptr %27, align 4, !tbaa !17
  %393 = load i8, ptr %31, align 1, !tbaa !21, !range !27, !noundef !28
  %394 = trunc i8 %393 to i1
  call void @b2ClipPolygons(ptr dead_on_unwind writable sret(%struct.b2Manifold) align 4 %55, ptr noundef %18, ptr noundef %21, i32 noundef %391, i32 noundef %392, i1 noundef zeroext %394)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %0, ptr align 4 %55, i64 112, i1 false), !tbaa.struct !29
  call void @llvm.lifetime.end.p0(i64 112, ptr %55) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #10
  store float 0x47EFFFFFE0000000, ptr %56, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %57) #10
  store i32 0, ptr %57, align 4, !tbaa !17
  br label %395

395:                                              ; preds = %410, %390
  %396 = load i32, ptr %57, align 4, !tbaa !17
  %397 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 3
  %398 = load i32, ptr %397, align 4, !tbaa !31
  %399 = icmp slt i32 %396, %398
  br i1 %399, label %401, label %400

400:                                              ; preds = %395
  store i32 16, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #10
  br label %413

401:                                              ; preds = %395
  %402 = load float, ptr %56, align 4, !tbaa !10
  %403 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %404 = load i32, ptr %57, align 4, !tbaa !17
  %405 = sext i32 %404 to i64
  %406 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %403, i64 0, i64 %405
  %407 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %406, i32 0, i32 3
  %408 = load float, ptr %407, align 4, !tbaa !33
  %409 = call float @b2MinFloat(float noundef %402, float noundef %408)
  store float %409, ptr %56, align 4, !tbaa !10
  br label %410

410:                                              ; preds = %401
  %411 = load i32, ptr %57, align 4, !tbaa !17
  %412 = add nsw i32 %411, 1
  store i32 %412, ptr %57, align 4, !tbaa !17
  br label %395, !llvm.loop !36

413:                                              ; preds = %400
  %414 = load float, ptr %54, align 4, !tbaa !10
  %415 = load float, ptr %13, align 4, !tbaa !10
  %416 = call float @llvm.fmuladd.f32(float 0x3FB99999A0000000, float %415, float %414)
  %417 = load float, ptr %56, align 4, !tbaa !10
  %418 = fcmp olt float %416, %417
  br i1 %418, label %419, label %659

419:                                              ; preds = %413
  %420 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %52, i32 0, i32 2
  %421 = load float, ptr %420, align 4, !tbaa !37
  %422 = fcmp oeq float %421, 0.000000e+00
  br i1 %422, label %423, label %478

423:                                              ; preds = %419
  %424 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %52, i32 0, i32 3
  %425 = load float, ptr %424, align 4, !tbaa !38
  %426 = fcmp oeq float %425, 0.000000e+00
  br i1 %426, label %427, label %478

427:                                              ; preds = %423
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #10
  %428 = load <2 x float>, ptr %50, align 4
  %429 = load <2 x float>, ptr %48, align 4
  %430 = call <2 x float> @b2Sub(<2 x float> %428, <2 x float> %429)
  store <2 x float> %430, ptr %58, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #10
  %431 = load float, ptr %53, align 4, !tbaa !10
  %432 = fdiv float 1.000000e+00, %431
  store float %432, ptr %59, align 4, !tbaa !10
  %433 = load float, ptr %59, align 4, !tbaa !10
  %434 = getelementptr inbounds %struct.b2Vec2, ptr %58, i32 0, i32 0
  %435 = load float, ptr %434, align 4, !tbaa !39
  %436 = fmul float %435, %433
  store float %436, ptr %434, align 4, !tbaa !39
  %437 = load float, ptr %59, align 4, !tbaa !10
  %438 = getelementptr inbounds %struct.b2Vec2, ptr %58, i32 0, i32 1
  %439 = load float, ptr %438, align 4, !tbaa !40
  %440 = fmul float %439, %437
  store float %440, ptr %438, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #10
  %441 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 3
  %442 = load float, ptr %441, align 4, !tbaa !16
  %443 = load <2 x float>, ptr %48, align 4
  %444 = load <2 x float>, ptr %58, align 4
  %445 = call <2 x float> @b2MulAdd(<2 x float> %443, float noundef %442, <2 x float> %444)
  store <2 x float> %445, ptr %60, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #10
  %446 = getelementptr inbounds %struct.b2Polygon, ptr %21, i32 0, i32 3
  %447 = load float, ptr %446, align 4, !tbaa !16
  %448 = fneg float %447
  %449 = load <2 x float>, ptr %50, align 4
  %450 = load <2 x float>, ptr %58, align 4
  %451 = call <2 x float> @b2MulAdd(<2 x float> %449, float noundef %448, <2 x float> %450)
  store <2 x float> %451, ptr %61, align 4
  %452 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %452, ptr align 4 %58, i64 8, i1 false), !tbaa.struct !9
  %453 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %454 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %453, i64 0, i64 0
  %455 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %454, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #10
  %456 = load <2 x float>, ptr %60, align 4
  %457 = load <2 x float>, ptr %61, align 4
  %458 = call <2 x float> @b2Lerp(<2 x float> %456, <2 x float> %457, float noundef 5.000000e-01)
  store <2 x float> %458, ptr %62, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %455, ptr align 4 %62, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #10
  %459 = load float, ptr %53, align 4, !tbaa !10
  %460 = load float, ptr %29, align 4, !tbaa !10
  %461 = fsub float %459, %460
  %462 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %463 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %462, i64 0, i64 0
  %464 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %463, i32 0, i32 3
  store float %461, ptr %464, align 4, !tbaa !33
  %465 = load i32, ptr %44, align 4, !tbaa !17
  %466 = trunc i32 %465 to i8
  %467 = zext i8 %466 to i32
  %468 = shl i32 %467, 8
  %469 = load i32, ptr %46, align 4, !tbaa !17
  %470 = trunc i32 %469 to i8
  %471 = zext i8 %470 to i32
  %472 = or i32 %468, %471
  %473 = trunc i32 %472 to i16
  %474 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %475 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %474, i64 0, i64 0
  %476 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %475, i32 0, i32 8
  store i16 %473, ptr %476, align 4, !tbaa !41
  %477 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 3
  store i32 1, ptr %477, align 4, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #10
  br label %658

478:                                              ; preds = %423, %419
  %479 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %52, i32 0, i32 2
  %480 = load float, ptr %479, align 4, !tbaa !37
  %481 = fcmp oeq float %480, 0.000000e+00
  br i1 %481, label %482, label %537

482:                                              ; preds = %478
  %483 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %52, i32 0, i32 3
  %484 = load float, ptr %483, align 4, !tbaa !38
  %485 = fcmp oeq float %484, 1.000000e+00
  br i1 %485, label %486, label %537

486:                                              ; preds = %482
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #10
  %487 = load <2 x float>, ptr %51, align 4
  %488 = load <2 x float>, ptr %48, align 4
  %489 = call <2 x float> @b2Sub(<2 x float> %487, <2 x float> %488)
  store <2 x float> %489, ptr %63, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %64) #10
  %490 = load float, ptr %53, align 4, !tbaa !10
  %491 = fdiv float 1.000000e+00, %490
  store float %491, ptr %64, align 4, !tbaa !10
  %492 = load float, ptr %64, align 4, !tbaa !10
  %493 = getelementptr inbounds %struct.b2Vec2, ptr %63, i32 0, i32 0
  %494 = load float, ptr %493, align 4, !tbaa !39
  %495 = fmul float %494, %492
  store float %495, ptr %493, align 4, !tbaa !39
  %496 = load float, ptr %64, align 4, !tbaa !10
  %497 = getelementptr inbounds %struct.b2Vec2, ptr %63, i32 0, i32 1
  %498 = load float, ptr %497, align 4, !tbaa !40
  %499 = fmul float %498, %496
  store float %499, ptr %497, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #10
  %500 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 3
  %501 = load float, ptr %500, align 4, !tbaa !16
  %502 = load <2 x float>, ptr %48, align 4
  %503 = load <2 x float>, ptr %63, align 4
  %504 = call <2 x float> @b2MulAdd(<2 x float> %502, float noundef %501, <2 x float> %503)
  store <2 x float> %504, ptr %65, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %66) #10
  %505 = getelementptr inbounds %struct.b2Polygon, ptr %21, i32 0, i32 3
  %506 = load float, ptr %505, align 4, !tbaa !16
  %507 = fneg float %506
  %508 = load <2 x float>, ptr %51, align 4
  %509 = load <2 x float>, ptr %63, align 4
  %510 = call <2 x float> @b2MulAdd(<2 x float> %508, float noundef %507, <2 x float> %509)
  store <2 x float> %510, ptr %66, align 4
  %511 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %511, ptr align 4 %63, i64 8, i1 false), !tbaa.struct !9
  %512 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %513 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %512, i64 0, i64 0
  %514 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %513, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #10
  %515 = load <2 x float>, ptr %65, align 4
  %516 = load <2 x float>, ptr %66, align 4
  %517 = call <2 x float> @b2Lerp(<2 x float> %515, <2 x float> %516, float noundef 5.000000e-01)
  store <2 x float> %517, ptr %67, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %514, ptr align 4 %67, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #10
  %518 = load float, ptr %53, align 4, !tbaa !10
  %519 = load float, ptr %29, align 4, !tbaa !10
  %520 = fsub float %518, %519
  %521 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %522 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %521, i64 0, i64 0
  %523 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %522, i32 0, i32 3
  store float %520, ptr %523, align 4, !tbaa !33
  %524 = load i32, ptr %44, align 4, !tbaa !17
  %525 = trunc i32 %524 to i8
  %526 = zext i8 %525 to i32
  %527 = shl i32 %526, 8
  %528 = load i32, ptr %47, align 4, !tbaa !17
  %529 = trunc i32 %528 to i8
  %530 = zext i8 %529 to i32
  %531 = or i32 %527, %530
  %532 = trunc i32 %531 to i16
  %533 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %534 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %533, i64 0, i64 0
  %535 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %534, i32 0, i32 8
  store i16 %532, ptr %535, align 4, !tbaa !41
  %536 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 3
  store i32 1, ptr %536, align 4, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #10
  br label %657

537:                                              ; preds = %482, %478
  %538 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %52, i32 0, i32 2
  %539 = load float, ptr %538, align 4, !tbaa !37
  %540 = fcmp oeq float %539, 1.000000e+00
  br i1 %540, label %541, label %596

541:                                              ; preds = %537
  %542 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %52, i32 0, i32 3
  %543 = load float, ptr %542, align 4, !tbaa !38
  %544 = fcmp oeq float %543, 0.000000e+00
  br i1 %544, label %545, label %596

545:                                              ; preds = %541
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #10
  %546 = load <2 x float>, ptr %50, align 4
  %547 = load <2 x float>, ptr %49, align 4
  %548 = call <2 x float> @b2Sub(<2 x float> %546, <2 x float> %547)
  store <2 x float> %548, ptr %68, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %69) #10
  %549 = load float, ptr %53, align 4, !tbaa !10
  %550 = fdiv float 1.000000e+00, %549
  store float %550, ptr %69, align 4, !tbaa !10
  %551 = load float, ptr %69, align 4, !tbaa !10
  %552 = getelementptr inbounds %struct.b2Vec2, ptr %68, i32 0, i32 0
  %553 = load float, ptr %552, align 4, !tbaa !39
  %554 = fmul float %553, %551
  store float %554, ptr %552, align 4, !tbaa !39
  %555 = load float, ptr %69, align 4, !tbaa !10
  %556 = getelementptr inbounds %struct.b2Vec2, ptr %68, i32 0, i32 1
  %557 = load float, ptr %556, align 4, !tbaa !40
  %558 = fmul float %557, %555
  store float %558, ptr %556, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %70) #10
  %559 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 3
  %560 = load float, ptr %559, align 4, !tbaa !16
  %561 = load <2 x float>, ptr %49, align 4
  %562 = load <2 x float>, ptr %68, align 4
  %563 = call <2 x float> @b2MulAdd(<2 x float> %561, float noundef %560, <2 x float> %562)
  store <2 x float> %563, ptr %70, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %71) #10
  %564 = getelementptr inbounds %struct.b2Polygon, ptr %21, i32 0, i32 3
  %565 = load float, ptr %564, align 4, !tbaa !16
  %566 = fneg float %565
  %567 = load <2 x float>, ptr %50, align 4
  %568 = load <2 x float>, ptr %68, align 4
  %569 = call <2 x float> @b2MulAdd(<2 x float> %567, float noundef %566, <2 x float> %568)
  store <2 x float> %569, ptr %71, align 4
  %570 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %570, ptr align 4 %68, i64 8, i1 false), !tbaa.struct !9
  %571 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %572 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %571, i64 0, i64 0
  %573 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %572, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %72) #10
  %574 = load <2 x float>, ptr %70, align 4
  %575 = load <2 x float>, ptr %71, align 4
  %576 = call <2 x float> @b2Lerp(<2 x float> %574, <2 x float> %575, float noundef 5.000000e-01)
  store <2 x float> %576, ptr %72, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %573, ptr align 4 %72, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %72) #10
  %577 = load float, ptr %53, align 4, !tbaa !10
  %578 = load float, ptr %29, align 4, !tbaa !10
  %579 = fsub float %577, %578
  %580 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %581 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %580, i64 0, i64 0
  %582 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %581, i32 0, i32 3
  store float %579, ptr %582, align 4, !tbaa !33
  %583 = load i32, ptr %45, align 4, !tbaa !17
  %584 = trunc i32 %583 to i8
  %585 = zext i8 %584 to i32
  %586 = shl i32 %585, 8
  %587 = load i32, ptr %46, align 4, !tbaa !17
  %588 = trunc i32 %587 to i8
  %589 = zext i8 %588 to i32
  %590 = or i32 %586, %589
  %591 = trunc i32 %590 to i16
  %592 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %593 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %592, i64 0, i64 0
  %594 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %593, i32 0, i32 8
  store i16 %591, ptr %594, align 4, !tbaa !41
  %595 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 3
  store i32 1, ptr %595, align 4, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 8, ptr %71) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %69) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #10
  br label %656

596:                                              ; preds = %541, %537
  %597 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %52, i32 0, i32 2
  %598 = load float, ptr %597, align 4, !tbaa !37
  %599 = fcmp oeq float %598, 1.000000e+00
  br i1 %599, label %600, label %655

600:                                              ; preds = %596
  %601 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %52, i32 0, i32 3
  %602 = load float, ptr %601, align 4, !tbaa !38
  %603 = fcmp oeq float %602, 1.000000e+00
  br i1 %603, label %604, label %655

604:                                              ; preds = %600
  call void @llvm.lifetime.start.p0(i64 8, ptr %73) #10
  %605 = load <2 x float>, ptr %51, align 4
  %606 = load <2 x float>, ptr %49, align 4
  %607 = call <2 x float> @b2Sub(<2 x float> %605, <2 x float> %606)
  store <2 x float> %607, ptr %73, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %74) #10
  %608 = load float, ptr %53, align 4, !tbaa !10
  %609 = fdiv float 1.000000e+00, %608
  store float %609, ptr %74, align 4, !tbaa !10
  %610 = load float, ptr %74, align 4, !tbaa !10
  %611 = getelementptr inbounds %struct.b2Vec2, ptr %73, i32 0, i32 0
  %612 = load float, ptr %611, align 4, !tbaa !39
  %613 = fmul float %612, %610
  store float %613, ptr %611, align 4, !tbaa !39
  %614 = load float, ptr %74, align 4, !tbaa !10
  %615 = getelementptr inbounds %struct.b2Vec2, ptr %73, i32 0, i32 1
  %616 = load float, ptr %615, align 4, !tbaa !40
  %617 = fmul float %616, %614
  store float %617, ptr %615, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %75) #10
  %618 = getelementptr inbounds %struct.b2Polygon, ptr %18, i32 0, i32 3
  %619 = load float, ptr %618, align 4, !tbaa !16
  %620 = load <2 x float>, ptr %49, align 4
  %621 = load <2 x float>, ptr %73, align 4
  %622 = call <2 x float> @b2MulAdd(<2 x float> %620, float noundef %619, <2 x float> %621)
  store <2 x float> %622, ptr %75, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %76) #10
  %623 = getelementptr inbounds %struct.b2Polygon, ptr %21, i32 0, i32 3
  %624 = load float, ptr %623, align 4, !tbaa !16
  %625 = fneg float %624
  %626 = load <2 x float>, ptr %51, align 4
  %627 = load <2 x float>, ptr %73, align 4
  %628 = call <2 x float> @b2MulAdd(<2 x float> %626, float noundef %625, <2 x float> %627)
  store <2 x float> %628, ptr %76, align 4
  %629 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %629, ptr align 4 %73, i64 8, i1 false), !tbaa.struct !9
  %630 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %631 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %630, i64 0, i64 0
  %632 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %631, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %77) #10
  %633 = load <2 x float>, ptr %75, align 4
  %634 = load <2 x float>, ptr %76, align 4
  %635 = call <2 x float> @b2Lerp(<2 x float> %633, <2 x float> %634, float noundef 5.000000e-01)
  store <2 x float> %635, ptr %77, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %632, ptr align 4 %77, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %77) #10
  %636 = load float, ptr %53, align 4, !tbaa !10
  %637 = load float, ptr %29, align 4, !tbaa !10
  %638 = fsub float %636, %637
  %639 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %640 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %639, i64 0, i64 0
  %641 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %640, i32 0, i32 3
  store float %638, ptr %641, align 4, !tbaa !33
  %642 = load i32, ptr %45, align 4, !tbaa !17
  %643 = trunc i32 %642 to i8
  %644 = zext i8 %643 to i32
  %645 = shl i32 %644, 8
  %646 = load i32, ptr %47, align 4, !tbaa !17
  %647 = trunc i32 %646 to i8
  %648 = zext i8 %647 to i32
  %649 = or i32 %645, %648
  %650 = trunc i32 %649 to i16
  %651 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %652 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %651, i64 0, i64 0
  %653 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %652, i32 0, i32 8
  store i16 %650, ptr %653, align 4, !tbaa !41
  %654 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 3
  store i32 1, ptr %654, align 4, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 8, ptr %76) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %75) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %74) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %73) #10
  br label %655

655:                                              ; preds = %604, %600, %596
  br label %656

656:                                              ; preds = %655, %545
  br label %657

657:                                              ; preds = %656, %486
  br label %658

658:                                              ; preds = %657, %427
  br label %659

659:                                              ; preds = %658, %413
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #10
  store i32 0, ptr %30, align 4
  br label %660

660:                                              ; preds = %659, %389
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #10
  call void @llvm.lifetime.end.p0(i64 28, ptr %52) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #10
  %661 = load i32, ptr %30, align 4
  switch i32 %661, label %727 [
    i32 0, label %662
  ]

662:                                              ; preds = %660
  br label %668

663:                                              ; preds = %317
  call void @llvm.lifetime.start.p0(i64 112, ptr %78) #10
  %664 = load i32, ptr %25, align 4, !tbaa !17
  %665 = load i32, ptr %27, align 4, !tbaa !17
  %666 = load i8, ptr %31, align 1, !tbaa !21, !range !27, !noundef !28
  %667 = trunc i8 %666 to i1
  call void @b2ClipPolygons(ptr dead_on_unwind writable sret(%struct.b2Manifold) align 4 %78, ptr noundef %18, ptr noundef %21, i32 noundef %664, i32 noundef %665, i1 noundef zeroext %667)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %0, ptr align 4 %78, i64 112, i1 false), !tbaa.struct !29
  call void @llvm.lifetime.end.p0(i64 112, ptr %78) #10
  br label %668

668:                                              ; preds = %663, %662
  %669 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 3
  %670 = load i32, ptr %669, align 4, !tbaa !31
  %671 = icmp sgt i32 %670, 0
  br i1 %671, label %672, label %726

672:                                              ; preds = %668
  %673 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %79) #10
  %674 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 1
  %675 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 0
  %676 = load <2 x float>, ptr %674, align 4
  %677 = load <2 x float>, ptr %675, align 4
  %678 = call <2 x float> @b2RotateVector(<2 x float> %676, <2 x float> %677)
  store <2 x float> %678, ptr %79, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %673, ptr align 4 %79, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %79) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %80) #10
  store i32 0, ptr %80, align 4, !tbaa !17
  br label %679

679:                                              ; preds = %722, %672
  %680 = load i32, ptr %80, align 4, !tbaa !17
  %681 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 3
  %682 = load i32, ptr %681, align 4, !tbaa !31
  %683 = icmp slt i32 %680, %682
  br i1 %683, label %685, label %684

684:                                              ; preds = %679
  store i32 19, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %80) #10
  br label %725

685:                                              ; preds = %679
  call void @llvm.lifetime.start.p0(i64 8, ptr %81) #10
  %686 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %687 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %686, i64 0, i64 0
  %688 = load i32, ptr %80, align 4, !tbaa !17
  %689 = sext i32 %688 to i64
  %690 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %687, i64 %689
  store ptr %690, ptr %81, align 8, !tbaa !5
  %691 = load ptr, ptr %81, align 8, !tbaa !5
  %692 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %691, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %82) #10
  %693 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 1
  %694 = load ptr, ptr %81, align 8, !tbaa !5
  %695 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %694, i32 0, i32 1
  %696 = load <2 x float>, ptr %695, align 4
  %697 = load <2 x float>, ptr %12, align 4
  %698 = call <2 x float> @b2Add(<2 x float> %696, <2 x float> %697)
  store <2 x float> %698, ptr %83, align 4
  %699 = load <2 x float>, ptr %693, align 4
  %700 = load <2 x float>, ptr %83, align 4
  %701 = call <2 x float> @b2RotateVector(<2 x float> %699, <2 x float> %700)
  store <2 x float> %701, ptr %82, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %692, ptr align 4 %82, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %82) #10
  %702 = load ptr, ptr %81, align 8, !tbaa !5
  %703 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %702, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %84) #10
  %704 = load ptr, ptr %81, align 8, !tbaa !5
  %705 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %704, i32 0, i32 1
  %706 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 0
  %707 = getelementptr inbounds %struct.b2Transform, ptr %9, i32 0, i32 0
  %708 = load <2 x float>, ptr %706, align 4
  %709 = load <2 x float>, ptr %707, align 4
  %710 = call <2 x float> @b2Sub(<2 x float> %708, <2 x float> %709)
  store <2 x float> %710, ptr %85, align 4
  %711 = load <2 x float>, ptr %705, align 4
  %712 = load <2 x float>, ptr %85, align 4
  %713 = call <2 x float> @b2Add(<2 x float> %711, <2 x float> %712)
  store <2 x float> %713, ptr %84, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %703, ptr align 4 %84, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %84) #10
  %714 = load ptr, ptr %81, align 8, !tbaa !5
  %715 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %714, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %86) #10
  %716 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 0
  %717 = load ptr, ptr %81, align 8, !tbaa !5
  %718 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %717, i32 0, i32 1
  %719 = load <2 x float>, ptr %716, align 4
  %720 = load <2 x float>, ptr %718, align 4
  %721 = call <2 x float> @b2Add(<2 x float> %719, <2 x float> %720)
  store <2 x float> %721, ptr %86, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %715, ptr align 4 %86, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %86) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %81) #10
  br label %722

722:                                              ; preds = %685
  %723 = load i32, ptr %80, align 4, !tbaa !17
  %724 = add nsw i32 %723, 1
  store i32 %724, ptr %80, align 4, !tbaa !17
  br label %679, !llvm.loop !42

725:                                              ; preds = %684
  br label %726

726:                                              ; preds = %725, %668
  store i32 1, ptr %30, align 4
  br label %727

727:                                              ; preds = %726, %660
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #10
  br label %728

728:                                              ; preds = %727, %235
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 144, ptr %21) #10
  call void @llvm.lifetime.end.p0(i64 144, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden float @b2FindMaxSeparation(ptr noundef, ptr noundef, ptr noundef) #8

declare void @b2SegmentDistance(ptr dead_on_unwind writable sret(%struct.b2SegmentDistanceResult) align 4, <2 x float>, <2 x float>, <2 x float>, <2 x float>) #4

; Function Attrs: nounwind uwtable
declare hidden void @b2ClipPolygons(ptr dead_on_unwind noalias writable sret(%struct.b2Manifold) align 4, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i1 noundef zeroext) #8

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2MinFloat(float noundef, float noundef) #9

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 = { "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 = { cold noreturn nounwind memory(inaccessiblemem: write) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #8 = { 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 #9 = { inlinehint 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 #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/C++ TBAA"}
!9 = !{i64 0, i64 4, !10, i64 4, i64 4, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"float", !7, i64 0}
!12 = !{!13, !15, i64 140}
!13 = !{!"b2Polygon", !7, i64 0, !7, i64 64, !14, i64 128, !11, i64 136, !15, i64 140}
!14 = !{!"b2Vec2", !11, i64 0, !11, i64 4}
!15 = !{!"int", !7, i64 0}
!16 = !{!13, !11, i64 136}
!17 = !{!15, !15, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!22, !22, i64 0}
!22 = !{!"_Bool", !7, i64 0}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !19}
!25 = !{!26, !11, i64 24}
!26 = !{!"b2SegmentDistanceResult", !14, i64 0, !14, i64 8, !11, i64 16, !11, i64 20, !11, i64 24}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{i64 0, i64 4, !10, i64 4, i64 4, !10, i64 8, i64 4, !10, i64 12, i64 96, !30, i64 108, i64 4, !17}
!30 = !{!7, !7, i64 0}
!31 = !{!32, !15, i64 108}
!32 = !{!"b2Manifold", !14, i64 0, !11, i64 8, !7, i64 12, !15, i64 108}
!33 = !{!34, !11, i64 24}
!34 = !{!"b2ManifoldPoint", !14, i64 0, !14, i64 8, !14, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !35, i64 44, !22, i64 46}
!35 = !{!"short", !7, i64 0}
!36 = distinct !{!36, !19}
!37 = !{!26, !11, i64 16}
!38 = !{!26, !11, i64 20}
!39 = !{!14, !11, i64 0}
!40 = !{!14, !11, i64 4}
!41 = !{!34, !35, i64 44}
!42 = distinct !{!42, !19}


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

@b2_lengthUnitsPerMeter = external local_unnamed_addr global float, align 4
@.str.1 = external hidden unnamed_addr constant [64 x i8], align 1
@b2Vec2_zero = external hidden local_unnamed_addr constant %struct.b2Vec2, align 4
@.str.2 = external hidden unnamed_addr constant [30 x i8], align 1

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

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

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

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

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

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

; 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 nounwind uwtable
declare hidden <2 x float> @b2Add(<2 x float>, <2 x float>) local_unnamed_addr #2

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

declare i32 @b2InternalAssertFcn(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: cold noreturn nounwind memory(inaccessiblemem: write)
declare void @llvm.trap() #4

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

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

; Function Attrs: nounwind uwtable
define dso_local void @b2CollidePolygons(ptr dead_on_unwind noalias nocapture writable 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 #7 {
  %8 = alloca %struct.b2Polygon, align 8
  %9 = alloca %struct.b2Polygon, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.b2SegmentDistanceResult, align 4
  %.sroa.0175.0.copyload = load <2 x float>, ptr %1, align 4
  %13 = load float, ptr @b2_lengthUnitsPerMeter, align 4, !tbaa !5
  %14 = fmul float %13, 0x3F747AE140000000
  %15 = fmul float %14, 4.000000e+00
  %16 = tail call <2 x float> @b2RotateVector(<2 x float> %3, <2 x float> %.sroa.0175.0.copyload)
  %17 = tail call <2 x float> @b2Add(<2 x float> %2, <2 x float> %16)
  %18 = tail call { <2 x float>, <2 x float> } @b2InvMulTransforms(<2 x float> %17, <2 x float> %3, <2 x float> %5, <2 x float> %6)
  %19 = extractvalue { <2 x float>, <2 x float> } %18, 0
  %20 = extractvalue { <2 x float>, <2 x float> } %18, 1
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %8) #9
  %21 = getelementptr inbounds i8, ptr %1, i64 140
  %22 = load i32, ptr %21, align 4, !tbaa !9
  %23 = getelementptr inbounds i8, ptr %8, i64 140
  store i32 %22, ptr %23, align 4, !tbaa !9
  %24 = getelementptr inbounds i8, ptr %1, i64 136
  %25 = load float, ptr %24, align 4, !tbaa !13
  %26 = getelementptr inbounds i8, ptr %8, i64 136
  store float %25, ptr %26, align 8, !tbaa !13
  %27 = load i64, ptr @b2Vec2_zero, align 4
  store i64 %27, ptr %8, align 8
  %28 = getelementptr inbounds i8, ptr %8, i64 64
  %29 = getelementptr inbounds i8, ptr %1, i64 64
  %30 = load i64, ptr %29, align 4
  store i64 %30, ptr %28, align 8
  %31 = icmp sgt i32 %22, 1
  br i1 %31, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %7
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %9) #9
  %32 = getelementptr inbounds i8, ptr %4, i64 140
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = getelementptr inbounds i8, ptr %9, i64 140
  store i32 %33, ptr %34, align 4, !tbaa !9
  %35 = getelementptr inbounds i8, ptr %4, i64 136
  %36 = load float, ptr %35, align 4, !tbaa !13
  %37 = getelementptr inbounds i8, ptr %9, i64 136
  store float %36, ptr %37, align 4, !tbaa !13
  %38 = icmp sgt i32 %33, 0
  br i1 %38, label %.lr.ph222, label %._crit_edge223

.lr.ph222:                                        ; preds = %._crit_edge
  %39 = getelementptr inbounds i8, ptr %9, i64 64
  %40 = getelementptr inbounds i8, ptr %4, i64 64
  br label %59

.lr.ph:                                           ; preds = %7, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %7 ]
  %41 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %8, i64 0, i64 %indvars.iv
  %42 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %1, i64 0, i64 %indvars.iv
  %43 = load <2 x float>, ptr %42, align 4
  %44 = tail call <2 x float> @b2Sub(<2 x float> %43, <2 x float> %.sroa.0175.0.copyload)
  store <2 x float> %44, ptr %41, align 8
  %45 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %28, i64 0, i64 %indvars.iv
  %46 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %29, i64 0, i64 %indvars.iv
  %47 = load i64, ptr %46, align 4
  store i64 %47, ptr %45, align 8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %48 = load i32, ptr %23, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = icmp slt i64 %indvars.iv.next, %49
  br i1 %50, label %.lr.ph, label %._crit_edge, !llvm.loop !14

._crit_edge223:                                   ; preds = %59, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #9
  store i32 0, ptr %10, align 4, !tbaa !16
  %51 = call float @b2FindMaxSeparation(ptr noundef nonnull %10, ptr noundef nonnull %8, ptr noundef nonnull %9)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #9
  store i32 0, ptr %11, align 4, !tbaa !16
  %52 = call float @b2FindMaxSeparation(ptr noundef nonnull %11, ptr noundef nonnull %9, ptr noundef nonnull %8)
  %53 = load float, ptr %26, align 8, !tbaa !13
  %54 = load float, ptr %37, align 4, !tbaa !13
  %55 = fadd float %53, %54
  %56 = fadd float %15, %55
  %57 = fcmp ogt float %51, %56
  %58 = fcmp ogt float %52, %56
  %or.cond215 = select i1 %57, i1 true, i1 %58
  br i1 %or.cond215, label %71, label %72

59:                                               ; preds = %.lr.ph222, %59
  %indvars.iv242 = phi i64 [ 0, %.lr.ph222 ], [ %indvars.iv.next243, %59 ]
  %60 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %9, i64 0, i64 %indvars.iv242
  %61 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %4, i64 0, i64 %indvars.iv242
  %62 = load <2 x float>, ptr %61, align 4
  %63 = tail call <2 x float> @b2TransformPoint(<2 x float> %19, <2 x float> %20, <2 x float> %62)
  store <2 x float> %63, ptr %60, align 4
  %64 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %39, i64 0, i64 %indvars.iv242
  %65 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %40, i64 0, i64 %indvars.iv242
  %66 = load <2 x float>, ptr %65, align 4
  %67 = tail call <2 x float> @b2RotateVector(<2 x float> %20, <2 x float> %66)
  store <2 x float> %67, ptr %64, align 4
  %indvars.iv.next243 = add nuw nsw i64 %indvars.iv242, 1
  %68 = load i32, ptr %34, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = icmp slt i64 %indvars.iv.next243, %69
  br i1 %70, label %59, label %._crit_edge223, !llvm.loop !17

71:                                               ; preds = %._crit_edge223
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(112) %0, i8 0, i64 112, i1 false)
  br label %.loopexit

72:                                               ; preds = %._crit_edge223
  %73 = fcmp ult float %51, %52
  br i1 %73, label %88, label %74

74:                                               ; preds = %72
  %75 = load i32, ptr %10, align 4, !tbaa !16
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %28, i64 0, i64 %76
  %.sroa.0131.0.copyload = load <2 x float>, ptr %77, align 8
  %78 = load i32, ptr %34, align 4, !tbaa !9
  %79 = getelementptr inbounds i8, ptr %9, i64 64
  store i32 0, ptr %11, align 4, !tbaa !16
  %80 = icmp sgt i32 %78, 0
  br i1 %80, label %.lr.ph227.preheader, label %.loopexit217

.lr.ph227.preheader:                              ; preds = %74
  %wide.trip.count = zext nneg i32 %78 to i64
  br label %.lr.ph227

.lr.ph227:                                        ; preds = %.lr.ph227.preheader, %87
  %indvars.iv245 = phi i64 [ 0, %.lr.ph227.preheader ], [ %indvars.iv.next246, %87 ]
  %.0200225 = phi float [ 0x47EFFFFFE0000000, %.lr.ph227.preheader ], [ %.1, %87 ]
  %81 = getelementptr inbounds %struct.b2Vec2, ptr %79, i64 %indvars.iv245
  %82 = load <2 x float>, ptr %81, align 4
  %83 = call float @b2Dot(<2 x float> %.sroa.0131.0.copyload, <2 x float> %82)
  %84 = fcmp olt float %83, %.0200225
  br i1 %84, label %85, label %87

85:                                               ; preds = %.lr.ph227
  %86 = trunc nuw nsw i64 %indvars.iv245 to i32
  store i32 %86, ptr %11, align 4, !tbaa !16
  br label %87

87:                                               ; preds = %85, %.lr.ph227
  %.1 = phi float [ %83, %85 ], [ %.0200225, %.lr.ph227 ]
  %indvars.iv.next246 = add nuw nsw i64 %indvars.iv245, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next246, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit217, label %.lr.ph227, !llvm.loop !18

88:                                               ; preds = %72
  %89 = getelementptr inbounds i8, ptr %9, i64 64
  %90 = load i32, ptr %11, align 4, !tbaa !16
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %89, i64 0, i64 %91
  %.sroa.0121.0.copyload = load <2 x float>, ptr %92, align 4
  %93 = load i32, ptr %23, align 4, !tbaa !9
  store i32 0, ptr %10, align 4, !tbaa !16
  %94 = icmp sgt i32 %93, 0
  br i1 %94, label %.lr.ph231.preheader, label %.loopexit217

.lr.ph231.preheader:                              ; preds = %88
  %wide.trip.count251 = zext nneg i32 %93 to i64
  br label %.lr.ph231

.lr.ph231:                                        ; preds = %.lr.ph231.preheader, %101
  %indvars.iv248 = phi i64 [ 0, %.lr.ph231.preheader ], [ %indvars.iv.next249, %101 ]
  %.0203229 = phi float [ 0x47EFFFFFE0000000, %.lr.ph231.preheader ], [ %.1204, %101 ]
  %95 = getelementptr inbounds %struct.b2Vec2, ptr %28, i64 %indvars.iv248
  %96 = load <2 x float>, ptr %95, align 8
  %97 = call float @b2Dot(<2 x float> %.sroa.0121.0.copyload, <2 x float> %96)
  %98 = fcmp olt float %97, %.0203229
  br i1 %98, label %99, label %101

99:                                               ; preds = %.lr.ph231
  %100 = trunc nuw nsw i64 %indvars.iv248 to i32
  store i32 %100, ptr %10, align 4, !tbaa !16
  br label %101

101:                                              ; preds = %99, %.lr.ph231
  %.1204 = phi float [ %97, %99 ], [ %.0203229, %.lr.ph231 ]
  %indvars.iv.next249 = add nuw nsw i64 %indvars.iv248, 1
  %exitcond252.not = icmp eq i64 %indvars.iv.next249, %wide.trip.count251
  br i1 %exitcond252.not, label %.loopexit217, label %.lr.ph231, !llvm.loop !19

.loopexit217:                                     ; preds = %87, %101, %74, %88
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(112) %0, i8 0, i64 112, i1 false)
  %102 = fmul float %14, 0x3FB99999A0000000
  %103 = fcmp ogt float %51, %102
  %104 = fcmp ogt float %52, %102
  %or.cond216 = select i1 %103, i1 true, i1 %104
  %105 = load i32, ptr %10, align 4
  br i1 %or.cond216, label %106, label %232

106:                                              ; preds = %.loopexit217
  %107 = add nsw i32 %105, 1
  %108 = load i32, ptr %23, align 4, !tbaa !9
  %109 = icmp slt i32 %107, %108
  %110 = select i1 %109, i32 %107, i32 0
  %111 = load i32, ptr %11, align 4
  %112 = add nsw i32 %111, 1
  %113 = load i32, ptr %34, align 4, !tbaa !9
  %114 = icmp slt i32 %112, %113
  %115 = select i1 %114, i32 %112, i32 0
  %116 = sext i32 %105 to i64
  %117 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %8, i64 0, i64 %116
  %.sroa.095.0.copyload = load <2 x float>, ptr %117, align 8
  %118 = sext i32 %110 to i64
  %119 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %8, i64 0, i64 %118
  %.sroa.090.0.copyload = load <2 x float>, ptr %119, align 8
  %120 = sext i32 %111 to i64
  %121 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %9, i64 0, i64 %120
  %.sroa.085.0.copyload = load <2 x float>, ptr %121, align 4
  %122 = sext i32 %115 to i64
  %123 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %9, i64 0, i64 %122
  %.sroa.080.0.copyload = load <2 x float>, ptr %123, align 4
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %12) #9
  call void @b2SegmentDistance(ptr dead_on_unwind nonnull writable sret(%struct.b2SegmentDistanceResult) align 4 %12, <2 x float> %.sroa.095.0.copyload, <2 x float> %.sroa.090.0.copyload, <2 x float> %.sroa.085.0.copyload, <2 x float> %.sroa.080.0.copyload) #9
  %124 = getelementptr inbounds i8, ptr %12, i64 24
  %125 = load float, ptr %124, align 4, !tbaa !20
  %126 = fcmp ogt float %125, 0.000000e+00
  br i1 %126, label %130, label %127

127:                                              ; preds = %106
  %128 = call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 848) #9
  %.not = icmp eq i32 %128, 0
  br i1 %.not, label %._crit_edge261, label %129

._crit_edge261:                                   ; preds = %127
  %.pre = load float, ptr %124, align 4, !tbaa !20
  br label %130

129:                                              ; preds = %127
  call void @llvm.trap()
  unreachable

130:                                              ; preds = %._crit_edge261, %106
  %131 = phi float [ %.pre, %._crit_edge261 ], [ %125, %106 ]
  %132 = call float @sqrtf(float noundef %131) #9
  %133 = fsub float %132, %55
  %134 = fcmp ule float %133, %15
  br i1 %134, label %135, label %.critedge

135:                                              ; preds = %130
  %136 = load i32, ptr %10, align 4, !tbaa !16
  %137 = load i32, ptr %11, align 4, !tbaa !16
  call void @b2ClipPolygons(ptr dead_on_unwind nonnull writable sret(%struct.b2Manifold) align 4 %0, ptr noundef nonnull %8, ptr noundef nonnull %9, i32 noundef %136, i32 noundef %137, i1 noundef zeroext %73)
  %138 = getelementptr inbounds i8, ptr %0, i64 108
  %139 = load i32, ptr %138, align 4, !tbaa !22
  %140 = icmp sgt i32 %139, 0
  br i1 %140, label %.lr.ph235, label %._crit_edge236

.lr.ph235:                                        ; preds = %135
  %141 = getelementptr inbounds i8, ptr %0, i64 12
  %wide.trip.count256 = zext nneg i32 %139 to i64
  br label %144

._crit_edge236:                                   ; preds = %144, %135
  %.0206.lcssa = phi float [ 0x47EFFFFFE0000000, %135 ], [ %147, %144 ]
  %142 = call float @llvm.fmuladd.f32(float %14, float 0x3FB99999A0000000, float %133)
  %143 = fcmp olt float %142, %.0206.lcssa
  br i1 %143, label %148, label %230

144:                                              ; preds = %.lr.ph235, %144
  %indvars.iv253 = phi i64 [ 0, %.lr.ph235 ], [ %indvars.iv.next254, %144 ]
  %.0206233 = phi float [ 0x47EFFFFFE0000000, %.lr.ph235 ], [ %147, %144 ]
  %145 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %141, i64 0, i64 %indvars.iv253, i32 3
  %146 = load float, ptr %145, align 4, !tbaa !24
  %147 = call float @b2MinFloat(float noundef %.0206233, float noundef %146)
  %indvars.iv.next254 = add nuw nsw i64 %indvars.iv253, 1
  %exitcond257.not = icmp eq i64 %indvars.iv.next254, %wide.trip.count256
  br i1 %exitcond257.not, label %._crit_edge236, label %144, !llvm.loop !28

148:                                              ; preds = %._crit_edge236
  %149 = getelementptr inbounds i8, ptr %12, i64 16
  %150 = load float, ptr %149, align 4, !tbaa !29
  %151 = fcmp oeq float %150, 0.000000e+00
  %152 = getelementptr inbounds i8, ptr %12, i64 20
  %153 = load float, ptr %152, align 4
  %154 = fcmp oeq float %153, 0.000000e+00
  %or.cond = select i1 %151, i1 %154, i1 false
  br i1 %or.cond, label %155, label %172

155:                                              ; preds = %148
  %156 = call <2 x float> @b2Sub(<2 x float> %.sroa.085.0.copyload, <2 x float> %.sroa.095.0.copyload)
  %157 = fdiv float 1.000000e+00, %132
  %158 = insertelement <2 x float> poison, float %157, i64 0
  %159 = shufflevector <2 x float> %158, <2 x float> poison, <2 x i32> zeroinitializer
  %160 = fmul <2 x float> %159, %156
  %161 = load float, ptr %26, align 8, !tbaa !13
  %162 = call <2 x float> @b2MulAdd(<2 x float> %.sroa.095.0.copyload, float noundef %161, <2 x float> %160)
  %163 = load float, ptr %37, align 4, !tbaa !13
  %164 = fneg float %163
  %165 = call <2 x float> @b2MulAdd(<2 x float> %.sroa.085.0.copyload, float noundef %164, <2 x float> %160)
  store <2 x float> %160, ptr %0, align 4
  %166 = getelementptr inbounds i8, ptr %0, i64 20
  %167 = call <2 x float> @b2Lerp(<2 x float> %162, <2 x float> %165, float noundef 5.000000e-01)
  store <2 x float> %167, ptr %166, align 4
  %168 = getelementptr inbounds i8, ptr %0, i64 36
  store float %133, ptr %168, align 4, !tbaa !24
  %169 = shl i32 %105, 8
  %170 = and i32 %111, 255
  %171 = or disjoint i32 %170, %169
  br label %.sink.split

172:                                              ; preds = %148
  %173 = fcmp oeq float %153, 1.000000e+00
  %or.cond5 = select i1 %151, i1 %173, i1 false
  br i1 %or.cond5, label %174, label %191

174:                                              ; preds = %172
  %175 = call <2 x float> @b2Sub(<2 x float> %.sroa.080.0.copyload, <2 x float> %.sroa.095.0.copyload)
  %176 = fdiv float 1.000000e+00, %132
  %177 = insertelement <2 x float> poison, float %176, i64 0
  %178 = shufflevector <2 x float> %177, <2 x float> poison, <2 x i32> zeroinitializer
  %179 = fmul <2 x float> %178, %175
  %180 = load float, ptr %26, align 8, !tbaa !13
  %181 = call <2 x float> @b2MulAdd(<2 x float> %.sroa.095.0.copyload, float noundef %180, <2 x float> %179)
  %182 = load float, ptr %37, align 4, !tbaa !13
  %183 = fneg float %182
  %184 = call <2 x float> @b2MulAdd(<2 x float> %.sroa.080.0.copyload, float noundef %183, <2 x float> %179)
  store <2 x float> %179, ptr %0, align 4
  %185 = getelementptr inbounds i8, ptr %0, i64 20
  %186 = call <2 x float> @b2Lerp(<2 x float> %181, <2 x float> %184, float noundef 5.000000e-01)
  store <2 x float> %186, ptr %185, align 4
  %187 = getelementptr inbounds i8, ptr %0, i64 36
  store float %133, ptr %187, align 4, !tbaa !24
  %188 = shl i32 %105, 8
  %189 = and i32 %115, 255
  %190 = or disjoint i32 %189, %188
  br label %.sink.split

191:                                              ; preds = %172
  %192 = fcmp oeq float %150, 1.000000e+00
  %or.cond8 = select i1 %192, i1 %154, i1 false
  br i1 %or.cond8, label %193, label %210

193:                                              ; preds = %191
  %194 = call <2 x float> @b2Sub(<2 x float> %.sroa.085.0.copyload, <2 x float> %.sroa.090.0.copyload)
  %195 = fdiv float 1.000000e+00, %132
  %196 = insertelement <2 x float> poison, float %195, i64 0
  %197 = shufflevector <2 x float> %196, <2 x float> poison, <2 x i32> zeroinitializer
  %198 = fmul <2 x float> %197, %194
  %199 = load float, ptr %26, align 8, !tbaa !13
  %200 = call <2 x float> @b2MulAdd(<2 x float> %.sroa.090.0.copyload, float noundef %199, <2 x float> %198)
  %201 = load float, ptr %37, align 4, !tbaa !13
  %202 = fneg float %201
  %203 = call <2 x float> @b2MulAdd(<2 x float> %.sroa.085.0.copyload, float noundef %202, <2 x float> %198)
  store <2 x float> %198, ptr %0, align 4
  %204 = getelementptr inbounds i8, ptr %0, i64 20
  %205 = call <2 x float> @b2Lerp(<2 x float> %200, <2 x float> %203, float noundef 5.000000e-01)
  store <2 x float> %205, ptr %204, align 4
  %206 = getelementptr inbounds i8, ptr %0, i64 36
  store float %133, ptr %206, align 4, !tbaa !24
  %207 = shl i32 %110, 8
  %208 = and i32 %111, 255
  %209 = or disjoint i32 %207, %208
  br label %.sink.split

210:                                              ; preds = %191
  %or.cond11 = select i1 %192, i1 %173, i1 false
  br i1 %or.cond11, label %211, label %230

211:                                              ; preds = %210
  %212 = call <2 x float> @b2Sub(<2 x float> %.sroa.080.0.copyload, <2 x float> %.sroa.090.0.copyload)
  %213 = fdiv float 1.000000e+00, %132
  %214 = insertelement <2 x float> poison, float %213, i64 0
  %215 = shufflevector <2 x float> %214, <2 x float> poison, <2 x i32> zeroinitializer
  %216 = fmul <2 x float> %215, %212
  %217 = load float, ptr %26, align 8, !tbaa !13
  %218 = call <2 x float> @b2MulAdd(<2 x float> %.sroa.090.0.copyload, float noundef %217, <2 x float> %216)
  %219 = load float, ptr %37, align 4, !tbaa !13
  %220 = fneg float %219
  %221 = call <2 x float> @b2MulAdd(<2 x float> %.sroa.080.0.copyload, float noundef %220, <2 x float> %216)
  store <2 x float> %216, ptr %0, align 4
  %222 = getelementptr inbounds i8, ptr %0, i64 20
  %223 = call <2 x float> @b2Lerp(<2 x float> %218, <2 x float> %221, float noundef 5.000000e-01)
  store <2 x float> %223, ptr %222, align 4
  %224 = getelementptr inbounds i8, ptr %0, i64 36
  store float %133, ptr %224, align 4, !tbaa !24
  %225 = shl i32 %110, 8
  %226 = and i32 %115, 255
  %227 = or disjoint i32 %226, %225
  br label %.sink.split

.sink.split:                                      ; preds = %155, %193, %211, %174
  %.sink265 = phi i32 [ %190, %174 ], [ %227, %211 ], [ %209, %193 ], [ %171, %155 ]
  %228 = trunc i32 %.sink265 to i16
  %229 = getelementptr inbounds i8, ptr %0, i64 56
  store i16 %228, ptr %229, align 4, !tbaa !30
  store i32 1, ptr %138, align 4, !tbaa !22
  br label %230

230:                                              ; preds = %.sink.split, %._crit_edge236, %210
  %231 = phi i32 [ %139, %._crit_edge236 ], [ %139, %210 ], [ 1, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %12) #9
  br label %234

232:                                              ; preds = %.loopexit217
  %233 = load i32, ptr %11, align 4, !tbaa !16
  call void @b2ClipPolygons(ptr dead_on_unwind nonnull writable sret(%struct.b2Manifold) align 4 %0, ptr noundef nonnull %8, ptr noundef nonnull %9, i32 noundef %105, i32 noundef %233, i1 noundef zeroext %73)
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 108
  %.pre262 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !22
  br label %234

234:                                              ; preds = %230, %232
  %235 = phi i32 [ %231, %230 ], [ %.pre262, %232 ]
  %236 = getelementptr inbounds i8, ptr %0, i64 108
  %237 = icmp sgt i32 %235, 0
  br i1 %237, label %238, label %.loopexit

238:                                              ; preds = %234
  %239 = load <2 x float>, ptr %0, align 4
  %240 = call <2 x float> @b2RotateVector(<2 x float> %3, <2 x float> %239)
  store <2 x float> %240, ptr %0, align 4
  %241 = load i32, ptr %236, align 4, !tbaa !22
  %242 = icmp sgt i32 %241, 0
  br i1 %242, label %.lr.ph239, label %.loopexit

.lr.ph239:                                        ; preds = %238
  %243 = getelementptr inbounds i8, ptr %0, i64 12
  br label %244

244:                                              ; preds = %.lr.ph239, %244
  %indvars.iv258 = phi i64 [ 0, %.lr.ph239 ], [ %indvars.iv.next259, %244 ]
  %245 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %243, i64 %indvars.iv258
  %246 = getelementptr inbounds i8, ptr %245, i64 8
  %247 = load <2 x float>, ptr %246, align 4
  %248 = call <2 x float> @b2Add(<2 x float> %247, <2 x float> %.sroa.0175.0.copyload)
  %249 = call <2 x float> @b2RotateVector(<2 x float> %3, <2 x float> %248)
  store <2 x float> %249, ptr %246, align 4
  %250 = getelementptr inbounds i8, ptr %245, i64 16
  %251 = call <2 x float> @b2Sub(<2 x float> %2, <2 x float> %5)
  %252 = call <2 x float> @b2Add(<2 x float> %249, <2 x float> %251)
  store <2 x float> %252, ptr %250, align 4
  %253 = call <2 x float> @b2Add(<2 x float> %2, <2 x float> %249)
  store <2 x float> %253, ptr %245, align 4
  %indvars.iv.next259 = add nuw nsw i64 %indvars.iv258, 1
  %254 = load i32, ptr %236, align 4, !tbaa !22
  %255 = sext i32 %254 to i64
  %256 = icmp slt i64 %indvars.iv.next259, %255
  br i1 %256, label %244, label %.loopexit, !llvm.loop !31

.critedge:                                        ; preds = %130
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %12) #9
  br label %.loopexit

.loopexit:                                        ; preds = %244, %238, %.critedge, %234, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %8) #9
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden float @b2FindMaxSeparation(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #7

declare void @b2SegmentDistance(ptr dead_on_unwind writable sret(%struct.b2SegmentDistanceResult) align 4, <2 x float>, <2 x float>, <2 x float>, <2 x float>) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @b2ClipPolygons(ptr dead_on_unwind noalias writable sret(%struct.b2Manifold) align 4, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #7

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2MinFloat(float noundef, float noundef) local_unnamed_addr #8

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { mustprogress 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 = { "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 = { cold noreturn nounwind memory(inaccessiblemem: write) }
attributes #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #7 = { 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 #8 = { inlinehint 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 #9 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !12, i64 140}
!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 = !{!10, !6, i64 136}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!12, !12, i64 0}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = !{!21, !6, i64 24}
!21 = !{!"b2SegmentDistanceResult", !11, i64 0, !11, i64 8, !6, i64 16, !6, i64 20, !6, i64 24}
!22 = !{!23, !12, i64 108}
!23 = !{!"b2Manifold", !11, i64 0, !6, i64 8, !7, i64 12, !12, i64 108}
!24 = !{!25, !6, i64 24}
!25 = !{!"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, !26, i64 44, !27, i64 46}
!26 = !{!"short", !7, i64 0}
!27 = !{!"_Bool", !7, i64 0}
!28 = distinct !{!28, !15}
!29 = !{!21, !6, i64 16}
!30 = !{!25, !26, i64 44}
!31 = distinct !{!31, !15}


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