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

; 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.b2DistanceOutput = type { %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, i32, i32 }
%struct.b2Vec2 = type { float, float }
%struct.b2TOIOutput = type { i32, float }
%struct.b2Sweep = type { %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Rot, %struct.b2Rot }
%struct.b2Rot = type { float, float }
%struct.b2SimplexCache = type { i16, [3 x i8], [3 x i8] }
%struct.b2DistanceInput = type { %struct.b2ShapeProxy, %struct.b2ShapeProxy, %struct.b2Transform, %struct.b2Transform, i8 }
%struct.b2ShapeProxy = type { [8 x %struct.b2Vec2], i32, float }
%struct.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2SeparationFunction = type { ptr, ptr, %struct.b2Sweep, %struct.b2Sweep, %struct.b2Vec2, %struct.b2Vec2, i32 }
%struct.b2TOIInput = type { %struct.b2ShapeProxy, %struct.b2ShapeProxy, %struct.b2Sweep, %struct.b2Sweep, float }

@.str.1 = external hidden unnamed_addr constant [64 x i8], align 1
@b2_lengthUnitsPerMeter = external global float, align 4
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [65 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, <2 x float> } @b2GetSweepTransform(ptr noundef, float noundef) #0

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @b2ShapeDistance(ptr dead_on_unwind noalias writable sret(%struct.b2DistanceOutput) align 4, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @b2TimeOfImpact(ptr noundef %0) #0 {
  %2 = alloca %struct.b2TOIOutput, align 4
  %3 = alloca ptr, align 8
  %4 = alloca %struct.b2Sweep, align 4
  %5 = alloca %struct.b2Sweep, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %struct.b2SimplexCache, align 2
  %16 = alloca %struct.b2DistanceInput, align 4
  %17 = alloca %struct.b2Transform, align 4
  %18 = alloca %struct.b2Transform, align 4
  %19 = alloca %struct.b2DistanceOutput, align 4
  %20 = alloca i32, align 4
  %21 = alloca %struct.b2SeparationFunction, align 8
  %22 = alloca i8, align 1
  %23 = alloca float, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca float, align 4
  %28 = alloca float, align 4
  %29 = alloca i32, align 4
  %30 = alloca float, align 4
  %31 = alloca float, align 4
  %32 = alloca float, align 4
  %33 = alloca float, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.b2TOIOutput, ptr %2, i32 0, i32 0
  store i32 0, ptr %34, align 4, !tbaa !9
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.b2TOIInput, ptr %35, i32 0, i32 4
  %37 = load float, ptr %36, align 4, !tbaa !13
  %38 = getelementptr inbounds %struct.b2TOIOutput, ptr %2, i32 0, i32 1
  store float %37, ptr %38, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 40, ptr %4) #9
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.b2TOIInput, ptr %39, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %4, ptr align 4 %40, i64 40, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.start.p0(i64 40, ptr %5) #9
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.b2TOIInput, ptr %41, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %42, i64 40, i1 false), !tbaa.struct !20
  br label %43

43:                                               ; preds = %1
  %44 = getelementptr inbounds %struct.b2Sweep, ptr %4, i32 0, i32 3
  %45 = load <2 x float>, ptr %44, align 4
  %46 = call zeroext i1 @b2IsNormalizedRot(<2 x float> %45)
  br i1 %46, label %47, label %51

47:                                               ; preds = %43
  %48 = getelementptr inbounds %struct.b2Sweep, ptr %4, i32 0, i32 4
  %49 = load <2 x float>, ptr %48, align 4
  %50 = call zeroext i1 @b2IsNormalizedRot(<2 x float> %49)
  br i1 %50, label %55, label %51

51:                                               ; preds = %47, %43
  %52 = call i32 @b2InternalAssertFcn(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 1149)
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %51
  call void @llvm.trap()
  br label %55

55:                                               ; preds = %54, %51, %47
  br label %56

56:                                               ; preds = %55
  br label %57

57:                                               ; preds = %56
  br label %58

58:                                               ; preds = %57
  %59 = getelementptr inbounds %struct.b2Sweep, ptr %5, i32 0, i32 3
  %60 = load <2 x float>, ptr %59, align 4
  %61 = call zeroext i1 @b2IsNormalizedRot(<2 x float> %60)
  br i1 %61, label %62, label %66

62:                                               ; preds = %58
  %63 = getelementptr inbounds %struct.b2Sweep, ptr %5, i32 0, i32 4
  %64 = load <2 x float>, ptr %63, align 4
  %65 = call zeroext i1 @b2IsNormalizedRot(<2 x float> %64)
  br i1 %65, label %70, label %66

66:                                               ; preds = %62, %58
  %67 = call i32 @b2InternalAssertFcn(ptr noundef @.str.10, ptr noundef @.str.1, i32 noundef 1150)
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %70

69:                                               ; preds = %66
  call void @llvm.trap()
  br label %70

70:                                               ; preds = %69, %66, %62
  br label %71

71:                                               ; preds = %70
  br label %72

72:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.b2TOIInput, ptr %73, i32 0, i32 0
  store ptr %74, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.b2TOIInput, ptr %75, i32 0, i32 1
  store ptr %76, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.b2TOIInput, ptr %77, i32 0, i32 4
  %79 = load float, ptr %78, align 4, !tbaa !13
  store float %79, ptr %8, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.b2ShapeProxy, ptr %80, i32 0, i32 2
  %82 = load float, ptr %81, align 4, !tbaa !22
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.b2ShapeProxy, ptr %83, i32 0, i32 2
  %85 = load float, ptr %84, align 4, !tbaa !22
  %86 = fadd float %82, %85
  store float %86, ptr %9, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  %87 = load float, ptr @b2_lengthUnitsPerMeter, align 4, !tbaa !21
  %88 = fmul float 0x3F747AE140000000, %87
  %89 = load float, ptr %9, align 4, !tbaa !21
  %90 = load float, ptr @b2_lengthUnitsPerMeter, align 4, !tbaa !21
  %91 = call float @llvm.fmuladd.f32(float 0xBF747AE140000000, float %90, float %89)
  %92 = call float @b2MaxFloat(float noundef %88, float noundef %91)
  store float %92, ptr %10, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  %93 = load float, ptr @b2_lengthUnitsPerMeter, align 4, !tbaa !21
  %94 = fmul float 0x3F747AE140000000, %93
  %95 = fmul float 2.500000e-01, %94
  store float %95, ptr %11, align 4, !tbaa !21
  br label %96

96:                                               ; preds = %72
  %97 = load float, ptr %10, align 4, !tbaa !21
  %98 = load float, ptr %11, align 4, !tbaa !21
  %99 = fcmp ogt float %97, %98
  br i1 %99, label %104, label %100

100:                                              ; preds = %96
  %101 = call i32 @b2InternalAssertFcn(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 1166)
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %104

103:                                              ; preds = %100
  call void @llvm.trap()
  br label %104

104:                                              ; preds = %103, %100, %96
  br label %105

105:                                              ; preds = %104
  br label %106

106:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  store float 0.000000e+00, ptr %12, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store i32 20, ptr %13, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  store i32 0, ptr %14, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  call void @llvm.memset.p0.i64(ptr align 2 %15, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 180, ptr %16) #9
  %107 = getelementptr inbounds %struct.b2DistanceInput, ptr %16, i32 0, i32 0
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.b2TOIInput, ptr %108, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %107, ptr align 4 %109, i64 72, i1 false), !tbaa.struct !24
  %110 = getelementptr inbounds %struct.b2DistanceInput, ptr %16, i32 0, i32 1
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.b2TOIInput, ptr %111, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %110, ptr align 4 %112, i64 72, i1 false), !tbaa.struct !24
  %113 = getelementptr inbounds %struct.b2DistanceInput, ptr %16, i32 0, i32 4
  store i8 0, ptr %113, align 4, !tbaa !26
  br label %114

114:                                              ; preds = %283, %106
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #9
  %115 = load float, ptr %12, align 4, !tbaa !21
  %116 = call { <2 x float>, <2 x float> } @b2GetSweepTransform(ptr noundef %4, float noundef %115)
  %117 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 0
  %118 = extractvalue { <2 x float>, <2 x float> } %116, 0
  store <2 x float> %118, ptr %117, align 4
  %119 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 1
  %120 = extractvalue { <2 x float>, <2 x float> } %116, 1
  store <2 x float> %120, ptr %119, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #9
  %121 = load float, ptr %12, align 4, !tbaa !21
  %122 = call { <2 x float>, <2 x float> } @b2GetSweepTransform(ptr noundef %5, float noundef %121)
  %123 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %18, i32 0, i32 0
  %124 = extractvalue { <2 x float>, <2 x float> } %122, 0
  store <2 x float> %124, ptr %123, align 4
  %125 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %18, i32 0, i32 1
  %126 = extractvalue { <2 x float>, <2 x float> } %122, 1
  store <2 x float> %126, ptr %125, align 4
  %127 = getelementptr inbounds %struct.b2DistanceInput, ptr %16, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %127, ptr align 4 %17, i64 16, i1 false), !tbaa.struct !30
  %128 = getelementptr inbounds %struct.b2DistanceInput, ptr %16, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %128, ptr align 4 %18, i64 16, i1 false), !tbaa.struct !30
  call void @llvm.lifetime.start.p0(i64 36, ptr %19) #9
  call void @b2ShapeDistance(ptr dead_on_unwind writable sret(%struct.b2DistanceOutput) align 4 %19, ptr noundef %16, ptr noundef %15, ptr noundef null, i32 noundef 0)
  %129 = load i32, ptr %14, align 4, !tbaa !23
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %14, align 4, !tbaa !23
  %131 = getelementptr inbounds %struct.b2DistanceOutput, ptr %19, i32 0, i32 3
  %132 = load float, ptr %131, align 4, !tbaa !31
  %133 = fcmp ole float %132, 0.000000e+00
  br i1 %133, label %134, label %137

134:                                              ; preds = %114
  %135 = getelementptr inbounds %struct.b2TOIOutput, ptr %2, i32 0, i32 0
  store i32 2, ptr %135, align 4, !tbaa !9
  %136 = getelementptr inbounds %struct.b2TOIOutput, ptr %2, i32 0, i32 1
  store float 0.000000e+00, ptr %136, align 4, !tbaa !19
  store i32 8, ptr %20, align 4
  br label %281

137:                                              ; preds = %114
  %138 = getelementptr inbounds %struct.b2DistanceOutput, ptr %19, i32 0, i32 3
  %139 = load float, ptr %138, align 4, !tbaa !31
  %140 = load float, ptr %10, align 4, !tbaa !21
  %141 = load float, ptr %11, align 4, !tbaa !21
  %142 = fadd float %140, %141
  %143 = fcmp ole float %139, %142
  br i1 %143, label %144, label %148

144:                                              ; preds = %137
  %145 = getelementptr inbounds %struct.b2TOIOutput, ptr %2, i32 0, i32 0
  store i32 3, ptr %145, align 4, !tbaa !9
  %146 = load float, ptr %12, align 4, !tbaa !21
  %147 = getelementptr inbounds %struct.b2TOIOutput, ptr %2, i32 0, i32 1
  store float %146, ptr %147, align 4, !tbaa !19
  store i32 8, ptr %20, align 4
  br label %281

148:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 120, ptr %21) #9
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = load ptr, ptr %7, align 8, !tbaa !5
  %151 = load float, ptr %12, align 4, !tbaa !21
  call void @b2MakeSeparationFunction(ptr dead_on_unwind writable sret(%struct.b2SeparationFunction) align 8 %21, ptr noundef %15, ptr noundef %149, ptr noundef %4, ptr noundef %150, ptr noundef %5, float noundef %151)
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #9
  store i8 0, ptr %22, align 1, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  %152 = load float, ptr %8, align 4, !tbaa !21
  store float %152, ptr %23, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  store i32 0, ptr %24, align 4, !tbaa !23
  br label %153

153:                                              ; preds = %267, %148
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  %154 = load float, ptr %23, align 4, !tbaa !21
  %155 = call float @b2FindMinSeparation(ptr noundef %21, ptr noundef %25, ptr noundef %26, float noundef %154)
  store float %155, ptr %27, align 4, !tbaa !21
  %156 = load float, ptr %27, align 4, !tbaa !21
  %157 = load float, ptr %10, align 4, !tbaa !21
  %158 = load float, ptr %11, align 4, !tbaa !21
  %159 = fadd float %157, %158
  %160 = fcmp ogt float %156, %159
  br i1 %160, label %161, label %165

161:                                              ; preds = %153
  %162 = getelementptr inbounds %struct.b2TOIOutput, ptr %2, i32 0, i32 0
  store i32 4, ptr %162, align 4, !tbaa !9
  %163 = load float, ptr %8, align 4, !tbaa !21
  %164 = getelementptr inbounds %struct.b2TOIOutput, ptr %2, i32 0, i32 1
  store float %163, ptr %164, align 4, !tbaa !19
  store i8 1, ptr %22, align 1, !tbaa !33
  store i32 10, ptr %20, align 4
  br label %265

165:                                              ; preds = %153
  %166 = load float, ptr %27, align 4, !tbaa !21
  %167 = load float, ptr %10, align 4, !tbaa !21
  %168 = load float, ptr %11, align 4, !tbaa !21
  %169 = fsub float %167, %168
  %170 = fcmp ogt float %166, %169
  br i1 %170, label %171, label %173

171:                                              ; preds = %165
  %172 = load float, ptr %23, align 4, !tbaa !21
  store float %172, ptr %12, align 4, !tbaa !21
  store i32 10, ptr %20, align 4
  br label %265

173:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #9
  %174 = load i32, ptr %25, align 4, !tbaa !23
  %175 = load i32, ptr %26, align 4, !tbaa !23
  %176 = load float, ptr %12, align 4, !tbaa !21
  %177 = call float @b2EvaluateSeparation(ptr noundef %21, i32 noundef %174, i32 noundef %175, float noundef %176)
  store float %177, ptr %28, align 4, !tbaa !21
  %178 = load float, ptr %28, align 4, !tbaa !21
  %179 = load float, ptr %10, align 4, !tbaa !21
  %180 = load float, ptr %11, align 4, !tbaa !21
  %181 = fsub float %179, %180
  %182 = fcmp olt float %178, %181
  br i1 %182, label %183, label %187

183:                                              ; preds = %173
  %184 = getelementptr inbounds %struct.b2TOIOutput, ptr %2, i32 0, i32 0
  store i32 1, ptr %184, align 4, !tbaa !9
  %185 = load float, ptr %12, align 4, !tbaa !21
  %186 = getelementptr inbounds %struct.b2TOIOutput, ptr %2, i32 0, i32 1
  store float %185, ptr %186, align 4, !tbaa !19
  store i8 1, ptr %22, align 1, !tbaa !33
  store i32 10, ptr %20, align 4
  br label %264

187:                                              ; preds = %173
  %188 = load float, ptr %28, align 4, !tbaa !21
  %189 = load float, ptr %10, align 4, !tbaa !21
  %190 = load float, ptr %11, align 4, !tbaa !21
  %191 = fadd float %189, %190
  %192 = fcmp ole float %188, %191
  br i1 %192, label %193, label %197

193:                                              ; preds = %187
  %194 = getelementptr inbounds %struct.b2TOIOutput, ptr %2, i32 0, i32 0
  store i32 3, ptr %194, align 4, !tbaa !9
  %195 = load float, ptr %12, align 4, !tbaa !21
  %196 = getelementptr inbounds %struct.b2TOIOutput, ptr %2, i32 0, i32 1
  store float %195, ptr %196, align 4, !tbaa !19
  store i8 1, ptr %22, align 1, !tbaa !33
  store i32 10, ptr %20, align 4
  br label %264

197:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  store i32 0, ptr %29, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  %198 = load float, ptr %12, align 4, !tbaa !21
  store float %198, ptr %30, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #9
  %199 = load float, ptr %23, align 4, !tbaa !21
  store float %199, ptr %31, align 4, !tbaa !21
  br label %200

200:                                              ; preds = %255, %197
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #9
  %201 = load i32, ptr %29, align 4, !tbaa !23
  %202 = and i32 %201, 1
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %204, label %218

204:                                              ; preds = %200
  %205 = load float, ptr %30, align 4, !tbaa !21
  %206 = load float, ptr %10, align 4, !tbaa !21
  %207 = load float, ptr %28, align 4, !tbaa !21
  %208 = fsub float %206, %207
  %209 = load float, ptr %31, align 4, !tbaa !21
  %210 = load float, ptr %30, align 4, !tbaa !21
  %211 = fsub float %209, %210
  %212 = fmul float %208, %211
  %213 = load float, ptr %27, align 4, !tbaa !21
  %214 = load float, ptr %28, align 4, !tbaa !21
  %215 = fsub float %213, %214
  %216 = fdiv float %212, %215
  %217 = fadd float %205, %216
  store float %217, ptr %32, align 4, !tbaa !21
  br label %223

218:                                              ; preds = %200
  %219 = load float, ptr %30, align 4, !tbaa !21
  %220 = load float, ptr %31, align 4, !tbaa !21
  %221 = fadd float %219, %220
  %222 = fmul float 5.000000e-01, %221
  store float %222, ptr %32, align 4, !tbaa !21
  br label %223

223:                                              ; preds = %218, %204
  %224 = load i32, ptr %29, align 4, !tbaa !23
  %225 = add nsw i32 %224, 1
  store i32 %225, ptr %29, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  %226 = load i32, ptr %25, align 4, !tbaa !23
  %227 = load i32, ptr %26, align 4, !tbaa !23
  %228 = load float, ptr %32, align 4, !tbaa !21
  %229 = call float @b2EvaluateSeparation(ptr noundef %21, i32 noundef %226, i32 noundef %227, float noundef %228)
  store float %229, ptr %33, align 4, !tbaa !21
  %230 = load float, ptr %33, align 4, !tbaa !21
  %231 = load float, ptr %10, align 4, !tbaa !21
  %232 = fsub float %230, %231
  %233 = call float @b2AbsFloat(float noundef %232)
  %234 = load float, ptr %11, align 4, !tbaa !21
  %235 = fcmp olt float %233, %234
  br i1 %235, label %236, label %238

236:                                              ; preds = %223
  %237 = load float, ptr %32, align 4, !tbaa !21
  store float %237, ptr %23, align 4, !tbaa !21
  store i32 12, ptr %20, align 4
  br label %253

238:                                              ; preds = %223
  %239 = load float, ptr %33, align 4, !tbaa !21
  %240 = load float, ptr %10, align 4, !tbaa !21
  %241 = fcmp ogt float %239, %240
  br i1 %241, label %242, label %245

242:                                              ; preds = %238
  %243 = load float, ptr %32, align 4, !tbaa !21
  store float %243, ptr %30, align 4, !tbaa !21
  %244 = load float, ptr %33, align 4, !tbaa !21
  store float %244, ptr %28, align 4, !tbaa !21
  br label %248

245:                                              ; preds = %238
  %246 = load float, ptr %32, align 4, !tbaa !21
  store float %246, ptr %31, align 4, !tbaa !21
  %247 = load float, ptr %33, align 4, !tbaa !21
  store float %247, ptr %27, align 4, !tbaa !21
  br label %248

248:                                              ; preds = %245, %242
  %249 = load i32, ptr %29, align 4, !tbaa !23
  %250 = icmp eq i32 %249, 50
  br i1 %250, label %251, label %252

251:                                              ; preds = %248
  store i32 12, ptr %20, align 4
  br label %253

252:                                              ; preds = %248
  store i32 0, ptr %20, align 4
  br label %253

253:                                              ; preds = %252, %251, %236
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  %254 = load i32, ptr %20, align 4
  switch i32 %254, label %286 [
    i32 0, label %255
    i32 12, label %256
  ]

255:                                              ; preds = %253
  br label %200

256:                                              ; preds = %253
  %257 = load i32, ptr %24, align 4, !tbaa !23
  %258 = add nsw i32 %257, 1
  store i32 %258, ptr %24, align 4, !tbaa !23
  %259 = load i32, ptr %24, align 4, !tbaa !23
  %260 = icmp eq i32 %259, 8
  br i1 %260, label %261, label %262

261:                                              ; preds = %256
  store i32 10, ptr %20, align 4
  br label %263

262:                                              ; preds = %256
  store i32 0, ptr %20, align 4
  br label %263

263:                                              ; preds = %262, %261
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  br label %264

264:                                              ; preds = %263, %193, %183
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  br label %265

265:                                              ; preds = %264, %171, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  %266 = load i32, ptr %20, align 4
  switch i32 %266, label %286 [
    i32 0, label %267
    i32 10, label %268
  ]

267:                                              ; preds = %265
  br label %153

268:                                              ; preds = %265
  %269 = load i8, ptr %22, align 1, !tbaa !33, !range !34, !noundef !35
  %270 = trunc i8 %269 to i1
  br i1 %270, label %271, label %272

271:                                              ; preds = %268
  store i32 8, ptr %20, align 4
  br label %280

272:                                              ; preds = %268
  %273 = load i32, ptr %14, align 4, !tbaa !23
  %274 = icmp eq i32 %273, 20
  br i1 %274, label %275, label %279

275:                                              ; preds = %272
  %276 = getelementptr inbounds %struct.b2TOIOutput, ptr %2, i32 0, i32 0
  store i32 1, ptr %276, align 4, !tbaa !9
  %277 = load float, ptr %12, align 4, !tbaa !21
  %278 = getelementptr inbounds %struct.b2TOIOutput, ptr %2, i32 0, i32 1
  store float %277, ptr %278, align 4, !tbaa !19
  store i32 8, ptr %20, align 4
  br label %280

279:                                              ; preds = %272
  store i32 0, ptr %20, align 4
  br label %280

280:                                              ; preds = %279, %275, %271
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 120, ptr %21) #9
  br label %281

281:                                              ; preds = %280, %144, %134
  call void @llvm.lifetime.end.p0(i64 36, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #9
  %282 = load i32, ptr %20, align 4
  switch i32 %282, label %286 [
    i32 0, label %283
    i32 8, label %284
  ]

283:                                              ; preds = %281
  br label %114

284:                                              ; preds = %281
  store i32 1, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 180, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %4) #9
  %285 = load i64, ptr %2, align 4
  ret i64 %285

286:                                              ; preds = %281, %265, %253
  unreachable
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @b2IsNormalizedRot(<2 x float>) #8

; Function Attrs: nounwind uwtable
declare hidden void @b2MakeSeparationFunction(ptr dead_on_unwind noalias writable sret(%struct.b2SeparationFunction) align 8, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, float noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden float @b2EvaluateSeparation(ptr noundef, i32 noundef, i32 noundef, float noundef) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2AbsFloat(float noundef) #7

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { cold noreturn nounwind memory(inaccessiblemem: write) }
attributes #7 = { 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 #8 = { 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 #9 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"b2TOIOutput", !11, i64 0, !12, i64 4}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !12, i64 224}
!14 = !{!"b2TOIInput", !15, i64 0, !15, i64 72, !16, i64 144, !16, i64 184, !12, i64 224}
!15 = !{!"b2ShapeProxy", !7, i64 0, !11, i64 64, !12, i64 68}
!16 = !{!"b2Sweep", !17, i64 0, !17, i64 8, !17, i64 16, !18, i64 24, !18, i64 32}
!17 = !{!"b2Vec2", !12, i64 0, !12, i64 4}
!18 = !{!"b2Rot", !12, i64 0, !12, i64 4}
!19 = !{!10, !12, i64 4}
!20 = !{i64 0, i64 4, !21, i64 4, i64 4, !21, i64 8, i64 4, !21, i64 12, i64 4, !21, i64 16, i64 4, !21, i64 20, i64 4, !21, i64 24, i64 4, !21, i64 28, i64 4, !21, i64 32, i64 4, !21, i64 36, i64 4, !21}
!21 = !{!12, !12, i64 0}
!22 = !{!15, !12, i64 68}
!23 = !{!11, !11, i64 0}
!24 = !{i64 0, i64 64, !25, i64 64, i64 4, !23, i64 68, i64 4, !21}
!25 = !{!7, !7, i64 0}
!26 = !{!27, !29, i64 176}
!27 = !{!"b2DistanceInput", !15, i64 0, !15, i64 72, !28, i64 144, !28, i64 160, !29, i64 176}
!28 = !{!"b2Transform", !17, i64 0, !18, i64 8}
!29 = !{!"_Bool", !7, i64 0}
!30 = !{i64 0, i64 4, !21, i64 4, i64 4, !21, i64 8, i64 4, !21, i64 12, i64 4, !21}
!31 = !{!32, !12, i64 24}
!32 = !{!"b2DistanceOutput", !17, i64 0, !17, i64 8, !17, i64 16, !12, i64 24, !11, i64 28, !11, i64 32}
!33 = !{!29, !29, i64 0}
!34 = !{i8 0, i8 2}
!35 = !{}


; 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.b2DistanceOutput = type { %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, i32, i32 }
%struct.b2Vec2 = type { float, float }
%struct.b2Sweep = type { %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Rot, %struct.b2Rot }
%struct.b2Rot = type { float, float }
%struct.b2SimplexCache = type { i16, [3 x i8], [3 x i8] }
%struct.b2DistanceInput = type { %struct.b2ShapeProxy, %struct.b2ShapeProxy, %struct.b2Transform, %struct.b2Transform, i8 }
%struct.b2ShapeProxy = type { [8 x %struct.b2Vec2], i32, float }
%struct.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2SeparationFunction = type { ptr, ptr, %struct.b2Sweep, %struct.b2Sweep, %struct.b2Vec2, %struct.b2Vec2, i32 }

@.str.1 = external hidden unnamed_addr constant [64 x i8], align 1
@b2_lengthUnitsPerMeter = external local_unnamed_addr global float, align 4
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [65 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, <2 x float> } @b2GetSweepTransform(ptr noundef, float noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #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: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

; Function Attrs: nounwind uwtable
declare dso_local void @b2ShapeDistance(ptr dead_on_unwind noalias writable sret(%struct.b2DistanceOutput) align 4, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @b2TimeOfImpact(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca %struct.b2Sweep, align 4
  %3 = alloca %struct.b2Sweep, align 4
  %4 = alloca %struct.b2SimplexCache, align 8
  %5 = alloca %struct.b2DistanceInput, align 4
  %6 = alloca %struct.b2DistanceOutput, align 4
  %7 = alloca %struct.b2SeparationFunction, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = getelementptr inbounds i8, ptr %0, i64 224
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #8
  %11 = getelementptr inbounds i8, ptr %0, i64 144
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(40) %2, ptr noundef nonnull align 4 dereferenceable(40) %11, i64 40, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #8
  %12 = getelementptr inbounds i8, ptr %0, i64 184
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(40) %3, ptr noundef nonnull align 4 dereferenceable(40) %12, i64 40, i1 false), !tbaa.struct !5
  %13 = getelementptr inbounds i8, ptr %2, i64 24
  %14 = load <2 x float>, ptr %13, align 4
  %15 = tail call zeroext i1 @b2IsNormalizedRot(<2 x float> %14)
  br i1 %15, label %16, label %20

16:                                               ; preds = %1
  %17 = getelementptr inbounds i8, ptr %2, i64 32
  %18 = load <2 x float>, ptr %17, align 4
  %19 = tail call zeroext i1 @b2IsNormalizedRot(<2 x float> %18)
  br i1 %19, label %23, label %20

20:                                               ; preds = %16, %1
  %21 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 1149) #8
  %.not = icmp eq i32 %21, 0
  br i1 %.not, label %23, label %22

22:                                               ; preds = %20
  tail call void @llvm.trap()
  unreachable

23:                                               ; preds = %16, %20
  %24 = getelementptr inbounds i8, ptr %3, i64 24
  %25 = load <2 x float>, ptr %24, align 4
  %26 = tail call zeroext i1 @b2IsNormalizedRot(<2 x float> %25)
  br i1 %26, label %27, label %31

27:                                               ; preds = %23
  %28 = getelementptr inbounds i8, ptr %3, i64 32
  %29 = load <2 x float>, ptr %28, align 4
  %30 = tail call zeroext i1 @b2IsNormalizedRot(<2 x float> %29)
  br i1 %30, label %34, label %31

31:                                               ; preds = %27, %23
  %32 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.1, i32 noundef 1150) #8
  %.not113 = icmp eq i32 %32, 0
  br i1 %.not113, label %34, label %33

33:                                               ; preds = %31
  tail call void @llvm.trap()
  unreachable

34:                                               ; preds = %31, %27
  %35 = getelementptr inbounds i8, ptr %0, i64 72
  %36 = load float, ptr %10, align 4, !tbaa !10
  %37 = getelementptr inbounds i8, ptr %0, i64 68
  %38 = load float, ptr %37, align 4, !tbaa !17
  %39 = getelementptr inbounds i8, ptr %0, i64 140
  %40 = load float, ptr %39, align 4, !tbaa !17
  %41 = fadd float %38, %40
  %42 = load float, ptr @b2_lengthUnitsPerMeter, align 4, !tbaa !6
  %43 = fmul float %42, 0x3F747AE140000000
  %44 = tail call float @llvm.fmuladd.f32(float %42, float 0xBF747AE140000000, float %41)
  %45 = tail call float @b2MaxFloat(float noundef %43, float noundef %44)
  %46 = load float, ptr @b2_lengthUnitsPerMeter, align 4, !tbaa !6
  %47 = fmul float %46, 0x3F747AE140000000
  %48 = fmul float %47, 2.500000e-01
  %49 = fcmp ogt float %45, %48
  br i1 %49, label %53, label %50

50:                                               ; preds = %34
  %51 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 1166) #8
  %.not114 = icmp eq i32 %51, 0
  br i1 %.not114, label %53, label %52

52:                                               ; preds = %50
  tail call void @llvm.trap()
  unreachable

53:                                               ; preds = %50, %34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  store i64 0, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 180, ptr nonnull %5) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(72) %5, ptr noundef nonnull align 4 dereferenceable(72) %0, i64 72, i1 false), !tbaa.struct !18
  %54 = getelementptr inbounds i8, ptr %5, i64 72
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(72) %54, ptr noundef nonnull align 4 dereferenceable(72) %35, i64 72, i1 false), !tbaa.struct !18
  %55 = getelementptr inbounds i8, ptr %5, i64 176
  store i8 0, ptr %55, align 4, !tbaa !21
  %56 = getelementptr inbounds i8, ptr %5, i64 144
  %.sroa.432.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 152
  %57 = getelementptr inbounds i8, ptr %5, i64 160
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 168
  %58 = getelementptr inbounds i8, ptr %6, i64 24
  %59 = fadd float %45, %48
  %60 = fsub float %45, %48
  br label %61

61:                                               ; preds = %113, %53
  %.0105 = phi i32 [ 0, %53 ], [ %68, %113 ]
  %.0101 = phi float [ 0.000000e+00, %53 ], [ %.2103.ph, %113 ]
  %62 = call { <2 x float>, <2 x float> } @b2GetSweepTransform(ptr noundef nonnull %2, float noundef %.0101)
  %63 = extractvalue { <2 x float>, <2 x float> } %62, 0
  %64 = extractvalue { <2 x float>, <2 x float> } %62, 1
  %65 = call { <2 x float>, <2 x float> } @b2GetSweepTransform(ptr noundef nonnull %3, float noundef %.0101)
  %66 = extractvalue { <2 x float>, <2 x float> } %65, 0
  %67 = extractvalue { <2 x float>, <2 x float> } %65, 1
  store <2 x float> %63, ptr %56, align 4
  store <2 x float> %64, ptr %.sroa.432.0..sroa_idx, align 4
  store <2 x float> %66, ptr %57, align 4
  store <2 x float> %67, ptr %.sroa.4.0..sroa_idx, align 4
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %6) #8
  call void @b2ShapeDistance(ptr dead_on_unwind nonnull writable sret(%struct.b2DistanceOutput) align 4 %6, ptr noundef nonnull %5, ptr noundef nonnull %4, ptr noundef null, i32 noundef 0)
  %68 = add nuw nsw i32 %.0105, 1
  %69 = load float, ptr %58, align 4, !tbaa !25
  %70 = fcmp ugt float %69, 0.000000e+00
  br i1 %70, label %71, label %.thread152

71:                                               ; preds = %61
  %72 = fcmp ugt float %69, %59
  br i1 %72, label %73, label %.thread152

73:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %7) #8
  call void @b2MakeSeparationFunction(ptr dead_on_unwind nonnull writable sret(%struct.b2SeparationFunction) align 8 %7, ptr noundef nonnull %4, ptr noundef %0, ptr noundef nonnull %2, ptr noundef nonnull %35, ptr noundef nonnull %3, float noundef %.0101)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  %74 = call float @b2FindMinSeparation(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, float noundef %36)
  %75 = fcmp ogt float %74, %59
  br i1 %75, label %.thread145, label %.lr.ph

.lr.ph:                                           ; preds = %73, %109
  %76 = phi float [ %110, %109 ], [ %74, %73 ]
  %.087169 = phi i32 [ %107, %109 ], [ 0, %73 ]
  %.090168 = phi float [ %.292.ph, %109 ], [ %36, %73 ]
  %77 = fcmp ogt float %76, %60
  br i1 %77, label %select.unfold129, label %78

78:                                               ; preds = %.lr.ph
  %79 = load i32, ptr %8, align 4, !tbaa !20
  %80 = load i32, ptr %9, align 4, !tbaa !20
  %81 = call float @b2EvaluateSeparation(ptr noundef nonnull %7, i32 noundef %79, i32 noundef %80, float noundef %.0101)
  %82 = fcmp olt float %81, %60
  br i1 %82, label %.thread145, label %83

83:                                               ; preds = %78
  %84 = fcmp ugt float %81, %59
  br i1 %84, label %.preheader, label %.thread145

.preheader:                                       ; preds = %83, %103
  %.084 = phi float [ %.084., %103 ], [ %76, %83 ]
  %.081 = phi float [ %..081, %103 ], [ %81, %83 ]
  %.080 = phi i32 [ %104, %103 ], [ 0, %83 ]
  %.077 = phi float [ %.0..077, %103 ], [ %.0101, %83 ]
  %.076 = phi float [ %.076..0, %103 ], [ %.090168, %83 ]
  %85 = and i32 %.080, 1
  %.not115 = icmp eq i32 %85, 0
  br i1 %.not115, label %93, label %86

86:                                               ; preds = %.preheader
  %87 = fsub float %45, %.081
  %88 = fsub float %.076, %.077
  %89 = fmul float %87, %88
  %90 = fsub float %.084, %.081
  %91 = fdiv float %89, %90
  %92 = fadd float %.077, %91
  br label %96

93:                                               ; preds = %.preheader
  %94 = fadd float %.077, %.076
  %95 = fmul float %94, 5.000000e-01
  br label %96

96:                                               ; preds = %93, %86
  %.0 = phi float [ %92, %86 ], [ %95, %93 ]
  %97 = load i32, ptr %8, align 4, !tbaa !20
  %98 = load i32, ptr %9, align 4, !tbaa !20
  %99 = call float @b2EvaluateSeparation(ptr noundef nonnull %7, i32 noundef %97, i32 noundef %98, float noundef %.0)
  %100 = fsub float %99, %45
  %101 = call float @b2AbsFloat(float noundef %100)
  %102 = fcmp olt float %101, %48
  br i1 %102, label %select.unfold, label %103

103:                                              ; preds = %96
  %104 = add nuw nsw i32 %.080, 1
  %105 = fcmp ogt float %99, %45
  %.084. = select i1 %105, float %.084, float %99
  %..081 = select i1 %105, float %99, float %.081
  %.0..077 = select i1 %105, float %.0, float %.077
  %.076..0 = select i1 %105, float %.076, float %.0
  %106 = icmp eq i32 %104, 50
  br i1 %106, label %select.unfold, label %.preheader

select.unfold:                                    ; preds = %103, %96
  %.292.ph = phi float [ %.0, %96 ], [ %.090168, %103 ]
  %107 = add nuw nsw i32 %.087169, 1
  %108 = icmp eq i32 %107, 8
  br i1 %108, label %select.unfold129, label %109

109:                                              ; preds = %select.unfold
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  %110 = call float @b2FindMinSeparation(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, float noundef %.292.ph)
  %111 = fcmp ogt float %110, %59
  br i1 %111, label %.thread145, label %.lr.ph

.thread145:                                       ; preds = %73, %109, %78, %83
  %.sroa.075.3.ph.ph = phi i64 [ 3, %83 ], [ 1, %78 ], [ 4, %109 ], [ 4, %73 ]
  %.sroa.8.3.ph.ph = phi float [ %.0101, %83 ], [ %.0101, %78 ], [ %36, %109 ], [ %36, %73 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  br label %.thread162

select.unfold129:                                 ; preds = %select.unfold, %.lr.ph
  %.2103.ph = phi float [ %.090168, %.lr.ph ], [ %.0101, %select.unfold ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  %112 = icmp eq i32 %68, 20
  br i1 %112, label %.thread162, label %113

.thread152:                                       ; preds = %61, %71
  %.sroa.075.5.ph = phi i64 [ 3, %71 ], [ 2, %61 ]
  %.sroa.8.5.ph = phi float [ %.0101, %71 ], [ 0.000000e+00, %61 ]
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %6) #8
  br label %114

.thread162:                                       ; preds = %select.unfold129, %.thread145
  %.sroa.075.4.ph = phi i64 [ %.sroa.075.3.ph.ph, %.thread145 ], [ 1, %select.unfold129 ]
  %.sroa.8.4.ph = phi float [ %.sroa.8.3.ph.ph, %.thread145 ], [ %.2103.ph, %select.unfold129 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %6) #8
  br label %114

113:                                              ; preds = %select.unfold129
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %6) #8
  br label %61

114:                                              ; preds = %.thread162, %.thread152
  %.sroa.8.5159 = phi float [ %.sroa.8.5.ph, %.thread152 ], [ %.sroa.8.4.ph, %.thread162 ]
  %.sroa.075.5158 = phi i64 [ %.sroa.075.5.ph, %.thread152 ], [ %.sroa.075.4.ph, %.thread162 ]
  call void @llvm.lifetime.end.p0(i64 180, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #8
  %115 = bitcast float %.sroa.8.5159 to i32
  %.sroa.8.0.insert.ext = zext i32 %115 to i64
  %.sroa.8.0.insert.shift = shl nuw i64 %.sroa.8.0.insert.ext, 32
  %.sroa.075.0.insert.insert = or disjoint i64 %.sroa.8.0.insert.shift, %.sroa.075.5158
  ret i64 %.sroa.075.0.insert.insert
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @b2IsNormalizedRot(<2 x float>) local_unnamed_addr #7

; Function Attrs: nounwind uwtable
declare hidden void @b2MakeSeparationFunction(ptr dead_on_unwind noalias writable sret(%struct.b2SeparationFunction) align 8, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, float noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare hidden float @b2EvaluateSeparation(ptr noundef, i32 noundef, i32 noundef, float noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2AbsFloat(float noundef) local_unnamed_addr #6

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 #7 = { 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 #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{i64 0, i64 4, !6, i64 4, i64 4, !6, i64 8, i64 4, !6, i64 12, i64 4, !6, i64 16, i64 4, !6, i64 20, i64 4, !6, i64 24, i64 4, !6, i64 28, i64 4, !6, i64 32, i64 4, !6, i64 36, i64 4, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !7, i64 224}
!11 = !{!"b2TOIInput", !12, i64 0, !12, i64 72, !14, i64 144, !14, i64 184, !7, i64 224}
!12 = !{!"b2ShapeProxy", !8, i64 0, !13, i64 64, !7, i64 68}
!13 = !{!"int", !8, i64 0}
!14 = !{!"b2Sweep", !15, i64 0, !15, i64 8, !15, i64 16, !16, i64 24, !16, i64 32}
!15 = !{!"b2Vec2", !7, i64 0, !7, i64 4}
!16 = !{!"b2Rot", !7, i64 0, !7, i64 4}
!17 = !{!12, !7, i64 68}
!18 = !{i64 0, i64 64, !19, i64 64, i64 4, !20, i64 68, i64 4, !6}
!19 = !{!8, !8, i64 0}
!20 = !{!13, !13, i64 0}
!21 = !{!22, !24, i64 176}
!22 = !{!"b2DistanceInput", !12, i64 0, !12, i64 72, !23, i64 144, !23, i64 160, !24, i64 176}
!23 = !{!"b2Transform", !15, i64 0, !16, i64 8}
!24 = !{!"_Bool", !8, i64 0}
!25 = !{!26, !7, i64 24}
!26 = !{!"b2DistanceOutput", !15, i64 0, !15, i64 8, !15, i64 16, !7, i64 24, !13, i64 28, !13, i64 32}


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