; LLVM IR from wgtdkp/apollonia :: src/joint.ll (ZN9apollonia13RevoluteJointC2ERNS_4BodyES2_RKNS_4Vec2E)

; 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.apollonia::Vec2" = type { float, float }
%"struct.apollonia::Mat22" = type { %"struct.std::array" }
%"struct.std::array" = type { [2 x %"struct.apollonia::Vec2"] }
%"class.apollonia::RevoluteJoint" = type { %"class.apollonia::Joint", %"struct.apollonia::Vec2", %"struct.apollonia::Vec2", %"struct.apollonia::Vec2", %"struct.apollonia::Vec2", %"struct.apollonia::Vec2", %"struct.apollonia::Mat22", %"struct.apollonia::Vec2", %"struct.apollonia::Vec2" }
%"class.apollonia::Joint" = type { ptr, ptr, ptr }

@_ZTVN9apollonia13RevoluteJointE = external dso_local unnamed_addr constant { [6 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9apollonia13RevoluteJointC2ERNS_4BodyES2_RKNS_4Vec2E(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef nonnull align 8 dereferenceable(88) %1, ptr noundef nonnull align 8 dereferenceable(88) %2, ptr noundef nonnull align 4 dereferenceable(8) %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"struct.apollonia::Vec2", align 4
  %12 = alloca %"struct.apollonia::Mat22", align 4
  %13 = alloca %"struct.apollonia::Vec2", align 4
  %14 = alloca %"struct.apollonia::Vec2", align 4
  %15 = alloca %"struct.apollonia::Vec2", align 4
  %16 = alloca %"struct.apollonia::Mat22", align 4
  %17 = alloca %"struct.apollonia::Vec2", align 4
  %18 = alloca %"struct.apollonia::Vec2", align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN9apollonia5JointC2ERNS_4BodyES2_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(88) %20, ptr noundef nonnull align 8 dereferenceable(88) %21)
  store ptr getelementptr inbounds inrange(-16, 32) ({ [6 x ptr] }, ptr @_ZTVN9apollonia13RevoluteJointE, i32 0, i32 0, i32 2), ptr %19, align 8, !tbaa !9
  %22 = getelementptr inbounds %"class.apollonia::RevoluteJoint", ptr %19, i32 0, i32 1
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 4 %23, i64 8, i1 false), !tbaa.struct !11
  %24 = getelementptr inbounds %"class.apollonia::RevoluteJoint", ptr %19, i32 0, i32 2
  invoke void @_ZN9apollonia4Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %24)
          to label %25 unwind label %84

25:                                               ; preds = %4
  %26 = getelementptr inbounds %"class.apollonia::RevoluteJoint", ptr %19, i32 0, i32 3
  invoke void @_ZN9apollonia4Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %26)
          to label %27 unwind label %84

27:                                               ; preds = %25
  %28 = getelementptr inbounds %"class.apollonia::RevoluteJoint", ptr %19, i32 0, i32 4
  invoke void @_ZN9apollonia4Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %28)
          to label %29 unwind label %84

29:                                               ; preds = %27
  %30 = getelementptr inbounds %"class.apollonia::RevoluteJoint", ptr %19, i32 0, i32 5
  invoke void @_ZN9apollonia4Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %30)
          to label %31 unwind label %84

31:                                               ; preds = %29
  %32 = getelementptr inbounds %"class.apollonia::RevoluteJoint", ptr %19, i32 0, i32 6
  invoke void @_ZN9apollonia5Mat22C2Ev(ptr noundef nonnull align 4 dereferenceable(16) %32)
          to label %33 unwind label %84

33:                                               ; preds = %31
  %34 = getelementptr inbounds %"class.apollonia::RevoluteJoint", ptr %19, i32 0, i32 7
  invoke void @_ZN9apollonia4Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %34)
          to label %35 unwind label %84

35:                                               ; preds = %33
  %36 = getelementptr inbounds %"class.apollonia::RevoluteJoint", ptr %19, i32 0, i32 8
  invoke void @_ZN9apollonia4Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %36)
          to label %37 unwind label %84

37:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #6
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9apollonia4Body8rotationEv(ptr noundef nonnull align 8 dereferenceable(88) %38)
          to label %40 unwind label %88

40:                                               ; preds = %37
  %41 = invoke { <2 x float>, <2 x float> } @_ZNK9apollonia5Mat229TransposeEv(ptr noundef nonnull align 4 dereferenceable(16) %39)
          to label %42 unwind label %88

42:                                               ; preds = %40
  %43 = getelementptr inbounds %"struct.apollonia::Mat22", ptr %12, i32 0, i32 0
  %44 = getelementptr inbounds %"struct.std::array", ptr %43, i32 0, i32 0
  %45 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %44, i32 0, i32 0
  %46 = extractvalue { <2 x float>, <2 x float> } %41, 0
  store <2 x float> %46, ptr %45, align 4
  %47 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %44, i32 0, i32 1
  %48 = extractvalue { <2 x float>, <2 x float> } %41, 1
  store <2 x float> %48, ptr %47, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %49 = getelementptr inbounds %"class.apollonia::RevoluteJoint", ptr %19, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9apollonia4Body8centroidEv(ptr noundef nonnull align 8 dereferenceable(88) %51)
          to label %53 unwind label %92

53:                                               ; preds = %42
  %54 = invoke <2 x float> @_ZNK9apollonia4Body12LocalToWorldERKNS_4Vec2E(ptr noundef nonnull align 8 dereferenceable(88) %50, ptr noundef nonnull align 4 dereferenceable(8) %52)
          to label %55 unwind label %92

55:                                               ; preds = %53
  store <2 x float> %54, ptr %14, align 4
  %56 = invoke <2 x float> @_ZN9apolloniamiERKNS_4Vec2ES2_(ptr noundef nonnull align 4 dereferenceable(8) %49, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %57 unwind label %92

57:                                               ; preds = %55
  store <2 x float> %56, ptr %13, align 4
  %58 = invoke <2 x float> @_ZN9apolloniamlERKNS_5Mat22ERKNS_4Vec2E(ptr noundef nonnull align 4 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(8) %13)
          to label %59 unwind label %92

59:                                               ; preds = %57
  store <2 x float> %58, ptr %11, align 4
  %60 = getelementptr inbounds %"class.apollonia::RevoluteJoint", ptr %19, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %60, ptr align 4 %11, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9apollonia4Body8rotationEv(ptr noundef nonnull align 8 dereferenceable(88) %61)
          to label %63 unwind label %97

63:                                               ; preds = %59
  %64 = invoke { <2 x float>, <2 x float> } @_ZNK9apollonia5Mat229TransposeEv(ptr noundef nonnull align 4 dereferenceable(16) %62)
          to label %65 unwind label %97

65:                                               ; preds = %63
  %66 = getelementptr inbounds %"struct.apollonia::Mat22", ptr %16, i32 0, i32 0
  %67 = getelementptr inbounds %"struct.std::array", ptr %66, i32 0, i32 0
  %68 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %67, i32 0, i32 0
  %69 = extractvalue { <2 x float>, <2 x float> } %64, 0
  store <2 x float> %69, ptr %68, align 4
  %70 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %67, i32 0, i32 1
  %71 = extractvalue { <2 x float>, <2 x float> } %64, 1
  store <2 x float> %71, ptr %70, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %72 = getelementptr inbounds %"class.apollonia::RevoluteJoint", ptr %19, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9apollonia4Body8centroidEv(ptr noundef nonnull align 8 dereferenceable(88) %74)
          to label %76 unwind label %101

76:                                               ; preds = %65
  %77 = invoke <2 x float> @_ZNK9apollonia4Body12LocalToWorldERKNS_4Vec2E(ptr noundef nonnull align 8 dereferenceable(88) %73, ptr noundef nonnull align 4 dereferenceable(8) %75)
          to label %78 unwind label %101

78:                                               ; preds = %76
  store <2 x float> %77, ptr %18, align 4
  %79 = invoke <2 x float> @_ZN9apolloniamiERKNS_4Vec2ES2_(ptr noundef nonnull align 4 dereferenceable(8) %72, ptr noundef nonnull align 4 dereferenceable(8) %18)
          to label %80 unwind label %101

80:                                               ; preds = %78
  store <2 x float> %79, ptr %17, align 4
  %81 = invoke <2 x float> @_ZN9apolloniamlERKNS_5Mat22ERKNS_4Vec2E(ptr noundef nonnull align 4 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(8) %17)
          to label %82 unwind label %101

82:                                               ; preds = %80
  store <2 x float> %81, ptr %15, align 4
  %83 = getelementptr inbounds %"class.apollonia::RevoluteJoint", ptr %19, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %83, ptr align 4 %15, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  ret void

84:                                               ; preds = %35, %33, %31, %29, %27, %25, %4
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %9, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %10, align 4
  br label %106

88:                                               ; preds = %40, %37
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %9, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %10, align 4
  br label %96

92:                                               ; preds = %57, %55, %53, %42
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %9, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %96

96:                                               ; preds = %92, %88
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %106

97:                                               ; preds = %63, %59
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %9, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %10, align 4
  br label %105

101:                                              ; preds = %80, %78, %76, %65
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %9, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %105

105:                                              ; preds = %101, %97
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %106

106:                                              ; preds = %105, %96, %84
  call void @_ZN9apollonia5JointD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #6
  br label %107

107:                                              ; preds = %106
  %108 = load ptr, ptr %9, align 8
  %109 = load i32, ptr %10, align 4
  %110 = insertvalue { ptr, i32 } poison, ptr %108, 0
  %111 = insertvalue { ptr, i32 } %110, i32 %109, 1
  resume { ptr, i32 } %111
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9apollonia5JointC2ERNS_4BodyES2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #1 align 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) #2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9apollonia4Body8rotationEv(ptr noundef nonnull align 8 dereferenceable(88)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZNK9apollonia5Mat229TransposeEv(ptr noundef nonnull align 4 dereferenceable(16)) #3 align 2

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

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

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

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

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

attributes #0 = { 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 #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 nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{i64 0, i64 4, !12, i64 4, i64 4, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !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.apollonia::Mat22" = type { %"struct.std::array" }
%"struct.std::array" = type { [2 x %"struct.apollonia::Vec2"] }
%"struct.apollonia::Vec2" = type { float, float }

@_ZTVN9apollonia13RevoluteJointE = external dso_local unnamed_addr constant { [6 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9apollonia13RevoluteJointC2ERNS_4BodyES2_RKNS_4Vec2E(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef nonnull align 8 dereferenceable(88) %1, ptr noundef nonnull align 8 dereferenceable(88) %2, ptr nocapture noundef nonnull readonly align 4 dereferenceable(8) %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.apollonia::Mat22", align 8
  %6 = alloca %"struct.apollonia::Vec2", align 8
  %7 = alloca %"struct.apollonia::Vec2", align 8
  %8 = alloca %"struct.apollonia::Mat22", align 8
  %9 = alloca %"struct.apollonia::Vec2", align 8
  %10 = alloca %"struct.apollonia::Vec2", align 8
  tail call void @_ZN9apollonia5JointC2ERNS_4BodyES2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(88) %1, ptr noundef nonnull align 8 dereferenceable(88) %2)
  store ptr getelementptr inbounds inrange(-16, 32) (i8, ptr @_ZTVN9apollonia13RevoluteJointE, i64 16), ptr %0, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 24
  %12 = load i64, ptr %3, align 4
  store i64 %12, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @_ZN9apollonia4Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %13)
  %14 = getelementptr inbounds i8, ptr %0, i64 40
  tail call void @_ZN9apollonia4Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %14)
  %15 = getelementptr inbounds i8, ptr %0, i64 48
  tail call void @_ZN9apollonia4Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %15)
  %16 = getelementptr inbounds i8, ptr %0, i64 56
  tail call void @_ZN9apollonia4Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %16)
  %17 = getelementptr inbounds i8, ptr %0, i64 64
  invoke void @_ZN9apollonia5Mat22C2Ev(ptr noundef nonnull align 4 dereferenceable(16) %17)
          to label %18 unwind label %47

18:                                               ; preds = %4
  %19 = getelementptr inbounds i8, ptr %0, i64 80
  tail call void @_ZN9apollonia4Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %19)
  %20 = getelementptr inbounds i8, ptr %0, i64 88
  tail call void @_ZN9apollonia4Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %20)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %21 = tail call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9apollonia4Body8rotationEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  %22 = invoke { <2 x float>, <2 x float> } @_ZNK9apollonia5Mat229TransposeEv(ptr noundef nonnull align 4 dereferenceable(16) %21)
          to label %23 unwind label %49

23:                                               ; preds = %18
  %24 = extractvalue { <2 x float>, <2 x float> } %22, 0
  store <2 x float> %24, ptr %5, align 8
  %25 = getelementptr inbounds i8, ptr %5, i64 8
  %26 = extractvalue { <2 x float>, <2 x float> } %22, 1
  store <2 x float> %26, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %27 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9apollonia4Body8centroidEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  %28 = invoke <2 x float> @_ZNK9apollonia4Body12LocalToWorldERKNS_4Vec2E(ptr noundef nonnull align 8 dereferenceable(88) %1, ptr noundef nonnull align 4 dereferenceable(8) %27)
          to label %29 unwind label %51

29:                                               ; preds = %23
  store <2 x float> %28, ptr %7, align 8
  %30 = invoke <2 x float> @_ZN9apolloniamiERKNS_4Vec2ES2_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(8) %7)
          to label %31 unwind label %51

31:                                               ; preds = %29
  store <2 x float> %30, ptr %6, align 8
  %32 = invoke <2 x float> @_ZN9apolloniamlERKNS_5Mat22ERKNS_4Vec2E(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(8) %6)
          to label %33 unwind label %51

33:                                               ; preds = %31
  store <2 x float> %32, ptr %13, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  %34 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9apollonia4Body8rotationEv(ptr noundef nonnull align 8 dereferenceable(88) %2)
  %35 = invoke { <2 x float>, <2 x float> } @_ZNK9apollonia5Mat229TransposeEv(ptr noundef nonnull align 4 dereferenceable(16) %34)
          to label %36 unwind label %54

36:                                               ; preds = %33
  %37 = extractvalue { <2 x float>, <2 x float> } %35, 0
  store <2 x float> %37, ptr %8, align 8
  %38 = getelementptr inbounds i8, ptr %8, i64 8
  %39 = extractvalue { <2 x float>, <2 x float> } %35, 1
  store <2 x float> %39, ptr %38, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %40 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9apollonia4Body8centroidEv(ptr noundef nonnull align 8 dereferenceable(88) %2)
  %41 = invoke <2 x float> @_ZNK9apollonia4Body12LocalToWorldERKNS_4Vec2E(ptr noundef nonnull align 8 dereferenceable(88) %2, ptr noundef nonnull align 4 dereferenceable(8) %40)
          to label %42 unwind label %56

42:                                               ; preds = %36
  store <2 x float> %41, ptr %10, align 8
  %43 = invoke <2 x float> @_ZN9apolloniamiERKNS_4Vec2ES2_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(8) %10)
          to label %44 unwind label %56

44:                                               ; preds = %42
  store <2 x float> %43, ptr %9, align 8
  %45 = invoke <2 x float> @_ZN9apolloniamlERKNS_5Mat22ERKNS_4Vec2E(ptr noundef nonnull align 4 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(8) %9)
          to label %46 unwind label %56

46:                                               ; preds = %44
  store <2 x float> %45, ptr %14, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  ret void

47:                                               ; preds = %4
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %59

49:                                               ; preds = %18
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %53

51:                                               ; preds = %31, %29, %23
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %53

53:                                               ; preds = %51, %49
  %.pn = phi { ptr, i32 } [ %52, %51 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %59

54:                                               ; preds = %33
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %58

56:                                               ; preds = %44, %42, %36
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %58

58:                                               ; preds = %56, %54
  %.pn16 = phi { ptr, i32 } [ %57, %56 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  br label %59

59:                                               ; preds = %58, %53, %47
  %.pn16.pn = phi { ptr, i32 } [ %.pn16, %58 ], [ %.pn, %53 ], [ %48, %47 ]
  call void @_ZN9apollonia5JointD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  resume { ptr, i32 } %.pn16.pn
}

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9apollonia4Body8rotationEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZNK9apollonia5Mat229TransposeEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZN9apolloniamiERKNS_4Vec2ES2_(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 <2 x float> @_ZNK9apollonia4Body12LocalToWorldERKNS_4Vec2E(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9apollonia4Body8centroidEv(ptr noundef nonnull align 8 dereferenceable(88)) 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) #3

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

attributes #0 = { 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 #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 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


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