; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Graphics/R3Scene.ll (ZN7R3SceneC2Ev)

; 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.R3Camera = type { %class.R3CoordSystem, double, double, double, double, double, ptr }
%class.R3CoordSystem = type { %class.R3Point, %class.R3Triad }
%class.R3Point = type { [3 x double] }
%class.R3Triad = type { [3 x %class.R3Vector] }
%class.R3Vector = type { [3 x double] }
%class.R2Viewport = type { i32, i32, i32, i32 }
%class.R3Scene = type { ptr, %class.RNArray, %class.RNArray.0, %class.RNArray.1, %class.RNArray.2, %class.RNArray.3, %class.RNArray.4, %class.RNSymbolTable, %class.R3Viewer, %class.RNRgb, %class.RNRgb, ptr, ptr, ptr }
%class.RNArray = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%class.RNArray.0 = type { %class.RNVArray }
%class.RNArray.1 = type { %class.RNVArray }
%class.RNArray.2 = type { %class.RNVArray }
%class.RNArray.3 = type { %class.RNVArray }
%class.RNArray.4 = type { %class.RNVArray }
%class.RNSymbolTable = type { %class.RNMap }
%class.RNMap = type { ptr }
%class.R3Viewer = type { ptr, %class.R3Camera, %class.R2Viewport }
%class.RNRgb = type { [3 x double] }

@R3default_camera = external global %class.R3Camera, align 8
@R2default_viewport = external global %class.R2Viewport, align 4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7R3SceneC2Ev(ptr noundef nonnull align 8 dereferenceable(352) %0) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %5 = load ptr, ptr %2, align 8
  %6 = getelementptr inbounds %class.R3Scene, ptr %5, i32 0, i32 1
  call void @_ZN7RNArrayIP11R3SceneNodeEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %7 = getelementptr inbounds %class.R3Scene, ptr %5, i32 0, i32 2
  invoke void @_ZN7RNArrayIP7R3LightEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %8 unwind label %36

8:                                                ; preds = %1
  %9 = getelementptr inbounds %class.R3Scene, ptr %5, i32 0, i32 3
  invoke void @_ZN7RNArrayIP10R3MaterialEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %10 unwind label %40

10:                                               ; preds = %8
  %11 = getelementptr inbounds %class.R3Scene, ptr %5, i32 0, i32 4
  invoke void @_ZN7RNArrayIP6R3BrdfEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %12 unwind label %44

12:                                               ; preds = %10
  %13 = getelementptr inbounds %class.R3Scene, ptr %5, i32 0, i32 5
  invoke void @_ZN7RNArrayIP9R2TextureEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %14 unwind label %48

14:                                               ; preds = %12
  %15 = getelementptr inbounds %class.R3Scene, ptr %5, i32 0, i32 6
  invoke void @_ZN7RNArrayIP7R3SceneEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15)
          to label %16 unwind label %52

16:                                               ; preds = %14
  %17 = getelementptr inbounds %class.R3Scene, ptr %5, i32 0, i32 7
  invoke void @_ZN13RNSymbolTableIPKcEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %18 unwind label %56

18:                                               ; preds = %16
  %19 = getelementptr inbounds %class.R3Scene, ptr %5, i32 0, i32 8
  invoke void @_ZN8R3ViewerC1Ev(ptr noundef nonnull align 8 dereferenceable(168) %19)
          to label %20 unwind label %60

20:                                               ; preds = %18
  %21 = getelementptr inbounds %class.R3Scene, ptr %5, i32 0, i32 9
  invoke void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %21, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %22 unwind label %64

22:                                               ; preds = %20
  %23 = getelementptr inbounds %class.R3Scene, ptr %5, i32 0, i32 10
  invoke void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %23, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %24 unwind label %64

24:                                               ; preds = %22
  %25 = getelementptr inbounds %class.R3Scene, ptr %5, i32 0, i32 11
  store ptr null, ptr %25, align 8, !tbaa !9
  %26 = getelementptr inbounds %class.R3Scene, ptr %5, i32 0, i32 12
  store ptr null, ptr %26, align 8, !tbaa !29
  %27 = getelementptr inbounds %class.R3Scene, ptr %5, i32 0, i32 13
  store ptr null, ptr %27, align 8, !tbaa !30
  %28 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 432) #6
          to label %29 unwind label %64

29:                                               ; preds = %24
  invoke void @_ZN11R3SceneNodeC1EP7R3Scene(ptr noundef nonnull align 8 dereferenceable(432) %28, ptr noundef %5)
          to label %30 unwind label %68

30:                                               ; preds = %29
  %31 = getelementptr inbounds %class.R3Scene, ptr %5, i32 0, i32 0
  store ptr %28, ptr %31, align 8, !tbaa !31
  %32 = getelementptr inbounds %class.R3Scene, ptr %5, i32 0, i32 8
  invoke void @_ZN8R3Viewer9SetCameraERK8R3Camera(ptr noundef nonnull align 8 dereferenceable(168) %32, ptr noundef nonnull align 8 dereferenceable(144) @R3default_camera)
          to label %33 unwind label %64

33:                                               ; preds = %30
  %34 = getelementptr inbounds %class.R3Scene, ptr %5, i32 0, i32 8
  invoke void @_ZN8R3Viewer11SetViewportERK10R2Viewport(ptr noundef nonnull align 8 dereferenceable(168) %34, ptr noundef nonnull align 4 dereferenceable(16) @R2default_viewport)
          to label %35 unwind label %64

35:                                               ; preds = %33
  ret void

36:                                               ; preds = %1
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %3, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %4, align 4
  br label %79

40:                                               ; preds = %8
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %3, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %4, align 4
  br label %78

44:                                               ; preds = %10
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %3, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %4, align 4
  br label %77

48:                                               ; preds = %12
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %3, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %4, align 4
  br label %76

52:                                               ; preds = %14
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %3, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %4, align 4
  br label %75

56:                                               ; preds = %16
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %3, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %4, align 4
  br label %74

60:                                               ; preds = %18
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %3, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %4, align 4
  br label %73

64:                                               ; preds = %33, %30, %24, %22, %20
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %3, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %4, align 4
  br label %72

68:                                               ; preds = %29
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %3, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %4, align 4
  call void @_ZdlPvm(ptr noundef %28, i64 noundef 432) #7
  br label %72

72:                                               ; preds = %68, %64
  call void @_ZN8R3ViewerD1Ev(ptr noundef nonnull align 8 dereferenceable(168) %19) #8
  br label %73

73:                                               ; preds = %72, %60
  call void @_ZN5RNMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br label %74

74:                                               ; preds = %73, %56
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #8
  br label %75

75:                                               ; preds = %74, %52
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #8
  br label %76

76:                                               ; preds = %75, %48
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #8
  br label %77

77:                                               ; preds = %76, %44
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #8
  br label %78

78:                                               ; preds = %77, %40
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #8
  br label %79

79:                                               ; preds = %78, %36
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #8
  br label %80

80:                                               ; preds = %79
  %81 = load ptr, ptr %3, align 8
  %82 = load i32, ptr %4, align 4
  %83 = insertvalue { ptr, i32 } poison, ptr %81, 0
  %84 = insertvalue { ptr, i32 } %83, i32 %82, 1
  resume { ptr, i32 } %84
}

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

declare void @_ZN8R3ViewerC1Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #1

declare void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #1

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

declare void @_ZN11R3SceneNodeC1EP7R3Scene(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) unnamed_addr #1

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

declare void @_ZN8R3Viewer9SetCameraERK8R3Camera(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(144)) #1

declare void @_ZN8R3Viewer11SetViewportERK10R2Viewport(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 4 dereferenceable(16)) #1

; Function Attrs: nounwind
declare void @_ZN8R3ViewerD1Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #4

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

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

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 = { "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 = { 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 #3 = { 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 #4 = { 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 #5 = { 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 #6 = { builtin allocsize(0) }
attributes #7 = { builtin nounwind }
attributes #8 = { 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 328}
!10 = !{!"_ZTS7R3Scene", !6, i64 0, !11, i64 8, !14, i64 24, !15, i64 40, !16, i64 56, !17, i64 72, !18, i64 88, !19, i64 104, !21, i64 112, !28, i64 280, !28, i64 304, !6, i64 328, !6, i64 336, !6, i64 344}
!11 = !{!"_ZTS7RNArrayIP11R3SceneNodeE", !12, i64 0}
!12 = !{!"_ZTS8RNVArray", !6, i64 0, !13, i64 8, !13, i64 12}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTS7RNArrayIP7R3LightE", !12, i64 0}
!15 = !{!"_ZTS7RNArrayIP10R3MaterialE", !12, i64 0}
!16 = !{!"_ZTS7RNArrayIP6R3BrdfE", !12, i64 0}
!17 = !{!"_ZTS7RNArrayIP9R2TextureE", !12, i64 0}
!18 = !{!"_ZTS7RNArrayIP7R3SceneE", !12, i64 0}
!19 = !{!"_ZTS13RNSymbolTableIPKcE", !20, i64 0}
!20 = !{!"_ZTS5RNMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcE", !6, i64 0}
!21 = !{!"_ZTS8R3Viewer", !22, i64 8, !27, i64 152}
!22 = !{!"_ZTS8R3Camera", !23, i64 0, !26, i64 96, !26, i64 104, !26, i64 112, !26, i64 120, !26, i64 128, !6, i64 136}
!23 = !{!"_ZTS13R3CoordSystem", !24, i64 0, !25, i64 24}
!24 = !{!"_ZTS7R3Point", !7, i64 0}
!25 = !{!"_ZTS7R3Triad", !7, i64 0}
!26 = !{!"double", !7, i64 0}
!27 = !{!"_ZTS10R2Viewport", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!28 = !{!"_ZTS5RNRgb", !7, i64 0}
!29 = !{!10, !6, i64 336}
!30 = !{!10, !6, i64 344}
!31 = !{!10, !6, 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"

%class.R3Camera = type { %class.R3CoordSystem, double, double, double, double, double, ptr }
%class.R3CoordSystem = type { %class.R3Point, %class.R3Triad }
%class.R3Point = type { [3 x double] }
%class.R3Triad = type { [3 x %class.R3Vector] }
%class.R3Vector = type { [3 x double] }
%class.R2Viewport = type { i32, i32, i32, i32 }

@R3default_camera = external global %class.R3Camera, align 8
@R2default_viewport = external global %class.R2Viewport, align 4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7R3SceneC2Ev(ptr noundef nonnull align 8 dereferenceable(352) %0) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZN7RNArrayIP11R3SceneNodeEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %3 = getelementptr inbounds i8, ptr %0, i64 24
  invoke void @_ZN7RNArrayIP7R3LightEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %4 unwind label %27

4:                                                ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  invoke void @_ZN7RNArrayIP10R3MaterialEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %6 unwind label %29

6:                                                ; preds = %4
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  invoke void @_ZN7RNArrayIP6R3BrdfEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %8 unwind label %31

8:                                                ; preds = %6
  %9 = getelementptr inbounds i8, ptr %0, i64 72
  invoke void @_ZN7RNArrayIP9R2TextureEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %10 unwind label %33

10:                                               ; preds = %8
  %11 = getelementptr inbounds i8, ptr %0, i64 88
  invoke void @_ZN7RNArrayIP7R3SceneEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %12 unwind label %35

12:                                               ; preds = %10
  %13 = getelementptr inbounds i8, ptr %0, i64 104
  invoke void @_ZN13RNSymbolTableIPKcEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %14 unwind label %37

14:                                               ; preds = %12
  %15 = getelementptr inbounds i8, ptr %0, i64 112
  invoke void @_ZN8R3ViewerC1Ev(ptr noundef nonnull align 8 dereferenceable(168) %15)
          to label %16 unwind label %39

16:                                               ; preds = %14
  %17 = getelementptr inbounds i8, ptr %0, i64 280
  invoke void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %17, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %18 unwind label %41

18:                                               ; preds = %16
  %19 = getelementptr inbounds i8, ptr %0, i64 304
  invoke void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %19, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %20 unwind label %41

20:                                               ; preds = %18
  %21 = getelementptr inbounds i8, ptr %0, i64 328
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %21, i8 0, i64 24, i1 false)
  %22 = invoke noalias noundef nonnull dereferenceable(432) ptr @_Znwm(i64 noundef 432) #7
          to label %23 unwind label %41

23:                                               ; preds = %20
  invoke void @_ZN11R3SceneNodeC1EP7R3Scene(ptr noundef nonnull align 8 dereferenceable(432) %22, ptr noundef nonnull %0)
          to label %24 unwind label %43

24:                                               ; preds = %23
  store ptr %22, ptr %0, align 8, !tbaa !5
  invoke void @_ZN8R3Viewer9SetCameraERK8R3Camera(ptr noundef nonnull align 8 dereferenceable(168) %15, ptr noundef nonnull align 8 dereferenceable(144) @R3default_camera)
          to label %25 unwind label %41

25:                                               ; preds = %24
  invoke void @_ZN8R3Viewer11SetViewportERK10R2Viewport(ptr noundef nonnull align 8 dereferenceable(168) %15, ptr noundef nonnull align 4 dereferenceable(16) @R2default_viewport)
          to label %26 unwind label %41

26:                                               ; preds = %25
  ret void

27:                                               ; preds = %1
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %52

29:                                               ; preds = %4
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %51

31:                                               ; preds = %6
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %50

33:                                               ; preds = %8
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %49

35:                                               ; preds = %10
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %48

37:                                               ; preds = %12
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %47

39:                                               ; preds = %14
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %46

41:                                               ; preds = %25, %24, %20, %18, %16
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %45

43:                                               ; preds = %23
  %44 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %22, i64 noundef 432) #8
  br label %45

45:                                               ; preds = %43, %41
  %.pn = phi { ptr, i32 } [ %42, %41 ], [ %44, %43 ]
  tail call void @_ZN8R3ViewerD1Ev(ptr noundef nonnull align 8 dereferenceable(168) %15) #9
  br label %46

46:                                               ; preds = %45, %39
  %.pn.pn = phi { ptr, i32 } [ %.pn, %45 ], [ %40, %39 ]
  tail call void @_ZN5RNMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  br label %47

47:                                               ; preds = %46, %37
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %46 ], [ %38, %37 ]
  tail call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #9
  br label %48

48:                                               ; preds = %47, %35
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %47 ], [ %36, %35 ]
  tail call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #9
  br label %49

49:                                               ; preds = %48, %33
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %48 ], [ %34, %33 ]
  tail call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #9
  br label %50

50:                                               ; preds = %49, %31
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %49 ], [ %32, %31 ]
  tail call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #9
  br label %51

51:                                               ; preds = %50, %29
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %50 ], [ %30, %29 ]
  tail call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #9
  br label %52

52:                                               ; preds = %51, %27
  %.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn, %51 ], [ %28, %27 ]
  tail call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %2) #9
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn.pn
}

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

declare void @_ZN8R3ViewerC1Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #1

declare void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #1

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

declare void @_ZN11R3SceneNodeC1EP7R3Scene(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) unnamed_addr #1

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

declare void @_ZN8R3Viewer9SetCameraERK8R3Camera(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #1

declare void @_ZN8R3Viewer11SetViewportERK10R2Viewport(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN8R3ViewerD1Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #4

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

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

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

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 = { "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 = { 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 #3 = { 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 #4 = { 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 #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { builtin nounwind }
attributes #9 = { 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 = !{!"_ZTS7R3Scene", !7, i64 0, !10, i64 8, !13, i64 24, !14, i64 40, !15, i64 56, !16, i64 72, !17, i64 88, !18, i64 104, !20, i64 112, !27, i64 280, !27, i64 304, !7, i64 328, !7, i64 336, !7, i64 344}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS7RNArrayIP11R3SceneNodeE", !11, i64 0}
!11 = !{!"_ZTS8RNVArray", !7, i64 0, !12, i64 8, !12, i64 12}
!12 = !{!"int", !8, i64 0}
!13 = !{!"_ZTS7RNArrayIP7R3LightE", !11, i64 0}
!14 = !{!"_ZTS7RNArrayIP10R3MaterialE", !11, i64 0}
!15 = !{!"_ZTS7RNArrayIP6R3BrdfE", !11, i64 0}
!16 = !{!"_ZTS7RNArrayIP9R2TextureE", !11, i64 0}
!17 = !{!"_ZTS7RNArrayIP7R3SceneE", !11, i64 0}
!18 = !{!"_ZTS13RNSymbolTableIPKcE", !19, i64 0}
!19 = !{!"_ZTS5RNMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcE", !7, i64 0}
!20 = !{!"_ZTS8R3Viewer", !21, i64 8, !26, i64 152}
!21 = !{!"_ZTS8R3Camera", !22, i64 0, !25, i64 96, !25, i64 104, !25, i64 112, !25, i64 120, !25, i64 128, !7, i64 136}
!22 = !{!"_ZTS13R3CoordSystem", !23, i64 0, !24, i64 24}
!23 = !{!"_ZTS7R3Point", !8, i64 0}
!24 = !{!"_ZTS7R3Triad", !8, i64 0}
!25 = !{!"double", !8, i64 0}
!26 = !{!"_ZTS10R2Viewport", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!27 = !{!"_ZTS5RNRgb", !8, i64 0}


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