; LLVM IR from aap/librw :: src/clump.ll (ZN2rw6Atomic6createEv)

; 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::PluginList" = type { i32, i32, %"struct.rw::LinkList" }
%"struct.rw::LinkList" = type { %"struct.rw::LLLink" }
%"struct.rw::LLLink" = type { ptr, ptr }
%"struct.rw::Error" = type { i32, i32 }
%"struct.rw::Atomic" = type { %"struct.rw::ObjectWithFrame", ptr, %"struct.rw::Sphere", %"struct.rw::Sphere", ptr, %"struct.rw::LLLink", ptr, ptr, ptr, ptr }
%"struct.rw::ObjectWithFrame" = type { %"struct.rw::Object", %"struct.rw::LLLink", ptr }
%"struct.rw::Object" = type { i8, i8, i8, i8, ptr }
%"struct.rw::Sphere" = type { %"struct.rw::V3d", float }
%"struct.rw::V3d" = type { float, float, float }

@_ZN2rw6Atomic12numAllocatedE = external dso_local global i32, align 4
@_ZN2rw6Atomic9s_plglistE = external dso_local global %"struct.rw::PluginList", align 8
@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [73 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: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN2rw10malloc_LOCEmjPKc(i64 noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

declare noundef ptr @_ZN2rw9dbgsprintEjz(i32 noundef, ...) #3

declare void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef) #3

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

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

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

declare void @_ZN2rw10PluginList9constructEPv(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2rw6Atomic8setFrameEPNS_5FrameE(ptr noundef nonnull align 8 dereferenceable(136), ptr noundef) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN2rw6Atomic6createEv() #5 align 2 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca %"struct.rw::Error", align 4
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  %5 = load i32, ptr @_ZN2rw6Atomic9s_plglistE, align 8, !tbaa !5
  %6 = sext i32 %5 to i64
  %7 = call noundef ptr @_ZN2rw10malloc_LOCEmjPKc(i64 noundef %6, i32 noundef 196628, ptr noundef @.str.21)
  store ptr %7, ptr %2, align 8, !tbaa !13
  %8 = load ptr, ptr %2, align 8, !tbaa !13
  %9 = icmp eq ptr %8, null
  br i1 %9, label %10, label %22

10:                                               ; preds = %0
  br label %11

11:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %12 = getelementptr inbounds %"struct.rw::Error", ptr %3, i32 0, i32 0
  store i32 2, ptr %12, align 4, !tbaa !14
  %13 = getelementptr inbounds %"struct.rw::Error", ptr %3, i32 0, i32 1
  store i32 -2147483646, ptr %13, align 4, !tbaa !16
  %14 = load ptr, ptr @stderr, align 8, !tbaa !13
  %15 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 416) #6
  %16 = load ptr, ptr @stderr, align 8, !tbaa !13
  %17 = load i32, ptr @_ZN2rw6Atomic9s_plglistE, align 8, !tbaa !5
  %18 = call noundef ptr (i32, ...) @_ZN2rw9dbgsprintEjz(i32 noundef -2147483646, i32 noundef %17)
  %19 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef @.str.4, ptr noundef %18) #6
  call void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br label %20

20:                                               ; preds = %11
  br label %21

21:                                               ; preds = %20
  store ptr null, ptr %1, align 8
  store i32 1, ptr %4, align 4
  br label %79

22:                                               ; preds = %0
  %23 = load i32, ptr @_ZN2rw6Atomic12numAllocatedE, align 4, !tbaa !17
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr @_ZN2rw6Atomic12numAllocatedE, align 4, !tbaa !17
  %25 = load ptr, ptr %2, align 8, !tbaa !13
  %26 = getelementptr inbounds %"struct.rw::Atomic", ptr %25, i32 0, i32 0
  %27 = getelementptr inbounds %"struct.rw::ObjectWithFrame", ptr %26, i32 0, i32 0
  call void @_ZN2rw6Object4initEhh(ptr noundef nonnull align 8 dereferenceable(16) %27, i8 noundef zeroext 1, i8 noundef zeroext 0)
  %28 = load ptr, ptr %2, align 8, !tbaa !13
  %29 = getelementptr inbounds %"struct.rw::Atomic", ptr %28, i32 0, i32 0
  %30 = getelementptr inbounds %"struct.rw::ObjectWithFrame", ptr %29, i32 0, i32 2
  store ptr @_ZN2rwL10atomicSyncEPNS_15ObjectWithFrameE, ptr %30, align 8, !tbaa !18
  %31 = load ptr, ptr %2, align 8, !tbaa !13
  %32 = getelementptr inbounds %"struct.rw::Atomic", ptr %31, i32 0, i32 1
  store ptr null, ptr %32, align 8, !tbaa !25
  %33 = load ptr, ptr %2, align 8, !tbaa !13
  %34 = getelementptr inbounds %"struct.rw::Atomic", ptr %33, i32 0, i32 2
  %35 = getelementptr inbounds %"struct.rw::Sphere", ptr %34, i32 0, i32 0
  call void @_ZN2rw3V3d3setEfff(ptr noundef nonnull align 4 dereferenceable(12) %35, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %36 = load ptr, ptr %2, align 8, !tbaa !13
  %37 = getelementptr inbounds %"struct.rw::Atomic", ptr %36, i32 0, i32 2
  %38 = getelementptr inbounds %"struct.rw::Sphere", ptr %37, i32 0, i32 1
  store float 0.000000e+00, ptr %38, align 4, !tbaa !26
  %39 = load ptr, ptr %2, align 8, !tbaa !13
  %40 = getelementptr inbounds %"struct.rw::Atomic", ptr %39, i32 0, i32 3
  %41 = getelementptr inbounds %"struct.rw::Sphere", ptr %40, i32 0, i32 0
  call void @_ZN2rw3V3d3setEfff(ptr noundef nonnull align 4 dereferenceable(12) %41, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %42 = load ptr, ptr %2, align 8, !tbaa !13
  %43 = getelementptr inbounds %"struct.rw::Atomic", ptr %42, i32 0, i32 3
  %44 = getelementptr inbounds %"struct.rw::Sphere", ptr %43, i32 0, i32 1
  store float 0.000000e+00, ptr %44, align 4, !tbaa !27
  %45 = load ptr, ptr %2, align 8, !tbaa !13
  call void @_ZN2rw6Atomic8setFrameEPNS_5FrameE(ptr noundef nonnull align 8 dereferenceable(136) %45, ptr noundef null)
  %46 = load ptr, ptr %2, align 8, !tbaa !13
  %47 = getelementptr inbounds %"struct.rw::Atomic", ptr %46, i32 0, i32 0
  %48 = getelementptr inbounds %"struct.rw::ObjectWithFrame", ptr %47, i32 0, i32 0
  %49 = getelementptr inbounds %"struct.rw::Object", ptr %48, i32 0, i32 3
  %50 = load i8, ptr %49, align 1, !tbaa !28
  %51 = zext i8 %50 to i32
  %52 = or i32 %51, 1
  %53 = trunc i32 %52 to i8
  store i8 %53, ptr %49, align 1, !tbaa !28
  %54 = load ptr, ptr %2, align 8, !tbaa !13
  %55 = getelementptr inbounds %"struct.rw::Atomic", ptr %54, i32 0, i32 4
  store ptr null, ptr %55, align 8, !tbaa !29
  %56 = load ptr, ptr %2, align 8, !tbaa !13
  %57 = getelementptr inbounds %"struct.rw::Atomic", ptr %56, i32 0, i32 5
  call void @_ZN2rw6LLLink4initEv(ptr noundef nonnull align 8 dereferenceable(16) %57)
  %58 = load ptr, ptr %2, align 8, !tbaa !13
  %59 = getelementptr inbounds %"struct.rw::Atomic", ptr %58, i32 0, i32 6
  store ptr null, ptr %59, align 8, !tbaa !30
  %60 = load ptr, ptr %2, align 8, !tbaa !13
  %61 = getelementptr inbounds %"struct.rw::Atomic", ptr %60, i32 0, i32 7
  store ptr @_ZN2rw6Atomic15defaultRenderCBEPS0_, ptr %61, align 8, !tbaa !31
  %62 = load ptr, ptr %2, align 8, !tbaa !13
  %63 = getelementptr inbounds %"struct.rw::Atomic", ptr %62, i32 0, i32 0
  %64 = getelementptr inbounds %"struct.rw::ObjectWithFrame", ptr %63, i32 0, i32 0
  %65 = getelementptr inbounds %"struct.rw::Object", ptr %64, i32 0, i32 2
  store i8 5, ptr %65, align 2, !tbaa !32
  %66 = load ptr, ptr %2, align 8, !tbaa !13
  %67 = getelementptr inbounds %"struct.rw::Atomic", ptr %66, i32 0, i32 8
  store ptr null, ptr %67, align 8, !tbaa !33
  %68 = load ptr, ptr %2, align 8, !tbaa !13
  %69 = getelementptr inbounds %"struct.rw::Atomic", ptr %68, i32 0, i32 0
  %70 = getelementptr inbounds %"struct.rw::ObjectWithFrame", ptr %69, i32 0, i32 2
  %71 = load ptr, ptr %70, align 8, !tbaa !18
  %72 = load ptr, ptr %2, align 8, !tbaa !13
  %73 = getelementptr inbounds %"struct.rw::Atomic", ptr %72, i32 0, i32 9
  store ptr %71, ptr %73, align 8, !tbaa !34
  %74 = load ptr, ptr %2, align 8, !tbaa !13
  %75 = getelementptr inbounds %"struct.rw::Atomic", ptr %74, i32 0, i32 0
  %76 = getelementptr inbounds %"struct.rw::ObjectWithFrame", ptr %75, i32 0, i32 2
  store ptr @_ZN2rwL15worldAtomicSyncEPNS_15ObjectWithFrameE, ptr %76, align 8, !tbaa !18
  %77 = load ptr, ptr %2, align 8, !tbaa !13
  call void @_ZN2rw10PluginList9constructEPv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN2rw6Atomic9s_plglistE, ptr noundef %77)
  %78 = load ptr, ptr %2, align 8, !tbaa !13
  store ptr %78, ptr %1, align 8
  store i32 1, ptr %4, align 4
  br label %79

79:                                               ; preds = %22, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %80 = load ptr, ptr %1, align 8
  ret ptr %80
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN2rwL10atomicSyncEPNS_15ObjectWithFrameE(ptr noundef) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2rw6Atomic15defaultRenderCBEPS0_(ptr noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN2rwL15worldAtomicSyncEPNS_15ObjectWithFrameE(ptr noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"_ZTSN2rw10PluginListE", !7, i64 0, !7, i64 4, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN2rw8LinkListE", !11, i64 0}
!11 = !{!"_ZTSN2rw6LLLinkE", !12, i64 0, !12, i64 8}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!15, !7, i64 0}
!15 = !{!"_ZTSN2rw5ErrorE", !7, i64 0, !7, i64 4}
!16 = !{!15, !7, i64 4}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !12, i64 32}
!19 = !{!"_ZTSN2rw6AtomicE", !20, i64 0, !12, i64 40, !22, i64 48, !22, i64 64, !12, i64 80, !11, i64 88, !12, i64 104, !12, i64 112, !12, i64 120, !12, i64 128}
!20 = !{!"_ZTSN2rw15ObjectWithFrameE", !21, i64 0, !11, i64 16, !12, i64 32}
!21 = !{!"_ZTSN2rw6ObjectE", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !12, i64 8}
!22 = !{!"_ZTSN2rw6SphereE", !23, i64 0, !24, i64 12}
!23 = !{!"_ZTSN2rw3V3dE", !24, i64 0, !24, i64 4, !24, i64 8}
!24 = !{!"float", !8, i64 0}
!25 = !{!19, !12, i64 40}
!26 = !{!19, !24, i64 60}
!27 = !{!19, !24, i64 76}
!28 = !{!19, !8, i64 3}
!29 = !{!19, !12, i64 80}
!30 = !{!19, !12, i64 104}
!31 = !{!19, !12, i64 112}
!32 = !{!19, !8, i64 2}
!33 = !{!19, !12, i64 120}
!34 = !{!19, !12, i64 128}


; 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.rw::PluginList" = type { i32, i32, %"struct.rw::LinkList" }
%"struct.rw::LinkList" = type { %"struct.rw::LLLink" }
%"struct.rw::LLLink" = type { ptr, ptr }
%"struct.rw::Error" = type { i32, i32 }

@_ZN2rw6Atomic12numAllocatedE = external dso_local local_unnamed_addr global i32, align 4
@_ZN2rw6Atomic9s_plglistE = external dso_local global %"struct.rw::PluginList", align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [73 x i8], align 1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN2rw10malloc_LOCEmjPKc(i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

declare noundef ptr @_ZN2rw9dbgsprintEjz(i32 noundef, ...) local_unnamed_addr #3

declare void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef) local_unnamed_addr #3

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

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

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

declare void @_ZN2rw10PluginList9constructEPv(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2rw6Atomic8setFrameEPNS_5FrameE(ptr noundef nonnull align 8 dereferenceable(136), ptr noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN2rw6Atomic6createEv() local_unnamed_addr #5 align 2 {
  %1 = alloca %"struct.rw::Error", align 4
  %2 = load i32, ptr @_ZN2rw6Atomic9s_plglistE, align 8, !tbaa !5
  %3 = sext i32 %2 to i64
  %4 = tail call noundef ptr @_ZN2rw10malloc_LOCEmjPKc(i64 noundef %3, i32 noundef 196628, ptr noundef nonnull @.str.21)
  %5 = icmp eq ptr %4, null
  br i1 %5, label %6, label %14

6:                                                ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  store i32 2, ptr %1, align 4, !tbaa !13
  %7 = getelementptr inbounds i8, ptr %1, i64 4
  store i32 -2147483646, ptr %7, align 4, !tbaa !15
  %8 = load ptr, ptr @stderr, align 8, !tbaa !16
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 416) #7
  %10 = load ptr, ptr @stderr, align 8, !tbaa !16
  %11 = load i32, ptr @_ZN2rw6Atomic9s_plglistE, align 8, !tbaa !5
  %12 = tail call noundef ptr (i32, ...) @_ZN2rw9dbgsprintEjz(i32 noundef -2147483646, i32 noundef %11)
  %13 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %10, ptr noundef nonnull @.str.4, ptr noundef %12) #7
  call void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef nonnull %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  br label %34

14:                                               ; preds = %0
  %15 = load i32, ptr @_ZN2rw6Atomic12numAllocatedE, align 4, !tbaa !17
  %16 = add nsw i32 %15, 1
  store i32 %16, ptr @_ZN2rw6Atomic12numAllocatedE, align 4, !tbaa !17
  tail call void @_ZN2rw6Object4initEhh(ptr noundef nonnull align 8 dereferenceable(16) %4, i8 noundef zeroext 1, i8 noundef zeroext 0)
  %17 = getelementptr inbounds i8, ptr %4, i64 32
  store ptr @_ZN2rwL10atomicSyncEPNS_15ObjectWithFrameE, ptr %17, align 8, !tbaa !18
  %18 = getelementptr inbounds i8, ptr %4, i64 40
  store ptr null, ptr %18, align 8, !tbaa !25
  %19 = getelementptr inbounds i8, ptr %4, i64 48
  tail call void @_ZN2rw3V3d3setEfff(ptr noundef nonnull align 4 dereferenceable(12) %19, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %20 = getelementptr inbounds i8, ptr %4, i64 60
  store float 0.000000e+00, ptr %20, align 4, !tbaa !26
  %21 = getelementptr inbounds i8, ptr %4, i64 64
  tail call void @_ZN2rw3V3d3setEfff(ptr noundef nonnull align 4 dereferenceable(12) %21, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %22 = getelementptr inbounds i8, ptr %4, i64 76
  store float 0.000000e+00, ptr %22, align 4, !tbaa !27
  tail call void @_ZN2rw6Atomic8setFrameEPNS_5FrameE(ptr noundef nonnull align 8 dereferenceable(136) %4, ptr noundef null)
  %23 = getelementptr inbounds i8, ptr %4, i64 3
  %24 = load i8, ptr %23, align 1, !tbaa !28
  %25 = or i8 %24, 1
  store i8 %25, ptr %23, align 1, !tbaa !28
  %26 = getelementptr inbounds i8, ptr %4, i64 80
  store ptr null, ptr %26, align 8, !tbaa !29
  %27 = getelementptr inbounds i8, ptr %4, i64 88
  tail call void @_ZN2rw6LLLink4initEv(ptr noundef nonnull align 8 dereferenceable(16) %27)
  %28 = getelementptr inbounds i8, ptr %4, i64 104
  store ptr null, ptr %28, align 8, !tbaa !30
  %29 = getelementptr inbounds i8, ptr %4, i64 112
  store ptr @_ZN2rw6Atomic15defaultRenderCBEPS0_, ptr %29, align 8, !tbaa !31
  %30 = getelementptr inbounds i8, ptr %4, i64 2
  store i8 5, ptr %30, align 2, !tbaa !32
  %31 = getelementptr inbounds i8, ptr %4, i64 120
  store ptr null, ptr %31, align 8, !tbaa !33
  %32 = load ptr, ptr %17, align 8, !tbaa !18
  %33 = getelementptr inbounds i8, ptr %4, i64 128
  store ptr %32, ptr %33, align 8, !tbaa !34
  store ptr @_ZN2rwL15worldAtomicSyncEPNS_15ObjectWithFrameE, ptr %17, align 8, !tbaa !18
  tail call void @_ZN2rw10PluginList9constructEPv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN2rw6Atomic9s_plglistE, ptr noundef nonnull %4)
  br label %34

34:                                               ; preds = %14, %6
  ret ptr %4
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN2rwL10atomicSyncEPNS_15ObjectWithFrameE(ptr noundef) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2rw6Atomic15defaultRenderCBEPS0_(ptr noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN2rwL15worldAtomicSyncEPNS_15ObjectWithFrameE(ptr noundef) #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nofree 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { cold 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 = !{!"_ZTSN2rw10PluginListE", !7, i64 0, !7, i64 4, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN2rw8LinkListE", !11, i64 0}
!11 = !{!"_ZTSN2rw6LLLinkE", !12, i64 0, !12, i64 8}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!14, !7, i64 0}
!14 = !{!"_ZTSN2rw5ErrorE", !7, i64 0, !7, i64 4}
!15 = !{!14, !7, i64 4}
!16 = !{!12, !12, i64 0}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !12, i64 32}
!19 = !{!"_ZTSN2rw6AtomicE", !20, i64 0, !12, i64 40, !22, i64 48, !22, i64 64, !12, i64 80, !11, i64 88, !12, i64 104, !12, i64 112, !12, i64 120, !12, i64 128}
!20 = !{!"_ZTSN2rw15ObjectWithFrameE", !21, i64 0, !11, i64 16, !12, i64 32}
!21 = !{!"_ZTSN2rw6ObjectE", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !12, i64 8}
!22 = !{!"_ZTSN2rw6SphereE", !23, i64 0, !24, i64 12}
!23 = !{!"_ZTSN2rw3V3dE", !24, i64 0, !24, i64 4, !24, i64 8}
!24 = !{!"float", !8, i64 0}
!25 = !{!19, !12, i64 40}
!26 = !{!19, !24, i64 60}
!27 = !{!19, !24, i64 76}
!28 = !{!19, !8, i64 3}
!29 = !{!19, !12, i64 80}
!30 = !{!19, !12, i64 104}
!31 = !{!19, !12, i64 112}
!32 = !{!19, !8, i64 2}
!33 = !{!19, !12, i64 120}
!34 = !{!19, !12, i64 128}


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