; LLVM IR from achilles288/robot-monitor-graphics :: src/base/particle.ll (ZN3rmg10Particle3DC2EPNS_7ContextEPKcRKNS_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"

%"class.rmg::internal::Pending" = type { ptr, ptr }
%"struct.rmg::Vec3" = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { float, float, float }
%"class.rmg::Particle3D" = type <{ %"class.rmg::Object", ptr, ptr, %"class.rmg::internal::Pending", %"struct.rmg::Vec3", %"struct.rmg::Vec2", float, %"struct.rmg::Mat3", [4 x i8] }>
%"class.rmg::Object" = type { ptr, i64, ptr, %"struct.rmg::ColorRGBA", i8, i32 }
%"struct.rmg::ColorRGBA" = type { float, float, float, float }
%"struct.rmg::Vec2" = type { %union.anon.0 }
%union.anon.0 = type { %struct.anon.1 }
%struct.anon.1 = type { float, float }
%"struct.rmg::Mat3" = type { %union.anon.2 }
%union.anon.2 = type { [3 x [3 x float]] }

@_ZTVN3rmg10Particle3DE = external dso_local unnamed_addr constant { [4 x ptr] }, align 8

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

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

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN3rmg4Mat3C1Ev(ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3rmg4Vec3C2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) 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) #4

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

; Function Attrs: nounwind
declare void @_ZN3rmg8internal7PendingD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3rmg10Particle3DC2EPNS_7ContextEPKcRKNS_4Vec2E(ptr noundef nonnull align 8 dereferenceable(140) %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull align 4 dereferenceable(8) %3) unnamed_addr #6 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 ptr, align 8
  %12 = alloca %"class.rmg::internal::Pending", align 8
  %13 = alloca %"struct.rmg::Vec3", 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
  %14 = load ptr, ptr %5, align 8
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3rmg6ObjectC2EPNS_7ContextE(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef %15)
  store ptr getelementptr inbounds inrange(-16, 16) ({ [4 x ptr] }, ptr @_ZTVN3rmg10Particle3DE, i32 0, i32 0, i32 2), ptr %14, align 8, !tbaa !9
  %16 = getelementptr inbounds %"class.rmg::Particle3D", ptr %14, i32 0, i32 1
  store ptr null, ptr %16, align 8, !tbaa !11
  %17 = getelementptr inbounds %"class.rmg::Particle3D", ptr %14, i32 0, i32 2
  store ptr null, ptr %17, align 8, !tbaa !23
  %18 = getelementptr inbounds %"class.rmg::Particle3D", ptr %14, i32 0, i32 3
  call void @_ZN3rmg8internal7PendingC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #9
  %19 = getelementptr inbounds %"class.rmg::Particle3D", ptr %14, i32 0, i32 4
  invoke void @_ZN3rmg4Vec3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %19)
          to label %20 unwind label %50

20:                                               ; preds = %4
  %21 = getelementptr inbounds %"class.rmg::Particle3D", ptr %14, i32 0, i32 5
  invoke void @_ZN3rmg4Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %21)
          to label %22 unwind label %50

22:                                               ; preds = %20
  %23 = getelementptr inbounds %"class.rmg::Particle3D", ptr %14, i32 0, i32 7
  invoke void @_ZN3rmg4Mat3C1Ev(ptr noundef nonnull align 4 dereferenceable(36) %23)
          to label %24 unwind label %50

24:                                               ; preds = %22
  %25 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #10
          to label %26 unwind label %50

26:                                               ; preds = %24
  invoke void @_ZN3rmg8internal13SpriteTextureC1Ev(ptr noundef nonnull align 8 dereferenceable(12) %25)
          to label %27 unwind label %54

27:                                               ; preds = %26
  %28 = getelementptr inbounds %"class.rmg::Particle3D", ptr %14, i32 0, i32 1
  store ptr %25, ptr %28, align 8, !tbaa !11
  %29 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 4) #10
          to label %30 unwind label %50

30:                                               ; preds = %27
  %31 = getelementptr inbounds %"class.rmg::Particle3D", ptr %14, i32 0, i32 2
  store ptr %29, ptr %31, align 8, !tbaa !23
  %32 = getelementptr inbounds %"class.rmg::Particle3D", ptr %14, i32 0, i32 2
  %33 = load ptr, ptr %32, align 8, !tbaa !23
  store i32 1, ptr %33, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %34 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #10
          to label %35 unwind label %58

35:                                               ; preds = %30
  %36 = getelementptr inbounds %"class.rmg::Particle3D", ptr %14, i32 0, i32 1
  %37 = load ptr, ptr %36, align 8, !tbaa !11
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN3rmg8internal10SpriteLoadC1EPNS0_13SpriteTextureEPKc(ptr noundef nonnull align 8 dereferenceable(36) %34, ptr noundef %37, ptr noundef %38)
          to label %39 unwind label %62

39:                                               ; preds = %35
  store ptr %34, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #9
  %40 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZN3rmg8internal7PendingC1EPNS0_11ContextLoadE(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef %40)
          to label %41 unwind label %66

41:                                               ; preds = %39
  %42 = getelementptr inbounds %"class.rmg::Particle3D", ptr %14, i32 0, i32 3
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3rmg8internal7PendingaSEOS1_(ptr noundef nonnull align 8 dereferenceable(16) %42, ptr noundef nonnull align 8 dereferenceable(16) %12) #9
  call void @_ZN3rmg8internal7PendingD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #9
  invoke void @_ZN3rmg4Vec3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %13, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %44 unwind label %70

44:                                               ; preds = %41
  %45 = getelementptr inbounds %"class.rmg::Particle3D", ptr %14, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %45, ptr align 4 %13, i64 12, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #9
  %46 = getelementptr inbounds %"class.rmg::Particle3D", ptr %14, i32 0, i32 6
  store float 0.000000e+00, ptr %46, align 4, !tbaa !28
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN3rmg10Particle3D7setSizeERKNS_4Vec2E(ptr noundef nonnull align 8 dereferenceable(140) %14, ptr noundef nonnull align 4 dereferenceable(8) %47)
          to label %48 unwind label %58

48:                                               ; preds = %44
  %49 = getelementptr inbounds %"class.rmg::Object", ptr %14, i32 0, i32 5
  store i32 3, ptr %49, align 4, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  ret void

50:                                               ; preds = %27, %24, %22, %20, %4
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %9, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %10, align 4
  br label %75

54:                                               ; preds = %26
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %9, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %10, align 4
  call void @_ZdlPvm(ptr noundef %25, i64 noundef 16) #11
  br label %75

58:                                               ; preds = %44, %30
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %9, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %10, align 4
  br label %74

62:                                               ; preds = %35
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %9, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %10, align 4
  call void @_ZdlPvm(ptr noundef %34, i64 noundef 40) #11
  br label %74

66:                                               ; preds = %39
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %9, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #9
  br label %74

70:                                               ; preds = %41
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %9, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #9
  br label %74

74:                                               ; preds = %70, %66, %62, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %75

75:                                               ; preds = %74, %54, %50
  call void @_ZN3rmg8internal7PendingD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #9
  call void @_ZN3rmg6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #9
  br label %76

76:                                               ; preds = %75
  %77 = load ptr, ptr %9, align 8
  %78 = load i32, ptr %10, align 4
  %79 = insertvalue { ptr, i32 } poison, ptr %77, 0
  %80 = insertvalue { ptr, i32 } %79, i32 %78, 1
  resume { ptr, i32 } %80
}

declare void @_ZN3rmg6ObjectC2EPNS_7ContextE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef) unnamed_addr #2

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

declare void @_ZN3rmg8internal13SpriteTextureC1Ev(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #2

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

declare void @_ZN3rmg8internal10SpriteLoadC1EPNS0_13SpriteTextureEPKc(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef, ptr noundef) unnamed_addr #2

declare void @_ZN3rmg8internal7PendingC1EPNS0_11ContextLoadE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #2

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZN3rmg8internal7PendingaSEOS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #5

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

attributes #0 = { 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 #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #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 = { 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 #8 = { 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 #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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !6, i64 48}
!12 = !{!"_ZTSN3rmg10Particle3DE", !13, i64 0, !6, i64 48, !6, i64 56, !19, i64 64, !20, i64 80, !21, i64 92, !16, i64 100, !22, i64 104}
!13 = !{!"_ZTSN3rmg6ObjectE", !14, i64 8, !6, i64 16, !15, i64 24, !17, i64 40, !18, i64 44}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSN3rmg9ColorRGBAE", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12}
!16 = !{!"float", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTSN3rmg10ObjectTypeE", !7, i64 0}
!19 = !{!"_ZTSN3rmg8internal7PendingE", !6, i64 0, !6, i64 8}
!20 = !{!"_ZTSN3rmg4Vec3E", !7, i64 0}
!21 = !{!"_ZTSN3rmg4Vec2E", !7, i64 0}
!22 = !{!"_ZTSN3rmg4Mat3E", !7, i64 0}
!23 = !{!12, !6, i64 56}
!24 = !{!25, !25, i64 0}
!25 = !{!"int", !7, i64 0}
!26 = !{i64 0, i64 12, !27}
!27 = !{!7, !7, i64 0}
!28 = !{!12, !16, i64 100}
!29 = !{!13, !18, i64 44}


; 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"

%"class.rmg::internal::Pending" = type { ptr, ptr }
%"struct.rmg::Vec3" = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { float, float, float }

@_ZTVN3rmg10Particle3DE = external dso_local unnamed_addr constant { [4 x ptr] }, align 8

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

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

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN3rmg4Mat3C1Ev(ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #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 nounwind uwtable
declare dso_local void @_ZN3rmg4Vec3C2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #1 align 2

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

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

; Function Attrs: nounwind
declare void @_ZN3rmg8internal7PendingD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3rmg10Particle3DC2EPNS_7ContextEPKcRKNS_4Vec2E(ptr noundef nonnull align 8 dereferenceable(140) %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull align 4 dereferenceable(8) %3) unnamed_addr #6 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.rmg::internal::Pending", align 8
  %6 = alloca %"struct.rmg::Vec3", align 4
  tail call void @_ZN3rmg6ObjectC2EPNS_7ContextE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef %1)
  store ptr getelementptr inbounds inrange(-16, 16) (i8, ptr @_ZTVN3rmg10Particle3DE, i64 16), ptr %0, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 48
  %8 = getelementptr inbounds i8, ptr %0, i64 56
  %9 = getelementptr inbounds i8, ptr %0, i64 64
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, i8 0, i64 16, i1 false)
  tail call void @_ZN3rmg8internal7PendingC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #10
  %10 = getelementptr inbounds i8, ptr %0, i64 80
  tail call void @_ZN3rmg4Vec3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %10)
  %11 = getelementptr inbounds i8, ptr %0, i64 92
  tail call void @_ZN3rmg4Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %11)
  %12 = getelementptr inbounds i8, ptr %0, i64 104
  invoke void @_ZN3rmg4Mat3C1Ev(ptr noundef nonnull align 4 dereferenceable(36) %12)
          to label %13 unwind label %27

13:                                               ; preds = %4
  %14 = invoke noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #11
          to label %15 unwind label %27

15:                                               ; preds = %13
  invoke void @_ZN3rmg8internal13SpriteTextureC1Ev(ptr noundef nonnull align 8 dereferenceable(12) %14)
          to label %16 unwind label %29

16:                                               ; preds = %15
  store ptr %14, ptr %7, align 8, !tbaa !8
  %17 = invoke noalias noundef nonnull dereferenceable(4) ptr @_Znwm(i64 noundef 4) #11
          to label %18 unwind label %27

18:                                               ; preds = %16
  store ptr %17, ptr %8, align 8, !tbaa !22
  store i32 1, ptr %17, align 4, !tbaa !23
  %19 = invoke noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #11
          to label %20 unwind label %31

20:                                               ; preds = %18
  invoke void @_ZN3rmg8internal10SpriteLoadC1EPNS0_13SpriteTextureEPKc(ptr noundef nonnull align 8 dereferenceable(36) %19, ptr noundef nonnull %14, ptr noundef %2)
          to label %21 unwind label %33

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #10
  invoke void @_ZN3rmg8internal7PendingC1EPNS0_11ContextLoadE(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull %19)
          to label %22 unwind label %35

22:                                               ; preds = %21
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3rmg8internal7PendingaSEOS1_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %5) #10
  call void @_ZN3rmg8internal7PendingD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #10
  call void @_ZN3rmg4Vec3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %6, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %6, i64 12, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #10
  %24 = getelementptr inbounds i8, ptr %0, i64 100
  store float 0.000000e+00, ptr %24, align 4, !tbaa !27
  invoke void @_ZN3rmg10Particle3D7setSizeERKNS_4Vec2E(ptr noundef nonnull align 8 dereferenceable(140) %0, ptr noundef nonnull align 4 dereferenceable(8) %3)
          to label %25 unwind label %31

25:                                               ; preds = %22
  %26 = getelementptr inbounds i8, ptr %0, i64 44
  store i32 3, ptr %26, align 4, !tbaa !28
  ret void

27:                                               ; preds = %16, %13, %4
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %37

29:                                               ; preds = %15
  %30 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %14, i64 noundef 16) #12
  br label %37

31:                                               ; preds = %22, %18
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %37

33:                                               ; preds = %20
  %34 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %19, i64 noundef 40) #12
  br label %37

35:                                               ; preds = %21
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #10
  br label %37

37:                                               ; preds = %31, %33, %35, %29, %27
  %.pn.pn = phi { ptr, i32 } [ %28, %27 ], [ %30, %29 ], [ %32, %31 ], [ %36, %35 ], [ %34, %33 ]
  call void @_ZN3rmg8internal7PendingD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #10
  call void @_ZN3rmg6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #10
  resume { ptr, i32 } %.pn.pn
}

declare void @_ZN3rmg6ObjectC2EPNS_7ContextE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef) unnamed_addr #2

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

declare void @_ZN3rmg8internal13SpriteTextureC1Ev(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #2

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

declare void @_ZN3rmg8internal10SpriteLoadC1EPNS0_13SpriteTextureEPKc(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef, ptr noundef) unnamed_addr #2

declare void @_ZN3rmg8internal7PendingC1EPNS0_11ContextLoadE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #2

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZN3rmg8internal7PendingaSEOS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3rmg10Particle3D7setSizeERKNS_4Vec2E(ptr noundef nonnull align 8 dereferenceable(140), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #6 align 2

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

attributes #0 = { 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 #1 = { 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 #2 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #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 = { 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 #8 = { 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 #9 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #10 = { nounwind }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !13, i64 48}
!9 = !{!"_ZTSN3rmg10Particle3DE", !10, i64 0, !13, i64 48, !13, i64 56, !18, i64 64, !19, i64 80, !20, i64 92, !15, i64 100, !21, i64 104}
!10 = !{!"_ZTSN3rmg6ObjectE", !11, i64 8, !13, i64 16, !14, i64 24, !16, i64 40, !17, i64 44}
!11 = !{!"long", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!"any pointer", !12, i64 0}
!14 = !{!"_ZTSN3rmg9ColorRGBAE", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12}
!15 = !{!"float", !12, i64 0}
!16 = !{!"bool", !12, i64 0}
!17 = !{!"_ZTSN3rmg10ObjectTypeE", !12, i64 0}
!18 = !{!"_ZTSN3rmg8internal7PendingE", !13, i64 0, !13, i64 8}
!19 = !{!"_ZTSN3rmg4Vec3E", !12, i64 0}
!20 = !{!"_ZTSN3rmg4Vec2E", !12, i64 0}
!21 = !{!"_ZTSN3rmg4Mat3E", !12, i64 0}
!22 = !{!9, !13, i64 56}
!23 = !{!24, !24, i64 0}
!24 = !{!"int", !12, i64 0}
!25 = !{i64 0, i64 12, !26}
!26 = !{!12, !12, i64 0}
!27 = !{!9, !15, i64 100}
!28 = !{!10, !17, i64 44}


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