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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.b2Manifold = type { %struct.b2Vec2, float, [2 x %struct.b2ManifoldPoint], i32 }
%struct.b2Vec2 = type { float, float }
%struct.b2ManifoldPoint = type { %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, float, i16, i8 }
%struct.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2Rot = type { float, float }
%struct.b2Circle = type { %struct.b2Vec2, float }
%struct.b2Capsule = type { %struct.b2Vec2, %struct.b2Vec2, float }

@b2_lengthUnitsPerMeter = external global float, align 4

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

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2GetLengthAndNormalize(ptr noundef, <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: nounwind uwtable
define dso_local void @b2CollideCapsuleAndCircle(ptr dead_on_unwind noalias writable sret(%struct.b2Manifold) align 4 %0, ptr noundef %1, <2 x float> %2, <2 x float> %3, ptr noundef %4, <2 x float> %5, <2 x float> %6) #4 {
  %8 = alloca %struct.b2Transform, align 4
  %9 = alloca %struct.b2Transform, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %struct.b2Transform, align 4
  %13 = alloca %struct.b2Vec2, align 4
  %14 = alloca %struct.b2Vec2, align 4
  %15 = alloca %struct.b2Vec2, align 4
  %16 = alloca %struct.b2Vec2, align 4
  %17 = alloca %struct.b2Vec2, align 4
  %18 = alloca float, align 4
  %19 = alloca %struct.b2Vec2, align 4
  %20 = alloca float, align 4
  %21 = alloca %struct.b2Vec2, align 4
  %22 = alloca float, align 4
  %23 = alloca %struct.b2Vec2, align 4
  %24 = alloca float, align 4
  %25 = alloca %struct.b2Vec2, align 4
  %26 = alloca %struct.b2Vec2, align 4
  %27 = alloca float, align 4
  %28 = alloca float, align 4
  %29 = alloca float, align 4
  %30 = alloca i32, align 4
  %31 = alloca %struct.b2Vec2, align 4
  %32 = alloca %struct.b2Vec2, align 4
  %33 = alloca %struct.b2Vec2, align 4
  %34 = alloca %struct.b2Vec2, align 4
  %35 = alloca ptr, align 8
  %36 = alloca %struct.b2Vec2, align 4
  %37 = alloca %struct.b2Vec2, align 4
  %38 = alloca %struct.b2Vec2, align 4
  %39 = alloca %struct.b2Vec2, align 4
  %40 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 0
  store <2 x float> %2, ptr %40, align 4
  %41 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 1
  store <2 x float> %3, ptr %41, align 4
  %42 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  store <2 x float> %5, ptr %42, align 4
  %43 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  store <2 x float> %6, ptr %43, align 4
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 4 %0, i8 0, i64 112, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #5
  %44 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 0
  %45 = load <2 x float>, ptr %44, align 4
  %46 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 1
  %47 = load <2 x float>, ptr %46, align 4
  %48 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  %49 = load <2 x float>, ptr %48, align 4
  %50 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  %51 = load <2 x float>, ptr %50, align 4
  %52 = call { <2 x float>, <2 x float> } @b2InvMulTransforms(<2 x float> %45, <2 x float> %47, <2 x float> %49, <2 x float> %51)
  %53 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %12, i32 0, i32 0
  %54 = extractvalue { <2 x float>, <2 x float> } %52, 0
  store <2 x float> %54, ptr %53, align 4
  %55 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %12, i32 0, i32 1
  %56 = extractvalue { <2 x float>, <2 x float> } %52, 1
  store <2 x float> %56, ptr %55, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.b2Circle, ptr %57, i32 0, i32 0
  %59 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %12, i32 0, i32 0
  %60 = load <2 x float>, ptr %59, align 4
  %61 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %12, i32 0, i32 1
  %62 = load <2 x float>, ptr %61, align 4
  %63 = load <2 x float>, ptr %58, align 4
  %64 = call <2 x float> @b2TransformPoint(<2 x float> %60, <2 x float> %62, <2 x float> %63)
  store <2 x float> %64, ptr %13, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.b2Capsule, ptr %65, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %66, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.b2Capsule, ptr %67, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %68, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %69 = load <2 x float>, ptr %15, align 4
  %70 = load <2 x float>, ptr %14, align 4
  %71 = call <2 x float> @b2Sub(<2 x float> %69, <2 x float> %70)
  store <2 x float> %71, ptr %16, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %72 = load <2 x float>, ptr %13, align 4
  %73 = load <2 x float>, ptr %14, align 4
  %74 = call <2 x float> @b2Sub(<2 x float> %72, <2 x float> %73)
  store <2 x float> %74, ptr %19, align 4
  %75 = load <2 x float>, ptr %19, align 4
  %76 = load <2 x float>, ptr %16, align 4
  %77 = call float @b2Dot(<2 x float> %75, <2 x float> %76)
  store float %77, ptr %18, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %78 = load <2 x float>, ptr %15, align 4
  %79 = load <2 x float>, ptr %13, align 4
  %80 = call <2 x float> @b2Sub(<2 x float> %78, <2 x float> %79)
  store <2 x float> %80, ptr %21, align 4
  %81 = load <2 x float>, ptr %21, align 4
  %82 = load <2 x float>, ptr %16, align 4
  %83 = call float @b2Dot(<2 x float> %81, <2 x float> %82)
  store float %83, ptr %20, align 4, !tbaa !10
  %84 = load float, ptr %18, align 4, !tbaa !10
  %85 = fcmp olt float %84, 0.000000e+00
  br i1 %85, label %86, label %87

86:                                               ; preds = %7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %14, i64 8, i1 false), !tbaa.struct !9
  br label %102

87:                                               ; preds = %7
  %88 = load float, ptr %20, align 4, !tbaa !10
  %89 = fcmp olt float %88, 0.000000e+00
  br i1 %89, label %90, label %91

90:                                               ; preds = %87
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %15, i64 8, i1 false), !tbaa.struct !9
  br label %101

91:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %92 = load float, ptr %18, align 4, !tbaa !10
  %93 = load <2 x float>, ptr %16, align 4
  %94 = load <2 x float>, ptr %16, align 4
  %95 = call float @b2Dot(<2 x float> %93, <2 x float> %94)
  %96 = fdiv float %92, %95
  store float %96, ptr %22, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %97 = load float, ptr %22, align 4, !tbaa !10
  %98 = load <2 x float>, ptr %14, align 4
  %99 = load <2 x float>, ptr %16, align 4
  %100 = call <2 x float> @b2MulAdd(<2 x float> %98, float noundef %97, <2 x float> %99)
  store <2 x float> %100, ptr %23, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %23, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %101

101:                                              ; preds = %91, %90
  br label %102

102:                                              ; preds = %101, %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %103 = load <2 x float>, ptr %13, align 4
  %104 = load <2 x float>, ptr %17, align 4
  %105 = call <2 x float> @b2Sub(<2 x float> %103, <2 x float> %104)
  store <2 x float> %105, ptr %26, align 4
  %106 = load <2 x float>, ptr %26, align 4
  %107 = call <2 x float> @b2GetLengthAndNormalize(ptr noundef %24, <2 x float> %106)
  store <2 x float> %107, ptr %25, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.b2Capsule, ptr %108, i32 0, i32 2
  %110 = load float, ptr %109, align 4, !tbaa !12
  store float %110, ptr %27, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.b2Circle, ptr %111, i32 0, i32 1
  %113 = load float, ptr %112, align 4, !tbaa !15
  store float %113, ptr %28, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %114 = load float, ptr %24, align 4, !tbaa !10
  %115 = load float, ptr %27, align 4, !tbaa !10
  %116 = fsub float %114, %115
  %117 = load float, ptr %28, align 4, !tbaa !10
  %118 = fsub float %116, %117
  store float %118, ptr %29, align 4, !tbaa !10
  %119 = load float, ptr %29, align 4, !tbaa !10
  %120 = load float, ptr @b2_lengthUnitsPerMeter, align 4, !tbaa !10
  %121 = fmul float 0x3F747AE140000000, %120
  %122 = fmul float 4.000000e+00, %121
  %123 = fcmp ogt float %119, %122
  br i1 %123, label %124, label %125

124:                                              ; preds = %102
  store i32 1, ptr %30, align 4
  br label %178

125:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %126 = load float, ptr %27, align 4, !tbaa !10
  %127 = load <2 x float>, ptr %17, align 4
  %128 = load <2 x float>, ptr %25, align 4
  %129 = call <2 x float> @b2MulAdd(<2 x float> %127, float noundef %126, <2 x float> %128)
  store <2 x float> %129, ptr %31, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  %130 = load float, ptr %28, align 4, !tbaa !10
  %131 = fneg float %130
  %132 = load <2 x float>, ptr %13, align 4
  %133 = load <2 x float>, ptr %25, align 4
  %134 = call <2 x float> @b2MulAdd(<2 x float> %132, float noundef %131, <2 x float> %133)
  store <2 x float> %134, ptr %32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  %135 = load <2 x float>, ptr %31, align 4
  %136 = load <2 x float>, ptr %32, align 4
  %137 = call <2 x float> @b2Lerp(<2 x float> %135, <2 x float> %136, float noundef 5.000000e-01)
  store <2 x float> %137, ptr %33, align 4
  %138 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  %139 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 1
  %140 = load <2 x float>, ptr %139, align 4
  %141 = load <2 x float>, ptr %25, align 4
  %142 = call <2 x float> @b2RotateVector(<2 x float> %140, <2 x float> %141)
  store <2 x float> %142, ptr %34, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %138, ptr align 4 %34, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  %143 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 2
  %144 = getelementptr inbounds [2 x %struct.b2ManifoldPoint], ptr %143, i64 0, i64 0
  %145 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %144, i64 0
  store ptr %145, ptr %35, align 8, !tbaa !5
  %146 = load ptr, ptr %35, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %146, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #5
  %148 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 1
  %149 = load <2 x float>, ptr %148, align 4
  %150 = load <2 x float>, ptr %33, align 4
  %151 = call <2 x float> @b2RotateVector(<2 x float> %149, <2 x float> %150)
  store <2 x float> %151, ptr %36, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %147, ptr align 4 %36, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  %152 = load ptr, ptr %35, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %152, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #5
  %154 = load ptr, ptr %35, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %154, i32 0, i32 1
  %156 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 0
  %157 = getelementptr inbounds %struct.b2Transform, ptr %9, i32 0, i32 0
  %158 = load <2 x float>, ptr %156, align 4
  %159 = load <2 x float>, ptr %157, align 4
  %160 = call <2 x float> @b2Sub(<2 x float> %158, <2 x float> %159)
  store <2 x float> %160, ptr %38, align 4
  %161 = load <2 x float>, ptr %155, align 4
  %162 = load <2 x float>, ptr %38, align 4
  %163 = call <2 x float> @b2Add(<2 x float> %161, <2 x float> %162)
  store <2 x float> %163, ptr %37, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %153, ptr align 4 %37, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #5
  %164 = load ptr, ptr %35, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %164, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #5
  %166 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 0
  %167 = load ptr, ptr %35, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %167, i32 0, i32 1
  %169 = load <2 x float>, ptr %166, align 4
  %170 = load <2 x float>, ptr %168, align 4
  %171 = call <2 x float> @b2Add(<2 x float> %169, <2 x float> %170)
  store <2 x float> %171, ptr %39, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %165, ptr align 4 %39, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #5
  %172 = load float, ptr %29, align 4, !tbaa !10
  %173 = load ptr, ptr %35, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %173, i32 0, i32 3
  store float %172, ptr %174, align 4, !tbaa !17
  %175 = load ptr, ptr %35, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.b2ManifoldPoint, ptr %175, i32 0, i32 8
  store i16 0, ptr %176, align 4, !tbaa !21
  %177 = getelementptr inbounds %struct.b2Manifold, ptr %0, i32 0, i32 3
  store i32 1, ptr %177, align 4, !tbaa !22
  store i32 1, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %178

178:                                              ; preds = %125, %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  ret void
}

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{i64 0, i64 4, !10, i64 4, i64 4, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"float", !7, i64 0}
!12 = !{!13, !11, i64 16}
!13 = !{!"b2Capsule", !14, i64 0, !14, i64 8, !11, i64 16}
!14 = !{!"b2Vec2", !11, i64 0, !11, i64 4}
!15 = !{!16, !11, i64 8}
!16 = !{!"b2Circle", !14, i64 0, !11, i64 8}
!17 = !{!18, !11, i64 24}
!18 = !{!"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, !19, i64 44, !20, i64 46}
!19 = !{!"short", !7, i64 0}
!20 = !{!"_Bool", !7, i64 0}
!21 = !{!18, !19, i64 44}
!22 = !{!23, !24, i64 108}
!23 = !{!"b2Manifold", !14, i64 0, !11, i64 8, !7, i64 12, !24, i64 108}
!24 = !{!"int", !7, i64 0}


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

%struct.b2Manifold = type { %struct.b2Vec2, float, [2 x %struct.b2ManifoldPoint], i32 }
%struct.b2Vec2 = type { float, float }
%struct.b2ManifoldPoint = type { %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, float, i16, i8 }

@b2_lengthUnitsPerMeter = external local_unnamed_addr global float, align 4

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

; Function Attrs: 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> @b2GetLengthAndNormalize(ptr noundef, <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: nounwind uwtable
define dso_local void @b2CollideCapsuleAndCircle(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.b2Manifold) align 4 %0, ptr nocapture noundef readonly %1, <2 x float> %2, <2 x float> %3, ptr nocapture noundef readonly %4, <2 x float> %5, <2 x float> %6) local_unnamed_addr #3 {
  %8 = alloca float, align 4
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(112) %0, i8 0, i64 112, i1 false)
  %9 = tail call { <2 x float>, <2 x float> } @b2InvMulTransforms(<2 x float> %2, <2 x float> %3, <2 x float> %5, <2 x float> %6)
  %10 = extractvalue { <2 x float>, <2 x float> } %9, 0
  %11 = extractvalue { <2 x float>, <2 x float> } %9, 1
  %12 = load <2 x float>, ptr %4, align 4
  %13 = tail call <2 x float> @b2TransformPoint(<2 x float> %10, <2 x float> %11, <2 x float> %12)
  %.sroa.042.0.copyload = load <2 x float>, ptr %1, align 4
  %14 = getelementptr inbounds i8, ptr %1, i64 8
  %.sroa.039.0.copyload = load <2 x float>, ptr %14, align 4
  %15 = tail call <2 x float> @b2Sub(<2 x float> %.sroa.039.0.copyload, <2 x float> %.sroa.042.0.copyload)
  %16 = tail call <2 x float> @b2Sub(<2 x float> %13, <2 x float> %.sroa.042.0.copyload)
  %17 = tail call float @b2Dot(<2 x float> %16, <2 x float> %15)
  %18 = tail call <2 x float> @b2Sub(<2 x float> %.sroa.039.0.copyload, <2 x float> %13)
  %19 = tail call float @b2Dot(<2 x float> %18, <2 x float> %15)
  %20 = fcmp olt float %17, 0.000000e+00
  br i1 %20, label %27, label %21

21:                                               ; preds = %7
  %22 = fcmp olt float %19, 0.000000e+00
  br i1 %22, label %27, label %23

23:                                               ; preds = %21
  %24 = tail call float @b2Dot(<2 x float> %15, <2 x float> %15)
  %25 = fdiv float %17, %24
  %26 = tail call <2 x float> @b2MulAdd(<2 x float> %.sroa.042.0.copyload, float noundef %25, <2 x float> %15)
  br label %27

27:                                               ; preds = %21, %7, %23
  %.sroa.031.0 = phi <2 x float> [ %26, %23 ], [ %.sroa.042.0.copyload, %7 ], [ %.sroa.039.0.copyload, %21 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  %28 = tail call <2 x float> @b2Sub(<2 x float> %13, <2 x float> %.sroa.031.0)
  %29 = call <2 x float> @b2GetLengthAndNormalize(ptr noundef nonnull %8, <2 x float> %28)
  %30 = getelementptr inbounds i8, ptr %1, i64 16
  %31 = load float, ptr %30, align 4, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %4, i64 8
  %33 = load float, ptr %32, align 4, !tbaa !11
  %34 = load float, ptr %8, align 4, !tbaa !13
  %35 = fsub float %34, %31
  %36 = fsub float %35, %33
  %37 = load float, ptr @b2_lengthUnitsPerMeter, align 4, !tbaa !13
  %38 = fmul float %37, 0x3F747AE140000000
  %39 = fmul float %38, 4.000000e+00
  %40 = fcmp ogt float %36, %39
  br i1 %40, label %57, label %41

41:                                               ; preds = %27
  %42 = call <2 x float> @b2MulAdd(<2 x float> %.sroa.031.0, float noundef %31, <2 x float> %29)
  %43 = fneg float %33
  %44 = call <2 x float> @b2MulAdd(<2 x float> %13, float noundef %43, <2 x float> %29)
  %45 = call <2 x float> @b2Lerp(<2 x float> %42, <2 x float> %44, float noundef 5.000000e-01)
  %46 = call <2 x float> @b2RotateVector(<2 x float> %3, <2 x float> %29)
  store <2 x float> %46, ptr %0, align 4
  %47 = getelementptr inbounds i8, ptr %0, i64 12
  %48 = getelementptr inbounds i8, ptr %0, i64 20
  %49 = call <2 x float> @b2RotateVector(<2 x float> %3, <2 x float> %45)
  store <2 x float> %49, ptr %48, align 4
  %50 = getelementptr inbounds i8, ptr %0, i64 28
  %51 = call <2 x float> @b2Sub(<2 x float> %2, <2 x float> %5)
  %52 = call <2 x float> @b2Add(<2 x float> %49, <2 x float> %51)
  store <2 x float> %52, ptr %50, align 4
  %53 = call <2 x float> @b2Add(<2 x float> %2, <2 x float> %49)
  store <2 x float> %53, ptr %47, align 4
  %54 = getelementptr inbounds i8, ptr %0, i64 36
  store float %36, ptr %54, align 4, !tbaa !14
  %55 = getelementptr inbounds i8, ptr %0, i64 56
  store i16 0, ptr %55, align 4, !tbaa !18
  %56 = getelementptr inbounds i8, ptr %0, i64 108
  store i32 1, ptr %56, align 4, !tbaa !19
  br label %57

57:                                               ; preds = %27, %41
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  ret void
}

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

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 = { 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 #4 = { nounwind }

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass