; LLVM IR from mtsamis/box2d-optimized :: testbed/test.ll (ZN4Test9MouseDownERK6b2Vec2)

; 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.b2AABB = type { %struct.b2Vec2, %struct.b2Vec2 }
%class.QueryCallback = type { %class.b2QueryCallback, %struct.b2Vec2, ptr }
%class.b2QueryCallback = type { ptr }
%struct.b2MouseJointDef = type { %struct.b2JointDef.base, %struct.b2Vec2, float, float, float }
%struct.b2JointDef.base = type <{ i32, [4 x i8], %struct.b2JointUserData, ptr, ptr, i8 }>
%struct.b2JointUserData = type { i64 }
%class.Test = type { %class.b2ContactListener, ptr, %struct.b2AABB, [2048 x %struct.ContactPoint], i32, %class.DestructionListener, i32, ptr, ptr, ptr, ptr, i8, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, i8, %struct.b2Vec2, i32, i32, %struct.b2Profile, %struct.b2Profile }
%class.b2ContactListener = type { ptr }
%struct.ContactPoint = type { ptr, ptr, %struct.b2Vec2, %struct.b2Vec2, i32, float, float, float }
%class.DestructionListener = type { %class.b2DestructionListener, ptr }
%class.b2DestructionListener = type { ptr }
%struct.b2Profile = type { float, float, float, float, float }
%struct.b2JointDef = type <{ i32, [4 x i8], %struct.b2JointUserData, ptr, ptr, i8, [7 x i8] }>

@b2Vec2_zero = external global %struct.b2Vec2, align 4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6b2AABBC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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: mustprogress uwtable
define dso_local void @_ZN4Test9MouseDownERK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(98488) %0, ptr noundef nonnull align 4 dereferenceable(8) %1) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.b2AABB, align 4
  %6 = alloca %struct.b2Vec2, align 4
  %7 = alloca %struct.b2Vec2, align 4
  %8 = alloca %struct.b2Vec2, align 4
  %9 = alloca %class.QueryCallback, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca ptr, align 8
  %15 = alloca %struct.b2MouseJointDef, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %class.Test, ptr %16, i32 0, i32 16
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 4 %17, i64 8, i1 false), !tbaa.struct !9
  %19 = getelementptr inbounds %class.Test, ptr %16, i32 0, i32 11
  store i8 1, ptr %19, align 8, !tbaa !12
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %class.Test, ptr %16, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %20, i64 8, i1 false), !tbaa.struct !9
  %22 = getelementptr inbounds %class.Test, ptr %16, i32 0, i32 13
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 @b2Vec2_zero, i64 8, i1 false), !tbaa.struct !9
  %23 = getelementptr inbounds %class.Test, ptr %16, i32 0, i32 10
  %24 = load ptr, ptr %23, align 8, !tbaa !22
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %2
  br label %89

27:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #9
  call void @_ZN6b2AABBC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @_ZN6b2Vec23SetEff(ptr noundef nonnull align 4 dereferenceable(8) %6, float noundef 0x3F50624DE0000000, float noundef 0x3F50624DE0000000)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %28, ptr noundef nonnull align 4 dereferenceable(8) %6)
  store <2 x float> %29, ptr %7, align 4
  %30 = getelementptr inbounds %struct.b2AABB, ptr %5, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %7, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %31, ptr noundef nonnull align 4 dereferenceable(8) %6)
  store <2 x float> %32, ptr %8, align 4
  %33 = getelementptr inbounds %struct.b2AABB, ptr %5, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %8, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #9
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN13QueryCallbackC2ERK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 4 dereferenceable(8) %34)
  %35 = getelementptr inbounds %class.Test, ptr %16, i32 0, i32 7
  %36 = load ptr, ptr %35, align 8, !tbaa !23
  invoke void @_ZN7b2World9QueryAABBEP15b2QueryCallbackRK6b2AABB(ptr noundef nonnull align 8 dereferenceable(103352) %36, ptr noundef %9, ptr noundef nonnull align 4 dereferenceable(16) %5)
          to label %37 unwind label %75

37:                                               ; preds = %27
  %38 = getelementptr inbounds %class.QueryCallback, ptr %9, i32 0, i32 2
  %39 = load ptr, ptr %38, align 8, !tbaa !24
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %88

41:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  store float 5.000000e+00, ptr %12, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store float 0x3FE6666660000000, ptr %13, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %42 = getelementptr inbounds %class.QueryCallback, ptr %9, i32 0, i32 2
  %43 = load ptr, ptr %42, align 8, !tbaa !24
  %44 = invoke noundef ptr @_ZN9b2Fixture7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(84) %43)
          to label %45 unwind label %79

45:                                               ; preds = %41
  store ptr %44, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %15) #9
  invoke void @_ZN15b2MouseJointDefC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %15)
          to label %46 unwind label %83

46:                                               ; preds = %45
  %47 = getelementptr inbounds %class.Test, ptr %16, i32 0, i32 1
  %48 = load ptr, ptr %47, align 8, !tbaa !27
  %49 = getelementptr inbounds %struct.b2JointDef, ptr %15, i32 0, i32 3
  store ptr %48, ptr %49, align 8, !tbaa !28
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.b2JointDef, ptr %15, i32 0, i32 4
  store ptr %50, ptr %51, align 8, !tbaa !33
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.b2MouseJointDef, ptr %15, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %53, ptr align 4 %52, i64 8, i1 false), !tbaa.struct !9
  %54 = load ptr, ptr %14, align 8, !tbaa !5
  %55 = invoke noundef float @_ZNK6b2Body7GetMassEv(ptr noundef nonnull align 8 dereferenceable(208) %54)
          to label %56 unwind label %83

56:                                               ; preds = %46
  %57 = fmul float 1.000000e+03, %55
  %58 = getelementptr inbounds %struct.b2MouseJointDef, ptr %15, i32 0, i32 2
  store float %57, ptr %58, align 4, !tbaa !34
  %59 = getelementptr inbounds %struct.b2MouseJointDef, ptr %15, i32 0, i32 3
  %60 = getelementptr inbounds %struct.b2MouseJointDef, ptr %15, i32 0, i32 4
  %61 = load float, ptr %12, align 4, !tbaa !10
  %62 = load float, ptr %13, align 4, !tbaa !10
  %63 = getelementptr inbounds %struct.b2JointDef, ptr %15, i32 0, i32 3
  %64 = load ptr, ptr %63, align 8, !tbaa !28
  %65 = getelementptr inbounds %struct.b2JointDef, ptr %15, i32 0, i32 4
  %66 = load ptr, ptr %65, align 8, !tbaa !33
  invoke void @_Z17b2LinearStiffnessRfS_ffPK6b2BodyS2_(ptr noundef nonnull align 4 dereferenceable(4) %59, ptr noundef nonnull align 4 dereferenceable(4) %60, float noundef %61, float noundef %62, ptr noundef %64, ptr noundef %66)
          to label %67 unwind label %83

67:                                               ; preds = %56
  %68 = getelementptr inbounds %class.Test, ptr %16, i32 0, i32 7
  %69 = load ptr, ptr %68, align 8, !tbaa !23
  %70 = invoke noundef ptr @_ZN7b2World11CreateJointEPK10b2JointDef(ptr noundef nonnull align 8 dereferenceable(103352) %69, ptr noundef %15)
          to label %71 unwind label %83

71:                                               ; preds = %67
  %72 = getelementptr inbounds %class.Test, ptr %16, i32 0, i32 10
  store ptr %70, ptr %72, align 8, !tbaa !22
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZN6b2Body8SetAwakeEb(ptr noundef nonnull align 8 dereferenceable(208) %73, i1 noundef zeroext true)
          to label %74 unwind label %83

74:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 56, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, 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
  br label %88

75:                                               ; preds = %27
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %10, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %11, align 4
  br label %90

79:                                               ; preds = %41
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %10, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %11, align 4
  br label %87

83:                                               ; preds = %71, %67, %56, %46, %45
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %10, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 56, ptr %15) #9
  br label %87

87:                                               ; preds = %83, %79
  call void @llvm.lifetime.end.p0(i64 8, 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
  br label %90

88:                                               ; preds = %74, %37
  call void @_ZN15b2QueryCallbackD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #9
  br label %89

89:                                               ; preds = %88, %26
  ret void

90:                                               ; preds = %87, %75
  call void @_ZN15b2QueryCallbackD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #9
  br label %91

91:                                               ; preds = %90
  %92 = load ptr, ptr %10, align 8
  %93 = load i32, ptr %11, align 4
  %94 = insertvalue { ptr, i32 } poison, ptr %92, 0
  %95 = insertvalue { ptr, i32 } %94, i32 %93, 1
  resume { ptr, i32 } %95
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13QueryCallbackC2ERK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #6 align 2

declare void @_ZN7b2World9QueryAABBEP15b2QueryCallbackRK6b2AABB(ptr noundef nonnull align 8 dereferenceable(103352), ptr noundef, ptr noundef nonnull align 4 dereferenceable(16)) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9b2Fixture7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(84)) #8 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15b2MouseJointDefC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #6 align 2

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

declare void @_Z17b2LinearStiffnessRfS_ffPK6b2BodyS2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), float noundef, float noundef, ptr noundef, ptr noundef) #7

declare noundef ptr @_ZN7b2World11CreateJointEPK10b2JointDef(ptr noundef nonnull align 8 dereferenceable(103352), ptr noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6b2Body8SetAwakeEb(ptr noundef nonnull align 8 dereferenceable(208), i1 noundef zeroext) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15b2QueryCallbackD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

attributes #0 = { inlinehint mustprogress 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 #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress 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 = { "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 mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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++ TBAA"}
!9 = !{i64 0, i64 4, !10, i64 4, i64 4, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"float", !7, i64 0}
!12 = !{!13, !20, i64 98400}
!13 = !{!"_ZTS4Test", !14, i64 0, !6, i64 8, !15, i64 16, !7, i64 32, !17, i64 98336, !18, i64 98344, !17, i64 98360, !6, i64 98368, !6, i64 98376, !6, i64 98384, !6, i64 98392, !20, i64 98400, !16, i64 98404, !16, i64 98412, !16, i64 98420, !20, i64 98428, !16, i64 98432, !17, i64 98440, !17, i64 98444, !21, i64 98448, !21, i64 98468}
!14 = !{!"_ZTS17b2ContactListener"}
!15 = !{!"_ZTS6b2AABB", !16, i64 0, !16, i64 8}
!16 = !{!"_ZTS6b2Vec2", !11, i64 0, !11, i64 4}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_ZTS19DestructionListener", !19, i64 0, !6, i64 8}
!19 = !{!"_ZTS21b2DestructionListener"}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTS9b2Profile", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16}
!22 = !{!13, !6, i64 98392}
!23 = !{!13, !6, i64 98368}
!24 = !{!25, !6, i64 16}
!25 = !{!"_ZTS13QueryCallback", !26, i64 0, !16, i64 8, !6, i64 16}
!26 = !{!"_ZTS15b2QueryCallback"}
!27 = !{!13, !6, i64 8}
!28 = !{!29, !6, i64 16}
!29 = !{!"_ZTS10b2JointDef", !30, i64 0, !31, i64 8, !6, i64 16, !6, i64 24, !20, i64 32}
!30 = !{!"_ZTS11b2JointType", !7, i64 0}
!31 = !{!"_ZTS15b2JointUserData", !32, i64 0}
!32 = !{!"long", !7, i64 0}
!33 = !{!29, !6, i64 24}
!34 = !{!35, !11, i64 44}
!35 = !{!"_ZTS15b2MouseJointDef", !29, i64 0, !16, i64 36, !11, i64 44, !11, i64 48, !11, i64 52}


; 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.b2AABB = type { %struct.b2Vec2, %struct.b2Vec2 }
%class.QueryCallback = type { %class.b2QueryCallback, %struct.b2Vec2, ptr }
%class.b2QueryCallback = type { ptr }
%struct.b2MouseJointDef = type { %struct.b2JointDef.base, %struct.b2Vec2, float, float, float }
%struct.b2JointDef.base = type <{ i32, [4 x i8], %struct.b2JointUserData, ptr, ptr, i8 }>
%struct.b2JointUserData = type { i64 }

@b2Vec2_zero = external local_unnamed_addr global %struct.b2Vec2, align 4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6b2AABBC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Test9MouseDownERK6b2Vec2(ptr nocapture noundef nonnull align 8 dereferenceable(98488) %0, ptr noundef nonnull align 4 dereferenceable(8) %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %struct.b2AABB, align 8
  %4 = alloca %struct.b2Vec2, align 4
  %5 = alloca %class.QueryCallback, align 8
  %6 = alloca %struct.b2MouseJointDef, align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 98432
  %8 = load i64, ptr %1, align 4
  store i64 %8, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr %0, i64 98400
  store i8 1, ptr %9, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 98404
  %11 = load i64, ptr %1, align 4
  store i64 %11, ptr %10, align 4
  %12 = getelementptr inbounds i8, ptr %0, i64 98412
  %13 = load i64, ptr @b2Vec2_zero, align 4
  store i64 %13, ptr %12, align 4
  %14 = getelementptr inbounds i8, ptr %0, i64 98392
  %15 = load ptr, ptr %14, align 8, !tbaa !19
  %.not = icmp eq ptr %15, null
  br i1 %.not, label %16, label %51

16:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  call void @_ZN6b2AABBC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @_ZN6b2Vec23SetEff(ptr noundef nonnull align 4 dereferenceable(8) %4, float noundef 0x3F50624DE0000000, float noundef 0x3F50624DE0000000)
  %17 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(8) %4)
  store <2 x float> %17, ptr %3, align 8
  %18 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(8) %4)
  %19 = getelementptr inbounds i8, ptr %3, i64 8
  store <2 x float> %18, ptr %19, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  call void @_ZN13QueryCallbackC2ERK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(8) %1)
  %20 = getelementptr inbounds i8, ptr %0, i64 98368
  %21 = load ptr, ptr %20, align 8, !tbaa !20
  invoke void @_ZN7b2World9QueryAABBEP15b2QueryCallbackRK6b2AABB(ptr noundef nonnull align 8 dereferenceable(103352) %21, ptr noundef nonnull %5, ptr noundef nonnull align 4 dereferenceable(16) %3)
          to label %22 unwind label %46

22:                                               ; preds = %16
  %23 = getelementptr inbounds i8, ptr %5, i64 16
  %24 = load ptr, ptr %23, align 8, !tbaa !21
  %.not16 = icmp eq ptr %24, null
  br i1 %.not16, label %50, label %25

25:                                               ; preds = %22
  %26 = call noundef ptr @_ZN9b2Fixture7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(84) %24)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %6) #8
  invoke void @_ZN15b2MouseJointDefC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6)
          to label %27 unwind label %48

27:                                               ; preds = %25
  %28 = getelementptr inbounds i8, ptr %0, i64 8
  %29 = load ptr, ptr %28, align 8, !tbaa !24
  %30 = getelementptr inbounds i8, ptr %6, i64 16
  store ptr %29, ptr %30, align 8, !tbaa !25
  %31 = getelementptr inbounds i8, ptr %6, i64 24
  store ptr %26, ptr %31, align 8, !tbaa !30
  %32 = getelementptr inbounds i8, ptr %6, i64 36
  %33 = load i64, ptr %1, align 4
  store i64 %33, ptr %32, align 4
  %34 = call noundef float @_ZNK6b2Body7GetMassEv(ptr noundef nonnull align 8 dereferenceable(208) %26)
  %35 = fmul float %34, 1.000000e+03
  %36 = getelementptr inbounds i8, ptr %6, i64 44
  store float %35, ptr %36, align 4, !tbaa !31
  %37 = getelementptr inbounds i8, ptr %6, i64 48
  %38 = getelementptr inbounds i8, ptr %6, i64 52
  %39 = load ptr, ptr %30, align 8, !tbaa !25
  %40 = load ptr, ptr %31, align 8, !tbaa !30
  invoke void @_Z17b2LinearStiffnessRfS_ffPK6b2BodyS2_(ptr noundef nonnull align 4 dereferenceable(4) %37, ptr noundef nonnull align 4 dereferenceable(4) %38, float noundef 5.000000e+00, float noundef 0x3FE6666660000000, ptr noundef %39, ptr noundef %40)
          to label %41 unwind label %48

41:                                               ; preds = %27
  %42 = load ptr, ptr %20, align 8, !tbaa !20
  %43 = invoke noundef ptr @_ZN7b2World11CreateJointEPK10b2JointDef(ptr noundef nonnull align 8 dereferenceable(103352) %42, ptr noundef nonnull %6)
          to label %44 unwind label %48

44:                                               ; preds = %41
  store ptr %43, ptr %14, align 8, !tbaa !19
  invoke void @_ZN6b2Body8SetAwakeEb(ptr noundef nonnull align 8 dereferenceable(208) %26, i1 noundef zeroext true)
          to label %45 unwind label %48

45:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #8
  br label %50

46:                                               ; preds = %16
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %52

48:                                               ; preds = %44, %41, %27, %25
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #8
  br label %52

50:                                               ; preds = %45, %22
  call void @_ZN15b2QueryCallbackD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  br label %51

51:                                               ; preds = %2, %50
  ret void

52:                                               ; preds = %48, %46
  %.pn = phi { ptr, i32 } [ %49, %48 ], [ %47, %46 ]
  call void @_ZN15b2QueryCallbackD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13QueryCallbackC2ERK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #5 align 2

declare void @_ZN7b2World9QueryAABBEP15b2QueryCallbackRK6b2AABB(ptr noundef nonnull align 8 dereferenceable(103352), ptr noundef, ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9b2Fixture7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(84)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15b2MouseJointDefC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6b2Body7GetMassEv(ptr noundef nonnull align 8 dereferenceable(208)) local_unnamed_addr #7 align 2

declare void @_Z17b2LinearStiffnessRfS_ffPK6b2BodyS2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), float noundef, float noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

declare noundef ptr @_ZN7b2World11CreateJointEPK10b2JointDef(ptr noundef nonnull align 8 dereferenceable(103352), ptr noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6b2Body8SetAwakeEb(ptr noundef nonnull align 8 dereferenceable(208), i1 noundef zeroext) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15b2QueryCallbackD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

attributes #0 = { inlinehint mustprogress 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 #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "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 mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = !{!6, !17, i64 98400}
!6 = !{!"_ZTS4Test", !7, i64 0, !8, i64 8, !11, i64 16, !9, i64 32, !14, i64 98336, !15, i64 98344, !14, i64 98360, !8, i64 98368, !8, i64 98376, !8, i64 98384, !8, i64 98392, !17, i64 98400, !12, i64 98404, !12, i64 98412, !12, i64 98420, !17, i64 98428, !12, i64 98432, !14, i64 98440, !14, i64 98444, !18, i64 98448, !18, i64 98468}
!7 = !{!"_ZTS17b2ContactListener"}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTS6b2AABB", !12, i64 0, !12, i64 8}
!12 = !{!"_ZTS6b2Vec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !9, i64 0}
!14 = !{!"int", !9, i64 0}
!15 = !{!"_ZTS19DestructionListener", !16, i64 0, !8, i64 8}
!16 = !{!"_ZTS21b2DestructionListener"}
!17 = !{!"bool", !9, i64 0}
!18 = !{!"_ZTS9b2Profile", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16}
!19 = !{!6, !8, i64 98392}
!20 = !{!6, !8, i64 98368}
!21 = !{!22, !8, i64 16}
!22 = !{!"_ZTS13QueryCallback", !23, i64 0, !12, i64 8, !8, i64 16}
!23 = !{!"_ZTS15b2QueryCallback"}
!24 = !{!6, !8, i64 8}
!25 = !{!26, !8, i64 16}
!26 = !{!"_ZTS10b2JointDef", !27, i64 0, !28, i64 8, !8, i64 16, !8, i64 24, !17, i64 32}
!27 = !{!"_ZTS11b2JointType", !9, i64 0}
!28 = !{!"_ZTS15b2JointUserData", !29, i64 0}
!29 = !{!"long", !9, i64 0}
!30 = !{!26, !8, i64 24}
!31 = !{!32, !13, i64 44}
!32 = !{!"_ZTS15b2MouseJointDef", !26, i64 0, !12, i64 36, !13, i64 44, !13, i64 48, !13, i64 52}


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