; LLVM IR from aap/librw :: src/world.ll (ZN2rw5World8addClumpEPNS_5ClumpE)

; 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.rw::Clump" = type { %"struct.rw::Object", %"struct.rw::LinkList", %"struct.rw::LinkList", %"struct.rw::LinkList", ptr, %"struct.rw::LLLink" }
%"struct.rw::Object" = type { i8, i8, i8, i8, ptr }
%"struct.rw::LinkList" = type { %"struct.rw::LLLink" }
%"struct.rw::LLLink" = type { ptr, ptr }
%"struct.rw::World" = type { %"struct.rw::Object", %"struct.rw::LinkList", %"struct.rw::LinkList", %"struct.rw::LinkList" }
%"struct.rw::Frame" = type { %"struct.rw::Object", %"struct.rw::LLLink", %"struct.rw::LinkList", %"struct.rw::Matrix", %"struct.rw::Matrix", ptr, ptr, ptr }
%"struct.rw::Matrix" = type { %"struct.rw::V3d", i32, %"struct.rw::V3d", i32, %"struct.rw::V3d", i32, %"struct.rw::V3d", i32 }
%"struct.rw::V3d" = type { float, float, float }

@.str.2 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [20 x i8], align 1
@__PRETTY_FUNCTION__._ZN2rw5World8addClumpEPNS_5ClumpE = external hidden unnamed_addr constant [34 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2rw5World8addLightEPNS_5LightE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef) #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

declare void @_ZN2rw5Frame13updateObjectsEv(ptr noundef nonnull align 8 dereferenceable(200)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2rw5World9addCameraEPNS_6CameraE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2rw5World9addAtomicEPNS_6AtomicE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2rw5World8addClumpEPNS_5ClumpE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %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 ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = getelementptr inbounds %"struct.rw::Clump", ptr %12, i32 0, i32 4
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %17

16:                                               ; preds = %2
  br label %19

17:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.2, i32 noundef 103, ptr noundef @__PRETTY_FUNCTION__._ZN2rw5World8addClumpEPNS_5ClumpE) #5
  unreachable

18:                                               ; No predecessors!
  br label %19

19:                                               ; preds = %18, %16
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %"struct.rw::Clump", ptr %20, i32 0, i32 4
  store ptr %11, ptr %21, align 8, !tbaa !9
  %22 = getelementptr inbounds %"struct.rw::World", ptr %11, i32 0, i32 3
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.rw::Clump", ptr %23, i32 0, i32 5
  call void @_ZN2rw8LinkList3addEPNS_6LLLinkE(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef %24)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store ptr null, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.rw::Clump", ptr %25, i32 0, i32 1
  %27 = getelementptr inbounds %"struct.rw::LinkList", ptr %26, i32 0, i32 0
  %28 = getelementptr inbounds %"struct.rw::LLLink", ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !14
  store ptr %29, ptr %6, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %43, %19
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.rw::LLLink", ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !15
  store ptr %33, ptr %5, align 8, !tbaa !5
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.rw::Clump", ptr %35, i32 0, i32 1
  %37 = call noundef ptr @_ZN2rw8LinkList3endEv(ptr noundef nonnull align 8 dereferenceable(16) %36)
  %38 = icmp ne ptr %34, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %45

40:                                               ; preds = %30
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = call noundef ptr @_ZN2rw6Atomic9fromClumpEPNS_6LLLinkE(ptr noundef %41)
  call void @_ZN2rw5World9addAtomicEPNS_6AtomicE(ptr noundef nonnull align 8 dereferenceable(64) %11, ptr noundef %42)
  br label %43

43:                                               ; preds = %40
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %44, ptr %6, align 8, !tbaa !5
  br label %30, !llvm.loop !16

45:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.rw::Clump", ptr %46, i32 0, i32 2
  %48 = getelementptr inbounds %"struct.rw::LinkList", ptr %47, i32 0, i32 0
  %49 = getelementptr inbounds %"struct.rw::LLLink", ptr %48, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8, !tbaa !18
  store ptr %50, ptr %8, align 8, !tbaa !5
  br label %51

51:                                               ; preds = %64, %45
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.rw::LLLink", ptr %52, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8, !tbaa !15
  store ptr %54, ptr %7, align 8, !tbaa !5
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.rw::Clump", ptr %56, i32 0, i32 2
  %58 = call noundef ptr @_ZN2rw8LinkList3endEv(ptr noundef nonnull align 8 dereferenceable(16) %57)
  %59 = icmp ne ptr %55, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %66

61:                                               ; preds = %51
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = call noundef ptr @_ZN2rw5Light9fromClumpEPNS_6LLLinkE(ptr noundef %62)
  call void @_ZN2rw5World8addLightEPNS_5LightE(ptr noundef nonnull align 8 dereferenceable(64) %11, ptr noundef %63)
  br label %64

64:                                               ; preds = %61
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %65, ptr %8, align 8, !tbaa !5
  br label %51, !llvm.loop !19

66:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.rw::Clump", ptr %67, i32 0, i32 3
  %69 = getelementptr inbounds %"struct.rw::LinkList", ptr %68, i32 0, i32 0
  %70 = getelementptr inbounds %"struct.rw::LLLink", ptr %69, i32 0, i32 0
  %71 = load ptr, ptr %70, align 8, !tbaa !20
  store ptr %71, ptr %10, align 8, !tbaa !5
  br label %72

72:                                               ; preds = %85, %66
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.rw::LLLink", ptr %73, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !15
  store ptr %75, ptr %9, align 8, !tbaa !5
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.rw::Clump", ptr %77, i32 0, i32 3
  %79 = call noundef ptr @_ZN2rw8LinkList3endEv(ptr noundef nonnull align 8 dereferenceable(16) %78)
  %80 = icmp ne ptr %76, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %87

82:                                               ; preds = %72
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = call noundef ptr @_ZN2rw6Camera9fromClumpEPNS_6LLLinkE(ptr noundef %83)
  call void @_ZN2rw5World9addCameraEPNS_6CameraE(ptr noundef nonnull align 8 dereferenceable(64) %11, ptr noundef %84)
  br label %85

85:                                               ; preds = %82
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %86, ptr %10, align 8, !tbaa !5
  br label %72, !llvm.loop !21

87:                                               ; preds = %81
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = call noundef ptr @_ZNK2rw5Clump8getFrameEv(ptr noundef nonnull align 8 dereferenceable(88) %88)
  %90 = icmp ne ptr %89, null
  br i1 %90, label %91, label %97

91:                                               ; preds = %87
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = call noundef ptr @_ZNK2rw5Clump8getFrameEv(ptr noundef nonnull align 8 dereferenceable(88) %92)
  %94 = getelementptr inbounds %"struct.rw::Frame", ptr %93, i32 0, i32 3
  call void @_ZN2rw6Matrix8optimizeEPNS0_9ToleranceE(ptr noundef nonnull align 4 dereferenceable(64) %94, ptr noundef null)
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = call noundef ptr @_ZNK2rw5Clump8getFrameEv(ptr noundef nonnull align 8 dereferenceable(88) %95)
  call void @_ZN2rw5Frame13updateObjectsEv(ptr noundef nonnull align 8 dereferenceable(200) %96)
  br label %97

97:                                               ; preds = %91, %87
  ret void
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw6Atomic9fromClumpEPNS_6LLLinkE(ptr noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw5Light9fromClumpEPNS_6LLLinkE(ptr noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw6Camera9fromClumpEPNS_6LLLinkE(ptr noundef) #4 align 2

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

declare void @_ZN2rw6Matrix8optimizeEPNS0_9ToleranceE(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { noreturn 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 #3 = { "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 = { 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 #5 = { noreturn nounwind }
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, !6, i64 64}
!10 = !{!"_ZTSN2rw5ClumpE", !11, i64 0, !12, i64 16, !12, i64 32, !12, i64 48, !6, i64 64, !13, i64 72}
!11 = !{!"_ZTSN2rw6ObjectE", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !6, i64 8}
!12 = !{!"_ZTSN2rw8LinkListE", !13, i64 0}
!13 = !{!"_ZTSN2rw6LLLinkE", !6, i64 0, !6, i64 8}
!14 = !{!10, !6, i64 16}
!15 = !{!13, !6, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!10, !6, i64 32}
!19 = distinct !{!19, !17}
!20 = !{!10, !6, i64 48}
!21 = distinct !{!21, !17}


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

@.str.2 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [20 x i8], align 1
@__PRETTY_FUNCTION__._ZN2rw5World8addClumpEPNS_5ClumpE = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2rw5World8addLightEPNS_5LightE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN2rw5Frame13updateObjectsEv(ptr noundef nonnull align 8 dereferenceable(200)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2rw5World9addCameraEPNS_6CameraE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2rw5World9addAtomicEPNS_6AtomicE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2rw5World8addClumpEPNS_5ClumpE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %1) local_unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %1, i64 64
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = icmp eq ptr %4, null
  br i1 %5, label %7, label %6

6:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.2, i32 noundef 103, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN2rw5World8addClumpEPNS_5ClumpE) #4
  unreachable

7:                                                ; preds = %2
  store ptr %0, ptr %3, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 48
  %9 = getelementptr inbounds i8, ptr %1, i64 72
  tail call void @_ZN2rw8LinkList3addEPNS_6LLLinkE(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull %9)
  %10 = getelementptr inbounds i8, ptr %1, i64 16
  %11 = load ptr, ptr %10, align 8, !tbaa !13
  %12 = load ptr, ptr %11, align 8, !tbaa !14
  %13 = tail call noundef ptr @_ZN2rw8LinkList3endEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  %.not30 = icmp eq ptr %11, %13
  br i1 %.not30, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %7
  %14 = getelementptr inbounds i8, ptr %1, i64 32
  %15 = load ptr, ptr %14, align 8, !tbaa !15
  %16 = load ptr, ptr %15, align 8, !tbaa !14
  %17 = tail call noundef ptr @_ZN2rw8LinkList3endEv(ptr noundef nonnull align 8 dereferenceable(16) %14)
  %.not2732 = icmp eq ptr %15, %17
  br i1 %.not2732, label %._crit_edge36, label %.lr.ph35

.lr.ph:                                           ; preds = %7, %.lr.ph
  %18 = phi ptr [ %20, %.lr.ph ], [ %12, %7 ]
  %.02631 = phi ptr [ %18, %.lr.ph ], [ %11, %7 ]
  %19 = tail call noundef ptr @_ZN2rw6Atomic9fromClumpEPNS_6LLLinkE(ptr noundef nonnull %.02631)
  tail call void @_ZN2rw5World9addAtomicEPNS_6AtomicE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %19)
  %20 = load ptr, ptr %18, align 8, !tbaa !14
  %21 = tail call noundef ptr @_ZN2rw8LinkList3endEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  %.not = icmp eq ptr %18, %21
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !16

._crit_edge36:                                    ; preds = %.lr.ph35, %._crit_edge
  %22 = getelementptr inbounds i8, ptr %1, i64 48
  %23 = load ptr, ptr %22, align 8, !tbaa !18
  %24 = load ptr, ptr %23, align 8, !tbaa !14
  %25 = tail call noundef ptr @_ZN2rw8LinkList3endEv(ptr noundef nonnull align 8 dereferenceable(16) %22)
  %.not2837 = icmp eq ptr %23, %25
  br i1 %.not2837, label %._crit_edge41, label %.lr.ph40

.lr.ph35:                                         ; preds = %._crit_edge, %.lr.ph35
  %26 = phi ptr [ %28, %.lr.ph35 ], [ %16, %._crit_edge ]
  %.02533 = phi ptr [ %26, %.lr.ph35 ], [ %15, %._crit_edge ]
  %27 = tail call noundef ptr @_ZN2rw5Light9fromClumpEPNS_6LLLinkE(ptr noundef nonnull %.02533)
  tail call void @_ZN2rw5World8addLightEPNS_5LightE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %27)
  %28 = load ptr, ptr %26, align 8, !tbaa !14
  %29 = tail call noundef ptr @_ZN2rw8LinkList3endEv(ptr noundef nonnull align 8 dereferenceable(16) %14)
  %.not27 = icmp eq ptr %26, %29
  br i1 %.not27, label %._crit_edge36, label %.lr.ph35, !llvm.loop !19

._crit_edge41:                                    ; preds = %.lr.ph40, %._crit_edge36
  %30 = tail call noundef ptr @_ZNK2rw5Clump8getFrameEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  %.not29 = icmp eq ptr %30, null
  br i1 %.not29, label %39, label %35

.lr.ph40:                                         ; preds = %._crit_edge36, %.lr.ph40
  %31 = phi ptr [ %33, %.lr.ph40 ], [ %24, %._crit_edge36 ]
  %.038 = phi ptr [ %31, %.lr.ph40 ], [ %23, %._crit_edge36 ]
  %32 = tail call noundef ptr @_ZN2rw6Camera9fromClumpEPNS_6LLLinkE(ptr noundef nonnull %.038)
  tail call void @_ZN2rw5World9addCameraEPNS_6CameraE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %32)
  %33 = load ptr, ptr %31, align 8, !tbaa !14
  %34 = tail call noundef ptr @_ZN2rw8LinkList3endEv(ptr noundef nonnull align 8 dereferenceable(16) %22)
  %.not28 = icmp eq ptr %31, %34
  br i1 %.not28, label %._crit_edge41, label %.lr.ph40, !llvm.loop !20

35:                                               ; preds = %._crit_edge41
  %36 = tail call noundef ptr @_ZNK2rw5Clump8getFrameEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  %37 = getelementptr inbounds i8, ptr %36, i64 48
  tail call void @_ZN2rw6Matrix8optimizeEPNS0_9ToleranceE(ptr noundef nonnull align 4 dereferenceable(64) %37, ptr noundef null)
  %38 = tail call noundef ptr @_ZNK2rw5Clump8getFrameEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  tail call void @_ZN2rw5Frame13updateObjectsEv(ptr noundef nonnull align 8 dereferenceable(200) %38)
  br label %39

39:                                               ; preds = %35, %._crit_edge41
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2rw8LinkList3addEPNS_6LLLinkE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw8LinkList3endEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw6Atomic9fromClumpEPNS_6LLLinkE(ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw5Light9fromClumpEPNS_6LLLinkE(ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw6Camera9fromClumpEPNS_6LLLinkE(ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK2rw5Clump8getFrameEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #3 align 2

declare void @_ZN2rw6Matrix8optimizeEPNS0_9ToleranceE(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef) local_unnamed_addr #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 = { noreturn 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 #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 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 #4 = { noreturn 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, !10, i64 64}
!6 = !{!"_ZTSN2rw5ClumpE", !7, i64 0, !11, i64 16, !11, i64 32, !11, i64 48, !10, i64 64, !12, i64 72}
!7 = !{!"_ZTSN2rw6ObjectE", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !10, i64 8}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTSN2rw8LinkListE", !12, i64 0}
!12 = !{!"_ZTSN2rw6LLLinkE", !10, i64 0, !10, i64 8}
!13 = !{!6, !10, i64 16}
!14 = !{!12, !10, i64 0}
!15 = !{!6, !10, i64 32}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!6, !10, i64 48}
!19 = distinct !{!19, !17}
!20 = distinct !{!20, !17}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass