; LLVM IR from SOHNE/Dura2D :: src/kinetics/d2Body.ll (ZN6d2BodyC2ERK7d2ShapefffP7d2World)

; 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.d2Transform = type { %struct.d2Vec2, %struct.d2Rot }
%struct.d2Vec2 = type { float, float }
%struct.d2Rot = type { float, float }
%class.d2Body = type <{ i16, [2 x i8], i32, %struct.d2Transform, %struct.d2Vec2, %struct.d2Vec2, float, float, float, %struct.d2Vec2, float, float, float, float, float, float, float, ptr, ptr, ptr, ptr, ptr, float, [4 x i8] }>

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6d2BodyC2ERK7d2ShapefffP7d2World(ptr noundef nonnull align 8 dereferenceable(132) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, float noundef %2, float noundef %3, float noundef %4, ptr noundef %5) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %struct.d2Transform, align 4
  %14 = alloca %struct.d2Vec2, align 4
  %15 = alloca %struct.d2Rot, align 4
  %16 = alloca %struct.d2Vec2, align 4
  %17 = alloca %struct.d2Vec2, align 4
  %18 = alloca %struct.d2Vec2, align 4
  %19 = alloca float, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store float %2, ptr %9, align 4, !tbaa !9
  store float %3, ptr %10, align 4, !tbaa !9
  store float %4, ptr %11, align 4, !tbaa !9
  store ptr %5, ptr %12, align 8, !tbaa !5
  %22 = load ptr, ptr %7, align 8
  %23 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 0
  store i16 0, ptr %23, align 8, !tbaa !11
  %24 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 2
  store i32 0, ptr %24, align 4, !tbaa !18
  %25 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 3
  call void @_ZN11d2TransformC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %25)
  %26 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 4
  call void @_ZN6d2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %26)
  %27 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 5
  call void @_ZN6d2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %27)
  %28 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 6
  store float 1.000000e+00, ptr %28, align 8, !tbaa !19
  %29 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 7
  store float 0.000000e+00, ptr %29, align 4, !tbaa !20
  %30 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 8
  store float 0.000000e+00, ptr %30, align 8, !tbaa !21
  %31 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 9
  call void @_ZN6d2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %31)
  %32 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 10
  store float 0.000000e+00, ptr %32, align 4, !tbaa !22
  %33 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 11
  store float 0.000000e+00, ptr %33, align 8, !tbaa !23
  %34 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 12
  store float 0.000000e+00, ptr %34, align 4, !tbaa !24
  %35 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 13
  store float 0.000000e+00, ptr %35, align 8, !tbaa !25
  %36 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 14
  store float 0.000000e+00, ptr %36, align 4, !tbaa !26
  %37 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 15
  store float 0.000000e+00, ptr %37, align 8, !tbaa !27
  %38 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 16
  store float 0.000000e+00, ptr %38, align 4, !tbaa !28
  %39 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 17
  store ptr null, ptr %39, align 8, !tbaa !29
  %40 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 18
  store ptr null, ptr %40, align 8, !tbaa !30
  %41 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 19
  %42 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %42, ptr %41, align 8, !tbaa !31
  %43 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 20
  store ptr null, ptr %43, align 8, !tbaa !32
  %44 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 21
  store ptr null, ptr %44, align 8, !tbaa !33
  %45 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 22
  store float 0.000000e+00, ptr %45, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %46 = load float, ptr %9, align 4, !tbaa !9
  %47 = load float, ptr %10, align 4, !tbaa !9
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %14, float noundef %46, float noundef %47)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  call void @_ZN5d2RotC2Ef(ptr noundef nonnull align 4 dereferenceable(8) %15, float noundef 0.000000e+00)
  call void @_ZN11d2TransformC2ERK6d2Vec2RK5d2Rot(ptr noundef nonnull align 4 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(8) %15)
  %48 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 3
  %49 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN11d2TransformaSEOS_(ptr noundef nonnull align 4 dereferenceable(16) %48, ptr noundef nonnull align 4 dereferenceable(16) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %16, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %50 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 4
  %51 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2aSERKS_(ptr noundef nonnull align 4 dereferenceable(8) %50, ptr noundef nonnull align 4 dereferenceable(8) %16)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %17, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %52 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 5
  %53 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2aSERKS_(ptr noundef nonnull align 4 dereferenceable(8) %52, ptr noundef nonnull align 4 dereferenceable(8) %17)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  %54 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 7
  store float 0.000000e+00, ptr %54, align 4, !tbaa !20
  %55 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 8
  store float 0.000000e+00, ptr %55, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %18, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %56 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 9
  %57 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2aSERKS_(ptr noundef nonnull align 4 dereferenceable(8) %56, ptr noundef nonnull align 4 dereferenceable(8) %18)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  %58 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 10
  store float 0.000000e+00, ptr %58, align 4, !tbaa !22
  %59 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 15
  store float 0x3FE3333340000000, ptr %59, align 8, !tbaa !27
  %60 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 16
  store float 0x3FE6666660000000, ptr %60, align 4, !tbaa !28
  %61 = load float, ptr %11, align 4, !tbaa !9
  %62 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 11
  store float %61, ptr %62, align 8, !tbaa !23
  %63 = load float, ptr %11, align 4, !tbaa !9
  %64 = fcmp une float %63, 0.000000e+00
  br i1 %64, label %65, label %68

65:                                               ; preds = %6
  %66 = load float, ptr %11, align 4, !tbaa !9
  %67 = fdiv float 1.000000e+00, %66
  br label %69

68:                                               ; preds = %6
  br label %69

69:                                               ; preds = %68, %65
  %70 = phi float [ %67, %65 ], [ 0.000000e+00, %68 ]
  %71 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 12
  store float %70, ptr %71, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  store float 0x3F747AE140000000, ptr %19, align 4, !tbaa !9
  %72 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 12
  %73 = load float, ptr %72, align 4, !tbaa !24
  %74 = fpext float %73 to double
  %75 = fsub double %74, 0.000000e+00
  %76 = fcmp ogt double %75, 0.000000e+00
  br i1 %76, label %77, label %82

77:                                               ; preds = %69
  %78 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 12
  %79 = load float, ptr %78, align 4, !tbaa !24
  %80 = fpext float %79 to double
  %81 = fsub double %80, 0.000000e+00
  br label %88

82:                                               ; preds = %69
  %83 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 12
  %84 = load float, ptr %83, align 4, !tbaa !24
  %85 = fpext float %84 to double
  %86 = fsub double %85, 0.000000e+00
  %87 = fneg double %86
  br label %88

88:                                               ; preds = %82, %77
  %89 = phi double [ %81, %77 ], [ %87, %82 ]
  %90 = fcmp olt double %89, 0x3F747AE140000000
  br i1 %90, label %91, label %93

91:                                               ; preds = %88
  %92 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 2
  store i32 0, ptr %92, align 4, !tbaa !18
  br label %95

93:                                               ; preds = %88
  %94 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 2
  store i32 1, ptr %94, align 4, !tbaa !18
  br label %95

95:                                               ; preds = %93, %91
  %96 = phi ptr [ %92, %91 ], [ %94, %93 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = load ptr, ptr %97, align 8, !tbaa !35
  %99 = getelementptr inbounds ptr, ptr %98, i64 5
  %100 = load ptr, ptr %99, align 8
  %101 = call noundef float %100(ptr noundef nonnull align 8 dereferenceable(8) %97)
  %102 = load float, ptr %11, align 4, !tbaa !9
  %103 = fmul float %101, %102
  %104 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 13
  store float %103, ptr %104, align 8, !tbaa !25
  %105 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 13
  %106 = load float, ptr %105, align 8, !tbaa !25
  %107 = fcmp une float %106, 0.000000e+00
  br i1 %107, label %108, label %112

108:                                              ; preds = %95
  %109 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 13
  %110 = load float, ptr %109, align 8, !tbaa !25
  %111 = fdiv float 1.000000e+00, %110
  br label %113

112:                                              ; preds = %95
  br label %113

113:                                              ; preds = %112, %108
  %114 = phi float [ %111, %108 ], [ 0.000000e+00, %112 ]
  %115 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 14
  store float %114, ptr %115, align 4, !tbaa !26
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = load ptr, ptr %116, align 8, !tbaa !35
  %118 = getelementptr inbounds ptr, ptr %117, i64 3
  %119 = load ptr, ptr %118, align 8
  %120 = call noundef ptr %119(ptr noundef nonnull align 8 dereferenceable(8) %116)
  %121 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 18
  store ptr %120, ptr %121, align 8, !tbaa !30
  %122 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 18
  %123 = load ptr, ptr %122, align 8, !tbaa !30
  %124 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 3
  %125 = load ptr, ptr %123, align 8, !tbaa !35
  %126 = getelementptr inbounds ptr, ptr %125, i64 4
  %127 = load ptr, ptr %126, align 8
  call void %127(ptr noundef nonnull align 8 dereferenceable(8) %123, ptr noundef nonnull align 4 dereferenceable(16) %124)
  %128 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 0
  store i16 1, ptr %128, align 8, !tbaa !11
  %129 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 22
  store float 0.000000e+00, ptr %129, align 8, !tbaa !34
  %130 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 32) #10
  call void @llvm.memset.p0.i64(ptr align 16 %130, i8 0, i64 32, i1 false)
  invoke void @_ZN6d2AABBC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %130)
          to label %131 unwind label %133

131:                                              ; preds = %113
  %132 = getelementptr inbounds %class.d2Body, ptr %22, i32 0, i32 17
  store ptr %130, ptr %132, align 8, !tbaa !29
  call void @_ZN6d2Body11ComputeAABBEv(ptr noundef nonnull align 8 dereferenceable(132) %22)
  ret void

133:                                              ; preds = %113
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %20, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %21, align 4
  call void @_ZdlPvm(ptr noundef %130, i64 noundef 32) #11
  br label %137

137:                                              ; preds = %133
  %138 = load ptr, ptr %20, align 8
  %139 = load i32, ptr %21, align 4
  %140 = insertvalue { ptr, i32 } poison, ptr %138, 0
  %141 = insertvalue { ptr, i32 } %140, i32 %139, 1
  resume { ptr, i32 } %141
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZN11d2TransformaSEOS_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) #3 align 2

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

declare noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2aSERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #4

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6d2AABBC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6d2Body11ComputeAABBEv(ptr noundef nonnull align 8 dereferenceable(132)) #8 align 2

attributes #0 = { 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 = { 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 #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 = { nobuiltin allocsize(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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { builtin 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 = !{!"float", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS6d2Body", !13, i64 0, !14, i64 4, !15, i64 8, !16, i64 24, !16, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !16, i64 52, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !10, i64 128}
!13 = !{!"short", !7, i64 0}
!14 = !{!"_ZTS10d2BodyType", !7, i64 0}
!15 = !{!"_ZTS11d2Transform", !16, i64 0, !17, i64 8}
!16 = !{!"_ZTS6d2Vec2", !10, i64 0, !10, i64 4}
!17 = !{!"_ZTS5d2Rot", !10, i64 0, !10, i64 4}
!18 = !{!12, !14, i64 4}
!19 = !{!12, !10, i64 40}
!20 = !{!12, !10, i64 44}
!21 = !{!12, !10, i64 48}
!22 = !{!12, !10, i64 60}
!23 = !{!12, !10, i64 64}
!24 = !{!12, !10, i64 68}
!25 = !{!12, !10, i64 72}
!26 = !{!12, !10, i64 76}
!27 = !{!12, !10, i64 80}
!28 = !{!12, !10, i64 84}
!29 = !{!12, !6, i64 88}
!30 = !{!12, !6, i64 96}
!31 = !{!12, !6, i64 104}
!32 = !{!12, !6, i64 112}
!33 = !{!12, !6, i64 120}
!34 = !{!12, !10, i64 128}
!35 = !{!36, !36, i64 0}
!36 = !{!"vtable pointer", !8, 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.d2Transform = type { %struct.d2Vec2, %struct.d2Rot }
%struct.d2Vec2 = type { float, float }
%struct.d2Rot = type { float, float }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6d2BodyC2ERK7d2ShapefffP7d2World(ptr noundef nonnull align 8 dereferenceable(132) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, float noundef %2, float noundef %3, float noundef %4, ptr noundef %5) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %struct.d2Transform, align 4
  %8 = alloca %struct.d2Vec2, align 4
  %9 = alloca %struct.d2Rot, align 4
  %10 = alloca %struct.d2Vec2, align 4
  %11 = alloca %struct.d2Vec2, align 4
  %12 = alloca %struct.d2Vec2, align 4
  store i16 0, ptr %0, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 0, ptr %13, align 4, !tbaa !16
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZN11d2TransformC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %14)
  %15 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @_ZN6d2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %15)
  %16 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @_ZN6d2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %16)
  %17 = getelementptr inbounds i8, ptr %0, i64 40
  %18 = getelementptr inbounds i8, ptr %0, i64 44
  store <2 x float> <float 1.000000e+00, float 0.000000e+00>, ptr %17, align 8, !tbaa !17
  %19 = getelementptr inbounds i8, ptr %0, i64 48
  store float 0.000000e+00, ptr %19, align 8, !tbaa !18
  %20 = getelementptr inbounds i8, ptr %0, i64 52
  tail call void @_ZN6d2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %20)
  %21 = getelementptr inbounds i8, ptr %0, i64 60
  %22 = getelementptr inbounds i8, ptr %0, i64 64
  %23 = getelementptr inbounds i8, ptr %0, i64 68
  %24 = getelementptr inbounds i8, ptr %0, i64 72
  %25 = getelementptr inbounds i8, ptr %0, i64 76
  %26 = getelementptr inbounds i8, ptr %0, i64 80
  %27 = getelementptr inbounds i8, ptr %0, i64 96
  %28 = getelementptr inbounds i8, ptr %0, i64 104
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(44) %21, i8 0, i64 44, i1 false)
  store ptr %5, ptr %28, align 8, !tbaa !19
  %29 = getelementptr inbounds i8, ptr %0, i64 112
  %30 = getelementptr inbounds i8, ptr %0, i64 128
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %29, i8 0, i64 20, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %8, float noundef %2, float noundef %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  call void @_ZN5d2RotC2Ef(ptr noundef nonnull align 4 dereferenceable(8) %9, float noundef 0.000000e+00)
  call void @_ZN11d2TransformC2ERK6d2Vec2RK5d2Rot(ptr noundef nonnull align 4 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %9)
  %31 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN11d2TransformaSEOS_(ptr noundef nonnull align 4 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #9
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %10, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %32 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2aSERKS_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %11, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %33 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2aSERKS_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  store <2 x float> zeroinitializer, ptr %18, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %12, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %34 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2aSERKS_(ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  store float 0.000000e+00, ptr %21, align 4, !tbaa !20
  store <2 x float> <float 0x3FE3333340000000, float 0x3FE6666660000000>, ptr %26, align 8, !tbaa !17
  store float %4, ptr %22, align 8, !tbaa !21
  %35 = fcmp une float %4, 0.000000e+00
  %36 = fdiv float 1.000000e+00, %4
  %37 = select i1 %35, float %36, float 0.000000e+00
  store float %37, ptr %23, align 4, !tbaa !22
  %38 = fpext float %37 to double
  %39 = fcmp ogt float %37, 0.000000e+00
  %40 = fneg double %38
  %41 = select i1 %39, double %38, double %40
  %42 = fcmp uge double %41, 0x3F747AE140000000
  %storemerge = zext i1 %42 to i32
  store i32 %storemerge, ptr %13, align 4, !tbaa !16
  %43 = load ptr, ptr %1, align 8, !tbaa !23
  %44 = getelementptr inbounds i8, ptr %43, i64 40
  %45 = load ptr, ptr %44, align 8
  %46 = call noundef float %45(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %47 = fmul float %46, %4
  store float %47, ptr %24, align 8, !tbaa !25
  %48 = fcmp une float %47, 0.000000e+00
  %49 = fdiv float 1.000000e+00, %47
  %50 = select i1 %48, float %49, float 0.000000e+00
  store float %50, ptr %25, align 4, !tbaa !26
  %51 = load ptr, ptr %1, align 8, !tbaa !23
  %52 = getelementptr inbounds i8, ptr %51, i64 24
  %53 = load ptr, ptr %52, align 8
  %54 = call noundef ptr %53(ptr noundef nonnull align 8 dereferenceable(8) %1)
  store ptr %54, ptr %27, align 8, !tbaa !27
  %55 = load ptr, ptr %54, align 8, !tbaa !23
  %56 = getelementptr inbounds i8, ptr %55, i64 32
  %57 = load ptr, ptr %56, align 8
  call void %57(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull align 4 dereferenceable(16) %14)
  store i16 1, ptr %0, align 8, !tbaa !5
  store float 0.000000e+00, ptr %30, align 8, !tbaa !28
  %58 = call noalias noundef nonnull dereferenceable(32) ptr @_Znwm(i64 noundef 32) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %58, i8 0, i64 32, i1 false)
  invoke void @_ZN6d2AABBC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %58)
          to label %59 unwind label %61

59:                                               ; preds = %6
  %60 = getelementptr inbounds i8, ptr %0, i64 88
  store ptr %58, ptr %60, align 8, !tbaa !29
  call void @_ZN6d2Body11ComputeAABBEv(ptr noundef nonnull align 8 dereferenceable(132) %0)
  ret void

61:                                               ; preds = %6
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %58, i64 noundef 32) #11
  resume { ptr, i32 } %62
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZN11d2TransformaSEOS_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #3 align 2

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

declare noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2aSERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6d2AABBC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6d2Body11ComputeAABBEv(ptr noundef nonnull align 8 dereferenceable(132)) local_unnamed_addr #8 align 2

attributes #0 = { 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 = { 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 #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 = { nobuiltin allocsize(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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { builtin 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, !7, i64 0}
!6 = !{!"_ZTS6d2Body", !7, i64 0, !10, i64 4, !11, i64 8, !12, i64 24, !12, i64 32, !13, i64 40, !13, i64 44, !13, i64 48, !12, i64 52, !13, i64 60, !13, i64 64, !13, i64 68, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84, !15, i64 88, !15, i64 96, !15, i64 104, !15, i64 112, !15, i64 120, !13, i64 128}
!7 = !{!"short", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS10d2BodyType", !8, i64 0}
!11 = !{!"_ZTS11d2Transform", !12, i64 0, !14, i64 8}
!12 = !{!"_ZTS6d2Vec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !8, i64 0}
!14 = !{!"_ZTS5d2Rot", !13, i64 0, !13, i64 4}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!6, !10, i64 4}
!17 = !{!13, !13, i64 0}
!18 = !{!6, !13, i64 48}
!19 = !{!6, !15, i64 104}
!20 = !{!6, !13, i64 60}
!21 = !{!6, !13, i64 64}
!22 = !{!6, !13, i64 68}
!23 = !{!24, !24, i64 0}
!24 = !{!"vtable pointer", !9, i64 0}
!25 = !{!6, !13, i64 72}
!26 = !{!6, !13, i64 76}
!27 = !{!6, !15, i64 96}
!28 = !{!6, !13, i64 128}
!29 = !{!6, !15, i64 88}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass